const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelsView-kzJEhvUB.js","assets/code-xml-D8KV20lN.js","assets/rotate-ccw-D-_Gb8HQ.js","assets/zap-BzgvZa8u.js","assets/layers-BNyHHdLg.js","assets/ConnectView-pS9nDVLn.js","assets/folder-open-wGxbAB4V.js","assets/circle-x-BPOmowbC.js","assets/copy-BMmvuJ2J.js","assets/MemoryView-Bg74Wg9z.js","assets/send-CgygdWYO.js","assets/book-open-Dl0AmNw9.js","assets/GuideView-DIZxOzg5.js","assets/AuftragsbuchView-Ba9tMOnf.js","assets/SectionLabel-BpAZbx-8.js","assets/IdeenView-CvrKo9TU.js","assets/ChronikView-B9KZGo_J.js","assets/EigenlebenView-rXqzvB3k.js","assets/WissenView-CrwRIwey.js"])))=>i.map(i=>d[i]); var ZI=Object.defineProperty;var S1=e=>{throw TypeError(e)};var JI=(e,t,r)=>t in e?ZI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ks=(e,t,r)=>JI(e,typeof t!="symbol"?t+"":t,r),xm=(e,t,r)=>t.has(e)||S1("Cannot "+r);var $=(e,t,r)=>(xm(e,t,"read from private field"),r?r.call(e):t.get(e)),je=(e,t,r)=>t.has(e)?S1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pe=(e,t,r,n)=>(xm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ze=(e,t,r)=>(xm(e,t,"access private method"),r);var Gc=(e,t,r,n)=>({set _(i){pe(e,t,i,r)},get _(){return $(e,t,n)}});function eM(e,t){for(var r=0;rn[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"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function $g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bm={exports:{}},Ss={},wm={exports:{}},Le={};/** * @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 E1;function tM(){if(E1)return Le;E1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function v(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function E(M,T,Z){this.props=M,this.context=T,this.refs=k,this.updater=Z||b}E.prototype.isReactComponent={},E.prototype.setState=function(M,T){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,T,"setState")},E.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function P(){}P.prototype=E.prototype;function j(M,T,Z){this.props=M,this.context=T,this.refs=k,this.updater=Z||b}var _=j.prototype=new P;_.constructor=j,S(_,E.prototype),_.isPureReactComponent=!0;var O=Array.isArray,N=Object.prototype.hasOwnProperty,C={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function z(M,T,Z){var se,te={},ce=null,ge=null;if(T!=null)for(se in T.ref!==void 0&&(ge=T.ref),T.key!==void 0&&(ce=""+T.key),T)N.call(T,se)&&!R.hasOwnProperty(se)&&(te[se]=T[se]);var _e=arguments.length-2;if(_e===1)te.children=Z;else if(1<_e){for(var J=Array(_e),we=0;we<_e;we++)J[we]=arguments[we+2];te.children=J}if(M&&M.defaultProps)for(se in _e=M.defaultProps,_e)te[se]===void 0&&(te[se]=_e[se]);return{$$typeof:e,type:M,key:ce,ref:ge,props:te,_owner:C.current}}function F(M,T){return{$$typeof:e,type:M.type,key:T,ref:M.ref,props:M.props,_owner:M._owner}}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function Q(M){var T={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Z){return T[Z]})}var B=/\/+/g;function ue(M,T){return typeof M=="object"&&M!==null&&M.key!=null?Q(""+M.key):T.toString(36)}function G(M,T,Z,se,te){var ce=typeof M;(ce==="undefined"||ce==="boolean")&&(M=null);var ge=!1;if(M===null)ge=!0;else switch(ce){case"string":case"number":ge=!0;break;case"object":switch(M.$$typeof){case e:case t:ge=!0}}if(ge)return ge=M,te=te(ge),M=se===""?"."+ue(ge,0):se,O(te)?(Z="",M!=null&&(Z=M.replace(B,"$&/")+"/"),G(te,T,Z,"",function(we){return we})):te!=null&&(V(te)&&(te=F(te,Z+(!te.key||ge&&ge.key===te.key?"":(""+te.key).replace(B,"$&/")+"/")+M)),T.push(te)),1;if(ge=0,se=se===""?".":se+":",O(M))for(var _e=0;_e>>1,T=Y[M];if(0>>1;Mi(te,X))cei(ge,te)?(Y[M]=ge,Y[ce]=X,M=ce):(Y[M]=te,Y[se]=X,M=se);else if(cei(ge,X))Y[M]=ge,Y[ce]=X,M=ce;else break e}}return ae}function i(Y,ae){var X=Y.sortIndex-ae.sortIndex;return X!==0?X:Y.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,v=3,b=!1,S=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Y){for(var ae=r(f);ae!==null;){if(ae.callback===null)n(f);else if(ae.startTime<=Y)n(f),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=r(f)}}function O(Y){if(k=!1,_(Y),!S)if(r(d)!==null)S=!0,fe(N);else{var ae=r(f);ae!==null&&de(O,ae.startTime-Y)}}function N(Y,ae){S=!1,k&&(k=!1,P(z),z=-1),b=!0;var X=v;try{for(_(ae),m=r(d);m!==null&&(!(m.expirationTime>ae)||Y&&!Q());){var M=m.callback;if(typeof M=="function"){m.callback=null,v=m.priorityLevel;var T=M(m.expirationTime<=ae);ae=e.unstable_now(),typeof T=="function"?m.callback=T:m===r(d)&&n(d),_(ae)}else n(d);m=r(d)}if(m!==null)var Z=!0;else{var se=r(f);se!==null&&de(O,se.startTime-ae),Z=!1}return Z}finally{m=null,v=X,b=!1}}var C=!1,R=null,z=-1,F=5,V=-1;function Q(){return!(e.unstable_now()-VY||125M?(Y.sortIndex=X,t(f,Y),r(d)===null&&Y===r(f)&&(k?(P(z),z=-1):k=!0,de(O,X-M))):(Y.sortIndex=T,t(d,Y),S||b||(S=!0,fe(N))),Y},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(Y){var ae=v;return function(){var X=v;v=ae;try{return Y.apply(this,arguments)}finally{v=X}}}})(Em)),Em}var j1;function aM(){return j1||(j1=1,Sm.exports=iM()),Sm.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 _1;function oM(){if(_1)return hr;_1=1;var e=El(),t=aM();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},m={};function v(a){return d.call(m,a)?!0:d.call(h,a)?!1:f.test(a)?m[a]=!0:(h[a]=!0,!1)}function b(a,l,c,p){if(c!==null&&c.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return p?!1:c!==null?!c.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function S(a,l,c,p){if(l===null||typeof l>"u"||b(a,l,c,p))return!0;if(p)return!1;if(c!==null)switch(c.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function k(a,l,c,p,g,w,A){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=p,this.attributeNamespace=g,this.mustUseProperty=c,this.propertyName=a,this.type=l,this.sanitizeURL=w,this.removeEmptyString=A}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){E[a]=new k(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];E[l]=new k(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){E[a]=new k(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){E[a]=new k(a,2,!1,a,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(a){E[a]=new k(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){E[a]=new k(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){E[a]=new k(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){E[a]=new k(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){E[a]=new k(a,5,!1,a.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function j(a){return a[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(a){var l=a.replace(P,j);E[l]=new k(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(P,j);E[l]=new k(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(P,j);E[l]=new k(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){E[a]=new k(a,1,!1,a.toLowerCase(),null,!1,!1)}),E.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){E[a]=new k(a,1,!1,a.toLowerCase(),null,!0,!0)});function _(a,l,c,p){var g=E.hasOwnProperty(l)?E[l]:null;(g!==null?g.type!==0:p||!(2I||g[A]!==w[I]){var D=` `+g[A].replace(" at new "," at ");return a.displayName&&D.includes("")&&(D=D.replace("",a.displayName)),D}while(1<=A&&0<=I);break}}}finally{Z=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?T(a):""}function te(a){switch(a.tag){case 5:return T(a.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return a=se(a.type,!1),a;case 11:return a=se(a.type.render,!1),a;case 1:return a=se(a.type,!0),a;default:return""}}function ce(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case R:return"Fragment";case C:return"Portal";case F:return"Profiler";case z:return"StrictMode";case ue:return"Suspense";case G:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Q:return(a.displayName||"Context")+".Consumer";case V:return(a._context.displayName||"Context")+".Provider";case B:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case le:return l=a.displayName||null,l!==null?l:ce(a.type)||"Memo";case fe:l=a._payload,a=a._init;try{return ce(a(l))}catch{}}return null}function ge(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(l);case 8:return l===z?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function _e(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function J(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function we(a){var l=J(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),p=""+a[l];if(!a.hasOwnProperty(l)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var g=c.get,w=c.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return g.call(this)},set:function(A){p=""+A,w.call(this,A)}}),Object.defineProperty(a,l,{enumerable:c.enumerable}),{getValue:function(){return p},setValue:function(A){p=""+A},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function Ae(a){a._valueTracker||(a._valueTracker=we(a))}function ne(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var c=l.getValue(),p="";return a&&(p=J(a)?a.checked?"true":"false":a.value),a=p,a!==c?(l.setValue(a),!0):!1}function lt(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function $e(a,l){var c=l.checked;return X({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??a._wrapperState.initialChecked})}function Pe(a,l){var c=l.defaultValue==null?"":l.defaultValue,p=l.checked!=null?l.checked:l.defaultChecked;c=_e(l.value!=null?l.value:c),a._wrapperState={initialChecked:p,initialValue:c,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function vt(a,l){l=l.checked,l!=null&&_(a,"checked",l,!1)}function lr(a,l){vt(a,l);var c=_e(l.value),p=l.type;if(c!=null)p==="number"?(c===0&&a.value===""||a.value!=c)&&(a.value=""+c):a.value!==""+c&&(a.value=""+c);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?q(a,l.type,c):l.hasOwnProperty("defaultValue")&&q(a,l.type,_e(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function hi(a,l,c){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var p=l.type;if(!(p!=="submit"&&p!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,c||l===a.value||(a.value=l),a.defaultValue=l}c=a.name,c!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,c!==""&&(a.name=c)}function q(a,l,c){(l!=="number"||lt(a.ownerDocument)!==a)&&(c==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c))}var Me=Array.isArray;function Ze(a,l,c,p){if(a=a.options,l){l={};for(var g=0;g"+l.valueOf().toString()+"",l=Fu.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function Ll(a,l){if(l){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=l;return}}a.textContent=l}var zl={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},rN=["Webkit","ms","Moz","O"];Object.keys(zl).forEach(function(a){rN.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),zl[l]=zl[a]})});function L0(a,l,c){return l==null||typeof l=="boolean"||l===""?"":c||typeof l!="number"||l===0||zl.hasOwnProperty(a)&&zl[a]?(""+l).trim():l+"px"}function z0(a,l){a=a.style;for(var c in l)if(l.hasOwnProperty(c)){var p=c.indexOf("--")===0,g=L0(c,l[c],p);c==="float"&&(c="cssFloat"),p?a.setProperty(c,g):a[c]=g}}var nN=X({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 Nh(a,l){if(l){if(nN[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Ih(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){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 Mh=null;function Th(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Dh=null,no=null,io=null;function F0(a){if(a=ls(a)){if(typeof Dh!="function")throw Error(r(280));var l=a.stateNode;l&&(l=uc(l),Dh(a.stateNode,a.type,l))}}function B0(a){no?io?io.push(a):io=[a]:no=a}function U0(){if(no){var a=no,l=io;if(io=no=null,F0(a),l)for(a=0;a>>=0,a===0?32:31-(pN(a)/mN|0)|0}var Ku=64,Vu=4194304;function Wl(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function qu(a,l){var c=a.pendingLanes;if(c===0)return 0;var p=0,g=a.suspendedLanes,w=a.pingedLanes,A=c&268435455;if(A!==0){var I=A&~g;I!==0?p=Wl(I):(w&=A,w!==0&&(p=Wl(w)))}else A=c&~g,A!==0?p=Wl(A):w!==0&&(p=Wl(w));if(p===0)return 0;if(l!==0&&l!==p&&(l&g)===0&&(g=p&-p,w=l&-l,g>=w||g===16&&(w&4194240)!==0))return l;if((p&4)!==0&&(p|=c&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=p;0c;c++)l.push(a);return l}function Hl(a,l,c){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-qr(l),a[l]=c}function xN(a,l){var c=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0=Zl),vx=" ",gx=!1;function yx(a,l){switch(a){case"keyup":return qN.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xx(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var lo=!1;function YN(a,l){switch(a){case"compositionend":return xx(l);case"keypress":return l.which!==32?null:(gx=!0,vx);case"textInput":return a=l.data,a===vx&&gx?null:a;default:return null}}function QN(a,l){if(lo)return a==="compositionend"||!Jh&&yx(a,l)?(a=cx(),Zu=qh=yi=null,lo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:c,offset:l-a};a=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Ax(c)}}function Cx(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Cx(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function jx(){for(var a=window,l=lt();l instanceof a.HTMLIFrameElement;){try{var c=typeof l.contentWindow.location.href=="string"}catch{c=!1}if(c)a=l.contentWindow;else break;l=lt(a.document)}return l}function rp(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function aI(a){var l=jx(),c=a.focusedElem,p=a.selectionRange;if(l!==c&&c&&c.ownerDocument&&Cx(c.ownerDocument.documentElement,c)){if(p!==null&&rp(c)){if(l=p.start,a=p.end,a===void 0&&(a=l),"selectionStart"in c)c.selectionStart=l,c.selectionEnd=Math.min(a,c.value.length);else if(a=(l=c.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var g=c.textContent.length,w=Math.min(p.start,g);p=p.end===void 0?w:Math.min(p.end,g),!a.extend&&w>p&&(g=p,p=w,w=g),g=Ox(c,w);var A=Ox(c,p);g&&A&&(a.rangeCount!==1||a.anchorNode!==g.node||a.anchorOffset!==g.offset||a.focusNode!==A.node||a.focusOffset!==A.offset)&&(l=l.createRange(),l.setStart(g.node,g.offset),a.removeAllRanges(),w>p?(a.addRange(l),a.extend(A.node,A.offset)):(l.setEnd(A.node,A.offset),a.addRange(l)))}}for(l=[],a=c;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c=document.documentMode,so=null,np=null,rs=null,ip=!1;function _x(a,l,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;ip||so==null||so!==lt(p)||(p=so,"selectionStart"in p&&rp(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),rs&&ts(rs,p)||(rs=p,p=oc(np,"onSelect"),0po||(a.current=vp[po],vp[po]=null,po--)}function Qe(a,l){po++,vp[po]=a.current,a.current=l}var ki={},Vt=wi(ki),sr=wi(!1),oa=ki;function mo(a,l){var c=a.type.contextTypes;if(!c)return ki;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===l)return p.__reactInternalMemoizedMaskedChildContext;var g={},w;for(w in c)g[w]=l[w];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=g),g}function ur(a){return a=a.childContextTypes,a!=null}function cc(){et(sr),et(Vt)}function Kx(a,l,c){if(Vt.current!==ki)throw Error(r(168));Qe(Vt,l),Qe(sr,c)}function Vx(a,l,c){var p=a.stateNode;if(l=l.childContextTypes,typeof p.getChildContext!="function")return c;p=p.getChildContext();for(var g in p)if(!(g in l))throw Error(r(108,ge(a)||"Unknown",g));return X({},c,p)}function dc(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||ki,oa=Vt.current,Qe(Vt,a),Qe(sr,sr.current),!0}function qx(a,l,c){var p=a.stateNode;if(!p)throw Error(r(169));c?(a=Vx(a,l,oa),p.__reactInternalMemoizedMergedChildContext=a,et(sr),et(Vt),Qe(Vt,a)):et(sr),Qe(sr,c)}var $n=null,fc=!1,gp=!1;function Gx(a){$n===null?$n=[a]:$n.push(a)}function gI(a){fc=!0,Gx(a)}function Si(){if(!gp&&$n!==null){gp=!0;var a=0,l=qe;try{var c=$n;for(qe=1;a>=A,g-=A,Ln=1<<32-qr(l)+g|c<Ne?(Ct=Ce,Ce=null):Ct=Ce.sibling;var He=ee(U,Ce,W[Ne],oe);if(He===null){Ce===null&&(Ce=Ct);break}a&&Ce&&He.alternate===null&&l(U,Ce),L=w(He,L,Ne),Oe===null?ke=He:Oe.sibling=He,Oe=He,Ce=Ct}if(Ne===W.length)return c(U,Ce),it&&sa(U,Ne),ke;if(Ce===null){for(;NeNe?(Ct=Ce,Ce=null):Ct=Ce.sibling;var Ii=ee(U,Ce,He.value,oe);if(Ii===null){Ce===null&&(Ce=Ct);break}a&&Ce&&Ii.alternate===null&&l(U,Ce),L=w(Ii,L,Ne),Oe===null?ke=Ii:Oe.sibling=Ii,Oe=Ii,Ce=Ct}if(He.done)return c(U,Ce),it&&sa(U,Ne),ke;if(Ce===null){for(;!He.done;Ne++,He=W.next())He=ie(U,He.value,oe),He!==null&&(L=w(He,L,Ne),Oe===null?ke=He:Oe.sibling=He,Oe=He);return it&&sa(U,Ne),ke}for(Ce=p(U,Ce);!He.done;Ne++,He=W.next())He=he(Ce,U,Ne,He.value,oe),He!==null&&(a&&He.alternate!==null&&Ce.delete(He.key===null?Ne:He.key),L=w(He,L,Ne),Oe===null?ke=He:Oe.sibling=He,Oe=He);return a&&Ce.forEach(function(XI){return l(U,XI)}),it&&sa(U,Ne),ke}function mt(U,L,W,oe){if(typeof W=="object"&&W!==null&&W.type===R&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case N:e:{for(var ke=W.key,Oe=L;Oe!==null;){if(Oe.key===ke){if(ke=W.type,ke===R){if(Oe.tag===7){c(U,Oe.sibling),L=g(Oe,W.props.children),L.return=U,U=L;break e}}else if(Oe.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===fe&&eb(ke)===Oe.type){c(U,Oe.sibling),L=g(Oe,W.props),L.ref=ss(U,Oe,W),L.return=U,U=L;break e}c(U,Oe);break}else l(U,Oe);Oe=Oe.sibling}W.type===R?(L=va(W.props.children,U.mode,oe,W.key),L.return=U,U=L):(oe=Fc(W.type,W.key,W.props,null,U.mode,oe),oe.ref=ss(U,L,W),oe.return=U,U=oe)}return A(U);case C:e:{for(Oe=W.key;L!==null;){if(L.key===Oe)if(L.tag===4&&L.stateNode.containerInfo===W.containerInfo&&L.stateNode.implementation===W.implementation){c(U,L.sibling),L=g(L,W.children||[]),L.return=U,U=L;break e}else{c(U,L);break}else l(U,L);L=L.sibling}L=pm(W,U.mode,oe),L.return=U,U=L}return A(U);case fe:return Oe=W._init,mt(U,L,Oe(W._payload),oe)}if(Me(W))return ye(U,L,W,oe);if(ae(W))return xe(U,L,W,oe);vc(U,W)}return typeof W=="string"&&W!==""||typeof W=="number"?(W=""+W,L!==null&&L.tag===6?(c(U,L.sibling),L=g(L,W),L.return=U,U=L):(c(U,L),L=hm(W,U.mode,oe),L.return=U,U=L),A(U)):c(U,L)}return mt}var xo=tb(!0),rb=tb(!1),gc=wi(null),yc=null,bo=null,Sp=null;function Ep(){Sp=bo=yc=null}function Pp(a){var l=gc.current;et(gc),a._currentValue=l}function Ap(a,l,c){for(;a!==null;){var p=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),a===c)break;a=a.return}}function wo(a,l){yc=a,Sp=bo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(cr=!0),a.firstContext=null)}function Ir(a){var l=a._currentValue;if(Sp!==a)if(a={context:a,memoizedValue:l,next:null},bo===null){if(yc===null)throw Error(r(308));bo=a,yc.dependencies={lanes:0,firstContext:a}}else bo=bo.next=a;return l}var ua=null;function Op(a){ua===null?ua=[a]:ua.push(a)}function nb(a,l,c,p){var g=l.interleaved;return g===null?(c.next=c,Op(l)):(c.next=g.next,g.next=c),l.interleaved=c,Fn(a,p)}function Fn(a,l){a.lanes|=l;var c=a.alternate;for(c!==null&&(c.lanes|=l),c=a,a=a.return;a!==null;)a.childLanes|=l,c=a.alternate,c!==null&&(c.childLanes|=l),c=a,a=a.return;return c.tag===3?c.stateNode:null}var Ei=!1;function Cp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ib(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Bn(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function Pi(a,l,c){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(We&2)!==0){var g=p.pending;return g===null?l.next=l:(l.next=g.next,g.next=l),p.pending=l,Fn(a,c)}return g=p.interleaved,g===null?(l.next=l,Op(p)):(l.next=g.next,g.next=l),p.interleaved=l,Fn(a,c)}function xc(a,l,c){if(l=l.updateQueue,l!==null&&(l=l.shared,(c&4194240)!==0)){var p=l.lanes;p&=a.pendingLanes,c|=p,l.lanes=c,Uh(a,c)}}function ab(a,l){var c=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var g=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var A={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?g=w=A:w=w.next=A,c=c.next}while(c!==null);w===null?g=w=l:w=w.next=l}else g=w=l;c={baseState:p.baseState,firstBaseUpdate:g,lastBaseUpdate:w,shared:p.shared,effects:p.effects},a.updateQueue=c;return}a=c.lastBaseUpdate,a===null?c.firstBaseUpdate=l:a.next=l,c.lastBaseUpdate=l}function bc(a,l,c,p){var g=a.updateQueue;Ei=!1;var w=g.firstBaseUpdate,A=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var D=I,K=D.next;D.next=null,A===null?w=K:A.next=K,A=D;var re=a.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==A&&(I===null?re.firstBaseUpdate=K:I.next=K,re.lastBaseUpdate=D))}if(w!==null){var ie=g.baseState;A=0,re=K=D=null,I=w;do{var ee=I.lane,he=I.eventTime;if((p&ee)===ee){re!==null&&(re=re.next={eventTime:he,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ye=a,xe=I;switch(ee=l,he=c,xe.tag){case 1:if(ye=xe.payload,typeof ye=="function"){ie=ye.call(he,ie,ee);break e}ie=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=xe.payload,ee=typeof ye=="function"?ye.call(he,ie,ee):ye,ee==null)break e;ie=X({},ie,ee);break e;case 2:Ei=!0}}I.callback!==null&&I.lane!==0&&(a.flags|=64,ee=g.effects,ee===null?g.effects=[I]:ee.push(I))}else he={eventTime:he,lane:ee,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(K=re=he,D=ie):re=re.next=he,A|=ee;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;ee=I,I=ee.next,ee.next=null,g.lastBaseUpdate=ee,g.shared.pending=null}}while(!0);if(re===null&&(D=ie),g.baseState=D,g.firstBaseUpdate=K,g.lastBaseUpdate=re,l=g.shared.interleaved,l!==null){g=l;do A|=g.lane,g=g.next;while(g!==l)}else w===null&&(g.shared.lanes=0);fa|=A,a.lanes=A,a.memoizedState=ie}}function ob(a,l,c){if(a=l.effects,l.effects=null,a!==null)for(l=0;lc?c:4,a(!0);var p=Mp.transition;Mp.transition={};try{a(!1),l()}finally{qe=c,Mp.transition=p}}function Pb(){return Mr().memoizedState}function wI(a,l,c){var p=ji(a);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},Ab(a))Ob(l,c);else if(c=nb(a,l,c,p),c!==null){var g=tr();Jr(c,a,p,g),Cb(c,l,p)}}function kI(a,l,c){var p=ji(a),g={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(Ab(a))Ob(l,g);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=l.lastRenderedReducer,w!==null))try{var A=l.lastRenderedState,I=w(A,c);if(g.hasEagerState=!0,g.eagerState=I,Gr(I,A)){var D=l.interleaved;D===null?(g.next=g,Op(l)):(g.next=D.next,D.next=g),l.interleaved=g;return}}catch{}finally{}c=nb(a,l,g,p),c!==null&&(g=tr(),Jr(c,a,p,g),Cb(c,l,p))}}function Ab(a){var l=a.alternate;return a===ut||l!==null&&l===ut}function Ob(a,l){fs=Sc=!0;var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}function Cb(a,l,c){if((c&4194240)!==0){var p=l.lanes;p&=a.pendingLanes,c|=p,l.lanes=c,Uh(a,c)}}var Ac={readContext:Ir,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useInsertionEffect:qt,useLayoutEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useMutableSource:qt,useSyncExternalStore:qt,useId:qt,unstable_isNewReconciler:!1},SI={readContext:Ir,useCallback:function(a,l){return mn().memoizedState=[a,l===void 0?null:l],a},useContext:Ir,useEffect:gb,useImperativeHandle:function(a,l,c){return c=c!=null?c.concat([a]):null,Ec(4194308,4,bb.bind(null,l,a),c)},useLayoutEffect:function(a,l){return Ec(4194308,4,a,l)},useInsertionEffect:function(a,l){return Ec(4,2,a,l)},useMemo:function(a,l){var c=mn();return l=l===void 0?null:l,a=a(),c.memoizedState=[a,l],a},useReducer:function(a,l,c){var p=mn();return l=c!==void 0?c(l):l,p.memoizedState=p.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},p.queue=a,a=a.dispatch=wI.bind(null,ut,a),[p.memoizedState,a]},useRef:function(a){var l=mn();return a={current:a},l.memoizedState=a},useState:mb,useDebugValue:Fp,useDeferredValue:function(a){return mn().memoizedState=a},useTransition:function(){var a=mb(!1),l=a[0];return a=bI.bind(null,a[1]),mn().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,c){var p=ut,g=mn();if(it){if(c===void 0)throw Error(r(407));c=c()}else{if(c=l(),Ot===null)throw Error(r(349));(da&30)!==0||cb(p,l,c)}g.memoizedState=c;var w={value:c,getSnapshot:l};return g.queue=w,gb(fb.bind(null,p,w,a),[a]),p.flags|=2048,ms(9,db.bind(null,p,w,c,l),void 0,null),c},useId:function(){var a=mn(),l=Ot.identifierPrefix;if(it){var c=zn,p=Ln;c=(p&~(1<<32-qr(p)-1)).toString(32)+c,l=":"+l+"R"+c,c=hs++,0<\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=A.createElement(c,{is:p.is}):(a=A.createElement(c),c==="select"&&(A=a,p.multiple?A.multiple=!0:p.size&&(A.size=p.size))):a=A.createElementNS(a,c),a[hn]=l,a[os]=p,Gb(a,l,!1,!1),l.stateNode=a;e:{switch(A=Ih(c,p),c){case"dialog":Je("cancel",a),Je("close",a),g=p;break;case"iframe":case"object":case"embed":Je("load",a),g=p;break;case"video":case"audio":for(g=0;gAo&&(l.flags|=128,p=!0,vs(w,!1),l.lanes=4194304)}else{if(!p)if(a=wc(A),a!==null){if(l.flags|=128,p=!0,c=a.updateQueue,c!==null&&(l.updateQueue=c,l.flags|=4),vs(w,!0),w.tail===null&&w.tailMode==="hidden"&&!A.alternate&&!it)return Gt(l),null}else 2*pt()-w.renderingStartTime>Ao&&c!==1073741824&&(l.flags|=128,p=!0,vs(w,!1),l.lanes=4194304);w.isBackwards?(A.sibling=l.child,l.child=A):(c=w.last,c!==null?c.sibling=A:l.child=A,w.last=A)}return w.tail!==null?(l=w.tail,w.rendering=l,w.tail=l.sibling,w.renderingStartTime=pt(),l.sibling=null,c=st.current,Qe(st,p?c&1|2:c&1),l):(Gt(l),null);case 22:case 23:return cm(),p=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(l.flags|=8192),p&&(l.mode&1)!==0?(kr&1073741824)!==0&&(Gt(l),l.subtreeFlags&6&&(l.flags|=8192)):Gt(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function NI(a,l){switch(xp(l),l.tag){case 1:return ur(l.type)&&cc(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return ko(),et(sr),et(Vt),Ip(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return _p(l),null;case 13:if(et(st),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));yo()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return et(st),null;case 4:return ko(),null;case 10:return Pp(l.type._context),null;case 22:case 23:return cm(),null;case 24:return null;default:return null}}var _c=!1,Yt=!1,II=typeof WeakSet=="function"?WeakSet:Set,me=null;function Eo(a,l){var c=a.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(p){ct(a,l,p)}else c.current=null}function Zp(a,l,c){try{c()}catch(p){ct(a,l,p)}}var Xb=!1;function MI(a,l){if(cp=Qu,a=jx(),rp(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else e:{c=(c=a.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var g=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var A=0,I=-1,D=-1,K=0,re=0,ie=a,ee=null;t:for(;;){for(var he;ie!==c||g!==0&&ie.nodeType!==3||(I=A+g),ie!==w||p!==0&&ie.nodeType!==3||(D=A+p),ie.nodeType===3&&(A+=ie.nodeValue.length),(he=ie.firstChild)!==null;)ee=ie,ie=he;for(;;){if(ie===a)break t;if(ee===c&&++K===g&&(I=A),ee===w&&++re===p&&(D=A),(he=ie.nextSibling)!==null)break;ie=ee,ee=ie.parentNode}ie=he}c=I===-1||D===-1?null:{start:I,end:D}}else c=null}c=c||{start:0,end:0}}else c=null;for(dp={focusedElem:a,selectionRange:c},Qu=!1,me=l;me!==null;)if(l=me,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,me=a;else for(;me!==null;){l=me;try{var ye=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var xe=ye.memoizedProps,mt=ye.memoizedState,U=l.stateNode,L=U.getSnapshotBeforeUpdate(l.elementType===l.type?xe:Qr(l.type,xe),mt);U.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var W=l.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(r(163))}}catch(oe){ct(l,l.return,oe)}if(a=l.sibling,a!==null){a.return=l.return,me=a;break}me=l.return}return ye=Xb,Xb=!1,ye}function gs(a,l,c){var p=l.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var g=p=p.next;do{if((g.tag&a)===a){var w=g.destroy;g.destroy=void 0,w!==void 0&&Zp(l,c,w)}g=g.next}while(g!==p)}}function Nc(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&a)===a){var p=c.create;c.destroy=p()}c=c.next}while(c!==l)}}function Jp(a){var l=a.ref;if(l!==null){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}typeof l=="function"?l(a):l.current=a}}function Zb(a){var l=a.alternate;l!==null&&(a.alternate=null,Zb(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[hn],delete l[os],delete l[mp],delete l[mI],delete l[vI])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function Jb(a){return a.tag===5||a.tag===3||a.tag===4}function e1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Jb(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function em(a,l,c){var p=a.tag;if(p===5||p===6)a=a.stateNode,l?c.nodeType===8?c.parentNode.insertBefore(a,l):c.insertBefore(a,l):(c.nodeType===8?(l=c.parentNode,l.insertBefore(a,c)):(l=c,l.appendChild(a)),c=c._reactRootContainer,c!=null||l.onclick!==null||(l.onclick=sc));else if(p!==4&&(a=a.child,a!==null))for(em(a,l,c),a=a.sibling;a!==null;)em(a,l,c),a=a.sibling}function tm(a,l,c){var p=a.tag;if(p===5||p===6)a=a.stateNode,l?c.insertBefore(a,l):c.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(tm(a,l,c),a=a.sibling;a!==null;)tm(a,l,c),a=a.sibling}var Dt=null,Xr=!1;function Ai(a,l,c){for(c=c.child;c!==null;)t1(a,l,c),c=c.sibling}function t1(a,l,c){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(Hu,c)}catch{}switch(c.tag){case 5:Yt||Eo(c,l);case 6:var p=Dt,g=Xr;Dt=null,Ai(a,l,c),Dt=p,Xr=g,Dt!==null&&(Xr?(a=Dt,c=c.stateNode,a.nodeType===8?a.parentNode.removeChild(c):a.removeChild(c)):Dt.removeChild(c.stateNode));break;case 18:Dt!==null&&(Xr?(a=Dt,c=c.stateNode,a.nodeType===8?pp(a.parentNode,c):a.nodeType===1&&pp(a,c),Yl(a)):pp(Dt,c.stateNode));break;case 4:p=Dt,g=Xr,Dt=c.stateNode.containerInfo,Xr=!0,Ai(a,l,c),Dt=p,Xr=g;break;case 0:case 11:case 14:case 15:if(!Yt&&(p=c.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){g=p=p.next;do{var w=g,A=w.destroy;w=w.tag,A!==void 0&&((w&2)!==0||(w&4)!==0)&&Zp(c,l,A),g=g.next}while(g!==p)}Ai(a,l,c);break;case 1:if(!Yt&&(Eo(c,l),p=c.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=c.memoizedProps,p.state=c.memoizedState,p.componentWillUnmount()}catch(I){ct(c,l,I)}Ai(a,l,c);break;case 21:Ai(a,l,c);break;case 22:c.mode&1?(Yt=(p=Yt)||c.memoizedState!==null,Ai(a,l,c),Yt=p):Ai(a,l,c);break;default:Ai(a,l,c)}}function r1(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var c=a.stateNode;c===null&&(c=a.stateNode=new II),l.forEach(function(p){var g=UI.bind(null,a,p);c.has(p)||(c.add(p),p.then(g,g))})}}function Zr(a,l){var c=l.deletions;if(c!==null)for(var p=0;pg&&(g=A),p&=~w}if(p=g,p=pt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*DI(p/1960))-p,10a?16:a,Ci===null)var p=!1;else{if(a=Ci,Ci=null,Rc=0,(We&6)!==0)throw Error(r(331));var g=We;for(We|=4,me=a.current;me!==null;){var w=me,A=w.child;if((me.flags&16)!==0){var I=w.deletions;if(I!==null){for(var D=0;Dpt()-im?pa(a,0):nm|=c),fr(a,l)}function m1(a,l){l===0&&((a.mode&1)===0?l=1:(l=Vu,Vu<<=1,(Vu&130023424)===0&&(Vu=4194304)));var c=tr();a=Fn(a,l),a!==null&&(Hl(a,l,c),fr(a,c))}function BI(a){var l=a.memoizedState,c=0;l!==null&&(c=l.retryLane),m1(a,c)}function UI(a,l){var c=0;switch(a.tag){case 13:var p=a.stateNode,g=a.memoizedState;g!==null&&(c=g.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(l),m1(a,c)}var v1;v1=function(a,l,c){if(a!==null)if(a.memoizedProps!==l.pendingProps||sr.current)cr=!0;else{if((a.lanes&c)===0&&(l.flags&128)===0)return cr=!1,jI(a,l,c);cr=(a.flags&131072)!==0}else cr=!1,it&&(l.flags&1048576)!==0&&Yx(l,pc,l.index);switch(l.lanes=0,l.tag){case 2:var p=l.type;jc(a,l),a=l.pendingProps;var g=mo(l,Vt.current);wo(l,c),g=Dp(null,l,p,a,g,c);var w=Rp();return l.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,ur(p)?(w=!0,dc(l)):w=!1,l.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Cp(l),g.updater=Oc,l.stateNode=g,g._reactInternals=l,Up(l,p,a,c),l=Vp(null,l,p,!0,w,c)):(l.tag=0,it&&w&&yp(l),er(null,l,g,c),l=l.child),l;case 16:p=l.elementType;e:{switch(jc(a,l),a=l.pendingProps,g=p._init,p=g(p._payload),l.type=p,g=l.tag=HI(p),a=Qr(p,a),g){case 0:l=Kp(null,l,p,a,c);break e;case 1:l=Ub(null,l,p,a,c);break e;case 11:l=$b(null,l,p,a,c);break e;case 14:l=Lb(null,l,p,Qr(p.type,a),c);break e}throw Error(r(306,p,""))}return l;case 0:return p=l.type,g=l.pendingProps,g=l.elementType===p?g:Qr(p,g),Kp(a,l,p,g,c);case 1:return p=l.type,g=l.pendingProps,g=l.elementType===p?g:Qr(p,g),Ub(a,l,p,g,c);case 3:e:{if(Wb(l),a===null)throw Error(r(387));p=l.pendingProps,w=l.memoizedState,g=w.element,ib(a,l),bc(l,p,null,c);var A=l.memoizedState;if(p=A.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},l.updateQueue.baseState=w,l.memoizedState=w,l.flags&256){g=So(Error(r(423)),l),l=Hb(a,l,p,c,g);break e}else if(p!==g){g=So(Error(r(424)),l),l=Hb(a,l,p,c,g);break e}else for(wr=bi(l.stateNode.containerInfo.firstChild),br=l,it=!0,Yr=null,c=rb(l,null,p,c),l.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(yo(),p===g){l=Un(a,l,c);break e}er(a,l,p,c)}l=l.child}return l;case 5:return lb(l),a===null&&wp(l),p=l.type,g=l.pendingProps,w=a!==null?a.memoizedProps:null,A=g.children,fp(p,g)?A=null:w!==null&&fp(p,w)&&(l.flags|=32),Bb(a,l),er(a,l,A,c),l.child;case 6:return a===null&&wp(l),null;case 13:return Kb(a,l,c);case 4:return jp(l,l.stateNode.containerInfo),p=l.pendingProps,a===null?l.child=xo(l,null,p,c):er(a,l,p,c),l.child;case 11:return p=l.type,g=l.pendingProps,g=l.elementType===p?g:Qr(p,g),$b(a,l,p,g,c);case 7:return er(a,l,l.pendingProps,c),l.child;case 8:return er(a,l,l.pendingProps.children,c),l.child;case 12:return er(a,l,l.pendingProps.children,c),l.child;case 10:e:{if(p=l.type._context,g=l.pendingProps,w=l.memoizedProps,A=g.value,Qe(gc,p._currentValue),p._currentValue=A,w!==null)if(Gr(w.value,A)){if(w.children===g.children&&!sr.current){l=Un(a,l,c);break e}}else for(w=l.child,w!==null&&(w.return=l);w!==null;){var I=w.dependencies;if(I!==null){A=w.child;for(var D=I.firstContext;D!==null;){if(D.context===p){if(w.tag===1){D=Bn(-1,c&-c),D.tag=2;var K=w.updateQueue;if(K!==null){K=K.shared;var re=K.pending;re===null?D.next=D:(D.next=re.next,re.next=D),K.pending=D}}w.lanes|=c,D=w.alternate,D!==null&&(D.lanes|=c),Ap(w.return,c,l),I.lanes|=c;break}D=D.next}}else if(w.tag===10)A=w.type===l.type?null:w.child;else if(w.tag===18){if(A=w.return,A===null)throw Error(r(341));A.lanes|=c,I=A.alternate,I!==null&&(I.lanes|=c),Ap(A,c,l),A=w.sibling}else A=w.child;if(A!==null)A.return=w;else for(A=w;A!==null;){if(A===l){A=null;break}if(w=A.sibling,w!==null){w.return=A.return,A=w;break}A=A.return}w=A}er(a,l,g.children,c),l=l.child}return l;case 9:return g=l.type,p=l.pendingProps.children,wo(l,c),g=Ir(g),p=p(g),l.flags|=1,er(a,l,p,c),l.child;case 14:return p=l.type,g=Qr(p,l.pendingProps),g=Qr(p.type,g),Lb(a,l,p,g,c);case 15:return zb(a,l,l.type,l.pendingProps,c);case 17:return p=l.type,g=l.pendingProps,g=l.elementType===p?g:Qr(p,g),jc(a,l),l.tag=1,ur(p)?(a=!0,dc(l)):a=!1,wo(l,c),_b(l,p,g),Up(l,p,g,c),Vp(null,l,p,!0,a,c);case 19:return qb(a,l,c);case 22:return Fb(a,l,c)}throw Error(r(156,l.tag))};function g1(a,l){return Q0(a,l)}function WI(a,l,c,p){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dr(a,l,c,p){return new WI(a,l,c,p)}function fm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function HI(a){if(typeof a=="function")return fm(a)?1:0;if(a!=null){if(a=a.$$typeof,a===B)return 11;if(a===le)return 14}return 2}function Ni(a,l){var c=a.alternate;return c===null?(c=Dr(a.tag,l,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=l,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&14680064,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,l=a.dependencies,c.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c}function Fc(a,l,c,p,g,w){var A=2;if(p=a,typeof a=="function")fm(a)&&(A=1);else if(typeof a=="string")A=5;else e:switch(a){case R:return va(c.children,g,w,l);case z:A=8,g|=8;break;case F:return a=Dr(12,c,l,g|2),a.elementType=F,a.lanes=w,a;case ue:return a=Dr(13,c,l,g),a.elementType=ue,a.lanes=w,a;case G:return a=Dr(19,c,l,g),a.elementType=G,a.lanes=w,a;case de:return Bc(c,g,w,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case V:A=10;break e;case Q:A=9;break e;case B:A=11;break e;case le:A=14;break e;case fe:A=16,p=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=Dr(A,c,l,g),l.elementType=a,l.type=p,l.lanes=w,l}function va(a,l,c,p){return a=Dr(7,a,p,l),a.lanes=c,a}function Bc(a,l,c,p){return a=Dr(22,a,p,l),a.elementType=de,a.lanes=c,a.stateNode={isHidden:!1},a}function hm(a,l,c){return a=Dr(6,a,null,l),a.lanes=c,a}function pm(a,l,c){return l=Dr(4,a.children!==null?a.children:[],a.key,l),l.lanes=c,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function KI(a,l,c,p,g){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bh(0),this.expirationTimes=Bh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bh(0),this.identifierPrefix=p,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function mm(a,l,c,p,g,w,A,I,D){return a=new KI(a,l,c,I,D),l===1?(l=1,w===!0&&(l|=8)):l=0,w=Dr(3,null,null,l),a.current=w,w.stateNode=a,w.memoizedState={element:p,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cp(w),a}function VI(a,l,c){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),km.exports=oM(),km.exports}var I1;function lM(){if(I1)return Yc;I1=1;var e=_P();return Yc.createRoot=e.createRoot,Yc.hydrateRoot=e.hydrateRoot,Yc}var sM=lM();const uM=$g(sM);var xu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Na,Bi,el,bP,cM=(bP=class extends xu{constructor(){super();je(this,Na);je(this,Bi);je(this,el);pe(this,el,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,Bi)||this.setEventListener($(this,el))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Bi))==null||t.call(this),pe(this,Bi,void 0))}setEventListener(t){var r;pe(this,el,t),(r=$(this,Bi))==null||r.call(this),pe(this,Bi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,Na)!==t&&(pe(this,Na,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,Na)=="boolean"?$(this,Na):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Na=new WeakMap,Bi=new WeakMap,el=new WeakMap,bP),zg=new cM,dM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ui,Rg,wP,fM=(wP=class{constructor(){je(this,Ui,dM);je(this,Rg,!1)}setTimeoutProvider(e){pe(this,Ui,e)}setTimeout(e,t){return $(this,Ui).setTimeout(e,t)}clearTimeout(e){$(this,Ui).clearTimeout(e)}setInterval(e,t){return $(this,Ui).setInterval(e,t)}clearInterval(e){$(this,Ui).clearInterval(e)}},Ui=new WeakMap,Rg=new WeakMap,wP),Ea=new fM;function hM(e){setTimeout(e,0)}var pM=typeof window>"u"||"Deno"in globalThis;function mr(){}function mM(e,t){return typeof e=="function"?e(t):e}function vv(e){return typeof e=="number"&&e>=0&&e!==1/0}function NP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qi(e,t){return typeof e=="function"?e(t):e}function Er(e,t){return typeof e=="function"?e(t):e}function M1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:u}=e;if(s){if(n){if(t.queryHash!==Fg(s,t.options))return!1}else if(!qs(t.queryKey,s))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function T1(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Vs(t.options.mutationKey)!==Vs(o))return!1}else if(!qs(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Fg(e,t){return((t==null?void 0:t.queryKeyHashFn)||Vs)(e)}function Vs(e){return JSON.stringify(e,(t,r)=>yv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function qs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>qs(e[r],t[r])):!1}var vM=Object.prototype.hasOwnProperty;function IP(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=D1(e)&&D1(t);if(!n&&!(yv(e)&&yv(t)))return t;const o=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),u=s.length,d=n?new Array(u):{};let f=0;for(let h=0;h{Ea.setTimeout(t,e)})}function xv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?IP(e,t):t}function yM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function xM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Bg=Symbol();function MP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function TP(e,t){return typeof e=="function"?e(...t):!!e}function bM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Gs=(()=>{let e=()=>pM;return{isServer(){return e()},setIsServer(t){e=t}}})();function bv(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var wM=hM;function kM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=wM;const o=u=>{t?e.push(u):i(()=>{r(u)})},s=()=>{const u=e;e=[],u.length&&i(()=>{n(()=>{u.forEach(d=>{r(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||s()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var Ft=kM(),tl,Wi,rl,kP,SM=(kP=class extends xu{constructor(){super();je(this,tl,!0);je(this,Wi);je(this,rl);pe(this,rl,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){$(this,Wi)||this.setEventListener($(this,rl))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Wi))==null||t.call(this),pe(this,Wi,void 0))}setEventListener(t){var r;pe(this,rl,t),(r=$(this,Wi))==null||r.call(this),pe(this,Wi,t(this.setOnline.bind(this)))}setOnline(t){$(this,tl)!==t&&(pe(this,tl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,tl)}},tl=new WeakMap,Wi=new WeakMap,rl=new WeakMap,kP),Nd=new SM;function EM(e){return Math.min(1e3*2**e,3e4)}function DP(e){return(e??"online")==="online"?Nd.isOnline():!0}var wv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function RP(e){let t=!1,r=0,n;const i=bv(),o=()=>i.status!=="pending",s=k=>{var E;if(!o()){const P=new wv(k);v(P),(E=e.onCancel)==null||E.call(e,P)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>zg.isFocused()&&(e.networkMode==="always"||Nd.isOnline())&&e.canRun(),h=()=>DP(e.networkMode)&&e.canRun(),m=k=>{o()||(n==null||n(),i.resolve(k))},v=k=>{o()||(n==null||n(),i.reject(k))},b=()=>new Promise(k=>{var E;n=P=>{(o()||f())&&k(P)},(E=e.onPause)==null||E.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),S=()=>{if(o())return;let k;const E=r===0?e.initialPromise:void 0;try{k=E??e.fn()}catch(P){k=Promise.reject(P)}Promise.resolve(k).then(m).catch(P=>{var C;if(o())return;const j=e.retry??(Gs.isServer()?0:3),_=e.retryDelay??EM,O=typeof _=="function"?_(r,P):_,N=j===!0||typeof j=="number"&&rf()?void 0:b()).then(()=>{t?v(P):S()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?S():b().then(S),i)}}var Ia,SP,$P=(SP=class{constructor(){je(this,Ia)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vv(this.gcTime)&&pe(this,Ia,Ea.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gs.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Ia)!==void 0&&(Ea.clearTimeout($(this,Ia)),pe(this,Ia,void 0))}},Ia=new WeakMap,SP);function PM(e){return{onFetch:(t,r)=>{var h,m,v,b,S;const n=t.options,i=(v=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],s=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let k=!1;const E=_=>{bM(_,()=>t.signal,()=>k=!0)},P=MP(t.options,t.fetchOptions),j=async(_,O,N)=>{if(k)return Promise.reject(t.signal.reason);if(O==null&&_.pages.length)return Promise.resolve(_);const R=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:O,direction:N?"backward":"forward",meta:t.options.meta};return E(Q),Q})(),z=await P(R),{maxPages:F}=t.options,V=N?xM:yM;return{pages:V(_.pages,z,F),pageParams:V(_.pageParams,O,F)}};if(i&&o.length){const _=i==="backward",O=_?AM:$1,N={pages:o,pageParams:s},C=O(n,N);u=await j(N,C,_)}else{const _=e??o.length;do{const O=d===0?s[0]??n.initialPageParam:$1(n,u);if(d>0&&O==null)break;u=await j(u,O),d++}while(d<_)}return u};t.options.persister?t.fetchFn=()=>{var k,E;return(E=(k=t.options).persister)==null?void 0:E.call(k,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function $1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function AM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var nl,Ma,il,$r,Ta,jt,pu,Da,Sr,LP,Kn,EP,OM=(EP=class extends $P{constructor(t){super();je(this,Sr);je(this,nl);je(this,Ma);je(this,il);je(this,$r);je(this,Ta);je(this,jt);je(this,pu);je(this,Da);pe(this,Da,!1),pe(this,pu,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,Ta,t.client),pe(this,$r,$(this,Ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,Ma,z1(this.options)),this.state=t.state??$(this,Ma),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,nl)}get promise(){var t;return(t=$(this,jt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,pu),...t},t!=null&&t._type&&pe(this,nl,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=z1(this.options);r.data!==void 0&&(this.setState(L1(r.data,r.dataUpdatedAt)),pe(this,Ma,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,$r).remove(this)}setData(t,r){const n=xv(this.state.data,t,this.options);return ze(this,Sr,Kn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){ze(this,Sr,Kn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=$(this,jt))==null?void 0:n.promise;return(i=$(this,jt))==null||i.cancel(t),r?r.then(mr).catch(mr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,Ma)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Er(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Qi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!NP(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,jt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,jt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,$r).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,jt)&&($(this,Da)||ze(this,Sr,LP).call(this)?$(this,jt).cancel({revert:!0}):$(this,jt).cancelRetry()),this.scheduleGc()),$(this,$r).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ze(this,Sr,Kn).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,m,v,b,S,k,E,P,j,_;if(this.state.fetchStatus!=="idle"&&((f=$(this,jt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,jt))return $(this,jt).continueRetry(),$(this,jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(N=>N.options.queryFn);O&&this.setOptions(O.options)}const n=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(pe(this,Da,!0),n.signal)})},o=()=>{const O=MP(this.options,r),C=(()=>{const R={client:$(this,Ta),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return pe(this,Da,!1),this.options.persister?this.options.persister(O,C,this):O(C)},u=(()=>{const O={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,Ta),state:this.state,fetchFn:o};return i(O),O})(),d=$(this,nl)==="infinite"?PM(this.options.pages):this.options.behavior;d==null||d.onFetch(u,this),pe(this,il,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&ze(this,Sr,Kn).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta}),pe(this,jt,RP({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:O=>{O instanceof wv&&O.revert&&this.setState({...$(this,il),fetchStatus:"idle"}),n.abort()},onFail:(O,N)=>{ze(this,Sr,Kn).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{ze(this,Sr,Kn).call(this,{type:"pause"})},onContinue:()=>{ze(this,Sr,Kn).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const O=await $(this,jt).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(b=(v=$(this,$r).config).onSuccess)==null||b.call(v,O,this),(k=(S=$(this,$r).config).onSettled)==null||k.call(S,O,this.state.error,this),O}catch(O){if(O instanceof wv){if(O.silent)return $(this,jt).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw ze(this,Sr,Kn).call(this,{type:"error",error:O}),(P=(E=$(this,$r).config).onError)==null||P.call(E,O,this),(_=(j=$(this,$r).config).onSettled)==null||_.call(j,this.state.data,O,this),O}finally{this.scheduleGc()}}},nl=new WeakMap,Ma=new WeakMap,il=new WeakMap,$r=new WeakMap,Ta=new WeakMap,jt=new WeakMap,pu=new WeakMap,Da=new WeakMap,Sr=new WeakSet,LP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Kn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zP(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...L1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,il,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ft.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,$r).notify({query:this,type:"updated",action:t})})},EP);function zP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:DP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function L1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function z1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var pr,Be,mu,rr,Ra,al,qn,Hi,vu,ol,ll,$a,La,Ki,sl,Ve,zs,kv,Sv,Ev,Pv,Av,Ov,Cv,FP,PP,CM=(PP=class extends xu{constructor(t,r){super();je(this,Ve);je(this,pr);je(this,Be);je(this,mu);je(this,rr);je(this,Ra);je(this,al);je(this,qn);je(this,Hi);je(this,vu);je(this,ol);je(this,ll);je(this,$a);je(this,La);je(this,Ki);je(this,sl,new Set);this.options=r,pe(this,pr,t),pe(this,Hi,null),pe(this,qn,bv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Be).addObserver(this),F1($(this,Be),this.options)?ze(this,Ve,zs).call(this):this.updateResult(),ze(this,Ve,Pv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jv($(this,Be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jv($(this,Be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ze(this,Ve,Av).call(this),ze(this,Ve,Ov).call(this),$(this,Be).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,Be);if(this.options=$(this,pr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Er(this.options.enabled,$(this,Be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ze(this,Ve,Cv).call(this),$(this,Be).setOptions(this.options),r._defaulted&&!gv(this.options,r)&&$(this,pr).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Be),observer:this});const i=this.hasListeners();i&&B1($(this,Be),n,this.options,r)&&ze(this,Ve,zs).call(this),this.updateResult(),i&&($(this,Be)!==n||Er(this.options.enabled,$(this,Be))!==Er(r.enabled,$(this,Be))||Qi(this.options.staleTime,$(this,Be))!==Qi(r.staleTime,$(this,Be)))&&ze(this,Ve,kv).call(this);const o=ze(this,Ve,Sv).call(this);i&&($(this,Be)!==n||Er(this.options.enabled,$(this,Be))!==Er(r.enabled,$(this,Be))||o!==$(this,Ki))&&ze(this,Ve,Ev).call(this,o)}getOptimisticResult(t){const r=$(this,pr).getQueryCache().build($(this,pr),t),n=this.createResult(r,t);return _M(this,n)&&(pe(this,rr,n),pe(this,al,this.options),pe(this,Ra,$(this,Be).state)),n}getCurrentResult(){return $(this,rr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,qn).status==="pending"&&$(this,qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,sl).add(t)}getCurrentQuery(){return $(this,Be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,pr).defaultQueryOptions(t),n=$(this,pr).getQueryCache().build($(this,pr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ze(this,Ve,zs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,rr)))}createResult(t,r){var F;const n=$(this,Be),i=this.options,o=$(this,rr),s=$(this,Ra),u=$(this,al),f=t!==n?t.state:$(this,mu),{state:h}=t;let m={...h},v=!1,b;if(r._optimisticResults){const V=this.hasListeners(),Q=!V&&F1(t,r),B=V&&B1(t,n,r,i);(Q||B)&&(m={...m,...zP(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:k,status:E}=m;b=m.data;let P=!1;if(r.placeholderData!==void 0&&b===void 0&&E==="pending"){let V;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(V=o.data,P=!0):V=typeof r.placeholderData=="function"?r.placeholderData((F=$(this,ll))==null?void 0:F.state.data,$(this,ll)):r.placeholderData,V!==void 0&&(E="success",b=xv(o==null?void 0:o.data,V,r),v=!0)}if(r.select&&b!==void 0&&!P)if(o&&b===(s==null?void 0:s.data)&&r.select===$(this,vu))b=$(this,ol);else try{pe(this,vu,r.select),b=r.select(b),b=xv(o==null?void 0:o.data,b,r),pe(this,ol,b),pe(this,Hi,null)}catch(V){pe(this,Hi,V)}$(this,Hi)&&(S=$(this,Hi),b=$(this,ol),k=Date.now(),E="error");const j=m.fetchStatus==="fetching",_=E==="pending",O=E==="error",N=_&&j,C=b!==void 0,z={status:E,fetchStatus:m.fetchStatus,isPending:_,isSuccess:E==="success",isError:O,isInitialLoading:N,isLoading:N,data:b,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:k,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:j,isRefetching:j&&!_,isLoadingError:O&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&C,isStale:Ug(t,r),refetch:this.refetch,promise:$(this,qn),isEnabled:Er(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const V=z.data!==void 0,Q=z.status==="error"&&!V,B=le=>{Q?le.reject(z.error):V&&le.resolve(z.data)},ue=()=>{const le=pe(this,qn,z.promise=bv());B(le)},G=$(this,qn);switch(G.status){case"pending":t.queryHash===n.queryHash&&B(G);break;case"fulfilled":(Q||z.data!==G.value)&&ue();break;case"rejected":(!Q||z.error!==G.reason)&&ue();break}}return z}updateResult(){const t=$(this,rr),r=this.createResult($(this,Be),this.options);if(pe(this,Ra,$(this,Be).state),pe(this,al,this.options),$(this,Ra).data!==void 0&&pe(this,ll,$(this,Be)),gv(r,t))return;pe(this,rr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!$(this,sl).size)return!0;const s=new Set(o??$(this,sl));return this.options.throwOnError&&s.add("error"),Object.keys($(this,rr)).some(u=>{const d=u;return $(this,rr)[d]!==t[d]&&s.has(d)})};ze(this,Ve,FP).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ze(this,Ve,Pv).call(this)}},pr=new WeakMap,Be=new WeakMap,mu=new WeakMap,rr=new WeakMap,Ra=new WeakMap,al=new WeakMap,qn=new WeakMap,Hi=new WeakMap,vu=new WeakMap,ol=new WeakMap,ll=new WeakMap,$a=new WeakMap,La=new WeakMap,Ki=new WeakMap,sl=new WeakMap,Ve=new WeakSet,zs=function(t){ze(this,Ve,Cv).call(this);let r=$(this,Be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(mr)),r},kv=function(){ze(this,Ve,Av).call(this);const t=Qi(this.options.staleTime,$(this,Be));if(Gs.isServer()||$(this,rr).isStale||!vv(t))return;const n=NP($(this,rr).dataUpdatedAt,t)+1;pe(this,$a,Ea.setTimeout(()=>{$(this,rr).isStale||this.updateResult()},n))},Sv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Be)):this.options.refetchInterval)??!1},Ev=function(t){ze(this,Ve,Ov).call(this),pe(this,Ki,t),!(Gs.isServer()||Er(this.options.enabled,$(this,Be))===!1||!vv($(this,Ki))||$(this,Ki)===0)&&pe(this,La,Ea.setInterval(()=>{(this.options.refetchIntervalInBackground||zg.isFocused())&&ze(this,Ve,zs).call(this)},$(this,Ki)))},Pv=function(){ze(this,Ve,kv).call(this),ze(this,Ve,Ev).call(this,ze(this,Ve,Sv).call(this))},Av=function(){$(this,$a)!==void 0&&(Ea.clearTimeout($(this,$a)),pe(this,$a,void 0))},Ov=function(){$(this,La)!==void 0&&(Ea.clearInterval($(this,La)),pe(this,La,void 0))},Cv=function(){const t=$(this,pr).getQueryCache().build($(this,pr),this.options);if(t===$(this,Be))return;const r=$(this,Be);pe(this,Be,t),pe(this,mu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},FP=function(t){Ft.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,rr))}),$(this,pr).getQueryCache().notify({query:$(this,Be),type:"observerResultsUpdated"})})},PP);function jM(e,t){return Er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Er(t.retryOnMount,e)===!1)}function F1(e,t){return jM(e,t)||e.state.data!==void 0&&jv(e,t,t.refetchOnMount)}function jv(e,t,r){if(Er(t.enabled,e)!==!1&&Qi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ug(e,t)}return!1}function B1(e,t,r,n){return(e!==t||Er(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ug(e,r)}function Ug(e,t){return Er(t.enabled,e)!==!1&&e.isStaleByTime(Qi(t.staleTime,e))}function _M(e,t){return!gv(e.getCurrentResult(),t)}var gu,wn,Qt,za,kn,Ri,AP,NM=(AP=class extends $P{constructor(t){super();je(this,kn);je(this,gu);je(this,wn);je(this,Qt);je(this,za);pe(this,gu,t.client),this.mutationId=t.mutationId,pe(this,Qt,t.mutationCache),pe(this,wn,[]),this.state=t.state||IM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,wn).includes(t)||($(this,wn).push(t),this.clearGcTimeout(),$(this,Qt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,wn,$(this,wn).filter(r=>r!==t)),this.scheduleGc(),$(this,Qt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,wn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Qt).remove(this))}continue(){var t;return((t=$(this,za))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,u,d,f,h,m,v,b,S,k,E,P,j,_,O,N,C,R;const r=()=>{ze(this,kn,Ri).call(this,{type:"continue"})},n={client:$(this,gu),meta:this.options.meta,mutationKey:this.options.mutationKey};pe(this,za,RP({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(z,F)=>{ze(this,kn,Ri).call(this,{type:"failed",failureCount:z,error:F})},onPause:()=>{ze(this,kn,Ri).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Qt).canRun(this)}));const i=this.state.status==="pending",o=!$(this,za).canStart();try{if(i)r();else{ze(this,kn,Ri).call(this,{type:"pending",variables:t,isPaused:o}),$(this,Qt).config.onMutate&&await $(this,Qt).config.onMutate(t,this,n);const F=await((u=(s=this.options).onMutate)==null?void 0:u.call(s,t,n));F!==this.state.context&&ze(this,kn,Ri).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const z=await $(this,za).start();return await((f=(d=$(this,Qt).config).onSuccess)==null?void 0:f.call(d,z,t,this.state.context,this,n)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,z,t,this.state.context,n)),await((b=(v=$(this,Qt).config).onSettled)==null?void 0:b.call(v,z,null,this.state.variables,this.state.context,this,n)),await((k=(S=this.options).onSettled)==null?void 0:k.call(S,z,null,t,this.state.context,n)),ze(this,kn,Ri).call(this,{type:"success",data:z}),z}catch(z){try{await((P=(E=$(this,Qt).config).onError)==null?void 0:P.call(E,z,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((_=(j=this.options).onError)==null?void 0:_.call(j,z,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((N=(O=$(this,Qt).config).onSettled)==null?void 0:N.call(O,void 0,z,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((R=(C=this.options).onSettled)==null?void 0:R.call(C,void 0,z,t,this.state.context,n))}catch(F){Promise.reject(F)}throw ze(this,kn,Ri).call(this,{type:"error",error:z}),z}finally{$(this,Qt).runNext(this)}}},gu=new WeakMap,wn=new WeakMap,Qt=new WeakMap,za=new WeakMap,kn=new WeakSet,Ri=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ft.batch(()=>{$(this,wn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Qt).notify({mutation:this,type:"updated",action:t})})},AP);function IM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gn,rn,yu,OP,MM=(OP=class extends xu{constructor(t={}){super();je(this,Gn);je(this,rn);je(this,yu);this.config=t,pe(this,Gn,new Set),pe(this,rn,new Map),pe(this,yu,0)}build(t,r,n){const i=new NM({client:t,mutationCache:this,mutationId:++Gc(this,yu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,Gn).add(t);const r=Qc(t);if(typeof r=="string"){const n=$(this,rn).get(r);n?n.push(t):$(this,rn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Gn).delete(t)){const r=Qc(t);if(typeof r=="string"){const n=$(this,rn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,rn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Qc(t);if(typeof r=="string"){const n=$(this,rn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Qc(t);if(typeof r=="string"){const i=(n=$(this,rn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ft.batch(()=>{$(this,Gn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Gn).clear(),$(this,rn).clear()})}getAll(){return Array.from($(this,Gn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>T1(r,n))}findAll(t={}){return this.getAll().filter(r=>T1(t,r))}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ft.batch(()=>Promise.all(t.map(r=>r.continue().catch(mr))))}},Gn=new WeakMap,rn=new WeakMap,yu=new WeakMap,OP);function Qc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Sn,CP,TM=(CP=class extends xu{constructor(t={}){super();je(this,Sn);this.config=t,pe(this,Sn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Fg(i,r);let s=this.get(o);return s||(s=new OM({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){$(this,Sn).has(t.queryHash)||($(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,Sn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ft.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,Sn).get(t)}getAll(){return[...$(this,Sn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>M1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>M1(t,n)):r}notify(t){Ft.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ft.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,CP),dt,Vi,qi,ul,cl,Gi,dl,fl,jP,DM=(jP=class{constructor(e={}){je(this,dt);je(this,Vi);je(this,qi);je(this,ul);je(this,cl);je(this,Gi);je(this,dl);je(this,fl);pe(this,dt,e.queryCache||new TM),pe(this,Vi,e.mutationCache||new MM),pe(this,qi,e.defaultOptions||{}),pe(this,ul,new Map),pe(this,cl,new Map),pe(this,Gi,0)}mount(){Gc(this,Gi)._++,$(this,Gi)===1&&(pe(this,dl,zg.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,dt).onFocus())})),pe(this,fl,Nd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,dt).onOnline())})))}unmount(){var e,t;Gc(this,Gi)._--,$(this,Gi)===0&&((e=$(this,dl))==null||e.call(this),pe(this,dl,void 0),(t=$(this,fl))==null||t.call(this),pe(this,fl,void 0))}isFetching(e){return $(this,dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Vi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,dt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,dt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Qi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,dt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=$(this,dt).get(n.queryHash),o=i==null?void 0:i.state.data,s=mM(t,o);if(s!==void 0)return $(this,dt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ft.batch(()=>$(this,dt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,dt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,dt);Ft.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,dt);return Ft.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ft.batch(()=>$(this,dt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(mr).catch(mr)}invalidateQueries(e,t={}){return Ft.batch(()=>($(this,dt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ft.batch(()=>$(this,dt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(mr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(mr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,dt).build(this,t);return r.isStaleByTime(Qi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mr).catch(mr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mr).catch(mr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Nd.isOnline()?$(this,Vi).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,dt)}getMutationCache(){return $(this,Vi)}getDefaultOptions(){return $(this,qi)}setDefaultOptions(e){pe(this,qi,e)}setQueryDefaults(e,t){$(this,ul).set(Vs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,ul).values()],r={};return t.forEach(n=>{qs(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,cl).set(Vs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,cl).values()],r={};return t.forEach(n=>{qs(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,qi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,qi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,dt).clear(),$(this,Vi).clear()}},dt=new WeakMap,Vi=new WeakMap,qi=new WeakMap,ul=new WeakMap,cl=new WeakMap,Gi=new WeakMap,dl=new WeakMap,fl=new WeakMap,jP),BP=y.createContext(void 0),bu=e=>{const t=y.useContext(BP);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RM=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(BP.Provider,{value:e,children:t})),UP=y.createContext(!1),$M=()=>y.useContext(UP);UP.Provider;function LM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zM=y.createContext(LM()),FM=()=>y.useContext(zM),BM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?TP(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},UM=e=>{y.useEffect(()=>{e.clearReset()},[e])},WM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||TP(r,[e.error,n])),HM=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},KM=(e,t)=>e.isLoading&&e.isFetching&&!t,VM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,U1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function qM(e,t,r){var b,S,k,E;const n=$M(),i=FM(),o=bu(),s=o.defaultQueryOptions(e);(S=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||S.call(b,s);const u=o.getQueryCache().get(s.queryHash),d=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":d?"optimistic":void 0,HM(s),BM(s,i,u),UM(i);const f=!o.getQueryCache().get(s.queryHash),[h]=y.useState(()=>new t(o,s)),m=h.getOptimisticResult(s),v=!n&&d;if(y.useSyncExternalStore(y.useCallback(P=>{const j=v?h.subscribe(Ft.batchCalls(P)):mr;return h.updateResult(),j},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),y.useEffect(()=>{h.setOptions(s)},[s,h]),VM(s,m))throw U1(s,h,i);if(WM({result:m,errorResetBoundary:i,throwOnError:s.throwOnError,query:u,suspense:s.suspense}))throw m.error;if((E=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||E.call(k,s,m),s.experimental_prefetchInRender&&!Gs.isServer()&&KM(m,n)){const P=f?U1(s,h,i):u==null?void 0:u.promise;P==null||P.catch(mr).finally(()=>{h.updateResult()})}return s.notifyOnChangeProps?m:h.trackResult(m)}function Ge(e,t){return qM(e,CM)}const GM="modulepreload",YM=function(e){return"/"+e},W1={},un=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=s(r.map(f=>{if(f=YM(f),f in W1)return;W1[f]=!0;const h=f.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":GM,h||(v.as="script"),v.crossOrigin="",v.href=f,d&&v.setAttribute("nonce",d),document.head.appendChild(v),h)return new Promise((b,S)=>{v.addEventListener("load",b),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(s){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=s,window.dispatchEvent(u),!u.defaultPrevented)throw s}return i.then(s=>{for(const u of s||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const QM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),WP=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var XM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ZM=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:s,...u},d)=>y.createElement("svg",{ref:d,...XM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:WP("lucide",i),...u},[...s.map(([f,h])=>y.createElement(f,h)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Se=(e,t)=>{const r=y.forwardRef(({className:n,...i},o)=>y.createElement(ZM,{ref:o,iconNode:t,className:WP(`lucide-${QM(e)}`,n),...i}));return r.displayName=`${e}`,r};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const JM=Se("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const eT=Se("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const H1=Se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const tT=Se("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _f=Se("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rT=Se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HP=Se("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wg=Se("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nT=Se("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const KP=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const iT=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aT=Se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vo=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const oT=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const VP=Se("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lT=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sT=Se("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uT=Se("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qP=Se("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cT=Se("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const K1=Se("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _v=Se("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dT=Se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const V1=Se("Fuel",[["line",{x1:"3",x2:"15",y1:"22",y2:"22",key:"xegly4"}],["line",{x1:"4",x2:"14",y1:"9",y2:"9",key:"xcnuvu"}],["path",{d:"M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18",key:"16j0yd"}],["path",{d:"M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5",key:"7cu91f"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fT=Se("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hT=Se("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pT=Se("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mT=Se("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vT=Se("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Hg=Se("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gT=Se("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yT=Se("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xT=Se("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bT=Se("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nf=Se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wT=Se("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kT=Se("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ST=Se("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const q1=Se("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Kg=Se("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const G1=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ET=Se("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qo=Se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PT=Se("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AT=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const If=Se("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mf=Se("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const OT=Se("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vg=Se("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const GP=Se("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CT=Se("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const YP=Se("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jT=Se("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _T=Se("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NT=Se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ys=Se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const IT=Se("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wu=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Go=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:yT,group:"Operativ"},{id:"ideen",label:"Ideen",hint:"Idee eingeben — die Box legt Konzept und Repo an",icon:bT,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Hg,group:"Operativ"},{id:"eigenleben",label:"Skills",hint:"Fähigkeiten der Box — aktiv/inaktiv, Herkunft & Vorschlags-Bilanz",icon:YP,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:vT,group:"Operativ"},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Wg,group:"Wissen"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:xT,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Kg,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:jT,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:VP,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:HP,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:_f,group:"Wartung"}];var Y1=1,MT=.9,TT=.8,DT=.17,Pm=.1,Am=.999,RT=.9999,$T=.99,LT=/[\\\/_+.#"@\[\(\{&]/,zT=/[\\\/_+.#"@\[\(\{&]/g,FT=/[\s-]/,QP=/[\s-]/g;function Nv(e,t,r,n,i,o,s){if(o===t.length)return i===e.length?Y1:$T;var u=`${i},${o}`;if(s[u]!==void 0)return s[u];for(var d=n.charAt(o),f=r.indexOf(d,i),h=0,m,v,b,S;f>=0;)m=Nv(e,t,r,n,f+1,o+1,s),m>h&&(f===i?m*=Y1:LT.test(e.charAt(f-1))?(m*=TT,b=e.slice(i,f-1).match(zT),b&&i>0&&(m*=Math.pow(Am,b.length))):FT.test(e.charAt(f-1))?(m*=MT,S=e.slice(i,f-1).match(QP),S&&i>0&&(m*=Math.pow(Am,S.length))):(m*=DT,i>0&&(m*=Math.pow(Am,f-i))),e.charAt(f)!==t.charAt(o)&&(m*=RT)),(mm&&(m=v*Pm)),m>h&&(h=m),f=r.indexOf(d,f+1);return s[u]=h,h}function Q1(e){return e.toLowerCase().replace(QP," ")}function BT(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Nv(e,t,Q1(e),Q1(t),0,0,{})}function Xi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function X1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hl(...e){return t=>{let r=!1;const n=e.map(i=>{const o=X1(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i{var P;const{scope:v,children:b,...S}=m,k=((P=v==null?void 0:v[e])==null?void 0:P[d])||u,E=y.useMemo(()=>S,Object.values(S));return x.jsx(k.Provider,{value:E,children:b})};f.displayName=o+"Provider";function h(m,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[d])||u,S=y.useContext(b);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[f,h]}const i=()=>{const o=r.map(s=>y.createContext(s));return function(u){const d=(u==null?void 0:u[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[n,WT(i,...t)]}function WT(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=n.reduce((u,{useScope:d,scopeName:f})=>{const m=d(o)[`__scope${f}`];return{...u,...m}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Qs=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},HT=jf[" useId ".trim().toString()]||(()=>{}),KT=0;function Jn(e){const[t,r]=y.useState(HT());return Qs(()=>{r(n=>n??String(KT++))},[e]),t?`radix-${t}`:""}var VT=jf[" useInsertionEffect ".trim().toString()]||Qs;function qT({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,s]=GT({defaultProp:t,onChange:r}),u=e!==void 0,d=u?e:i;{const h=y.useRef(e!==void 0);y.useEffect(()=>{const m=h.current;m!==u&&console.warn(`${n} is changing from ${m?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=u},[u,n])}const f=y.useCallback(h=>{var m;if(u){const v=YT(h)?h(e):h;v!==e&&((m=s.current)==null||m.call(s,v))}else o(h)},[u,e,o,s]);return[d,f]}function GT({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),i=y.useRef(r),o=y.useRef(t);return VT(()=>{o.current=t},[t]),y.useEffect(()=>{var s;i.current!==r&&((s=o.current)==null||s.call(o,r),i.current=r)},[r,i]),[r,n,o]}function YT(e){return typeof e=="function"}var Tf=_P();function XP(e){const t=y.forwardRef((r,n)=>{let{children:i,...o}=r,s=null,u=!1;const d=[];Z1(i)&&typeof Xc=="function"&&(i=Xc(i._payload)),y.Children.forEach(i,v=>{var b;if(eD(v)){u=!0;const S=v;let k="child"in S.props?S.props.child:S.props.children;Z1(k)&&typeof Xc=="function"&&(k=Xc(k._payload)),s=XT(S,k),d.push((b=s==null?void 0:s.props)==null?void 0:b.children)}else d.push(v)}),s?s=y.cloneElement(s,void 0,d):!u&&y.Children.count(i)===1&&y.isValidElement(i)&&(s=i);const f=s?JT(s):void 0,h=Za(n,f);if(!s){if(i||i===0)throw new Error(u?iD(e):nD(e));return i}const m=ZT(o,s.props??{});return s.type!==y.Fragment&&(m.ref=n?h:f),y.cloneElement(s,m)});return t.displayName=`${e}.Slot`,t}var QT=Symbol.for("radix.slottable"),XT=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function ZT(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const d=o(...u);return i(...u),d}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function JT(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function eD(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QT}var tD=Symbol.for("react.lazy");function Z1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tD&&"_payload"in e&&rD(e._payload)}function rD(e){return typeof e=="object"&&e!==null&&"then"in e}var nD=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,iD=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Xc=jf[" use ".trim().toString()],aD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wt=aD.reduce((e,t)=>{const r=XP(`Primitive.${t}`),n=y.forwardRef((i,o)=>{const{asChild:s,...u}=i,d=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oD(e,t){e&&Tf.flushSync(()=>e.dispatchEvent(t))}function Xs(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function lD(e,t=globalThis==null?void 0:globalThis.document){const r=Xs(e);y.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var sD="DismissableLayer",Iv="dismissableLayer.update",uD="dismissableLayer.pointerDownOutside",cD="dismissableLayer.focusOutside",J1,qg=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ZP=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:d,...f}=e,h=y.useContext(qg),[m,v]=y.useState(null),b=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=y.useState({}),k=Za(t,F=>v(F)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),j=E.indexOf(P),_=m?E.indexOf(m):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,N=_>=j,C=y.useRef(!1),R=pD(F=>{const V=F.target;if(!(V instanceof Node))return;const Q=[...h.branches].some(B=>B.contains(V));!N||Q||(o==null||o(F),u==null||u(F),F.defaultPrevented||d==null||d())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:h.dismissableSurfaces}),z=mD(F=>{if(n&&C.current)return;const V=F.target;[...h.branches].some(B=>B.contains(V))||(s==null||s(F),u==null||u(F),F.defaultPrevented||d==null||d())},b);return lD(F=>{_===h.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&d&&(F.preventDefault(),d()))},b),y.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(J1=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),ew(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(m),h.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=J1))}},[m,b,r,h]),y.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),ew())},[m,h]),y.useEffect(()=>{const F=()=>S({});return document.addEventListener(Iv,F),()=>document.removeEventListener(Iv,F)},[]),x.jsx(Wt.div,{...f,ref:k,style:{pointerEvents:O?N?"auto":"none":void 0,...e.style},onFocusCapture:Xi(e.onFocusCapture,z.onFocusCapture),onBlurCapture:Xi(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:Xi(e.onPointerDownCapture,R.onPointerDownCapture)})});ZP.displayName=sD;var dD="DismissableLayerBranch",fD=y.forwardRef((e,t)=>{const r=y.useContext(qg),n=y.useRef(null),i=Za(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),x.jsx(Wt.div,{...e,ref:i})});fD.displayName=dD;function hD(){const e=y.useContext(qg),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function pD(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,s=Xs(e),u=y.useRef(!1),d=y.useRef(!1),f=y.useRef(new Map),h=y.useRef(()=>{});return y.useEffect(()=>{function m(){d.current=!1,i.current=!1,f.current.clear()}function v(){return Array.from(f.current.values()).some(Boolean)}function b(j){if(!d.current)return;const _=j.target;_ instanceof Node&&[...o].some(N=>N.contains(_))||f.current.set(j.type,!0),j.type==="click"&&window.setTimeout(()=>{d.current&&h.current()},0)}function S(j){d.current&&f.current.set(j.type,!1)}const k=j=>{if(j.target&&!u.current){let _=function(){r.removeEventListener("click",h.current);const N=v();m(),N||JP(uD,s,O,{discrete:!0})};const O={originalEvent:j};d.current=!0,i.current=n&&j.button===0,f.current.clear(),!n||j.button!==0?_():(r.removeEventListener("click",h.current),h.current=_,r.addEventListener("click",h.current,{once:!0}))}else r.removeEventListener("click",h.current),m();u.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const j of E)r.addEventListener(j,b,!0),r.addEventListener(j,S);const P=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(P),r.removeEventListener("pointerdown",k),r.removeEventListener("click",h.current);for(const j of E)r.removeEventListener(j,b,!0),r.removeEventListener(j,S)}},[r,s,n,i,o]),{onPointerDownCapture:()=>u.current=!0}}function mD(e,t=globalThis==null?void 0:globalThis.document){const r=Xs(e),n=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!n.current&&JP(cD,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ew(){const e=new CustomEvent(Iv);document.dispatchEvent(e)}function JP(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?oD(i,o):i.dispatchEvent(o)}var Om="focusScope.autoFocusOnMount",Cm="focusScope.autoFocusOnUnmount",tw={bubbles:!1,cancelable:!0},vD="FocusScope",eA=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[u,d]=y.useState(null),f=Xs(i),h=Xs(o),m=y.useRef(null),v=Za(t,k=>d(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(_){if(b.paused||!u)return;const O=_.target;u.contains(O)?m.current=O:$i(m.current,{select:!0})},E=function(_){if(b.paused||!u)return;const O=_.relatedTarget;O!==null&&(u.contains(O)||$i(m.current,{select:!0}))},P=function(_){if(document.activeElement===document.body)for(const N of _)N.removedNodes.length>0&&$i(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",E);const j=new MutationObserver(P);return u&&j.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",E),j.disconnect()}}},[n,u,b.paused]),y.useEffect(()=>{if(u){nw.add(b);const k=document.activeElement;if(!u.contains(k)){const P=new CustomEvent(Om,tw);u.addEventListener(Om,f),u.dispatchEvent(P),P.defaultPrevented||(gD(kD(tA(u)),{select:!0}),document.activeElement===k&&$i(u))}return()=>{u.removeEventListener(Om,f),setTimeout(()=>{const P=new CustomEvent(Cm,tw);u.addEventListener(Cm,h),u.dispatchEvent(P),P.defaultPrevented||$i(k??document.body,{select:!0}),u.removeEventListener(Cm,h),nw.remove(b)},0)}}},[u,f,h,b]);const S=y.useCallback(k=>{if(!r&&!n||b.paused)return;const E=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,P=document.activeElement;if(E&&P){const j=k.currentTarget,[_,O]=yD(j);_&&O?!k.shiftKey&&P===O?(k.preventDefault(),r&&$i(_,{select:!0})):k.shiftKey&&P===_&&(k.preventDefault(),r&&$i(O,{select:!0})):P===j&&k.preventDefault()}},[r,n,b.paused]);return x.jsx(Wt.div,{tabIndex:-1,...s,ref:v,onKeyDown:S})});eA.displayName=vD;function gD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if($i(n,{select:t}),document.activeElement!==r)return}function yD(e){const t=tA(e),r=rw(t,e),n=rw(t.reverse(),e);return[r,n]}function tA(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function rw(e,t){for(const r of e)if(!xD(r,{upTo:t}))return r}function xD(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function bD(e){return e instanceof HTMLInputElement&&"select"in e}function $i(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bD(e)&&t&&e.select()}}var nw=wD();function wD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=iw(e,t),e.unshift(t)},remove(t){var r;e=iw(e,t),(r=e[0])==null||r.resume()}}}function iw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function kD(e){return e.filter(t=>t.tagName!=="A")}var SD="Portal",rA=y.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=y.useState(!1);Qs(()=>o(!0),[]);const s=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return s?Tf.createPortal(x.jsx(Wt.div,{...n,ref:t}),s):null});rA.displayName=SD;function ED(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Df=e=>{const{present:t,children:r}=e,n=PD(t),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=AD(n.ref,OD(i));return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:o}):null};Df.displayName="Presence";function PD(e){const[t,r]=y.useState(),n=y.useRef(null),i=y.useRef(e),o=y.useRef("none"),s=e?"mounted":"unmounted",[u,d]=ED(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=Zc(n.current);o.current=u==="mounted"?f:"none"},[u]),Qs(()=>{const f=n.current,h=i.current;if(h!==e){const v=o.current,b=Zc(f);e?d("MOUNT"):b==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Qs(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,m=b=>{const k=Zc(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(d("ANIMATION_END"),!i.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},v=b=>{b.target===t&&(o.current=Zc(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function aw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function AD(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(s=>{const u=aw(s,r);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let s=0;s{gn||(gn={start:ow(),end:ow()});const{start:e,end:t}=gn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Jc++,()=>{Jc===1&&(gn==null||gn.start.remove(),gn==null||gn.end.remove(),gn=null),Jc=Math.max(0,Jc-1)}},[])}function ow(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var En=function(){return En=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return KD;var t=VD(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},GD=oA(),Yo="data-scroll-locked",YD=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` .`.concat(_D,` { overflow: hidden `).concat(n,`; padding-right: `).concat(u,"px ").concat(n,`; } body[`).concat(Yo,`] { overflow: hidden `).concat(n,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(o,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(u,"px ").concat(n,`; `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` } .`).concat(wd,` { right: `).concat(u,"px ").concat(n,`; } .`).concat(kd,` { margin-right: `).concat(u,"px ").concat(n,`; } .`).concat(wd," .").concat(wd,` { right: 0 `).concat(n,`; } .`).concat(kd," .").concat(kd,` { margin-right: 0 `).concat(n,`; } body[`).concat(Yo,`] { `).concat(ND,": ").concat(u,`px; } `)},sw=function(){var e=parseInt(document.body.getAttribute(Yo)||"0",10);return isFinite(e)?e:0},QD=function(){y.useEffect(function(){return document.body.setAttribute(Yo,(sw()+1).toString()),function(){var e=sw()-1;e<=0?document.body.removeAttribute(Yo):document.body.setAttribute(Yo,e.toString())}},[])},XD=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;QD();var o=y.useMemo(function(){return qD(i)},[i]);return y.createElement(GD,{styles:YD(o,!t,i,r?"":"!important")})},Mv=!1;if(typeof window<"u")try{var ed=Object.defineProperty({},"passive",{get:function(){return Mv=!0,!0}});window.addEventListener("test",ed,ed),window.removeEventListener("test",ed,ed)}catch{Mv=!1}var Co=Mv?{passive:!1}:!1,ZD=function(e){return e.tagName==="TEXTAREA"},lA=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ZD(e)&&r[t]==="visible")},JD=function(e){return lA(e,"overflowY")},eR=function(e){return lA(e,"overflowX")},uw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=sA(e,n);if(i){var o=uA(e,n),s=o[1],u=o[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},tR=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},rR=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},sA=function(e,t){return e==="v"?JD(t):eR(t)},uA=function(e,t){return e==="v"?tR(t):rR(t)},nR=function(e,t){return e==="h"&&t==="rtl"?-1:1},iR=function(e,t,r,n,i){var o=nR(e,window.getComputedStyle(t).direction),s=o*n,u=r.target,d=t.contains(u),f=!1,h=s>0,m=0,v=0;do{if(!u)break;var b=uA(e,u),S=b[0],k=b[1],E=b[2],P=k-E-o*S;(S||P)&&sA(e,u)&&(m+=P,v+=S);var j=u.parentNode;u=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(h&&Math.abs(m)<1||!h&&Math.abs(v)<1)&&(f=!0),f},td=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cw=function(e){return[e.deltaX,e.deltaY]},dw=function(e){return e&&"current"in e?e.current:e},aR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},oR=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},lR=0,jo=[];function sR(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(lR++)[0],o=y.useState(oA)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=jD([e.lockRef.current],(e.shards||[]).map(dw),!0).filter(Boolean);return k.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(k,E){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!s.current.allowPinchZoom;var P=td(k),j=r.current,_="deltaX"in k?k.deltaX:j[0]-P[0],O="deltaY"in k?k.deltaY:j[1]-P[1],N,C=k.target,R=Math.abs(_)>Math.abs(O)?"h":"v";if("touches"in k&&R==="h"&&C.type==="range")return!1;var z=window.getSelection(),F=z&&z.anchorNode,V=F?F===C||F.contains(C):!1;if(V)return!1;var Q=uw(R,C);if(!Q)return!0;if(Q?N=R:(N=R==="v"?"h":"v",Q=uw(R,C)),!Q)return!1;if(!n.current&&"changedTouches"in k&&(_||O)&&(n.current=N),!N)return!0;var B=n.current||N;return iR(B,E,k,B==="h"?_:O)},[]),d=y.useCallback(function(k){var E=k;if(!(!jo.length||jo[jo.length-1]!==o)){var P="deltaY"in E?cw(E):td(E),j=t.current.filter(function(N){return N.name===E.type&&(N.target===E.target||E.target===N.shadowParent)&&aR(N.delta,P)})[0];if(j&&j.should){E.cancelable&&E.preventDefault();return}if(!j){var _=(s.current.shards||[]).map(dw).filter(Boolean).filter(function(N){return N.contains(E.target)}),O=_.length>0?u(E,_[0]):!s.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),f=y.useCallback(function(k,E,P,j){var _={name:k,delta:E,target:P,should:j,shadowParent:uR(P)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(O){return O!==_})},1)},[]),h=y.useCallback(function(k){r.current=td(k),n.current=void 0},[]),m=y.useCallback(function(k){f(k.type,cw(k),k.target,u(k,e.lockRef.current))},[]),v=y.useCallback(function(k){f(k.type,td(k),k.target,u(k,e.lockRef.current))},[]);y.useEffect(function(){return jo.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Co),document.addEventListener("touchmove",d,Co),document.addEventListener("touchstart",h,Co),function(){jo=jo.filter(function(k){return k!==o}),document.removeEventListener("wheel",d,Co),document.removeEventListener("touchmove",d,Co),document.removeEventListener("touchstart",h,Co)}},[]);var b=e.removeScrollBar,S=e.inert;return y.createElement(y.Fragment,null,S?y.createElement(o,{styles:oR(i)}):null,b?y.createElement(XD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cR=LD(aA,sR);var cA=y.forwardRef(function(e,t){return y.createElement(Rf,En({},e,{ref:t,sideCar:cR}))});cA.classNames=Rf.classNames;var dR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_o=new WeakMap,rd=new WeakMap,nd={},Im=0,dA=function(e){return e&&(e.host||dA(e.parentNode))},fR=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=dA(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hR=function(e,t,r,n){var i=fR(t,Array.isArray(e)?e:[e]);nd[r]||(nd[r]=new WeakMap);var o=nd[r],s=[],u=new Set,d=new Set(i),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};i.forEach(f);var h=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(u.has(v))h(v);else try{var b=v.getAttribute(n),S=b!==null&&b!=="false",k=(_o.get(v)||0)+1,E=(o.get(v)||0)+1;_o.set(v,k),o.set(v,E),s.push(v),k===1&&S&&rd.set(v,!0),E===1&&v.setAttribute(r,"true"),S||v.setAttribute(n,"true")}catch(P){console.error("aria-hidden: cannot operate on ",v,P)}})};return h(t),u.clear(),Im++,function(){s.forEach(function(m){var v=_o.get(m)-1,b=o.get(m)-1;_o.set(m,v),o.set(m,b),v||(rd.has(m)||m.removeAttribute(n),rd.delete(m)),b||m.removeAttribute(r)}),Im--,Im||(_o=new WeakMap,_o=new WeakMap,rd=new WeakMap,nd={})}},pR=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=dR(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),hR(n,i,r,"aria-hidden")):function(){return null}},$f="Dialog",[fA]=UT($f),[mR,cn]=fA($f),hA=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,u=y.useRef(null),d=y.useRef(null),[f,h]=qT({prop:n,defaultProp:i??!1,onChange:o,caller:$f});return x.jsx(mR,{scope:t,triggerRef:u,contentRef:d,contentId:Jn(),titleId:Jn(),descriptionId:Jn(),open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(m=>!m),[h]),modal:s,children:r})};hA.displayName=$f;var pA="DialogTrigger",vR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=cn(pA,r),o=Za(t,i.triggerRef);return x.jsx(Wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Yg(i.open),...n,ref:o,onClick:Xi(e.onClick,i.onOpenToggle)})});vR.displayName=pA;var Gg="DialogPortal",[gR,mA]=fA(Gg,{forceMount:void 0}),vA=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=cn(Gg,t);return x.jsx(gR,{scope:t,forceMount:r,children:y.Children.map(n,s=>x.jsx(Df,{present:r||o.open,children:x.jsx(rA,{asChild:!0,container:i,children:s})}))})};vA.displayName=Gg;var Id="DialogOverlay",gA=y.forwardRef((e,t)=>{const r=mA(Id,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=cn(Id,e.__scopeDialog);return o.modal?x.jsx(Df,{present:n||o.open,children:x.jsx(xR,{...i,ref:t})}):null});gA.displayName=Id;var yR=XP("DialogOverlay.RemoveScroll"),xR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=cn(Id,r),o=hD(),s=Za(t,o);return x.jsx(cA,{as:yR,allowPinchZoom:!0,shards:[i.contentRef],children:x.jsx(Wt.div,{"data-state":Yg(i.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})}),pl="DialogContent",yA=y.forwardRef((e,t)=>{const r=mA(pl,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=cn(pl,e.__scopeDialog);return x.jsx(Df,{present:n||o.open,children:o.modal?x.jsx(bR,{...i,ref:t}):x.jsx(wR,{...i,ref:t})})});yA.displayName=pl;var bR=y.forwardRef((e,t)=>{const r=cn(pl,e.__scopeDialog),n=y.useRef(null),i=Za(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return pR(o)},[]),x.jsx(xA,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Xi(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Xi(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&o.preventDefault()}),onFocusOutside:Xi(e.onFocusOutside,o=>o.preventDefault())})}),wR=y.forwardRef((e,t)=>{const r=cn(pl,e.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return x.jsx(xA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,u;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(n.current||(u=r.triggerRef.current)==null||u.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((f=r.triggerRef.current)==null?void 0:f.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),xA=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,u=cn(pl,r);return CD(),x.jsx(x.Fragment,{children:x.jsx(eA,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:x.jsx(ZP,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Yg(u.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),bA="DialogTitle",kR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=cn(bA,r);return x.jsx(Wt.h2,{id:i.titleId,...n,ref:t})});kR.displayName=bA;var wA="DialogDescription",SR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=cn(wA,r);return x.jsx(Wt.p,{id:i.descriptionId,...n,ref:t})});SR.displayName=wA;var kA="DialogClose",ER=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=cn(kA,r);return x.jsx(Wt.button,{type:"button",...n,ref:t,onClick:Xi(e.onClick,()=>i.onOpenChange(!1))})});ER.displayName=kA;function Yg(e){return e?"open":"closed"}var Es='[cmdk-group=""]',Mm='[cmdk-group-items=""]',PR='[cmdk-group-heading=""]',SA='[cmdk-item=""]',fw=`${SA}:not([aria-disabled="true"])`,Tv="cmdk-item-select",Bo="data-value",AR=(e,t,r)=>BT(e,t,r),EA=y.createContext(void 0),ku=()=>y.useContext(EA),PA=y.createContext(void 0),Qg=()=>y.useContext(PA),AA=y.createContext(void 0),OA=y.forwardRef((e,t)=>{let r=Uo(()=>{var T,Z;return{search:"",value:(Z=(T=e.value)!=null?T:e.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Uo(()=>new Set),i=Uo(()=>new Map),o=Uo(()=>new Map),s=Uo(()=>new Set),u=CA(e),{label:d,children:f,value:h,onValueChange:m,filter:v,shouldFilter:b,loop:S,disablePointerSelection:k=!1,vimBindings:E=!0,...P}=e,j=Jn(),_=Jn(),O=Jn(),N=y.useRef(null),C=$R();Wa(()=>{if(h!==void 0){let T=h.trim();r.current.value=T,R.emit()}},[h]),Wa(()=>{C(6,ue)},[]);let R=y.useMemo(()=>({subscribe:T=>(s.current.add(T),()=>s.current.delete(T)),snapshot:()=>r.current,setState:(T,Z,se)=>{var te,ce,ge,_e;if(!Object.is(r.current[T],Z)){if(r.current[T]=Z,T==="search")B(),V(),C(1,Q);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(O);J?J.focus():(te=document.getElementById(j))==null||te.focus()}if(C(7,()=>{var J;r.current.selectedItemId=(J=G())==null?void 0:J.id,R.emit()}),se||C(5,ue),((ce=u.current)==null?void 0:ce.value)!==void 0){let J=Z??"";(_e=(ge=u.current).onValueChange)==null||_e.call(ge,J);return}}R.emit()}},emit:()=>{s.current.forEach(T=>T())}}),[]),z=y.useMemo(()=>({value:(T,Z,se)=>{var te;Z!==((te=o.current.get(T))==null?void 0:te.value)&&(o.current.set(T,{value:Z,keywords:se}),r.current.filtered.items.set(T,F(Z,se)),C(2,()=>{V(),R.emit()}))},item:(T,Z)=>(n.current.add(T),Z&&(i.current.has(Z)?i.current.get(Z).add(T):i.current.set(Z,new Set([T]))),C(3,()=>{B(),V(),r.current.value||Q(),R.emit()}),()=>{o.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let se=G();C(4,()=>{B(),(se==null?void 0:se.getAttribute("id"))===T&&Q(),R.emit()})}),group:T=>(i.current.has(T)||i.current.set(T,new Set),()=>{o.current.delete(T),i.current.delete(T)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:j,inputId:O,labelId:_,listInnerRef:N}),[]);function F(T,Z){var se,te;let ce=(te=(se=u.current)==null?void 0:se.filter)!=null?te:AR;return T?ce(T,r.current.search,Z):0}function V(){if(!r.current.search||u.current.shouldFilter===!1)return;let T=r.current.filtered.items,Z=[];r.current.filtered.groups.forEach(te=>{let ce=i.current.get(te),ge=0;ce.forEach(_e=>{let J=T.get(_e);ge=Math.max(J,ge)}),Z.push([te,ge])});let se=N.current;le().sort((te,ce)=>{var ge,_e;let J=te.getAttribute("id"),we=ce.getAttribute("id");return((ge=T.get(we))!=null?ge:0)-((_e=T.get(J))!=null?_e:0)}).forEach(te=>{let ce=te.closest(Mm);ce?ce.appendChild(te.parentElement===ce?te:te.closest(`${Mm} > *`)):se.appendChild(te.parentElement===se?te:te.closest(`${Mm} > *`))}),Z.sort((te,ce)=>ce[1]-te[1]).forEach(te=>{var ce;let ge=(ce=N.current)==null?void 0:ce.querySelector(`${Es}[${Bo}="${encodeURIComponent(te[0])}"]`);ge==null||ge.parentElement.appendChild(ge)})}function Q(){let T=le().find(se=>se.getAttribute("aria-disabled")!=="true"),Z=T==null?void 0:T.getAttribute(Bo);R.setState("value",Z||void 0)}function B(){var T,Z,se,te;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let ge of n.current){let _e=(Z=(T=o.current.get(ge))==null?void 0:T.value)!=null?Z:"",J=(te=(se=o.current.get(ge))==null?void 0:se.keywords)!=null?te:[],we=F(_e,J);r.current.filtered.items.set(ge,we),we>0&&ce++}for(let[ge,_e]of i.current)for(let J of _e)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(ge);break}r.current.filtered.count=ce}function ue(){var T,Z,se;let te=G();te&&(((T=te.parentElement)==null?void 0:T.firstChild)===te&&((se=(Z=te.closest(Es))==null?void 0:Z.querySelector(PR))==null||se.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function G(){var T;return(T=N.current)==null?void 0:T.querySelector(`${SA}[aria-selected="true"]`)}function le(){var T;return Array.from(((T=N.current)==null?void 0:T.querySelectorAll(fw))||[])}function fe(T){let Z=le()[T];Z&&R.setState("value",Z.getAttribute(Bo))}function de(T){var Z;let se=G(),te=le(),ce=te.findIndex(_e=>_e===se),ge=te[ce+T];(Z=u.current)!=null&&Z.loop&&(ge=ce+T<0?te[te.length-1]:ce+T===te.length?te[0]:te[ce+T]),ge&&R.setState("value",ge.getAttribute(Bo))}function Y(T){let Z=G(),se=Z==null?void 0:Z.closest(Es),te;for(;se&&!te;)se=T>0?DR(se,Es):RR(se,Es),te=se==null?void 0:se.querySelector(fw);te?R.setState("value",te.getAttribute(Bo)):de(T)}let ae=()=>fe(le().length-1),X=T=>{T.preventDefault(),T.metaKey?ae():T.altKey?Y(1):de(1)},M=T=>{T.preventDefault(),T.metaKey?fe(0):T.altKey?Y(-1):de(-1)};return y.createElement(Wt.div,{ref:t,tabIndex:-1,...P,"cmdk-root":"",onKeyDown:T=>{var Z;(Z=P.onKeyDown)==null||Z.call(P,T);let se=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||se))switch(T.key){case"n":case"j":{E&&T.ctrlKey&&X(T);break}case"ArrowDown":{X(T);break}case"p":case"k":{E&&T.ctrlKey&&M(T);break}case"ArrowUp":{M(T);break}case"Home":{T.preventDefault(),fe(0);break}case"End":{T.preventDefault(),ae();break}case"Enter":{T.preventDefault();let te=G();if(te){let ce=new Event(Tv);te.dispatchEvent(ce)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:zR},d),Lf(e,T=>y.createElement(PA.Provider,{value:R},y.createElement(EA.Provider,{value:z},T))))}),OR=y.forwardRef((e,t)=>{var r,n;let i=Jn(),o=y.useRef(null),s=y.useContext(AA),u=ku(),d=CA(e),f=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:s==null?void 0:s.forceMount;Wa(()=>{if(!f)return u.item(i,s==null?void 0:s.id)},[f]);let h=jA(i,o,[e.value,e.children,o],e.keywords),m=Qg(),v=ea(C=>C.value&&C.value===h.current),b=ea(C=>f||u.filter()===!1?!0:C.search?C.filtered.items.get(i)>0:!0);y.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(Tv,S),()=>C.removeEventListener(Tv,S)},[b,e.onSelect,e.disabled]);function S(){var C,R;k(),(R=(C=d.current).onSelect)==null||R.call(C,h.current)}function k(){m.setState("value",h.current,!0)}if(!b)return null;let{disabled:E,value:P,onSelect:j,forceMount:_,keywords:O,...N}=e;return y.createElement(Wt.div,{ref:hl(o,t),...N,id:i,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!v,"data-disabled":!!E,"data-selected":!!v,onPointerMove:E||u.getDisablePointerSelection()?void 0:k,onClick:E?void 0:S},e.children)}),CR=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,s=Jn(),u=y.useRef(null),d=y.useRef(null),f=Jn(),h=ku(),m=ea(b=>i||h.filter()===!1?!0:b.search?b.filtered.groups.has(s):!0);Wa(()=>h.group(s),[]),jA(s,u,[e.value,e.heading,d]);let v=y.useMemo(()=>({id:s,forceMount:i}),[i]);return y.createElement(Wt.div,{ref:hl(u,t),...o,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},r&&y.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},r),Lf(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?f:void 0},y.createElement(AA.Provider,{value:v},b))))}),jR=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=y.useRef(null),o=ea(s=>!s.search);return!r&&!o?null:y.createElement(Wt.div,{ref:hl(i,t),...n,"cmdk-separator":"",role:"separator"})}),_R=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=Qg(),s=ea(f=>f.search),u=ea(f=>f.selectedItemId),d=ku();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(Wt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:i?e.value:s,onChange:f=>{i||o.setState("search",f.target.value),r==null||r(f.target.value)}})}),NR=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=y.useRef(null),s=y.useRef(null),u=ea(f=>f.selectedItemId),d=ku();return y.useEffect(()=>{if(s.current&&o.current){let f=s.current,h=o.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let b=f.offsetHeight;h.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(m),v.unobserve(f)}}},[]),y.createElement(Wt.div,{ref:hl(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:d.listId},Lf(e,f=>y.createElement("div",{ref:hl(s,d.listInnerRef),"cmdk-list-sizer":""},f)))}),IR=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:s,...u}=e;return y.createElement(hA,{open:r,onOpenChange:n},y.createElement(vA,{container:s},y.createElement(gA,{"cmdk-overlay":"",className:i}),y.createElement(yA,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(OA,{ref:t,...u}))))}),MR=y.forwardRef((e,t)=>ea(r=>r.filtered.count===0)?y.createElement(Wt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),TR=y.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return y.createElement(Wt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Lf(e,s=>y.createElement("div",{"aria-hidden":!0},s)))}),No=Object.assign(OA,{List:NR,Item:OR,Input:_R,Group:CR,Separator:jR,Dialog:IR,Empty:MR,Loading:TR});function DR(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function RR(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function CA(e){let t=y.useRef(e);return Wa(()=>{t.current=e}),t}var Wa=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Uo(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ea(e){let t=Qg(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function jA(e,t,r,n=[]){let i=y.useRef(),o=ku();return Wa(()=>{var s;let u=(()=>{var f;for(let h of r){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(f=h.current.textContent)==null?void 0:f.trim():i.current}})(),d=n.map(f=>f.trim());o.value(e,u,d),(s=t.current)==null||s.setAttribute(Bo,u),i.current=u}),i}var $R=()=>{let[e,t]=y.useState(),r=Uo(()=>new Map);return Wa(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function LR(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Lf({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(LR(t),{ref:t.ref},r(t.props.children)):r(t)}var zR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function FR({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),x.jsx(No.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh] overscroll-contain",onClick:()=>r(!1),children:x.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[x.jsx(No.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),x.jsxs(No.List,{className:"max-h-80 overflow-y-auto p-2",children:[x.jsx(No.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),x.jsx(No.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Go.map(n=>x.jsxs(No.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[x.jsx(n.icon,{className:"h-4 w-4 text-primary"}),x.jsx("span",{children:n.label}),x.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const _A="mc_expert_mode",Dv="mc-expert-mode-change",BR=()=>{try{return localStorage.getItem(_A)==="true"}catch{return!1}};function UR(e){return window.addEventListener(Dv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(Dv,e),window.removeEventListener("storage",e)}}function hw(e){localStorage.setItem(_A,String(e)),window.dispatchEvent(new Event(Dv))}function WR(){return y.useSyncExternalStore(UR,BR,()=>!1)}function NA(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=VR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const u=s.split(Xg);return u[0]===""&&u.length!==1&&u.shift(),IA(u,t)||KR(s)},getConflictingClassGroupIds:(s,u)=>{const d=r[s]||[];return u&&n[s]?[...d,...n[s]]:d}}},IA=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?IA(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Xg);return(s=t.validators.find(({validator:u})=>u(o)))==null?void 0:s.classGroupId},pw=/^\[(.+)\]$/,KR=e=>{if(pw.test(e)){const t=pw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},VR=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return GR(Object.entries(e.classGroups),r).forEach(([o,s])=>{Rv(s,n,o,t)}),n},Rv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:mw(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(qR(i)){Rv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,s])=>{Rv(s,mw(t,o),r,n)})})},mw=(e,t)=>{let r=e;return t.split(Xg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},qR=e=>e.isThemeGetter,GR=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,u])=>[t+s,u])):o);return[r,i]}):e,YR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let s=r.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set(o,s){r.has(o)?r.set(o,s):i(o,s)}}},MA="!",QR=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,s=u=>{const d=[];let f=0,h=0,m;for(let E=0;Eh?m-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:k}};return r?u=>r({className:u,parseClassName:s}):s},XR=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},ZR=e=>({cache:YR(e.cacheSize),parseClassName:QR(e),...HR(e)}),JR=/\s+/,e3=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(JR);let u="";for(let d=s.length-1;d>=0;d-=1){const f=s[d],{modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:b}=r(f);let S=!!b,k=n(S?v.substring(0,b):v);if(!k){if(!S){u=f+(u.length>0?" "+u:u);continue}if(k=n(v),!k){u=f+(u.length>0?" "+u:u);continue}S=!1}const E=XR(h).join(":"),P=m?E+MA:E,j=P+k;if(o.includes(j))continue;o.push(j);const _=i(k,S);for(let O=0;O<_.length;++O){const N=_[O];o.push(P+N)}u=f+(u.length>0?" "+u:u)}return u};function t3(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;nm(h),e());return r=ZR(f),n=r.cache.get,i=r.cache.set,o=u,u(d)}function u(d){const f=n(d);if(f)return f;const h=e3(d,r);return i(d,h),h}return function(){return o(t3.apply(null,arguments))}}const tt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},DA=/^\[(?:([a-z-]+):)?(.+)\]$/i,n3=/^\d+\/\d+$/,i3=new Set(["px","full","screen"]),a3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,l3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,s3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,u3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hn=e=>Qo(e)||i3.has(e)||n3.test(e),Mi=e=>Pl(e,"length",g3),Qo=e=>!!e&&!Number.isNaN(Number(e)),Tm=e=>Pl(e,"number",Qo),Ps=e=>!!e&&Number.isInteger(Number(e)),c3=e=>e.endsWith("%")&&Qo(e.slice(0,-1)),Te=e=>DA.test(e),Ti=e=>a3.test(e),d3=new Set(["length","size","percentage"]),f3=e=>Pl(e,d3,RA),h3=e=>Pl(e,"position",RA),p3=new Set(["image","url"]),m3=e=>Pl(e,p3,x3),v3=e=>Pl(e,"",y3),As=()=>!0,Pl=(e,t,r)=>{const n=DA.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},g3=e=>o3.test(e)&&!l3.test(e),RA=()=>!1,y3=e=>s3.test(e),x3=e=>u3.test(e),b3=()=>{const e=tt("colors"),t=tt("spacing"),r=tt("blur"),n=tt("brightness"),i=tt("borderColor"),o=tt("borderRadius"),s=tt("borderSpacing"),u=tt("borderWidth"),d=tt("contrast"),f=tt("grayscale"),h=tt("hueRotate"),m=tt("invert"),v=tt("gap"),b=tt("gradientColorStops"),S=tt("gradientColorStopPositions"),k=tt("inset"),E=tt("margin"),P=tt("opacity"),j=tt("padding"),_=tt("saturate"),O=tt("scale"),N=tt("sepia"),C=tt("skew"),R=tt("space"),z=tt("translate"),F=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",Te,t],B=()=>[Te,t],ue=()=>["",Hn,Mi],G=()=>["auto",Qo,Te],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],fe=()=>["solid","dashed","dotted","double","none"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],ae=()=>["","0",Te],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Qo,Te];return{cacheSize:500,separator:":",theme:{colors:[As],spacing:[Hn,Mi],blur:["none","",Ti,Te],brightness:M(),borderColor:[e],borderRadius:["none","","full",Ti,Te],borderSpacing:B(),borderWidth:ue(),contrast:M(),grayscale:ae(),hueRotate:M(),invert:ae(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[c3,Mi],inset:Q(),margin:Q(),opacity:M(),padding:B(),saturate:M(),scale:M(),sepia:ae(),skew:M(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",Te]}],container:["container"],columns:[{columns:[Ti]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...le(),Te]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ps,Te]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Te]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Ps,Te]}],"grid-cols":[{"grid-cols":[As]}],"col-start-end":[{col:["auto",{span:["full",Ps,Te]},Te]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[As]}],"row-start-end":[{row:["auto",{span:[Ps,Te]},Te]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Te]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Te,t]}],"min-w":[{"min-w":[Te,t,"min","max","fit"]}],"max-w":[{"max-w":[Te,t,"none","full","min","max","fit","prose",{screen:[Ti]},Ti]}],h:[{h:[Te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ti,Mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tm]}],"font-family":[{font:[As]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Te]}],"line-clamp":[{"line-clamp":["none",Qo,Tm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hn,Te]}],"list-image":[{"list-image":["none",Te]}],"list-style-type":[{list:["none","disc","decimal",Te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hn,Mi]}],"underline-offset":[{"underline-offset":["auto",Hn,Te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),h3]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",f3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},m3]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...fe(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:fe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...fe()]}],"outline-offset":[{"outline-offset":[Hn,Te]}],"outline-w":[{outline:[Hn,Mi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[Hn,Mi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ti,v3]}],"shadow-color":[{shadow:[As]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...de(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":de()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Ti,Te]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[_]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Te]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Te]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Ps,Te]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Hn,Mi,Tm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},w3=r3(b3);function Re(...e){return w3(Xe(e))}function GQ(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function k3(){const e=WR();return x.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[x.jsxs("button",{onClick:()=>hw(!1),"aria-pressed":!e,className:Re("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[x.jsx(YP,{className:"h-3.5 w-3.5"})," Einfach"]}),x.jsxs("button",{onClick:()=>hw(!0),"aria-pressed":e,className:Re("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[x.jsx(CT,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function Ie(e,t){var d;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=((d=t==null?void 0:t.method)==null?void 0:d.toUpperCase())||"GET",i=n==="GET"?null:localStorage.getItem("mc_sudo_password"),o=n==="GET"?null:localStorage.getItem("mc_hf_token");i&&(r["X-Sudo-Password"]=i);let s=t==null?void 0:t.body;if(n==="POST"){if(typeof s=="string")try{const f=JSON.parse(s);let h=!1;i&&!("sudo_password"in f)&&(f.sudo_password=i,h=!0),o&&!("hf_token"in f)&&(f.hf_token=o,h=!0),h&&(s=JSON.stringify(f))}catch{}else if(!s){const f={};i&&(f.sudo_password=i),o&&(f.hf_token=o),Object.keys(f).length>0&&(s=JSON.stringify(f))}}const u=await fetch(e,{...t,headers:r,body:s});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}const YQ=(e,t,r=!1,n=!0)=>Ie("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),QQ=e=>Ie("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)});function S3({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:s,onCancel:u}){const d=y.useRef(null);return x.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:x.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[x.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),x.jsx("button",{onClick:u||(()=>s()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:x.jsx(wu,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:r}),e==="prompt"&&x.jsxs("div",{className:"flex gap-2",children:[x.jsx("input",{ref:d,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:f=>{var h;f.key==="Enter"&&s((h=d.current)==null?void 0:h.value)}}),i!==void 0&&x.jsx("button",{type:"button",onClick:()=>{d.current&&(d.current.value=i)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),x.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&x.jsx("button",{onClick:u,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),x.jsx("button",{onClick:()=>{var h;const f=e==="prompt"?(h=d.current)==null?void 0:h.value:void 0;s(f)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function Zg(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((u,d,f)=>{t({type:"alert",title:u,message:d,onConfirm:()=>{t(null),f==null||f()}})},[]),i=y.useCallback((u,d,f,h)=>{t({type:"confirm",title:u,message:d,onConfirm:()=>{t(null),f()},onCancel:()=>{t(null),h==null||h()}})},[]),o=y.useCallback((u,d,f,h,m,v)=>{t({type:"prompt",title:u,message:d,defaultValue:f,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),h(b)},onCancel:()=>{t(null),m==null||m()}})},[]),s=e?x.jsx(S3,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:s}}let Sd=!1;const E3=()=>Sd;function P3(){const e=bu();y.useEffect(()=>{const t=new EventSource("/api/events");return t.onopen=()=>{Sd=!0},t.onerror=()=>{Sd=!1},t.addEventListener("invalidate",r=>{var n;try{const i=((n=JSON.parse(r.data))==null?void 0:n.keys)??[];for(const o of i)e.invalidateQueries({queryKey:[o]})}catch{}}),()=>{Sd=!1,t.close()}},[e])}const De={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],ideen:["ideen"],chronik:["chronik"],governor:["governor"],eigenleben:["eigenleben"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},Ht={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},Su=e=>()=>E3()?e*5:e,A3=(e=Ht.schnell)=>Ge({queryKey:De.auftragsbuch,queryFn:()=>Ie("/api/auftragsbuch"),refetchInterval:Su(e)}),O3=(e=Ht.gemuetlich)=>Ge({queryKey:De.ideen,queryFn:()=>Ie("/api/ideen"),refetchInterval:Su(e)}),XQ=(e,t=!1)=>Ge({queryKey:["ideen-log",e],queryFn:()=>Ie(`/api/ideen/${e}/log`),enabled:t,refetchInterval:4e3,staleTime:0}),C3=(e=150,t=Ht.gemuetlich)=>Ge({queryKey:[...De.chronik,e],queryFn:()=>Ie(`/api/chronik?limit=${e}`),refetchInterval:Su(t),select:r=>r.items??[]}),ZQ=()=>Ge({queryKey:De.wissen,queryFn:()=>Ie("/api/wissen")}),JQ=(e=Ht.traege)=>Ge({queryKey:De.eigenleben,queryFn:()=>Ie("/api/eigenleben"),refetchInterval:e}),j3=(e=Ht.traege,t=!0)=>Ge({queryKey:De.zeitmaschine,queryFn:()=>Ie("/api/zeitmaschine"),refetchInterval:e,enabled:t}),_3=(e=Ht.traege)=>Ge({queryKey:De.reminders,queryFn:()=>Ie("/api/reminders"),refetchInterval:Su(e),select:t=>t.items??[]}),N3=(e=12,t=Ht.schnell)=>Ge({queryKey:De.voiceTrace,queryFn:()=>Ie(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),I3=(e=Ht.normal)=>Ge({queryKey:De.governor,queryFn:()=>Ie("/api/governor"),refetchInterval:e,retry:!1}),eX=(e=!0)=>Ge({queryKey:De.memoryGraph,queryFn:()=>Ie("/api/memory/graph"),enabled:e}),$A=()=>Ge({queryKey:De.health,queryFn:()=>Ie("/api/health"),refetchInterval:Ht.normal}),zf=(e=Ht.graph)=>Ge({queryKey:De.systemStatus,queryFn:()=>Ie("/api/system/status"),refetchInterval:e}),LA=(e,t=!0)=>Ge({queryKey:["metrics-history",e],queryFn:()=>Ie(`/api/system/history?minutes=${e}`),enabled:t,refetchInterval:6e4}),Jg=(e=Ht.normal)=>Ge({queryKey:De.services,queryFn:()=>Ie("/api/system/services"),refetchInterval:e}),zA=(e=Ht.schnell)=>Ge({queryKey:De.models,queryFn:()=>Ie("/api/models"),refetchInterval:Su(e)}),tX=(e=Ht.normal)=>Ge({queryKey:De.groups,queryFn:()=>Ie("/api/groups"),refetchInterval:e}),rX=()=>Ge({queryKey:De.routingPolicy,queryFn:()=>Ie("/api/routing/policy")}),M3=(e=3e3,t=!0)=>Ge({queryKey:De.jobs,queryFn:()=>Ie("/api/jobs"),refetchInterval:e,enabled:t,select:r=>r.jobs??[]}),FA=(e=Ht.graph)=>Ge({queryKey:De.tokenStats,queryFn:()=>Ie("/api/system/token-stats"),refetchInterval:e}),T3=(e=Ht.normal)=>Ge({queryKey:De.agentStatus,queryFn:()=>Ie("/api/agent/status"),refetchInterval:e}),nX=(e=Ht.traege)=>Ge({queryKey:De.hermesBrain,queryFn:()=>Ie("/api/agent/brain"),refetchInterval:e}),BA=(e=Ht.traege)=>Ge({queryKey:De.updates,queryFn:()=>Ie("/api/maintenance/updates"),refetchInterval:e}),iX=()=>Ge({queryKey:De.discover,queryFn:()=>Ie("/api/discover")}),aX=e=>Ge({queryKey:De.drafts(e),queryFn:()=>Ie(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),oX=e=>Ge({queryKey:De.connect(e),queryFn:()=>Ie(e?`/api/connect?${e}`:"/api/connect")}),D3=()=>Ge({queryKey:De.connectHealth,queryFn:()=>Ie("/api/connect/health"),refetchInterval:15e3}),R3=e=>Ge({queryKey:De.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),Ie(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function Os(e,...t){for(const r of t)e.invalidateQueries({queryKey:r})}function Io(e){return(e/1024**3).toFixed(1)}function Dm(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function lX(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function sX(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function uX(e){return e?`${Math.round(e/1024)}k`:"—"}function cX(e){return e?new Date(e*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Cs({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:s,onAction:u}){return x.jsxs("div",{className:Re("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[x.jsx(e,{className:Re("h-4 w-4 shrink-0",t)}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-xs text-foreground truncate",children:r}),x.jsx("div",{className:Re("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),x.jsx("button",{onClick:u,disabled:!i||o,className:Re("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":s})]})}function $3({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return x.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[x.jsx("span",{className:Re("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),x.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&x.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),x.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:x.jsx(qo,{className:Re("h-3.5 w-3.5",n&&"animate-spin")})}),x.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:x.jsx(dT,{className:"h-3.5 w-3.5"})})]})}const L3=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,z3=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function F3(e){return L3.test(e)?"error":z3.test(e)?"warn":"info"}const B3={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function U3({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[s,u]=y.useState(!1),[d,f]=y.useState(""),h=y.useRef(null),m=y.useMemo(()=>t?t.split(` `).map(E=>({t:E,level:F3(E)})):[],[t]),v=y.useMemo(()=>m.filter(E=>E.level!=="info").length,[m]),b=d.trim().toLowerCase(),S=m.filter(E=>(!s||E.level!=="info")&&(!b||E.t.toLowerCase().includes(b))),k=n==="password_required"||n==="incorrect_password";return x.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[x.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[x.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[x.jsx(_T,{className:"h-3 w-3 text-primary"}),x.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsxs("div",{className:"relative",children:[x.jsx(AT,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),x.jsx("input",{value:d,onChange:E=>f(E.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),x.jsxs("button",{onClick:()=>u(E=>!E),title:"Nur Fehler und Warnungen zeigen",className:Re("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",s?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[x.jsx(Ys,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),x.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:x.jsx(qo,{className:Re("h-3 w-3",r&&"animate-spin")})})]})]}),x.jsx("div",{ref:h,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:k?x.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[x.jsx(Ys,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),x.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),x.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),x.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?x.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):m.length===0?x.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):S.length===0?x.jsx("span",{className:"text-muted-foreground",children:s?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):S.map((E,P)=>x.jsx("div",{className:Re("whitespace-pre-wrap",B3[E.level]),children:E.t||" "},P))})]})}function W3({open:e,showAlert:t}){const[r,n]=y.useState(""),[i,o]=y.useState(""),[s,u]=y.useState(!1),[d,f]=y.useState(!1);return y.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),x.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[x.jsx(Vg,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),x.jsxs("div",{className:"relative",children:[x.jsx("input",{type:s?"text":"password",value:r,onChange:h=>n(h.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),x.jsx("button",{type:"button",onClick:()=>u(!s),"aria-label":s?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:s?x.jsx(K1,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(_v,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[x.jsx(gT,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),x.jsxs("div",{className:"relative",children:[x.jsx("input",{type:d?"text":"password",value:i,onChange:h=>o(h.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,placeholder:"hf_…",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),x.jsx("button",{type:"button",onClick:()=>f(!d),"aria-label":d?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:d?x.jsx(K1,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(_v,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),x.jsxs("div",{className:"flex gap-3 pt-2",children:[x.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),t("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),x.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})}function H3({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var d,f;const i=e.data,o={os:{icon:Vg,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:If,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:GP,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:_f,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],s=o.icon,u=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return x.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[x.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),x.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[x.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(s,{className:Re("h-4.5 w-4.5",o.cls)}),x.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),x.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:x.jsx(wu,{className:"h-4 w-4"})})]}),x.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?x.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[x.jsx(qo,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?x.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):x.jsxs(x.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&x.jsxs("div",{className:Re("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?x.jsx(Ys,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):x.jsx(oT,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:Re("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&x.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&x.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[x.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),x.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?x.jsxs(x.Fragment,{children:[((i==null?void 0:i.count)??0)===0?x.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),x.jsx("div",{className:"space-y-1",children:i.packages.map(h=>x.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[x.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[x.jsx(q1,{className:"h-3 w-3 text-cyan-400 shrink-0"}),h.name]}),x.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[x.jsx("span",{children:h.current}),x.jsx(H1,{className:"h-3 w-3"}),x.jsx("span",{className:"text-emerald-400",children:h.candidate})]})]},h.name))})]}),(((d=i==null?void 0:i.held_back)==null?void 0:d.length)??0)>0&&x.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[x.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[x.jsx(lT,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),x.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),x.jsx("div",{className:"space-y-1",children:i.held_back.map(h=>x.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[x.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[x.jsx(q1,{className:"h-3 w-3 text-muted-foreground shrink-0"}),h.name]}),x.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:h.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},h.name))})]})]}):e.kind==="engine"||e.kind==="swap"?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[x.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),x.jsx(H1,{className:"h-3.5 w-3.5 text-muted-foreground"}),x.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&x.jsxs("div",{className:"text-muted-foreground",children:["Release: ",x.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&x.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",x.jsx(cT,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&x.jsxs("details",{className:"group",children:[x.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),x.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:i.body})]})]}):(((f=i==null?void 0:i.commits)==null?void 0:f.length)??0)===0?x.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",x.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),x.jsx("div",{className:"space-y-1",children:i.commits.map(h=>x.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[x.jsx(hT,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"text-[11px] truncate",children:h.subject}),x.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[h.hash," · ",h.when]})]})]},h.hash))})]}),e.kind!=="os"&&!u&&x.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[x.jsx(OT,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),x.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),x.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[x.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),x.jsx("button",{onClick:n,disabled:e.loading||u||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function K3({open:e,onClose:t,defaultTab:r="maintenance"}){var lr,hi;const n=bu(),{showAlert:i,showConfirm:o,dialogElement:s}=Zg(),{data:u}=BA(),{data:d}=Jg(),f=M3(3e3,e).data??[],{data:h}=j3(void 0,e),[m,v]=y.useState("llama-swap"),[b,S]=y.useState(""),[k,E]=y.useState(!1),[P,j]=y.useState(null),[_,O]=y.useState({}),[N,C]=y.useState("maintenance"),[R,z]=y.useState(!1),[F,V]=y.useState(""),[Q,B]=y.useState(!1),[ue,G]=y.useState(!1),[le,fe]=y.useState(null),de=(d==null?void 0:d.services)??[],Y=()=>Os(n,De.jobs);function ae(q){return q?new Date(q*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}y.useEffect(()=>{e&&r&&C(r)},[e,r]),y.useEffect(()=>{e&&Os(n,De.updates,De.services,De.jobs,De.zeitmaschine)},[e]);function X(q){E(!0),j(null),Ie(`/api/maintenance/logs?service=${q}&lines=150`).then(Me=>{Me.ok?S(Me.text):(S(`Fehler beim Laden der Logs: ${Me.err||"Unbekannter Fehler"}`),(Me.status==="incorrect_password"||Me.status==="password_required")&&j(Me.status))}).catch(Me=>S(`Fehler: ${Me.message}`)).finally(()=>E(!1))}y.useEffect(()=>{!e||N!=="logs"||X(m)},[e,N,m]);function M(q){return(q==null?void 0:q.status)==="busy"?(i("Update läuft bereits",`Es läuft gerade „${q.running}". Bitte warte, bis es fertig ist.`),Y(),!0):!1}function T(q){return(q==null?void 0:q.status)==="password_required"||(q==null?void 0:q.status)==="incorrect_password"?(i("Box-Passwort nötig",(q.status==="incorrect_password"?"Das gespeicherte Box-Passwort stimmt nicht. ":"Für dieses Update braucht die Box dein Passwort. ")+"Bitte oben im Reiter „Einstellungen“ setzen bzw. korrigieren."),!0):q&&q.ok===!1?(i("Update fehlgeschlagen",q.err||"Unbekannter Fehler."),!0):!1}async function Z(q){const Me={os:"os-update",engine:"engine-update",swap:"swap-update"}[q];try{const Ze=await Ie(`/api/maintenance/${Me}`,{method:"POST"});if(M(Ze)||T(Ze))return;Y(),C("maintenance")}catch(Ze){i("Fehler",`Update konnte nicht starten: ${Ze.message}`)}}async function se(){G(!0);try{const q=await Ie("/api/maintenance/hermes-update",{method:"POST"});if(M(q))return;Y()}catch(q){i("Fehler",`Hermes-Update fehlgeschlagen: ${q.message}`)}finally{G(!1)}}async function te(q){fe({kind:q,loading:!0,data:null});try{const Me=await Ie(`/api/maintenance/update-details?kind=${q}`);fe({kind:q,loading:!1,data:Me})}catch(Me){fe({kind:q,loading:!1,data:{kind:q,error:Me.message}})}}function ce(){const q=le==null?void 0:le.kind;fe(null),q==="os"||q==="engine"||q==="swap"?Z(q):q==="hermes"&&se()}function ge(){var Me;const q=[u!=null&&u.engine?"Engine":null,u!=null&&u.swap?"Router":null,(Me=u==null?void 0:u.components)!=null&&Me.some(Ze=>Ze.update===!0)?"Hermes-Agent":null,u!=null&&u.os?`OS (${u.os} Pakete)`:null].filter(Boolean);o("Alle Updates einspielen?",`Nacheinander in einem Job: ${q.join(" → ")}. Jeder Schritt sichert und prüft sich selbst; schlägt einer fehl, stoppt der Rest. (OS braucht das Box-Passwort aus den Einstellungen — fehlt es, wird OS übersprungen.)`,async()=>{try{const Ze=await Ie("/api/maintenance/update-all",{method:"POST"});if(M(Ze)||T(Ze))return;if((Ze==null?void 0:Ze.status)==="nothing"){i("Nichts zu tun","Es stehen keine Updates aus.");return}Y(),C("maintenance")}catch(Ze){i("Fehler",`„Alle aktualisieren" konnte nicht starten: ${Ze.message}`)}})}async function _e(){z(!0);try{await Ie("/api/maintenance/check-updates",{method:"POST"}),Os(n,De.jobs,De.updates),C("maintenance")}catch(q){i("Fehler",`Fehler bei der Update-Suche: ${q.message}`)}finally{z(!1)}}async function J(q,Me){try{await Ie("/api/models/install",{method:"POST",body:JSON.stringify({repo:q,role:Me})}),i("Gestartet",`Modell-Upgrade für '${Me}' (${q}) gestartet.`),Y(),C("maintenance")}catch(Ze){i("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Ze.message}`)}}async function we(){o("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Ie("/api/maintenance/reboot",{method:"POST"}),i("Reboot","Reboot ausgelöst. System startet neu...",()=>t())}catch(q){i("Fehler",`Fehler beim Reboot: ${q.message}`)}})}async function Ae(){B(!0),V("Snapshot wird erzeugt...");try{const q=await Ie("/api/system/backup",{method:"POST"});V(q.ok?`Snapshot erzeugt: ${q.snapshot} (${q.files.length} Komponenten)`:"Backup fehlgeschlagen."),Os(n,De.zeitmaschine)}catch(q){V(`Fehler: ${q.message}`)}finally{B(!1)}}async function ne(q){O(Me=>({...Me,[q]:!0}));try{const Me=await Ie("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:q})});Me.ok?(i("Dienst neu gestartet",`Dienst ${q} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&m===q&&X(q)}),Os(n,De.services,De.health,De.models)):i("Fehler",`Fehler beim Neustart: ${Me.err||"Unbekannter Fehler"}`)}catch(Me){i("Fehler",`Fehler beim Neustart: ${Me.message}`)}finally{O(Me=>({...Me,[q]:!1}))}}async function lt(q){try{await Ie(`/api/jobs/${q}/cancel`,{method:"POST"}),Y()}catch(Me){i("Fehler",`Fehler beim Abbrechen: ${Me.message}`)}}const $e=f.find(q=>(q.state==="running"||q.state==="queued")&&q.group==="maintenance"),Pe=(u?(u.os>0?1:0)+(u.engine?1:0)+(u.swap?1:0):0)+(((lr=u==null?void 0:u.components)==null?void 0:lr.filter(q=>q.update===!0).length)??0),vt=(h==null?void 0:h.backups)??[];return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:Re("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),x.jsxs("div",{className:Re("fixed inset-y-0 right-0 w-full sm:w-[640px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[x.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(qP,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),x.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:x.jsx(wu,{className:"h-4 w-4"})})]}),x.jsx("div",{className:"flex border-b border-border/40 px-6",children:["maintenance","logs","settings"].map(q=>x.jsx("button",{onClick:()=>C(q),className:Re("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N===q?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:q==="maintenance"?"System-Wartung":q==="logs"?"System-Logs":"Einstellungen"},q))}),x.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"space-y-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),x.jsxs("div",{className:"flex items-center gap-3",children:[Pe>0&&x.jsxs("button",{onClick:ge,disabled:!!$e,className:"flex items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-2 py-1 text-[10px] font-bold text-primary transition-colors hover:bg-primary/20 disabled:opacity-50",children:[x.jsx(sT,{className:"h-3 w-3"})," Alle aktualisieren (",Pe,")"]}),x.jsxs("button",{onClick:_e,disabled:R||!!$e,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[x.jsx(qo,{className:Re("h-3 w-3",R&&"animate-spin")})," Nach Updates suchen"]})]})]}),(u==null?void 0:u.last_check)&&x.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",ae(u.last_check)]}),$e&&x.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[x.jsx(qo,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),x.jsxs("span",{children:["Update läuft: ",x.jsx("span",{className:"font-semibold",children:$e.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx(Cs,{icon:Vg,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(u!=null&&u.os),status:u!=null&&u.os?`${u.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>te("os")}),x.jsx(Cs,{icon:If,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(u!=null&&u.engine),status:u!=null&&u.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>te("engine")}),x.jsx(Cs,{icon:GP,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(u!=null&&u.swap),status:u!=null&&u.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>te("swap")}),(()=>{var Me;const q=(Me=u==null?void 0:u.components)==null?void 0:Me.find(Ze=>Ze.key==="hermes_agent");return x.jsx(Cs,{icon:_f,iconClass:"text-amber-400",name:"Hermes-Agent",available:(q==null?void 0:q.update)===!0,busy:ue,status:(q==null?void 0:q.update)===!0?`Update: ${q.latest}`:(q==null?void 0:q.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>te("hermes")})})(),(hi=u==null?void 0:u.model_list)==null?void 0:hi.map(q=>x.jsx(Cs,{icon:rT,iconClass:"text-emerald-400",name:`Modell · ${q.role}`,available:!0,status:q.title,actionLabel:"Upgrade",onAction:()=>J(q.repo,q.role)},q.role))]})]}),x.jsxs("div",{className:"space-y-2.5",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),x.jsxs("div",{className:"space-y-1.5",children:[de.length===0&&x.jsx("div",{className:"rounded-lg border border-dashed border-border/50 p-4 text-center text-xs text-muted-foreground",children:"Dienste-Liste wird geladen …"}),de.map(q=>x.jsx($3,{label:q.name,system:q.scope==="system",ok:q.ok,busy:_[q.unit],onRestart:()=>ne(q.unit),onLogs:()=>{v(q.unit),C("logs")}},q.unit))]})]}),x.jsxs("div",{className:"space-y-2.5",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),x.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-xs text-foreground truncate",children:vt[0]?`Letztes: ${vt[0].snapshot}`:"Noch kein Backup"}),x.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[vt.length," Snapshots · Wiederherstellen: Chronik → Zeitmaschine"]})]}),x.jsxs("button",{onClick:Ae,disabled:Q,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[x.jsx(nT,{className:Re("h-3.5 w-3.5",Q&&"animate-pulse")})," Snapshot"]})]}),F&&x.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:F})]}),x.jsxs("div",{className:"space-y-2.5",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),x.jsxs("button",{onClick:we,className:"flex w-full items-center gap-3 p-3 rounded-lg border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[x.jsx(ET,{className:"h-4.5 w-4.5"}),x.jsxs("div",{children:[x.jsx("div",{children:"Host-System neu starten"}),x.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),x.jsxs("div",{className:"space-y-3",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),x.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter(q=>q.state==="running"||q.state==="queued").length," Aktiv"]})]}),x.jsx("div",{className:"space-y-3",children:f.length===0?x.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):f.map(q=>{const Me=q.state==="running"||q.state==="queued";return x.jsxs("div",{className:Re("p-3 rounded-xl border transition-all duration-300",Me?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[x.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x.jsxs("div",{className:"space-y-1",children:[x.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Me&&x.jsxs("span",{className:"flex h-2 w-2 relative",children:[x.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),x.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),q.label]}),x.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[x.jsxs("span",{children:["ID: ",q.id]}),x.jsx("span",{children:"•"}),x.jsx("span",{className:Re(q.state==="done"&&"text-emerald-400",q.state==="failed"&&"text-red-400",q.state==="running"&&"text-primary",q.state==="queued"&&"text-amber-400",q.state==="canceled"&&"text-muted-foreground"),children:q.state})]})]}),Me&&x.jsx("button",{onClick:()=>lt(q.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),q.state==="running"&&x.jsxs("div",{className:"mt-3 space-y-1",children:[x.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:x.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${q.progress??0}%`}})}),x.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[x.jsxs("span",{children:[q.progress??0,"%"]}),q.done_bytes!=null&&q.total_bytes!=null&&x.jsxs("span",{children:[Dm(q.done_bytes)," / ",Dm(q.total_bytes),q.rate_bps!=null&&` (${Dm(q.rate_bps)}/s)`]}),q.eta_s!=null&&x.jsxs("span",{children:["ETA: ",q.eta_s,"s"]})]})]})]},q.id)})})]})]}),N==="logs"&&x.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("select",{value:m,onChange:q=>v(q.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:de.map(q=>x.jsxs("option",{value:q.unit,children:[q.name," (",q.scope==="system"?"systemd-root":"user",")"]},q.unit))}),x.jsxs("button",{onClick:()=>ne(m),disabled:_[m],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[x.jsx(qo,{className:Re("h-3.5 w-3.5",_[m]&&"animate-spin")}),"Restart"]})]}),x.jsx(U3,{service:m,text:b,loading:k,logStatus:P,onRefresh:()=>X(m),onOpenSettings:()=>C("settings")})]}),N==="settings"&&x.jsx(W3,{open:e,showAlert:i})]})]}),le&&x.jsx(H3,{detail:le,maintenanceJob:$e,onClose:()=>fe(null),onApply:ce}),s]})}let $v=[],Lv=[];const zv=new Set,UA=()=>zv.forEach(e=>e());function WA(e){return zv.add(e),()=>{zv.delete(e)}}function V3(e){$v=[...$v,e].slice(-40),UA()}function q3(e){Lv=[...Lv,e].slice(-40),UA()}const G3=()=>y.useSyncExternalStore(WA,()=>$v),Y3=()=>y.useSyncExternalStore(WA,()=>Lv);function Q3(){const{data:e,dataUpdatedAt:t}=zf(),{data:r,dataUpdatedAt:n}=FA(),i=y.useRef(null);y.useEffect(()=>{var o,s,u,d;e&&V3({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((s=e.ram)==null?void 0:s.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((d=e.disk)==null?void 0:d.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),s=r.prompt_tokens,u=r.completion_tokens;if(i.current){const d=Math.max((o-i.current.t)/1e3,.001);q3({t:o,prompt:Math.max(0,(s-i.current.p)/d),completion:Math.max(0,(u-i.current.c)/d)})}i.current={p:s,c:u,t:o}},[n])}function X3(){var z,F,V,Q,B,ue;const{data:e,isError:t}=$A(),{data:r,isError:n}=Jg(),{data:i}=zA(),{data:o}=zf(),s=t||n,u=!!e&&!!r,d=G=>{var le;return(le=r==null?void 0:r.services.find(fe=>fe.unit===G))==null?void 0:le.ok},f=G=>!!(r!=null&&r.services.some(le=>le.unit===G)),h=e==null?void 0:e.engine_reachable,m=(z=e==null?void 0:e.brain)==null?void 0:z.ready,v=((F=e==null?void 0:e.brain)==null?void 0:F.model)||((V=i==null?void 0:i.models.find(G=>G.role==="hermes"))==null?void 0:V.name)||"",b=[];s&&b.push({id:"mc2",label:"Steuerpult (MC2)",icon:If,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),b.push((()=>{const G={id:"brain",label:"Lucys Hirn",icon:Wg,critical:!0};return u?h===!1?{...G,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:m===!1?{...G,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:v?{kind:"loadModel",model:v,label:"Hirn aufwecken"}:void 0}:{...G,status:"ok",detail:"Wach und ansprechbar."}:{...G,status:"loading",detail:"Wird geprüft …"}})()),b.push((()=>{const G={id:"vision",label:"Lucys Augen",icon:_v,critical:!1};if(!u||!i)return{...G,status:"loading",detail:"Wird geprüft …"};const le=i.models.find(de=>de.role==="vision");return le?(i.running??[]).includes(le.name)?{...G,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...G,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:le.name,label:"Augen wecken"}}:{...G,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),b.push((()=>{const G={id:"memory",label:"Lucys Gedächtnis",icon:tT,critical:!0},le=d("mem0-service");return!u||le===void 0?{...G,status:"loading",detail:"Wird geprüft …"}:le?{...G,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...G,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),b.push((()=>{const G={id:"gateway",label:"Verbindung (Gateway)",icon:Kg,critical:!0},le=e?e.gateway_reachable:d("mc2-gateway");if(!u||le===void 0)return{...G,status:"loading",detail:"Wird geprüft …"};const fe=f("mc2-gateway")?"mc2-gateway":"mission-control-2";return le?{...G,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...G,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:fe,label:"Gateway neu starten"}}})()),b.push((()=>{const G={id:"steward",label:"Wächter (Steward)",icon:Mf,critical:!1};return u?f("mc2-steward")?d("mc2-steward")?{...G,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...G,status:"warn",detail:"Der Wächter schläft — niemand meldet gerade Ausfälle oder wärmt Modelle nach.",repair:{kind:"restart",service:"mc2-steward",label:"Wächter neu starten"}}:{...G,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...G,status:"loading",detail:"Wird geprüft …"}})()),b.push((()=>{const G={id:"agent",label:"Lucys Agent (Hermes)",icon:_f,critical:!0},le=d("hermes-gateway");return!u||le===void 0?{...G,status:"loading",detail:"Wird geprüft …"}:le?{...G,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...G,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),b.push((()=>{const G={id:"voice",label:"Lucys Stimme",icon:kT,critical:!1},le=d("voice-service");return!u||le===void 0?{...G,status:"loading",detail:"Wird geprüft …"}:le?{...G,status:"ok",detail:"Lucy kann hören und sprechen."}:{...G,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const S=((Q=o==null?void 0:o.ram)==null?void 0:Q.total)??0,k=((B=o==null?void 0:o.ram)==null?void 0:B.used)??0,E=((ue=o==null?void 0:o.ram)==null?void 0:ue.percent)??(S>0?Math.min(100,k/S*100):0),P=1024**3,j=S?E>=93?{status:"full",usedGb:k/P,totalGb:S/P,pct:E,text:"Speicher fast voll — Lucy könnte langsamer werden."}:E>=85?{status:"warn",usedGb:k/P,totalGb:S/P,pct:E,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:k/P,totalGb:S/P,pct:E,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},_=b.some(G=>G.status==="loading"),O=b.filter(G=>G.critical&&G.status==="down"),N=b.filter(G=>G.status==="warn"||!G.critical&&G.status==="down"),C=j.status==="full";return{verdict:_&&!O.length?"loading":O.length?"problem":N.length||C?"warn":"gut",checks:b,memory:j,problems:O,warns:N,unreachable:s}}const Z3={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},J3={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function Mo({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:s}){return x.jsxs("button",{onClick:s,className:Re("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",J3[i]),children:[x.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[x.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:x.jsx(e,{className:"h-5 w-5"})}),x.jsx("span",{className:Re("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",Z3[i]),title:o})]}),x.jsxs("div",{className:"flex items-baseline gap-1.5",children:[x.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&x.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),x.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[x.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),x.jsx(Vo,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&x.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function e5(){var s;const{data:e=[]}=C3(),[t,r]=y.useState(!1),n=e.find(u=>u.source==="chef-gutachter");if(!n)return null;const i=new Date(n.ts*1e3).toLocaleString("de-DE",{weekday:"long",day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}),o=(s=n.text.split(` `).find(u=>u.trim().startsWith("VERDIKT:")))==null?void 0:s.replace(/^\s*VERDIKT:\s*/,"");return x.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.05] p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[x.jsxs("button",{onClick:()=>r(u=>!u),className:"flex w-full items-center gap-3 text-left cursor-pointer",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-violet-500/30 bg-background/30 text-violet-300",children:x.jsx(ST,{className:"h-4.5 w-4.5"})}),x.jsxs("span",{className:"min-w-0 flex-1",children:[x.jsx("span",{className:"block text-sm font-bold text-foreground",children:"Morgenlage"}),x.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o||n.subject||"Nächtliches Gutachten über die autonome Arbeit"})]}),x.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:i}),t?x.jsx(iT,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):x.jsx(Vo,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),t&&x.jsxs("div",{className:"mt-3 border-t border-violet-500/15 pt-3",children:[n.subject&&x.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n.subject}),x.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:n.text})]})]})}const vw={"":"einmalig",daily:"täglich",weekdays:"werktags",weekly:"wöchentlich"};function t5(){const{data:e=[],isLoading:t}=_3(),r=bu(),{showAlert:n,showConfirm:i,dialogElement:o}=Zg(),[s,u]=y.useState(!1),[d,f]=y.useState(""),[h,m]=y.useState(""),[v,b]=y.useState(""),[S,k]=y.useState(!1),E=()=>r.invalidateQueries({queryKey:De.reminders});async function P(){if(!(!d.trim()||!h)){k(!0);try{await Ie("/api/reminders",{method:"POST",body:JSON.stringify({text:d,when:h,repeat:v})}),f(""),m(""),b(""),u(!1),E()}catch(O){n("Anlegen fehlgeschlagen",String((O==null?void 0:O.message)||O))}finally{k(!1)}}}function j(O,N){i("Erinnerung löschen?",`„${N}" wird entfernt.`,async()=>{try{await Ie(`/api/reminders/${O}`,{method:"DELETE"}),E()}catch(C){n("Fehler",String((C==null?void 0:C.message)||C))}})}const _=[...e].sort((O,N)=>O.next_ts-N.next_ts);return x.jsxs("div",{className:"mc-card p-4",children:[x.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[x.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[x.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-amber-300",children:x.jsx(eT,{className:"h-4 w-4"})}),"Anstehendes"]}),x.jsxs("button",{onClick:()=>u(O=>!O),className:"flex h-8 items-center gap-1 rounded-lg border border-border/60 bg-background/30 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[s?x.jsx(wu,{className:"h-3.5 w-3.5"}):x.jsx(G1,{className:"h-3.5 w-3.5"})," ",s?"Abbrechen":"Neu"]})]}),s&&x.jsxs("div",{className:"mb-3 space-y-2 rounded-xl border border-border/50 bg-background/30 p-3",children:[x.jsx("input",{value:d,onChange:O=>f(O.target.value),placeholder:"Woran soll Lucy erinnern?","aria-label":"Erinnerungstext",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 px-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),x.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[x.jsx("input",{type:"datetime-local",value:h,onChange:O=>m(O.target.value),"aria-label":"Zeitpunkt",className:"h-9 rounded-lg border border-border/60 bg-card/45 px-2 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50 [color-scheme:dark]"}),x.jsx("select",{value:v,onChange:O=>b(O.target.value),"aria-label":"Wiederholung",className:"h-9 cursor-pointer rounded-lg border border-border/60 bg-card/45 px-2 text-xs font-semibold text-foreground outline-none",children:Object.entries(vw).map(([O,N])=>x.jsx("option",{value:O,className:"bg-popover",children:N},O))}),x.jsxs("button",{onClick:P,disabled:S||!d.trim()||!h,className:"ml-auto flex h-9 items-center gap-1.5 rounded-lg bg-primary px-3 text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50",children:[S?x.jsx(Nf,{className:"h-3.5 w-3.5 animate-spin"}):x.jsx(G1,{className:"h-3.5 w-3.5"})," Anlegen"]})]})]}),t?x.jsx("p",{className:"text-xs text-muted-foreground",children:"Wird geladen …"}):_.length===0?x.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Erinnerungen. Lucy sagt dir hier (und per Stimme) Bescheid, wenn etwas ansteht."}):x.jsxs("div",{className:"space-y-1.5",children:[_.slice(0,6).map(O=>{const N=O.next_ts*1e3j(O.id,O.text),"aria-label":"Erinnerung löschen",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-red-500/5 hover:text-red-400 group-hover:opacity-100 cursor-pointer",children:x.jsx(NT,{className:"h-3.5 w-3.5"})})]},O.id)}),_.length>6&&x.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["+",_.length-6," weitere"]})]}),o]})}function r5(){const{data:e,error:t}=zf(),r=G3();return{sys:e,hist:r,error:t}}var n5=["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 ey(e){if(typeof e!="string")return!1;var t=n5;return t.includes(e)}var i5=["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"],a5=new Set(i5);function HA(e){return typeof e!="string"?!1:a5.has(e)}function KA(e){return typeof e=="string"&&e.startsWith("data-")}function ln(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(HA(r)||KA(r))&&(t[r]=e[r]);return t}function Ff(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return ln(t)}return typeof e=="object"&&!Array.isArray(e)?ln(e):null}function Br(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(HA(r)||KA(r)||ey(r))&&(t[r]=e[r]);return t}function o5(e){return e==null?null:y.isValidElement(e)?Br(e.props):typeof e=="object"&&!Array.isArray(e)?Br(e):null}var l5=["children","width","height","viewBox","className","style","title","desc"];function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,o=e.viewBox,s=e.className,u=e.style,d=e.title,f=e.desc,h=s5(e,l5),m=o||{width:n,height:i,x:0,y:0},v=Xe("recharts-surface",s);return y.createElement("svg",Fv({},Br(h),{className:v,width:n,height:i,style:u,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),y.createElement("title",null,d),y.createElement("desc",null,f),r)}),c5=["children","className"];function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=d5(e,c5),o=Xe("recharts-layer",n);return y.createElement("g",Bv({className:o},Br(i),{ref:t}),r)}),h5=y.createContext(null);function ft(e){return function(){return e}}const Uv=Math.PI,Wv=2*Uv,wa=1e-6,p5=Wv-wa;function qA(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qA;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;iwa)if(!(Math.abs(m*d-f*h)>wa)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-s,S=i-u,k=d*d+f*f,E=b*b+S*S,P=Math.sqrt(k),j=Math.sqrt(v),_=o*Math.tan((Uv-Math.acos((k+v-E)/(2*P*j)))/2),O=_/j,N=_/P;Math.abs(O-1)>wa&&this._append`L${t+O*h},${r+O*m}`,this._append`A${o},${o},0,0,${+(m*b>h*S)},${this._x1=t+N*d},${this._y1=r+N*f}`}}arc(t,r,n,i,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),d=n*Math.sin(i),f=t+u,h=r+d,m=1^s,v=s?i-o:o-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>wa||Math.abs(this._y1-h)>wa)&&this._append`L${f},${h}`,n&&(v<0&&(v=v%Wv+Wv),v>p5?this._append`A${n},${n},0,1,${m},${t-u},${r-d}A${n},${n},0,1,${m},${this._x1=f},${this._y1=h}`:v>wa&&this._append`A${n},${n},0,${+(v>=Uv)},${m},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function GA(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new v5(t)}function ty(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YA(e){this._context=e}YA.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 Bf(e){return new YA(e)}function QA(e){return e[0]}function XA(e){return e[1]}function ZA(e,t){var r=ft(!0),n=null,i=Bf,o=null,s=GA(u);e=typeof e=="function"?e:e===void 0?QA:ft(e),t=typeof t=="function"?t:t===void 0?XA:ft(t);function u(d){var f,h=(d=ty(d)).length,m,v=!1,b;for(n==null&&(o=i(b=s())),f=0;f<=h;++f)!(f=b;--S)u.point(_[S],O[S]);u.lineEnd(),u.areaEnd()}P&&(_[v]=+e(E,v,m),O[v]=+t(E,v,m),u.point(n?+n(E,v,m):_[v],r?+r(E,v,m):O[v]))}if(j)return u=null,j+""||null}function h(){return ZA().defined(i).curve(s).context(o)}return f.x=function(m){return arguments.length?(e=typeof m=="function"?m:ft(+m),n=null,f):e},f.x0=function(m){return arguments.length?(e=typeof m=="function"?m:ft(+m),f):e},f.x1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:ft(+m),f):n},f.y=function(m){return arguments.length?(t=typeof m=="function"?m:ft(+m),r=null,f):t},f.y0=function(m){return arguments.length?(t=typeof m=="function"?m:ft(+m),f):t},f.y1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:ft(+m),f):r},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(r)},f.lineX1=function(){return h().x(n).y(t)},f.defined=function(m){return arguments.length?(i=typeof m=="function"?m:ft(!!m),f):i},f.curve=function(m){return arguments.length?(s=m,o!=null&&(u=s(o)),f):s},f.context=function(m){return arguments.length?(m==null?o=u=null:u=s(o=m),f):o},f}class JA{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function g5(e){return new JA(e,!0)}function y5(e){return new JA(e,!1)}function Md(){}function Td(e,t,r){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+r)/6)}function e2(e){this._context=e}e2.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:Td(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:Td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function x5(e){return new e2(e)}function t2(e){this._context=e}t2.prototype={areaStart:Md,areaEnd:Md,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:Td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function b5(e){return new t2(e)}function r2(e){this._context=e}r2.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w5(e){return new r2(e)}function n2(e){this._context=e}n2.prototype={areaStart:Md,areaEnd:Md,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 k5(e){return new n2(e)}function gw(e){return e<0?-1:1}function yw(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),u=(o*i+s*n)/(n+i);return(gw(o)+gw(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(u))||0}function xw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Rm(e,t,r){var n=e._x0,i=e._y0,o=e._x1,s=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,s-u*r,o,s)}function Dd(e){this._context=e}Dd.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:Rm(this,this._t0,xw(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 r=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,Rm(this,xw(this,r=yw(this,e,t)),r);break;default:Rm(this,this._t0,r=yw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function i2(e){this._context=new a2(e)}(i2.prototype=Object.create(Dd.prototype)).point=function(e,t){Dd.prototype.point.call(this,t,e)};function a2(e){this._context=e}a2.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,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function S5(e){return new Dd(e)}function E5(e){return new i2(e)}function o2(e){this._context=e}o2.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=bw(e),i=bw(t),o=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function A5(e){return new Uf(e,.5)}function O5(e){return new Uf(e,0)}function C5(e){return new Uf(e,1)}function Ha(e,t){if((s=e.length)>1)for(var r=1,n,i,o=e[t[0]],s,u=o.length;r=0;)r[t]=t;return r}function j5(e,t){return e[t]}function _5(e){const t=[];return t.key=e,t}function N5(){var e=ft([]),t=Hv,r=Ha,n=j5;function i(o){var s=Array.from(e.apply(this,arguments),_5),u,d=s.length,f=-1,h;for(const m of o)for(u=0,++f;u0){for(var r,n,i=0,o=e[0].length,s;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,s;n1&&arguments[1]!==void 0?arguments[1]:R5,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Lt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[s-1];return typeof u=="string"?i+u+o:u!==void 0?i+Yi(u)+o:i+o},"")}var Lr=e=>e===0?0:e>0?1:-1,jn=e=>typeof e=="number"&&e!=+e,Ka=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,be=e=>(typeof e=="number"||e instanceof Number)&&!jn(e),_n=e=>be(e)||typeof e=="string",$5=0,Zs=e=>{var t=++$5;return"".concat(e||"").concat(t)},ta=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!be(t)&&typeof t!="string")return n;var o;if(Ka(t)){if(r==null)return n;var s=t.indexOf("%");o=r*parseFloat(t.slice(0,s))/100}else o=+t;return jn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},u2=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Ja(n,t))===r)}var Ut=e=>e===null||typeof e>"u",iy=e=>Ut(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function vr(e){return e!=null}function Al(){}var d2=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,ay=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{ey(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},L5=(e,t,r)=>n=>(e(t,r,n),null),z5=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];ey(i)&&typeof o=="function"&&(n||(n={}),n[i]=L5(o,t,r))}),n};function ww(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F5(e){for(var t=1;t(s[u]===void 0&&n[u]!==void 0&&(s[u]=n[u]),s),r);return o}function H5(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function oy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y5="[object RegExp]",h2="[object String]",p2="[object Number]",m2="[object Boolean]",v2="[object Arguments]",Q5="[object Symbol]",X5="[object Date]",Z5="[object Map]",J5="[object Set]",e4="[object Array]",t4="[object ArrayBuffer]",r4="[object Object]",n4="[object DataView]",i4="[object Uint8Array]",a4="[object Uint8ClampedArray]",o4="[object Uint16Array]",l4="[object Uint32Array]",s4="[object Int8Array]",u4="[object Int16Array]",c4="[object Int32Array]",d4="[object Float32Array]",f4="[object Float64Array]",kw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function h4(e){return typeof kw.Buffer<"u"&&kw.Buffer.isBuffer(e)}function p4(e,t){return Pa(e,void 0,e,new Map,t)}function Pa(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(Vv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const s=new Array(e.length);n.set(e,s);for(let u=0;u{}):qv(e,t,function n(i,o,s,u,d,f){const h=r(i,o,s,u,d,f);return h!==void 0?!!h:qv(i,o,n,f,!1)},new Map,!0)}function qv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return g4(e,t,r,n);case"function":return Object.keys(t).length>0?qv(e,{...t},r,n,i):Ed(e,t);default:return g2(e)&&i?typeof t=="string"?t==="":!0:Ed(e,t)}}function g4(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return x2(e,t,r,n);if(t instanceof Map)return y4(e,t,r,n);if(t instanceof Set)return x4(e,t,r,n);const i=Object.keys(t);if(e==null||Vv(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function b4(e){return e=v4(e),t=>b2(t,e)}function w4(e,t){return p4(e,(r,n,i,o)=>{if(typeof e=="object"){if(oy(e)==="[object Object]"&&typeof e.constructor!="function"){const s={};return o.set(e,s),tn(s,e,i,o),s}switch(Object.prototype.toString.call(e)){case p2:case h2:case m2:{const s=new e.constructor(e==null?void 0:e.valueOf());return tn(s,e),s}case v2:{const s={};return tn(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}function k4(e){return w4(e)}const S4=/^(?:0|[1-9]\d*)$/;function w2(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function k2(e){return e!=null&&typeof e!="function"&&C4(e.length)}function j4(e){return typeof e=="object"&&e!==null}function _4(e){return j4(e)&&k2(e)}function Sw(e,t=f2){return _4(e)?H5(Array.from(e),K5(O4(t),1)):[]}function N4(e,t,r){return t===!0?Sw(e,r):typeof t=="function"?Sw(e,t):e}var $m={exports:{}},Lm={},zm={exports:{}},Fm={};/** * @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 Ew;function I4(){if(Ew)return Fm;Ew=1;var e=El();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function u(m,v){var b=v(),S=n({inst:{value:b,getSnapshot:v}}),k=S[0].inst,E=S[1];return o(function(){k.value=b,k.getSnapshot=v,d(k)&&E({inst:k})},[m,b,v]),i(function(){return d(k)&&E({inst:k}),m(function(){d(k)&&E({inst:k})})},[m]),s(b),b}function d(m){var v=m.getSnapshot;m=m.value;try{var b=v();return!r(m,b)}catch{return!0}}function f(m,v){return v()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Fm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Fm}var Pw;function M4(){return Pw||(Pw=1,zm.exports=I4()),zm.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 Aw;function T4(){if(Aw)return Lm;Aw=1;var e=El(),t=M4();function r(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Lm.useSyncExternalStoreWithSelector=function(f,h,m,v,b){var S=o(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=u(function(){function P(C){if(!j){if(j=!0,_=C,C=v(C),b!==void 0&&k.hasValue){var R=k.value;if(b(R,C))return O=R}return O=C}if(R=O,n(_,C))return R;var z=v(C);return b!==void 0&&b(R,z)?(_=C,R):(_=C,O=z)}var j=!1,_,O,N=m===void 0?null:m;return[function(){return P(h())},N===null?void 0:function(){return P(N())}]},[h,m,v,b]);var E=i(f,S[0],S[1]);return s(function(){k.hasValue=!0,k.value=E},[E]),d(E),E},Lm}var Ow;function D4(){return Ow||(Ow=1,$m.exports=T4()),$m.exports}var R4=D4(),ly=y.createContext(null),$4=e=>e,xt=()=>{var e=y.useContext(ly);return e?e.store.dispatch:$4},Pd=()=>{},L4=()=>Pd,z4=(e,t)=>e===t;function Ee(e){var t=y.useContext(ly),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Pd,[t,e]);return R4.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:L4,t?t.store.getState:Pd,t?t.store.getState:Pd,r,z4)}function F4(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function B4(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Cw=e=>Array.isArray(e)?e:[e];function U4(e){const t=Array.isArray(e[0])?e[0]:e;return B4(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function W4(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?H4:WeakRef,S2=K4(),V4=0,jw=1;function ad(){return{s:V4,v:void 0,o:null,p:null}}function q4(e){return e instanceof S2?e.deref():e}function E2(e,t={}){let r=ad();const{resultEqualityCheck:n}=t;let i,o=0;function s(){let u=r;const{length:d}=arguments;for(let m=0,v=d;m{r=ad(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function G4(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,u,d={},f=i.pop();typeof f=="object"&&(d=f,f=i.pop()),F4(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...r,...d},{memoize:m,memoizeOptions:v=[],argsMemoize:b=E2,argsMemoizeOptions:S=[]}=h,k=Cw(v),E=Cw(S),P=U4(i),j=m(function(){return o++,f.apply(null,arguments)},...k),_=b(function(){s++;const N=W4(P,arguments);return u=j.apply(null,N),u},...E);return Object.assign(_,{resultFunc:f,memoizedResultFunc:j,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var H=G4(E2);function Y4(e,t=1){const r=[],n=Math.floor(t),i=(o,s)=>{for(let u=0;u{if(e!==t){const n=_w(e),i=_w(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function P2(e){return typeof e=="symbol"||e instanceof Symbol}const X4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z4=/^\w*$/;function J4(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||P2(e)?!0:typeof e=="string"&&(Z4.test(e)||!X4.test(e))||t!=null}function e$(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(u=>String(u));const i=(u,d)=>{let f=u;for(let h=0;hd==null||u==null?d:typeof u=="object"&&"key"in u?Object.hasOwn(d,u.key)?d[u.key]:i(d,u.path):typeof u=="function"?u(d):Array.isArray(u)?i(d,u):typeof d=="object"?d[u]:d,s=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||J4(u)?u:{key:u,path:ny(u)}));return e.map(u=>({original:u,criteria:s.map(d=>o(d,u))})).slice().sort((u,d)=>{for(let f=0;fu.original)}function Wf(e,...t){const r=t.length;return r>1&&Gv(e,t[0],t[1])?t=[]:r>2&&Gv(t[0],t[1],t[2])&&(t=[t[0]]),e$(e,Y4(t),["asc"])}var A2=e=>e.legend.settings,t$=e=>e.legend.size,r$=e=>e.legend.payload;H([r$,A2],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Wf(n,r):n});function n$(e,t){return l$(e)||o$(e,t)||a$(e,t)||i$()}function i$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a$(e,t){if(e){if(typeof e=="string")return Nw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nw(e,t):void 0}}function Nw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rod||Math.abs(e.left-t.left)>od||Math.abs(e.top-t.top)>od||Math.abs(e.width-t.width)>od}function Mw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function s$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=n$(t,2),n=r[0],i=r[1],o=y.useRef(null),s=y.useRef(n);s.current=n;var u=y.useCallback(d=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),d!=null){var f=Mw(d);if(Iw(f,s.current)&&i(f),typeof ResizeObserver<"u"){var h=new ResizeObserver(()=>{var m=Mw(d);Iw(m,s.current)&&i(m)});h.observe(d),o.current=h}}},[...e]);return y.useEffect(()=>()=>{var d;(d=o.current)===null||d===void 0||d.disconnect()},[]),[n,u]}function $t(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 u$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Tw=u$,Bm=()=>Math.random().toString(36).substring(7).split("").join("."),c$={INIT:`@@redux/INIT${Bm()}`,REPLACE:`@@redux/REPLACE${Bm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bm()}`},Rd=c$;function sy(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 O2(e,t,r){if(typeof e!="function")throw new Error($t(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error($t(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error($t(1));return r(O2)(e,t)}let n=e,i=t,o=new Map,s=o,u=0,d=!1;function f(){s===o&&(s=new Map,o.forEach((E,P)=>{s.set(P,E)}))}function h(){if(d)throw new Error($t(3));return i}function m(E){if(typeof E!="function")throw new Error($t(4));if(d)throw new Error($t(5));let P=!0;f();const j=u++;return s.set(j,E),function(){if(P){if(d)throw new Error($t(6));P=!1,f(),s.delete(j),o=null}}}function v(E){if(!sy(E))throw new Error($t(7));if(typeof E.type>"u")throw new Error($t(8));if(typeof E.type!="string")throw new Error($t(17));if(d)throw new Error($t(9));try{d=!0,i=n(i,E)}finally{d=!1}return(o=s).forEach(j=>{j()}),E}function b(E){if(typeof E!="function")throw new Error($t(10));n=E,v({type:Rd.REPLACE})}function S(){const E=m;return{subscribe(P){if(typeof P!="object"||P===null)throw new Error($t(11));function j(){const O=P;O.next&&O.next(h())}return j(),{unsubscribe:E(j)}},[Tw](){return this}}}return v({type:Rd.INIT}),{dispatch:v,subscribe:m,getState:h,replaceReducer:b,[Tw]:S}}function d$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Rd.INIT})>"u")throw new Error($t(12));if(typeof r(void 0,{type:Rd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function C2(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw u&&u.type,new Error($t(14));f[m]=S,d=d||S!==b}return d=d||n.length!==Object.keys(s).length,d?f:s}}function $d(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function f$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error($t(15))};const s={getState:i.getState,dispatch:(d,...f)=>o(d,...f)},u=e.map(d=>d(s));return o=$d(...u)(i.dispatch),{...i,dispatch:o}}}function j2(e){return sy(e)&&"type"in e&&typeof e.type=="string"}var _2=Symbol.for("immer-nothing"),Dw=Symbol.for("immer-draftable"),ar=Symbol.for("immer-state");function nn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object,ml=Ar.getPrototypeOf,Ld="constructor",Hf="prototype",Yv="configurable",zd="enumerable",Ad="writable",Js="value",ri=e=>!!e&&!!e[ar];function sn(e){var t;return e?N2(e)||Vf(e)||!!e[Dw]||!!((t=e[Ld])!=null&&t[Dw])||qf(e)||Gf(e):!1}var h$=Ar[Hf][Ld].toString(),Rw=new WeakMap;function N2(e){if(!e||!uy(e))return!1;const t=ml(e);if(t===null||t===Ar[Hf])return!0;const r=Ar.hasOwnProperty.call(t,Ld)&&t[Ld];if(r===Object)return!0;if(!Wo(r))return!1;let n=Rw.get(r);return n===void 0&&(n=Function.toString.call(r),Rw.set(r,n)),n===h$}function Kf(e,t,r=!0){Eu(e)===0?(r?Reflect.ownKeys(e):Ar.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Eu(e){const t=e[ar];return t?t.type_:Vf(e)?1:qf(e)?2:Gf(e)?3:0}var $w=(e,t,r=Eu(e))=>r===2?e.has(t):Ar[Hf].hasOwnProperty.call(e,t),Qv=(e,t,r=Eu(e))=>r===2?e.get(t):e[t],Fd=(e,t,r,n=Eu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function p$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Vf=Array.isArray,qf=e=>e instanceof Map,Gf=e=>e instanceof Set,uy=e=>typeof e=="object",Wo=e=>typeof e=="function",Um=e=>typeof e=="boolean";function m$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Vn=e=>e.copy_||e.base_,cy=e=>e.modified_?e.copy_:e.base_;function Xv(e,t){if(qf(e))return new Map(e);if(Gf(e))return new Set(e);if(Vf(e))return Array[Hf].slice.call(e);const r=N2(e);if(t===!0||t==="class_only"&&!r){const n=Ar.getOwnPropertyDescriptors(e);delete n[ar];let i=Reflect.ownKeys(n);for(let o=0;o1&&Ar.defineProperties(e,{set:ld,add:ld,clear:ld,delete:ld}),Ar.freeze(e),t&&Kf(e,(r,n)=>{dy(n,!0)},!1)),e}function v$(){nn(2)}var ld={[Js]:v$};function Yf(e){return e===null||!uy(e)?!0:Ar.isFrozen(e)}var Bd="MapSet",Zv="Patches",Lw="ArrayMethods",I2={};function Va(e){const t=I2[e];return t||nn(0,e),t}var zw=e=>!!I2[e],eu,M2=()=>eu,g$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:zw(Bd)?Va(Bd):void 0,arrayMethodsPlugin_:zw(Lw)?Va(Lw):void 0});function Fw(e,t){t&&(e.patchPlugin_=Va(Zv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jv(e){eg(e),e.drafts_.forEach(y$),e.drafts_=null}function eg(e){e===eu&&(eu=e.parent_)}var Bw=e=>eu=g$(eu,e);function y$(e){const t=e[ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Uw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[ar].modified_&&(Jv(t),nn(4)),sn(e)&&(e=Ww(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[ar].base_,e,t)}else e=Ww(t,r);return x$(t,e,!0),Jv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_2?e:void 0}function Ww(e,t){if(Yf(t))return t;const r=t[ar];if(!r)return Ud(t,e.handledSet_,e);if(!Qf(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);R2(r,e)}return r.copy_}function x$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dy(t,r)}function T2(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qf=(e,t)=>e.scope_===t,b$=[];function D2(e,t,r,n){const i=Vn(e),o=e.type_;if(n!==void 0&&Qv(i,n,o)===t){Fd(i,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Kf(i,(d,f)=>{if(ri(f)){const h=u.get(f)||[];h.push(d),u.set(f,h)}})}const s=e.draftLocations_.get(t)??b$;for(const u of s)Fd(i,u,r,o)}function w$(e,t,r){e.callbacks_.push(function(i){var u;const o=t;if(!o||!Qf(o,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(o);const s=cy(o);D2(e,o.draft_??o,s,r),R2(o,i)})}function R2(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}T2(e)}}function k$(e,t,r){const{scope_:n}=e;if(ri(r)){const i=r[ar];Qf(i,n)&&i.callbacks_.push(function(){Od(e);const s=cy(i);D2(e,r,s,t)})}else sn(r)&&e.callbacks_.push(function(){const o=Vn(e);e.type_===3?o.has(r)&&Ud(r,n.handledSet_,n):Qv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ud(Qv(e.copy_,t,e.type_),n.handledSet_,n)})}function Ud(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ri(e)||t.has(e)||!sn(e)||Yf(e)||(t.add(e),Kf(e,(n,i)=>{if(ri(i)){const o=i[ar];if(Qf(o,r)){const s=cy(o);Fd(e,n,s,e.type_),T2(o)}}else sn(i)&&Ud(i,t,r)})),e}function S$(e,t){const r=Vf(e),n={type_:r?1:0,scope_:t?t.scope_:M2(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=Wd;r&&(i=[n],o=tu);const{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,[u,n]}var Wd={get(e,t){if(t===ar)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Vn(e);if(!$w(i,t,e.type_))return E$(e,i,t);const o=i[t];if(e.finalized_||!sn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&m$(t))return o;if(o===Wm(e.base_,t)){Od(e);const s=e.type_===1?+t:t,u=rg(e.scope_,o,e,s);return e.copy_[s]=u}return o},has(e,t){return t in Vn(e)},ownKeys(e){return Reflect.ownKeys(Vn(e))},set(e,t,r){const n=$2(Vn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Wm(Vn(e),t),o=i==null?void 0:i[ar];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(p$(r,i)&&(r!==void 0||$w(e.base_,t,e.type_)))return!0;Od(e),tg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),k$(e,t,r)),!0},deleteProperty(e,t){return Od(e),Wm(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),tg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Vn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ad]:!0,[Yv]:e.type_!==1||t!=="length",[zd]:n[zd],[Js]:r[t]}},defineProperty(){nn(11)},getPrototypeOf(e){return ml(e.base_)},setPrototypeOf(){nn(12)}},tu={};for(let e in Wd){let t=Wd[e];tu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}tu.deleteProperty=function(e,t){return tu.set.call(this,e,t,void 0)};tu.set=function(e,t,r){return Wd.set.call(this,e[0],t,r,e[0])};function Wm(e,t){const r=e[ar];return(r?Vn(r):e)[t]}function E$(e,t,r){var i;const n=$2(t,r);return n?Js in n?n[Js]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function $2(e,t){if(!(t in e))return;let r=ml(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ml(r)}}function tg(e){e.modified_||(e.modified_=!0,e.parent_&&tg(e.parent_))}function Od(e){e.copy_||(e.assigned_=new Map,e.copy_=Xv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var P$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Wo(r)&&!Wo(n)){const s=n;n=r;const u=this;return function(f=s,...h){return u.produce(f,m=>n.call(this,m,...h))}}Wo(n)||nn(6),i!==void 0&&!Wo(i)&&nn(7);let o;if(sn(r)){const s=Bw(this),u=rg(s,r,void 0);let d=!0;try{o=n(u),d=!1}finally{d?Jv(s):eg(s)}return Fw(s,i),Uw(o,s)}else if(!r||!uy(r)){if(o=n(r),o===void 0&&(o=r),o===_2&&(o=void 0),this.autoFreeze_&&dy(o,!0),i){const s=[],u=[];Va(Zv).generateReplacementPatches_(r,o,{patches_:s,inversePatches_:u}),i(s,u)}return o}else nn(1,r)},this.produceWithPatches=(r,n)=>{if(Wo(r))return(u,...d)=>this.produceWithPatches(u,f=>r(f,...d));let i,o;return[this.produce(r,n,(u,d)=>{i=u,o=d}),i,o]},Um(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Um(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Um(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){sn(t)||nn(8),ri(t)&&(t=zr(t));const r=Bw(this),n=rg(r,t,void 0);return n[ar].isManual_=!0,eg(r),n}finishDraft(t,r){const n=t&&t[ar];(!n||!n.isManual_)&&nn(9);const{scope_:i}=n;return Fw(i,r),Uw(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=Va(Zv).applyPatches_;return ri(t)?i(t,r):this.produce(t,o=>i(o,r))}};function rg(e,t,r,n){const[i,o]=qf(t)?Va(Bd).proxyMap_(t,r):Gf(t)?Va(Bd).proxySet_(t,r):S$(t,r);return((r==null?void 0:r.scope_)??M2()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?w$(r,o,n):o.callbacks_.push(function(d){var h;(h=d.mapSetPlugin_)==null||h.fixSetContents(o);const{patchPlugin_:f}=d;o.modified_&&f&&f.generatePatches_(o,[],d)}),i}function zr(e){return ri(e)||nn(10,e),L2(e)}function L2(e){if(!sn(e)||Yf(e))return e;const t=e[ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Xv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Xv(e,!0);return Kf(r,(i,o)=>{Fd(r,i,L2(o))},n),t&&(t.finalized_=!1),r}var A$=new P$,z2=A$.produce;function F2(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var O$=F2(),C$=F2,j$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$d:$d.apply(null,arguments)};function Cr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Or(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>j2(n)&&n.type===e,r}var B2=class Fs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Fs.prototype)}static get[Symbol.species](){return Fs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Fs(...t[0].concat(this)):new Fs(...t.concat(this))}};function Hw(e){return sn(e)?z2(e,()=>{}):e}function sd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function _$(e){return typeof e=="boolean"}var N$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new B2;return r&&(_$(r)?s.push(O$):s.push(C$(r.extraArgument))),s},U2="RTK_autoBatch",rt=()=>e=>({payload:e,meta:{[U2]:!0}}),Kw=e=>t=>{setTimeout(t,e)},I$=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=e(i),s=setTimeout(i,t)},W2=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,s=!1;const u=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?I$(window.requestAnimationFrame,100):Kw(10):e.type==="callback"?e.queueNotification:Kw(e.timeout),f=()=>{s=!1,o&&(o=!1,u.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){const m=()=>i&&h(),v=n.subscribe(m);return u.add(h),()=>{v(),u.delete(h)}},dispatch(h){var m;try{return i=!((m=h==null?void 0:h.meta)!=null&&m[U2]),o=!i,o&&(s||(s=!0,d(f))),n.dispatch(h)}finally{i=!0}}})},M$=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new B2(e);return n&&i.push(W2(typeof n=="object"?n:void 0)),i};function T$(e){const t=N$(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(sy(r))u=C2(r);else throw new Error(Or(1));let d;typeof n=="function"?d=n(t):d=t();let f=$d;i&&(f=j$({trace:!1,...typeof i=="object"&&i}));const h=f$(...d),m=M$(h);let v=typeof s=="function"?s(m):m();const b=f(...v);return O2(u,o,b)}function H2(e){const t={},r=[];let n;const i={addCase(o,s){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Or(28));if(u in t)throw new Error(Or(29));return t[u]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function D$(e){return typeof e=="function"}function R$(e,t){let[r,n,i]=H2(t),o;if(D$(e))o=()=>Hw(e());else{const u=Hw(e);o=()=>u}function s(u=o(),d){let f=[r[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return f.filter(h=>!!h).length===0&&(f=[i]),f.reduce((h,m)=>{if(m)if(ri(h)){const b=m(h,d);return b===void 0?h:b}else{if(sn(h))return z2(h,v=>m(v,d));{const v=m(h,d);if(v===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return h},u)}return s.getInitialState=o,s}var $$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",L$=(e=21)=>{let t="",r=e;for(;r--;)t+=$$[Math.random()*64|0];return t},z$=Symbol.for("rtk-slice-createasyncthunk");function F$(e,t){return`${e}/${t}`}function B$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[z$];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(Or(11));const u=(typeof i.reducers=="function"?i.reducers(W$()):i.reducers)||{},d=Object.keys(u),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(O,N){const C=typeof O=="string"?O:O.type;if(!C)throw new Error(Or(12));if(C in f.sliceCaseReducersByType)throw new Error(Or(13));return f.sliceCaseReducersByType[C]=N,h},addMatcher(O,N){return f.sliceMatchers.push({matcher:O,reducer:N}),h},exposeAction(O,N){return f.actionCreators[O]=N,h},exposeCaseReducer(O,N){return f.sliceCaseReducersByName[O]=N,h}};d.forEach(O=>{const N=u[O],C={reducerName:O,type:F$(o,O),createNotation:typeof i.reducers=="function"};K$(N)?q$(C,N,h,t):H$(C,N,h)});function m(){const[O={},N=[],C=void 0]=typeof i.extraReducers=="function"?H2(i.extraReducers):[i.extraReducers],R={...O,...f.sliceCaseReducersByType};return R$(i.initialState,z=>{for(let F in R)z.addCase(F,R[F]);for(let F of f.sliceMatchers)z.addMatcher(F.matcher,F.reducer);for(let F of N)z.addMatcher(F.matcher,F.reducer);C&&z.addDefaultCase(C)})}const v=O=>O,b=new Map,S=new WeakMap;let k;function E(O,N){return k||(k=m()),k(O,N)}function P(){return k||(k=m()),k.getInitialState()}function j(O,N=!1){function C(z){let F=z[O];return typeof F>"u"&&N&&(F=sd(S,C,P)),F}function R(z=v){const F=sd(b,N,()=>new WeakMap);return sd(F,z,()=>{const V={};for(const[Q,B]of Object.entries(i.selectors??{}))V[Q]=U$(B,z,()=>sd(S,z,P),N);return V})}return{reducerPath:O,getSelectors:R,get selectors(){return R(C)},selectSlice:C}}const _={name:o,reducer:E,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:P,...j(s),injectInto(O,{reducerPath:N,...C}={}){const R=N??s;return O.inject({reducerPath:R,reducer:E},C),{..._,...j(R,!0)}}};return _}}function U$(e,t,r,n){function i(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return i.unwrapped=e,i}var Jt=B$();function W$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function H$({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!V$(n))throw new Error(Or(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Cr(e,s):Cr(e))}function K$(e){return e._reducerDefinitionType==="asyncThunk"}function V$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function q$({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Or(18));const{payloadCreator:o,fulfilled:s,pending:u,rejected:d,settled:f,options:h}=r,m=i(e,o,h);n.exposeAction(t,m),s&&n.addCase(m.fulfilled,s),u&&n.addCase(m.pending,u),d&&n.addCase(m.rejected,d),f&&n.addMatcher(m.settled,f),n.exposeCaseReducer(t,{fulfilled:s||ud,pending:u||ud,rejected:d||ud,settled:f||ud})}function ud(){}var G$="task",K2="listener",V2="completed",fy="cancelled",Y$=`task-${fy}`,Q$=`task-${V2}`,ng=`${K2}-${fy}`,X$=`${K2}-${V2}`,Xf=class{constructor(e){ks(this,"code");ks(this,"name","TaskAbortError");ks(this,"message");this.code=e,this.message=`${G$} ${fy} (reason: ${e})`}},hy=(e,t)=>{if(typeof e!="function")throw new TypeError(Or(32))},Hd=()=>{},q2=(e,t=Hd)=>(e.catch(t),e),G2=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Fa=e=>{if(e.aborted)throw new Xf(e.reason)};function Y2(e,t){let r=Hd;return new Promise((n,i)=>{const o=()=>i(new Xf(e.reason));if(e.aborted){o();return}r=G2(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Hd})}var Z$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Xf?"cancelled":"rejected",error:r}}finally{t==null||t()}},Kd=e=>t=>q2(Y2(e,t).then(r=>(Fa(e),r))),Q2=e=>{const t=Kd(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Xo}=Object,Vw={},Zf="listenerMiddleware",J$=(e,t)=>{const r=n=>G2(e,()=>n.abort(e.reason));return(n,i)=>{hy(n);const o=new AbortController;r(o);const s=Z$(async()=>{Fa(e),Fa(o.signal);const u=await n({pause:Kd(o.signal),delay:Q2(o.signal),signal:o.signal});return Fa(o.signal),u},()=>o.abort(Q$));return i!=null&&i.autoJoin&&t.push(s.catch(Hd)),{result:Kd(e)(s),cancel(){o.abort(Y$)}}}},eL=(e,t)=>{const r=async(n,i)=>{Fa(t);let o=()=>{};const u=[new Promise((d,f)=>{let h=e({predicate:n,effect:(m,v)=>{v.unsubscribe(),d([m,v.getState(),v.getOriginalState()])}});o=()=>{h(),f()}})];i!=null&&u.push(new Promise(d=>setTimeout(d,i,null)));try{const d=await Y2(t,Promise.race(u));return Fa(t),d}finally{o()}};return((n,i)=>q2(r(n,i)))},X2=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Cr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Or(21));return hy(o),{predicate:i,type:t,effect:o}},Z2=Xo(e=>{const{type:t,predicate:r,effect:n}=X2(e);return{id:L$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Or(22))}}},{withTypes:()=>Z2}),qw=(e,t)=>{const{type:r,effect:n,predicate:i}=X2(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},ig=e=>{e.pending.forEach(t=>{t.abort(ng)})},tL=(e,t)=>()=>{for(const r of t.keys())ig(r);e.clear()},Gw=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},J2=Xo(Cr(`${Zf}/add`),{withTypes:()=>J2}),rL=Cr(`${Zf}/removeAll`),eO=Xo(Cr(`${Zf}/remove`),{withTypes:()=>eO}),nL=(...e)=>{console.error(`${Zf}/error`,...e)},Pu=(e={})=>{const t=new Map,r=new Map,n=b=>{const S=r.get(b)??0;r.set(b,S+1)},i=b=>{const S=r.get(b)??1;S===1?r.delete(b):r.set(b,S-1)},{extra:o,onError:s=nL}=e;hy(s);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),S=>{b.unsubscribe(),S!=null&&S.cancelActive&&ig(b)}),d=(b=>{const S=qw(t,b)??Z2(b);return u(S)});Xo(d,{withTypes:()=>d});const f=b=>{const S=qw(t,b);return S&&(S.unsubscribe(),b.cancelActive&&ig(S)),!!S};Xo(f,{withTypes:()=>f});const h=async(b,S,k,E)=>{const P=new AbortController,j=eL(d,P.signal),_=[];try{b.pending.add(P),n(b),await Promise.resolve(b.effect(S,Xo({},k,{getOriginalState:E,condition:(O,N)=>j(O,N).then(Boolean),take:j,delay:Q2(P.signal),pause:Kd(P.signal),extra:o,signal:P.signal,fork:J$(P.signal,_),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((O,N,C)=>{O!==P&&(O.abort(ng),C.delete(O))})},cancel:()=>{P.abort(ng),b.pending.delete(P)},throwIfCancelled:()=>{Fa(P.signal)}})))}catch(O){O instanceof Xf||Gw(s,O,{raisedBy:"effect"})}finally{await Promise.all(_),P.abort(X$),i(b),b.pending.delete(P)}},m=tL(t,r);return{middleware:b=>S=>k=>{if(!j2(k))return S(k);if(J2.match(k))return d(k.payload);if(rL.match(k)){m();return}if(eO.match(k))return f(k.payload);let E=b.getState();const P=()=>{if(E===Vw)throw new Error(Or(23));return E};let j;try{if(j=S(k),t.size>0){const _=b.getState(),O=Array.from(t.values());for(const N of O){let C=!1;try{C=N.predicate(k,_,E)}catch(R){C=!1,Gw(s,R,{raisedBy:"predicate"})}C&&h(N,k,b,P)}}}finally{E=Vw}return j},startListening:d,stopListening:f,clearListeners:m}};function Or(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 iL={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},tO=Jt({name:"chartLayout",initialState:iL,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 r,n,i,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Jf=tO.actions,aL=Jf.setMargin,oL=Jf.setLayout,lL=Jf.setChartSize,sL=Jf.setScale,uL=tO.reducer;function rO(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Fe(e){return Number.isFinite(e)}function Nn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ho(e){for(var t=1;t{if(t&&r){var n=r.width,i=r.height,o=t.align,s=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&s==="middle")&&o!=="center"&&be(e[o]))return Ho(Ho({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&s!=="middle"&&be(e[s]))return Ho(Ho({},e),{},{[s]:e[s]+(i||0)})}return e},Tn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",nO=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,o,s=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(o=!0),u.coordinate));return i||s.push(t),o||s.push(r),s},iO=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,s=e.scale,u=e.realScaleType,d=e.isCategorical,f=e.categoricalDomain,h=e.tickCount,m=e.ticks,v=e.niceTicks,b=e.axisType;if(!s)return null;var S=u==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,k=i==="category"&&s.bandwidth?s.bandwidth()/S:0;if(k=b==="angleAxis"&&o&&o.length>=2?Lr(o[0]-o[1])*2*k:k,m||v){var E=(m||v||[]).map((P,j)=>{var _=n?n.indexOf(P):P,O=s.map(_);return Fe(O)?{coordinate:O+k,value:P,offset:k,index:j}:null}).filter(vr);return E}return d&&f?f.map((P,j)=>{var _=s.map(P);return Fe(_)?{coordinate:_+k,value:P,index:j,offset:k}:null}).filter(vr):s.ticks&&h!=null?s.ticks(h).map((P,j)=>{var _=s.map(P);return Fe(_)?{coordinate:_+k,value:P,index:j,offset:k}:null}).filter(vr):s.domain().map((P,j)=>{var _=s.map(P);return Fe(_)?{coordinate:_+k,value:n?n[P]:P,index:j,offset:k}:null}).filter(vr)},pL=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(f[0]=o,o+=v,f[1]=o):(f[0]=s,s+=v,f[1]=s)}}}},mL=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(d[0]=o,o+=f,d[1]=o):(d[0]=0,d[1]=0)}}}},vL={sign:pL,expand:I5,none:Ha,silhouette:M5,wiggle:T5,positive:mL},gL=(e,t,r)=>{var n,i=(n=vL[r])!==null&&n!==void 0?n:Ha,o=N5().keys(t).value((u,d)=>Number(Nt(u,d,0))).order(Hv).offset(i),s=o(e);return s.forEach((u,d)=>{u.forEach((f,h)=>{var m=Nt(e[h],t[d],0);Array.isArray(m)&&m.length===2&&be(m[0])&&be(m[1])&&(f[0]=m[0],f[1]=m[1])})}),s};function yL(e){return e==null?void 0:String(e)}function Qw(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var u=c2(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var d=Nt(i,Ut(s)?t.dataKey:s),f=t.scale.map(d);return be(f)?f:null}var xL=e=>{var t=e.flat(2).filter(be);return[Math.min(...t),Math.max(...t)]},bL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],wL=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return bL(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var s=o.stackedData,u=s.reduce((d,f)=>{var h=rO(f,t,r),m=xL(h);return!Fe(m[0])||!Fe(m[1])?d:[Math.min(d[0],m[0]),Math.max(d[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},Xw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vd=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Wf(t,h=>h.coordinate),o=1/0,s=1,u=i.length;s{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},SL=(e,t)=>t==="centric"?e.angle:e.radius,oi=e=>e.layout.width,li=e=>e.layout.height,EL=e=>e.layout.scale,oO=e=>e.layout.margin,eh=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),th=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),PL="data-recharts-item-index",AL="data-recharts-item-id",Au=60;function ek(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cd(e){for(var t=1;te.brush.height;function NL(e){var t=th(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Au;return r+i}return r},0)}function IL(e){var t=th(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Au;return r+i}return r},0)}function ML(e){var t=eh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function TL(e){var t=eh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Kt=H([oi,li,oO,_L,NL,IL,ML,TL,A2,t$],(e,t,r,n,i,o,s,u,d,f)=>{var h={left:(r.left||0)+i,right:(r.right||0)+o},m={top:(r.top||0)+s,bottom:(r.bottom||0)+u},v=cd(cd({},m),h),b=v.bottom;v.bottom+=n,v=hL(v,d,f);var S=e-v.left-v.right,k=t-v.top-v.bottom;return cd(cd({brushBottom:b},v),{},{width:Math.max(S,0),height:Math.max(k,0)})}),DL=H(Kt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),lO=H(oi,li,(e,t)=>({x:0,y:0,width:e,height:t})),RL=y.createContext(null),yr=()=>y.useContext(RL)!=null,rh=e=>e.brush,nh=H([rh,Kt,oO],(e,t,r)=>({height:e.height,x:be(e.x)?e.x:t.left,y:be(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:be(e.width)?e.width:t.width}));function $L(e,t,{signal:r,edges:n}={}){let i,o=null;const s=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),d=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},f=()=>{u&&d(),b()};let h=null;const m=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},t)},v=()=>{h!==null&&(clearTimeout(h),h=null)},b=()=>{v(),i=void 0,o=null},S=()=>{d()},k=function(...E){if(r!=null&&r.aborted)return;i=this,o=E;const P=h==null;m(),s&&P&&d()};return k.schedule=m,k.cancel=b,k.flush=S,r==null||r.addEventListener("abort",b,{once:!0}),k}function LL(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,s=Array(2);n&&(s[0]="leading"),i&&(s[1]="trailing");let u,d=null;const f=$L(function(...v){u=e.apply(this,v),d=null},t,{edges:s}),h=function(...v){return o!=null&&(d===null&&(d=Date.now()),Date.now()-d>=o)?(u=e.apply(this,v),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,v),u)},m=()=>(f.flush(),u);return h.cancel=f.cancel,h.flush=m,h}function zL(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return LL(e,t,{leading:n,maxWait:t,trailing:i})}var qd=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi[s++]))}},Pn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},sO=(e,t,r)=>{var n=r.width,i=n===void 0?Pn.width:n,o=r.height,s=o===void 0?Pn.height:o,u=r.aspect,d=r.maxHeight,f=Ka(i)?e:Number(i),h=Ka(s)?t:Number(s);return u&&u>0&&(f?h=f/u:h&&(f=h*u),d&&h!=null&&h>d&&(h=d)),{calculatedWidth:f,calculatedHeight:h}},FL={width:0,height:0,overflow:"visible"},BL={width:0,overflowX:"visible"},UL={height:0,overflowY:"visible"},WL={},HL=e=>{var t=e.width,r=e.height,n=Ka(t),i=Ka(r);return n&&i?FL:n?BL:i?UL:WL};function KL(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Pn.width,o=Pn.height):i===void 0?i=n&&n>0?void 0:Pn.width:o===void 0&&(o=n&&n>0?void 0:Pn.height),{width:i,height:o}}var VL=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Gd(){return Gd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return nz(i)?y.createElement(uO.Provider,{value:i},t):null}var py=()=>y.useContext(uO),iz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Pn.initialDimension:n,o=e.width,s=e.height,u=e.minWidth,d=u===void 0?Pn.minWidth:u,f=e.minHeight,h=e.maxHeight,m=e.children,v=e.debounce,b=v===void 0?Pn.debounce:v,S=e.id,k=e.className,E=e.onResize,P=e.style,j=P===void 0?{}:P,_=tz(e,VL),O=y.useRef(null),N=y.useRef();N.current=E,y.useImperativeHandle(t,()=>O.current);var C=y.useState({containerWidth:i.width,containerHeight:i.height}),R=QL(C,2),z=R[0],F=R[1],V=y.useCallback((fe,de)=>{F(Y=>{var ae=Math.round(fe),X=Math.round(de);return Y.containerWidth===ae&&Y.containerHeight===X?Y:{containerWidth:ae,containerHeight:X}})},[]);y.useEffect(()=>{if(O.current==null||typeof ResizeObserver>"u")return Al;var fe=M=>{var T,Z=M[0];if(Z!=null){var se=Z.contentRect,te=se.width,ce=se.height;V(te,ce),(T=N.current)===null||T===void 0||T.call(N,te,ce)}};b>0&&(fe=zL(fe,b,{trailing:!0,leading:!1}));var de=new ResizeObserver(fe),Y=O.current.getBoundingClientRect(),ae=Y.width,X=Y.height;return V(ae,X),de.observe(O.current),()=>{de.disconnect()}},[V,b]);var Q=z.containerWidth,B=z.containerHeight;qd(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ue=sO(Q,B,{width:o,height:s,aspect:r,maxHeight:h}),G=ue.calculatedWidth,le=ue.calculatedHeight;return qd(Q<0||B<0||G!=null&&G>0||le!=null&&le>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.`,G,le,o,s,d,f,r),y.createElement("div",Gd({id:S?"".concat(S):void 0,className:Xe("recharts-responsive-container",k),style:rk(rk({},j),{},{width:o,height:s,minWidth:d,minHeight:f,maxHeight:h}),ref:O},_),y.createElement("div",{style:HL({width:o,height:s})},y.createElement(cO,{width:G,height:le},m)))}),az=y.forwardRef((e,t)=>{var r=py();if(Nn(r.width)&&Nn(r.height))return e.children;var n=KL({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,s=sO(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=s.calculatedWidth,d=s.calculatedHeight;return be(u)&&be(d)?y.createElement(cO,{width:u,height:d},e.children):y.createElement(iz,Gd({},e,{width:i,height:o,ref:t}))});function my(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 ih=()=>{var e,t=yr(),r=Ee(DL),n=Ee(nh),i=(e=Ee(rh))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},oz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},dO=()=>{var e;return(e=Ee(Kt))!==null&&e!==void 0?e:oz},fO=()=>Ee(oi),hO=()=>Ee(li),ot=e=>e.layout.layoutType,Ol=()=>Ee(ot),vy=()=>{var e=Ol();if(e==="horizontal"||e==="vertical")return e},pO=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},lz=()=>{var e=Ol();return e!==void 0},Ou=e=>{var t=xt(),r=yr(),n=e.width,i=e.height,o=py(),s=n,u=i;return o&&(s=o.width>0?o.width:n,u=o.height>0?o.height:i),y.useEffect(()=>{!r&&Nn(s)&&Nn(u)&&t(lL({width:s,height:u}))},[t,r,s,u]),null},mO=Symbol.for("immer-nothing"),ik=Symbol.for("immer-draftable"),jr=Symbol.for("immer-state");function an(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ru=Object.getPrototypeOf;function vl(e){return!!e&&!!e[jr]}function qa(e){var t;return e?vO(e)||Array.isArray(e)||!!e[ik]||!!((t=e.constructor)!=null&&t[ik])||Cu(e)||oh(e):!1}var sz=Object.prototype.constructor.toString(),ak=new WeakMap;function vO(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=ak.get(r);return n===void 0&&(n=Function.toString.call(r),ak.set(r,n)),n===sz}function Yd(e,t,r=!0){ah(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function ah(e){const t=e[jr];return t?t.type_:Array.isArray(e)?1:Cu(e)?2:oh(e)?3:0}function ag(e,t){return ah(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gO(e,t,r){const n=ah(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function uz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Cu(e){return e instanceof Map}function oh(e){return e instanceof Set}function ka(e){return e.copy_||e.base_}function og(e,t){if(Cu(e))return new Map(e);if(oh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=vO(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[jr];let i=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:dd,add:dd,clear:dd,delete:dd}),Object.freeze(e),t&&Object.values(e).forEach(r=>gy(r,!0))),e}function cz(){an(2)}var dd={value:cz};function lh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var dz={};function Ga(e){const t=dz[e];return t||an(0,e),t}var nu;function yO(){return nu}function fz(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ok(e,t){t&&(Ga("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function lg(e){sg(e),e.drafts_.forEach(hz),e.drafts_=null}function sg(e){e===nu&&(nu=e.parent_)}function lk(e){return nu=fz(nu,e)}function hz(e){const t=e[jr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function sk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[jr].modified_&&(lg(t),an(4)),qa(e)&&(e=Qd(t,e),t.parent_||Xd(t,e)),t.patches_&&Ga("Patches").generateReplacementPatches_(r[jr].base_,e,t.patches_,t.inversePatches_)):e=Qd(t,r,[]),lg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mO?e:void 0}function Qd(e,t,r){if(lh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[jr];if(!i)return Yd(t,(o,s)=>uk(e,i,t,o,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Xd(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let s=o,u=!1;i.type_===3&&(s=new Set(o),o.clear(),u=!0),Yd(s,(d,f)=>uk(e,i,o,d,f,r,u),n),Xd(e,o,!1),r&&e.patches_&&Ga("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function uk(e,t,r,n,i,o,s){if(i==null||typeof i!="object"&&!s)return;const u=lh(i);if(!(u&&!s)){if(vl(i)){const d=o&&t&&t.type_!==3&&!ag(t.assigned_,n)?o.concat(n):void 0,f=Qd(e,i,d);if(gO(r,n,f),vl(f))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(qa(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;Qd(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Cu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Xd(e,i)}}}function Xd(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gy(t,r)}function pz(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:yO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=yy;r&&(i=[n],o=iu);const{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var yy={get(e,t){if(t===jr)return e;const r=ka(e);if(!ag(r,t))return mz(e,r,t);const n=r[t];return e.finalized_||!qa(n)?n:n===Hm(e.base_,t)?(Km(e),e.copy_[t]=cg(n,e)):n},has(e,t){return t in ka(e)},ownKeys(e){return Reflect.ownKeys(ka(e))},set(e,t,r){const n=xO(ka(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Hm(ka(e),t),o=i==null?void 0:i[jr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(uz(r,i)&&(r!==void 0||ag(e.base_,t)))return!0;Km(e),ug(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Hm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Km(e),ug(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ka(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){an(11)},getPrototypeOf(e){return ru(e.base_)},setPrototypeOf(){an(12)}},iu={};Yd(yy,(e,t)=>{iu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});iu.deleteProperty=function(e,t){return iu.set.call(this,e,t,void 0)};iu.set=function(e,t,r){return yy.set.call(this,e[0],t,r,e[0])};function Hm(e,t){const r=e[jr];return(r?ka(r):e)[t]}function mz(e,t,r){var i;const n=xO(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function xO(e,t){if(!(t in e))return;let r=ru(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ru(r)}}function ug(e){e.modified_||(e.modified_=!0,e.parent_&&ug(e.parent_))}function Km(e){e.copy_||(e.copy_=og(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var vz=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const s=this;return function(d=o,...f){return s.produce(d,h=>r.call(this,h,...f))}}typeof r!="function"&&an(6),n!==void 0&&typeof n!="function"&&an(7);let i;if(qa(t)){const o=lk(this),s=cg(t,void 0);let u=!0;try{i=r(s),u=!1}finally{u?lg(o):sg(o)}return ok(o,n),sk(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===mO&&(i=void 0),this.autoFreeze_&&gy(i,!0),n){const o=[],s=[];Ga("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else an(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,d=>t(d,...u));let n,i;return[this.produce(t,r,(s,u)=>{n=s,i=u}),n,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){qa(e)||an(8),vl(e)&&(e=gz(e));const t=lk(this),r=cg(e,void 0);return r[jr].isManual_=!0,sg(t),r}finishDraft(e,t){const r=e&&e[jr];(!r||!r.isManual_)&&an(9);const{scope_:n}=r;return ok(n,t),sk(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Ga("Patches").applyPatches_;return vl(e)?n(e,t):this.produce(e,i=>n(i,t))}};function cg(e,t){const r=Cu(e)?Ga("MapSet").proxyMap_(e,t):oh(e)?Ga("MapSet").proxySet_(e,t):pz(e,t);return(t?t.scope_:yO()).drafts_.push(r),r}function gz(e){return vl(e)||an(10,e),bO(e)}function bO(e){if(!qa(e)||lh(e))return e;const t=e[jr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=og(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=og(e,!0);return Yd(r,(i,o)=>{gO(r,i,bO(o))},n),t&&(t.finalized_=!1),r}var yz=new vz;yz.produce;var xz={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},wO=Jt({name:"legend",initialState:xz,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:rt()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:rt()},removeLegendPayload:{reducer(e,t){var r=zr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:rt()}}}),ju=wO.actions;ju.setLegendSize;ju.setLegendSettings;var bz=ju.addLegendPayload,wz=ju.replaceLegendPayload,kz=ju.removeLegendPayload,Sz=wO.reducer,Vm={exports:{}},qm={};/** * @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 ck;function Ez(){if(ck)return qm;ck=1;var e=El();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return qm.useSyncExternalStoreWithSelector=function(d,f,h,m,v){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=s(function(){function E(N){if(!P){if(P=!0,j=N,N=m(N),v!==void 0&&S.hasValue){var C=S.value;if(v(C,N))return _=C}return _=N}if(C=_,r(j,N))return C;var R=m(N);return v!==void 0&&v(C,R)?(j=N,C):(j=N,_=R)}var P=!1,j,_,O=h===void 0?null:h;return[function(){return E(f())},O===null?void 0:function(){return E(O())}]},[f,h,m,v]);var k=n(d,b[0],b[1]);return o(function(){S.hasValue=!0,S.value=k},[k]),u(k),k},qm}var dk;function Pz(){return dk||(dk=1,Vm.exports=Ez()),Vm.exports}Pz();function Az(e){e()}function Oz(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Az(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fk={notify(){},get:()=>[]};function Cz(e,t){let r,n=fk,i=0,o=!1;function s(k){h();const E=n.subscribe(k);let P=!1;return()=>{P||(P=!0,E(),m())}}function u(){n.notify()}function d(){S.onStateChange&&S.onStateChange()}function f(){return o}function h(){i++,r||(r=e.subscribe(d),n=Oz())}function m(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=fk)}function v(){o||(o=!0,h())}function b(){o&&(o=!1,m())}const S={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:d,isSubscribed:f,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return S}var jz=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_z=jz(),Nz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Iz=Nz(),Mz=()=>_z||Iz?y.useLayoutEffect:y.useEffect,Tz=Mz();function hk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Dz(e,t){if(hk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{const d=Cz(i);return{store:i,subscription:d,getServerState:n?()=>n:void 0}},[i,n]),s=y.useMemo(()=>i.getState(),[i]);Tz(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),s!==i.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,s]);const u=r||$z;return y.createElement(u.Provider,{value:o},t)}var zz=Lz,Fz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Bz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function sh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Fz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Dz(e[n],t[n]))return!1}else if(!Bz(e[n],t[n]))return!1;return!0}function dg(){return dg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?To.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,s=o===void 0?To.labelStyle:o,u=e.payload,d=e.formatter,f=e.itemSorter,h=e.wrapperClassName,m=e.labelClassName,v=e.label,b=e.labelFormatter,S=e.accessibilityLayer,k=S===void 0?To.accessibilityLayer:S,E=()=>{if(u&&u.length){var z={padding:0,margin:0},F=Xz(u,f),V=F.map((Q,B)=>{if(!Q||Q.type==="none")return null;var ue=Q.formatter||d||Qz,G=Q.value,le=Q.name,fe=G,de=le;if(ue){var Y=ue(G,le,Q,B,u);if(Array.isArray(Y)){var ae=Kz(Y,2);fe=ae[0],de=ae[1]}else if(Y!=null)fe=Y;else return null}var X=js(js({},To.itemStyle),{},{color:Q.color||To.itemStyle.color},i);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(B),style:X},_n(de)?y.createElement("span",{className:"recharts-tooltip-item-name"},de):null,_n(de)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},fe),y.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:z},V)}return null},P=js(js({},To.contentStyle),n),j=js({margin:0},s),_=!Ut(v),O=_?v:"",N=Xe("recharts-default-tooltip",h),C=Xe("recharts-tooltip-label",m);_&&b&&u!==void 0&&u!==null&&(O=b(v,u));var R=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",dg({className:N,style:P},R),y.createElement("p",{className:C,style:j},y.isValidElement(O)?O:"".concat(O)),E())},_s="recharts-tooltip-wrapper",Jz={visibility:"hidden"};function eF(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Xe(_s,{["".concat(_s,"-right")]:be(r)&&t&&be(t.x)&&r>=t.x,["".concat(_s,"-left")]:be(r)&&t&&be(t.x)&&r=t.y,["".concat(_s,"-top")]:be(n)&&t&&be(t.y)&&n0?i:0),m=r[n]+i;if(t[n])return s[n]?h:m;var v=d[n];if(v==null)return 0;if(s[n]){var b=h,S=v;return bE?Math.max(h,v):Math.max(m,v)}function tF(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function rF(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,s=e.reverseDirection,u=e.tooltipBox,d=e.useTranslate3d,f=e.viewBox,h,m,v;return u.height>0&&u.width>0&&r?(m=vk({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:s,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),v=vk({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:s,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),h=tF({translateX:m,translateY:v,useTranslate3d:d})):h=Jz,{cssProperties:h,cssClasses:eF({translateX:m,translateY:v,coordinate:r})}}var nF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),_u={isSsr:nF()};function iF(e,t){return sF(e)||lF(e,t)||oF(e,t)||aF()}function aF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oF(e,t){if(e){if(typeof e=="string")return gk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gk(e,t):void 0}}function gk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r_u.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=iF(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function yk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Do(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),f=fF(d,2),h=f[0],m=f[1];y.useEffect(()=>{var P=j=>{if(j.key==="Escape"){var _,O,N,C;m({dismissed:!0,dismissedAtCoordinate:{x:(_=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&_!==void 0?_:0,y:(N=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&N!==void 0?N:0}})}};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),h.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==h.dismissedAtCoordinate.x||((o=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)!==h.dismissedAtCoordinate.y)&&m(Do(Do({},h),{},{dismissed:!1}));var v=rF({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=v.cssClasses,S=v.cssProperties,k=e.hasPortalFromProps?{}:Do(Do({transition:gF({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},S),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),E=Do(Do({},k),{},{visibility:!h.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:E,ref:e.innerRef},e.children)}var xF=y.memo(yF),SO=()=>{var e;return(e=Ee(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function fg(){return fg=Object.assign?Object.assign.bind():function(e){for(var t=1;tFe(e.x)&&Fe(e.y),Sk=e=>e.base!=null&&Zd(e.base)&&Zd(e),Ns=e=>e.x,Is=e=>e.y,SF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(iy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=kk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return kk[r]||Bf},Ek={connectNulls:!1,type:"linear"},EF=e=>{var t=e.type,r=t===void 0?Ek.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,s=e.layout,u=e.connectNulls,d=u===void 0?Ek.connectNulls:u,f=SF(r,s),h=d?i.filter(Zd):i;if(Array.isArray(o)){var m,v=i.map((P,j)=>wk(wk({},P),{},{base:o[j]}));s==="vertical"?m=id().y(Is).x1(Ns).x0(P=>P.base.x):m=id().x(Ns).y1(Is).y0(P=>P.base.y);var b=m.defined(Sk).curve(f),S=d?v.filter(Sk):v;return b(S)}var k;s==="vertical"&&be(o)?k=id().y(Is).x1(Ns).x0(o):be(o)?k=id().x(Ns).y1(Is).y0(o):k=ZA().x(Ns).y(Is);var E=k.defined(Zd).curve(f);return E(h)},Cd=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=Ol();if((!r||!r.length)&&!n)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?EF(s):n;return y.createElement("path",fg({},ln(e),ay(e),{className:Xe("recharts-curve",t),d:u===null?void 0:u,ref:i}))},PF=["x","y","top","left","width","height","className"];function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),MF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,s=o===void 0?0:o,u=e.left,d=u===void 0?0:u,f=e.width,h=f===void 0?0:f,m=e.height,v=m===void 0?0:m,b=e.className,S=_F(e,PF),k=AF({x:r,y:i,top:s,left:d,width:h,height:v},S);return!be(r)||!be(i)||!be(h)||!be(v)||!be(s)||!be(d)?null:y.createElement("path",hg({},Br(k),{className:Xe("recharts-cross",b),d:IF(r,i,h,v,s,d)}))};function TF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Jd=1e-4,EO=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],PO=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Ak=(e,t)=>r=>{var n=EO(e,t);return PO(n,r)},DF=(e,t)=>r=>{var n=EO(e,t),i=[...n.map((o,s)=>o*s).slice(1),0];return PO(i,r)},RF=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},$F=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=Ak(e,r),o=Ak(t,n),s=DF(e,r),u=f=>f>1?1:f<0?0:f,d=f=>{for(var h=f>1?1:f,m=h,v=0;v<8;++v){var b=i(m)-h,S=s(m);if(Math.abs(b-h)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,s=t.dt,u=s===void 0?16.67:s,d=1,f=[0],h=0,m=0,v=1e4,b=0;b{var j,_,O;if(P<=0)return 0;if(P>=1)return d;var N=P*E,C=Math.floor(N),R=N-C;return((j=f[C])!==null&&j!==void 0?j:0)+(((_=f[C+1])!==null&&_!==void 0?_:0)-((O=f[C])!==null&&O!==void 0?O:0))*R}},FF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Ok(e);case"spring":return zF();default:if(e.split("(")[0]==="cubic-bezier")return Ok(e)}return typeof e=="function"?e:null},BF=(e,t,r)=>{var n,i=o=>{var s=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,s);return}n=e.setTimeout(i,s)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},AO=y.createContext(BF);AO.Provider;function UF(e){var t=y.useContext(AO);return y.useMemo(()=>e??t,[e,t])}function WF(e,t,r){return(t=HF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HF(e){var t=KF(e,"string");return typeof t=="symbol"?t:t+""}function KF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ck="init",jk="pending",_k="active",VF="completed";function Qm(e){return Math.max(0,e)}class qF{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;WF(this,"state",Ck),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Qm(t.animationDuration),this.animationBegin=Qm(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===Ck)return this.state=jk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===jk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=_k,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Qm(this.animationBegin-r)}if(this.getState()===_k){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=VF}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class GF extends qF{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Qn(this.getFrom(),this.getTo(),this.getProgress()))}}class YF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=s=>{s-n>=r?t(s):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function QF(e,t){return e6(e)||JF(e,t)||ZF(e,t)||XF()}function XF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZF(e,t){if(e){if(typeof e=="string")return Nk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nk(e,t):void 0}}function Nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},Ik=0,Xm=1;function OO(e){var t=Hr(e,t6),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,s=t.easing,u=t.begin,d=t.onAnimationEnd,f=t.onAnimationStart,h=t.children,m=kO(),v=n==="auto"?!_u.isSsr&&!m:n,b=UF(t.animationController),S=y.useState(v?Ik:Xm),k=QF(S,2),E=k[0],P=k[1];return y.useEffect(()=>{v||P(Xm)},[v]),y.useEffect(()=>{var j=FF(s);if(!v||!i||j==null)return Al;var _=new YF,O=new GF({animationId:r,easing:j,animationDuration:o,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:Ik,to:Xm});return b(_,O,P)},[b,r,v,i,o,s,u,f,d]),h(Number(E))}function CO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(Zs(t)),n=y.useRef(e);return n.current!==e&&(r.current=Zs(t),n.current=e),r.current}var r6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),n6=(e,t,r)=>e.map(n=>"".concat(r6(n)," ").concat(t,"ms ").concat(r)).join(","),i6=["radius"],a6=["radius"],Mk,Tk,Dk,Rk,$k,Lk,zk,Fk,Bk,Uk;function Wk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hk(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=Yi(r),s=Yi(n),u=Math.min(Math.abs(o)/2,Math.abs(s)/2),d=s>=0?1:-1,f=o>=0?1:-1,h=s>=0&&o>=0||s<0&&o<0?1:0,m;if(u>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,S=4;bu?u:E}m=Lt(Mk||(Mk=yn(["M",",",""])),e,t+d*v[0]),v[0]>0&&(m+=Lt(Tk||(Tk=yn(["A ",",",",0,0,",",",",",""])),v[0],v[0],h,e+f*v[0],t)),m+=Lt(Dk||(Dk=yn(["L ",",",""])),e+r-f*v[1],t),v[1]>0&&(m+=Lt(Rk||(Rk=yn(["A ",",",",0,0,",`, `,",",""])),v[1],v[1],h,e+r,t+d*v[1])),m+=Lt($k||($k=yn(["L ",",",""])),e+r,t+n-d*v[2]),v[2]>0&&(m+=Lt(Lk||(Lk=yn(["A ",",",",0,0,",`, `,",",""])),v[2],v[2],h,e+r-f*v[2],t+n)),m+=Lt(zk||(zk=yn(["L ",",",""])),e+f*v[3],t+n),v[3]>0&&(m+=Lt(Fk||(Fk=yn(["A ",",",",0,0,",`, `,",",""])),v[3],v[3],h,e,t+n-d*v[3])),m+="Z"}else if(u>0&&i===+i&&i>0){var P=Math.min(u,i);m=Lt(Bk||(Bk=yn(["M ",",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",",",` L `,",",` A `,",",",0,0,",",",","," Z"])),e,t+d*P,P,P,h,e+f*P,t,e+r-f*P,t,P,P,h,e+r,t+d*P,e+r,t+n-d*P,P,P,h,e+r-f*P,t+n,e+f*P,t+n,P,P,h,e,t+n-d*P)}else m=Lt(Uk||(Uk=yn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return m},Gk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},m6=e=>{var t=Hr(e,Gk),r=y.useRef(null),n=y.useState(-1),i=c6(n,2),o=i[0],s=i[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Y=r.current.getTotalLength();Y&&s(Y)}catch{}},[]);var u=t.x,d=t.y,f=t.width,h=t.height,m=t.radius,v=t.className,b=t.animationEasing,S=t.animationDuration,k=t.animationBegin,E=t.isAnimationActive,P=t.isUpdateAnimationActive,j=y.useRef(f),_=y.useRef(h),O=y.useRef(u),N=y.useRef(d),C=y.useMemo(()=>({x:u,y:d,width:f,height:h,radius:m}),[u,d,f,h,m]),R=CO(C,"rectangle-");if(u!==+u||d!==+d||f!==+f||h!==+h||f===0||h===0)return null;var z=Xe("recharts-rectangle",v);if(!P){var F=Br(t);F.radius;var V=Kk(F,i6);return y.createElement("path",ef({},V,{x:Yi(u),y:Yi(d),width:Yi(f),height:Yi(h),radius:typeof m=="number"?m:void 0,className:z,d:qk(u,d,f,h,m)}))}var Q=j.current,B=_.current,ue=O.current,G=N.current,le="0px ".concat(o===-1?1:o,"px"),fe="".concat(o,"px ").concat(o,"px"),de=n6(["strokeDasharray"],S,typeof b=="string"?b:Gk.animationEasing);return y.createElement(OO,{animationId:R,key:R,canBegin:o>0,duration:S,easing:b,isActive:P,begin:k},Y=>{var ae=Qn(Q,f,Y),X=Qn(B,h,Y),M=Qn(ue,u,Y),T=Qn(G,d,Y);r.current&&(j.current=ae,_.current=X,O.current=M,N.current=T);var Z;E?Y>0?Z={transition:de,strokeDasharray:fe}:Z={strokeDasharray:le}:Z={strokeDasharray:fe};var se=Br(t);se.radius;var te=Kk(se,a6);return y.createElement("path",ef({},te,{radius:typeof m=="number"?m:void 0,className:z,d:qk(M,T,ae,X,m),ref:r,style:Hk(Hk({},Z),t.style)}))})};function Yk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qk(e){for(var t=1;te*180/Math.PI,Bt=(e,t,r,n)=>({x:e+Math.cos(-tf*n)*r,y:t+Math.sin(-tf*n)*r}),b6=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},w6=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},k6=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,s=w6({x:r,y:n},{x:i,y:o});if(s<=0)return{radius:s,angle:0};var u=(r-i)/s,d=Math.acos(u);return n>o&&(d=2*Math.PI-d),{radius:s,angle:x6(d),angleInRadian:d}},S6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},E6=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),s=Math.min(i,o);return e+s*360},P6=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=k6({x:r,y:n},t),o=i.radius,s=i.angle,u=t.innerRadius,d=t.outerRadius;if(od||o===0)return null;var f=S6(t),h=f.startAngle,m=f.endAngle,v=s,b;if(h<=m){for(;v>m;)v-=360;for(;v=h&&v<=m}else{for(;v>h;)v-=360;for(;v=m&&v<=h}return b?Qk(Qk({},t),{},{radius:o,angle:E6(v,t)}):null};function jO(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,s=Bt(t,r,n,i),u=Bt(t,r,n,o);return{points:[s,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var Xk,Zk,Jk,eS,tS,rS,nS;function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Lr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},fd=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,s=e.isExternal,u=e.cornerRadius,d=e.cornerIsExternal,f=u*(s?1:-1)+n,h=Math.asin(u/f)/tf,m=d?i:i+o*h,v=Bt(t,r,f,m),b=Bt(t,r,n,m),S=d?i-o*h:i,k=Bt(t,r,f*Math.cos(h*tf),S);return{center:v,circleTangency:b,lineTangency:k,theta:h}},_O=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,s=e.endAngle,u=A6(o,s),d=o+u,f=Bt(t,r,i,o),h=Bt(t,r,i,d),m=Lt(Xk||(Xk=Aa(["M ",",",` A `,",",`,0, `,",",`, `,",",` `])),f.x,f.y,i,i,+(Math.abs(u)>180),+(o>d),h.x,h.y);if(n>0){var v=Bt(t,r,n,o),b=Bt(t,r,n,d);m+=Lt(Zk||(Zk=Aa(["L ",",",` A `,",",`,0, `,",",`, `,","," Z"])),b.x,b.y,n,n,+(Math.abs(u)>180),+(o<=d),v.x,v.y)}else m+=Lt(Jk||(Jk=Aa(["L ",","," Z"])),t,r);return m},O6=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,u=e.cornerIsExternal,d=e.startAngle,f=e.endAngle,h=Lr(f-d),m=fd({cx:t,cy:r,radius:i,angle:d,sign:h,cornerRadius:o,cornerIsExternal:u}),v=m.circleTangency,b=m.lineTangency,S=m.theta,k=fd({cx:t,cy:r,radius:i,angle:f,sign:-h,cornerRadius:o,cornerIsExternal:u}),E=k.circleTangency,P=k.lineTangency,j=k.theta,_=u?Math.abs(d-f):Math.abs(d-f)-S-j;if(_<0)return s?Lt(eS||(eS=Aa(["M ",",",` a`,",",",0,0,1,",`,0 a`,",",",0,0,1,",`,0 `])),b.x,b.y,o,o,o*2,o,o,-o*2):_O({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:d,endAngle:f});var O=Lt(tS||(tS=Aa(["M ",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",",` `])),b.x,b.y,o,o,+(h<0),v.x,v.y,i,i,+(_>180),+(h<0),E.x,E.y,o,o,+(h<0),P.x,P.y);if(n>0){var N=fd({cx:t,cy:r,radius:n,angle:d,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),C=N.circleTangency,R=N.lineTangency,z=N.theta,F=fd({cx:t,cy:r,radius:n,angle:f,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),V=F.circleTangency,Q=F.lineTangency,B=F.theta,ue=u?Math.abs(d-f):Math.abs(d-f)-z-B;if(ue<0&&o===0)return"".concat(O,"L").concat(t,",").concat(r,"Z");O+=Lt(rS||(rS=Aa(["L",",",` A`,",",",0,0,",",",",",` A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",","Z"])),Q.x,Q.y,o,o,+(h<0),V.x,V.y,n,n,+(ue>180),+(h>0),C.x,C.y,o,o,+(h<0),R.x,R.y)}else O+=Lt(nS||(nS=Aa(["L",",","Z"])),t,r);return O},C6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},j6=e=>{var t=Hr(e,C6),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,m=t.className;if(o0&&Math.abs(f-h)<360?k=O6({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(S,b/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:h}):k=_O({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:f,endAngle:h}),y.createElement("path",pg({},Br(t),{className:v,d:k}))};function _6(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(d2(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,s=t.outerRadius,u=t.angle,d=Bt(n,i,o,u),f=Bt(n,i,s,u);return[{x:d.x,y:d.y},{x:f.x,y:f.y}]}return jO(t)}}function N6(e){return P2(e)?NaN:Number(e)}function Zm(e){return e?(e=N6(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function NO(e,t,r){r&&typeof r!="number"&&Gv(e,t,r)&&(t=r=void 0),e=Zm(e),t===void 0?(t=e,e=0):t=Zm(t),r=r===void 0?ee.chartData,xy=H([dn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),uh=(e,t,r,n)=>n?xy(e):dn(e),I6=(e,t,r)=>r?xy(e):dn(e),M6=H([uh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});H([xy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var T6=H([dn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function by(e,t){return L6(e)||$6(e,t)||R6(e,t)||D6()}function D6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R6(e,t){if(e){if(typeof e=="string")return iS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iS(e,t):void 0}}function iS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};ve.decimalPlaces=ve.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*nt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ve.dividedBy=ve.div=function(e){return ei(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.idiv=function(e){var t=this,r=t.constructor;return Ye(ei(t,new r(e),0,1),r.precision)};ve.equals=ve.eq=function(e){return!this.cmp(e)};ve.exponent=function(){return yt(this)};ve.greaterThan=ve.gt=function(e){return this.cmp(e)>0};ve.greaterThanOrEqualTo=ve.gte=function(e){return this.cmp(e)>=0};ve.isInteger=ve.isint=function(){return this.e>this.d.length-2};ve.isNegative=ve.isneg=function(){return this.s<0};ve.isPositive=ve.ispos=function(){return this.s>0};ve.isZero=function(){return this.s===0};ve.lessThan=ve.lt=function(e){return this.cmp(e)<0};ve.lessThanOrEqualTo=ve.lte=function(e){return this.cmp(e)<1};ve.logarithm=ve.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Pr))throw Error(Wr+"NaN");if(r.s<1)throw Error(Wr+(r.s?"NaN":"-Infinity"));return r.eq(Pr)?new n(0):(at=!1,t=ei(au(r,o),au(e,o),o),at=!0,Ye(t,i))};ve.minus=ve.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?RO(t,e):TO(t,(e.s=-e.s,e))};ve.modulo=ve.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Wr+"NaN");return r.s?(at=!1,t=ei(r,e,0,1).times(e),at=!0,r.minus(t)):Ye(new n(r),i)};ve.naturalExponential=ve.exp=function(){return DO(this)};ve.naturalLogarithm=ve.ln=function(){return au(this)};ve.negated=ve.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ve.plus=ve.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TO(t,e):RO(t,(e.s=-e.s,e))};ve.precision=ve.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ba+e);if(t=yt(i)+1,n=i.d.length-1,r=n*nt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ve.squareRoot=ve.sqrt=function(){var e,t,r,n,i,o,s,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Wr+"NaN")}for(e=yt(u),at=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=An(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=jl((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),n=new d(t)):n=new d(i.toString()),r=d.precision,i=s=r+3;;)if(o=n,n=o.plus(ei(u,o,s+2)).times(.5),An(o.d).slice(0,s)===(t=An(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(Ye(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;s+=4}return at=!0,Ye(n,r)};ve.times=ve.mul=function(e){var t,r,n,i,o,s,u,d,f,h=this,m=h.constructor,v=h.d,b=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,r=h.e+e.e,d=v.length,f=b.length,d=0;){for(t=0,i=d+n;i>n;)u=o[i]+b[n]*v[i-n-1]+t,o[i--]=u%_t|0,t=u/_t|0;o[i]=(o[i]+t)%_t|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,at?Ye(e,m.precision):e};ve.toDecimalPlaces=ve.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(In(e,0,Cl),t===void 0?t=n.rounding:In(t,0,8),Ye(r,e+yt(r)+1,t))};ve.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ya(n,!0):(In(e,0,Cl),t===void 0?t=i.rounding:In(t,0,8),n=Ye(new i(n),e+1,t),r=Ya(n,!0,e+1)),r};ve.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ya(i):(In(e,0,Cl),t===void 0?t=o.rounding:In(t,0,8),n=Ye(new o(i),e+yt(i)+1,t),r=Ya(n.abs(),!1,e+yt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ve.toInteger=ve.toint=function(){var e=this,t=e.constructor;return Ye(new t(e),yt(e)+1,t.rounding)};ve.toNumber=function(){return+this};ve.toPower=ve.pow=function(e){var t,r,n,i,o,s,u=this,d=u.constructor,f=12,h=+(e=new d(e));if(!e.s)return new d(Pr);if(u=new d(u),!u.s){if(e.s<1)throw Error(Wr+"Infinity");return u}if(u.eq(Pr))return u;if(n=d.precision,e.eq(Pr))return Ye(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=u.s,s){if((r=h<0?-h:h)<=MO){for(i=new d(Pr),t=Math.ceil(n/nt+4),at=!1;r%2&&(i=i.times(u),lS(i.d,t)),r=jl(r/2),r!==0;)u=u.times(u),lS(u.d,t);return at=!0,e.s<0?new d(Pr).div(i):Ye(i,n)}}else if(o<0)throw Error(Wr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,at=!1,i=e.times(au(u,n+f)),at=!0,i=DO(i),i.s=o,i};ve.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=yt(i),n=Ya(i,r<=o.toExpNeg||r>=o.toExpPos)):(In(e,1,Cl),t===void 0?t=o.rounding:In(t,0,8),i=Ye(new o(i),e,t),r=yt(i),n=Ya(i,e<=r||r<=o.toExpNeg,e)),n};ve.toSignificantDigits=ve.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(In(e,1,Cl),t===void 0?t=n.rounding:In(t,0,8)),Ye(new n(r),e,t)};ve.toString=ve.valueOf=ve.val=ve.toJSON=ve[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=yt(e),r=e.constructor;return Ya(e,t<=r.toExpNeg||t>=r.toExpPos)};function TO(e,t){var r,n,i,o,s,u,d,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),at?Ye(t,m):t;if(d=e.d,f=t.d,s=e.e,i=t.e,d=d.slice(),o=s-i,o){for(o<0?(n=d,o=-o,u=f.length):(n=f,i=s,u=d.length),s=Math.ceil(m/nt),u=s>u?s+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=d.length,o=f.length,u-o<0&&(o=u,n=f,f=d,d=n),r=0;o;)r=(d[--o]=d[o]+f[o]+r)/_t|0,d[o]%=_t;for(r&&(d.unshift(r),++i),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=i,at?Ye(t,m):t}function In(e,t,r){if(e!==~~e||er)throw Error(Ba+e)}function An(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;ts?1:-1;else for(u=d=0;ui[u]?1:-1;break}return d}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var u,d,f,h,m,v,b,S,k,E,P,j,_,O,N,C,R,z,F=n.constructor,V=n.s==i.s?1:-1,Q=n.d,B=i.d;if(!n.s)return new F(n);if(!i.s)throw Error(Wr+"Division by zero");for(d=n.e-i.e,R=B.length,N=Q.length,b=new F(V),S=b.d=[],f=0;B[f]==(Q[f]||0);)++f;if(B[f]>(Q[f]||0)&&--d,o==null?j=o=F.precision:s?j=o+(yt(n)-yt(i))+1:j=o,j<0)return new F(0);if(j=j/nt+2|0,f=0,R==1)for(h=0,B=B[0],j++;(f1&&(B=e(B,h),Q=e(Q,h),R=B.length,N=Q.length),O=R,k=Q.slice(0,R),E=k.length;E=_t/2&&++C;do h=0,u=t(B,k,R,E),u<0?(P=k[0],R!=E&&(P=P*_t+(k[1]||0)),h=P/C|0,h>1?(h>=_t&&(h=_t-1),m=e(B,h),v=m.length,E=k.length,u=t(m,k,v,E),u==1&&(h--,r(m,R16)throw Error(wy+yt(e));if(!e.s)return new h(Pr);for(at=!1,u=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(n=Math.log(Sa(2,f))/Math.LN10*2+5|0,u+=n,r=i=o=new h(Pr),h.precision=u;;){if(i=Ye(i.times(e),u),r=r.times(++d),s=o.plus(ei(i,r,u)),An(s.d).slice(0,u)===An(o.d).slice(0,u)){for(;f--;)o=Ye(o.times(o),u);return h.precision=m,t==null?(at=!0,Ye(o,m)):o}o=s}}function yt(e){for(var t=e.e*nt,r=e.d[0];r>=10;r/=10)t++;return t}function Jm(e,t,r){if(t>e.LN10.sd())throw at=!0,r&&(e.precision=r),Error(Wr+"LN10 precision limit exceeded");return Ye(new e(e.LN10),t)}function Li(e){for(var t="";e--;)t+="0";return t}function au(e,t){var r,n,i,o,s,u,d,f,h,m=1,v=10,b=e,S=b.d,k=b.constructor,E=k.precision;if(b.s<1)throw Error(Wr+(b.s?"NaN":"-Infinity"));if(b.eq(Pr))return new k(0);if(t==null?(at=!1,f=E):f=t,b.eq(10))return t==null&&(at=!0),Jm(k,f);if(f+=v,k.precision=f,r=An(S),n=r.charAt(0),o=yt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=An(b.d),n=r.charAt(0),m++;o=yt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return d=Jm(k,f+2,E).times(o+""),b=au(new k(n+"."+r.slice(1)),f-v).plus(d),k.precision=E,t==null?(at=!0,Ye(b,E)):b;for(u=s=b=ei(b.minus(Pr),b.plus(Pr),f),h=Ye(b.times(b),f),i=3;;){if(s=Ye(s.times(h),f),d=u.plus(ei(s,new k(i),f)),An(d.d).slice(0,f)===An(u.d).slice(0,f))return u=u.times(2),o!==0&&(u=u.plus(Jm(k,f+2,E).times(o+""))),u=ei(u,new k(m),f),k.precision=E,t==null?(at=!0,Ye(u,E)):u;u=d,i+=2}}function oS(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=jl(r/nt),e.d=[],n=(r+1)%nt,r<0&&(n+=nt),nrf||e.e<-rf))throw Error(wy+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ye(e,t,r){var n,i,o,s,u,d,f,h,m=e.d;for(s=1,o=m[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=nt,i=t,f=m[h=0];else{if(h=Math.ceil((n+1)/nt),o=m.length,h>=o)return e;for(f=o=m[h],s=1;o>=10;o/=10)s++;n%=nt,i=n-nt+s}if(r!==void 0&&(o=Sa(10,s-i-1),u=f/o%10|0,d=t<0||m[h+1]!==void 0||f%o,d=r<4?(u||d)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||d||r==6&&(n>0?i>0?f/Sa(10,s-i):0:m[h-1])%10&1||r==(e.s<0?8:7))),t<1||!m[0])return d?(o=yt(e),m.length=1,t=t-o-1,m[0]=Sa(10,(nt-t%nt)%nt),e.e=jl(-t/nt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(n==0?(m.length=h,o=1,h--):(m.length=h+1,o=Sa(10,nt-n),m[h]=i>0?(f/Sa(10,s-i)%Sa(10,i)|0)*o:0),d)for(;;)if(h==0){(m[0]+=o)==_t&&(m[0]=1,++e.e);break}else{if(m[h]+=o,m[h]!=_t)break;m[h--]=0,o=1}for(n=m.length;m[--n]===0;)m.pop();if(at&&(e.e>rf||e.e<-rf))throw Error(wy+yt(e));return e}function RO(e,t){var r,n,i,o,s,u,d,f,h,m,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),at?Ye(t,b):t;if(d=e.d,m=t.d,n=t.e,f=e.e,d=d.slice(),s=f-n,s){for(h=s<0,h?(r=d,s=-s,u=m.length):(r=m,n=f,u=d.length),i=Math.max(Math.ceil(b/nt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=d.length,u=m.length,h=i0;--i)d[u++]=0;for(i=m.length;i>s;){if(d[--i]0?o=o.charAt(0)+"."+o.slice(1)+Li(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Li(-i-1)+o,r&&(n=r-s)>0&&(o+=Li(n))):i>=s?(o+=Li(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Li(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Li(n))),e.s<0?"-"+o:o}function lS(e,t){if(e.length>t)return e.length=t,!0}function $O(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ba+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return oS(s,o.toString())}else if(typeof o!="string")throw Error(Ba+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,B6.test(o))oS(s,o);else throw Error(Ba+o)}if(i.prototype=ve,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=$O,i.config=i.set=U6,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ba+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ba+r+": "+n);return this}var ky=$O(F6);Pr=new ky(1);const Ue=ky;function LO(e){var t;return e===0?t=1:t=Math.floor(new Ue(e).abs().log(10).toNumber())+1,t}function zO(e,t,r){for(var n=new Ue(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function ou(e,t){return V6(e)||K6(e,t)||H6(e,t)||W6()}function W6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H6(e,t){if(e){if(typeof e=="string")return sS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sS(e,t):void 0}}function sS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=ou(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},Sy=(e,t,r)=>{if(e.lte(0))return new Ue(0);var n=LO(e.toNumber()),i=new Ue(10).pow(n),o=e.div(i),s=n!==1?.05:.1,u=new Ue(Math.ceil(o.div(s).toNumber())).add(r).mul(s),d=u.mul(i);return t?new Ue(d.toNumber()):new Ue(Math.ceil(d.toNumber()))},BO=(e,t,r)=>{var n;if(e.lte(0))return new Ue(0);var i=[1,2,2.5,5],o=e.toNumber(),s=Math.floor(new Ue(o).abs().log(10).toNumber()),u=new Ue(10).pow(s),d=e.div(u).toNumber(),f=i.findIndex(b=>b>=d-1e-10);if(f===-1&&(u=u.mul(10),f=0),f+=r,f>=i.length){var h=Math.floor(f/i.length);f%=i.length,u=u.mul(new Ue(10).pow(h))}var m=(n=i[f])!==null&&n!==void 0?n:1,v=new Ue(m).mul(u);return t?v:new Ue(Math.ceil(v.toNumber()))},q6=(e,t,r)=>{var n=new Ue(1),i=new Ue(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ue(10).pow(LO(e)-1),i=new Ue(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ue(Math.floor(e)))}else e===0?i=new Ue(Math.floor((t-1)/2)):r||(i=new Ue(Math.floor(e)));for(var s=Math.floor((t-1)/2),u=[],d=0;d4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Sy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ue(0),tickMin:new Ue(0),tickMax:new Ue(0)};var u=s(new Ue(r).sub(t).div(n-1),i,o),d;t<=0&&r>=0?d=new Ue(0):(d=new Ue(t).add(r).div(2),d=d.sub(new Ue(d).mod(u)));var f=Math.ceil(d.sub(t).div(u).toNumber()),h=Math.ceil(new Ue(r).sub(d).div(u).toNumber()),m=f+h+1;return m>n?UO(t,r,n,i,o+1,s):(m0?h+(n-m):h,f=r>0?f:f+(n-m)),{step:u,tickMin:d.sub(new Ue(f).mul(u)),tickMax:d.add(new Ue(h).mul(u))})},uS=function(t){var r=ou(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=Math.max(o,2),f=FO([n,i]),h=ou(f,2),m=h[0],v=h[1];if(m===-1/0||v===1/0){var b=v===1/0?[m,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(m===v)return q6(m,o,s);var S=u==="snap125"?BO:Sy,k=UO(m,v,d,s,0,S),E=k.step,P=k.tickMin,j=k.tickMax,_=zO(P,j.add(new Ue(.1).mul(E)),E);return n>i?_.reverse():_},cS=function(t,r){var n=ou(t,2),i=n[0],o=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=FO([i,o]),f=ou(d,2),h=f[0],m=f[1];if(h===-1/0||m===1/0)return[i,o];if(h===m)return[h];var v=u==="snap125"?BO:Sy,b=Math.max(r,2),S=v(new Ue(m).sub(h).div(b-1),s,0),k=[...zO(new Ue(h),new Ue(m),S),m];return s===!1&&(k=k.map(E=>Math.round(E))),i>o?k.reverse():k},G6=e=>e.rootProps.barCategoryGap,ch=e=>e.rootProps.stackOffset,WO=e=>e.rootProps.reverseStackOrder,Ey=e=>e.options.chartName,Py=e=>e.rootProps.syncId,HO=e=>e.rootProps.syncMethod,Ay=e=>e.options.eventEmitter,Y6=e=>e.rootProps.baseValue,nr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ga={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},xn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},dh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function fh(e,t,r){if(r!=="auto")return r;if(e!=null)return Tn(e,t)?"category":"number"}function dS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nf(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Oy=H([J6,pO],(e,t)=>{var r;if(e!=null)return e;var n=(r=fh(t,"angleAxis",fS.type))!==null&&r!==void 0?r:"category";return nf(nf({},fS),{},{type:n})}),e8=(e,t)=>e.polarAxis.radiusAxis[t],Cy=H([e8,pO],(e,t)=>{var r;if(e!=null)return e;var n=(r=fh(t,"radiusAxis",hS.type))!==null&&r!==void 0?r:"category";return nf(nf({},hS),{},{type:n})}),hh=e=>e.polarOptions,jy=H([oi,li,Kt],b6),KO=H([hh,jy],(e,t)=>{if(e!=null)return ta(e.innerRadius,t,0)}),VO=H([hh,jy],(e,t)=>{if(e!=null)return ta(e.outerRadius,t,t*.8)}),t8=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},qO=H([hh],t8);H([Oy,qO],dh);var GO=H([jy,KO,VO],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});H([Cy,GO],dh);var YO=H([ot,hh,KO,VO,oi,li],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var s=t.cx,u=t.cy,d=t.startAngle,f=t.endAngle;return{cx:ta(s,i,i/2),cy:ta(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:d,endAngle:f,clockWise:!1}}}),It=(e,t)=>t,ph=(e,t,r)=>r;function _y(e){return e==null?void 0:e.id}function QO(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,s=r.dataKey,u=new Map;return e.forEach(d=>{var f,h=(f=d.data)!==null&&f!==void 0?f:i;if(!(h==null||h.length===0)){var m=_y(d);h.forEach((v,b)=>{var S=s==null||o?b:String(Nt(v,s,null)),k=Nt(v,d.dataKey,0),E;u.has(S)?E=u.get(S):E={},Object.assign(E,{[m]:k}),u.set(S,E)})}}),Array.from(u.values())}function Ny(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var mh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function vh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function r8(e,t){if(e.length===t.length){for(var r=0;r{var t=ot(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},_l=e=>e.tooltip.settings.axisId;function Iy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function s(){return o.apply(this,arguments)}return s.toString=function(){return o.toString()},s})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var s=i[0],u=i[1];return s<=u?o>=s&&o<=u:o>=u&&o<=s},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,s)=>{var u=e(o);if(u!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var d=e.bandwidth();switch(s.position){case"middle":u+=d/2;break;case"end":u+=d;break}}return u}}}}}var n8=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!On(t)){for(var r,n,i=0;in)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Zi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function i8(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function My(e){let t,r,n;e.length!==2?(t=Zi,r=(u,d)=>Zi(e(u),d),n=(u,d)=>e(u)-d):(t=e===Zi||e===i8?e:a8,r=e,n=e);function i(u,d,f=0,h=u.length){if(f>>1;r(u[m],d)<0?f=m+1:h=m}while(f>>1;r(u[m],d)<=0?f=m+1:h=m}while(ff&&n(u[m-1],d)>-n(u[m],d)?m-1:m}return{left:i,center:s,right:o}}function a8(){return 0}function XO(e){return e===null?NaN:+e}function*o8(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const l8=My(Zi),Nu=l8.right;My(XO).center;class pS extends Map{constructor(t,r=c8){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(mS(this,t))}has(t){return super.has(mS(this,t))}set(t,r){return super.set(s8(this,t),r)}delete(t){return super.delete(u8(this,t))}}function mS({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function s8({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function u8({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function c8(e){return e!==null&&typeof e=="object"?e.valueOf():e}function d8(e=Zi){if(e===Zi)return ZO;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function ZO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const f8=Math.sqrt(50),h8=Math.sqrt(10),p8=Math.sqrt(2);function af(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),s=o>=f8?10:o>=h8?5:o>=p8?2:1;let u,d,f;return i<0?(f=Math.pow(10,-i)/s,u=Math.round(e*f),d=Math.round(t*f),u/ft&&--d,f=-f):(f=Math.pow(10,i)*s,u=Math.round(e/f),d=Math.round(t/f),u*ft&&--d),d0))return[];if(e===t)return[e];const n=t=i))return[];const u=o-i+1,d=new Array(u);if(n)if(s<0)for(let f=0;f=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function gS(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function JO(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?ZO:d8(i);n>r;){if(n-r>600){const d=n-r+1,f=t-r+1,h=Math.log(d),m=.5*Math.exp(2*h/3),v=.5*Math.sqrt(h*m*(d-m)/d)*(f-d/2<0?-1:1),b=Math.max(r,Math.floor(t-f*m/d+v)),S=Math.min(n,Math.floor(t+(d-f)*m/d+v));JO(e,t,b,S,i)}const o=e[t];let s=r,u=n;for(Ms(e,r,t),i(e[n],o)>0&&Ms(e,r,n);s0;)--u}i(e[r],o)===0?Ms(e,r,u):(++u,Ms(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Ms(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m8(e,t,r){if(e=Float64Array.from(o8(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return gS(e);if(t>=1)return vS(e);var n,i=(n-1)*t,o=Math.floor(i),s=vS(JO(e,o).subarray(0,o+1)),u=gS(e.subarray(o+1));return s+(u-s)*(i-o)}}function v8(e,t,r=XO){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),s=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return s+(u-s)*(i-o)}}function g8(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?hd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?hd(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=b8.exec(e))?new gr(t[1],t[2],t[3],1):(t=w8.exec(e))?new gr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=k8.exec(e))?hd(t[1],t[2],t[3],t[4]):(t=S8.exec(e))?hd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=E8.exec(e))?ES(t[1],t[2]/100,t[3]/100,1):(t=P8.exec(e))?ES(t[1],t[2]/100,t[3]/100,t[4]):yS.hasOwnProperty(e)?wS(yS[e]):e==="transparent"?new gr(NaN,NaN,NaN,0):null}function wS(e){return new gr(e>>16&255,e>>8&255,e&255,1)}function hd(e,t,r,n){return n<=0&&(e=t=r=NaN),new gr(e,t,r,n)}function C8(e){return e instanceof Iu||(e=uu(e)),e?(e=e.rgb(),new gr(e.r,e.g,e.b,e.opacity)):new gr}function xg(e,t,r,n){return arguments.length===1?C8(e):new gr(e,t,r,n??1)}function gr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ry(gr,xg,tC(Iu,{brighter(e){return e=e==null?of:Math.pow(of,e),new gr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?lu:Math.pow(lu,e),new gr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new gr(Ua(this.r),Ua(this.g),Ua(this.b),lf(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:kS,formatHex:kS,formatHex8:j8,formatRgb:SS,toString:SS}));function kS(){return`#${Oa(this.r)}${Oa(this.g)}${Oa(this.b)}`}function j8(){return`#${Oa(this.r)}${Oa(this.g)}${Oa(this.b)}${Oa((isNaN(this.opacity)?1:this.opacity)*255)}`}function SS(){const e=lf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ua(this.r)}, ${Ua(this.g)}, ${Ua(this.b)}${e===1?")":`, ${e})`}`}function lf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ua(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oa(e){return e=Ua(e),(e<16?"0":"")+e.toString(16)}function ES(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new on(e,t,r,n)}function rC(e){if(e instanceof on)return new on(e.h,e.s,e.l,e.opacity);if(e instanceof Iu||(e=uu(e)),!e)return new on;if(e instanceof on)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,u=o-i,d=(o+i)/2;return u?(t===o?s=(r-n)/u+(r0&&d<1?0:s,new on(s,u,d,e.opacity)}function _8(e,t,r,n){return arguments.length===1?rC(e):new on(e,t,r,n??1)}function on(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ry(on,_8,tC(Iu,{brighter(e){return e=e==null?of:Math.pow(of,e),new on(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?lu:Math.pow(lu,e),new on(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new gr(ev(e>=240?e-240:e+120,i,n),ev(e,i,n),ev(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new on(PS(this.h),pd(this.s),pd(this.l),lf(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=lf(this.opacity);return`${e===1?"hsl(":"hsla("}${PS(this.h)}, ${pd(this.s)*100}%, ${pd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PS(e){return e=(e||0)%360,e<0?e+360:e}function pd(e){return Math.max(0,Math.min(1,e||0))}function ev(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const $y=e=>()=>e;function N8(e,t){return function(r){return e+r*t}}function I8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function M8(e){return(e=+e)==1?nC:function(t,r){return r-t?I8(t,r,e):$y(isNaN(t)?r:t)}}function nC(e,t){var r=t-e;return r?N8(e,r):$y(isNaN(e)?t:e)}const AS=(function e(t){var r=M8(t);function n(i,o){var s=r((i=xg(i)).r,(o=xg(o)).r),u=r(i.g,o.g),d=r(i.b,o.b),f=nC(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=u(h),i.b=d(h),i.opacity=f(h),i+""}}return n.gamma=e,n})(1);function T8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),u[s]?u[s]+=o:u[++s]=o),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,d.push({i:s,x:sf(n,i)})),r=tv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function K8(e,t,r){var n=e[0],i=e[1],o=t[0],s=t[1];return i2?V8:K8,d=f=null,m}function m(v){return v==null||isNaN(v=+v)?o:(d||(d=u(e.map(n),t,r)))(n(s(v)))}return m.invert=function(v){return s(i((f||(f=u(t,e.map(n),sf)))(v)))},m.domain=function(v){return arguments.length?(e=Array.from(v,uf),h()):e.slice()},m.range=function(v){return arguments.length?(t=Array.from(v),h()):t.slice()},m.rangeRound=function(v){return t=Array.from(v),r=Ly,h()},m.clamp=function(v){return arguments.length?(s=v?!0:ir,h()):s!==ir},m.interpolate=function(v){return arguments.length?(r=v,h()):r},m.unknown=function(v){return arguments.length?(o=v,m):o},function(v,b){return n=v,i=b,h()}}function zy(){return gh()(ir,ir)}function q8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function cf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function gl(e){return e=cf(Math.abs(e)),e?e[1]:NaN}function G8(e,t){return function(r,n){for(var i=r.length,o=[],s=0,u=e[0],d=0;i>0&&u>0&&(d+u+1>n&&(u=Math.max(1,n-d)),o.push(r.substring(i-=u,i+u)),!((d+=u+1)>n));)u=e[s=(s+1)%e.length];return o.reverse().join(t)}}function Y8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Q8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cu(e){if(!(t=Q8.exec(e)))throw new Error("invalid format: "+e);var t;return new Fy({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]})}cu.prototype=Fy.prototype;function Fy(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+""}Fy.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 X8(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var df;function Z8(e,t){var r=cf(e,t);if(!r)return df=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(df=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+cf(e,Math.max(0,t+o-1))[0]}function CS(e,t){var r=cf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const jS={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:q8,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)=>CS(e*100,t),r:CS,s:Z8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _S(e){return e}var NS=Array.prototype.map,IS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function J8(e){var t=e.grouping===void 0||e.thousands===void 0?_S:G8(NS.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?_S:Y8(NS.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function f(m,v){m=cu(m);var b=m.fill,S=m.align,k=m.sign,E=m.symbol,P=m.zero,j=m.width,_=m.comma,O=m.precision,N=m.trim,C=m.type;C==="n"?(_=!0,C="g"):jS[C]||(O===void 0&&(O=12),N=!0,C="g"),(P||b==="0"&&S==="=")&&(P=!0,b="0",S="=");var R=(v&&v.prefix!==void 0?v.prefix:"")+(E==="$"?r:E==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),z=(E==="$"?n:/[%p]/.test(C)?s:"")+(v&&v.suffix!==void 0?v.suffix:""),F=jS[C],V=/[defgprs%]/.test(C);O=O===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function Q(B){var ue=R,G=z,le,fe,de;if(C==="c")G=F(B)+G,B="";else{B=+B;var Y=B<0||1/B<0;if(B=isNaN(B)?d:F(Math.abs(B),O),N&&(B=X8(B)),Y&&+B==0&&k!=="+"&&(Y=!1),ue=(Y?k==="("?k:u:k==="-"||k==="("?"":k)+ue,G=(C==="s"&&!isNaN(B)&&df!==void 0?IS[8+df/3]:"")+G+(Y&&k==="("?")":""),V){for(le=-1,fe=B.length;++lede||de>57){G=(de===46?i+B.slice(le+1):B.slice(le))+G,B=B.slice(0,le);break}}}_&&!P&&(B=t(B,1/0));var ae=ue.length+B.length+G.length,X=ae>1)+ue+B+G+X.slice(ae);break;default:B=X+ue+B+G;break}return o(B)}return Q.toString=function(){return m+""},Q}function h(m,v){var b=Math.max(-8,Math.min(8,Math.floor(gl(v)/3)))*3,S=Math.pow(10,-b),k=f((m=cu(m),m.type="f",m),{suffix:IS[8+b/3]});return function(E){return k(S*E)}}return{format:f,formatPrefix:h}}var md,By,iC;eB({thousands:",",grouping:[3],currency:["$",""]});function eB(e){return md=J8(e),By=md.format,iC=md.formatPrefix,md}function tB(e){return Math.max(0,-gl(Math.abs(e)))}function rB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gl(t)/3)))*3-gl(Math.abs(e)))}function nB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gl(t)-gl(e))+1}function aC(e,t,r,n){var i=gg(e,t,r),o;switch(n=cu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=rB(i,s))&&(n.precision=o),iC(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=nB(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=tB(i))&&(n.precision=o-(n.type==="%")*2);break}}return By(n)}function ra(e){var t=e.domain;return e.ticks=function(r){var n=t();return mg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return aC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,s=n[i],u=n[o],d,f,h=10;for(u0;){if(f=vg(s,u,r),f===d)return n[i]=s,n[o]=u,t(n);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;d=f}return e},e}function oC(){var e=zy();return e.copy=function(){return Mu(e,oC())},Kr.apply(e,arguments),ra(e)}function lC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,uf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return lC(e).unknown(t)},e=arguments.length?Array.from(e,uf):[0,1],ra(r)}function sC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],s;return oMath.pow(e,t)}function sB(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 DS(e){return(t,r)=>-e(-t,r)}function Uy(e){const t=e(MS,TS),r=t.domain;let n=10,i,o;function s(){return i=sB(n),o=lB(n),r()[0]<0?(i=DS(i),o=DS(o),e(iB,aB)):e(MS,TS),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const d=r();let f=d[0],h=d[d.length-1];const m=h0){for(;v<=b;++v)for(S=1;Sh)break;P.push(k)}}else for(;v<=b;++v)for(S=n-1;S>=1;--S)if(k=v>0?S/o(-v):S*o(v),!(kh)break;P.push(k)}P.length*2{if(u==null&&(u=10),d==null&&(d=n===10?"s":","),typeof d!="function"&&(!(n%1)&&(d=cu(d)).precision==null&&(d.trim=!0),d=By(d)),u===1/0)return d;const f=Math.max(1,n*u/t.ticks().length);return h=>{let m=h/o(Math.round(i(h)));return m*nr(sC(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function uC(){const e=Uy(gh()).domain([1,10]);return e.copy=()=>Mu(e,uC()).base(e.base()),Kr.apply(e,arguments),e}function RS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function $S(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Wy(e){var t=1,r=e(RS(t),$S(t));return r.constant=function(n){return arguments.length?e(RS(t=+n),$S(t)):t},ra(r)}function cC(){var e=Wy(gh());return e.copy=function(){return Mu(e,cC()).constant(e.constant())},Kr.apply(e,arguments)}function LS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function uB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function cB(e){return e<0?-e*e:e*e}function Hy(e){var t=e(ir,ir),r=1;function n(){return r===1?e(ir,ir):r===.5?e(uB,cB):e(LS(r),LS(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ra(t)}function Ky(){var e=Hy(gh());return e.copy=function(){return Mu(e,Ky()).exponent(e.exponent())},Kr.apply(e,arguments),e}function dB(){return Ky.apply(null,arguments).exponent(.5)}function zS(e){return Math.sign(e)*e*e}function fB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function dC(){var e=zy(),t=[0,1],r=!1,n;function i(o){var s=fB(e(o));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(o){return e.invert(zS(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,uf)).map(zS)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return dC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Kr.apply(i,arguments),ra(i)}function fC(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[f-1],n[f]]},s.unknown=function(d){return arguments.length&&(o=d),s},s.thresholds=function(){return n.slice()},s.copy=function(){return hC().domain([e,t]).range(i).unknown(o)},Kr.apply(ra(s),arguments)}function pC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Nu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return pC().domain(e).range(t).unknown(r)},Kr.apply(i,arguments)}const rv=new Date,nv=new Date;function Et(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),u=i.ceil(o);return o-s(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,u)=>{const d=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return d;let f;do d.push(f=new Date(+o)),t(o,u),e(o);while(fEt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!o(s););else for(;--u>=0;)for(;t(s,1),!o(s););}),r&&(i.count=(o,s)=>(rv.setTime(+o),nv.setTime(+s),e(rv),e(nv),Math.floor(r(rv,nv))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?s=>n(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const ff=Et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ff.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Et(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ff);ff.range;const Xn=1e3,Fr=Xn*60,Zn=Fr*60,ni=Zn*24,Vy=ni*7,FS=ni*30,iv=ni*365,Ca=Et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getUTCSeconds());Ca.range;const qy=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xn)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getMinutes());qy.range;const Gy=Et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCMinutes());Gy.range;const Yy=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xn-e.getMinutes()*Fr)},(e,t)=>{e.setTime(+e+t*Zn)},(e,t)=>(t-e)/Zn,e=>e.getHours());Yy.range;const Qy=Et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Zn)},(e,t)=>(t-e)/Zn,e=>e.getUTCHours());Qy.range;const Tu=Et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/ni,e=>e.getDate()-1);Tu.range;const yh=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ni,e=>e.getUTCDate()-1);yh.range;const mC=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ni,e=>Math.floor(e/ni));mC.range;function eo(e){return Et(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Fr)/Vy)}const xh=eo(0),hf=eo(1),hB=eo(2),pB=eo(3),yl=eo(4),mB=eo(5),vB=eo(6);xh.range;hf.range;hB.range;pB.range;yl.range;mB.range;vB.range;function to(e){return Et(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Vy)}const bh=to(0),pf=to(1),gB=to(2),yB=to(3),xl=to(4),xB=to(5),bB=to(6);bh.range;pf.range;gB.range;yB.range;xl.range;xB.range;bB.range;const Xy=Et(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());Xy.range;const Zy=Et(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());Zy.range;const ii=Et(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());ii.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ii.range;const ai=Et(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());ai.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ai.range;function vC(e,t,r,n,i,o){const s=[[Ca,1,Xn],[Ca,5,5*Xn],[Ca,15,15*Xn],[Ca,30,30*Xn],[o,1,Fr],[o,5,5*Fr],[o,15,15*Fr],[o,30,30*Fr],[i,1,Zn],[i,3,3*Zn],[i,6,6*Zn],[i,12,12*Zn],[n,1,ni],[n,2,2*ni],[r,1,Vy],[t,1,FS],[t,3,3*FS],[e,1,iv]];function u(f,h,m){const v=hE).right(s,v);if(b===s.length)return e.every(gg(f/iv,h/iv,m));if(b===0)return ff.every(Math.max(gg(f,h,m),1));const[S,k]=s[v/s[b-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?($e=ov(Ts(ne.y,0,1)),Pe=$e.getUTCDay(),$e=Pe>4||Pe===0?pf.ceil($e):pf($e),$e=yh.offset($e,(ne.V-1)*7),ne.y=$e.getUTCFullYear(),ne.m=$e.getUTCMonth(),ne.d=$e.getUTCDate()+(ne.w+6)%7):($e=av(Ts(ne.y,0,1)),Pe=$e.getDay(),$e=Pe>4||Pe===0?hf.ceil($e):hf($e),$e=Tu.offset($e,(ne.V-1)*7),ne.y=$e.getFullYear(),ne.m=$e.getMonth(),ne.d=$e.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Pe="Z"in ne?ov(Ts(ne.y,0,1)).getUTCDay():av(Ts(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Pe+5)%7:ne.w+ne.U*7-(Pe+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,ov(ne)):av(ne)}}function z(J,we,Ae,ne){for(var lt=0,$e=we.length,Pe=Ae.length,vt,lr;lt<$e;){if(ne>=Pe)return-1;if(vt=we.charCodeAt(lt++),vt===37){if(vt=we.charAt(lt++),lr=N[vt in BS?we.charAt(lt++):vt],!lr||(ne=lr(J,Ae,ne))<0)return-1}else if(vt!=Ae.charCodeAt(ne++))return-1}return ne}function F(J,we,Ae){var ne=f.exec(we.slice(Ae));return ne?(J.p=h.get(ne[0].toLowerCase()),Ae+ne[0].length):-1}function V(J,we,Ae){var ne=b.exec(we.slice(Ae));return ne?(J.w=S.get(ne[0].toLowerCase()),Ae+ne[0].length):-1}function Q(J,we,Ae){var ne=m.exec(we.slice(Ae));return ne?(J.w=v.get(ne[0].toLowerCase()),Ae+ne[0].length):-1}function B(J,we,Ae){var ne=P.exec(we.slice(Ae));return ne?(J.m=j.get(ne[0].toLowerCase()),Ae+ne[0].length):-1}function ue(J,we,Ae){var ne=k.exec(we.slice(Ae));return ne?(J.m=E.get(ne[0].toLowerCase()),Ae+ne[0].length):-1}function G(J,we,Ae){return z(J,t,we,Ae)}function le(J,we,Ae){return z(J,r,we,Ae)}function fe(J,we,Ae){return z(J,n,we,Ae)}function de(J){return s[J.getDay()]}function Y(J){return o[J.getDay()]}function ae(J){return d[J.getMonth()]}function X(J){return u[J.getMonth()]}function M(J){return i[+(J.getHours()>=12)]}function T(J){return 1+~~(J.getMonth()/3)}function Z(J){return s[J.getUTCDay()]}function se(J){return o[J.getUTCDay()]}function te(J){return d[J.getUTCMonth()]}function ce(J){return u[J.getUTCMonth()]}function ge(J){return i[+(J.getUTCHours()>=12)]}function _e(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var we=C(J+="",_);return we.toString=function(){return J},we},parse:function(J){var we=R(J+="",!1);return we.toString=function(){return J},we},utcFormat:function(J){var we=C(J+="",O);return we.toString=function(){return J},we},utcParse:function(J){var we=R(J+="",!0);return we.toString=function(){return J},we}}}var BS={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,AB=/^%/,OB=/[\\^$*+?|[\]().{}]/g;function Ke(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function jB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function _B(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function NB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function IB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function MB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function US(e,t,r){var n=Tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function WS(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function TB(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function DB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function RB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function HS(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function $B(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function KS(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function LB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function zB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function FB(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function BB(e,t,r){var n=Tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function UB(e,t,r){var n=AB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function WB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function HB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function VS(e,t){return Ke(e.getDate(),t,2)}function KB(e,t){return Ke(e.getHours(),t,2)}function VB(e,t){return Ke(e.getHours()%12||12,t,2)}function qB(e,t){return Ke(1+Tu.count(ii(e),e),t,3)}function gC(e,t){return Ke(e.getMilliseconds(),t,3)}function GB(e,t){return gC(e,t)+"000"}function YB(e,t){return Ke(e.getMonth()+1,t,2)}function QB(e,t){return Ke(e.getMinutes(),t,2)}function XB(e,t){return Ke(e.getSeconds(),t,2)}function ZB(e){var t=e.getDay();return t===0?7:t}function JB(e,t){return Ke(xh.count(ii(e)-1,e),t,2)}function yC(e){var t=e.getDay();return t>=4||t===0?yl(e):yl.ceil(e)}function eU(e,t){return e=yC(e),Ke(yl.count(ii(e),e)+(ii(e).getDay()===4),t,2)}function tU(e){return e.getDay()}function rU(e,t){return Ke(hf.count(ii(e)-1,e),t,2)}function nU(e,t){return Ke(e.getFullYear()%100,t,2)}function iU(e,t){return e=yC(e),Ke(e.getFullYear()%100,t,2)}function aU(e,t){return Ke(e.getFullYear()%1e4,t,4)}function oU(e,t){var r=e.getDay();return e=r>=4||r===0?yl(e):yl.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function lU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function qS(e,t){return Ke(e.getUTCDate(),t,2)}function sU(e,t){return Ke(e.getUTCHours(),t,2)}function uU(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function cU(e,t){return Ke(1+yh.count(ai(e),e),t,3)}function xC(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function dU(e,t){return xC(e,t)+"000"}function fU(e,t){return Ke(e.getUTCMonth()+1,t,2)}function hU(e,t){return Ke(e.getUTCMinutes(),t,2)}function pU(e,t){return Ke(e.getUTCSeconds(),t,2)}function mU(e){var t=e.getUTCDay();return t===0?7:t}function vU(e,t){return Ke(bh.count(ai(e)-1,e),t,2)}function bC(e){var t=e.getUTCDay();return t>=4||t===0?xl(e):xl.ceil(e)}function gU(e,t){return e=bC(e),Ke(xl.count(ai(e),e)+(ai(e).getUTCDay()===4),t,2)}function yU(e){return e.getUTCDay()}function xU(e,t){return Ke(pf.count(ai(e)-1,e),t,2)}function bU(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function wU(e,t){return e=bC(e),Ke(e.getUTCFullYear()%100,t,2)}function kU(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function SU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?xl(e):xl.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function EU(){return"+0000"}function GS(){return"%"}function YS(e){return+e}function QS(e){return Math.floor(+e/1e3)}var Ro,wC,kC;PU({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 PU(e){return Ro=PB(e),wC=Ro.format,Ro.parse,kC=Ro.utcFormat,Ro.utcParse,Ro}function AU(e){return new Date(e)}function OU(e){return e instanceof Date?+e:+new Date(+e)}function Jy(e,t,r,n,i,o,s,u,d,f){var h=zy(),m=h.invert,v=h.domain,b=f(".%L"),S=f(":%S"),k=f("%I:%M"),E=f("%I %p"),P=f("%a %d"),j=f("%b %d"),_=f("%B"),O=f("%Y");function N(C){return(d(C)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>m8(e,o/n))},r.copy=function(){return AC(t).domain(e)},si.apply(r,arguments)}function kh(){var e=0,t=.5,r=1,n=1,i,o,s,u,d,f=ir,h,m=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+h(k))-o)*(n*k{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return TU(n)?n:"point"}};function DU(e,t){for(var r=0,n=e.length,i=e[0]t)?r=o+1:n=o}return r}function IC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var s;return(s=e(o))!==null&&s!==void 0?s:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var s,u,d=DU(n,o);if(d<=0)return r[0];if(d>=r.length)return r[r.length-1];var f=(s=n[d-1])!==null&&s!==void 0?s:0,h=(u=n[d])!==null&&u!==void 0?u:0;return Math.abs(o-f)<=Math.abs(o-h)?r[d-1]:r[d]}}}function RU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):IC(e,void 0)}function ZS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],ui=(e,t)=>{var r=TC(e,t);return r??kt},St={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:kg,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,niceTicks:"auto",width:Au},DC=(e,t)=>e.cartesianAxis.yAxis[t],ci=(e,t)=>{var r=DC(e,t);return r??St},HU={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:""},n0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??HU},or=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return ci(e,r);case"zAxis":return n0(e,r);case"angleAxis":return Oy(e,r);case"radiusAxis":return Cy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},KU=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return ci(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Du=(e,t,r)=>{switch(t){case"xAxis":return ui(e,r);case"yAxis":return ci(e,r);case"angleAxis":return Oy(e,r);case"radiusAxis":return Cy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},RC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function $C(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var LC=e=>e.graphicalItems.cartesianItems,VU=H([It,ph],$C),zC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Il=H([LC,or,VU],zC,{memoizeOptions:{resultEqualityCheck:vh}}),FC=H([Il],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Ny)),BC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),qU=H([Il],BC),UC=e=>e.map(t=>t.data).filter(Boolean).flat(1),GU=H([Il],e=>e.some(t=>!t.data)),WC=H([Il],UC,{memoizeOptions:{resultEqualityCheck:vh}}),HC=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},i0=H([WC,uh],HC),YU=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Nt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Nt(i,n)}))):e.map(n=>({value:n})),KC=(e,t,r,n,i,o)=>{var s=n.chartData,u=s===void 0?[]:s,d=n.dataStartIndex,f=n.dataEndIndex,h=YU(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var m=u.slice(d,f+1),v=m.map(b=>({value:Nt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...h]}return h},Ru=H([i0,or,Il,uh,GU,WC],KC);function Jo(e){if(_n(e)||e instanceof Date){var t=Number(e);if(Fe(t))return t}}function eE(e){if(Array.isArray(e)){var t=[Jo(e[0]),Jo(e[1])];return On(t)?t:void 0}var r=Jo(e);if(r!=null)return[r,r]}function Mn(e){return e.map(Jo).filter(vr)}function QU(e,t){var r=Jo(e),n=Jo(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var XU=H([Ru],e=>e==null?void 0:e.map(t=>t.value).sort(QU));function VC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ZU(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!jn(t))n=t;else if(Array.isArray(t)){var i=Mn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Mn(r.flatMap(o=>{var s=Nt(e,o.dataKey),u,d;if(Array.isArray(s)){var f=MC(s,2);u=f[0],d=f[1]}else u=d=s;if(!(!Fe(u)||!Fe(d)))return[n-u,n+d]}))}var Pt=e=>{var t=Mt(e),r=_l(e);return Du(e,t,r)},bl=H([Pt],e=>e==null?void 0:e.dataKey),JU=H([FC,uh,Pt],QO),qC=(e,t,r,n)=>{var i={},o=t.reduce((s,u)=>{if(u.stackId==null)return s;var d=s[u.stackId];return d==null&&(d=[]),d.push(u),s[u.stackId]=d,s},i);return Object.fromEntries(Object.entries(o).map(s=>{var u=MC(s,2),d=u[0],f=u[1],h=n?[...f].reverse():f,m=h.map(_y);return[d,{stackedData:gL(e,m,r),graphicalItems:h}]}))},GC=H([JU,FC,ch,WO],qC),YC=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return wL(e,i,o)},e7=H([or],e=>e.allowDataOverflow),a0=e=>{var t;if(e==null||!("domain"in e))return kg;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Mn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:kg},QC=H([or],a0),XC=H([QC,e7],IO),t7=H([GC,dn,It,XC],YC,{memoizeOptions:{resultEqualityCheck:mh}}),o0=e=>e.errorBars,r7=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>VC(r,n)),vf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],u,d;if(n.length>0&&n.forEach(f=>{var h,m=f.data!=null?[...f.data]:s,v=(h=i[f.id])===null||h===void 0?void 0:h.filter(b=>VC(o,b));m.forEach(b=>{var S,k=Nt(b,(S=r.dataKey)!==null&&S!==void 0?S:f.dataKey),E=ZU(b,k,v);if(E.length>=2){var P=Math.min(...E),j=Math.max(...E);(u==null||Pd)&&(d=j)}var _=eE(k);_!=null&&(u=u==null?_[0]:Math.min(u,_[0]),d=d==null?_[1]:Math.max(d,_[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(f=>{var h=eE(Nt(f,r.dataKey));h!=null&&(u=u==null?h[0]:Math.min(u,h[0]),d=d==null?h[1]:Math.max(d,h[1]))}),Fe(u)&&Fe(d))return[u,d]},n7=H([i0,or,qU,o0,It,M6],ZC,{memoizeOptions:{resultEqualityCheck:mh}});function i7(e){var t=e.value;if(_n(t)||t instanceof Date)return t}var a7=(e,t,r)=>{var n=e.map(i7).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&u2(n))?NO(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},JC=e=>e.referenceElements.dots,Ml=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),o7=H([JC,It,ph],Ml),ej=e=>e.referenceElements.areas,l7=H([ej,It,ph],Ml),tj=e=>e.referenceElements.lines,s7=H([tj,It,ph],Ml),rj=(e,t)=>{if(e!=null){var r=Mn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},u7=H(o7,It,rj),nj=(e,t)=>{if(e!=null){var r=Mn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},c7=H([l7,It],nj);function d7(e){var t;if(e.x!=null)return Mn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Mn(r)}function f7(e){var t;if(e.y!=null)return Mn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Mn(r)}var ij=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?d7(n):f7(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},h7=H([s7,It],ij),p7=H(u7,h7,c7,(e,t,r)=>vf(e,r,t)),aj=(e,t,r,n,i,o,s,u)=>{if(r!=null)return r;var d=s==="vertical"&&u==="xAxis"||s==="horizontal"&&u==="yAxis",f=d?vf(n,o,i):vf(o,i);return z6(t,f,e.allowDataOverflow)},m7=H([or,QC,XC,t7,n7,p7,ot,It],aj,{memoizeOptions:{resultEqualityCheck:mh}}),v7=[0,1],oj=(e,t,r,n,i,o,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var u=e.dataKey,d=e.type,f=Tn(t,o);if(f&&u==null){var h;return NO(0,(h=r==null?void 0:r.length)!==null&&h!==void 0?h:0)}return d==="category"?a7(n,e,f):i==="expand"&&!f?v7:s}},l0=H([or,ot,i0,Ru,ch,It,m7],oj),Tl=H([or,RC,Ey],NC),lj=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=a0(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&On(e)){if(o)return uS(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return cS(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&On(e))return uS(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&On(e))return cS(e,t.tickCount,t.allowDecimals,"adaptive")}}},s0=H([l0,Du,Tl],lj),sj=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&On(t)&&Array.isArray(r)&&r.length>0){var i,o,s=t[0],u=(i=r[0])!==null&&i!==void 0?i:0,d=t[1],f=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(s,u),Math.max(d,f)]}return t},g7=H([or,l0,s0,It],sj),y7=H(Ru,or,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Mn(e.map(m=>m.value))).sort((m,v)=>m-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var s=o-i;if(s===0)return 1/0;for(var u=0;ui,(e,t,r,n,i)=>{if(!Fe(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var s=ta(r,e*o),u=e*o/2;return u-s-(u-s)/o*s}return 0}),x7=(e,t,r)=>{var n=ui(e,t);return n==null||typeof n.padding!="string"?0:uj(e,"xAxis",t,r,n.padding)},b7=(e,t,r)=>{var n=ci(e,t);return n==null||typeof n.padding!="string"?0:uj(e,"yAxis",t,r,n.padding)},w7=H(ui,x7,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),k7=H(ci,b7,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),cj=H([Kt,w7,nh,rh,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),dj=H([Kt,ot,k7,nh,rh,(e,t,r)=>r],(e,t,r,n,i,o)=>{var s=i.padding;return o?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),$u=(e,t,r,n)=>{var i;switch(t){case"xAxis":return cj(e,r,n);case"yAxis":return dj(e,r,n);case"zAxis":return(i=n0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return qO(e);case"radiusAxis":return GO(e,r);default:return}},fj=H([or,$u],dh),S7=H([Tl,g7],n8),u0=H([or,Tl,S7,fj],r0),hj=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,s=Tn(e,n);if(s&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},c0=H([ot,Ru,Du,It],hj),Sh=H([u0],Iy);H([u0],RU);H([u0,XU],IC);H([Il,o0,It],r7);function pj(e,t){return e.idt.id?1:0}var Eh=(e,t)=>t,Ph=(e,t,r)=>r,E7=H(eh,Eh,Ph,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(pj)),P7=H(th,Eh,Ph,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(pj)),mj=(e,t)=>({width:e.width,height:t.height}),A7=(e,t)=>{var r=typeof t.width=="number"?t.width:Au;return{width:r,height:e.height}},O7=H(Kt,ui,mj),C7=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},j7=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},_7=H(li,Kt,E7,Eh,Ph,(e,t,r,n,i)=>{var o={},s;return r.forEach(u=>{var d=mj(t,u);s==null&&(s=C7(t,n,e));var f=n==="top"&&!i||n==="bottom"&&i;o[u.id]=s-Number(f)*d.height,s+=(f?-1:1)*d.height}),o}),N7=H(oi,Kt,P7,Eh,Ph,(e,t,r,n,i)=>{var o={},s;return r.forEach(u=>{var d=A7(t,u);s==null&&(s=j7(t,n,e));var f=n==="left"&&!i||n==="right"&&i;o[u.id]=s-Number(f)*d.width,s+=(f?-1:1)*d.width}),o}),I7=(e,t)=>{var r=ui(e,t);if(r!=null)return _7(e,r.orientation,r.mirror)},M7=H([Kt,ui,I7,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),T7=(e,t)=>{var r=ci(e,t);if(r!=null)return N7(e,r.orientation,r.mirror)},D7=H([Kt,ci,T7,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),R7=H(Kt,ci,(e,t)=>{var r=typeof t.width=="number"?t.width:Au;return{width:r,height:e.height}}),vj=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,s=r.dataKey,u=Tn(e,n),d=t.map(h=>h.value),f=d.filter(h=>h!=null);if(s&&u&&o==="category"&&i&&u2(f))return d}},d0=H([ot,Ru,or,It],vj),tE=H([ot,KU,Tl,Sh,d0,c0,$u,s0,It],(e,t,r,n,i,o,s,u,d)=>{if(t!=null){var f=Tn(e,d);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:d,categoricalDomain:o,duplicateDomain:i,isCategorical:f,niceTicks:u,range:s,realScaleType:r,scale:n}}}),$7=(e,t,r,n,i,o,s,u,d)=>{if(!(t==null||n==null)){var f=Tn(e,d),h=t.type,m=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,S=h==="category"&&n.bandwidth?n.bandwidth()/b:0;S=d==="angleAxis"&&o!=null&&o.length>=2?Lr(o[0]-o[1])*2*S:S;var k=m||i;return k?k.map((E,P)=>{var j=s?s.indexOf(E):E,_=n.map(j);return Fe(_)?{index:P,coordinate:_+S,value:E,offset:S}:null}).filter(vr):f&&u?u.map((E,P)=>{var j=n.map(E);return Fe(j)?{coordinate:j+S,value:E,index:P,offset:S}:null}).filter(vr):n.ticks?n.ticks(v).map((E,P)=>{var j=n.map(E);return Fe(j)?{coordinate:j+S,value:E,index:P,offset:S}:null}).filter(vr):n.domain().map((E,P)=>{var j=n.map(E);return Fe(j)?{coordinate:j+S,value:s?s[E]:E,index:P,offset:S}:null}).filter(vr)}},gj=H([ot,Du,Tl,Sh,s0,$u,d0,c0,It],$7),L7=(e,t,r,n,i,o,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Tn(e,s),d=t.tickCount,f=0;return f=s==="angleAxis"&&(n==null?void 0:n.length)>=2?Lr(n[0]-n[1])*2*f:f,u&&o?o.map((h,m)=>{var v=r.map(h);return Fe(v)?{coordinate:v+f,value:h,index:m,offset:f}:null}).filter(vr):r.ticks?r.ticks(d).map((h,m)=>{var v=r.map(h);return Fe(v)?{coordinate:v+f,value:h,index:m,offset:f}:null}).filter(vr):r.domain().map((h,m)=>{var v=r.map(h);return Fe(v)?{coordinate:v+f,value:i?i[h]:h,index:m,offset:f}:null}).filter(vr)}},yj=H([ot,Du,Sh,$u,d0,c0,It],L7),xj=H(or,Sh,(e,t)=>{if(!(e==null||t==null))return mf(mf({},e),{},{scale:t})}),z7=H([or,Tl,l0,fj],r0),F7=H([z7],Iy);H((e,t,r)=>n0(e,r),F7,(e,t)=>{if(!(e==null||t==null))return mf(mf({},e),{},{scale:t})});var B7=H([ot,eh,th],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),U7=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};H([U7],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var s=Math.abs(o.coordinate-t);se.options.defaultTooltipEventType,wj=e=>e.options.validateTooltipEventTypes;function kj(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Lu(e,t){var r=bj(e),n=wj(e);return kj(t,r,n)}function W7(e){return Ee(t=>Lu(t,e))}var Sj=(e,t)=>{var r,n=Number(t);if(!(jn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},H7=e=>e.tooltip.settings,Fi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},K7={itemInteraction:{click:Fi,hover:Fi},axisInteraction:{click:Fi,hover:Fi},keyboardInteraction:Fi,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}},Ej=Jt({name:"tooltip",initialState:K7,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:rt()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:rt()},removeTooltipEntrySettings:{reducer(e,t){var r=zr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:rt()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,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.syncInteraction.sourceViewBox=void 0,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.syncInteraction.sourceViewBox=void 0,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.syncInteraction.sourceViewBox=void 0,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}}}),Vr=Ej.actions,V7=Vr.addTooltipEntrySettings,q7=Vr.replaceTooltipEntrySettings,G7=Vr.removeTooltipEntrySettings,Y7=Vr.setTooltipSettingsState,Q7=Vr.setActiveMouseOverItemIndex;Vr.mouseLeaveItem;var Pj=Vr.mouseLeaveChart;Vr.setActiveClickItemIndex;var Aj=Vr.setMouseOverAxisIndex,X7=Vr.setMouseClickAxisIndex,Bs=Vr.setSyncInteraction,gf=Vr.setKeyboardInteraction,Z7=Ej.reducer;function rE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vd(e){for(var t=1;t{if(t==null)return Fi;var i=r9(e,t,r);if(i==null)return Fi;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(n9(i)){if(o)return vd(vd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return vd(vd({},Fi),{},{coordinate:i.coordinate})};function i9(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 r=Number(e);return Number.isFinite(r)?r:void 0}function a9(e,t){var r=i9(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),s=Math.max(n,i);return r>=o&&r<=s}function o9(e,t,r){if(r==null||t==null)return!0;var n=Nt(e,t);return n==null||!On(r)?!0:a9(n,r)}var Ws=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Fe(o))return i;var s=0,u=1/0;t.length>0&&(u=t.length-1);var d=Math.max(s,Math.min(o,u)),f=t[d];return f==null||o9(f,r,n)?String(d):null},Cj=(e,t,r,n,i,o,s)=>{if(o!=null){var u=s[0],d=u==null?void 0:u.getPosition(o);if(d!=null)return d;var f=i==null?void 0:i[Number(o)];if(f)switch(r){case"horizontal":return{x:f.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:f.coordinate}}}},jj=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(s=>{var u;return((u=s.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},_j=e=>e.options.tooltipPayloadSearcher,Dl=e=>e.tooltip;function nE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iE(e){for(var t=1;te(t)}function aE(e){if(typeof e=="string")return e}function h9(e){if(!(e==null||typeof e!="object")){var t="name"in e?c9(e.name):void 0,r="unit"in e?d9(e.unit):void 0,n="dataKey"in e?f9(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?aE(e.color):void 0,s="fill"in e?aE(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:s}}}function p9(e,t){return e??t}var Nj=(e,t,r,n,i,o,s)=>{if(!(t==null||o==null)){var u=r.chartData,d=r.computedData,f=r.dataStartIndex,h=r.dataEndIndex,m=[];return e.reduce((v,b)=>{var S,k=b.dataDefinedOnItem,E=b.settings,P=p9(k,u),j=Array.isArray(P)?rO(P,f,h):P,_=(S=E==null?void 0:E.dataKey)!==null&&S!==void 0?S:n,O=E==null?void 0:E.nameKey,N;if(n&&Array.isArray(j)&&!Array.isArray(j[0])&&s==="axis"?N=c2(j,n,i):N=o(j,t,d,O),Array.isArray(N))N.forEach(R=>{var z,F,V=h9(R),Q=V==null?void 0:V.name,B=V==null?void 0:V.dataKey,ue=V==null?void 0:V.payload,G=iE(iE({},E),{},{name:Q,unit:V==null?void 0:V.unit,color:(z=V==null?void 0:V.color)!==null&&z!==void 0?z:E==null?void 0:E.color,fill:(F=V==null?void 0:V.fill)!==null&&F!==void 0?F:E==null?void 0:E.fill});v.push(Jw({tooltipEntrySettings:G,dataKey:B,payload:ue,value:Nt(ue,B),name:Q==null?void 0:String(Q)}))});else{var C;v.push(Jw({tooltipEntrySettings:E,dataKey:_,payload:N,value:Nt(N,_),name:(C=Nt(N,O))!==null&&C!==void 0?C:E==null?void 0:E.name}))}return v},m)}},f0=H([Pt,RC,Ey],NC),m9=H([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),v9=H([Mt,_l],$C),ro=H([m9,Pt,v9],zC,{memoizeOptions:{resultEqualityCheck:vh}}),g9=H([ro],e=>e.filter(Ny)),Ij=H([ro],UC,{memoizeOptions:{resultEqualityCheck:vh}}),y9=H([ro],e=>e.some(t=>!t.data)),Qa=H([Ij,dn],HC),x9=H([g9,dn,Pt],QO),h0=H([Qa,Pt,ro,dn,y9,Ij],KC),Mj=H([Pt],a0),b9=H([Pt],e=>e.allowDataOverflow),Tj=H([Mj,b9],IO),w9=H([ro],e=>e.filter(Ny)),k9=H([x9,w9,ch,WO],qC),S9=H([k9,dn,Mt,Tj],YC),E9=H([ro],BC),P9=H([Qa,Pt,E9,o0,Mt,T6],ZC,{memoizeOptions:{resultEqualityCheck:mh}}),A9=H([JC,Mt,_l],Ml),O9=H([A9,Mt],rj),C9=H([ej,Mt,_l],Ml),j9=H([C9,Mt],nj),_9=H([tj,Mt,_l],Ml),N9=H([_9,Mt],ij),I9=H([O9,N9,j9],vf),M9=H([Pt,Mj,Tj,S9,P9,I9,ot,Mt],aj),wl=H([Pt,ot,Qa,h0,ch,Mt,M9],oj),T9=H([wl,Pt,f0],lj),D9=H([Pt,wl,T9,Mt],sj),Dj=e=>{var t=Mt(e),r=_l(e),n=!1;return $u(e,t,r,n)},Rj=H([Pt,Dj],dh),R9=H([Pt,f0,D9,Rj],r0),$j=H([R9],Iy),$9=H([ot,h0,Pt,Mt],vj),L9=H([ot,h0,Pt,Mt],hj),z9=(e,t,r,n,i,o,s,u)=>{if(t){var d=t.type,f=Tn(e,u);if(n){var h=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,m=d==="category"&&n.bandwidth?n.bandwidth()/h:0;return m=u==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Lr(i[0]-i[1])*2*m:m,f&&s?s.map((v,b)=>{var S=n.map(v);return Fe(S)?{coordinate:S+m,value:v,index:b,offset:m}:null}).filter(vr):n.domain().map((v,b)=>{var S=n.map(v);return Fe(S)?{coordinate:S+m,value:o?o[v]:v,index:b,offset:m}:null}).filter(vr)}}},di=H([ot,Pt,f0,$j,Dj,$9,L9,Mt],z9),p0=H([bj,wj,H7],(e,t,r)=>kj(r.shared,e,t)),Lj=e=>e.tooltip.settings.trigger,m0=e=>e.tooltip.settings.defaultIndex,zu=H([Dl,p0,Lj,m0],Oj),du=H([zu,Qa,bl,wl],Ws),zj=H([di,du],Sj),F9=H([zu],e=>{if(e)return e.dataKey}),B9=H([zu],e=>{if(e)return e.graphicalItemId}),Fj=H([Dl,p0,Lj,m0],jj),U9=H([oi,li,ot,Kt,di,m0,Fj],Cj),W9=H([zu,U9],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),H9=H([zu],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),K9=H([Fj,du,dn,bl,zj,_j,p0],Nj),V9=H([K9],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function oE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lE(e){for(var t=1;tEe(Pt),X9=()=>{var e=Q9(),t=Ee(di),r=Ee($j);return Vd(!e||!r?void 0:lE(lE({},e),{},{scale:r}),t)};function sE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $o(e){for(var t=1;t{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},rW=(e,t,r,n)=>{var i=t.find(f=>f&&f.index===r);if(i){if(e==="centric"){var o=i.coordinate,s=n.radius;return $o($o($o({},n),Bt(n.cx,n.cy,s,o)),{},{angle:o,radius:s})}var u=i.coordinate,d=n.angle;return $o($o($o({},n),Bt(n.cx,n.cy,u,d)),{},{angle:d,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function nW(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var Bj=(e,t,r,n,i)=>{var o,s=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u0?(d=r[u-1])===null||d===void 0?void 0:d.coordinate:(f=r[s-1])===null||f===void 0?void 0:f.coordinate,S=(h=r[u])===null||h===void 0?void 0:h.coordinate,k=u>=s-1?(m=r[0])===null||m===void 0?void 0:m.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,E=void 0;if(!(b==null||S==null||k==null))if(Lr(S-b)!==Lr(k-S)){var P=[];if(Lr(k-S)===Lr(i[1]-i[0])){E=k;var j=S+i[1]-i[0];P[0]=Math.min(j,(j+b)/2),P[1]=Math.max(j,(j+b)/2)}else{E=b;var _=k+i[1]-i[0];P[0]=Math.min(S,(_+S)/2),P[1]=Math.max(S,(_+S)/2)}var O=[Math.min(S,(E+S)/2),Math.max(S,(E+S)/2)];if(e>O[0]&&e<=O[1]||e>=P[0]&&e<=P[1]){var N;return(N=r[u])===null||N===void 0?void 0:N.index}}else{var C=Math.min(b,k),R=Math.max(b,k);if(e>(C+S)/2&&e<=(R+S)/2){var z;return(z=r[u])===null||z===void 0?void 0:z.index}}}else if(t)for(var F=0;F(V.coordinate+B.coordinate)/2||F>0&&F(V.coordinate+B.coordinate)/2&&e<=(V.coordinate+Q.coordinate)/2)return V.index}}return-1},Uj=()=>Ee(Ey),v0=(e,t)=>t,Wj=(e,t,r)=>r,g0=(e,t,r,n)=>n,iW=H(di,e=>Wf(e,t=>t.coordinate)),y0=H([Dl,v0,Wj,g0],Oj),x0=H([y0,Qa,bl,wl],Ws),aW=(e,t,r)=>{if(t!=null){var n=Dl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},Hj=H([Dl,v0,Wj,g0],jj),yf=H([oi,li,ot,Kt,di,g0,Hj],Cj),oW=H([y0,yf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Kj=H([di,x0],Sj),lW=H([Hj,x0,dn,bl,Kj,_j,v0],Nj),sW=H([y0,x0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),uW=(e,t,r,n,i,o,s)=>{if(!(!e||!r||!n||!i)&&nW(e,s)){var u=kL(e,t),d=Bj(u,o,i,r,n),f=tW(t,i,d,e);return{activeIndex:String(d),activeCoordinate:f}}},cW=(e,t,r,n,i,o,s)=>{if(!(!e||!n||!i||!o||!r)){var u=P6(e,r);if(u){var d=SL(u,t),f=Bj(d,s,o,n,i),h=rW(t,o,f,u);return{activeIndex:String(f),activeCoordinate:h}}}},dW=(e,t,r,n,i,o,s,u)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?uW(e,t,n,i,o,s,u):cW(e,t,r,n,i,o,s)},fW=H(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),hW=H(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(nr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:r8}});function uE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cE(e){for(var t=1;tcE(cE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),gW)},xW=new Set(Object.values(nr));function bW(e){return xW.has(e)}var Vj=Jt({name:"zIndex",initialState:yW,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:rt()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!bW(r)&&delete e.zIndexMap[r])},prepare:rt()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:rt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:rt()}}}),Ah=Vj.actions,wW=Ah.registerZIndexPortal,lv=Ah.unregisterZIndexPortal,kW=Ah.registerZIndexPortalElement,SW=Ah.unregisterZIndexPortalElement,EW=Vj.reducer;function fi(e){var t=e.zIndex,r=e.children,n=lz(),i=n&&t!==void 0&&t!==0,o=yr(),s=y.useRef(void 0),u=y.useRef(new Set),d=xt(),f=Ee(m=>fW(m,t,o));if(y.useLayoutEffect(()=>{if(!i){var m=u.current;m.forEach(b=>{d(lv({zIndex:b}))}),m.clear(),s.current=void 0;return}if(u.current.has(t)||(d(wW({zIndex:t})),u.current.add(t)),f){s.current=f;var v=u.current;v.forEach(b=>{b!==t&&(d(lv({zIndex:b})),v.delete(b))})}},[d,t,i,f]),y.useLayoutEffect(()=>{var m=u.current;return()=>{m.forEach(v=>{d(lv({zIndex:v}))}),m.clear()}},[d]),!i)return r;var h=f??s.current;return h?Tf.createPortal(r,h):null}function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.useContext(qj),sv={exports:{}},fE;function IW(){return fE||(fE=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(d,f,h){this.fn=d,this.context=f,this.once=h||!1}function o(d,f,h,m,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var b=new i(h,m||d,v),S=r?r+f:f;return d._events[S]?d._events[S].fn?d._events[S]=[d._events[S],b]:d._events[S].push(b):(d._events[S]=b,d._eventsCount++),d}function s(d,f){--d._eventsCount===0?d._events=new n:delete d._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],h,m;if(this._eventsCount===0)return f;for(m in h=this._events)t.call(h,m)&&f.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},u.prototype.listeners=function(f){var h=r?r+f:f,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var v=0,b=m.length,S=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!jn(r))return e[r]}},RW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},Gj=Jt({name:"options",initialState:RW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),$W=Gj.reducer,LW=Gj.actions.createEventEmitter;function zW(e){return e.tooltip.syncInteraction}var FW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Yj=Jt({name:"chartData",initialState:FW,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 r=t.payload,n=r.startIndex,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),b0=Yj.actions,pE=b0.setChartData,BW=b0.setDataStartEndIndexes;b0.setComputedData;var UW=Yj.reducer,WW=["x","y"];function mE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lo(e){for(var t=1;td.rootProps.className);y.useEffect(()=>{if(e==null)return Al;var d=(f,h,m)=>{if(t!==m&&e===f){if(h.payload.active===!1){r(Bs({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(s&&h!==null&&h!==void 0&&(v=h.payload)!==null&&v!==void 0&&v.coordinate&&h.payload.sourceViewBox){var b=h.payload.coordinate,S=b.x,k=b.y,E=qW(b,WW),P=h.payload.sourceViewBox,j=P.x,_=P.y,O=P.width,N=P.height,C=Lo(Lo({},E),{},{x:s.x+(O?(S-j)/O:0)*s.width,y:s.y+(N?(k-_)/N:0)*s.height});r(Lo(Lo({},h),{},{payload:Lo(Lo({},h.payload),{},{coordinate:C})}))}else r(h);return}if(i!=null){var R;if(typeof n=="function"){var z={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},F=n(i,z);R=i[F]}else n==="value"&&(R=i.find(de=>String(de.value)===h.payload.label));var V=h.payload.coordinate;if(V==null||s==null){r(Bs({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(R==null){r(Bs({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:void 0}));return}var Q=V.x,B=V.y,ue=Math.min(Q,s.x+s.width),G=Math.min(B,s.y+s.height),le={x:o==="horizontal"?R.coordinate:ue,y:o==="horizontal"?G:R.coordinate},fe=Bs({active:h.payload.active,coordinate:le,dataKey:h.payload.dataKey,index:String(R.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});r(fe)}}};return fu.on(Eg,d),()=>{fu.off(Eg,d)}},[u,r,t,e,n,i,o,s])}function QW(){var e=Ee(Py),t=Ee(Ay),r=xt();y.useEffect(()=>{if(e==null)return Al;var n=(i,o,s)=>{t!==s&&e===i&&r(BW(o))};return fu.on(hE,n),()=>{fu.off(hE,n)}},[r,t,e])}function XW(){var e=xt();y.useEffect(()=>{e(LW())},[e]),YW(),QW()}function ZW(e,t,r,n,i,o){var s=Ee(S=>aW(S,e,t)),u=Ee(B9),d=Ee(Ay),f=Ee(Py),h=Ee(HO),m=Ee(zW),v=(m==null?void 0:m.sourceViewBox)!=null,b=ih();y.useEffect(()=>{if(!v&&f!=null&&d!=null){var S=Bs({active:o,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:u});fu.emit(Eg,f,S,d)}},[v,r,s,u,i,n,d,f,h,o,b])}function vE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gE(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{R(Y7({shared:j,trigger:_,axisId:C,active:i,defaultIndex:z}))},[R,j,_,C,i,z]);var F=ih(),V=SO(),Q=W7(j),B=(t=Ee(Ae=>sW(Ae,Q,_,z)))!==null&&t!==void 0?t:{},ue=B.activeIndex,G=B.isActive,le=Ee(Ae=>lW(Ae,Q,_,z)),fe=Ee(Ae=>Kj(Ae,Q,_,z)),de=Ee(Ae=>oW(Ae,Q,_,z)),Y=le,ae=NW(),X=(r=i??G)!==null&&r!==void 0?r:!1,M=s$([Y,X]),T=rH(M,2),Z=T[0],se=T[1],te=Q==="axis"?fe:void 0;ZW(Q,_,de,te,ue,X);var ce=N??ae;if(ce==null||F==null||Q==null)return null;var ge=Y??xE;X||(ge=xE),f&&ge.length&&(ge=N4(ge.filter(Ae=>Ae.value!=null&&(Ae.hide!==!0||n.includeHidden)),v,lH));var _e=ge.length>0,J=gE(gE({},n),{},{payload:ge,label:te,active:X,activeIndex:ue,coordinate:de,accessibilityLayer:V}),we=y.createElement(xF,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:h,active:X,coordinate:de,hasPayload:_e,offset:m,position:b,reverseDirection:S,useTranslate3d:k,viewBox:F,wrapperStyle:E,lastBoundingBox:Z,innerRef:se,hasPortalFromProps:!!N},sH(d,J));return y.createElement(y.Fragment,null,Tf.createPortal(we,ce),X&&y.createElement(_W,{cursor:P,tooltipEventType:Q,coordinate:de,payload:ge,index:ue}))}function dH(e,t,r){return(t=fH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fH(e){var t=hH(e,"string");return typeof t=="symbol"?t:t+""}function hH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class pH{constructor(t){dH(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function bE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mH(e){for(var t=1;t{try{var r=document.getElementById(kE);r||(r=document.createElement("span"),r.setAttribute("id",kE),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,bH,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Hs=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||_u.isSsr)return{width:0,height:0};if(!Qj.enableCache)return SE(t,r);var n=wH(t,r),i=wE.get(n);if(i)return i;var o=SE(t,r);return wE.set(n,o),o},Xj;function xf(e,t){return PH(e)||EH(e,t)||SH(e,t)||kH()}function kH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SH(e,t){if(e){if(typeof e=="string")return EE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?EE(e,t):void 0}}function EE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Ut(t)||(r?i=t.toString().split(""):i=t.toString().split(Jj));var o=i.map(u=>({word:u,width:Hs(u,n).width})),s=r?0:Hs(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}};function t_(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function KH(e){return Ut(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var r_=(e,t,r,n)=>e.reduce((i,o)=>{var s=o.word,u=o.width,d=i[i.length-1];if(d&&u!=null&&(t==null||n||d.width+u+re.reduce((t,r)=>t.width>r.width?t:r),VH="…",NE=(e,t,r,n,i,o,s,u)=>{var d=e.slice(0,t),f=e_({breakAll:r,style:n,children:d+VH});if(!f)return[!1,[]];var h=r_(f.wordsWithComputedWidth,o,s,u),m=h.length>i||n_(h).width>Number(o);return[m,h]},qH=(e,t,r,n,i)=>{var o=e.maxLines,s=e.children,u=e.style,d=e.breakAll,f=be(o),h=String(s),m=r_(t,n,r,i);if(!f||i)return m;var v=m.length>o||n_(m).width>Number(n);if(!v)return m;for(var b=0,S=h.length-1,k=0,E;b<=S&&k<=h.length-1;){var P=Math.floor((b+S)/2),j=P-1,_=NE(h,j,d,u,o,n,r,i),O=jE(_,2),N=O[0],C=O[1],R=NE(h,P,d,u,o,n,r,i),z=jE(R,1),F=z[0];if(!N&&!F&&(b=P+1),N&&F&&(S=P-1),!N&&F){E=C;break}k++}return E||m},IE=e=>{var t=Ut(e)?[]:e.toString().split(Jj);return[{words:t,width:void 0}]},GH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,s=e.maxLines;if((t||r)&&!_u.isSsr){var u,d,f=e_({breakAll:o,children:n,style:i});if(f){var h=f.wordsWithComputedWidth,m=f.spaceWidth;u=h,d=m}else return IE(n);return qH({breakAll:o,children:n,maxLines:s,style:i},u,d,t,!!r)}return IE(n)},i_="#808080",YH={angle:0,breakAll:!1,capHeight:"0.71em",fill:i_,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},w0=y.forwardRef((e,t)=>{var r=Hr(e,YH),n=r.x,i=r.y,o=r.lineHeight,s=r.capHeight,u=r.fill,d=r.scaleToFit,f=r.textAnchor,h=r.verticalAnchor,m=CE(r,LH),v=y.useMemo(()=>GH({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:d,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,d,m.style,m.width]),b=m.dx,S=m.dy,k=m.angle,E=m.className,P=m.breakAll,j=CE(m,zH);if(!_n(n)||!_n(i)||v.length===0)return null;var _=Number(n)+(be(b)?b:0),O=Number(i)+(be(S)?S:0);if(!Fe(_)||!Fe(O))return null;var N;switch(h){case"start":N=uv("calc(".concat(s,")"));break;case"middle":N=uv("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:N=uv("calc(".concat(v.length-1," * -").concat(o,")"));break}var C=[],R=v[0];if(d&&R!=null){var z=R.width,F=m.width;C.push("scale(".concat(be(F)&&be(z)?F/z:1,")"))}return k&&C.push("rotate(".concat(k,", ").concat(_,", ").concat(O,")")),C.length&&(j.transform=C.join(" ")),y.createElement("text",Pg({},Br(j),{ref:t,x:_,y:O,className:Xe("recharts-text",E),textAnchor:f,fill:u.includes("url")?i_:u}),v.map((V,Q)=>{var B=V.words.join(P?"":" ");return y.createElement("tspan",{x:_,dy:Q===0?N:o,key:"".concat(B,"-").concat(Q)},B)}))});w0.displayName="Text";function ME(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,s=my(t),u=s.x,d=s.y,f=s.height,h=s.upperWidth,m=s.lowerWidth,v=u,b=u+(h-m)/2,S=(v+b)/2,k=(h+m)/2,E=v+h/2,P=f>=0?1:-1,j=P*i,_=P>0?"end":"start",O=P>0?"start":"end",N=h>=0?1:-1,C=N*i,R=N>0?"end":"start",z=N>0?"start":"end",F=o;if(r==="top"){var V={x:v+h/2,y:d-j,horizontalAnchor:"middle",verticalAnchor:_};return F&&(V.height=Math.max(d-F.y,0),V.width=h),V}if(r==="bottom"){var Q={x:b+m/2,y:d+f+j,horizontalAnchor:"middle",verticalAnchor:O};return F&&(Q.height=Math.max(F.y+F.height-(d+f),0),Q.width=m),Q}if(r==="left"){var B={x:S-C,y:d+f/2,horizontalAnchor:R,verticalAnchor:"middle"};return F&&(B.width=Math.max(B.x-F.x,0),B.height=f),B}if(r==="right"){var ue={x:S+k+C,y:d+f/2,horizontalAnchor:z,verticalAnchor:"middle"};return F&&(ue.width=Math.max(F.x+F.width-ue.x,0),ue.height=f),ue}var G=F?{width:k,height:f}:{};return r==="insideLeft"?bn({x:S+C,y:d+f/2,horizontalAnchor:z,verticalAnchor:"middle"},G):r==="insideRight"?bn({x:S+k-C,y:d+f/2,horizontalAnchor:R,verticalAnchor:"middle"},G):r==="insideTop"?bn({x:v+h/2,y:d+j,horizontalAnchor:"middle",verticalAnchor:O},G):r==="insideBottom"?bn({x:b+m/2,y:d+f-j,horizontalAnchor:"middle",verticalAnchor:_},G):r==="insideTopLeft"?bn({x:v+C,y:d+j,horizontalAnchor:z,verticalAnchor:O},G):r==="insideTopRight"?bn({x:v+h-C,y:d+j,horizontalAnchor:R,verticalAnchor:O},G):r==="insideBottomLeft"?bn({x:b+C,y:d+f-j,horizontalAnchor:z,verticalAnchor:_},G):r==="insideBottomRight"?bn({x:b+m-C,y:d+f-j,horizontalAnchor:R,verticalAnchor:_},G):r&&typeof r=="object"&&(be(r.x)||Ka(r.x))&&(be(r.y)||Ka(r.y))?bn({x:u+ta(r.x,k),y:d+ta(r.y,f),horizontalAnchor:"end",verticalAnchor:"end"},G):bn({x:E,y:d+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},G)},eK=["labelRef"],tK=["content"];function TE(e,t){if(e==null)return{};var r,n,i=rK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,s=e.height,u=e.children,d=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:s}),[t,r,n,i,o,s]);return y.createElement(a_.Provider,{value:d},u)},o_=()=>{var e=y.useContext(a_),t=ih();return e||(t?my(t):void 0)},lK=y.createContext(null),sK=()=>{var e=y.useContext(lK),t=Ee(YO);return e||t},uK=e=>{var t=e.value,r=e.formatter,n=Ut(e.children)?t:e.children;return typeof r=="function"?r(n):n},k0=e=>e!=null&&typeof e=="function",cK=(e,t)=>{var r=Lr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},dK=(e,t,r,n,i)=>{var o=e.offset,s=e.className,u=i.cx,d=i.cy,f=i.innerRadius,h=i.outerRadius,m=i.startAngle,v=i.endAngle,b=i.clockWise,S=(f+h)/2,k=cK(m,v),E=k>=0?1:-1,P,j;switch(t){case"insideStart":P=m+E*o,j=b;break;case"insideEnd":P=v-E*o,j=!b;break;case"end":P=v+E*o,j=b;break;default:throw new Error("Unsupported position ".concat(t))}j=k<=0?j:!j;var _=Bt(u,d,S,P),O=Bt(u,d,S,P+(j?1:-1)*359),N="M".concat(_.x,",").concat(_.y,` A`).concat(S,",").concat(S,",0,1,").concat(j?0:1,`, `).concat(O.x,",").concat(O.y),C=Ut(e.id)?Zs("recharts-radial-line-"):e.id;return y.createElement("text",Yn({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",s)}),y.createElement("defs",null,y.createElement("path",{id:C,d:N})),y.createElement("textPath",{xlinkHref:"#".concat(C)},r))},fK=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,s=e.outerRadius,u=e.startAngle,d=e.endAngle,f=(u+d)/2;if(r==="outside"){var h=Bt(n,i,s+t,f),m=h.x,v=h.y;return{x:m,y:v,textAnchor:m>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+s)/2,S=Bt(n,i,b,f),k=S.x,E=S.y;return{x:k,y:E,textAnchor:"middle",verticalAnchor:"middle"}},jd=e=>e!=null&&"cx"in e&&be(e.cx),hK={angle:0,offset:5,zIndex:nr.label,position:"middle",textBreakAll:!1};function pK(e){if(!jd(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function zi(e){var t=Hr(e,hK),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,s=t.children,u=t.content,d=t.className,f=d===void 0?"":d,h=t.textBreakAll,m=t.labelRef,v=sK(),b=o_(),S=i==="center"?b:v??b,k,E,P;r==null?k=S:jd(r)?k=r:k=my(r);var j=pK(k);if(!k||Ut(o)&&Ut(s)&&!y.isValidElement(u)&&typeof u!="function")return null;var _=Us(Us({},t),{},{viewBox:k});if(y.isValidElement(u)){_.labelRef;var O=TE(_,eK);return y.cloneElement(u,O)}if(typeof u=="function"){_.content;var N=TE(_,tK);if(E=y.createElement(u,N),y.isValidElement(E))return E}else E=uK(t);var C=Br(t);if(jd(k)){if(i==="insideStart"||i==="insideEnd"||i==="end")return dK(t,i,E,C,k);P=fK(k,t.offset,t.position)}else{if(!j)return null;var R=JH({viewBox:j,position:i,offset:t.offset,parentViewBox:jd(n)?void 0:n});P=Us(Us({x:R.x,y:R.y,textAnchor:R.horizontalAnchor,verticalAnchor:R.verticalAnchor},R.width!==void 0?{width:R.width}:{}),R.height!==void 0?{height:R.height}:{})}return y.createElement(fi,{zIndex:t.zIndex},y.createElement(w0,Yn({ref:m,className:Xe("recharts-label",f)},C,P,{textAnchor:t_(C.textAnchor)?C.textAnchor:P.textAnchor,breakAll:h}),E))}zi.displayName="Label";var mK=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(zi,Yn({key:"label-implicit"},n)):_n(e)?y.createElement(zi,Yn({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===zi?y.cloneElement(e,Us({key:"label-implicit"},n)):y.createElement(zi,Yn({key:"label-implicit",content:e},n)):k0(e)?y.createElement(zi,Yn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(zi,Yn({},e,{key:"label-implicit"},n)):null};function vK(e){var t=e.label,r=e.labelRef,n=o_();return mK(t,n,r)||null}var gK=["valueAccessor"],yK=["dataKey","clockWise","id","textBreakAll","zIndex"];function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(KH(t))return t},l_=y.createContext(void 0),wK=l_.Provider,s_=y.createContext(void 0);s_.Provider;function kK(){return y.useContext(l_)}function SK(){return y.useContext(s_)}function _d(e){var t=e.valueAccessor,r=t===void 0?bK:t,n=RE(e,gK),i=n.dataKey;n.clockWise;var o=n.id,s=n.textBreakAll,u=n.zIndex,d=RE(n,yK),f=kK(),h=SK(),m=f||h;return!m||!m.length?null:y.createElement(fi,{zIndex:u??nr.label},y.createElement(Ur,{className:"recharts-label-list"},m.map((v,b)=>{var S,k=Ut(i)?r(v,b):Nt(v.payload,i),E=Ut(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(zi,bf({key:"label-".concat(b)},Br(v),d,E,{fill:(S=n.fill)!==null&&S!==void 0?S:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:s,viewBox:v.viewBox,index:b,zIndex:0}))})))}_d.displayName="LabelList";function EK(e){var t=e.label;return t?t===!0?y.createElement(_d,{key:"labelList-implicit"}):y.isValidElement(t)||k0(t)?y.createElement(_d,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(_d,bf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=Xe("recharts-dot",i);return be(t)&&be(r)&&be(n)?y.createElement("circle",Ag({},ln(e),ay(e),{className:o,cx:t,cy:r,r:n})):null},PK={radiusAxis:{},angleAxis:{}},c_=Jt({name:"polarAxis",initialState:PK,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]}}}),Oh=c_.actions;Oh.addRadiusAxis;Oh.removeRadiusAxis;Oh.addAngleAxis;Oh.removeAngleAxis;var AK=c_.reducer;function OK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var d_=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function $E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LE(e){for(var t=1;t{n||(i.current===null?r(V7(t)):i.current!==t&&r(q7({prev:i.current,next:t})),i.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{i.current&&(r(G7(i.current)),i.current=null)},[r]),null}function $K(e){var t=e.legendPayload,r=xt(),n=yr(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(bz(t)):i.current!==t&&r(wz({prev:i.current,next:t})),i.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{i.current&&(r(kz(i.current)),i.current=null)},[r]),null}function LK(e,t){return UK(e)||BK(e,t)||FK(e,t)||zK()}function zK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FK(e,t){if(e){if(typeof e=="string")return zE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zE(e,t):void 0}}function zE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;oe[Math.floor(o*r)]);return E0(n,t)}function KK(e,t){var r=t.map((n,i)=>e[i]);return E0(r,t)}function VK(e,t){for(var r=new Map,n=0;n{var b=r(m,v);if(b!=null){var S=n.get(b);if(S!==void 0)return i.add(b),S}}),s=[];for(var u of n){var d=LK(u,2),f=d[0],h=d[1];i.has(f)||s.push(h)}return E0(o,t,s)}function Og(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===S0?HK(e,t):r===WK?KK(e,t):qK(e,t,r)}function h_(e,t){var r=y.useRef(e),n=y.useRef(t.current),i=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=y.useCallback(function(s,u){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){i.current=!0;return}u===1&&(n.current=s),u>0&&i.current&&d&&(t.current=s)},[t]);return{startValue:n.current,syncStepValue:o}}function GK(e,t){return ZK(e)||XK(e,t)||QK(e,t)||YK()}function YK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QK(e,t){if(e){if(typeof e=="string")return FE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?FE(e,t):void 0}}function FE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),u=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:s,handleAnimationEnd:u}}function eV(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,s=e.isAnimationActive,u=e.animationBegin,d=e.animationDuration,f=e.animationEasing,h=e.onAnimationStart,m=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,S=e.shouldUpdatePreviousRef,k=e.children,E=e.layout,P=CO(r,n),j=h_(P,o),_=(t=j.startValue)!==null&&t!==void 0?t:null,O=Og(_,i,b??S0);return y.createElement(OO,{animationId:P,begin:u,duration:d,isActive:s,easing:f,onAnimationEnd:m,onAnimationStart:h,key:P},N=>{var C=_==null,R=i==null?i:v(O,N,E),z=S?S(N):N>0;return j.syncStepValue(R,N,z),R==null?null:k(R,N,C)})}var cv;function tV(e,t){return aV(e)||iV(e,t)||nV(e,t)||rV()}function rV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nV(e,t){if(e){if(typeof e=="string")return BE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?BE(e,t):void 0}}function BE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=y.useState(()=>Zs("uid-")),t=tV(e,1),r=t[0];return r},p_=(cv=jf.useId)!==null&&cv!==void 0?cv:oV;function lV(e,t){var r=p_();return t||(e?"".concat(e,"-").concat(r):r)}var sV=y.createContext(void 0),uV=e=>{var t=e.id,r=e.type,n=e.children,i=lV("recharts-".concat(r),t);return y.createElement(sV.Provider,{value:i},n(i))},cV={cartesianItems:[],polarItems:[]},m_=Jt({name:"graphicalItems",initialState:cV,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:rt()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:rt()},removeCartesianGraphicalItem:{reducer(e,t){var r=zr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:rt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:rt()},removePolarGraphicalItem:{reducer(e,t){var r=zr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:rt()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=zr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:rt()}}}),Rl=m_.actions,dV=Rl.addCartesianGraphicalItem,fV=Rl.replaceCartesianGraphicalItem,hV=Rl.removeCartesianGraphicalItem;Rl.addPolarGraphicalItem;Rl.removePolarGraphicalItem;Rl.replacePolarGraphicalItem;var pV=m_.reducer,mV=e=>{var t=xt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(dV(e)):r.current!==e&&t(fV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(hV(r.current)),r.current=null)},[t]),null},vV=y.memo(mV),gV=["points"];function UE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dv(e){for(var t=1;t{var P,j,_=dv(dv(dv({r:3},s),v),{},{index:E,cx:(P=k.x)!==null&&P!==void 0?P:void 0,cy:(j=k.y)!==null&&j!==void 0?j:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(SV,{key:"dot-".concat(E),option:r,dotProps:_,className:i})}),S={};return u&&d!=null&&(S.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(d,")")),y.createElement(fi,{zIndex:h},y.createElement(Ur,wf({className:n},S),b))}function WE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function HE(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),zV=H([LV,oi,li],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),P0=()=>Ee(zV),FV=()=>Ee(V9);function KE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fv(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,s=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var u={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},d=fv(fv(fv({},u),Ff(i)),ay(i)),f;return y.isValidElement(i)?f=y.cloneElement(i,d):typeof i=="function"?f=i(d):f=y.createElement(u_,d),y.createElement(Ur,{className:"recharts-active-dot",clipPath:s},f)};function VE(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,s=e.zIndex,u=s===void 0?nr.activeDot:s,d=Ee(du),f=FV();if(t==null||f==null)return null;var h=t.find(m=>f.includes(m.payload));return Ut(h)?null:y.createElement(fi,{zIndex:u},y.createElement(HV,{point:h,childIndex:Number(d),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var KV=e=>{var t=e.chartData,r=xt(),n=yr();return y.useEffect(()=>n?()=>{}:(r(pE(t)),()=>{r(pE(void 0))}),[t,r,n]),null},qE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},y_=Jt({name:"brush",initialState:qE,reducers:{setBrushSettings(e,t){return t.payload==null?qE:t.payload}}});y_.actions.setBrushSettings;var VV=y_.reducer;function qV(e){return(e%180+180)%180}var GV=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=qV(i),s=o*Math.PI/180,u=Math.atan(n/r),d=s>u&&s{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=zr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=zr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=zr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),$l=x_.actions;$l.addDot;$l.removeDot;$l.addArea;$l.removeArea;$l.addLine;$l.removeLine;var QV=x_.reducer;function XV(e,t){return tq(e)||eq(e,t)||JV(e,t)||ZV()}function ZV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JV(e,t){if(e){if(typeof e=="string")return GE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GE(e,t):void 0}}function GE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=y.useState("".concat(Zs("recharts"),"-clip")),n=XV(r,1),i=n[0],o=P0();if(o==null)return null;var s=o.x,u=o.y,d=o.width,f=o.height;return y.createElement(rq.Provider,{value:i},y.createElement("defs",null,y.createElement("clipPath",{id:i},y.createElement("rect",{x:s,y:u,height:f,width:d}))),t)};function b_(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function oq(e,t){return b_(e,t+1)}function lq(e,t,r,n,i){for(var o=(n||[]).slice(),s=t.start,u=t.end,d=0,f=1,h=s,m=function(){var S=n==null?void 0:n[d];if(S===void 0)return{v:b_(n,f)};var k=d,E,P=()=>(E===void 0&&(E=r(S,k)),E),j=S.coordinate,_=d===0||hu(e,j,P,h,u);_||(d=0,h=s,f+=1),_&&(h=j+e*(P()/2+i),d+=f)},v;f<=o.length;)if(v=m(),v)return v.v;return[]}function sq(e,t,r,n,i){var o=(n||[]).slice(),s=o.length;if(s===0)return[];for(var u=t.start,d=t.end,f=1;f<=s;f++){for(var h=(s-1)%f,m=u,v=!0,b=function(){var O=n[k];if(O==null)return 0;var N=k,C,R=()=>(C===void 0&&(C=r(O,N)),C),z=O.coordinate,F=k===h||hu(e,z,R,m,d);if(!F)return v=!1,1;F&&(m=z+e*(R()/2+i))},S,k=h;k(k===void 0&&(k=r(b,v)),k);if(v===s-1){var P=e*(S.coordinate+e*E()/2-d);o[v]=S=Xt(Xt({},S),{},{tickCoord:P>0?S.coordinate-P*e:S.coordinate})}else o[v]=S=Xt(Xt({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var j=hu(e,S.tickCoord,E,u,d);j&&(d=S.tickCoord-e*(E()/2+i),o[v]=Xt(Xt({},S),{},{isShow:!0}))}},h=s-1;h>=0;h--)f(h);return o}function hq(e,t,r,n,i,o){var s=(n||[]).slice(),u=s.length,d=t.start,f=t.end;if(o){var h=n[u-1];if(h!=null){var m=r(h,u-1),v=e*(h.coordinate+e*m/2-f);if(s[u-1]=h=Xt(Xt({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate}),h.tickCoord!=null){var b=hu(e,h.tickCoord,()=>m,d,f);b&&(f=h.tickCoord-e*(m/2+i),s[u-1]=Xt(Xt({},h),{},{isShow:!0}))}}}for(var S=o?u-1:u,k=function(j){var _=s[j];if(_==null)return 1;var O=_,N,C=()=>(N===void 0&&(N=r(_,j)),N);if(j===0){var R=e*(O.coordinate-e*C()/2-d);s[j]=O=Xt(Xt({},O),{},{tickCoord:R<0?O.coordinate-R*e:O.coordinate})}else s[j]=O=Xt(Xt({},O),{},{tickCoord:O.coordinate});if(O.tickCoord!=null){var z=hu(e,O.tickCoord,C,d,f);z&&(d=O.tickCoord+e*(C()/2+i),s[j]=Xt(Xt({},O),{},{isShow:!0}))}},E=0;E{var R=typeof f=="function"?f(N.value,C):N.value;return S==="width"?iq(Hs(R,{fontSize:t,letterSpacing:r}),k,m):Hs(R,{fontSize:t,letterSpacing:r})[S]},P=i[0],j=i[1],_=i.length>=2&&P!=null&&j!=null?Lr(j.coordinate-P.coordinate):1,O=aq(o,_,S);return d==="equidistantPreserveStart"?lq(_,O,E,i,s):d==="equidistantPreserveEnd"?sq(_,O,E,i,s):(d==="preserveStart"||d==="preserveStartEnd"?b=hq(_,O,E,i,s,d==="preserveStartEnd"):b=fq(_,O,E,i,s),b.filter(N=>N.isShow))}var pq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,s=o===void 0?0:o,u=e.tickMargin,d=u===void 0?0:u,f=0;if(t){Array.from(t).forEach(b=>{if(b){var S=b.getBoundingClientRect();S.width>f&&(f=S.width)}});var h=r?r.getBoundingClientRect().width:0,m=s+d,v=f+m+h+(r?i:0);return Math.round(v)}return 0},mq={xAxis:{},yAxis:{}},w_=Jt({name:"renderedTicks",initialState:mq,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),k_=w_.actions,vq=k_.setRenderedTicks,gq=k_.removeRenderedTicks,yq=w_.reducer,xq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function QE(e,t){return Sq(e)||kq(e,t)||wq(e,t)||bq()}function bq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wq(e,t){if(e){if(typeof e=="string")return XE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XE(e,t):void 0}}function XE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Al;var o=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(vq({ticks:o,axisId:n,axisType:r})),()=>{i(gq({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Dq=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,s=e.stroke,u=e.tickFormatter,d=e.unit,f=e.padding,h=e.tickTextProps,m=e.orientation,v=e.mirror,b=e.x,S=e.y,k=e.width,E=e.height,P=e.tickSize,j=e.tickMargin,_=e.fontSize,O=e.letterSpacing,N=e.getTicksConfig,C=e.events,R=e.axisType,z=e.axisId,F=A0(ht(ht({},N),{},{ticks:n}),_,O),V=ln(N),Q=Ff(i),B=t_(V.textAnchor)?V.textAnchor:Nq(m,v),ue=Iq(m,v),G={};typeof o=="object"&&(G=o);var le=ht(ht({},V),{},{fill:"none"},G),fe=F.map(ae=>ht({entry:ae},_q(ae,b,S,k,E,m,P,v,j))),de=fe.map(ae=>{var X=ae.entry,M=ae.line;return y.createElement(Ur,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},o&&y.createElement("line",Xa({},le,M,{className:Xe("recharts-cartesian-axis-tick-line",Ja(o,"className"))})))}),Y=fe.map((ae,X)=>{var M,T,Z=ae.entry,se=ae.tick,te=ht(ht(ht(ht({verticalAnchor:ue},V),{},{textAnchor:B,stroke:"none",fill:s},se),{},{index:X,payload:Z,visibleTicksCount:F.length,tickFormatter:u,padding:f},h),{},{angle:(M=(T=h==null?void 0:h.angle)!==null&&T!==void 0?T:V.angle)!==null&&M!==void 0?M:0}),ce=ht(ht({},te),Q);return y.createElement(Ur,Xa({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Z.value,"-").concat(Z.coordinate,"-").concat(Z.tickCoord)},z5(C,Z,X)),i&&y.createElement(Mq,{option:i,tickProps:ce,value:"".concat(typeof u=="function"?u(Z.value,X):Z.value).concat(d||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(R,"-ticks")},y.createElement(Tq,{ticks:F,axisId:z,axisType:R}),Y.length>0&&y.createElement(fi,{zIndex:nr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(R,"-tick-labels"),ref:t},Y)),de.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(R,"-tick-lines")},de))}),Rq=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,s=e.hide,u=e.ticks,d=e.axisType,f=e.axisId,h=Eq(e,xq),m=y.useState(""),v=QE(m,2),b=v[0],S=v[1],k=y.useState(""),E=QE(k,2),P=E[0],j=E[1],_=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var N;return pq({ticks:_.current,label:(N=e.labelRef)===null||N===void 0?void 0:N.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var O=y.useCallback(N=>{if(N){var C=N.getElementsByClassName("recharts-cartesian-axis-tick-value");_.current=C;var R=C[0];if(R){var z=window.getComputedStyle(R),F=z.fontSize,V=z.letterSpacing;(F!==b||V!==P)&&(S(F),j(V))}}},[b,P]);return s||n!=null&&n<=0||i!=null&&i<=0?null:y.createElement(fi,{zIndex:e.zIndex},y.createElement(Ur,{className:Xe("recharts-cartesian-axis",o)},y.createElement(jq,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:ln(e)}),y.createElement(Dq,{ref:O,axisType:d,events:h,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:P,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),y.createElement(oK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(vK,{label:e.label,labelRef:e.labelRef}),e.children)))}),O0=y.forwardRef((e,t)=>{var r=Hr(e,ti);return y.createElement(Rq,Xa({},r,{ref:t}))});O0.displayName="CartesianAxis";var $q=["x1","y1","x2","y2","key"],Lq=["offset"],zq=["xAxisId","yAxisId"],Fq=["xAxisId","yAxisId"];function JE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,s=e.height,u=e.ry;return y.createElement("rect",{x:n,y:i,ry:u,width:o,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function S_(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,s=r.y1,u=r.x2,d=r.y2,f=r.key,h=kf(r,$q),m=(i=ln(h))!==null&&i!==void 0?i:{};m.offset;var v=kf(m,Lq);n=y.createElement("line",ja({},v,{x1:o,y1:s,x2:u,y2:d,fill:"none",key:f}))}return n}function Vq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=kf(e,zq),u=o.map((d,f)=>{var h=Zt(Zt({},s),{},{x1:t,y1:d,x2:t+r,y2:d,key:"line-".concat(f),index:f});return y.createElement(S_,{key:"line-".concat(f),option:i,lineItemProps:h})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function qq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var s=kf(e,Fq),u=o.map((d,f)=>{var h=Zt(Zt({},s),{},{x1:d,y1:t,x2:d,y2:t+r,key:"line-".concat(f),index:f});return y.createElement(S_,{option:i,lineItemProps:h,key:"line-".concat(f)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Gq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,s=e.height,u=e.horizontalPoints,d=e.horizontal,f=d===void 0?!0:d;if(!f||!t||!t.length||u==null)return null;var h=u.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==h[0]&&h.unshift(0);var m=h.map((v,b)=>{var S=h[b+1],k=S==null,E=k?i+s-v:S-v;if(E<=0)return null;var P=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:E,width:o,stroke:"none",fill:t[P],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Yq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,u=e.width,d=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var h=f.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==h[0]&&h.unshift(0);var m=h.map((v,b)=>{var S=h[b+1],k=S==null,E=k?o+u-v:S-v;if(E<=0)return null;var P=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:s,width:E,height:d,stroke:"none",fill:n[P],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Qq=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return nO(A0(Zt(Zt(Zt({},ti),r),{},{ticks:iO(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Xq=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return nO(A0(Zt(Zt(Zt({},ti),r),{},{ticks:iO(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},Zq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:nr.grid};function E_(e){var t=fO(),r=hO(),n=dO(),i=Zt(Zt({},Hr(e,Zq)),{},{x:be(e.x)?e.x:n.left,y:be(e.y)?e.y:n.top,width:be(e.width)?e.width:n.width,height:be(e.height)?e.height:n.height}),o=i.xAxisId,s=i.yAxisId,u=i.x,d=i.y,f=i.width,h=i.height,m=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,S=yr(),k=Ee(F=>tE(F,"xAxis",o,S)),E=Ee(F=>tE(F,"yAxis",s,S));if(!Nn(f)||!Nn(h)||!be(u)||!be(d))return null;var P=i.verticalCoordinatesGenerator||Qq,j=i.horizontalCoordinatesGenerator||Xq,_=i.horizontalPoints,O=i.verticalPoints;if((!_||!_.length)&&typeof j=="function"){var N=v&&v.length,C=j({yAxis:E?Zt(Zt({},E),{},{ticks:N?v:E.ticks}):void 0,width:t??f,height:r??h,offset:n},N?!0:m);qd(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(_=C)}if((!O||!O.length)&&typeof P=="function"){var R=b&&b.length,z=P({xAxis:k?Zt(Zt({},k),{},{ticks:R?b:k.ticks}):void 0,width:t??f,height:r??h,offset:n},R?!0:m);qd(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof z,"]")),Array.isArray(z)&&(O=z)}return y.createElement(fi,{zIndex:i.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Kq,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),y.createElement(Gq,ja({},i,{horizontalPoints:_})),y.createElement(Yq,ja({},i,{verticalPoints:O})),y.createElement(Vq,ja({},i,{offset:n,horizontalPoints:_,xAxis:k,yAxis:E})),y.createElement(qq,ja({},i,{offset:n,verticalPoints:O,xAxis:k,yAxis:E}))))}E_.displayName="CartesianGrid";var Jq={},P_=Jt({name:"errorBars",initialState:Jq,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(s=>s.dataKey===i.dataKey&&s.direction===i.direction?o:s))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),C0=P_.actions;C0.addErrorBar;C0.replaceErrorBar;C0.removeErrorBar;var eG=P_.reducer;function A_(e,t){var r,n,i=Ee(f=>ui(f,e)),o=Ee(f=>ci(f,t)),s=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:kt.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:St.allowDataOverflow,d=s||u;return{needClip:d,needClipX:s,needClipY:u}}function tG(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=P0(),o=A_(t,r),s=o.needClipX,u=o.needClipY,d=o.needClip,f=Ee(_=>cj(_,t,!1)),h=Ee(_=>dj(_,r,!1));if(!d||!i)return null;var m=i.x,v=i.y,b=i.width,S=i.height,k=s&&f?Math.min(f[0],f[1]):m-b/2,E=u&&h?Math.min(h[0],h[1]):v-S/2,P=s&&f?Math.abs(f[1]-f[0]):b*2,j=u&&h?Math.abs(h[1]-h[0]):S*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:E,width:P,height:j}))}function rG(e){var t=Ff(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,s=Number(i),u=Number(o);return(Number.isNaN(s)||s<0)&&(s=r),(Number.isNaN(u)||u<0)&&(u=n),{r:s,strokeWidth:u}}return{r,strokeWidth:n}}function j0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:v_}function _0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:v_}var O_=(e,t,r)=>xj(e,"xAxis",j0(e,t),r),C_=(e,t,r)=>yj(e,"xAxis",j0(e,t),r),j_=(e,t,r)=>xj(e,"yAxis",_0(e,t),r),__=(e,t,r)=>yj(e,"yAxis",_0(e,t),r),nG=H([ot,O_,j_,C_,__],(e,t,r,n,i)=>Tn(e,"xAxis")?Vd(t,n,!1):Vd(r,i,!1)),iG=(e,t)=>t,N_=H([LC,iG],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),I_=e=>{var t=ot(e),r=Tn(t,"xAxis");return r?"yAxis":"xAxis"},aG=(e,t)=>{var r=I_(e);return r==="yAxis"?_0(e,t):j0(e,t)},oG=(e,t,r)=>GC(e,I_(e),aG(e,t),r),lG=H([N_,oG],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=_y(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,s=o==null?void 0:o.find(u=>u.key===i);if(s!=null)return s.map(u=>[u[0],u[1]])}}}),sG=H([ot,O_,j_,C_,__,lG,I6,nG,N_,Y6],(e,t,r,n,i,o,s,u,d,f)=>{var h=s.chartData,m=s.dataStartIndex,v=s.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var b=d.data,S;if(b&&b.length>0?S=b:S=h==null?void 0:h.slice(m,v+1),S!=null)return TG({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:m,areaSettings:d,stackedData:o,displayedData:S,chartBaseValue:f,bandSize:u})}}),uG=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],cG=["id","baseLine"];function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var t=1;tm.y||0));return be(i)?h=Math.max(i,h):i&&Array.isArray(i)&&i.length&&(h=Math.max(...i.map(m=>m.y||0),h)),be(h)?y.createElement("rect",{x:um.x||0));return be(i)?h=Math.max(i,h):i&&Array.isArray(i)&&i.length&&(h=Math.max(...i.map(m=>m.x||0),h)),be(h)?y.createElement("rect",{x:0,y:ue==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[kl(kl({},r.next),{},{x:Qn(r.prev.x,r.next.x,t),y:Qn(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),T_={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:S0,animationInterpolateFn:kG,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:mG,xAxisId:0,yAxisId:0,zIndex:nr.area};function Ef(e,t){return e&&e!=="none"?e:t}var SG=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,s=e.hide;return[{inactive:s,dataKey:t,type:o,color:Ef(n,i),value:aO(r,t),payload:e}]},EG=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,s=e.name,u=e.hide,d=e.unit,f=e.tooltipType,h=e.id,m={dataDefinedOnItem:r,getPosition:Al,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:aO(s,t),hide:u,type:f,color:Ef(n,o),unit:d,graphicalItemId:h}};return y.createElement(RK,{tooltipEntrySettings:m})});function PG(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,s=n.dataKey,u=ln(n);return y.createElement(PV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:u,needClip:i,clipPathId:t})}function AG(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var s,u,d={x:(s=o.x)!==null&&s!==void 0?s:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return kl(kl({},d),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return y.createElement(wK,{value:t?i:void 0},r)}function OG(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,s=e.animationElapsedTime,u=e.isAnimating,d=e.isEntrance,f=o.layout,h=o.type,m=o.stroke,v=o.connectNulls,b=o.isRange,S=o.shape,k=o.id,E=M_(o,vG),P=Br(E),j=kl(kl({},P),{},{id:k,points:t,connectNulls:v,type:h,baseLine:r,layout:f,stroke:m,isRange:b,animationElapsedTime:s,isAnimating:u,isEntrance:d});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Ur,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},y.createElement(DK,{option:S,DefaultShape:T_.shape,shapeProps:j})),y.createElement(PG,{points:t,props:E,clipPathId:i}))}function CG(e,t,r){if(be(e)){var n=be(t)?t:void 0;return Qn(n,e,r)}if(Ut(e)||jn(e)){var i=be(t)?t:void 0;return Qn(i,0,r)}return e}function jG(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,s=n.points,u=n.baseLine,d=n.isAnimationActive,f=n.animationBegin,h=n.animationDuration,m=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,S=y.useMemo(()=>({points:s,baseLine:u}),[s,u]),k=h_(S,o),E=vy(),P=JK(n.onAnimationStart,n.onAnimationEnd),j=P.isAnimating,_=P.handleAnimationStart,O=P.handleAnimationEnd,N=k.startValue;if(E==null)return null;var C;return Array.isArray(u)&&Array.isArray(N)?C=Og(N,u,v):Array.isArray(u)?C=Og(null,u,v):C=null,y.createElement(eV,{animationInput:S,animationIdPrefix:"recharts-area-",items:s,previousItemsRef:i,isAnimationActive:d,animationBegin:f,animationDuration:h,animationEasing:m,onAnimationStart:_,onAnimationEnd:O,animationInterpolateFn:b,animationMatchBy:v,layout:E},(R,z,F)=>{var V;return z===1?V=u:Array.isArray(u)?V=b(C,z,E):V=F?u:CG(u,N,z),k.syncStepValue(V,z),y.createElement(AG,{showLabels:!j,points:s},n.children,y.createElement(OG,{points:R,baseLine:V,needClip:t,clipPathId:r,props:n,animationElapsedTime:z,isAnimating:j||z<1,isEntrance:F}),y.createElement(EK,{label:n.label}))})}function _G(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=y.useRef(null),o=y.useRef();return y.createElement(jG,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class NG extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,s=t.top,u=t.left,d=t.needClip,f=t.xAxisId,h=t.yAxisId,m=t.width,v=t.height,b=t.id,S=t.baseLine,k=t.zIndex;if(r)return null;var E=Xe("recharts-area",o),P=b,j=rG(n),_=j.r,O=j.strokeWidth,N=d_(n),C=_*2+O,R=d?"url(#clipPath-".concat(N?"":"dots-").concat(P,")"):void 0;return y.createElement(fi,{zIndex:k},y.createElement(Ur,{className:E},d&&y.createElement("defs",null,y.createElement(tG,{clipPathId:P,xAxisId:f,yAxisId:h}),!N&&y.createElement("clipPath",{id:"clipPath-dots-".concat(P)},y.createElement("rect",{x:u-C/2,y:s-C/2,width:m+C,height:v+C}))),y.createElement(_G,{needClip:d,clipPathId:P,props:this.props})),y.createElement(VE,{points:i,mainColor:Ef(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:R}),this.props.isRange&&Array.isArray(S)&&y.createElement(VE,{points:S,mainColor:Ef(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:R}))}}function IG(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,s=e.connectNulls,u=e.dot,d=e.fill,f=e.fillOpacity,h=e.hide,m=e.isAnimationActive,v=e.legendType,b=e.stroke,S=e.xAxisId,k=e.yAxisId,E=M_(e,gG),P=Ol(),j=Uj(),_=A_(S,k),O=_.needClip,N=yr(),C=(t=Ee(le=>sG(le,e.id,N)))!==null&&t!==void 0?t:{},R=C.points,z=C.isRange,F=C.baseLine,V=P0();if(P!=="horizontal"&&P!=="vertical"||V==null||j!=="AreaChart"&&j!=="ComposedChart")return null;var Q=V.height,B=V.width,ue=V.x,G=V.y;return!R||!R.length?null:y.createElement(NG,Sf({},E,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:F,connectNulls:s,dot:u,fill:d,fillOpacity:f,height:Q,hide:h,layout:P,isAnimationActive:m,isRange:z,legendType:v,needClip:O,points:R,stroke:b,width:B,left:ue,top:G,xAxisId:S,yAxisId:k}))}var MG=(e,t,r,n,i)=>{var o=r??t;if(be(o))return o;var s=e==="horizontal"?i:n,u=s.scale.domain();if(s.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function TG(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,s=e.layout,u=e.chartBaseValue,d=e.xAxis,f=e.yAxis,h=e.displayedData,m=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,S=e.bandSize,k=o&&o.length,E=MG(s,u,n,d,f),P=s==="horizontal",j=!1,_=h.map((N,C)=>{var R,z,F,V;if(k)V=o[m+C];else{var Q=Nt(N,i);Array.isArray(Q)?(V=Q,j=!0):V=[E,Q]}var B=(R=(z=V)===null||z===void 0?void 0:z[1])!==null&&R!==void 0?R:null,ue=B==null||k&&!r&&Nt(N,i)==null;if(P){var G;return{x:Qw({axis:d,ticks:v,bandSize:S,entry:N,index:C}),y:ue?null:(G=f.scale.map(B))!==null&&G!==void 0?G:null,value:V,payload:N}}return{x:ue?null:(F=d.scale.map(B))!==null&&F!==void 0?F:null,y:Qw({axis:f,ticks:b,bandSize:S,entry:N,index:C}),value:V,payload:N}}),O;return k||j?O=_.map(N=>{var C,R=Array.isArray(N.value)?N.value[0]:null;if(P){var z;return{x:N.x,y:R!=null&&N.y!=null&&(z=f.scale.map(R))!==null&&z!==void 0?z:null,payload:N.payload}}return{x:R!=null&&(C=d.scale.map(R))!==null&&C!==void 0?C:null,y:N.y,payload:N.payload}}):O=P?f.scale.map(E):d.scale.map(E),{points:_,baseLine:O??0,isRange:j}}function DG(e){var t=Hr(e,T_),r=yr();return y.createElement(uV,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement($K,{legendPayload:SG(t)}),y.createElement(EG,{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:n}),y.createElement(vV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:yL(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(IG,Sf({},t,{id:n}))))}var D_=y.memo(DG,sh);D_.displayName="Area";var RG=["domain","range"],$G=["domain","range"];function rP(e,t){if(e==null)return{};var r,n,i=LG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(s!=null)return aP(aP({},o),{},{type:s})},[o,s]);return y.useLayoutEffect(()=>{u!=null&&(r.current===null?t(_V(u)):r.current!==u&&t(NV({prev:r.current,next:u})),r.current=u)},[u,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(IV(r.current)),r.current=null)},[t]),null}var qG=e=>{var t=e.xAxisId,r=e.className,n=Ee(lO),i=yr(),o="xAxis",s=Ee(v=>gj(v,o,t,i)),u=Ee(v=>O7(v,t)),d=Ee(v=>M7(v,t)),f=Ee(v=>TC(v,t));if(u==null||d==null||f==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=jg(e,FG);f.id,f.scale;var m=jg(f,BG);return y.createElement(O0,Cg({},h,m,{x:d.x,y:d.y,width:u.width,height:u.height,className:Xe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:s,axisType:o,axisId:t}))},GG={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:ti.axisLine,height:kt.height,hide:!1,includeHidden:kt.includeHidden,interval:kt.interval,label:!1,minTickGap:kt.minTickGap,mirror:kt.mirror,orientation:kt.orientation,padding:kt.padding,reversed:kt.reversed,scale:kt.scale,tick:kt.tick,tickCount:kt.tickCount,tickLine:ti.tickLine,tickSize:ti.tickSize,type:kt.type,niceTicks:kt.niceTicks,xAxisId:0},YG=e=>{var t=Hr(e,GG);return y.createElement(y.Fragment,null,y.createElement(VG,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(qG,t))},_g=y.memo(YG,R_);_g.displayName="XAxis";var QG=["type"],XG=["dangerouslySetInnerHTML","ticks","scale"],ZG=["id","scale"];function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(s!=null)return lP(lP({},o),{},{type:s})},[s,o]);return y.useLayoutEffect(()=>{u!=null&&(r.current===null?t(MV(u)):r.current!==u&&t(TV({prev:r.current,next:u})),r.current=u)},[u,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(DV(r.current)),r.current=null)},[t]),null}function iY(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=y.useRef(null),s=y.useRef(null),u=Ee(lO),d=yr(),f=xt(),h="yAxis",m=Ee(P=>R7(P,t)),v=Ee(P=>D7(P,t)),b=Ee(P=>gj(P,h,t,d)),S=Ee(P=>DC(P,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!m||k0(i)||y.isValidElement(i)||S==null)){var P=o.current;if(P){var j=P.getCalculatedWidth();Math.round(m.width)!==Math.round(j)&&f(RV({id:t,width:j}))}}},[b,m,f,i,t,n,S]),m==null||v==null||S==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=Ig(e,XG);S.id,S.scale;var E=Ig(S,ZG);return y.createElement(O0,Ng({},k,E,{ref:o,labelRef:s,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:m.width,height:m.height,className:Xe("recharts-".concat(h," ").concat(h),r),viewBox:u,ticks:b,axisType:h,axisId:t}))}var aY={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:ti.axisLine,hide:!1,includeHidden:St.includeHidden,interval:St.interval,label:!1,minTickGap:St.minTickGap,mirror:St.mirror,orientation:St.orientation,padding:St.padding,reversed:St.reversed,scale:St.scale,tick:St.tick,tickCount:St.tickCount,tickLine:ti.tickLine,tickSize:ti.tickSize,type:St.type,niceTicks:St.niceTicks,width:St.width,yAxisId:0},oY=e=>{var t=Hr(e,aY);return y.createElement(y.Fragment,null,y.createElement(nY,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(iY,t))},$_=y.memo(oY,R_);$_.displayName="YAxis";var lY=(e,t)=>t,N0=H([lY,ot,YO,Mt,Rj,di,iW,Kt],dW);function sY(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function I0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(sY(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var s=(u,d)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((d-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>s(u.clientX,u.clientY)):s(e.clientX,e.clientY)}var L_=Cr("mouseClick"),z_=Pu();z_.startListening({actionCreator:L_,effect:(e,t)=>{var r=e.payload,n=N0(t.getState(),I0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(X7({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Mg=Cr("mouseMove"),F_=Pu(),zo=null,ya=null,hv=null;F_.startListening({actionCreator:Mg,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||(s==null?void 0:s.includes("mousemove"));zo!==null&&(cancelAnimationFrame(zo),zo=null),ya!==null&&(typeof o!="number"||!u)&&(clearTimeout(ya),ya=null),hv=I0(r);var d=()=>{var f=t.getState(),h=Lu(f,f.tooltip.settings.shared);if(!hv){zo=null,ya=null;return}if(h==="axis"){var m=N0(f,hv);(m==null?void 0:m.activeIndex)!=null?t.dispatch(Aj({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(Pj())}zo=null,ya=null};if(!u){d();return}o==="raf"?zo=requestAnimationFrame(d):typeof o=="number"&&ya===null&&(ya=setTimeout(d,o))}});function uY(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?"<>":t}var sP={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},B_=Jt({name:"rootProps",initialState:sP,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:sP.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}}}),cY=B_.reducer,dY=B_.actions.updateOptions,fY=null,hY={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},U_=Jt({name:"polarOptions",initialState:fY,reducers:hY});U_.actions.updatePolarOptions;var pY=U_.reducer,W_=Cr("keyDown"),H_=Cr("focus"),K_=Cr("blur"),Ch=Pu(),Fo=null,xa=null,yd=null;Ch.startListening({actionCreator:W_,effect:(e,t)=>{yd=e.payload,Fo!==null&&(cancelAnimationFrame(Fo),Fo=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,s=o==="all"||o.includes("keydown");xa!==null&&(typeof i!="number"||!s)&&(clearTimeout(xa),xa=null);var u=()=>{try{var d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var h=d.tooltip.keyboardInteraction,m=yd;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var v=Ws(h,Qa(d),bl(d),wl(d)),b=v==null?-1:Number(v),S=!Number.isFinite(b)||b<0,k=di(d),E=Qa(d),P=Lu(d,d.tooltip.settings.shared);if(m==="Enter"){if(S)return;var j=yf(d,P,"hover",String(h.index));t.dispatch(gf({active:!h.active,activeIndex:h.index,activeCoordinate:j}));return}var _=B7(d),O=_==="left-to-right"?1:-1,N=m==="ArrowRight"?1:-1,C;if(S){var R=bl(d),z=wl(d),F=N*O,V=le=>({active:!1,index:String(le),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,F>0){for(var Q=0;Q=0;B--)if(Ws(V(B),E,R,z)!=null){C=B;break}if(C<0)return}else{C=b+N*O;var ue=(k==null?void 0:k.length)||E.length;if(ue===0||C>=ue||C<0)return}var G=yf(d,P,"hover",String(C));t.dispatch(gf({active:!0,activeIndex:C.toString(),activeCoordinate:G}))}finally{Fo=null,xa=null}};if(!s){u();return}i==="raf"?Fo=requestAnimationFrame(u):typeof i=="number"&&xa===null&&(u(),yd=null,xa=setTimeout(()=>{yd?u():(xa=null,Fo=null)},i))}});Ch.startListening({actionCreator:H_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",s=Lu(r,r.tooltip.settings.shared),u=yf(r,s,"hover",String(o));t.dispatch(gf({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Ch.startListening({actionCreator:K_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(gf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function V_(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Rr=Cr("externalEvent"),q_=Pu(),xd=new Map,$s=new Map,pv=new Map;q_.startListening({actionCreator:Rr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,s=V_(i);pv.set(o,{handler:n,reactEvent:s});var u=xd.get(o);u!==void 0&&(cancelAnimationFrame(u),xd.delete(o));var d=t.getState(),f=d.eventSettings,h=f.throttleDelay,m=f.throttledEvents,v=m,b=v==="all"||(v==null?void 0:v.includes(o)),S=$s.get(o);S!==void 0&&(typeof h!="number"||!b)&&(clearTimeout(S),$s.delete(o));var k=()=>{var j=pv.get(o);try{if(!j)return;var _=j.handler,O=j.reactEvent,N=t.getState(),C={activeCoordinate:W9(N),activeDataKey:F9(N),activeIndex:du(N),activeLabel:zj(N),activeTooltipIndex:du(N),isTooltipActive:H9(N)};_&&_(C,O)}finally{xd.delete(o),$s.delete(o),pv.delete(o)}};if(!b){k();return}if(h==="raf"){var E=requestAnimationFrame(k);xd.set(o,E)}else if(typeof h=="number"){if(!$s.has(o)){k();var P=setTimeout(k,h);$s.set(o,P)}}else k()}}});var mY=H([Dl],e=>e.tooltipItemPayloads),vY=H([mY,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var i=n.getPosition;if(i!=null)return i(t)}}}),G_=Cr("touchMove"),Y_=Pu(),ba=null,Di=null,uP=null,Ls=null;Y_.startListening({actionCreator:G_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Ls=V_(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||s.includes("touchmove");ba!==null&&(cancelAnimationFrame(ba),ba=null),Di!==null&&(typeof o!="number"||!u)&&(clearTimeout(Di),Di=null),uP=Array.from(r.touches).map(f=>I0({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var d=()=>{if(Ls!=null){var f=t.getState(),h=Lu(f,f.tooltip.settings.shared);if(h==="axis"){var m,v=(m=uP)===null||m===void 0?void 0:m[0];if(v==null){ba=null,Di=null;return}var b=N0(f,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(Aj({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(h==="item"){var S,k=Ls.touches[0];if(document.elementFromPoint==null||k==null)return;var E=document.elementFromPoint(k.clientX,k.clientY);if(!E||!E.getAttribute)return;var P=E.getAttribute(PL),j=(S=E.getAttribute(AL))!==null&&S!==void 0?S:void 0,_=ro(f).find(C=>C.id===j);if(P==null||_==null||j==null)return;var O=_.dataKey,N=vY(f,P,j);t.dispatch(Q7({activeDataKey:O,activeIndex:P,activeCoordinate:N,activeGraphicalItemId:j}))}ba=null,Di=null}};if(!u){d();return}o==="raf"?ba=requestAnimationFrame(d):typeof o=="number"&&Di===null&&(d(),Ls=null,Di=setTimeout(()=>{Ls?d():(Di=null,ba=null)},o))}}});var Q_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},X_=Jt({name:"eventSettings",initialState:Q_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),gY=X_.actions.setEventSettings,yY=X_.reducer,xY=C2({brush:VV,cartesianAxis:$V,chartData:UW,errorBars:eG,eventSettings:yY,graphicalItems:pV,layout:uL,legend:Sz,options:$W,polarAxis:AK,polarOptions:pY,referenceElements:QV,renderedTicks:yq,rootProps:cY,tooltip:Z7,zIndex:EW}),bY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return T$({reducer:xY,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([z_.middleware,F_.middleware,Ch.middleware,q_.middleware,Y_.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(W2({type:"raf"}))},devTools:{serialize:{replacer:uY},name:"recharts-".concat(r)}})};function wY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=yr(),o=y.useRef(null);if(i)return r;o.current==null&&(o.current=bY(t,n));var s=ly;return y.createElement(zz,{context:s,store:o.current},r)}function kY(e){var t=e.layout,r=e.margin,n=xt(),i=yr();return y.useEffect(()=>{i||(n(oL(t)),n(aL(r)))},[n,i,t,r]),null}var SY=y.memo(kY,sh);function EY(e){var t=xt();return y.useEffect(()=>{t(dY(e))},[t,e]),null}var PY=e=>{var t=xt();return y.useEffect(()=>{t(gY(e))},[t,e]),null},AY=y.memo(PY,sh);function cP(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),i=xt();return y.useLayoutEffect(()=>(n.current&&i(kW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(SW({zIndex:t,isPanorama:r}))}),[i,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function dP(e){var t=e.children,r=e.isPanorama,n=Ee(hW);if(!n||n.length===0)return t;var i=n.filter(s=>s<0),o=n.filter(s=>s>0);return y.createElement(y.Fragment,null,i.map(s=>y.createElement(cP,{key:s,zIndex:s,isPanorama:r})),t,o.map(s=>y.createElement(cP,{key:s,zIndex:s,isPanorama:r})))}var OY=["children"];function CY(e,t){if(e==null)return{};var r,n,i=jY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=fO(),n=hO(),i=SO();if(!Nn(r)||!Nn(n))return null;var o=e.children,s=e.otherAttributes,u=e.title,d=e.desc,f,h;return s!=null&&(typeof s.tabIndex=="number"?f=s.tabIndex:f=i?0:void 0,typeof s.role=="string"?h=s.role:h=i?"application":void 0),y.createElement(VA,Pf({},s,{title:u,desc:d,role:h,tabIndex:f,width:r,height:n,style:_Y,ref:t}),o)}),IY=e=>{var t=e.children,r=Ee(nh);if(!r)return null;var n=r.width,i=r.height,o=r.y,s=r.x;return y.createElement(VA,{width:n,height:i,x:s,y:o},t)},fP=y.forwardRef((e,t)=>{var r=e.children,n=CY(e,OY),i=yr();return i?y.createElement(IY,null,y.createElement(dP,{isPanorama:!0},r)):y.createElement(NY,Pf({ref:t},n),y.createElement(dP,{isPanorama:!1},r))});function MY(e,t){return $Y(e)||RY(e,t)||DY(e,t)||TY()}function TY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DY(e,t){if(e){if(typeof e=="string")return hP(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hP(e,t):void 0}}function hP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var s=n.getBoundingClientRect(),u=s.width/n.offsetWidth;Fe(u)&&u!==o&&e(sL(u))}},[n,e,o]),i}function pP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(XW(),null);function Of(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var GY=y.forwardRef((e,t)=>{var r,n,i=y.useRef(null),o=y.useState({containerWidth:Of((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Of((n=e.style)===null||n===void 0?void 0:n.height)}),s=Af(o,2),u=s[0],d=s[1],f=y.useCallback((m,v)=>{d(b=>{var S=Math.round(m),k=Math.round(v);return b.containerWidth===S&&b.containerHeight===k?b:{containerWidth:S,containerHeight:k}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),i.current!=null&&(i.current.disconnect(),i.current=null),m!=null&&typeof ResizeObserver<"u"){var v=m.getBoundingClientRect(),b=v.width,S=v.height;f(b,S);var k=P=>{var j=P[0];if(j!=null){var _=j.contentRect,O=_.width,N=_.height;f(O,N)}},E=new ResizeObserver(k);E.observe(m),i.current=E}},[t,f]);return y.useEffect(()=>()=>{var m=i.current;m!=null&&m.disconnect()},[f]),y.createElement(y.Fragment,null,y.createElement(Ou,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",Ji({ref:h},e)))}),YY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=y.useState({containerWidth:Of(r),containerHeight:Of(n)}),o=Af(i,2),s=o[0],u=o[1],d=y.useCallback((h,m)=>{u(v=>{var b=Math.round(h),S=Math.round(m);return v.containerWidth===b&&v.containerHeight===S?v:{containerWidth:b,containerHeight:S}})},[]),f=y.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var m=h.getBoundingClientRect(),v=m.width,b=m.height;d(v,b)}},[t,d]);return y.createElement(y.Fragment,null,y.createElement(Ou,{width:s.containerWidth,height:s.containerHeight}),y.createElement("div",Ji({ref:f},e)))}),QY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Ou,{width:r,height:n}),y.createElement("div",Ji({ref:t},e)))}),XY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(YY,Ji({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(QY,Ji({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Ou,{width:r,height:n}),y.createElement("div",Ji({ref:t},e)))});function ZY(e){return e?GY:XY}var JY=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,s=e.onContextMenu,u=e.onDoubleClick,d=e.onMouseDown,f=e.onMouseEnter,h=e.onMouseLeave,m=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,S=e.onTouchMove,k=e.onTouchStart,E=e.style,P=e.width,j=e.responsive,_=e.dispatchTouchEvents,O=_===void 0?!0:_,N=y.useRef(null),C=xt(),R=y.useState(null),z=Af(R,2),F=z[0],V=z[1],Q=y.useState(null),B=Af(Q,2),ue=B[0],G=B[1],le=LY(),fe=py(),de=(fe==null?void 0:fe.width)>0?fe.width:P,Y=(fe==null?void 0:fe.height)>0?fe.height:i,ae=y.useCallback(Pe=>{le(Pe),typeof t=="function"&&t(Pe),V(Pe),G(Pe),Pe!=null&&(N.current=Pe)},[le,t,V,G]),X=y.useCallback(Pe=>{C(L_(Pe)),C(Rr({handler:o,reactEvent:Pe}))},[C,o]),M=y.useCallback(Pe=>{C(Mg(Pe)),C(Rr({handler:f,reactEvent:Pe}))},[C,f]),T=y.useCallback(Pe=>{C(Pj()),C(Rr({handler:h,reactEvent:Pe}))},[C,h]),Z=y.useCallback(Pe=>{C(Mg(Pe)),C(Rr({handler:m,reactEvent:Pe}))},[C,m]),se=y.useCallback(()=>{C(H_())},[C]),te=y.useCallback(()=>{C(K_())},[C]),ce=y.useCallback(Pe=>{C(W_(Pe.key))},[C]),ge=y.useCallback(Pe=>{C(Rr({handler:s,reactEvent:Pe}))},[C,s]),_e=y.useCallback(Pe=>{C(Rr({handler:u,reactEvent:Pe}))},[C,u]),J=y.useCallback(Pe=>{C(Rr({handler:d,reactEvent:Pe}))},[C,d]),we=y.useCallback(Pe=>{C(Rr({handler:v,reactEvent:Pe}))},[C,v]),Ae=y.useCallback(Pe=>{C(Rr({handler:k,reactEvent:Pe}))},[C,k]),ne=y.useCallback(Pe=>{O&&C(G_(Pe)),C(Rr({handler:S,reactEvent:Pe}))},[C,O,S]),lt=y.useCallback(Pe=>{C(Rr({handler:b,reactEvent:Pe}))},[C,b]),$e=ZY(j);return y.createElement(qj.Provider,{value:F},y.createElement(h5.Provider,{value:ue},y.createElement($e,{width:de??(E==null?void 0:E.width),height:Y??(E==null?void 0:E.height),className:Xe("recharts-wrapper",n),style:zY({position:"relative",cursor:"default",width:de,height:Y},E),onClick:X,onContextMenu:ge,onDoubleClick:_e,onFocus:se,onBlur:te,onKeyDown:ce,onMouseDown:J,onMouseEnter:M,onMouseLeave:T,onMouseMove:Z,onMouseUp:we,onTouchEnd:lt,onTouchMove:ne,onTouchStart:Ae,ref:ae},y.createElement(qY,null),r)))}),eQ=["width","height","responsive","children","className","style","compact","title","desc"];function tQ(e,t){if(e==null)return{};var r,n,i=rQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,s=e.className,u=e.style,d=e.compact,f=e.title,h=e.desc,m=tQ(e,eQ),v=ln(m);return d?y.createElement(y.Fragment,null,y.createElement(Ou,{width:r,height:n}),y.createElement(fP,{otherAttributes:v,title:f,desc:h},o)):y.createElement(JY,{className:s,style:u,width:r,height:n,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},y.createElement(fP,{otherAttributes:v,title:f,desc:h,ref:t},y.createElement(nq,null,o)))});function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(cQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:dQ,tooltipPayloadSearcher:DW,categoricalChartProps:e,ref:t}));const hQ="rgba(130,130,150,0.14)",mv="rgba(130,130,150,0.85)";function pQ(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function Z_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function mQ({active:e,payload:t,unit:r,label:n}){return!e||!(t!=null&&t.length)?null:x.jsxs("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:[Number.isFinite(n)&&x.jsx("div",{className:"mb-1 border-b border-border/40 pb-1 font-mono text-[10px] text-muted-foreground/80",children:new Date(n).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),x.jsx("div",{className:"space-y-1",children:t.map(i=>x.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[x.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),x.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:i.name}),x.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:Z_(i.value,r)})]},i.dataKey))})]})}function J_({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176,showTime:o=!1}){var h,m;const s=e.reduce((v,b)=>t.reduce((S,k)=>Math.max(S,Number(b[k.key])||0),v),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(s*1.2/25)*25)):Math.max(pQ(s*1.15),10),d=e.length>1?Number((h=e[e.length-1])==null?void 0:h.t)-Number((m=e[0])==null?void 0:m.t):0,f=v=>new Date(v).toLocaleTimeString("de-DE",d<=10*6e4?{hour:"2-digit",minute:"2-digit",second:"2-digit"}:{hour:"2-digit",minute:"2-digit"});return x.jsx("div",{style:{height:i},className:"w-full",children:x.jsx(az,{width:"100%",height:"100%",children:x.jsxs(fQ,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[x.jsx("defs",{children:t.map(v=>x.jsxs("linearGradient",{id:`grad-${v.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0%",stopColor:v.color,stopOpacity:.22}),x.jsx("stop",{offset:"100%",stopColor:v.color,stopOpacity:0})]},v.key))}),x.jsx(E_,{vertical:!1,stroke:hQ}),o?x.jsx(_g,{dataKey:"t",type:"number",domain:["dataMin","dataMax"],tickFormatter:f,tickCount:5,minTickGap:40,interval:"preserveStartEnd",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:mv},height:18}):x.jsx(_g,{dataKey:"t",hide:!0}),x.jsx($_,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:v=>Z_(v,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:mv}}),x.jsx(cH,{content:x.jsx(mQ,{unit:r}),cursor:{stroke:mv,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(v=>x.jsx(D_,{type:"monotone",dataKey:v.key,name:v.label,stroke:v.color,strokeWidth:2,fill:`url(#grad-${v.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},v.key))]})})})}const eN={"1h":60,"24h":1440},gP={live:"Live","1h":"1 h","24h":"24 h"};function tN({value:e,onChange:t}){return x.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(gP).map(r=>x.jsx("button",{onClick:()=>t(r),className:Re("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:gP[r]},r))})}const vQ=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function gQ(){var h,m,v,b;const{sys:e,hist:t}=r5(),[r,n]=y.useState("live"),i=LA(r==="live"?60:eN[r],r!=="live"),o=y.useMemo(()=>{var S;return r==="live"?t:(((S=i.data)==null?void 0:S.points)??[]).map(k=>({t:k.t*1e3,cpu:k.cpu,ram:k.ram,gpu:k.gpu,disk:k.disk}))},[r,t,i.data]),s=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),u=vQ.filter(S=>S.key!=="gpu"||s),d={cpu:(h=e==null?void 0:e.cpu)==null?void 0:h.percent,ram:(m=e==null?void 0:e.ram)==null?void 0:m.percent,gpu:s?e.gpu.busy_percent:null,disk:(v=e==null?void 0:e.disk)==null?void 0:v.percent},f={cpu:(b=e==null?void 0:e.cpu)!=null&&b.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Io(e.ram.used)}/${Io(e.ram.total)} GB`:"",gpu:s?`${Io(e.gpu.gtt_used)}/${Io(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Io(e.disk.used)}/${Io(e.disk.total)} GB`:""};return x.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[x.jsxs("div",{children:[x.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[x.jsx(qP,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),r==="live"&&x.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),x.jsx("div",{className:"ml-auto",children:x.jsx(tN,{value:r,onChange:n})})]}),e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:u.map(S=>x.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[x.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:S.color}}),x.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:S.label}),x.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(d[S.key]??0),"%"]}),f[S.key]&&x.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:f[S.key]})]},S.key))}),r!=="live"&&o.length===0&&x.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:i.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(r==="live"||o.length>0)&&x.jsx(J_,{data:o,series:u,unit:"%",yMode:"percent",height:176,showTime:!0})]}):x.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&x.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&x.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&x.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const yP=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function yQ(){const{data:e}=FA(),t=Y3(),[r,n]=y.useState("live"),i=LA(r==="live"?60:eN[r],r!=="live"),o=y.useMemo(()=>{var h;if(r==="live")return t;const d=((h=i.data)==null?void 0:h.points)??[],f=[];for(let m=1;mx.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:d.color}}),x.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:d.label}),x.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((s==null?void 0:s[d.key])??0)})]},d.key))})]})]}),r!=="live"&&o.length===0?x.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:i.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):e?x.jsx(J_,{data:o,series:yP,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):x.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),x.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}const Sl=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],_a=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function xQ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function Dg(e){return Sl.reduce((t,r)=>t+(e[r.key]??0),0)}function bQ(e){let t=null;for(const r of Sl){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function wQ({t:e,scale:t}){const r=Sl.map(n=>`${n.label} ${_a(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${_a(e.mem0_ms)})`:"");return x.jsxs("div",{className:"flex items-center gap-2.5",children:[x.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:xQ(e.ts)}),x.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[x.jsx("div",{className:"absolute inset-0 flex",children:Sl.map(n=>{const i=e[n.key];return!i||i<=0?null:x.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&x.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),x.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":_a(Dg(e))})]})}function kQ(){const{data:e}=N3(12),t=e??[],r=Math.max(1,...t.map(o=>Dg(o))),n=t[0],i=n?bQ(n):null;return x.jsxs("div",{className:"mc-card p-5",children:[x.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[x.jsxs("div",{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(fT,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),x.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?x.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[x.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":_a(Dg(n))}),x.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&x.jsxs(x.Fragment,{children:[" · Täter: ",x.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",_a(i.ms)]})]})]}):x.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&x.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[Sl.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${_a(n[o.key])}`).join(" · "),n.mem0_ms!=null&&x.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",_a(n.mem0_ms)]})]})]}),x.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Sl.map(o=>x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),x.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?x.jsx("div",{className:"space-y-1.5",children:t.map(o=>x.jsx(wQ,{t:o,scale:r},o.id))}):x.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),x.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const en=e=>e==null?"–":e.toLocaleString("de-DE");function SQ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}const EQ={passthrough:{label:"frei",tone:"text-emerald-400"},defer:{label:"wartet",tone:"text-amber-400"},soft:{label:"Savepoint",tone:"text-amber-400"},hard:{label:"STOPP",tone:"text-rose-400"}};function PQ(e){return!(e!=null&&e.est)||!(e!=null&&e.exact)?null:(e.est-e.exact)/e.exact*100}function AQ(){const{data:e}=I3();if(!(e!=null&&e.reachable))return x.jsxs("div",{className:"mc-card p-5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(V1,{className:"h-4.5 w-4.5 text-muted-foreground"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Wächter"})]}),x.jsxs("div",{className:"mt-3 text-xs text-muted-foreground",children:["Nicht erreichbar. Die Coding-Sitzungen laufen dann ohne Sitzungs-Bremse.",x.jsx("div",{className:"mt-1 font-mono text-[10px] text-muted-foreground/60",children:(e==null?void 0:e.error)??"keine Antwort von :8100"})]})]});const t=e.soft??0,r=e.hard??null,n=e.recent??[],i=n.find(m=>!(e.exempt_models??[]).includes(m.model)),o=(i==null?void 0:i.exact)??(i==null?void 0:i.est)??0,s=Math.max(r??t*1.2,t*1.2,o),u=Math.min(100,o/s*100),d=PQ(n.find(m=>m.est!=null&&m.exact!=null)),f=e.counters,h=r&&o>=r?"bg-rose-500":o>=t?"bg-amber-500":"bg-emerald-500";return x.jsxs("div",{className:"mc-card p-5",children:[x.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[x.jsxs("div",{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(V1,{className:"h-4.5 w-4.5 text-primary"}),x.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Wächter"}),x.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),x.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[x.jsx("span",{className:"font-space text-3xl font-bold tracking-tight tabular-nums text-foreground",children:en(o)}),x.jsx("span",{className:"text-xs text-muted-foreground",children:"Tokens in der letzten Bau-Anfrage"})]})]}),x.jsxs("div",{className:"shrink-0 pt-1 text-right",children:[x.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-amber-400",children:["Savepoint ab ",en(t)]}),r!=null&&x.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-rose-400",children:["Stopp ab ",en(r)]})]})]}),x.jsxs("div",{className:"relative h-3 overflow-hidden rounded-sm bg-muted/25",children:[x.jsx("div",{className:`h-full ${h} transition-all`,style:{width:`${u}%`}}),x.jsx("div",{className:"absolute inset-y-0 w-px bg-amber-400/80",style:{left:`${Math.min(100,t/s*100)}%`},title:`Savepoint-Marke ${en(t)}`}),r!=null&&x.jsx("div",{className:"absolute inset-y-0 w-px bg-rose-400/80",style:{left:`${Math.min(100,r/s*100)}%`},title:`Harter Stopp ${en(r)}`})]}),x.jsx("div",{className:"mt-3 grid grid-cols-4 gap-2 text-center",children:[{k:"Anfragen",v:en(f==null?void 0:f.chat)},{k:"Savepoints",v:en(f==null?void 0:f.soft)},{k:"Stopps",v:en(f==null?void 0:f.hard)},{k:"Tokens ges.",v:en(f==null?void 0:f.tokens_prompt)}].map(m=>x.jsxs("div",{className:"rounded-sm bg-muted/20 py-1.5",children:[x.jsx("div",{className:"font-mono text-sm font-semibold tabular-nums text-foreground",children:m.v}),x.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/70",children:m.k})]},m.k))}),d!=null&&x.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-sm bg-muted/15 px-2.5 py-1.5",children:[Math.abs(d)<15?x.jsx(KP,{className:"h-3.5 w-3.5 shrink-0 text-emerald-400"}):x.jsx(Mf,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),x.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["Schätzung lag"," ",x.jsxs("span",{className:Math.abs(d)<15?"font-semibold text-emerald-400":"font-semibold text-amber-400",children:[d>0?"+":"",d.toFixed(1)," %"]})," ","neben der Wahrheit — er kalibriert sich aus jeder Antwort selbst nach."]})]}),n.length>0&&x.jsx("div",{className:"mt-3 space-y-1",children:n.slice(0,5).map((m,v)=>{const b=EQ[m.action]??{label:m.action,tone:"text-muted-foreground"};return x.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[x.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:SQ(m.t)}),x.jsx("span",{className:"w-20 shrink-0 truncate font-medium text-foreground",children:m.model||"?"}),x.jsxs("span",{className:"flex-1 font-mono tabular-nums text-muted-foreground",children:[en(m.exact??m.est),m.exact!=null&&m.est!=null&&x.jsxs("span",{className:"text-muted-foreground/50",children:[" (geschätzt ",en(m.est),")"]})]}),x.jsx("span",{className:`shrink-0 font-semibold ${b.tone}`,children:b.label})]},`${m.t}-${v}`)})}),x.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:"Alle Coding-Agenten laufen durch den Wächter (:8100). Lucys Alltagsmodelle sind ausgenommen — ein Gespräch ist keine Bau-Sitzung und wird nie unterbrochen."})]})}const Cf=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function OQ({onNavigate:e}){var de,Y,ae,X;const{data:t}=zA(),{data:r}=Jg(),{data:n}=BA(),{data:i}=R3(),{data:o}=T3(),{data:s}=D3(),{data:u}=A3(),{data:d}=O3(),f=X3(),{showAlert:h,dialogElement:m}=Zg(),v=bu(),[b,S]=y.useState({});async function k(M,T){S(Z=>({...Z,[M]:!0}));try{if(T.kind==="loadModel")await Ie(`/api/models/${encodeURIComponent(T.model)}/load`,{method:"POST"});else{const Z=await Ie("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:T.service})});Z.ok||h("Reparatur nicht ganz geklappt",(Z.err||"Unbekannter Fehler")+(T.needsSudo?` Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}v.invalidateQueries({queryKey:De.health}),v.invalidateQueries({queryKey:De.services}),v.invalidateQueries({queryKey:De.models})}catch(Z){h("Reparatur fehlgeschlagen",String((Z==null?void 0:Z.message)||Z))}finally{S(Z=>({...Z,[M]:!1}))}}const E=((de=t==null?void 0:t.running)==null?void 0:de.length)??0,P=(r==null?void 0:r.services.filter(M=>M.ok).length)??0,j=(r==null?void 0:r.services.length)??0,_=j-P,O=(i==null?void 0:i.length)??0,N=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((Y=n==null?void 0:n.components)==null?void 0:Y.filter(M=>M.update===!0).length)??0),C=u!=null&&u.available?u.open_count:0,R=d!=null&&d.available?d.items.filter(M=>M.status==="blocked").length:0,z=s?[s.gateway,s.memory,s.desktop_gateway]:[],F=z.filter(M=>M==null?void 0:M.ok).length,V=s?s.gateway.ok?s.memory.ok?s.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",Q=(ae=t==null?void 0:t.models)==null?void 0:ae.find(M=>M.role==="hermes"),B=Q!=null&&Q.name?(X=Q.name.split("/").pop())==null?void 0:X.replace(/\.gguf$/i,""):"",ue=i?i.filter(M=>["auto","agent","hermes"].includes(M.source)).length:0,G=r==null?void 0:r.services.filter(M=>!M.ok).map(M=>M.name).join(", "),le=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],fe=le.length>0?le.join(" + "):"";return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),x.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),x.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[x.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[x.jsx(CQ,{verdict:f.verdict,memory:f.memory,warns:f.warns,problems:f.problems}),x.jsx(e5,{}),x.jsxs("section",{children:[x.jsx(bd,{children:"Leistung"}),x.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[x.jsx(gQ,{}),x.jsx(yQ,{})]}),x.jsx("div",{className:"mt-4",children:x.jsx(kQ,{})}),x.jsx("div",{className:"mt-4",children:x.jsx(AQ,{})})]}),x.jsxs("section",{children:[x.jsx(bd,{children:"Bereiche"}),x.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[x.jsx(Mo,{icon:Hg,title:"Auftragsbuch",value:u!=null&&u.available?C:"—",unit:C===1?"Vorschlag":"Vorschläge",tone:u?R>0||C>0?"warn":"ok":"loading",hint:R>0?`${R} Karte${R===1?"":"n"} wartet auf deine Antwort`:C>0?`${C} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),x.jsx(Mo,{icon:HP,title:"Modelle",value:E,unit:"warm",tone:E>0?"ok":"muted",hint:B?`Hirn: ${B}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),x.jsx(Mo,{icon:Wg,title:"Gedächtnis",value:i?O:"…",unit:"Notizen",tone:i?"ok":"loading",hint:i?`${O} Fakten (${ue} auto gelernt)`:"Gedächtnis-Pool laden...",onClick:()=>e("memory")}),x.jsx(Mo,{icon:If,title:"Dienste",value:r?`${P}/${j}`:"…",unit:"laufen",tone:r?_>0?"warn":"ok":"loading",hint:G?`Ausfall: ${G}`:"Alle Dienste online",onClick:()=>Cf("maintenance")}),x.jsx(Mo,{icon:Mf,title:"Updates",value:n?N>0?N:"0":"…",unit:N>0?"bereit":"aktuell",tone:n?N>0?"warn":"ok":"loading",hint:N>0?`Verfügbar: ${fe}`:"Alles auf dem neuesten Stand",onClick:()=>Cf("maintenance")}),x.jsx(Mo,{icon:Kg,title:"Verbinden",value:s?`${F}/${z.length}`:"…",unit:"Leitungen",tone:s?F===z.length?"ok":"warn":"loading",hint:V?`Gestört: ${V}`:"Hermes Desktop & IDEs bereit",onClick:()=>e("connect")})]})]})]}),x.jsxs("div",{className:"space-y-6",children:[x.jsx(jQ,{problems:f.problems,pendingCount:N,openAuftraege:C,blockedIdeen:R,busy:b,onRepair:k,onNavigate:e}),x.jsxs("section",{children:[x.jsx(bd,{children:"Anstehendes"}),x.jsx(t5,{})]}),x.jsxs("section",{children:[x.jsx(bd,{children:"Werkzeuge & Diagnose"}),x.jsx(_Q,{agent:o,svcErrors:_,onNavigate:e})]})]})]}),m]})}function bd({children:e}){return x.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function CQ({verdict:e,memory:t,warns:r,problems:n}){const i=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",o=n.length?`${n[0].label}: ${n[0].detail}${n.length>1?` (+${n.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",s={loading:{ring:"border-border/60 bg-card/45",icon:Nf,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:mT,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Ys,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:i},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Ys,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:o}}[e],u=s.icon,d={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],f={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return x.jsxs("div",{className:Re("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",s.ring),children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:x.jsx(u,{className:Re("h-6 w-6",s.iconCls)})}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:s.title}),x.jsx("p",{className:"text-xs text-muted-foreground",children:s.sub})]})]}),x.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[x.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[x.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[x.jsx(pT,{className:"h-3.5 w-3.5"})," Speicher"]}),x.jsx("span",{className:Re("font-mono font-bold",d),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(1)} / ${t.totalGb.toFixed(1)} GB`})]}),x.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:x.jsx("div",{className:Re("h-full rounded-full transition-all duration-500",f),style:{width:`${t.pct}%`}})})]})]})}function jQ({problems:e,pendingCount:t,openAuftraege:r,blockedIdeen:n,busy:i,onRepair:o,onNavigate:s}){const u=t>0,d=r>0,f=n>0,h=e.length===0&&!u&&!d&&!f;return x.jsx("div",{className:"h-full flex flex-col justify-between",children:h?x.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[x.jsx(KP,{className:"h-5 w-5 shrink-0 text-emerald-400"}),x.jsxs("div",{children:[x.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):x.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(m=>x.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:x.jsx(m.icon,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("p",{className:"text-sm font-bold text-foreground",children:m.label}),x.jsx("p",{className:"truncate text-xs text-muted-foreground",children:m.detail})]})]}),m.repair&&x.jsxs("button",{onClick:()=>m.repair&&o(m.id,m.repair),disabled:!!i[m.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[i[m.id]?x.jsx(Nf,{className:"h-3.5 w-3.5 animate-spin"}):x.jsx(IT,{className:"h-3.5 w-3.5"}),m.repair.label]})]},m.id)),f&&x.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:x.jsx(VP,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{children:[x.jsxs("p",{className:"text-sm font-bold text-foreground",children:[n," Karte",n===1?"":"n"," braucht deine Antwort"]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),x.jsx(Vo,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),d&&x.jsxs("button",{onClick:()=>s("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:x.jsx(Hg,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{children:[x.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),x.jsx(Vo,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),u&&x.jsxs("button",{onClick:()=>Cf("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:x.jsx(Mf,{className:"h-4.5 w-4.5"})}),x.jsxs("div",{children:[x.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),x.jsx(Vo,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function _Q({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Konsole (Box-Shell)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>Cf("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return x.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:x.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const s={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[i.tone];return x.jsxs("button",{onClick:i.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[x.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:Re("text-[10px] font-semibold font-mono",i.tone==="ok"?"text-emerald-400":i.tone==="warn"?"text-amber-400":i.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:i.status}),x.jsx("span",{className:Re("h-1.5 w-1.5 rounded-full",s)})]})]},o)})})})}const NQ=y.lazy(()=>un(()=>import("./ModelsView-kzJEhvUB.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.ModelsView}))),IQ=y.lazy(()=>un(()=>import("./ConnectView-pS9nDVLn.js"),__vite__mapDeps([5,6,7,8])).then(e=>({default:e.ConnectView}))),MQ=y.lazy(()=>un(()=>import("./MemoryView-Bg74Wg9z.js"),__vite__mapDeps([9,8,10,11])).then(e=>({default:e.MemoryView}))),TQ=y.lazy(()=>un(()=>import("./AgentView-DpL99Ik0.js"),[]).then(e=>({default:e.AgentView}))),DQ=y.lazy(()=>un(()=>import("./KonsoleView-Qdl4WGOp.js"),[]).then(e=>({default:e.KonsoleView}))),RQ=y.lazy(()=>un(()=>import("./GuideView-DIZxOzg5.js"),__vite__mapDeps([12,11,3,4])).then(e=>({default:e.GuideView}))),$Q=y.lazy(()=>un(()=>import("./AuftragsbuchView-Ba9tMOnf.js"),__vite__mapDeps([13,14])).then(e=>({default:e.AuftragsbuchView}))),LQ=y.lazy(()=>un(()=>import("./IdeenView-CvrKo9TU.js"),__vite__mapDeps([15,14,1,10,4,2])).then(e=>({default:e.IdeenView}))),zQ=y.lazy(()=>un(()=>import("./ChronikView-B9KZGo_J.js"),__vite__mapDeps([16,2])).then(e=>({default:e.ChronikView}))),FQ=y.lazy(()=>un(()=>import("./EigenlebenView-rXqzvB3k.js"),__vite__mapDeps([17,11,7])).then(e=>({default:e.EigenlebenView}))),BQ=y.lazy(()=>un(()=>import("./WissenView-CrwRIwey.js"),__vite__mapDeps([18,6])).then(e=>({default:e.WissenView})));function UQ(){return x.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:x.jsx(Nf,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const WQ=/Mac|iPhone|iPad/.test(navigator.platform);function HQ(){Q3(),P3();const[e,t]=y.useState(()=>{const k=window.location.hash.slice(1);return Go.some(E=>E.id===k)?k:"dashboard"}),r=y.useCallback(k=>{window.location.hash.slice(1)===k?t(k):window.location.hash=k},[]),[n,i]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,s]=y.useState(!1),[u,d]=y.useState(!1),[f,h]=y.useState("maintenance"),{data:m,isError:v}=$A(),{data:b}=zf();y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const k=E=>{var j;h(((j=E.detail)==null?void 0:j.tab)||"maintenance"),d(!0)};return window.addEventListener("open-system-drawer",k),()=>window.removeEventListener("open-system-drawer",k)},[]),y.useEffect(()=>{const k=E=>{var j;const P=(j=E.detail)==null?void 0:j.view;P&&r(P)};return window.addEventListener("mc-navigate",k),()=>window.removeEventListener("mc-navigate",k)},[r]),y.useEffect(()=>{const k=()=>{const E=window.location.hash.slice(1);Go.some(P=>P.id===E)&&t(E)};return window.addEventListener("hashchange",k),()=>window.removeEventListener("hashchange",k)},[]),y.useEffect(()=>{s(!1)},[e]);const S=Go.find(k=>k.id===e);return x.jsxs("div",{className:"flex h-full relative",children:[x.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),x.jsx(FR,{onNavigate:r}),x.jsx(K3,{open:u,onClose:()=>d(!1),defaultTab:f}),x.jsx("aside",{className:Re("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:x.jsx(xP,{collapsed:n,onToggleCollapse:()=>{i(k=>{const E=!k;return localStorage.setItem("mc_sidebar_collapsed",E.toString()),E})},view:e,health:m,backendDown:v,sysStatus:b})}),x.jsxs("div",{className:Re("md:hidden fixed inset-0 z-50 transition-opacity duration-200",o?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!o,children:[x.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>s(!1)}),x.jsx("aside",{className:Re("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",o?"translate-x-0":"-translate-x-full"),children:x.jsx(xP,{collapsed:!1,onClose:()=>s(!1),view:e,health:m,backendDown:v,sysStatus:b})})]}),x.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[x.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[x.jsx("button",{onClick:()=>s(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:x.jsx(wT,{className:"h-5 w-5","aria-hidden":"true"})}),x.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:S.hint})]}),x.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[x.jsx(k3,{}),x.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),x.jsxs("button",{onClick:()=>{const k=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(k)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[x.jsx(uT,{className:"h-3.5 w-3.5"}),x.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),x.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:WQ?"⌘K":"Strg+K"})]})]})]}),x.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:x.jsxs(y.Suspense,{fallback:x.jsx(UQ,{}),children:[e==="dashboard"&&x.jsx(OQ,{onNavigate:k=>r(k)}),e==="ideen"&&x.jsx(LQ,{}),e==="auftraege"&&x.jsx($Q,{}),e==="models"&&x.jsx(NQ,{}),e==="connect"&&x.jsx(IQ,{}),e==="memory"&&x.jsx(MQ,{}),e==="wissen"&&x.jsx(BQ,{}),e==="chronik"&&x.jsx(zQ,{}),e==="eigenleben"&&x.jsx(FQ,{}),e==="agent"&&x.jsx(TQ,{}),e==="konsole"&&x.jsx(DQ,{}),e==="guide"&&x.jsx(RQ,{})]})})]})]})}function xP({collapsed:e,onToggleCollapse:t,onClose:r,view:n,health:i,backendDown:o,sysStatus:s}){var u,d,f,h,m;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:Re("flex items-center py-4 border-b border-border/40 shrink-0",e?"flex-col gap-3 px-2":"justify-between px-5"),children:[x.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[x.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!e&&x.jsxs("div",{className:"leading-tight",children:[x.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),x.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),t&&x.jsx("button",{onClick:t,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":e?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:e?"Maximieren":"Minimieren",children:e?x.jsx(Vo,{className:"h-4 w-4","aria-hidden":"true"}):x.jsx(aT,{className:"h-4 w-4","aria-hidden":"true"})}),r&&x.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:x.jsx(wu,{className:"h-4 w-4","aria-hidden":"true"})})]}),x.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let v=null;return Go.map(b=>{const S=b.group!==v;return v=b.group,x.jsxs("div",{className:"space-y-1",children:[S&&(e?v!==Go[0].group&&x.jsx("div",{className:"my-3 border-t border-border/30"}):x.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:b.group})),x.jsxs("a",{href:`#${b.id}`,onClick:r,"aria-current":n===b.id?"page":void 0,className:Re("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",e?"justify-center p-2.5":"gap-3 px-3 py-2",n===b.id?e?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:e?b.label:void 0,"aria-label":e?b.label:void 0,children:[x.jsx(b.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!e&&x.jsx("span",{className:"truncate",children:b.label})]})]},b.id)})})()}),x.jsx("div",{className:Re("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",e?"px-2 text-center":"px-5"),children:e?x.jsx("div",{className:"flex justify-center",children:x.jsx("span",{className:Re("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",o||!i?"bg-red-500":i.engine_reachable?i.brain&&!i.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:o?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":i?i.engine_reachable?i.brain&&!i.brain.ready?`Hirn offline (${i.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):x.jsxs("div",{className:"space-y-2 text-left",children:[o?x.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[x.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),x.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):i?x.jsxs(x.Fragment,{children:[x.jsxs("span",{className:"flex items-center gap-2",children:[x.jsx("span",{className:Re("h-2 w-2 rounded-full animate-pulse",i.engine_reachable?"bg-emerald-500":"bg-amber-500")}),x.jsxs("span",{className:"truncate",children:["Engine ",i.engine_reachable?"online":"offline"]})]}),i.brain&&!i.brain.ready&&x.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${i.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[x.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),x.jsxs("span",{className:"truncate",children:["Hirn offline",i.brain.model?` (${i.brain.model})`:""]})]})]}):x.jsxs("span",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",x.jsx("span",{className:"truncate",children:"Backend offline"})]}),(s==null?void 0:s.versions)&&x.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[x.jsxs("div",{className:"truncate",title:s.versions.mc2?`${s.versions.mc2.branch}-${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""} (${s.versions.mc2.date})`:"nicht gefunden",children:[x.jsx("strong",{children:"MC2:"})," ",s.versions.mc2?`${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""}`:"—"]}),x.jsxs("div",{className:"truncate",title:((u=s.versions.engine)==null?void 0:u.type)==="git"?`${s.versions.engine.branch}-${s.versions.engine.hash}${s.versions.engine.dirty?"*":""} (${s.versions.engine.date})`:((d=s.versions.engine)==null?void 0:d.version_text)||"unbekannt",children:[x.jsx("strong",{children:"Engine:"})," ",((f=s.versions.engine)==null?void 0:f.type)==="git"?`${s.versions.engine.hash}${s.versions.engine.dirty?"*":""}`:((m=(h=s.versions.engine)==null?void 0:h.version_text)==null?void 0:m.split(" ").pop())||"—"]}),x.jsxs("div",{className:"truncate",title:s.versions.hermes_agent?`${s.versions.hermes_agent.branch}-${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""} (${s.versions.hermes_agent.date})`:"nicht gefunden",children:[x.jsx("strong",{children:"Hermes Agent:"})," ",s.versions.hermes_agent?`${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}class KQ extends Lg.Component{constructor(){super(...arguments);ks(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?x.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:x.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[x.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),x.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),x.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const VQ=new DM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});uM.createRoot(document.getElementById("root")).render(x.jsx(Lg.StrictMode,{children:x.jsx(KQ,{children:x.jsx(RM,{client:VQ,children:x.jsx(HQ,{})})})}));export{GQ as $,NT as A,Wg as B,KP as C,iT as D,_v as E,iX as F,BA as G,pT as H,oX as I,D3 as J,H1 as K,Nf as L,Vo as M,oT as N,R3 as O,G1 as P,eX as Q,_T as R,AT as S,Ys as T,YP as U,lT as V,Vg as W,wu as X,T3 as Y,cT as Z,un as _,M3 as a,_f as a0,JM as a1,IT as a2,qo as a3,jT as a4,Os as a5,If as a6,HP as a7,Kg as a8,bT as a9,vS as aA,$g as aB,fT as aa,A3 as ab,O3 as ac,cX as ad,Hg as ae,XQ as af,dT as ag,VP as ah,C3 as ai,vT as aj,eT as ak,ST as al,Mf as am,mT as an,j3 as ao,JQ as ap,q1 as aq,ZQ as ar,xT as as,sf as at,Lg as au,uu as av,AS as aw,B8 as ax,Ty as ay,gS as az,Zg as b,Se as c,sX as d,Re as e,Dm as f,Ie as g,rX as h,QQ as i,x as j,tT as k,zA as l,tX as m,zf as n,nX as o,lX as p,De as q,y as r,YQ as s,aX as t,bu as u,Io as v,WR as w,qP as x,ET as y,uX as z};