diff --git a/frontend/dist/assets/AgentView-CNx_Fgn9.js b/frontend/dist/assets/AgentView-BsfE1obV.js similarity index 99% rename from frontend/dist/assets/AgentView-CNx_Fgn9.js rename to frontend/dist/assets/AgentView-BsfE1obV.js index e4e9164..ba9f489 100644 --- a/frontend/dist/assets/AgentView-CNx_Fgn9.js +++ b/frontend/dist/assets/AgentView-BsfE1obV.js @@ -1,4 +1,4 @@ -import{c as A,Y as P,l as B,b as M,u as D,r as z,j as e,Z as T,e as a,$ as g,a0 as b,a1 as W,x as f,a2 as j,W as G,X as I,C as N,g as y,q as i}from"./index-D7U2T2IL.js";/** +import{c as A,Y as P,l as B,b as M,u as D,r as z,j as e,Z as T,e as a,$ as g,a0 as b,a1 as W,x as f,a2 as j,W as G,X as I,C as N,g as y,q as i}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/AuftragsbuchView-Gg_tLeQS.js b/frontend/dist/assets/AuftragsbuchView-DPitmBxF.js similarity index 99% rename from frontend/dist/assets/AuftragsbuchView-Gg_tLeQS.js rename to frontend/dist/assets/AuftragsbuchView-DPitmBxF.js index f72a0d8..0e52f05 100644 --- a/frontend/dist/assets/AuftragsbuchView-Gg_tLeQS.js +++ b/frontend/dist/assets/AuftragsbuchView-DPitmBxF.js @@ -1,4 +1,4 @@ -import{c as W,ab as H,ac as T,u as F,b as G,r as b,j as e,a3 as O,e as y,L as p,C as z,a9 as P,K as q,U as I,V,ad as K,X as E,T as C,D as M,M as R,g as $,ae as _,q as U}from"./index-D7U2T2IL.js";import{S,H as Q}from"./SectionLabel-DDoS_VlP.js";/** +import{c as W,ab as H,ac as T,u as F,b as G,r as b,j as e,a3 as O,e as y,L as p,C as z,a9 as P,K as q,U as I,V,ad as K,X as E,T as C,D as M,M as R,g as $,ae as _,q as U}from"./index-BChEIiQl.js";import{S,H as Q}from"./SectionLabel-gNRlDlbe.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/ChronikView-DgGuP7UV.js b/frontend/dist/assets/ChronikView-DKRwHk9a.js similarity index 99% rename from frontend/dist/assets/ChronikView-DgGuP7UV.js rename to frontend/dist/assets/ChronikView-DKRwHk9a.js index b4f8637..b6bb4ca 100644 --- a/frontend/dist/assets/ChronikView-DgGuP7UV.js +++ b/frontend/dist/assets/ChronikView-DKRwHk9a.js @@ -1,4 +1,4 @@ -import{c as m,ai as S,r as c,j as e,aj as z,L as g,U as M,ak as C,ae as D,al as A,am as B,an as Z,e as E,ao as L,u as R,b as q,g as k,q as T}from"./index-D7U2T2IL.js";import{R as j}from"./rotate-ccw-BWaUdhxf.js";/** +import{c as m,ai as S,r as c,j as e,aj as z,L as g,U as M,ak as C,ae as D,al as A,am as B,an as Z,e as E,ao as L,u as R,b as q,g as k,q as T}from"./index-BChEIiQl.js";import{R as j}from"./rotate-ccw-CPYnjQ6M.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/ConnectView-DS-h-mAr.js b/frontend/dist/assets/ConnectView-DegkAqmm.js similarity index 98% rename from frontend/dist/assets/ConnectView-DS-h-mAr.js rename to frontend/dist/assets/ConnectView-DegkAqmm.js index ad4792e..f7a490c 100644 --- a/frontend/dist/assets/ConnectView-DS-h-mAr.js +++ b/frontend/dist/assets/ConnectView-DegkAqmm.js @@ -1,4 +1,4 @@ -import{c as v,r as c,I,J as A,j as e,K as h,x as B,B as H,D as E,M as z,e as M,L as T,N as F,C as K}from"./index-D7U2T2IL.js";import{F as O}from"./folder-open-LlE6jWLt.js";import{C as R}from"./circle-x-sa9Q0zy2.js";import{C as W}from"./copy-DUEcKGga.js";/** +import{c as v,r as c,I,J as A,j as e,K as h,x as B,B as H,D as E,M as z,e as M,L as T,N as F,C as K}from"./index-BChEIiQl.js";import{F as O}from"./folder-open-CtWva2VF.js";import{C as R}from"./circle-x-D8NCr-a2.js";import{C as W}from"./copy-CRj5M_pY.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/EigenlebenView-CFhcs_et.js b/frontend/dist/assets/EigenlebenView-nhdxSyQi.js similarity index 98% rename from frontend/dist/assets/EigenlebenView-CFhcs_et.js rename to frontend/dist/assets/EigenlebenView-nhdxSyQi.js index 959d7f7..0a2cb72 100644 --- a/frontend/dist/assets/EigenlebenView-CFhcs_et.js +++ b/frontend/dist/assets/EigenlebenView-nhdxSyQi.js @@ -1,4 +1,4 @@ -import{c as h,ap as b,r as i,j as e,L as g,aq as f,a2 as j,U as k,e as o,D as N,M as v,N as w,g as y}from"./index-D7U2T2IL.js";import{B as S}from"./book-open-Up-LJ-yQ.js";import{C as z}from"./circle-x-sa9Q0zy2.js";/** +import{c as h,ap as b,r as i,j as e,L as g,aq as f,a2 as j,U as k,e as o,D as N,M as v,N as w,g as y}from"./index-BChEIiQl.js";import{B as S}from"./book-open-2v7qByfb.js";import{C as z}from"./circle-x-D8NCr-a2.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/GraphView-BcwOeFGl.js b/frontend/dist/assets/GraphView-B3HC-zB_.js similarity index 99% rename from frontend/dist/assets/GraphView-BcwOeFGl.js rename to frontend/dist/assets/GraphView-B3HC-zB_.js index 8813ed8..9704a82 100644 --- a/frontend/dist/assets/GraphView-BcwOeFGl.js +++ b/frontend/dist/assets/GraphView-B3HC-zB_.js @@ -1,4 +1,4 @@ -import{at as Lt,r as V,au as Zi,av as Gn,aw as Vn,ax as Ki,ay as Qi,az as Wn,aA as Bn,aB as Ji,j as lt,a3 as to}from"./index-D7U2T2IL.js";function eo(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Xn=180/Math.PI,un={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Vr(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Lt(l,c)})):c&&h.push(o(h)+"rotate("+c+i)}function u(l,c,h,d){l!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Lt(l,c)}):c&&h.push(o(h)+"skewX("+c+i)}function f(l,c,h,d,p,y){if(l!==h||c!==d){var v=p.push(o(p)+"scale(",null,",",null,")");y.push({i:v-4,x:Lt(l,h)},{i:v-2,x:Lt(c,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,h,d),s(l.rotate,c.rotate,h,d),u(l.skewX,c.skewX,h,d),f(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(p){for(var y=-1,v=d.length,_;++ye.length)&&(n=e.length);for(var r=0,i=new Array(n);r180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Lt(l,c)})):c&&h.push(o(h)+"rotate("+c+i)}function u(l,c,h,d){l!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Lt(l,c)}):c&&h.push(o(h)+"skewX("+c+i)}function f(l,c,h,d,p,y){if(l!==h||c!==d){var v=p.push(o(p)+"scale(",null,",",null,")");y.push({i:v-4,x:Lt(l,h)},{i:v-2,x:Lt(c,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,h,d),s(l.rotate,c.rotate,h,d),u(l.skewX,c.skewX,h,d),f(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(p){for(var y=-1,v=d.length,_;++ye.length)&&(n=e.length);for(var r=0,i=new Array(n);ra,methodNames:i=[],initPropNames:o=[]}={}){return V.forwardRef((a,s)=>{const u=V.useRef(),f=V.useMemo(()=>{const h=Object.fromEntries(o.filter(d=>a.hasOwnProperty(d)).map(d=>[d,a[d]]));return e(h)},[]);Kn(()=>{f(r(u.current))},V.useLayoutEffect),Kn(()=>f._destructor instanceof Function?f._destructor:void 0);const l=V.useCallback((h,...d)=>f[h]instanceof Function?f[h](...d):void 0,[f]),c=V.useRef({});return Object.keys(xo(a,[...i,...o])).filter(h=>c.current[h]!==a[h]).forEach(h=>l(h,a[h])),c.current=a,V.useImperativeHandle(s,()=>Object.fromEntries(i.map(h=>[h,(...d)=>l(h,...d)])),[l]),Zi.createElement(n,{ref:u})})}function Kn(e,n=V.useEffect){const r=V.useRef(),i=V.useRef(!1),o=V.useRef(!1),[a,s]=V.useState(0);i.current&&(o.current=!0),n(()=>(i.current||(r.current=e(),i.current=!0),s(u=>u+1),()=>{o.current&&(r.current&&r.current(),r.current=void 0,i.current=!1,o.current=!1)}),[])}var fn="http://www.w3.org/1999/xhtml";const Qn={svg:"http://www.w3.org/2000/svg",xhtml:fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qe(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Qn.hasOwnProperty(n)?{space:Qn[n],local:e}:e}function ko(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===fn&&n.documentElement.namespaceURI===fn?n.createElement(e):n.createElementNS(r,e)}}function Co(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xr(e){var n=qe(e);return(n.local?Co:ko)(n)}function Ao(){}function An(e){return e==null?Ao:function(){return this.querySelector(e)}}function So(e){typeof e!="function"&&(e=An(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o=T&&(T=w+1);!(b=_[T])&&++T=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Ko(e){e||(e=Qo);function n(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;an?1:e>=n?0:NaN}function Jo(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ta(){return Array.from(this)}function ea(){for(var e=this._groups,n=0,r=e.length;n1?this.each((n==null?ha:typeof n=="function"?pa:da)(e,n,r??"")):Bt(this.node(),e)}function Bt(e,n){return e.style.getPropertyValue(n)||Jr(e).getComputedStyle(e,null).getPropertyValue(n)}function ya(e){return function(){delete this[e]}}function _a(e,n){return function(){this[e]=n}}function va(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ma(e,n){return arguments.length>1?this.each((n==null?ya:typeof n=="function"?va:_a)(e,n)):this.node()[e]}function ti(e){return e.trim().split(/^|\s+/)}function Sn(e){return e.classList||new ei(e)}function ei(e){this._node=e,this._names=ti(e.getAttribute("class")||"")}ei.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ni(e,n){for(var r=Sn(e),i=-1,o=n.length;++i=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function Ba(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r{}};function ve(){for(var e=0,n=arguments.length,r={},i;e=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ae.prototype=ve.prototype={constructor:Ae,on:function(e,n){var r=this._,i=rs(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(o),i=0,o,a;i()=>e;function cn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:f,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}cn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function as(e){return!e.ctrlKey&&!e.button}function ss(){return this.parentNode}function us(e,n){return n??{x:e.x,y:e.y}}function ls(){return navigator.maxTouchPoints||"ontouchstart"in this}function fs(){var e=as,n=ss,r=us,i=ls,o={},a=ve("start","drag","end"),s=0,u,f,l,c,h=0;function d(x){x.on("mousedown.drag",p).filter(i).on("touchstart.drag",_).on("touchmove.drag",g,os).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,b){if(!(c||!e.call(this,x,b))){var C=T(this,n.call(this,x,b),x,b,"mouse");C&&(pt(x.view).on("mousemove.drag",y,pe).on("mouseup.drag",v,pe),ai(x.view),Ze(x),l=!1,u=x.clientX,f=x.clientY,C("start",x))}}function y(x){if(Wt(x),!l){var b=x.clientX-u,C=x.clientY-f;l=b*b+C*C>h}o.mouse("drag",x)}function v(x){pt(x.view).on("mousemove.drag mouseup.drag",null),si(x.view,l),Wt(x),o.mouse("end",x)}function _(x,b){if(e.call(this,x,b)){var C=x.changedTouches,S=n.call(this,x,b),M=C.length,N,P;for(N=0;N=0&&e._call.call(void 0,n),e=e._next;--Xt}function tr(){Ht=(Re=ge.now())+Ge,Xt=ae=0;try{hs()}finally{Xt=0,ps(),Ht=0}}function ds(){var e=ge.now(),n=e-Re;n>ui&&(Ge-=n,Re=e)}function ps(){for(var e,n=ze,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:ze=r);se=e,hn(i)}function hn(e){if(!Xt){ae&&(ae=clearTimeout(ae));var n=e-Ht;n>24?(e<1/0&&(ae=setTimeout(tr,e-ge.now()-Ge)),Qt&&(Qt=clearInterval(Qt))):(Qt||(Re=ge.now(),Qt=setInterval(ds,ui)),Xt=1,li(tr))}}function er(e,n,r){var i=new Ne;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var gs=ve("start","end","cancel","interrupt"),ys=[],fi=0,nr=1,dn=2,Se=3,rr=4,pn=5,Te=6;function Ve(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;_s(e,r,{name:n,index:i,group:o,on:gs,tween:ys,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:fi})}function Pn(e,n){var r=vt(e,n);if(r.state>fi)throw new Error("too late; already scheduled");return r}function Ct(e,n){var r=vt(e,n);if(r.state>Se)throw new Error("too late; already running");return r}function vt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function _s(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=Mn(a,0,r.time);function a(l){r.state=nr,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var c,h,d,p;if(r.state!==nr)return f();for(c in i)if(p=i[c],p.name===r.name){if(p.state===Se)return er(s);p.state===rr?(p.state=Te,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[c]):+cdn&&i.state=0&&(n=n.slice(0,r)),!n||n==="start"})}function Bs(e,n,r){var i,o,a=Ws(n)?Pn:Ct;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function Xs(e,n){var r=this._id;return arguments.length<2?vt(this.node(),r).on.on(e):this.each(Bs(r,e,n))}function Ys(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Zs(){return this.on("end.remove",Ys(this._id))}function Ks(e){var n=this._name,r=this._id;typeof e!="function"&&(e=An(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s()=>e;function wu(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Et(e,n,r){this.k=e,this.x=n,this.y=r}Et.prototype={constructor:Et,scale:function(e){return e===1?this:new Et(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Et(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var En=new Et(1,0,0);mt.prototype=Et.prototype;function mt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return En;return e.__zoom}function Ke(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function ku(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Cu(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ir(){return this.__zoom||En}function Au(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Su(){return navigator.maxTouchPoints||"ontouchstart"in this}function Tu(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function Mu(){var e=ku,n=Cu,r=Tu,i=Au,o=Su,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,f=lo,l=ve("start","zoom","end"),c,h,d,p=500,y=150,v=0,_=10;function g(A){A.property("__zoom",ir).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",R).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(A,I,E,k){var O=A.selection?A.selection():A;O.property("__zoom",ir),A!==O?b(A,I,E,k):O.interrupt().each(function(){C(this,arguments).event(k).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},g.scaleBy=function(A,I,E,k){g.scaleTo(A,function(){var O=this.__zoom.k,j=typeof I=="function"?I.apply(this,arguments):I;return O*j},E,k)},g.scaleTo=function(A,I,E,k){g.transform(A,function(){var O=n.apply(this,arguments),j=this.__zoom,$=E==null?x(O):typeof E=="function"?E.apply(this,arguments):E,U=j.invert($),F=typeof I=="function"?I.apply(this,arguments):I;return r(T(w(j,F),$,U),O,s)},E,k)},g.translateBy=function(A,I,E,k){g.transform(A,function(){return r(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof E=="function"?E.apply(this,arguments):E),n.apply(this,arguments),s)},null,k)},g.translateTo=function(A,I,E,k,O){g.transform(A,function(){var j=n.apply(this,arguments),$=this.__zoom,U=k==null?x(j):typeof k=="function"?k.apply(this,arguments):k;return r(En.translate(U[0],U[1]).scale($.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof E=="function"?-E.apply(this,arguments):-E),j,s)},k,O)};function w(A,I){return I=Math.max(a[0],Math.min(a[1],I)),I===A.k?A:new Et(I,A.x,A.y)}function T(A,I,E){var k=I[0]-E[0]*A.k,O=I[1]-E[1]*A.k;return k===A.x&&O===A.y?A:new Et(A.k,k,O)}function x(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function b(A,I,E,k){A.on("start.zoom",function(){C(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(k).end()}).tween("zoom",function(){var O=this,j=arguments,$=C(O,j).event(k),U=n.apply(O,j),F=E==null?x(U):typeof E=="function"?E.apply(O,j):E,q=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),G=O.__zoom,B=typeof I=="function"?I.apply(O,j):I,J=f(G.invert(F).concat(q/G.k),B.invert(F).concat(q/B.k));return function(Y){if(Y===1)Y=B;else{var at=J(Y),tt=q/at[2];Y=new Et(tt,F[0]-at[0]*tt,F[1]-at[1]*tt)}$.zoom(null,Y)}})}function C(A,I,E){return!E&&A.__zooming||new S(A,I)}function S(A,I){this.that=A,this.args=I,this.active=0,this.sourceEvent=null,this.extent=n.apply(A,I),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,I){return this.mouse&&A!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var I=pt(this.that).datum();l.call(A,this.that,new wu(A,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),I)}};function M(A,...I){if(!e.apply(this,arguments))return;var E=C(this,I).event(A),k=this.__zoom,O=Math.max(a[0],Math.min(a[1],k.k*Math.pow(2,i.apply(this,arguments)))),j=bt(A);if(E.wheel)(E.mouse[0][0]!==j[0]||E.mouse[0][1]!==j[1])&&(E.mouse[1]=k.invert(E.mouse[0]=j)),clearTimeout(E.wheel);else{if(k.k===O)return;E.mouse=[j,k.invert(j)],Me(this),E.start()}Jt(A),E.wheel=setTimeout($,y),E.zoom("mouse",r(T(w(k,O),E.mouse[0],E.mouse[1]),E.extent,s));function $(){E.wheel=null,E.end()}}function N(A,...I){if(d||!e.apply(this,arguments))return;var E=A.currentTarget,k=C(this,I,!0).event(A),O=pt(A.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",q,!0),j=bt(A,E),$=A.clientX,U=A.clientY;ai(A.view),Ke(A),k.mouse=[j,this.__zoom.invert(j)],Me(this),k.start();function F(G){if(Jt(G),!k.moved){var B=G.clientX-$,J=G.clientY-U;k.moved=B*B+J*J>v}k.event(G).zoom("mouse",r(T(k.that.__zoom,k.mouse[0]=bt(G,E),k.mouse[1]),k.extent,s))}function q(G){O.on("mousemove.zoom mouseup.zoom",null),si(G.view,k.moved),Jt(G),k.event(G).end()}}function P(A,...I){if(e.apply(this,arguments)){var E=this.__zoom,k=bt(A.changedTouches?A.changedTouches[0]:A,this),O=E.invert(k),j=E.k*(A.shiftKey?.5:2),$=r(T(w(E,j),k,O),n.apply(this,I),s);Jt(A),u>0?pt(this).transition().duration(u).call(b,$,k,A):pt(this).call(g.transform,$,k,A)}}function R(A,...I){if(e.apply(this,arguments)){var E=A.touches,k=E.length,O=C(this,I,A.changedTouches.length===k).event(A),j,$,U,F;for(Ke(A),$=0;$=n||S<0||h&&M>=a}function g(){var C=Qe();if(_(C))return w(C);u=setTimeout(g,v(C))}function w(C){return u=void 0,d&&i?p(C):(i=o=void 0,s)}function T(){u!==void 0&&clearTimeout(u),l=0,i=f=o=u=void 0}function x(){return u===void 0?s:w(Qe())}function b(){var C=Qe(),S=_(C);if(i=arguments,o=this,f=C,S){if(u===void 0)return y(f);if(h)return clearTimeout(u),u=setTimeout(g,n),p(f)}return u===void 0&&(u=setTimeout(g,n)),s}return b.cancel=T,b.flush=x,b}var tl="Expected a function";function el(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(tl);return De(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),yi(e,n,{leading:i,maxWait:n,trailing:o})}var Ut=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Ut.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Ut.Bounce.In(e*2)*.5:Ut.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ue=function(){return performance.now()},_i=(function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n},e.prototype.remove=function(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]},e.prototype.update=function(n,r){n===void 0&&(n=ue()),r===void 0&&(r=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},vi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),yn=new _i,ur=(function(){function e(n,r){r===void 0&&(r=yn),this._object=n,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Ut.Linear.None,this._interpolationFunction=gn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=vi.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ue()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],f=Array.isArray(u),l=f?"array":typeof u,c=!f&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(c){var h=i[s];if(h.length===0)continue;for(var d=[u],p=0,y=h.length;p"u"||a)&&(r[s]=u),f||(r[s]*=1),c?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(n){return n===void 0&&(n=ue()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this._group&&this._group.remove(this),this)},e.prototype.resume=function(n){return n===void 0&&(n=ue()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;ns)return!1;r&&this.start(n,!0)}if(this._goToEnd=!1,nl)return 1;var _=Math.trunc(u/f),g=u-_*f,w=Math.min(g/i._duration,1);return w===0&&u===i._duration?1:w},h=c(),d=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((u-this._duration)/f)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=f*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,v=this._chainedTweens.length;ye.length)&&(n=e.length);for(var r=0,i=Array(n);r=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return H(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(bl,arguments)},brighten:function(){return this._applyModification(xl,arguments)},darken:function(){return this._applyModification(wl,arguments)},desaturate:function(){return this._applyModification(_l,arguments)},saturate:function(){return this._applyModification(vl,arguments)},greyscale:function(){return this._applyModification(ml,arguments)},spin:function(){return this._applyModification(kl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Sl,arguments)},complement:function(){return this._applyCombination(Cl,arguments)},monochromatic:function(){return this._applyCombination(Tl,arguments)},splitcomplement:function(){return this._applyCombination(Al,arguments)},triad:function(){return this._applyCombination(pr,[3])},tetrad:function(){return this._applyCombination(pr,[4])}};H.fromRatio=function(e,n){if(je(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=le(e[i]));e=r}return H(e,n)};function hl(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=zl(e)),je(e)=="object"&&(Tt(e.r)&&Tt(e.g)&&Tt(e.b)?(n=dl(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Tt(e.h)&&Tt(e.s)&&Tt(e.v)?(i=le(e.s),o=le(e.v),n=gl(e.h,i,o),s=!0,u="hsv"):Tt(e.h)&&Tt(e.s)&&Tt(e.l)&&(i=le(e.s),a=le(e.l),n=pl(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=mi(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function dl(e,n,r){return{r:K(e,255)*255,g:K(n,255)*255,b:K(r,255)*255}}function fr(e,n,r){e=K(e,255),n=K(n,255),r=K(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var f=i-o;switch(s=u>.5?f/(2-i-o):f/(i+o),i){case e:a=(n-r)/f+(n1&&(h-=1),h<1/6?l+(c-l)*6*h:h<1/2?c:h<2/3?l+(c-l)*(2/3-h)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,f=2*r-u;i=s(f,u,e+1/3),o=s(f,u,e),a=s(f,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function cr(e,n,r){e=K(e,255),n=K(n,255),r=K(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,f=i-o;if(s=i===0?0:f/i,i==o)a=0;else{switch(i){case e:a=(n-r)/f+(n>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(H(i));return a}function Tl(e,n){n=n||6;for(var r=H(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(H({h:i,s:o,v:a})),a=(a+u)%1;return s}H.mix=function(e,n,r){r=r===0?0:r||50;var i=H(e).toRgb(),o=H(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return H(s)};H.readability=function(e,n){var r=H(e),i=H(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};H.isReadable=function(e,n,r){var i=H.readability(e,n),o,a;switch(a=!1,o=Rl(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};H.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,f;r=r||{},s=r.includeFallbackColors,u=r.level,f=r.size;for(var l=0;lo&&(o=a,i=H(n[l]));return H.isReadable(e,i,{level:u,size:f})||!s?i:(r.includeFallbackColors=!1,H.mostReadable(e,["#fff","#000"],r))};var _n=H.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ml=H.hexNames=Pl(_n);function Pl(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function mi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function K(e,n){Ol(e)&&(e="100%");var r=El(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function We(e){return Math.min(1,Math.max(0,e))}function ft(e){return parseInt(e,16)}function Ol(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function El(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _t(e){return e.length==1?"0"+e:""+e}function le(e){return e<=1&&(e=e*100+"%"),e}function bi(e){return Math.round(parseFloat(e)*255).toString(16)}function gr(e){return ft(e)/255}var yt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Tt(e){return!!yt.CSS_UNIT.exec(e)}function zl(e){e=e.replace(fl,"").replace(cl,"").toLowerCase();var n=!1;if(_n[e])e=_n[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=yt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=yt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=yt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=yt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=yt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=yt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=yt.hex8.exec(e))?{r:ft(r[1]),g:ft(r[2]),b:ft(r[3]),a:gr(r[4]),format:n?"name":"hex8"}:(r=yt.hex6.exec(e))?{r:ft(r[1]),g:ft(r[2]),b:ft(r[3]),format:n?"name":"hex"}:(r=yt.hex4.exec(e))?{r:ft(r[1]+""+r[1]),g:ft(r[2]+""+r[2]),b:ft(r[3]+""+r[3]),a:gr(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=yt.hex3.exec(e))?{r:ft(r[1]+""+r[1]),g:ft(r[2]+""+r[2]),b:ft(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Rl(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function vn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);ri.map(i=>d[i]); -var je=Object.defineProperty;var ke=(d,i,c)=>i in d?je(d,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):d[i]=c;var J=(d,i,c)=>ke(d,typeof i!="symbol"?i+"":i,c);import{c as h,r as s,j as e,u as ve,b as Ne,O as W,Q as Se,C as X,R as Ce,S as Ee,P as Me,U as O,e as x,V as ze,W as De,X as Z,A as Y,_ as Oe,g as j}from"./index-D7U2T2IL.js";import{C as ee}from"./copy-DUEcKGga.js";import{S as _e}from"./send-Cx9Mf4tj.js";import{B as Ge}from"./book-open-Up-LJ-yQ.js";/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphView-B3HC-zB_.js","assets/index-BChEIiQl.js","assets/index-Bm-JldFM.css"])))=>i.map(i=>d[i]); +var je=Object.defineProperty;var ke=(d,i,c)=>i in d?je(d,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):d[i]=c;var J=(d,i,c)=>ke(d,typeof i!="symbol"?i+"":i,c);import{c as h,r as s,j as e,u as ve,b as Ne,O as W,Q as Se,C as X,R as Ce,S as Ee,P as Me,U as O,e as x,V as ze,W as De,X as Z,A as Y,_ as Oe,g as j}from"./index-BChEIiQl.js";import{C as ee}from"./copy-CRj5M_pY.js";import{S as _e}from"./send-CS1kRsDf.js";import{B as Ge}from"./book-open-2v7qByfb.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. @@ -34,7 +34,7 @@ var je=Object.defineProperty;var ke=(d,i,c)=>i in d?je(d,i,{enumerable:!0,config * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pe=h("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);class te extends s.Component{constructor(){super(...arguments);J(this,"state",{error:null})}static getDerivedStateFromError(c){return{error:c}}render(){return this.state.error?e.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[e.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),e.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const se=s.lazy(()=>Oe(()=>import("./GraphView-BcwOeFGl.js"),__vite__mapDeps([0,1,2])).then(d=>({default:d.GraphView}))),k=["identity","knowledge","rules","events"],v=new Set(["auto","agent","hermes"]),N={identity:{label:"Identität",icon:Pe,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:De,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:Le,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:ze,bg:"bg-amber-500/10",text:"text-amber-400"}},ne={label:"Gedächtnis",icon:Ge,text:"text-muted-foreground"},Re={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},_={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},ae=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu: + */const Pe=h("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);class te extends s.Component{constructor(){super(...arguments);J(this,"state",{error:null})}static getDerivedStateFromError(c){return{error:c}}render(){return this.state.error?e.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[e.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),e.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const se=s.lazy(()=>Oe(()=>import("./GraphView-B3HC-zB_.js"),__vite__mapDeps([0,1,2])).then(d=>({default:d.GraphView}))),k=["identity","knowledge","rules","events"],v=new Set(["auto","agent","hermes"]),N={identity:{label:"Identität",icon:Pe,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:De,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:Le,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:ze,bg:"bg-amber-500/10",text:"text-amber-400"}},ne={label:"Gedächtnis",icon:Ge,text:"text-muted-foreground"},Re={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},_={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},ae=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu: 1) wer ich bin und woran ich gerade arbeite, 2) wie ich angesprochen werden möchte, 3) meine bevorzugten Tools, Sprachen und Arbeitsweise, diff --git a/frontend/dist/assets/ModelsView-COPS2f3N.js b/frontend/dist/assets/ModelsView-CoGGXlnQ.js similarity index 99% rename from frontend/dist/assets/ModelsView-COPS2f3N.js rename to frontend/dist/assets/ModelsView-CoGGXlnQ.js index c491cf1..b1473d0 100644 --- a/frontend/dist/assets/ModelsView-COPS2f3N.js +++ b/frontend/dist/assets/ModelsView-CoGGXlnQ.js @@ -1,4 +1,4 @@ -import{c as q,u as oe,a as Fe,b as ge,j as e,f as ue,d as Re,e as w,g as K,q as P,h as Ie,r as N,C as Y,L as Oe,i as Pe,B as le,k as Te,E as Be,l as de,m as Ge,n as $e,o as He,p as ee,X as pe,P as Qe,H as fe,T as re,s as Ue,t as Ve,v as V,w as We,S as ye,x as Ze,y as Je,z as Xe,A as Ye,D as De,F as et,G as tt}from"./index-D7U2T2IL.js";import{C as rt}from"./code-xml-CkFV2Ko3.js";import{R as st}from"./rotate-ccw-BWaUdhxf.js";import{C as be,Z as ie,L as nt,a as at}from"./zap-pfxlcCGI.js";import{L as ot}from"./layers-DZwkr2Nk.js";/** +import{c as q,u as oe,a as Fe,b as ge,j as e,f as ue,d as Re,e as w,g as K,q as P,h as Ie,r as N,C as Y,L as Oe,i as Pe,B as le,k as Te,E as Be,l as de,m as Ge,n as $e,o as He,p as ee,X as pe,P as Qe,H as fe,T as re,s as Ue,t as Ve,v as V,w as We,S as ye,x as Ze,y as Je,z as Xe,A as Ye,D as De,F as et,G as tt}from"./index-BChEIiQl.js";import{C as rt}from"./code-xml-owp4HQPY.js";import{R as st}from"./rotate-ccw-CPYnjQ6M.js";import{C as be,Z as ie,L as nt,a as at}from"./zap-I2SMIyr4.js";import{L as ot}from"./layers-C62c1z5s.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/SectionLabel-DDoS_VlP.js b/frontend/dist/assets/SectionLabel-gNRlDlbe.js similarity index 93% rename from frontend/dist/assets/SectionLabel-DDoS_VlP.js rename to frontend/dist/assets/SectionLabel-gNRlDlbe.js index 9394a86..60b8969 100644 --- a/frontend/dist/assets/SectionLabel-DDoS_VlP.js +++ b/frontend/dist/assets/SectionLabel-gNRlDlbe.js @@ -1,4 +1,4 @@ -import{c as s,j as e}from"./index-D7U2T2IL.js";/** +import{c as s,j as e}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/WissenView-d_MZxg2H.js b/frontend/dist/assets/WissenView-Czc4UCXS.js similarity index 98% rename from frontend/dist/assets/WissenView-d_MZxg2H.js rename to frontend/dist/assets/WissenView-Czc4UCXS.js index 38c1ecf..518bfba 100644 --- a/frontend/dist/assets/WissenView-d_MZxg2H.js +++ b/frontend/dist/assets/WissenView-Czc4UCXS.js @@ -1,4 +1,4 @@ -import{ar as y,r as x,g as L,j as e,L as v,S,ah as W,U as C,e as w,as as E}from"./index-D7U2T2IL.js";import{F as M}from"./folder-open-LlE6jWLt.js";const D={"":"Allgemein",traeume:"Träume",muster:"Muster","skill-kandidaten":"Skill-Kandidaten","skill-kandidaten/beauftragt":"Skill-Kandidaten · beauftragt","skill-kandidaten/verworfen":"Skill-Kandidaten · verworfen"};function T(){const{data:o,isLoading:h}=y(),[l,f]=x.useState(null),[d,r]=x.useState(null),[u,i]=x.useState(!1),[a,p]=x.useState(""),t=x.useMemo(()=>(o==null?void 0:o.files)??[],[o]),m=x.useMemo(()=>{const s=new Map;for(const n of t)s.set(n.name.toLowerCase(),n.path);return s},[t]),g=x.useMemo(()=>{if(!a.trim())return t;const s=a.toLowerCase();return t.filter(n=>n.title.toLowerCase().includes(s)||n.path.toLowerCase().includes(s))},[t,a]),b=x.useMemo(()=>{const s=[];for(const n of g){const c=s.find(k=>k.dir===n.dir);c?c.files.push(n):s.push({dir:n.dir,files:[n]})}return s.sort((n,c)=>n.dir===""?-1:c.dir===""?1:n.dir.localeCompare(c.dir))},[g]);x.useEffect(()=>{if(!l&&t.length){const s=t.find(n=>n.path.toLowerCase()==="index.md");f((s==null?void 0:s.path)??t[0].path)}},[t,l]),x.useEffect(()=>{l&&(i(!0),L(`/api/wissen/datei?pfad=${encodeURIComponent(l)}`).then(r).catch(()=>r({path:l,content:"*(Notiz nicht ladbar)*",mtime:0})).finally(()=>i(!1)))},[l]);const j=s=>{const n=m.get(s.toLowerCase());n&&f(n)};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.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:"Wissen"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Was sich die Box nachts erschließt — Traum-Notizen, Muster und Skill-Ideen aus dem Wissens-Vault, verlinkt wie ein Wiki."})]}),o&&!o.available&&e.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Der Wissens-Vault liegt auf der Box (~/wissens-vault) — im lokalen Dev-Modus nicht verfügbar."}),h&&e.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[e.jsx(v,{className:"h-4 w-4 animate-spin"})," Vault wird geladen …"]}),(o==null?void 0:o.available)&&t.length===0&&e.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Notizen. Der nächtliche Traum (03:15) legt sie an — morgen früh steht hier die erste."}),t.length>0&&e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[e.jsxs("aside",{className:"w-full shrink-0 space-y-3 lg:w-72",children:[e.jsxs("div",{className:"relative",children:[e.jsx("input",{value:a,onChange:s=>p(s.target.value),type:"search",placeholder:"Notizen durchsuchen…","aria-label":"Notizen durchsuchen",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 pl-8 pr-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),e.jsx(S,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),e.jsx("div",{className:"max-h-[70vh] space-y-3 overflow-y-auto pr-1 scrollbar-thin",children:b.map(({dir:s,files:n})=>e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:[e.jsx(M,{className:"h-3 w-3"})," ",D[s]??s]}),e.jsx("div",{className:"space-y-0.5",children:n.map(c=>e.jsxs("button",{onClick:()=>f(c.path),className:w("flex w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left text-xs transition-all cursor-pointer",l===c.path?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[e.jsx(W,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",title:c.title,children:c.name}),c.neu&&e.jsxs("span",{className:"ml-auto flex items-center gap-0.5 rounded bg-violet-500/15 px-1 py-0.5 text-[8px] font-bold uppercase text-violet-300",children:[e.jsx(C,{className:"h-2.5 w-2.5"}),"neu"]})]},c.path))})]},s||"__root"))})]}),e.jsx("div",{className:"min-w-0 flex-1 mc-card p-5",children:u?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(v,{className:"h-4 w-4 animate-spin"})," Notiz wird geladen …"]}):d?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-border/40 pb-2",children:[e.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[e.jsx(E,{className:"h-3.5 w-3.5"})," ",d.path]}),d.mtime>0&&e.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Stand ",new Date(d.mtime*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e.jsx(z,{text:d.content,onWikiLink:j,known:m})]}):null})]})]})}function z({text:o,onWikiLink:h,known:l}){const f=o.split(` +import{ar as y,r as x,g as L,j as e,L as v,S,ah as W,U as C,e as w,as as E}from"./index-BChEIiQl.js";import{F as M}from"./folder-open-CtWva2VF.js";const D={"":"Allgemein",traeume:"Träume",muster:"Muster","skill-kandidaten":"Skill-Kandidaten","skill-kandidaten/beauftragt":"Skill-Kandidaten · beauftragt","skill-kandidaten/verworfen":"Skill-Kandidaten · verworfen"};function T(){const{data:o,isLoading:h}=y(),[l,f]=x.useState(null),[d,r]=x.useState(null),[u,i]=x.useState(!1),[a,p]=x.useState(""),t=x.useMemo(()=>(o==null?void 0:o.files)??[],[o]),m=x.useMemo(()=>{const s=new Map;for(const n of t)s.set(n.name.toLowerCase(),n.path);return s},[t]),g=x.useMemo(()=>{if(!a.trim())return t;const s=a.toLowerCase();return t.filter(n=>n.title.toLowerCase().includes(s)||n.path.toLowerCase().includes(s))},[t,a]),b=x.useMemo(()=>{const s=[];for(const n of g){const c=s.find(k=>k.dir===n.dir);c?c.files.push(n):s.push({dir:n.dir,files:[n]})}return s.sort((n,c)=>n.dir===""?-1:c.dir===""?1:n.dir.localeCompare(c.dir))},[g]);x.useEffect(()=>{if(!l&&t.length){const s=t.find(n=>n.path.toLowerCase()==="index.md");f((s==null?void 0:s.path)??t[0].path)}},[t,l]),x.useEffect(()=>{l&&(i(!0),L(`/api/wissen/datei?pfad=${encodeURIComponent(l)}`).then(r).catch(()=>r({path:l,content:"*(Notiz nicht ladbar)*",mtime:0})).finally(()=>i(!1)))},[l]);const j=s=>{const n=m.get(s.toLowerCase());n&&f(n)};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.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:"Wissen"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Was sich die Box nachts erschließt — Traum-Notizen, Muster und Skill-Ideen aus dem Wissens-Vault, verlinkt wie ein Wiki."})]}),o&&!o.available&&e.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Der Wissens-Vault liegt auf der Box (~/wissens-vault) — im lokalen Dev-Modus nicht verfügbar."}),h&&e.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[e.jsx(v,{className:"h-4 w-4 animate-spin"})," Vault wird geladen …"]}),(o==null?void 0:o.available)&&t.length===0&&e.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Notizen. Der nächtliche Traum (03:15) legt sie an — morgen früh steht hier die erste."}),t.length>0&&e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[e.jsxs("aside",{className:"w-full shrink-0 space-y-3 lg:w-72",children:[e.jsxs("div",{className:"relative",children:[e.jsx("input",{value:a,onChange:s=>p(s.target.value),type:"search",placeholder:"Notizen durchsuchen…","aria-label":"Notizen durchsuchen",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 pl-8 pr-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),e.jsx(S,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),e.jsx("div",{className:"max-h-[70vh] space-y-3 overflow-y-auto pr-1 scrollbar-thin",children:b.map(({dir:s,files:n})=>e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:[e.jsx(M,{className:"h-3 w-3"})," ",D[s]??s]}),e.jsx("div",{className:"space-y-0.5",children:n.map(c=>e.jsxs("button",{onClick:()=>f(c.path),className:w("flex w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left text-xs transition-all cursor-pointer",l===c.path?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[e.jsx(W,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",title:c.title,children:c.name}),c.neu&&e.jsxs("span",{className:"ml-auto flex items-center gap-0.5 rounded bg-violet-500/15 px-1 py-0.5 text-[8px] font-bold uppercase text-violet-300",children:[e.jsx(C,{className:"h-2.5 w-2.5"}),"neu"]})]},c.path))})]},s||"__root"))})]}),e.jsx("div",{className:"min-w-0 flex-1 mc-card p-5",children:u?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(v,{className:"h-4 w-4 animate-spin"})," Notiz wird geladen …"]}):d?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-border/40 pb-2",children:[e.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[e.jsx(E,{className:"h-3.5 w-3.5"})," ",d.path]}),d.mtime>0&&e.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Stand ",new Date(d.mtime*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e.jsx(z,{text:d.content,onWikiLink:j,known:m})]}):null})]})]})}function z({text:o,onWikiLink:h,known:l}){const f=o.split(` `),d=[];let r=[],u=null;const i=a=>{r.length&&(d.push(e.jsx("ul",{className:"mb-3 ml-4 list-disc space-y-1",children:r},a)),r=[])};return f.forEach((a,p)=>{const t=`l${p}`;if(u!==null){a.trimEnd()==="```"?(d.push(e.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px] leading-relaxed text-foreground/85",children:u.join(` `)},t)),u=null):u.push(a);return}if(a.trimStart().startsWith("```")){i(t),u=[];return}const m=a.trimEnd();if(!m.trim()){i(t);return}const g=m.match(/^(#{1,4})\s+(.*)$/);if(g){i(t);const j=g[1].length,s=j===1?"text-lg font-bold mt-1 mb-3":j===2?"text-base font-bold mt-4 mb-2":"text-sm font-bold mt-3 mb-1.5";d.push(e.jsx("p",{className:w(s,"font-space text-foreground"),children:N(g[2],h,l,t)},t));return}const b=m.match(/^\s*[-*•]\s+(.*)$/);if(b){r.push(e.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:N(b[1],h,l,t)},t));return}i(t),d.push(e.jsx("p",{className:"mb-2 text-xs leading-relaxed text-foreground/85",children:N(m,h,l,t)},t))}),i("end"),u!==null&&d.push(e.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px]",children:u.join(` `)},"code-end")),e.jsx("div",{className:"max-w-3xl",children:d})}function N(o,h,l,f){return o.split(/(\[\[[^\]]+\]\]|\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g).map((r,u)=>{const i=`${f}-${u}`,a=r.match(/^\[\[([^\]|]+)(?:\|([^\]]+))?\]\]$/);if(a){const p=a[1].trim(),t=(a[2]??a[1]).trim();return l.has(p.toLowerCase())?e.jsx("button",{onClick:()=>h(p),className:"rounded bg-primary/10 px-1 text-primary underline decoration-primary/40 underline-offset-2 hover:bg-primary/20 cursor-pointer",children:t},i):e.jsx("span",{className:"rounded bg-background/40 px-1 text-muted-foreground",title:"Notiz existiert (noch) nicht",children:t},i)}return r.startsWith("**")&&r.endsWith("**")?e.jsx("b",{className:"font-semibold text-foreground",children:r.slice(2,-2)},i):r.startsWith("*")&&r.endsWith("*")&&r.length>2?e.jsx("i",{children:r.slice(1,-1)},i):r.startsWith("`")&&r.endsWith("`")?e.jsx("code",{className:"rounded bg-background/50 px-1 font-mono text-[11px] text-teal-300",children:r.slice(1,-1)},i):e.jsx("span",{children:r},i)})}export{T as WissenView}; diff --git a/frontend/dist/assets/book-open-Up-LJ-yQ.js b/frontend/dist/assets/book-open-2v7qByfb.js similarity index 90% rename from frontend/dist/assets/book-open-Up-LJ-yQ.js rename to frontend/dist/assets/book-open-2v7qByfb.js index 3afe28f..b33b144 100644 --- a/frontend/dist/assets/book-open-Up-LJ-yQ.js +++ b/frontend/dist/assets/book-open-2v7qByfb.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D7U2T2IL.js";/** +import{c as a}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/circle-x-sa9Q0zy2.js b/frontend/dist/assets/circle-x-D8NCr-a2.js similarity index 89% rename from frontend/dist/assets/circle-x-sa9Q0zy2.js rename to frontend/dist/assets/circle-x-D8NCr-a2.js index 8453452..5acb876 100644 --- a/frontend/dist/assets/circle-x-sa9Q0zy2.js +++ b/frontend/dist/assets/circle-x-D8NCr-a2.js @@ -1,4 +1,4 @@ -import{c}from"./index-D7U2T2IL.js";/** +import{c}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/code-xml-CkFV2Ko3.js b/frontend/dist/assets/code-xml-owp4HQPY.js similarity index 88% rename from frontend/dist/assets/code-xml-CkFV2Ko3.js rename to frontend/dist/assets/code-xml-owp4HQPY.js index 20c5279..5b62690 100644 --- a/frontend/dist/assets/code-xml-CkFV2Ko3.js +++ b/frontend/dist/assets/code-xml-owp4HQPY.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-D7U2T2IL.js";/** +import{c as e}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/copy-DUEcKGga.js b/frontend/dist/assets/copy-CRj5M_pY.js similarity index 90% rename from frontend/dist/assets/copy-DUEcKGga.js rename to frontend/dist/assets/copy-CRj5M_pY.js index 94924b4..c5b9289 100644 --- a/frontend/dist/assets/copy-DUEcKGga.js +++ b/frontend/dist/assets/copy-CRj5M_pY.js @@ -1,4 +1,4 @@ -import{c}from"./index-D7U2T2IL.js";/** +import{c}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/folder-open-LlE6jWLt.js b/frontend/dist/assets/folder-open-CtWva2VF.js similarity index 90% rename from frontend/dist/assets/folder-open-LlE6jWLt.js rename to frontend/dist/assets/folder-open-CtWva2VF.js index f858410..a572ede 100644 --- a/frontend/dist/assets/folder-open-LlE6jWLt.js +++ b/frontend/dist/assets/folder-open-CtWva2VF.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D7U2T2IL.js";/** +import{c as a}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/index-BChEIiQl.js b/frontend/dist/assets/index-BChEIiQl.js new file mode 100644 index 0000000..3d017fa --- /dev/null +++ b/frontend/dist/assets/index-BChEIiQl.js @@ -0,0 +1,466 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelsView-CoGGXlnQ.js","assets/code-xml-owp4HQPY.js","assets/rotate-ccw-CPYnjQ6M.js","assets/zap-I2SMIyr4.js","assets/layers-C62c1z5s.js","assets/ConnectView-DegkAqmm.js","assets/folder-open-CtWva2VF.js","assets/circle-x-D8NCr-a2.js","assets/copy-CRj5M_pY.js","assets/MemoryView-DNCBwc-V.js","assets/send-CS1kRsDf.js","assets/book-open-2v7qByfb.js","assets/GuideView-DqsY9Wr1.js","assets/AuftragsbuchView-DPitmBxF.js","assets/SectionLabel-gNRlDlbe.js","assets/IdeenView-lXJC70fR.js","assets/ChronikView-DKRwHk9a.js","assets/EigenlebenView-nhdxSyQi.js","assets/WissenView-Czc4UCXS.js"])))=>i.map(i=>d[i]); +var YI=Object.defineProperty;var S1=e=>{throw TypeError(e)};var QI=(e,t,r)=>t in e?YI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ws=(e,t,r)=>QI(e,typeof t!="symbol"?t+"":t,r),gm=(e,t,r)=>t.has(e)||S1("Cannot "+r);var $=(e,t,r)=>(gm(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)=>(gm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ze=(e,t,r)=>(gm(e,t,"access private method"),r);var qc=(e,t,r,n)=>({set _(i){pe(e,t,i,r)},get _(){return $(e,t,n)}});function XI(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 Dg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ym={exports:{}},Ss={},xm={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 k1;function ZI(){if(k1)return Le;k1=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 x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function E(M,T,Z){this.props=M,this.context=T,this.refs=S,this.updater=Z||x}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=S,this.updater=Z||x}var _=j.prototype=new P;_.constructor=j,k(_,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,x=!1,k=!1,S=!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(S=!1,_(Y),!k)if(r(d)!==null)k=!0,fe(N);else{var ae=r(f);ae!==null&&de(O,ae.startTime-Y)}}function N(Y,ae){k=!1,S&&(S=!1,P(z),z=-1),x=!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,x=!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)&&(S?(P(z),z=-1):S=!0,de(O,X-M))):(Y.sortIndex=T,t(d,Y),k||x||(k=!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}}}})(Sm)),Sm}var C1;function rM(){return C1||(C1=1,wm.exports=tM()),wm.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 j1;function nM(){if(j1)return hr;j1=1;var e=kl(),t=rM();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 x(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 k(a,l,c,p){if(l===null||typeof l>"u"||x(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 S(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 S(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 S(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){E[a]=new S(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){E[a]=new S(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 S(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){E[a]=new S(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){E[a]=new S(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){E[a]=new S(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){E[a]=new S(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 S(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 S(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 S(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){E[a]=new S(a,1,!1,a.toLowerCase(),null,!1,!1)}),E.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){E[a]=new S(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 fi(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 Ie=Array.isArray;function Ze(a,l,c,p){if(a=a.options,l){l={};for(var g=0;g"+l.valueOf().toString()+"",l=zu.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function $l(a,l){if(l){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=l;return}}a.textContent=l}var Ll={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},J_=["Webkit","ms","Moz","O"];Object.keys(Ll).forEach(function(a){J_.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),Ll[l]=Ll[a]})});function $0(a,l,c){return l==null||typeof l=="boolean"||l===""?"":c||typeof l!="number"||l===0||Ll.hasOwnProperty(a)&&Ll[a]?(""+l).trim():l+"px"}function L0(a,l){a=a.style;for(var c in l)if(l.hasOwnProperty(c)){var p=c.indexOf("--")===0,g=$0(c,l[c],p);c==="float"&&(c="cssFloat"),p?a.setProperty(c,g):a[c]=g}}var eN=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 jh(a,l){if(l){if(eN[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 _h(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 Nh=null;function Ih(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Mh=null,ro=null,no=null;function z0(a){if(a=os(a)){if(typeof Mh!="function")throw Error(r(280));var l=a.stateNode;l&&(l=sc(l),Mh(a.stateNode,a.type,l))}}function F0(a){ro?no?no.push(a):no=[a]:ro=a}function B0(){if(ro){var a=ro,l=no;if(no=ro=null,z0(a),l)for(a=0;a>>=0,a===0?32:31-(dN(a)/fN|0)|0}var Hu=64,Ku=4194304;function Ul(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 Vu(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=Ul(I):(w&=A,w!==0&&(p=Ul(w)))}else A=c&~g,A!==0?p=Ul(A):w!==0&&(p=Ul(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 Wl(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 vN(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=Xl),mx=" ",vx=!1;function gx(a,l){switch(a){case"keyup":return HN.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yx(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var oo=!1;function VN(a,l){switch(a){case"compositionend":return yx(l);case"keypress":return l.which!==32?null:(vx=!0,mx);case"textInput":return a=l.data,a===mx&&vx?null:a;default:return null}}function qN(a,l){if(oo)return a==="compositionend"||!Xh&&gx(a,l)?(a=ux(),Xu=Kh=gi=null,oo=!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=Px(c)}}function Ox(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?Ox(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function Cx(){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 ep(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 rI(a){var l=Cx(),c=a.focusedElem,p=a.selectionRange;if(l!==c&&c&&c.ownerDocument&&Ox(c.ownerDocument.documentElement,c)){if(p!==null&&ep(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=Ax(c,w);var A=Ax(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,lo=null,tp=null,ts=null,rp=!1;function jx(a,l,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;rp||lo==null||lo!==lt(p)||(p=lo,"selectionStart"in p&&ep(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}),ts&&es(ts,p)||(ts=p,p=ac(tp,"onSelect"),0ho||(a.current=pp[ho],pp[ho]=null,ho--)}function Qe(a,l){ho++,pp[ho]=a.current,a.current=l}var wi={},Kt=bi(wi),sr=bi(!1),aa=wi;function po(a,l){var c=a.type.contextTypes;if(!c)return wi;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 uc(){et(sr),et(Kt)}function Hx(a,l,c){if(Kt.current!==wi)throw Error(r(168));Qe(Kt,l),Qe(sr,c)}function Kx(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 cc(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||wi,aa=Kt.current,Qe(Kt,a),Qe(sr,sr.current),!0}function Vx(a,l,c){var p=a.stateNode;if(!p)throw Error(r(169));c?(a=Kx(a,l,aa),p.__reactInternalMemoizedMergedChildContext=a,et(sr),et(Kt),Qe(Kt,a)):et(sr),Qe(sr,c)}var Rn=null,dc=!1,mp=!1;function qx(a){Rn===null?Rn=[a]:Rn.push(a)}function pI(a){dc=!0,qx(a)}function Si(){if(!mp&&Rn!==null){mp=!0;var a=0,l=qe;try{var c=Rn;for(qe=1;a>=A,g-=A,$n=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?Se=He:Oe.sibling=He,Oe=He,Ce=Ct}if(Ne===W.length)return c(U,Ce),it&&la(U,Ne),Se;if(Ce===null){for(;NeNe?(Ct=Ce,Ce=null):Ct=Ce.sibling;var Ni=ee(U,Ce,He.value,oe);if(Ni===null){Ce===null&&(Ce=Ct);break}a&&Ce&&Ni.alternate===null&&l(U,Ce),L=w(Ni,L,Ne),Oe===null?Se=Ni:Oe.sibling=Ni,Oe=Ni,Ce=Ct}if(He.done)return c(U,Ce),it&&la(U,Ne),Se;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?Se=He:Oe.sibling=He,Oe=He);return it&&la(U,Ne),Se}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?Se=He:Oe.sibling=He,Oe=He);return a&&Ce.forEach(function(GI){return l(U,GI)}),it&&la(U,Ne),Se}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 Se=W.key,Oe=L;Oe!==null;){if(Oe.key===Se){if(Se=W.type,Se===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===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===fe&&Jx(Se)===Oe.type){c(U,Oe.sibling),L=g(Oe,W.props),L.ref=ls(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=ma(W.props.children,U.mode,oe,W.key),L.return=U,U=L):(oe=zc(W.type,W.key,W.props,null,U.mode,oe),oe.ref=ls(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=fm(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(Ie(W))return ye(U,L,W,oe);if(ae(W))return xe(U,L,W,oe);mc(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=dm(W,U.mode,oe),L.return=U,U=L),A(U)):c(U,L)}return mt}var yo=eb(!0),tb=eb(!1),vc=bi(null),gc=null,xo=null,wp=null;function Sp(){wp=xo=gc=null}function kp(a){var l=vc.current;et(vc),a._currentValue=l}function Ep(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 bo(a,l){gc=a,wp=xo=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(wp!==a)if(a={context:a,memoizedValue:l,next:null},xo===null){if(gc===null)throw Error(r(308));xo=a,gc.dependencies={lanes:0,firstContext:a}}else xo=xo.next=a;return l}var sa=null;function Pp(a){sa===null?sa=[a]:sa.push(a)}function rb(a,l,c,p){var g=l.interleaved;return g===null?(c.next=c,Pp(l)):(c.next=g.next,g.next=c),l.interleaved=c,zn(a,p)}function zn(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 ki=!1;function Ap(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nb(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 Fn(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function Ei(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,zn(a,c)}return g=p.interleaved,g===null?(l.next=l,Pp(p)):(l.next=g.next,g.next=l),p.interleaved=l,zn(a,c)}function yc(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,Fh(a,c)}}function ib(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 xc(a,l,c,p){var g=a.updateQueue;ki=!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:ki=!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);da|=A,a.lanes=A,a.memoizedState=ie}}function ab(a,l,c){if(a=l.effects,l.effects=null,a!==null)for(l=0;lc?c:4,a(!0);var p=Np.transition;Np.transition={};try{a(!1),l()}finally{qe=c,Np.transition=p}}function Eb(){return Mr().memoizedState}function yI(a,l,c){var p=Ci(a);if(c={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null},Pb(a))Ab(l,c);else if(c=rb(a,l,c,p),c!==null){var g=tr();Jr(c,a,p,g),Ob(c,l,p)}}function xI(a,l,c){var p=Ci(a),g={lane:p,action:c,hasEagerState:!1,eagerState:null,next:null};if(Pb(a))Ab(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,Pp(l)):(g.next=D.next,D.next=g),l.interleaved=g;return}}catch{}finally{}c=rb(a,l,g,p),c!==null&&(g=tr(),Jr(c,a,p,g),Ob(c,l,p))}}function Pb(a){var l=a.alternate;return a===ut||l!==null&&l===ut}function Ab(a,l){ds=Sc=!0;var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}function Ob(a,l,c){if((c&4194240)!==0){var p=l.lanes;p&=a.pendingLanes,c|=p,l.lanes=c,Fh(a,c)}}var Pc={readContext:Ir,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useInsertionEffect:Vt,useLayoutEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useMutableSource:Vt,useSyncExternalStore:Vt,useId:Vt,unstable_isNewReconciler:!1},bI={readContext:Ir,useCallback:function(a,l){return pn().memoizedState=[a,l===void 0?null:l],a},useContext:Ir,useEffect:vb,useImperativeHandle:function(a,l,c){return c=c!=null?c.concat([a]):null,kc(4194308,4,xb.bind(null,l,a),c)},useLayoutEffect:function(a,l){return kc(4194308,4,a,l)},useInsertionEffect:function(a,l){return kc(4,2,a,l)},useMemo:function(a,l){var c=pn();return l=l===void 0?null:l,a=a(),c.memoizedState=[a,l],a},useReducer:function(a,l,c){var p=pn();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=yI.bind(null,ut,a),[p.memoizedState,a]},useRef:function(a){var l=pn();return a={current:a},l.memoizedState=a},useState:pb,useDebugValue:Lp,useDeferredValue:function(a){return pn().memoizedState=a},useTransition:function(){var a=pb(!1),l=a[0];return a=gI.bind(null,a[1]),pn().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,c){var p=ut,g=pn();if(it){if(c===void 0)throw Error(r(407));c=c()}else{if(c=l(),Ot===null)throw Error(r(349));(ca&30)!==0||ub(p,l,c)}g.memoizedState=c;var w={value:c,getSnapshot:l};return g.queue=w,vb(db.bind(null,p,w,a),[a]),p.flags|=2048,ps(9,cb.bind(null,p,w,c,l),void 0,null),c},useId:function(){var a=pn(),l=Ot.identifierPrefix;if(it){var c=Ln,p=$n;c=(p&~(1<<32-qr(p)-1)).toString(32)+c,l=":"+l+"R"+c,c=fs++,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[fn]=l,a[as]=p,qb(a,l,!1,!1),l.stateNode=a;e:{switch(A=_h(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;gPo&&(l.flags|=128,p=!0,ms(w,!1),l.lanes=4194304)}else{if(!p)if(a=bc(A),a!==null){if(l.flags|=128,p=!0,c=a.updateQueue,c!==null&&(l.updateQueue=c,l.flags|=4),ms(w,!0),w.tail===null&&w.tailMode==="hidden"&&!A.alternate&&!it)return qt(l),null}else 2*pt()-w.renderingStartTime>Po&&c!==1073741824&&(l.flags|=128,p=!0,ms(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):(qt(l),null);case 22:case 23:return sm(),p=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(l.flags|=8192),p&&(l.mode&1)!==0?(Sr&1073741824)!==0&&(qt(l),l.subtreeFlags&6&&(l.flags|=8192)):qt(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function CI(a,l){switch(gp(l),l.tag){case 1:return ur(l.type)&&uc(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return wo(),et(sr),et(Kt),_p(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return Cp(l),null;case 13:if(et(st),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));go()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return et(st),null;case 4:return wo(),null;case 10:return kp(l.type._context),null;case 22:case 23:return sm(),null;case 24:return null;default:return null}}var jc=!1,Gt=!1,jI=typeof WeakSet=="function"?WeakSet:Set,me=null;function ko(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 Qp(a,l,c){try{c()}catch(p){ct(a,l,p)}}var Qb=!1;function _I(a,l){if(sp=Yu,a=Cx(),ep(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(up={focusedElem:a,selectionRange:c},Yu=!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=Qb,Qb=!1,ye}function vs(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&&Qp(l,c,w)}g=g.next}while(g!==p)}}function _c(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 Xp(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 Xb(a){var l=a.alternate;l!==null&&(a.alternate=null,Xb(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[fn],delete l[as],delete l[hp],delete l[fI],delete l[hI])),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 Zb(a){return a.tag===5||a.tag===3||a.tag===4}function Jb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Zb(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 Zp(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=lc));else if(p!==4&&(a=a.child,a!==null))for(Zp(a,l,c),a=a.sibling;a!==null;)Zp(a,l,c),a=a.sibling}function Jp(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(Jp(a,l,c),a=a.sibling;a!==null;)Jp(a,l,c),a=a.sibling}var Dt=null,Xr=!1;function Pi(a,l,c){for(c=c.child;c!==null;)e1(a,l,c),c=c.sibling}function e1(a,l,c){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(Wu,c)}catch{}switch(c.tag){case 5:Gt||ko(c,l);case 6:var p=Dt,g=Xr;Dt=null,Pi(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?fp(a.parentNode,c):a.nodeType===1&&fp(a,c),Gl(a)):fp(Dt,c.stateNode));break;case 4:p=Dt,g=Xr,Dt=c.stateNode.containerInfo,Xr=!0,Pi(a,l,c),Dt=p,Xr=g;break;case 0:case 11:case 14:case 15:if(!Gt&&(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)&&Qp(c,l,A),g=g.next}while(g!==p)}Pi(a,l,c);break;case 1:if(!Gt&&(ko(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)}Pi(a,l,c);break;case 21:Pi(a,l,c);break;case 22:c.mode&1?(Gt=(p=Gt)||c.memoizedState!==null,Pi(a,l,c),Gt=p):Pi(a,l,c);break;default:Pi(a,l,c)}}function t1(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var c=a.stateNode;c===null&&(c=a.stateNode=new jI),l.forEach(function(p){var g=zI.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*II(p/1960))-p,10a?16:a,Oi===null)var p=!1;else{if(a=Oi,Oi=null,Dc=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()-rm?ha(a,0):tm|=c),fr(a,l)}function p1(a,l){l===0&&((a.mode&1)===0?l=1:(l=Ku,Ku<<=1,(Ku&130023424)===0&&(Ku=4194304)));var c=tr();a=zn(a,l),a!==null&&(Wl(a,l,c),fr(a,c))}function LI(a){var l=a.memoizedState,c=0;l!==null&&(c=l.retryLane),p1(a,c)}function zI(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),p1(a,c)}var m1;m1=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,AI(a,l,c);cr=(a.flags&131072)!==0}else cr=!1,it&&(l.flags&1048576)!==0&&Gx(l,hc,l.index);switch(l.lanes=0,l.tag){case 2:var p=l.type;Cc(a,l),a=l.pendingProps;var g=po(l,Kt.current);bo(l,c),g=Mp(null,l,p,a,g,c);var w=Tp();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,cc(l)):w=!1,l.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Ap(l),g.updater=Ac,l.stateNode=g,g._reactInternals=l,Fp(l,p,a,c),l=Hp(null,l,p,!0,w,c)):(l.tag=0,it&&w&&vp(l),er(null,l,g,c),l=l.child),l;case 16:p=l.elementType;e:{switch(Cc(a,l),a=l.pendingProps,g=p._init,p=g(p._payload),l.type=p,g=l.tag=BI(p),a=Qr(p,a),g){case 0:l=Wp(null,l,p,a,c);break e;case 1:l=Bb(null,l,p,a,c);break e;case 11:l=Rb(null,l,p,a,c);break e;case 14:l=$b(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),Wp(a,l,p,g,c);case 1:return p=l.type,g=l.pendingProps,g=l.elementType===p?g:Qr(p,g),Bb(a,l,p,g,c);case 3:e:{if(Ub(l),a===null)throw Error(r(387));p=l.pendingProps,w=l.memoizedState,g=w.element,nb(a,l),xc(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=Wb(a,l,p,c,g);break e}else if(p!==g){g=So(Error(r(424)),l),l=Wb(a,l,p,c,g);break e}else for(wr=xi(l.stateNode.containerInfo.firstChild),br=l,it=!0,Yr=null,c=tb(l,null,p,c),l.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(go(),p===g){l=Bn(a,l,c);break e}er(a,l,p,c)}l=l.child}return l;case 5:return ob(l),a===null&&xp(l),p=l.type,g=l.pendingProps,w=a!==null?a.memoizedProps:null,A=g.children,cp(p,g)?A=null:w!==null&&cp(p,w)&&(l.flags|=32),Fb(a,l),er(a,l,A,c),l.child;case 6:return a===null&&xp(l),null;case 13:return Hb(a,l,c);case 4:return Op(l,l.stateNode.containerInfo),p=l.pendingProps,a===null?l.child=yo(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),Rb(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(vc,p._currentValue),p._currentValue=A,w!==null)if(Gr(w.value,A)){if(w.children===g.children&&!sr.current){l=Bn(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=Fn(-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),Ep(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),Ep(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,bo(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),$b(a,l,p,g,c);case 15:return Lb(a,l,l.type,l.pendingProps,c);case 17:return p=l.type,g=l.pendingProps,g=l.elementType===p?g:Qr(p,g),Cc(a,l),l.tag=1,ur(p)?(a=!0,cc(l)):a=!1,bo(l,c),jb(l,p,g),Fp(l,p,g,c),Hp(null,l,p,!0,a,c);case 19:return Vb(a,l,c);case 22:return zb(a,l,c)}throw Error(r(156,l.tag))};function v1(a,l){return Y0(a,l)}function FI(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 FI(a,l,c,p)}function cm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function BI(a){if(typeof a=="function")return cm(a)?1:0;if(a!=null){if(a=a.$$typeof,a===B)return 11;if(a===le)return 14}return 2}function _i(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 zc(a,l,c,p,g,w){var A=2;if(p=a,typeof a=="function")cm(a)&&(A=1);else if(typeof a=="string")A=5;else e:switch(a){case R:return ma(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 Fc(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 ma(a,l,c,p){return a=Dr(7,a,p,l),a.lanes=c,a}function Fc(a,l,c,p){return a=Dr(22,a,p,l),a.elementType=de,a.lanes=c,a.stateNode={isHidden:!1},a}function dm(a,l,c){return a=Dr(6,a,null,l),a.lanes=c,a}function fm(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 UI(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=zh(0),this.expirationTimes=zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.identifierPrefix=p,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function hm(a,l,c,p,g,w,A,I,D){return a=new UI(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},Ap(w),a}function WI(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(),bm.exports=nM(),bm.exports}var N1;function iM(){if(N1)return Gc;N1=1;var e=CP();return Gc.createRoot=e.createRoot,Gc.hydrateRoot=e.hydrateRoot,Gc}var aM=iM();const oM=Dg(aM);var yu=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(){}},_a,Fi,Jo,yP,lM=(yP=class extends yu{constructor(){super();je(this,_a);je(this,Fi);je(this,Jo);pe(this,Jo,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,Fi)||this.setEventListener($(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Fi))==null||t.call(this),pe(this,Fi,void 0))}setEventListener(t){var r;pe(this,Jo,t),(r=$(this,Fi))==null||r.call(this),pe(this,Fi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,_a)!==t&&(pe(this,_a,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,_a)=="boolean"?$(this,_a):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},_a=new WeakMap,Fi=new WeakMap,Jo=new WeakMap,yP),$g=new lM,sM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Bi,Tg,xP,uM=(xP=class{constructor(){je(this,Bi,sM);je(this,Tg,!1)}setTimeoutProvider(e){pe(this,Bi,e)}setTimeout(e,t){return $(this,Bi).setTimeout(e,t)}clearTimeout(e){$(this,Bi).clearTimeout(e)}setInterval(e,t){return $(this,Bi).setInterval(e,t)}clearInterval(e){$(this,Bi).clearInterval(e)}},Bi=new WeakMap,Tg=new WeakMap,xP),ka=new uM;function cM(e){setTimeout(e,0)}var dM=typeof window>"u"||"Deno"in globalThis;function mr(){}function fM(e,t){return typeof e=="function"?e(t):e}function pv(e){return typeof e=="number"&&e>=0&&e!==1/0}function jP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yi(e,t){return typeof e=="function"?e(t):e}function Er(e,t){return typeof e=="function"?e(t):e}function I1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:u}=e;if(s){if(n){if(t.queryHash!==Lg(s,t.options))return!1}else if(!Vs(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 M1(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Ks(t.options.mutationKey)!==Ks(o))return!1}else if(!Vs(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Lg(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ks)(e)}function Ks(e){return JSON.stringify(e,(t,r)=>vv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Vs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Vs(e[r],t[r])):!1}var hM=Object.prototype.hasOwnProperty;function _P(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=T1(e)&&T1(t);if(!n&&!(vv(e)&&vv(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{ka.setTimeout(t,e)})}function gv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?_P(e,t):t}function mM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function vM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var zg=Symbol();function NP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===zg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function IP(e,t){return typeof e=="function"?e(...t):!!e}function gM(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 qs=(()=>{let e=()=>dM;return{isServer(){return e()},setIsServer(t){e=t}}})();function yv(){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 yM=cM;function xM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=yM;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=xM(),el,Ui,tl,bP,bM=(bP=class extends yu{constructor(){super();je(this,el,!0);je(this,Ui);je(this,tl);pe(this,tl,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,Ui)||this.setEventListener($(this,tl))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Ui))==null||t.call(this),pe(this,Ui,void 0))}setEventListener(t){var r;pe(this,tl,t),(r=$(this,Ui))==null||r.call(this),pe(this,Ui,t(this.setOnline.bind(this)))}setOnline(t){$(this,el)!==t&&(pe(this,el,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,el)}},el=new WeakMap,Ui=new WeakMap,tl=new WeakMap,bP),_d=new bM;function wM(e){return Math.min(1e3*2**e,3e4)}function MP(e){return(e??"online")==="online"?_d.isOnline():!0}var xv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function TP(e){let t=!1,r=0,n;const i=yv(),o=()=>i.status!=="pending",s=S=>{var E;if(!o()){const P=new xv(S);v(P),(E=e.onCancel)==null||E.call(e,P)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>$g.isFocused()&&(e.networkMode==="always"||_d.isOnline())&&e.canRun(),h=()=>MP(e.networkMode)&&e.canRun(),m=S=>{o()||(n==null||n(),i.resolve(S))},v=S=>{o()||(n==null||n(),i.reject(S))},x=()=>new Promise(S=>{var E;n=P=>{(o()||f())&&S(P)},(E=e.onPause)==null||E.call(e)}).then(()=>{var S;n=void 0,o()||(S=e.onContinue)==null||S.call(e)}),k=()=>{if(o())return;let S;const E=r===0?e.initialPromise:void 0;try{S=E??e.fn()}catch(P){S=Promise.reject(P)}Promise.resolve(S).then(m).catch(P=>{var C;if(o())return;const j=e.retry??(qs.isServer()?0:3),_=e.retryDelay??wM,O=typeof _=="function"?_(r,P):_,N=j===!0||typeof j=="number"&&rf()?void 0:x()).then(()=>{t?v(P):k()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:d,canStart:h,start:()=>(h()?k():x().then(k),i)}}var Na,wP,DP=(wP=class{constructor(){je(this,Na)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pv(this.gcTime)&&pe(this,Na,ka.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qs.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Na)!==void 0&&(ka.clearTimeout($(this,Na)),pe(this,Na,void 0))}},Na=new WeakMap,wP);function SM(e){return{onFetch:(t,r)=>{var h,m,v,x,k;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=((x=t.state.data)==null?void 0:x.pages)||[],s=((k=t.state.data)==null?void 0:k.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let S=!1;const E=_=>{gM(_,()=>t.signal,()=>S=!0)},P=NP(t.options,t.fetchOptions),j=async(_,O,N)=>{if(S)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?vM:mM;return{pages:V(_.pages,z,F),pageParams:V(_.pageParams,O,F)}};if(i&&o.length){const _=i==="backward",O=_?kM:R1,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:R1(n,u);if(d>0&&O==null)break;u=await j(u,O),d++}while(d<_)}return u};t.options.persister?t.fetchFn=()=>{var S,E;return(E=(S=t.options).persister)==null?void 0:E.call(S,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function R1(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 kM(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 rl,Ia,nl,$r,Ma,jt,hu,Ta,kr,RP,Hn,SP,EM=(SP=class extends DP{constructor(t){super();je(this,kr);je(this,rl);je(this,Ia);je(this,nl);je(this,$r);je(this,Ma);je(this,jt);je(this,hu);je(this,Ta);pe(this,Ta,!1),pe(this,hu,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,Ma,t.client),pe(this,$r,$(this,Ma).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,Ia,L1(this.options)),this.state=t.state??$(this,Ia),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,rl)}get promise(){var t;return(t=$(this,jt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,hu),...t},t!=null&&t._type&&pe(this,rl,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=L1(this.options);r.data!==void 0&&(this.setState($1(r.data,r.dataUpdatedAt)),pe(this,Ia,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,$r).remove(this)}setData(t,r){const n=gv(this.state.data,t,this.options);return ze(this,kr,Hn).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,kr,Hn).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,Ia)}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===zg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yi(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:!jP(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,Ta)||ze(this,kr,RP).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,kr,Hn).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,m,v,x,k,S,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,Ta,!0),n.signal)})},o=()=>{const O=NP(this.options,r),C=(()=>{const R={client:$(this,Ma),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return pe(this,Ta,!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,Ma),state:this.state,fetchFn:o};return i(O),O})(),d=$(this,rl)==="infinite"?SM(this.options.pages):this.options.behavior;d==null||d.onFetch(u,this),pe(this,nl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&ze(this,kr,Hn).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta}),pe(this,jt,TP({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:O=>{O instanceof xv&&O.revert&&this.setState({...$(this,nl),fetchStatus:"idle"}),n.abort()},onFail:(O,N)=>{ze(this,kr,Hn).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{ze(this,kr,Hn).call(this,{type:"pause"})},onContinue:()=>{ze(this,kr,Hn).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),(x=(v=$(this,$r).config).onSuccess)==null||x.call(v,O,this),(S=(k=$(this,$r).config).onSettled)==null||S.call(k,O,this.state.error,this),O}catch(O){if(O instanceof xv){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,kr,Hn).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()}}},rl=new WeakMap,Ia=new WeakMap,nl=new WeakMap,$r=new WeakMap,Ma=new WeakMap,jt=new WeakMap,hu=new WeakMap,Ta=new WeakMap,kr=new WeakSet,RP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Hn=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,...$P(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...$1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return pe(this,nl,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})})},SP);function $P(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function L1(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,pu,rr,Da,il,Vn,Wi,mu,al,ol,Ra,$a,Hi,ll,Ve,Ls,bv,wv,Sv,kv,Ev,Pv,Av,LP,kP,PM=(kP=class extends yu{constructor(t,r){super();je(this,Ve);je(this,pr);je(this,Be);je(this,pu);je(this,rr);je(this,Da);je(this,il);je(this,Vn);je(this,Wi);je(this,mu);je(this,al);je(this,ol);je(this,Ra);je(this,$a);je(this,Hi);je(this,ll,new Set);this.options=r,pe(this,pr,t),pe(this,Wi,null),pe(this,Vn,yv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Be).addObserver(this),z1($(this,Be),this.options)?ze(this,Ve,Ls).call(this):this.updateResult(),ze(this,Ve,kv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ov($(this,Be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ov($(this,Be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ze(this,Ve,Ev).call(this),ze(this,Ve,Pv).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,Av).call(this),$(this,Be).setOptions(this.options),r._defaulted&&!mv(this.options,r)&&$(this,pr).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Be),observer:this});const i=this.hasListeners();i&&F1($(this,Be),n,this.options,r)&&ze(this,Ve,Ls).call(this),this.updateResult(),i&&($(this,Be)!==n||Er(this.options.enabled,$(this,Be))!==Er(r.enabled,$(this,Be))||Yi(this.options.staleTime,$(this,Be))!==Yi(r.staleTime,$(this,Be)))&&ze(this,Ve,bv).call(this);const o=ze(this,Ve,wv).call(this);i&&($(this,Be)!==n||Er(this.options.enabled,$(this,Be))!==Er(r.enabled,$(this,Be))||o!==$(this,Hi))&&ze(this,Ve,Sv).call(this,o)}getOptimisticResult(t){const r=$(this,pr).getQueryCache().build($(this,pr),t),n=this.createResult(r,t);return OM(this,n)&&(pe(this,rr,n),pe(this,il,this.options),pe(this,Da,$(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,Vn).status==="pending"&&$(this,Vn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,ll).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,Ls).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,Da),u=$(this,il),f=t!==n?t.state:$(this,pu),{state:h}=t;let m={...h},v=!1,x;if(r._optimisticResults){const V=this.hasListeners(),Q=!V&&z1(t,r),B=V&&F1(t,n,r,i);(Q||B)&&(m={...m,...$P(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:k,errorUpdatedAt:S,status:E}=m;x=m.data;let P=!1;if(r.placeholderData!==void 0&&x===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,ol))==null?void 0:F.state.data,$(this,ol)):r.placeholderData,V!==void 0&&(E="success",x=gv(o==null?void 0:o.data,V,r),v=!0)}if(r.select&&x!==void 0&&!P)if(o&&x===(s==null?void 0:s.data)&&r.select===$(this,mu))x=$(this,al);else try{pe(this,mu,r.select),x=r.select(x),x=gv(o==null?void 0:o.data,x,r),pe(this,al,x),pe(this,Wi,null)}catch(V){pe(this,Wi,V)}$(this,Wi)&&(k=$(this,Wi),x=$(this,al),S=Date.now(),E="error");const j=m.fetchStatus==="fetching",_=E==="pending",O=E==="error",N=_&&j,C=x!==void 0,z={status:E,fetchStatus:m.fetchStatus,isPending:_,isSuccess:E==="success",isError:O,isInitialLoading:N,isLoading:N,data:x,dataUpdatedAt:m.dataUpdatedAt,error:k,errorUpdatedAt:S,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:Fg(t,r),refetch:this.refetch,promise:$(this,Vn),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,Vn,z.promise=yv());B(le)},G=$(this,Vn);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,Da,$(this,Be).state),pe(this,il,this.options),$(this,Da).data!==void 0&&pe(this,ol,$(this,Be)),mv(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,ll).size)return!0;const s=new Set(o??$(this,ll));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,LP).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ze(this,Ve,kv).call(this)}},pr=new WeakMap,Be=new WeakMap,pu=new WeakMap,rr=new WeakMap,Da=new WeakMap,il=new WeakMap,Vn=new WeakMap,Wi=new WeakMap,mu=new WeakMap,al=new WeakMap,ol=new WeakMap,Ra=new WeakMap,$a=new WeakMap,Hi=new WeakMap,ll=new WeakMap,Ve=new WeakSet,Ls=function(t){ze(this,Ve,Av).call(this);let r=$(this,Be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(mr)),r},bv=function(){ze(this,Ve,Ev).call(this);const t=Yi(this.options.staleTime,$(this,Be));if(qs.isServer()||$(this,rr).isStale||!pv(t))return;const n=jP($(this,rr).dataUpdatedAt,t)+1;pe(this,Ra,ka.setTimeout(()=>{$(this,rr).isStale||this.updateResult()},n))},wv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Be)):this.options.refetchInterval)??!1},Sv=function(t){ze(this,Ve,Pv).call(this),pe(this,Hi,t),!(qs.isServer()||Er(this.options.enabled,$(this,Be))===!1||!pv($(this,Hi))||$(this,Hi)===0)&&pe(this,$a,ka.setInterval(()=>{(this.options.refetchIntervalInBackground||$g.isFocused())&&ze(this,Ve,Ls).call(this)},$(this,Hi)))},kv=function(){ze(this,Ve,bv).call(this),ze(this,Ve,Sv).call(this,ze(this,Ve,wv).call(this))},Ev=function(){$(this,Ra)!==void 0&&(ka.clearTimeout($(this,Ra)),pe(this,Ra,void 0))},Pv=function(){$(this,$a)!==void 0&&(ka.clearInterval($(this,$a)),pe(this,$a,void 0))},Av=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,pu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},LP=function(t){Ft.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,rr))}),$(this,pr).getQueryCache().notify({query:$(this,Be),type:"observerResultsUpdated"})})},kP);function AM(e,t){return Er(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Er(t.retryOnMount,e)===!1)}function z1(e,t){return AM(e,t)||e.state.data!==void 0&&Ov(e,t,t.refetchOnMount)}function Ov(e,t,r){if(Er(t.enabled,e)!==!1&&Yi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Fg(e,t)}return!1}function F1(e,t,r,n){return(e!==t||Er(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Fg(e,r)}function Fg(e,t){return Er(t.enabled,e)!==!1&&e.isStaleByTime(Yi(t.staleTime,e))}function OM(e,t){return!mv(e.getCurrentResult(),t)}var vu,bn,Yt,La,wn,Di,EP,CM=(EP=class extends DP{constructor(t){super();je(this,wn);je(this,vu);je(this,bn);je(this,Yt);je(this,La);pe(this,vu,t.client),this.mutationId=t.mutationId,pe(this,Yt,t.mutationCache),pe(this,bn,[]),this.state=t.state||jM(),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,bn).includes(t)||($(this,bn).push(t),this.clearGcTimeout(),$(this,Yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,bn,$(this,bn).filter(r=>r!==t)),this.scheduleGc(),$(this,Yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,bn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Yt).remove(this))}continue(){var t;return((t=$(this,La))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,u,d,f,h,m,v,x,k,S,E,P,j,_,O,N,C,R;const r=()=>{ze(this,wn,Di).call(this,{type:"continue"})},n={client:$(this,vu),meta:this.options.meta,mutationKey:this.options.mutationKey};pe(this,La,TP({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(z,F)=>{ze(this,wn,Di).call(this,{type:"failed",failureCount:z,error:F})},onPause:()=>{ze(this,wn,Di).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Yt).canRun(this)}));const i=this.state.status==="pending",o=!$(this,La).canStart();try{if(i)r();else{ze(this,wn,Di).call(this,{type:"pending",variables:t,isPaused:o}),$(this,Yt).config.onMutate&&await $(this,Yt).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,wn,Di).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const z=await $(this,La).start();return await((f=(d=$(this,Yt).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((x=(v=$(this,Yt).config).onSettled)==null?void 0:x.call(v,z,null,this.state.variables,this.state.context,this,n)),await((S=(k=this.options).onSettled)==null?void 0:S.call(k,z,null,t,this.state.context,n)),ze(this,wn,Di).call(this,{type:"success",data:z}),z}catch(z){try{await((P=(E=$(this,Yt).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,Yt).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,wn,Di).call(this,{type:"error",error:z}),z}finally{$(this,Yt).runNext(this)}}},vu=new WeakMap,bn=new WeakMap,Yt=new WeakMap,La=new WeakMap,wn=new WeakSet,Di=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,bn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Yt).notify({mutation:this,type:"updated",action:t})})},EP);function jM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,tn,gu,PP,_M=(PP=class extends yu{constructor(t={}){super();je(this,qn);je(this,tn);je(this,gu);this.config=t,pe(this,qn,new Set),pe(this,tn,new Map),pe(this,gu,0)}build(t,r,n){const i=new CM({client:t,mutationCache:this,mutationId:++qc(this,gu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,qn).add(t);const r=Yc(t);if(typeof r=="string"){const n=$(this,tn).get(r);n?n.push(t):$(this,tn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,qn).delete(t)){const r=Yc(t);if(typeof r=="string"){const n=$(this,tn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,tn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Yc(t);if(typeof r=="string"){const n=$(this,tn).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=Yc(t);if(typeof r=="string"){const i=(n=$(this,tn).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,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,qn).clear(),$(this,tn).clear()})}getAll(){return Array.from($(this,qn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>M1(r,n))}findAll(t={}){return this.getAll().filter(r=>M1(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))))}},qn=new WeakMap,tn=new WeakMap,gu=new WeakMap,PP);function Yc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Sn,AP,NM=(AP=class extends yu{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??Lg(i,r);let s=this.get(o);return s||(s=new EM({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=>I1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>I1(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,AP),dt,Ki,Vi,sl,ul,qi,cl,dl,OP,IM=(OP=class{constructor(e={}){je(this,dt);je(this,Ki);je(this,Vi);je(this,sl);je(this,ul);je(this,qi);je(this,cl);je(this,dl);pe(this,dt,e.queryCache||new NM),pe(this,Ki,e.mutationCache||new _M),pe(this,Vi,e.defaultOptions||{}),pe(this,sl,new Map),pe(this,ul,new Map),pe(this,qi,0)}mount(){qc(this,qi)._++,$(this,qi)===1&&(pe(this,cl,$g.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,dt).onFocus())})),pe(this,dl,_d.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,dt).onOnline())})))}unmount(){var e,t;qc(this,qi)._--,$(this,qi)===0&&((e=$(this,cl))==null||e.call(this),pe(this,cl,void 0),(t=$(this,dl))==null||t.call(this),pe(this,dl,void 0))}isFetching(e){return $(this,dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ki).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(Yi(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=fM(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(Yi(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 _d.isOnline()?$(this,Ki).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,dt)}getMutationCache(){return $(this,Ki)}getDefaultOptions(){return $(this,Vi)}setDefaultOptions(e){pe(this,Vi,e)}setQueryDefaults(e,t){$(this,sl).set(Ks(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,sl).values()],r={};return t.forEach(n=>{Vs(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,ul).set(Ks(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ul).values()],r={};return t.forEach(n=>{Vs(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Vi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lg(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===zg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Vi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,dt).clear(),$(this,Ki).clear()}},dt=new WeakMap,Ki=new WeakMap,Vi=new WeakMap,sl=new WeakMap,ul=new WeakMap,qi=new WeakMap,cl=new WeakMap,dl=new WeakMap,OP),zP=y.createContext(void 0),xu=e=>{const t=y.useContext(zP);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MM=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(zP.Provider,{value:e,children:t})),FP=y.createContext(!1),TM=()=>y.useContext(FP);FP.Provider;function DM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var RM=y.createContext(DM()),$M=()=>y.useContext(RM),LM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?IP(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},zM=e=>{y.useEffect(()=>{e.clearReset()},[e])},FM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||IP(r,[e.error,n])),BM=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))}},UM=(e,t)=>e.isLoading&&e.isFetching&&!t,WM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,B1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function HM(e,t,r){var x,k,S,E;const n=TM(),i=$M(),o=xu(),s=o.defaultQueryOptions(e);(k=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||k.call(x,s);const u=o.getQueryCache().get(s.queryHash),d=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":d?"optimistic":void 0,BM(s),LM(s,i,u),zM(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]),WM(s,m))throw B1(s,h,i);if(FM({result:m,errorResetBoundary:i,throwOnError:s.throwOnError,query:u,suspense:s.suspense}))throw m.error;if((E=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||E.call(S,s,m),s.experimental_prefetchInRender&&!qs.isServer()&&UM(m,n)){const P=f?B1(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 Ye(e,t){return HM(e,PM)}const KM="modulepreload",VM=function(e){return"/"+e},U1={},sn=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=VM(f),f in U1)return;U1[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":KM,h||(v.as="script"),v.crossOrigin="",v.href=f,d&&v.setAttribute("nonce",d),document.head.appendChild(v),h)return new Promise((x,k)=>{v.addEventListener("load",x),v.addEventListener("error",()=>k(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(),BP=(...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 GM={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 YM=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,...GM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:BP("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 ke=(e,t)=>{const r=y.forwardRef(({className:n,...i},o)=>y.createElement(YM,{ref:o,iconNode:t,className:BP(`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 QM=ke("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 XM=ke("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 W1=ke("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 ZM=ke("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 jf=ke("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 JM=ke("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 UP=ke("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 Bg=ke("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 eT=ke("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 tT=ke("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 rT=ke("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 nT=ke("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 Ko=ke("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 iT=ke("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 WP=ke("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 aT=ke("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 oT=ke("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 lT=ke("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 HP=ke("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 sT=ke("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 H1=ke("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 Cv=ke("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 uT=ke("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 cT=ke("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 dT=ke("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 fT=ke("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 hT=ke("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 pT=ke("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 Ug=ke("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 mT=ke("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 vT=ke("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 gT=ke("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 yT=ke("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 _f=ke("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 xT=ke("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 bT=ke("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 wT=ke("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 K1=ke("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 Wg=ke("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 V1=ke("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 ST=ke("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 Vo=ke("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 kT=ke("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 ET=ke("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 Nf=ke("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 Hg=ke("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 PT=ke("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 Kg=ke("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 KP=ke("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 AT=ke("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 VP=ke("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 OT=ke("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 CT=ke("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 jT=ke("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 Gs=ke("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 _T=ke("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 bu=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),qo=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:vT,group:"Operativ"},{id:"ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:yT,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:Ug,group:"Operativ"},{id:"eigenleben",label:"Skills",hint:"Fähigkeiten der Box — aktiv/inaktiv, Herkunft & Vorschlags-Bilanz",icon:VP,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:pT,group:"Operativ"},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Bg,group:"Wissen"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:gT,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Wg,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:OT,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:WP,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:UP,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:jf,group:"Wartung"}];var q1=1,NT=.9,IT=.8,MT=.17,km=.1,Em=.999,TT=.9999,DT=.99,RT=/[\\\/_+.#"@\[\(\{&]/,$T=/[\\\/_+.#"@\[\(\{&]/g,LT=/[\s-]/,qP=/[\s-]/g;function jv(e,t,r,n,i,o,s){if(o===t.length)return i===e.length?q1:DT;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,x,k;f>=0;)m=jv(e,t,r,n,f+1,o+1,s),m>h&&(f===i?m*=q1:RT.test(e.charAt(f-1))?(m*=IT,x=e.slice(i,f-1).match($T),x&&i>0&&(m*=Math.pow(Em,x.length))):LT.test(e.charAt(f-1))?(m*=NT,k=e.slice(i,f-1).match(qP),k&&i>0&&(m*=Math.pow(Em,k.length))):(m*=MT,i>0&&(m*=Math.pow(Em,f-i))),e.charAt(f)!==t.charAt(o)&&(m*=TT)),(mm&&(m=v*km)),m>h&&(h=m),f=r.indexOf(d,f+1);return s[u]=h,h}function G1(e){return e.toLowerCase().replace(qP," ")}function zT(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,jv(e,t,G1(e),G1(t),0,0,{})}function Qi(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 Y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fl(...e){return t=>{let r=!1;const n=e.map(i=>{const o=Y1(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i{var P;const{scope:v,children:x,...k}=m,S=((P=v==null?void 0:v[e])==null?void 0:P[d])||u,E=y.useMemo(()=>k,Object.values(k));return b.jsx(S.Provider,{value:E,children:x})};f.displayName=o+"Provider";function h(m,v){var S;const x=((S=v==null?void 0:v[e])==null?void 0:S[d])||u,k=y.useContext(x);if(k)return k;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,BT(i,...t)]}function BT(...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 Ys=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},UT=Cf[" useId ".trim().toString()]||(()=>{}),WT=0;function Zn(e){const[t,r]=y.useState(UT());return Ys(()=>{r(n=>n??String(WT++))},[e]),t?`radix-${t}`:""}var HT=Cf[" useInsertionEffect ".trim().toString()]||Ys;function KT({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,s]=VT({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=qT(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 VT({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),i=y.useRef(r),o=y.useRef(t);return HT(()=>{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 qT(e){return typeof e=="function"}var If=CP();function GP(e){const t=y.forwardRef((r,n)=>{let{children:i,...o}=r,s=null,u=!1;const d=[];Q1(i)&&typeof Qc=="function"&&(i=Qc(i._payload)),y.Children.forEach(i,v=>{var x;if(ZT(v)){u=!0;const k=v;let S="child"in k.props?k.props.child:k.props.children;Q1(S)&&typeof Qc=="function"&&(S=Qc(S._payload)),s=YT(k,S),d.push((x=s==null?void 0:s.props)==null?void 0:x.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?XT(s):void 0,h=Xa(n,f);if(!s){if(i||i===0)throw new Error(u?rD(e):tD(e));return i}const m=QT(o,s.props??{});return s.type!==y.Fragment&&(m.ref=n?h:f),y.cloneElement(s,m)});return t.displayName=`${e}.Slot`,t}var GT=Symbol.for("radix.slottable"),YT=(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 QT(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 XT(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 ZT(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GT}var JT=Symbol.for("react.lazy");function Q1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===JT&&"_payload"in e&&eD(e._payload)}function eD(e){return typeof e=="object"&&e!==null&&"then"in e}var tD=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,rD=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Qc=Cf[" use ".trim().toString()],nD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wt=nD.reduce((e,t)=>{const r=GP(`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),b.jsx(d,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function iD(e,t){e&&If.flushSync(()=>e.dispatchEvent(t))}function Qs(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 aD(e,t=globalThis==null?void 0:globalThis.document){const r=Qs(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 oD="DismissableLayer",_v="dismissableLayer.update",lD="dismissableLayer.pointerDownOutside",sD="dismissableLayer.focusOutside",X1,Vg=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),YP=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(Vg),[m,v]=y.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=y.useState({}),S=Xa(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=fD(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:x,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:h.dismissableSurfaces}),z=hD(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())},x);return aD(F=>{_===h.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&d&&(F.preventDefault(),d()))},x),y.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(X1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),Z1(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(m),h.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=X1))}},[m,x,r,h]),y.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),Z1())},[m,h]),y.useEffect(()=>{const F=()=>k({});return document.addEventListener(_v,F),()=>document.removeEventListener(_v,F)},[]),b.jsx(Wt.div,{...f,ref:S,style:{pointerEvents:O?N?"auto":"none":void 0,...e.style},onFocusCapture:Qi(e.onFocusCapture,z.onFocusCapture),onBlurCapture:Qi(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:Qi(e.onPointerDownCapture,R.onPointerDownCapture)})});YP.displayName=oD;var uD="DismissableLayerBranch",cD=y.forwardRef((e,t)=>{const r=y.useContext(Vg),n=y.useRef(null),i=Xa(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),b.jsx(Wt.div,{...e,ref:i})});cD.displayName=uD;function dD(){const e=y.useContext(Vg),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function fD(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,s=Qs(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 x(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 k(j){d.current&&f.current.set(j.type,!1)}const S=j=>{if(j.target&&!u.current){let _=function(){r.removeEventListener("click",h.current);const N=v();m(),N||QP(lD,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,x,!0),r.addEventListener(j,k);const P=window.setTimeout(()=>{r.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(P),r.removeEventListener("pointerdown",S),r.removeEventListener("click",h.current);for(const j of E)r.removeEventListener(j,x,!0),r.removeEventListener(j,k)}},[r,s,n,i,o]),{onPointerDownCapture:()=>u.current=!0}}function hD(e,t=globalThis==null?void 0:globalThis.document){const r=Qs(e),n=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!n.current&&QP(sD,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 Z1(){const e=new CustomEvent(_v);document.dispatchEvent(e)}function QP(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?iD(i,o):i.dispatchEvent(o)}var Pm="focusScope.autoFocusOnMount",Am="focusScope.autoFocusOnUnmount",J1={bubbles:!1,cancelable:!0},pD="FocusScope",XP=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[u,d]=y.useState(null),f=Qs(i),h=Qs(o),m=y.useRef(null),v=Xa(t,S=>d(S)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let S=function(_){if(x.paused||!u)return;const O=_.target;u.contains(O)?m.current=O:Ri(m.current,{select:!0})},E=function(_){if(x.paused||!u)return;const O=_.relatedTarget;O!==null&&(u.contains(O)||Ri(m.current,{select:!0}))},P=function(_){if(document.activeElement===document.body)for(const N of _)N.removedNodes.length>0&&Ri(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",E);const j=new MutationObserver(P);return u&&j.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E),j.disconnect()}}},[n,u,x.paused]),y.useEffect(()=>{if(u){tw.add(x);const S=document.activeElement;if(!u.contains(S)){const P=new CustomEvent(Pm,J1);u.addEventListener(Pm,f),u.dispatchEvent(P),P.defaultPrevented||(mD(bD(ZP(u)),{select:!0}),document.activeElement===S&&Ri(u))}return()=>{u.removeEventListener(Pm,f),setTimeout(()=>{const P=new CustomEvent(Am,J1);u.addEventListener(Am,h),u.dispatchEvent(P),P.defaultPrevented||Ri(S??document.body,{select:!0}),u.removeEventListener(Am,h),tw.remove(x)},0)}}},[u,f,h,x]);const k=y.useCallback(S=>{if(!r&&!n||x.paused)return;const E=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,P=document.activeElement;if(E&&P){const j=S.currentTarget,[_,O]=vD(j);_&&O?!S.shiftKey&&P===O?(S.preventDefault(),r&&Ri(_,{select:!0})):S.shiftKey&&P===_&&(S.preventDefault(),r&&Ri(O,{select:!0})):P===j&&S.preventDefault()}},[r,n,x.paused]);return b.jsx(Wt.div,{tabIndex:-1,...s,ref:v,onKeyDown:k})});XP.displayName=pD;function mD(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ri(n,{select:t}),document.activeElement!==r)return}function vD(e){const t=ZP(e),r=ew(t,e),n=ew(t.reverse(),e);return[r,n]}function ZP(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 ew(e,t){for(const r of e)if(!gD(r,{upTo:t}))return r}function gD(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 yD(e){return e instanceof HTMLInputElement&&"select"in e}function Ri(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&yD(e)&&t&&e.select()}}var tw=xD();function xD(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=rw(e,t),e.unshift(t)},remove(t){var r;e=rw(e,t),(r=e[0])==null||r.resume()}}}function rw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function bD(e){return e.filter(t=>t.tagName!=="A")}var wD="Portal",JP=y.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=y.useState(!1);Ys(()=>o(!0),[]);const s=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return s?If.createPortal(b.jsx(Wt.div,{...n,ref:t}),s):null});JP.displayName=wD;function SD(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Mf=e=>{const{present:t,children:r}=e,n=kD(t),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=ED(n.ref,PD(i));return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:o}):null};Mf.displayName="Presence";function kD(e){const[t,r]=y.useState(),n=y.useRef(null),i=y.useRef(e),o=y.useRef("none"),s=e?"mounted":"unmounted",[u,d]=SD(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=Xc(n.current);o.current=u==="mounted"?f:"none"},[u]),Ys(()=>{const f=n.current,h=i.current;if(h!==e){const v=o.current,x=Xc(f);e?d("MOUNT"):x==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(h&&v!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Ys(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,m=x=>{const S=Xc(n.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(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=x=>{x.target===t&&(o.current=Xc(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 nw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ED(...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=nw(s,r);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let s=0;s{vn||(vn={start:iw(),end:iw()});const{start:e,end:t}=vn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Zc++,()=>{Zc===1&&(vn==null||vn.start.remove(),vn==null||vn.end.remove(),vn=null),Zc=Math.max(0,Zc-1)}},[])}function iw(){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 kn=function(){return kn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return WD;var t=HD(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])}},VD=nA(),Go="data-scroll-locked",qD=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(CD,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(u,"px ").concat(n,`; + } + body[`).concat(Go,`] { + 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(bd,` { + right: `).concat(u,"px ").concat(n,`; + } + + .`).concat(wd,` { + margin-right: `).concat(u,"px ").concat(n,`; + } + + .`).concat(bd," .").concat(bd,` { + right: 0 `).concat(n,`; + } + + .`).concat(wd," .").concat(wd,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(Go,`] { + `).concat(jD,": ").concat(u,`px; + } +`)},ow=function(){var e=parseInt(document.body.getAttribute(Go)||"0",10);return isFinite(e)?e:0},GD=function(){y.useEffect(function(){return document.body.setAttribute(Go,(ow()+1).toString()),function(){var e=ow()-1;e<=0?document.body.removeAttribute(Go):document.body.setAttribute(Go,e.toString())}},[])},YD=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;GD();var o=y.useMemo(function(){return KD(i)},[i]);return y.createElement(VD,{styles:qD(o,!t,i,r?"":"!important")})},Nv=!1;if(typeof window<"u")try{var Jc=Object.defineProperty({},"passive",{get:function(){return Nv=!0,!0}});window.addEventListener("test",Jc,Jc),window.removeEventListener("test",Jc,Jc)}catch{Nv=!1}var Oo=Nv?{passive:!1}:!1,QD=function(e){return e.tagName==="TEXTAREA"},iA=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!QD(e)&&r[t]==="visible")},XD=function(e){return iA(e,"overflowY")},ZD=function(e){return iA(e,"overflowX")},lw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=aA(e,n);if(i){var o=oA(e,n),s=o[1],u=o[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},JD=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},eR=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},aA=function(e,t){return e==="v"?XD(t):ZD(t)},oA=function(e,t){return e==="v"?JD(t):eR(t)},tR=function(e,t){return e==="h"&&t==="rtl"?-1:1},rR=function(e,t,r,n,i){var o=tR(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 x=oA(e,u),k=x[0],S=x[1],E=x[2],P=S-E-o*k;(k||P)&&aA(e,u)&&(m+=P,v+=k);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},ed=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sw=function(e){return[e.deltaX,e.deltaY]},uw=function(e){return e&&"current"in e?e.current:e},nR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iR=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},aR=0,Co=[];function oR(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(aR++)[0],o=y.useState(nA)[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 S=OD([e.lockRef.current],(e.shards||[]).map(uw),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(S,E){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!s.current.allowPinchZoom;var P=ed(S),j=r.current,_="deltaX"in S?S.deltaX:j[0]-P[0],O="deltaY"in S?S.deltaY:j[1]-P[1],N,C=S.target,R=Math.abs(_)>Math.abs(O)?"h":"v";if("touches"in S&&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=lw(R,C);if(!Q)return!0;if(Q?N=R:(N=R==="v"?"h":"v",Q=lw(R,C)),!Q)return!1;if(!n.current&&"changedTouches"in S&&(_||O)&&(n.current=N),!N)return!0;var B=n.current||N;return rR(B,E,S,B==="h"?_:O)},[]),d=y.useCallback(function(S){var E=S;if(!(!Co.length||Co[Co.length-1]!==o)){var P="deltaY"in E?sw(E):ed(E),j=t.current.filter(function(N){return N.name===E.type&&(N.target===E.target||E.target===N.shadowParent)&&nR(N.delta,P)})[0];if(j&&j.should){E.cancelable&&E.preventDefault();return}if(!j){var _=(s.current.shards||[]).map(uw).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(S,E,P,j){var _={name:S,delta:E,target:P,should:j,shadowParent:lR(P)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(O){return O!==_})},1)},[]),h=y.useCallback(function(S){r.current=ed(S),n.current=void 0},[]),m=y.useCallback(function(S){f(S.type,sw(S),S.target,u(S,e.lockRef.current))},[]),v=y.useCallback(function(S){f(S.type,ed(S),S.target,u(S,e.lockRef.current))},[]);y.useEffect(function(){return Co.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Oo),document.addEventListener("touchmove",d,Oo),document.addEventListener("touchstart",h,Oo),function(){Co=Co.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,Oo),document.removeEventListener("touchmove",d,Oo),document.removeEventListener("touchstart",h,Oo)}},[]);var x=e.removeScrollBar,k=e.inert;return y.createElement(y.Fragment,null,k?y.createElement(o,{styles:iR(i)}):null,x?y.createElement(YD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sR=RD(rA,oR);var lA=y.forwardRef(function(e,t){return y.createElement(Tf,kn({},e,{ref:t,sideCar:sR}))});lA.classNames=Tf.classNames;var uR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jo=new WeakMap,td=new WeakMap,rd={},_m=0,sA=function(e){return e&&(e.host||sA(e.parentNode))},cR=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=sA(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})},dR=function(e,t,r,n){var i=cR(t,Array.isArray(e)?e:[e]);rd[r]||(rd[r]=new WeakMap);var o=rd[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 x=v.getAttribute(n),k=x!==null&&x!=="false",S=(jo.get(v)||0)+1,E=(o.get(v)||0)+1;jo.set(v,S),o.set(v,E),s.push(v),S===1&&k&&td.set(v,!0),E===1&&v.setAttribute(r,"true"),k||v.setAttribute(n,"true")}catch(P){console.error("aria-hidden: cannot operate on ",v,P)}})};return h(t),u.clear(),_m++,function(){s.forEach(function(m){var v=jo.get(m)-1,x=o.get(m)-1;jo.set(m,v),o.set(m,x),v||(td.has(m)||m.removeAttribute(n),td.delete(m)),x||m.removeAttribute(r)}),_m--,_m||(jo=new WeakMap,jo=new WeakMap,td=new WeakMap,rd={})}},fR=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=uR(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),dR(n,i,r,"aria-hidden")):function(){return null}},Df="Dialog",[uA]=FT(Df),[hR,un]=uA(Df),cA=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]=KT({prop:n,defaultProp:i??!1,onChange:o,caller:Df});return b.jsx(hR,{scope:t,triggerRef:u,contentRef:d,contentId:Zn(),titleId:Zn(),descriptionId:Zn(),open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(m=>!m),[h]),modal:s,children:r})};cA.displayName=Df;var dA="DialogTrigger",pR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(dA,r),o=Xa(t,i.triggerRef);return b.jsx(Wt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Gg(i.open),...n,ref:o,onClick:Qi(e.onClick,i.onOpenToggle)})});pR.displayName=dA;var qg="DialogPortal",[mR,fA]=uA(qg,{forceMount:void 0}),hA=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=un(qg,t);return b.jsx(mR,{scope:t,forceMount:r,children:y.Children.map(n,s=>b.jsx(Mf,{present:r||o.open,children:b.jsx(JP,{asChild:!0,container:i,children:s})}))})};hA.displayName=qg;var Nd="DialogOverlay",pA=y.forwardRef((e,t)=>{const r=fA(Nd,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=un(Nd,e.__scopeDialog);return o.modal?b.jsx(Mf,{present:n||o.open,children:b.jsx(gR,{...i,ref:t})}):null});pA.displayName=Nd;var vR=GP("DialogOverlay.RemoveScroll"),gR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(Nd,r),o=dD(),s=Xa(t,o);return b.jsx(lA,{as:vR,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(Wt.div,{"data-state":Gg(i.open),...n,ref:s,style:{pointerEvents:"auto",...n.style}})})}),hl="DialogContent",mA=y.forwardRef((e,t)=>{const r=fA(hl,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=un(hl,e.__scopeDialog);return b.jsx(Mf,{present:n||o.open,children:o.modal?b.jsx(yR,{...i,ref:t}):b.jsx(xR,{...i,ref:t})})});mA.displayName=hl;var yR=y.forwardRef((e,t)=>{const r=un(hl,e.__scopeDialog),n=y.useRef(null),i=Xa(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return fR(o)},[]),b.jsx(vA,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Qi(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Qi(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&o.preventDefault()}),onFocusOutside:Qi(e.onFocusOutside,o=>o.preventDefault())})}),xR=y.forwardRef((e,t)=>{const r=un(hl,e.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return b.jsx(vA,{...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()}})}),vA=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,u=un(hl,r);return AD(),b.jsx(b.Fragment,{children:b.jsx(XP,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:b.jsx(YP,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Gg(u.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),gA="DialogTitle",bR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(gA,r);return b.jsx(Wt.h2,{id:i.titleId,...n,ref:t})});bR.displayName=gA;var yA="DialogDescription",wR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(yA,r);return b.jsx(Wt.p,{id:i.descriptionId,...n,ref:t})});wR.displayName=yA;var xA="DialogClose",SR=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(xA,r);return b.jsx(Wt.button,{type:"button",...n,ref:t,onClick:Qi(e.onClick,()=>i.onOpenChange(!1))})});SR.displayName=xA;function Gg(e){return e?"open":"closed"}var ks='[cmdk-group=""]',Nm='[cmdk-group-items=""]',kR='[cmdk-group-heading=""]',bA='[cmdk-item=""]',cw=`${bA}:not([aria-disabled="true"])`,Iv="cmdk-item-select",Fo="data-value",ER=(e,t,r)=>zT(e,t,r),wA=y.createContext(void 0),wu=()=>y.useContext(wA),SA=y.createContext(void 0),Yg=()=>y.useContext(SA),kA=y.createContext(void 0),EA=y.forwardRef((e,t)=>{let r=Bo(()=>{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=Bo(()=>new Set),i=Bo(()=>new Map),o=Bo(()=>new Map),s=Bo(()=>new Set),u=PA(e),{label:d,children:f,value:h,onValueChange:m,filter:v,shouldFilter:x,loop:k,disablePointerSelection:S=!1,vimBindings:E=!0,...P}=e,j=Zn(),_=Zn(),O=Zn(),N=y.useRef(null),C=DR();Ua(()=>{if(h!==void 0){let T=h.trim();r.current.value=T,R.emit()}},[h]),Ua(()=>{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:ER;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(Nm);ce?ce.appendChild(te.parentElement===ce?te:te.closest(`${Nm} > *`)):se.appendChild(te.parentElement===se?te:te.closest(`${Nm} > *`))}),Z.sort((te,ce)=>ce[1]-te[1]).forEach(te=>{var ce;let ge=(ce=N.current)==null?void 0:ce.querySelector(`${ks}[${Fo}="${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(Fo);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(ks))==null?void 0:Z.querySelector(kR))==null||se.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function G(){var T;return(T=N.current)==null?void 0:T.querySelector(`${bA}[aria-selected="true"]`)}function le(){var T;return Array.from(((T=N.current)==null?void 0:T.querySelectorAll(cw))||[])}function fe(T){let Z=le()[T];Z&&R.setState("value",Z.getAttribute(Fo))}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(Fo))}function Y(T){let Z=G(),se=Z==null?void 0:Z.closest(ks),te;for(;se&&!te;)se=T>0?MR(se,ks):TR(se,ks),te=se==null?void 0:se.querySelector(cw);te?R.setState("value",te.getAttribute(Fo)):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(Iv);te.dispatchEvent(ce)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:$R},d),Rf(e,T=>y.createElement(SA.Provider,{value:R},y.createElement(wA.Provider,{value:z},T))))}),PR=y.forwardRef((e,t)=>{var r,n;let i=Zn(),o=y.useRef(null),s=y.useContext(kA),u=wu(),d=PA(e),f=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:s==null?void 0:s.forceMount;Ua(()=>{if(!f)return u.item(i,s==null?void 0:s.id)},[f]);let h=AA(i,o,[e.value,e.children,o],e.keywords),m=Yg(),v=Ji(C=>C.value&&C.value===h.current),x=Ji(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(Iv,k),()=>C.removeEventListener(Iv,k)},[x,e.onSelect,e.disabled]);function k(){var C,R;S(),(R=(C=d.current).onSelect)==null||R.call(C,h.current)}function S(){m.setState("value",h.current,!0)}if(!x)return null;let{disabled:E,value:P,onSelect:j,forceMount:_,keywords:O,...N}=e;return y.createElement(Wt.div,{ref:fl(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:S,onClick:E?void 0:k},e.children)}),AR=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,s=Zn(),u=y.useRef(null),d=y.useRef(null),f=Zn(),h=wu(),m=Ji(x=>i||h.filter()===!1?!0:x.search?x.filtered.groups.has(s):!0);Ua(()=>h.group(s),[]),AA(s,u,[e.value,e.heading,d]);let v=y.useMemo(()=>({id:s,forceMount:i}),[i]);return y.createElement(Wt.div,{ref:fl(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),Rf(e,x=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?f:void 0},y.createElement(kA.Provider,{value:v},x))))}),OR=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=y.useRef(null),o=Ji(s=>!s.search);return!r&&!o?null:y.createElement(Wt.div,{ref:fl(i,t),...n,"cmdk-separator":"",role:"separator"})}),CR=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=Yg(),s=Ji(f=>f.search),u=Ji(f=>f.selectedItemId),d=wu();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)}})}),jR=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=y.useRef(null),s=y.useRef(null),u=Ji(f=>f.selectedItemId),d=wu();return y.useEffect(()=>{if(s.current&&o.current){let f=s.current,h=o.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let x=f.offsetHeight;h.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return v.observe(f),()=>{cancelAnimationFrame(m),v.unobserve(f)}}},[]),y.createElement(Wt.div,{ref:fl(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:d.listId},Rf(e,f=>y.createElement("div",{ref:fl(s,d.listInnerRef),"cmdk-list-sizer":""},f)))}),_R=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:s,...u}=e;return y.createElement(cA,{open:r,onOpenChange:n},y.createElement(hA,{container:s},y.createElement(pA,{"cmdk-overlay":"",className:i}),y.createElement(mA,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(EA,{ref:t,...u}))))}),NR=y.forwardRef((e,t)=>Ji(r=>r.filtered.count===0)?y.createElement(Wt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),IR=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},Rf(e,s=>y.createElement("div",{"aria-hidden":!0},s)))}),_o=Object.assign(EA,{List:jR,Item:PR,Input:CR,Group:AR,Separator:OR,Dialog:_R,Empty:NR,Loading:IR});function MR(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function TR(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function PA(e){let t=y.useRef(e);return Ua(()=>{t.current=e}),t}var Ua=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Bo(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Ji(e){let t=Yg(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function AA(e,t,r,n=[]){let i=y.useRef(),o=wu();return Ua(()=>{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(Fo,u),i.current=u}),i}var DR=()=>{let[e,t]=y.useState(),r=Bo(()=>new Map);return Ua(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function RR(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Rf({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(RR(t),{ref:t.ref},r(t.props.children)):r(t)}var $R={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function LR({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)},[]),b.jsx(_o.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:b.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:[b.jsx(_o.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"}),b.jsxs(_o.List,{className:"max-h-80 overflow-y-auto p-2",children:[b.jsx(_o.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),b.jsx(_o.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:qo.map(n=>b.jsxs(_o.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:[b.jsx(n.icon,{className:"h-4 w-4 text-primary"}),b.jsx("span",{children:n.label}),b.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const OA="mc_expert_mode",Mv="mc-expert-mode-change",zR=()=>{try{return localStorage.getItem(OA)==="true"}catch{return!1}};function FR(e){return window.addEventListener(Mv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(Mv,e),window.removeEventListener("storage",e)}}function dw(e){localStorage.setItem(OA,String(e)),window.dispatchEvent(new Event(Mv))}function BR(){return y.useSyncExternalStore(FR,zR,()=>!1)}function CA(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=HR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const u=s.split(Qg);return u[0]===""&&u.length!==1&&u.shift(),jA(u,t)||WR(s)},getConflictingClassGroupIds:(s,u)=>{const d=r[s]||[];return u&&n[s]?[...d,...n[s]]:d}}},jA=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?jA(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Qg);return(s=t.validators.find(({validator:u})=>u(o)))==null?void 0:s.classGroupId},fw=/^\[(.+)\]$/,WR=e=>{if(fw.test(e)){const t=fw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},HR=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return VR(Object.entries(e.classGroups),r).forEach(([o,s])=>{Tv(s,n,o,t)}),n},Tv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:hw(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(KR(i)){Tv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,s])=>{Tv(s,hw(t,o),r,n)})})},hw=(e,t)=>{let r=e;return t.split(Qg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},KR=e=>e.isThemeGetter,VR=(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,qR=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)}}},_A="!",GR=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:x,baseClassName:k,maybePostfixModifierPosition:S}};return r?u=>r({className:u,parseClassName:s}):s},YR=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},QR=e=>({cache:qR(e.cacheSize),parseClassName:GR(e),...UR(e)}),XR=/\s+/,ZR=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(XR);let u="";for(let d=s.length-1;d>=0;d-=1){const f=s[d],{modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:x}=r(f);let k=!!x,S=n(k?v.substring(0,x):v);if(!S){if(!k){u=f+(u.length>0?" "+u:u);continue}if(S=n(v),!S){u=f+(u.length>0?" "+u:u);continue}k=!1}const E=YR(h).join(":"),P=m?E+_A:E,j=P+S;if(o.includes(j))continue;o.push(j);const _=i(S,k);for(let O=0;O<_.length;++O){const N=_[O];o.push(P+N)}u=f+(u.length>0?" "+u:u)}return u};function JR(){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=QR(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=ZR(d,r);return i(d,h),h}return function(){return o(JR.apply(null,arguments))}}const tt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},IA=/^\[(?:([a-z-]+):)?(.+)\]$/i,t3=/^\d+\/\d+$/,r3=new Set(["px","full","screen"]),n3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,i3=/\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$/,a3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,o3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wn=e=>Yo(e)||r3.has(e)||t3.test(e),Ii=e=>El(e,"length",m3),Yo=e=>!!e&&!Number.isNaN(Number(e)),Im=e=>El(e,"number",Yo),Es=e=>!!e&&Number.isInteger(Number(e)),s3=e=>e.endsWith("%")&&Yo(e.slice(0,-1)),Te=e=>IA.test(e),Mi=e=>n3.test(e),u3=new Set(["length","size","percentage"]),c3=e=>El(e,u3,MA),d3=e=>El(e,"position",MA),f3=new Set(["image","url"]),h3=e=>El(e,f3,g3),p3=e=>El(e,"",v3),Ps=()=>!0,El=(e,t,r)=>{const n=IA.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},m3=e=>i3.test(e)&&!a3.test(e),MA=()=>!1,v3=e=>o3.test(e),g3=e=>l3.test(e),y3=()=>{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"),x=tt("gradientColorStops"),k=tt("gradientColorStopPositions"),S=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=()=>["",Wn,Ii],G=()=>["auto",Yo,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=()=>[Yo,Te];return{cacheSize:500,separator:":",theme:{colors:[Ps],spacing:[Wn,Ii],blur:["none","",Mi,Te],brightness:M(),borderColor:[e],borderRadius:["none","","full",Mi,Te],borderSpacing:B(),borderWidth:ue(),contrast:M(),grayscale:ae(),hueRotate:M(),invert:ae(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[s3,Ii],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:[Mi]}],"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:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Es,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",Es,Te]}],"grid-cols":[{"grid-cols":[Ps]}],"col-start-end":[{col:["auto",{span:["full",Es,Te]},Te]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Ps]}],"row-start-end":[{row:["auto",{span:[Es,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:[Mi]},Mi]}],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",Mi,Ii]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Im]}],"font-family":[{font:[Ps]}],"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",Yo,Im]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wn,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",Wn,Ii]}],"underline-offset":[{"underline-offset":["auto",Wn,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(),d3]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",c3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},h3]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],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":[Wn,Te]}],"outline-w":[{outline:[Wn,Ii]}],"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":[Wn,Ii]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Mi,p3]}],"shadow-color":[{shadow:[Ps]}],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",Mi,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:[Es,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:[Wn,Ii,Im]}],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"]}}},x3=e3(y3);function Re(...e){return x3(Xe(e))}function BQ(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function b3(){const e=BR();return b.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:[b.jsxs("button",{onClick:()=>dw(!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:[b.jsx(VP,{className:"h-3.5 w-3.5"})," Einfach"]}),b.jsxs("button",{onClick:()=>dw(!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:[b.jsx(AT,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function Me(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 UQ=(e,t,r=!1,n=!0)=>Me("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),WQ=e=>Me("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)});function w3({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:s,onCancel:u}){const d=y.useRef(null);return b.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:b.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:[b.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),b.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:b.jsx(bu,{className:"h-4 w-4","aria-hidden":"true"})})]}),b.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"&&b.jsxs("div",{className:"flex gap-2",children:[b.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&&b.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"})]}),b.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&b.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"}),b.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 Xg(){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:x=>{t(null),h(x)},onCancel:()=>{t(null),m==null||m()}})},[]),s=e?b.jsx(w3,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:s}}let Sd=!1;const S3=()=>Sd;function k3(){const e=xu();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"]},Zt={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},Su=e=>()=>S3()?e*5:e,E3=(e=Zt.schnell)=>Ye({queryKey:De.auftragsbuch,queryFn:()=>Me("/api/auftragsbuch"),refetchInterval:Su(e)}),P3=(e=Zt.gemuetlich)=>Ye({queryKey:De.ideen,queryFn:()=>Me("/api/ideen"),refetchInterval:Su(e)}),HQ=(e,t=!1)=>Ye({queryKey:["ideen-log",e],queryFn:()=>Me(`/api/ideen/${e}/log`),enabled:t,refetchInterval:4e3,staleTime:0}),A3=(e=150,t=Zt.gemuetlich)=>Ye({queryKey:[...De.chronik,e],queryFn:()=>Me(`/api/chronik?limit=${e}`),refetchInterval:Su(t),select:r=>r.items??[]}),KQ=()=>Ye({queryKey:De.wissen,queryFn:()=>Me("/api/wissen")}),VQ=(e=Zt.traege)=>Ye({queryKey:De.eigenleben,queryFn:()=>Me("/api/eigenleben"),refetchInterval:e}),O3=(e=Zt.traege,t=!0)=>Ye({queryKey:De.zeitmaschine,queryFn:()=>Me("/api/zeitmaschine"),refetchInterval:e,enabled:t}),C3=(e=Zt.traege)=>Ye({queryKey:De.reminders,queryFn:()=>Me("/api/reminders"),refetchInterval:Su(e),select:t=>t.items??[]}),j3=(e=12,t=Zt.schnell)=>Ye({queryKey:De.voiceTrace,queryFn:()=>Me(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),qQ=(e=!0)=>Ye({queryKey:De.memoryGraph,queryFn:()=>Me("/api/memory/graph"),enabled:e}),TA=()=>Ye({queryKey:De.health,queryFn:()=>Me("/api/health"),refetchInterval:Zt.normal}),$f=(e=Zt.graph)=>Ye({queryKey:De.systemStatus,queryFn:()=>Me("/api/system/status"),refetchInterval:e}),DA=(e,t=!0)=>Ye({queryKey:["metrics-history",e],queryFn:()=>Me(`/api/system/history?minutes=${e}`),enabled:t,refetchInterval:6e4}),Zg=(e=Zt.normal)=>Ye({queryKey:De.services,queryFn:()=>Me("/api/system/services"),refetchInterval:e}),RA=(e=Zt.schnell)=>Ye({queryKey:De.models,queryFn:()=>Me("/api/models"),refetchInterval:Su(e)}),GQ=(e=Zt.normal)=>Ye({queryKey:De.groups,queryFn:()=>Me("/api/groups"),refetchInterval:e}),YQ=()=>Ye({queryKey:De.routingPolicy,queryFn:()=>Me("/api/routing/policy")}),_3=(e=3e3,t=!0)=>Ye({queryKey:De.jobs,queryFn:()=>Me("/api/jobs"),refetchInterval:e,enabled:t,select:r=>r.jobs??[]}),$A=(e=Zt.graph)=>Ye({queryKey:De.tokenStats,queryFn:()=>Me("/api/system/token-stats"),refetchInterval:e}),N3=(e=Zt.normal)=>Ye({queryKey:De.agentStatus,queryFn:()=>Me("/api/agent/status"),refetchInterval:e}),QQ=(e=Zt.traege)=>Ye({queryKey:De.hermesBrain,queryFn:()=>Me("/api/agent/brain"),refetchInterval:e}),LA=(e=Zt.traege)=>Ye({queryKey:De.updates,queryFn:()=>Me("/api/maintenance/updates"),refetchInterval:e}),XQ=()=>Ye({queryKey:De.discover,queryFn:()=>Me("/api/discover")}),ZQ=e=>Ye({queryKey:De.drafts(e),queryFn:()=>Me(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),JQ=e=>Ye({queryKey:De.connect(e),queryFn:()=>Me(e?`/api/connect?${e}`:"/api/connect")}),I3=()=>Ye({queryKey:De.connectHealth,queryFn:()=>Me("/api/connect/health"),refetchInterval:15e3}),M3=e=>Ye({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),Me(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function As(e,...t){for(const r of t)e.invalidateQueries({queryKey:r})}function No(e){return(e/1024**3).toFixed(1)}function Mm(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function eX(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function tX(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function rX(e){return e?`${Math.round(e/1024)}k`:"—"}function nX(e){return e?new Date(e*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function Os({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:s,onAction:u}){return b.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:[b.jsx(e,{className:Re("h-4 w-4 shrink-0",t)}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-xs text-foreground truncate",children:r}),b.jsx("div",{className:Re("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),b.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 T3({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return b.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[b.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")}),b.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&b.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),b.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:b.jsx(Vo,{className:Re("h-3.5 w-3.5",n&&"animate-spin")})}),b.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:b.jsx(uT,{className:"h-3.5 w-3.5"})})]})}const D3=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,R3=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function $3(e){return D3.test(e)?"error":R3.test(e)?"warn":"info"}const L3={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function z3({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:$3(E)})):[],[t]),v=y.useMemo(()=>m.filter(E=>E.level!=="info").length,[m]),x=d.trim().toLowerCase(),k=m.filter(E=>(!s||E.level!=="info")&&(!x||E.t.toLowerCase().includes(x))),S=n==="password_required"||n==="incorrect_password";return b.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:[b.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:[b.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[b.jsx(CT,{className:"h-3 w-3 text-primary"}),b.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsxs("div",{className:"relative",children:[b.jsx(ET,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),b.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"})]}),b.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:[b.jsx(Gs,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),b.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:b.jsx(Vo,{className:Re("h-3 w-3",r&&"animate-spin")})})]})]}),b.jsx("div",{ref:h,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:S?b.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[b.jsx(Gs,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),b.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."}),b.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."]}),b.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?b.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):m.length===0?b.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):k.length===0?b.jsx("span",{className:"text-muted-foreground",children:s?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):k.map((E,P)=>b.jsx("div",{className:Re("whitespace-pre-wrap",L3[E.level]),children:E.t||" "},P))})]})}function F3({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]),b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),b.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."})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[b.jsx(Kg,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),b.jsxs("div",{className:"relative",children:[b.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"}),b.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?b.jsx(H1,{className:"h-4 w-4","aria-hidden":"true"}):b.jsx(Cv,{className:"h-4 w-4","aria-hidden":"true"})})]}),b.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."})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[b.jsx(mT,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),b.jsxs("div",{className:"relative",children:[b.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"}),b.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?b.jsx(H1,{className:"h-4 w-4","aria-hidden":"true"}):b.jsx(Cv,{className:"h-4 w-4","aria-hidden":"true"})})]}),b.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."})]}),b.jsxs("div",{className:"flex gap-3 pt-2",children:[b.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"}),b.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 B3({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var d,f;const i=e.data,o={os:{icon:Kg,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:Nf,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:KP,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:jf,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 b.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[b.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),b.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:[b.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(s,{className:Re("h-4.5 w-4.5",o.cls)}),b.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),b.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:b.jsx(bu,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?b.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[b.jsx(Vo,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?b.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):b.jsxs(b.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&b.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?b.jsx(Gs,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):b.jsx(iT,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),b.jsxs("div",{className:"min-w-0",children:[b.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&&b.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&b.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[b.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),b.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?b.jsxs(b.Fragment,{children:[((i==null?void 0:i.count)??0)===0?b.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),b.jsx("div",{className:"space-y-1",children:i.packages.map(h=>b.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:[b.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[b.jsx(K1,{className:"h-3 w-3 text-cyan-400 shrink-0"}),h.name]}),b.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[b.jsx("span",{children:h.current}),b.jsx(W1,{className:"h-3 w-3"}),b.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&&b.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[b.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[b.jsx(aT,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),b.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."}),b.jsx("div",{className:"space-y-1",children:i.held_back.map(h=>b.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:[b.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[b.jsx(K1,{className:"h-3 w-3 text-muted-foreground shrink-0"}),h.name]}),b.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"?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[b.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)??"?"]}),b.jsx(W1,{className:"h-3.5 w-3.5 text-muted-foreground"}),b.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))&&b.jsxs("div",{className:"text-muted-foreground",children:["Release: ",b.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)&&b.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 ",b.jsx(sT,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&b.jsxs("details",{className:"group",children:[b.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),b.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?b.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",b.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),b.jsx("div",{className:"space-y-1",children:i.commits.map(h=>b.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[b.jsx(dT,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-[11px] truncate",children:h.subject}),b.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[h.hash," · ",h.when]})]})]},h.hash))})]}),e.kind!=="os"&&!u&&b.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[b.jsx(PT,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),b.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":"","."]})]})]})}),b.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[b.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"}),b.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 U3({open:e,onClose:t,defaultTab:r="maintenance"}){var lr,fi;const n=xu(),{showAlert:i,showConfirm:o,dialogElement:s}=Xg(),{data:u}=LA(),{data:d}=Zg(),f=_3(3e3,e).data??[],{data:h}=O3(void 0,e),[m,v]=y.useState("llama-swap"),[x,k]=y.useState(""),[S,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=()=>As(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&&As(n,De.updates,De.services,De.jobs,De.zeitmaschine)},[e]);function X(q){E(!0),j(null),Me(`/api/maintenance/logs?service=${q}&lines=150`).then(Ie=>{Ie.ok?k(Ie.text):(k(`Fehler beim Laden der Logs: ${Ie.err||"Unbekannter Fehler"}`),(Ie.status==="incorrect_password"||Ie.status==="password_required")&&j(Ie.status))}).catch(Ie=>k(`Fehler: ${Ie.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 Ie={os:"os-update",engine:"engine-update",swap:"swap-update"}[q];try{const Ze=await Me(`/api/maintenance/${Ie}`,{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 Me("/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 Ie=await Me(`/api/maintenance/update-details?kind=${q}`);fe({kind:q,loading:!1,data:Ie})}catch(Ie){fe({kind:q,loading:!1,data:{kind:q,error:Ie.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 Ie;const q=[u!=null&&u.engine?"Engine":null,u!=null&&u.swap?"Router":null,(Ie=u==null?void 0:u.components)!=null&&Ie.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 Me("/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 Me("/api/maintenance/check-updates",{method:"POST"}),As(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,Ie){try{await Me("/api/models/install",{method:"POST",body:JSON.stringify({repo:q,role:Ie})}),i("Gestartet",`Modell-Upgrade für '${Ie}' (${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 Me("/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 Me("/api/system/backup",{method:"POST"});V(q.ok?`Snapshot erzeugt: ${q.snapshot} (${q.files.length} Komponenten)`:"Backup fehlgeschlagen."),As(n,De.zeitmaschine)}catch(q){V(`Fehler: ${q.message}`)}finally{B(!1)}}async function ne(q){O(Ie=>({...Ie,[q]:!0}));try{const Ie=await Me("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:q})});Ie.ok?(i("Dienst neu gestartet",`Dienst ${q} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&m===q&&X(q)}),As(n,De.services,De.health,De.models)):i("Fehler",`Fehler beim Neustart: ${Ie.err||"Unbekannter Fehler"}`)}catch(Ie){i("Fehler",`Fehler beim Neustart: ${Ie.message}`)}finally{O(Ie=>({...Ie,[q]:!1}))}}async function lt(q){try{await Me(`/api/jobs/${q}/cancel`,{method:"POST"}),Y()}catch(Ie){i("Fehler",`Fehler beim Abbrechen: ${Ie.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 b.jsxs(b.Fragment,{children:[b.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}),b.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:[b.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(HP,{className:"h-4.5 w-4.5 text-primary"}),b.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),b.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:b.jsx(bu,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"flex border-b border-border/40 px-6",children:["maintenance","logs","settings"].map(q=>b.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))}),b.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"space-y-2.5",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),b.jsxs("div",{className:"flex items-center gap-3",children:[Pe>0&&b.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:[b.jsx(oT,{className:"h-3 w-3"})," Alle aktualisieren (",Pe,")"]}),b.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:[b.jsx(Vo,{className:Re("h-3 w-3",R&&"animate-spin")})," Nach Updates suchen"]})]})]}),(u==null?void 0:u.last_check)&&b.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",ae(u.last_check)]}),$e&&b.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:[b.jsx(Vo,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),b.jsxs("span",{children:["Update läuft: ",b.jsx("span",{className:"font-semibold",children:$e.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),b.jsxs("div",{className:"space-y-1.5",children:[b.jsx(Os,{icon:Kg,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")}),b.jsx(Os,{icon:Nf,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")}),b.jsx(Os,{icon:KP,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 Ie;const q=(Ie=u==null?void 0:u.components)==null?void 0:Ie.find(Ze=>Ze.key==="hermes_agent");return b.jsx(Os,{icon:jf,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")})})(),(fi=u==null?void 0:u.model_list)==null?void 0:fi.map(q=>b.jsx(Os,{icon:JM,iconClass:"text-emerald-400",name:`Modell · ${q.role}`,available:!0,status:q.title,actionLabel:"Upgrade",onAction:()=>J(q.repo,q.role)},q.role))]})]}),b.jsxs("div",{className:"space-y-2.5",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),b.jsxs("div",{className:"space-y-1.5",children:[de.length===0&&b.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=>b.jsx(T3,{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))]})]}),b.jsxs("div",{className:"space-y-2.5",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),b.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-xs text-foreground truncate",children:vt[0]?`Letztes: ${vt[0].snapshot}`:"Noch kein Backup"}),b.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[vt.length," Snapshots · Wiederherstellen: Chronik → Zeitmaschine"]})]}),b.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:[b.jsx(eT,{className:Re("h-3.5 w-3.5",Q&&"animate-pulse")})," Snapshot"]})]}),F&&b.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})]}),b.jsxs("div",{className:"space-y-2.5",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),b.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:[b.jsx(ST,{className:"h-4.5 w-4.5"}),b.jsxs("div",{children:[b.jsx("div",{children:"Host-System neu starten"}),b.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),b.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"]})]}),b.jsx("div",{className:"space-y-3",children:f.length===0?b.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 Ie=q.state==="running"||q.state==="queued";return b.jsxs("div",{className:Re("p-3 rounded-xl border transition-all duration-300",Ie?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[b.jsxs("div",{className:"flex items-start justify-between gap-3",children:[b.jsxs("div",{className:"space-y-1",children:[b.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Ie&&b.jsxs("span",{className:"flex h-2 w-2 relative",children:[b.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),b.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),q.label]}),b.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[b.jsxs("span",{children:["ID: ",q.id]}),b.jsx("span",{children:"•"}),b.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})]})]}),Ie&&b.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"&&b.jsxs("div",{className:"mt-3 space-y-1",children:[b.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:b.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${q.progress??0}%`}})}),b.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[b.jsxs("span",{children:[q.progress??0,"%"]}),q.done_bytes!=null&&q.total_bytes!=null&&b.jsxs("span",{children:[Mm(q.done_bytes)," / ",Mm(q.total_bytes),q.rate_bps!=null&&` (${Mm(q.rate_bps)}/s)`]}),q.eta_s!=null&&b.jsxs("span",{children:["ETA: ",q.eta_s,"s"]})]})]})]},q.id)})})]})]}),N==="logs"&&b.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.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=>b.jsxs("option",{value:q.unit,children:[q.name," (",q.scope==="system"?"systemd-root":"user",")"]},q.unit))}),b.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:[b.jsx(Vo,{className:Re("h-3.5 w-3.5",_[m]&&"animate-spin")}),"Restart"]})]}),b.jsx(z3,{service:m,text:x,loading:S,logStatus:P,onRefresh:()=>X(m),onOpenSettings:()=>C("settings")})]}),N==="settings"&&b.jsx(F3,{open:e,showAlert:i})]})]}),le&&b.jsx(B3,{detail:le,maintenanceJob:$e,onClose:()=>fe(null),onApply:ce}),s]})}let Dv=[],Rv=[];const $v=new Set,zA=()=>$v.forEach(e=>e());function FA(e){return $v.add(e),()=>{$v.delete(e)}}function W3(e){Dv=[...Dv,e].slice(-40),zA()}function H3(e){Rv=[...Rv,e].slice(-40),zA()}const K3=()=>y.useSyncExternalStore(FA,()=>Dv),V3=()=>y.useSyncExternalStore(FA,()=>Rv);function q3(){const{data:e,dataUpdatedAt:t}=$f(),{data:r,dataUpdatedAt:n}=$A(),i=y.useRef(null);y.useEffect(()=>{var o,s,u,d;e&&W3({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);H3({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 G3(){var z,F,V,Q,B,ue;const{data:e,isError:t}=TA(),{data:r,isError:n}=Zg(),{data:i}=RA(),{data:o}=$f(),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)||"",x=[];s&&x.push({id:"mc2",label:"Steuerpult (MC2)",icon:Nf,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),x.push((()=>{const G={id:"brain",label:"Lucys Hirn",icon:Bg,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 …"}})()),x.push((()=>{const G={id:"vision",label:"Lucys Augen",icon:Cv,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."}})()),x.push((()=>{const G={id:"memory",label:"Lucys Gedächtnis",icon:ZM,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"}}})()),x.push((()=>{const G={id:"gateway",label:"Verbindung (Gateway)",icon:Wg,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"}}})()),x.push((()=>{const G={id:"steward",label:"Wächter (Steward)",icon:Hg,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 …"}})()),x.push((()=>{const G={id:"agent",label:"Lucys Agent (Hermes)",icon:jf,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"}}})()),x.push((()=>{const G={id:"voice",label:"Lucys Stimme",icon:bT,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 k=((Q=o==null?void 0:o.ram)==null?void 0:Q.total)??0,S=((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)??(k>0?Math.min(100,S/k*100):0),P=1024**3,j=k?E>=93?{status:"full",usedGb:S/P,totalGb:k/P,pct:E,text:"Speicher fast voll — Lucy könnte langsamer werden."}:E>=85?{status:"warn",usedGb:S/P,totalGb:k/P,pct:E,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:S/P,totalGb:k/P,pct:E,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},_=x.some(G=>G.status==="loading"),O=x.filter(G=>G.critical&&G.status==="down"),N=x.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:x,memory:j,problems:O,warns:N,unreachable:s}}const Y3={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},Q3={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 Io({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:s}){return b.jsxs("button",{onClick:s,className:Re("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",Q3[i]),children:[b.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[b.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:b.jsx(e,{className:"h-5 w-5"})}),b.jsx("span",{className:Re("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",Y3[i]),title:o})]}),b.jsxs("div",{className:"flex items-baseline gap-1.5",children:[b.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&b.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),b.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[b.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),b.jsx(Ko,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&b.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function X3(){var s;const{data:e=[]}=A3(),[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 b.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:[b.jsxs("button",{onClick:()=>r(u=>!u),className:"flex w-full items-center gap-3 text-left cursor-pointer",children:[b.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:b.jsx(wT,{className:"h-4.5 w-4.5"})}),b.jsxs("span",{className:"min-w-0 flex-1",children:[b.jsx("span",{className:"block text-sm font-bold text-foreground",children:"Morgenlage"}),b.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o||n.subject||"Nächtliches Gutachten über die autonome Arbeit"})]}),b.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:i}),t?b.jsx(rT,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):b.jsx(Ko,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),t&&b.jsxs("div",{className:"mt-3 border-t border-violet-500/15 pt-3",children:[n.subject&&b.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n.subject}),b.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:n.text})]})]})}const pw={"":"einmalig",daily:"täglich",weekdays:"werktags",weekly:"wöchentlich"};function Z3(){const{data:e=[],isLoading:t}=C3(),r=xu(),{showAlert:n,showConfirm:i,dialogElement:o}=Xg(),[s,u]=y.useState(!1),[d,f]=y.useState(""),[h,m]=y.useState(""),[v,x]=y.useState(""),[k,S]=y.useState(!1),E=()=>r.invalidateQueries({queryKey:De.reminders});async function P(){if(!(!d.trim()||!h)){S(!0);try{await Me("/api/reminders",{method:"POST",body:JSON.stringify({text:d,when:h,repeat:v})}),f(""),m(""),x(""),u(!1),E()}catch(O){n("Anlegen fehlgeschlagen",String((O==null?void 0:O.message)||O))}finally{S(!1)}}}function j(O,N){i("Erinnerung löschen?",`„${N}" wird entfernt.`,async()=>{try{await Me(`/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 b.jsxs("div",{className:"mc-card p-4",children:[b.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[b.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[b.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:b.jsx(XM,{className:"h-4 w-4"})}),"Anstehendes"]}),b.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?b.jsx(bu,{className:"h-3.5 w-3.5"}):b.jsx(V1,{className:"h-3.5 w-3.5"})," ",s?"Abbrechen":"Neu"]})]}),s&&b.jsxs("div",{className:"mb-3 space-y-2 rounded-xl border border-border/50 bg-background/30 p-3",children:[b.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"}),b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.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]"}),b.jsx("select",{value:v,onChange:O=>x(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(pw).map(([O,N])=>b.jsx("option",{value:O,className:"bg-popover",children:N},O))}),b.jsxs("button",{onClick:P,disabled:k||!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:[k?b.jsx(_f,{className:"h-3.5 w-3.5 animate-spin"}):b.jsx(V1,{className:"h-3.5 w-3.5"})," Anlegen"]})]})]}),t?b.jsx("p",{className:"text-xs text-muted-foreground",children:"Wird geladen …"}):_.length===0?b.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Erinnerungen. Lucy sagt dir hier (und per Stimme) Bescheid, wenn etwas ansteht."}):b.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:b.jsx(jT,{className:"h-3.5 w-3.5"})})]},O.id)}),_.length>6&&b.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["+",_.length-6," weitere"]})]}),o]})}function J3(){const{data:e,error:t}=$f(),r=K3();return{sys:e,hist:r,error:t}}var e5=["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 Jg(e){if(typeof e!="string")return!1;var t=e5;return t.includes(e)}var t5=["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"],r5=new Set(t5);function BA(e){return typeof e!="string"?!1:r5.has(e)}function UA(e){return typeof e=="string"&&e.startsWith("data-")}function on(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(BA(r)||UA(r))&&(t[r]=e[r]);return t}function Lf(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return on(t)}return typeof e=="object"&&!Array.isArray(e)?on(e):null}function Br(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(BA(r)||UA(r)||Jg(r))&&(t[r]=e[r]);return t}function n5(e){return e==null?null:y.isValidElement(e)?Br(e.props):typeof e=="object"&&!Array.isArray(e)?Br(e):null}var i5=["children","width","height","viewBox","className","style","title","desc"];function Lv(){return Lv=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=a5(e,i5),m=o||{width:n,height:i,x:0,y:0},v=Xe("recharts-surface",s);return y.createElement("svg",Lv({},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)}),l5=["children","className"];function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=s5(e,l5),o=Xe("recharts-layer",n);return y.createElement("g",zv({className:o},Br(i),{ref:t}),r)}),c5=y.createContext(null);function ft(e){return function(){return e}}const Fv=Math.PI,Bv=2*Fv,ba=1e-6,d5=Bv-ba;function HA(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return HA;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;iba)if(!(Math.abs(m*d-f*h)>ba)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-s,k=i-u,S=d*d+f*f,E=x*x+k*k,P=Math.sqrt(S),j=Math.sqrt(v),_=o*Math.tan((Fv-Math.acos((S+v-E)/(2*P*j)))/2),O=_/j,N=_/P;Math.abs(O-1)>ba&&this._append`L${t+O*h},${r+O*m}`,this._append`A${o},${o},0,0,${+(m*x>h*k)},${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)>ba||Math.abs(this._y1-h)>ba)&&this._append`L${f},${h}`,n&&(v<0&&(v=v%Bv+Bv),v>d5?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>ba&&this._append`A${n},${n},0,${+(v>=Fv)},${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 KA(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 h5(t)}function ey(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VA(e){this._context=e}VA.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 zf(e){return new VA(e)}function qA(e){return e[0]}function GA(e){return e[1]}function YA(e,t){var r=ft(!0),n=null,i=zf,o=null,s=KA(u);e=typeof e=="function"?e:e===void 0?qA:ft(e),t=typeof t=="function"?t:t===void 0?GA:ft(t);function u(d){var f,h=(d=ey(d)).length,m,v=!1,x;for(n==null&&(o=i(x=s())),f=0;f<=h;++f)!(f=x;--k)u.point(_[k],O[k]);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 YA().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 QA{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 p5(e){return new QA(e,!0)}function m5(e){return new QA(e,!1)}function Id(){}function Md(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 XA(e){this._context=e}XA.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:Md(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:Md(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function v5(e){return new XA(e)}function ZA(e){this._context=e}ZA.prototype={areaStart:Id,areaEnd:Id,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:Md(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function g5(e){return new ZA(e)}function JA(e){this._context=e}JA.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:Md(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function y5(e){return new JA(e)}function e2(e){this._context=e}e2.prototype={areaStart:Id,areaEnd:Id,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 x5(e){return new e2(e)}function mw(e){return e<0?-1:1}function vw(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(mw(o)+mw(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(u))||0}function gw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Tm(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 Td(e){this._context=e}Td.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:Tm(this,this._t0,gw(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,Tm(this,gw(this,r=vw(this,e,t)),r);break;default:Tm(this,this._t0,r=vw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function t2(e){this._context=new r2(e)}(t2.prototype=Object.create(Td.prototype)).point=function(e,t){Td.prototype.point.call(this,t,e)};function r2(e){this._context=e}r2.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 b5(e){return new Td(e)}function w5(e){return new t2(e)}function n2(e){this._context=e}n2.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=yw(e),i=yw(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 k5(e){return new Ff(e,.5)}function E5(e){return new Ff(e,0)}function P5(e){return new Ff(e,1)}function Wa(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 A5(e,t){return e[t]}function O5(e){const t=[];return t.key=e,t}function C5(){var e=ft([]),t=Uv,r=Wa,n=A5;function i(o){var s=Array.from(e.apply(this,arguments),O5),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]:M5,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+Gi(u)+o:i+o},"")}var Lr=e=>e===0?0:e>0?1:-1,Cn=e=>typeof e=="number"&&e!=+e,Ha=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,be=e=>(typeof e=="number"||e instanceof Number)&&!Cn(e),jn=e=>be(e)||typeof e=="string",T5=0,Xs=e=>{var t=++T5;return"".concat(e||"").concat(t)},ea=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(Ha(t)){if(r==null)return n;var s=t.indexOf("%");o=r*parseFloat(t.slice(0,s))/100}else o=+t;return Cn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},o2=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Za(n,t))===r)}var Ut=e=>e===null||typeof e>"u",ny=e=>Ut(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function vr(e){return e!=null}function Pl(){}var s2=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,iy=(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=>{Jg(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},D5=(e,t,r)=>n=>(e(t,r,n),null),R5=(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];Jg(i)&&typeof o=="function"&&(n||(n={}),n[i]=D5(o,t,r))}),n};function xw(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 $5(e){for(var t=1;t(s[u]===void 0&&n[u]!==void 0&&(s[u]=n[u]),s),r);return o}function B5(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function ay(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const V5="[object RegExp]",c2="[object String]",d2="[object Number]",f2="[object Boolean]",h2="[object Arguments]",q5="[object Symbol]",G5="[object Date]",Y5="[object Map]",Q5="[object Set]",X5="[object Array]",Z5="[object ArrayBuffer]",J5="[object Object]",e$="[object DataView]",t$="[object Uint8Array]",r$="[object Uint8ClampedArray]",n$="[object Uint16Array]",i$="[object Uint32Array]",a$="[object Int8Array]",o$="[object Int16Array]",l$="[object Int32Array]",s$="[object Float32Array]",u$="[object Float64Array]",bw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function c$(e){return typeof bw.Buffer<"u"&&bw.Buffer.isBuffer(e)}function d$(e,t){return Ea(e,void 0,e,new Map,t)}function Ea(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(Hv(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{}):Kv(e,t,function n(i,o,s,u,d,f){const h=r(i,o,s,u,d,f);return h!==void 0?!!h:Kv(i,o,n,f,!1)},new Map,!0)}function Kv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return p$(e,t,r,n);case"function":return Object.keys(t).length>0?Kv(e,{...t},r,n,i):kd(e,t);default:return p2(e)&&i?typeof t=="string"?t==="":!0:kd(e,t)}}function p$(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return v2(e,t,r,n);if(t instanceof Map)return m$(e,t,r,n);if(t instanceof Set)return v$(e,t,r,n);const i=Object.keys(t);if(e==null||Hv(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 g$(e){return e=h$(e),t=>g2(t,e)}function y$(e,t){return d$(e,(r,n,i,o)=>{if(typeof e=="object"){if(ay(e)==="[object Object]"&&typeof e.constructor!="function"){const s={};return o.set(e,s),en(s,e,i,o),s}switch(Object.prototype.toString.call(e)){case d2:case c2:case f2:{const s=new e.constructor(e==null?void 0:e.valueOf());return en(s,e),s}case h2:{const s={};return en(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}function x$(e){return y$(e)}const b$=/^(?:0|[1-9]\d*)$/;function y2(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function x2(e){return e!=null&&typeof e!="function"&&P$(e.length)}function A$(e){return typeof e=="object"&&e!==null}function O$(e){return A$(e)&&x2(e)}function ww(e,t=u2){return O$(e)?B5(Array.from(e),U5(E$(t),1)):[]}function C$(e,t,r){return t===!0?ww(e,r):typeof t=="function"?ww(e,t):e}var Dm={exports:{}},Rm={},$m={exports:{}},Lm={};/** + * @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 Sw;function j$(){if(Sw)return Lm;Sw=1;var e=kl();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 x=v(),k=n({inst:{value:x,getSnapshot:v}}),S=k[0].inst,E=k[1];return o(function(){S.value=x,S.getSnapshot=v,d(S)&&E({inst:S})},[m,x,v]),i(function(){return d(S)&&E({inst:S}),m(function(){d(S)&&E({inst:S})})},[m]),s(x),x}function d(m){var v=m.getSnapshot;m=m.value;try{var x=v();return!r(m,x)}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 Lm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Lm}var kw;function _$(){return kw||(kw=1,$m.exports=j$()),$m.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 Ew;function N$(){if(Ew)return Rm;Ew=1;var e=kl(),t=_$();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 Rm.useSyncExternalStoreWithSelector=function(f,h,m,v,x){var k=o(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=u(function(){function P(C){if(!j){if(j=!0,_=C,C=v(C),x!==void 0&&S.hasValue){var R=S.value;if(x(R,C))return O=R}return O=C}if(R=O,n(_,C))return R;var z=v(C);return x!==void 0&&x(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,x]);var E=i(f,k[0],k[1]);return s(function(){S.hasValue=!0,S.value=E},[E]),d(E),E},Rm}var Pw;function I$(){return Pw||(Pw=1,Dm.exports=N$()),Dm.exports}var M$=I$(),oy=y.createContext(null),T$=e=>e,xt=()=>{var e=y.useContext(oy);return e?e.store.dispatch:T$},Ed=()=>{},D$=()=>Ed,R$=(e,t)=>e===t;function Ee(e){var t=y.useContext(oy),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Ed,[t,e]);return M$.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:D$,t?t.store.getState:Ed,t?t.store.getState:Ed,r,R$)}function $$(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function L$(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 Aw=e=>Array.isArray(e)?e:[e];function z$(e){const t=Array.isArray(e[0])?e[0]:e;return L$(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function F$(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?B$:WeakRef,b2=U$(),W$=0,Ow=1;function id(){return{s:W$,v:void 0,o:null,p:null}}function H$(e){return e instanceof b2?e.deref():e}function w2(e,t={}){let r=id();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=id(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function K$(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()),$$(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...r,...d},{memoize:m,memoizeOptions:v=[],argsMemoize:x=w2,argsMemoizeOptions:k=[]}=h,S=Aw(v),E=Aw(k),P=z$(i),j=m(function(){return o++,f.apply(null,arguments)},...S),_=x(function(){s++;const N=F$(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:x})};return Object.assign(n,{withTypes:()=>n}),n}var H=K$(w2);function V$(e,t=1){const r=[],n=Math.floor(t),i=(o,s)=>{for(let u=0;u{if(e!==t){const n=Cw(e),i=Cw(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function S2(e){return typeof e=="symbol"||e instanceof Symbol}const G$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y$=/^\w*$/;function Q$(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||S2(e)?!0:typeof e=="string"&&(Y$.test(e)||!G$.test(e))||t!=null}function X$(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)||Q$(u)?u:{key:u,path:ry(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 Bf(e,...t){const r=t.length;return r>1&&Vv(e,t[0],t[1])?t=[]:r>2&&Vv(t[0],t[1],t[2])&&(t=[t[0]]),X$(e,V$(t),["asc"])}var k2=e=>e.legend.settings,Z$=e=>e.legend.size,J$=e=>e.legend.payload;H([J$,k2],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Bf(n,r):n});function e4(e,t){return i4(e)||n4(e,t)||r4(e,t)||t4()}function t4(){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 r4(e,t){if(e){if(typeof e=="string")return jw(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)?jw(e,t):void 0}}function jw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rad||Math.abs(e.left-t.left)>ad||Math.abs(e.top-t.top)>ad||Math.abs(e.width-t.width)>ad}function Nw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function a4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=e4(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=Nw(d);if(_w(f,s.current)&&i(f),typeof ResizeObserver<"u"){var h=new ResizeObserver(()=>{var m=Nw(d);_w(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 o4=typeof Symbol=="function"&&Symbol.observable||"@@observable",Iw=o4,zm=()=>Math.random().toString(36).substring(7).split("").join("."),l4={INIT:`@@redux/INIT${zm()}`,REPLACE:`@@redux/REPLACE${zm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zm()}`},Dd=l4;function ly(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 E2(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(E2)(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(!ly(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 x(E){if(typeof E!="function")throw new Error($t(10));n=E,v({type:Dd.REPLACE})}function k(){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)}},[Iw](){return this}}}return v({type:Dd.INIT}),{dispatch:v,subscribe:m,getState:h,replaceReducer:x,[Iw]:k}}function s4(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Dd.INIT})>"u")throw new Error($t(12));if(typeof r(void 0,{type:Dd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function P2(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw u&&u.type,new Error($t(14));f[m]=k,d=d||k!==x}return d=d||n.length!==Object.keys(s).length,d?f:s}}function Rd(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function u4(...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=Rd(...u)(i.dispatch),{...i,dispatch:o}}}function A2(e){return ly(e)&&"type"in e&&typeof e.type=="string"}var O2=Symbol.for("immer-nothing"),Mw=Symbol.for("immer-draftable"),ar=Symbol.for("immer-state");function rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object,pl=Ar.getPrototypeOf,$d="constructor",Uf="prototype",qv="configurable",Ld="enumerable",Pd="writable",Zs="value",ti=e=>!!e&&!!e[ar];function ln(e){var t;return e?C2(e)||Hf(e)||!!e[Mw]||!!((t=e[$d])!=null&&t[Mw])||Kf(e)||Vf(e):!1}var c4=Ar[Uf][$d].toString(),Tw=new WeakMap;function C2(e){if(!e||!sy(e))return!1;const t=pl(e);if(t===null||t===Ar[Uf])return!0;const r=Ar.hasOwnProperty.call(t,$d)&&t[$d];if(r===Object)return!0;if(!Uo(r))return!1;let n=Tw.get(r);return n===void 0&&(n=Function.toString.call(r),Tw.set(r,n)),n===c4}function Wf(e,t,r=!0){ku(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 ku(e){const t=e[ar];return t?t.type_:Hf(e)?1:Kf(e)?2:Vf(e)?3:0}var Dw=(e,t,r=ku(e))=>r===2?e.has(t):Ar[Uf].hasOwnProperty.call(e,t),Gv=(e,t,r=ku(e))=>r===2?e.get(t):e[t],zd=(e,t,r,n=ku(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function d4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Hf=Array.isArray,Kf=e=>e instanceof Map,Vf=e=>e instanceof Set,sy=e=>typeof e=="object",Uo=e=>typeof e=="function",Fm=e=>typeof e=="boolean";function f4(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Kn=e=>e.copy_||e.base_,uy=e=>e.modified_?e.copy_:e.base_;function Yv(e,t){if(Kf(e))return new Map(e);if(Vf(e))return new Set(e);if(Hf(e))return Array[Uf].slice.call(e);const r=C2(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:od,add:od,clear:od,delete:od}),Ar.freeze(e),t&&Wf(e,(r,n)=>{cy(n,!0)},!1)),e}function h4(){rn(2)}var od={[Zs]:h4};function qf(e){return e===null||!sy(e)?!0:Ar.isFrozen(e)}var Fd="MapSet",Qv="Patches",Rw="ArrayMethods",j2={};function Ka(e){const t=j2[e];return t||rn(0,e),t}var $w=e=>!!j2[e],Js,_2=()=>Js,p4=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$w(Fd)?Ka(Fd):void 0,arrayMethodsPlugin_:$w(Rw)?Ka(Rw):void 0});function Lw(e,t){t&&(e.patchPlugin_=Ka(Qv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xv(e){Zv(e),e.drafts_.forEach(m4),e.drafts_=null}function Zv(e){e===Js&&(Js=e.parent_)}var zw=e=>Js=p4(Js,e);function m4(e){const t=e[ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Fw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[ar].modified_&&(Xv(t),rn(4)),ln(e)&&(e=Bw(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[ar].base_,e,t)}else e=Bw(t,r);return v4(t,e,!0),Xv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==O2?e:void 0}function Bw(e,t){if(qf(t))return t;const r=t[ar];if(!r)return Bd(t,e.handledSet_,e);if(!Gf(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);M2(r,e)}return r.copy_}function v4(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cy(t,r)}function N2(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Gf=(e,t)=>e.scope_===t,g4=[];function I2(e,t,r,n){const i=Kn(e),o=e.type_;if(n!==void 0&&Gv(i,n,o)===t){zd(i,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Wf(i,(d,f)=>{if(ti(f)){const h=u.get(f)||[];h.push(d),u.set(f,h)}})}const s=e.draftLocations_.get(t)??g4;for(const u of s)zd(i,u,r,o)}function y4(e,t,r){e.callbacks_.push(function(i){var u;const o=t;if(!o||!Gf(o,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(o);const s=uy(o);I2(e,o.draft_??o,s,r),M2(o,i)})}function M2(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)}N2(e)}}function x4(e,t,r){const{scope_:n}=e;if(ti(r)){const i=r[ar];Gf(i,n)&&i.callbacks_.push(function(){Ad(e);const s=uy(i);I2(e,r,s,t)})}else ln(r)&&e.callbacks_.push(function(){const o=Kn(e);e.type_===3?o.has(r)&&Bd(r,n.handledSet_,n):Gv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Bd(Gv(e.copy_,t,e.type_),n.handledSet_,n)})}function Bd(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ti(e)||t.has(e)||!ln(e)||qf(e)||(t.add(e),Wf(e,(n,i)=>{if(ti(i)){const o=i[ar];if(Gf(o,r)){const s=uy(o);zd(e,n,s,e.type_),N2(o)}}else ln(i)&&Bd(i,t,r)})),e}function b4(e,t){const r=Hf(e),n={type_:r?1:0,scope_:t?t.scope_:_2(),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=Ud;r&&(i=[n],o=eu);const{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,[u,n]}var Ud={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=Kn(e);if(!Dw(i,t,e.type_))return w4(e,i,t);const o=i[t];if(e.finalized_||!ln(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&f4(t))return o;if(o===Bm(e.base_,t)){Ad(e);const s=e.type_===1?+t:t,u=eg(e.scope_,o,e,s);return e.copy_[s]=u}return o},has(e,t){return t in Kn(e)},ownKeys(e){return Reflect.ownKeys(Kn(e))},set(e,t,r){const n=T2(Kn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Bm(Kn(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(d4(r,i)&&(r!==void 0||Dw(e.base_,t,e.type_)))return!0;Ad(e),Jv(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),x4(e,t,r)),!0},deleteProperty(e,t){return Ad(e),Bm(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Jv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Kn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Pd]:!0,[qv]:e.type_!==1||t!=="length",[Ld]:n[Ld],[Zs]:r[t]}},defineProperty(){rn(11)},getPrototypeOf(e){return pl(e.base_)},setPrototypeOf(){rn(12)}},eu={};for(let e in Ud){let t=Ud[e];eu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}eu.deleteProperty=function(e,t){return eu.set.call(this,e,t,void 0)};eu.set=function(e,t,r){return Ud.set.call(this,e[0],t,r,e[0])};function Bm(e,t){const r=e[ar];return(r?Kn(r):e)[t]}function w4(e,t,r){var i;const n=T2(t,r);return n?Zs in n?n[Zs]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function T2(e,t){if(!(t in e))return;let r=pl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=pl(r)}}function Jv(e){e.modified_||(e.modified_=!0,e.parent_&&Jv(e.parent_))}function Ad(e){e.copy_||(e.assigned_=new Map,e.copy_=Yv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var S4=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Uo(r)&&!Uo(n)){const s=n;n=r;const u=this;return function(f=s,...h){return u.produce(f,m=>n.call(this,m,...h))}}Uo(n)||rn(6),i!==void 0&&!Uo(i)&&rn(7);let o;if(ln(r)){const s=zw(this),u=eg(s,r,void 0);let d=!0;try{o=n(u),d=!1}finally{d?Xv(s):Zv(s)}return Lw(s,i),Fw(o,s)}else if(!r||!sy(r)){if(o=n(r),o===void 0&&(o=r),o===O2&&(o=void 0),this.autoFreeze_&&cy(o,!0),i){const s=[],u=[];Ka(Qv).generateReplacementPatches_(r,o,{patches_:s,inversePatches_:u}),i(s,u)}return o}else rn(1,r)},this.produceWithPatches=(r,n)=>{if(Uo(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]},Fm(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Fm(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Fm(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ln(t)||rn(8),ti(t)&&(t=zr(t));const r=zw(this),n=eg(r,t,void 0);return n[ar].isManual_=!0,Zv(r),n}finishDraft(t,r){const n=t&&t[ar];(!n||!n.isManual_)&&rn(9);const{scope_:i}=n;return Lw(i,r),Fw(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=Ka(Qv).applyPatches_;return ti(t)?i(t,r):this.produce(t,o=>i(o,r))}};function eg(e,t,r,n){const[i,o]=Kf(t)?Ka(Fd).proxyMap_(t,r):Vf(t)?Ka(Fd).proxySet_(t,r):b4(t,r);return((r==null?void 0:r.scope_)??_2()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?y4(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 ti(e)||rn(10,e),D2(e)}function D2(e){if(!ln(e)||qf(e))return e;const t=e[ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Yv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Yv(e,!0);return Wf(r,(i,o)=>{zd(r,i,D2(o))},n),t&&(t.finalized_=!1),r}var k4=new S4,R2=k4.produce;function $2(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var E4=$2(),P4=$2,A4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Rd:Rd.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=>A2(n)&&n.type===e,r}var L2=class zs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,zs.prototype)}static get[Symbol.species](){return zs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new zs(...t[0].concat(this)):new zs(...t.concat(this))}};function Uw(e){return ln(e)?R2(e,()=>{}):e}function ld(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function O4(e){return typeof e=="boolean"}var C4=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new L2;return r&&(O4(r)?s.push(E4):s.push(P4(r.extraArgument))),s},z2="RTK_autoBatch",rt=()=>e=>({payload:e,meta:{[z2]:!0}}),Ww=e=>t=>{setTimeout(t,e)},j4=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=e(i),s=setTimeout(i,t)},F2=(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?j4(window.requestAnimationFrame,100):Ww(10):e.type==="callback"?e.queueNotification:Ww(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[z2]),o=!i,o&&(s||(s=!0,d(f))),n.dispatch(h)}finally{i=!0}}})},_4=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new L2(e);return n&&i.push(F2(typeof n=="object"?n:void 0)),i};function N4(e){const t=C4(),{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(ly(r))u=P2(r);else throw new Error(Or(1));let d;typeof n=="function"?d=n(t):d=t();let f=Rd;i&&(f=A4({trace:!1,...typeof i=="object"&&i}));const h=u4(...d),m=_4(h);let v=typeof s=="function"?s(m):m();const x=f(...v);return E2(u,o,x)}function B2(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 I4(e){return typeof e=="function"}function M4(e,t){let[r,n,i]=B2(t),o;if(I4(e))o=()=>Uw(e());else{const u=Uw(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(ti(h)){const x=m(h,d);return x===void 0?h:x}else{if(ln(h))return R2(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 T4="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",D4=(e=21)=>{let t="",r=e;for(;r--;)t+=T4[Math.random()*64|0];return t},R4=Symbol.for("rtk-slice-createasyncthunk");function $4(e,t){return`${e}/${t}`}function L4({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[R4];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(F4()):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:$4(o,O),createNotation:typeof i.reducers=="function"};U4(N)?H4(C,N,h,t):B4(C,N,h)});function m(){const[O={},N=[],C=void 0]=typeof i.extraReducers=="function"?B2(i.extraReducers):[i.extraReducers],R={...O,...f.sliceCaseReducersByType};return M4(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,x=new Map,k=new WeakMap;let S;function E(O,N){return S||(S=m()),S(O,N)}function P(){return S||(S=m()),S.getInitialState()}function j(O,N=!1){function C(z){let F=z[O];return typeof F>"u"&&N&&(F=ld(k,C,P)),F}function R(z=v){const F=ld(x,N,()=>new WeakMap);return ld(F,z,()=>{const V={};for(const[Q,B]of Object.entries(i.selectors??{}))V[Q]=z4(B,z,()=>ld(k,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 z4(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=L4();function F4(){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 B4({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!W4(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 U4(e){return e._reducerDefinitionType==="asyncThunk"}function W4(e){return e._reducerDefinitionType==="reducerWithPrepare"}function H4({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||sd,pending:u||sd,rejected:d||sd,settled:f||sd})}function sd(){}var K4="task",U2="listener",W2="completed",dy="cancelled",V4=`task-${dy}`,q4=`task-${W2}`,tg=`${U2}-${dy}`,G4=`${U2}-${W2}`,Yf=class{constructor(e){ws(this,"code");ws(this,"name","TaskAbortError");ws(this,"message");this.code=e,this.message=`${K4} ${dy} (reason: ${e})`}},fy=(e,t)=>{if(typeof e!="function")throw new TypeError(Or(32))},Wd=()=>{},H2=(e,t=Wd)=>(e.catch(t),e),K2=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),za=e=>{if(e.aborted)throw new Yf(e.reason)};function V2(e,t){let r=Wd;return new Promise((n,i)=>{const o=()=>i(new Yf(e.reason));if(e.aborted){o();return}r=K2(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Wd})}var Y4=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Yf?"cancelled":"rejected",error:r}}finally{t==null||t()}},Hd=e=>t=>H2(V2(e,t).then(r=>(za(e),r))),q2=e=>{const t=Hd(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Qo}=Object,Hw={},Qf="listenerMiddleware",Q4=(e,t)=>{const r=n=>K2(e,()=>n.abort(e.reason));return(n,i)=>{fy(n);const o=new AbortController;r(o);const s=Y4(async()=>{za(e),za(o.signal);const u=await n({pause:Hd(o.signal),delay:q2(o.signal),signal:o.signal});return za(o.signal),u},()=>o.abort(q4));return i!=null&&i.autoJoin&&t.push(s.catch(Wd)),{result:Hd(e)(s),cancel(){o.abort(V4)}}}},X4=(e,t)=>{const r=async(n,i)=>{za(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 V2(t,Promise.race(u));return za(t),d}finally{o()}};return((n,i)=>H2(r(n,i)))},G2=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 fy(o),{predicate:i,type:t,effect:o}},Y2=Qo(e=>{const{type:t,predicate:r,effect:n}=G2(e);return{id:D4(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Or(22))}}},{withTypes:()=>Y2}),Kw=(e,t)=>{const{type:r,effect:n,predicate:i}=G2(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},rg=e=>{e.pending.forEach(t=>{t.abort(tg)})},Z4=(e,t)=>()=>{for(const r of t.keys())rg(r);e.clear()},Vw=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Q2=Qo(Cr(`${Qf}/add`),{withTypes:()=>Q2}),J4=Cr(`${Qf}/removeAll`),X2=Qo(Cr(`${Qf}/remove`),{withTypes:()=>X2}),eL=(...e)=>{console.error(`${Qf}/error`,...e)},Eu=(e={})=>{const t=new Map,r=new Map,n=x=>{const k=r.get(x)??0;r.set(x,k+1)},i=x=>{const k=r.get(x)??1;k===1?r.delete(x):r.set(x,k-1)},{extra:o,onError:s=eL}=e;fy(s);const u=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),k=>{x.unsubscribe(),k!=null&&k.cancelActive&&rg(x)}),d=(x=>{const k=Kw(t,x)??Y2(x);return u(k)});Qo(d,{withTypes:()=>d});const f=x=>{const k=Kw(t,x);return k&&(k.unsubscribe(),x.cancelActive&&rg(k)),!!k};Qo(f,{withTypes:()=>f});const h=async(x,k,S,E)=>{const P=new AbortController,j=X4(d,P.signal),_=[];try{x.pending.add(P),n(x),await Promise.resolve(x.effect(k,Qo({},S,{getOriginalState:E,condition:(O,N)=>j(O,N).then(Boolean),take:j,delay:q2(P.signal),pause:Hd(P.signal),extra:o,signal:P.signal,fork:Q4(P.signal,_),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((O,N,C)=>{O!==P&&(O.abort(tg),C.delete(O))})},cancel:()=>{P.abort(tg),x.pending.delete(P)},throwIfCancelled:()=>{za(P.signal)}})))}catch(O){O instanceof Yf||Vw(s,O,{raisedBy:"effect"})}finally{await Promise.all(_),P.abort(G4),i(x),x.pending.delete(P)}},m=Z4(t,r);return{middleware:x=>k=>S=>{if(!A2(S))return k(S);if(Q2.match(S))return d(S.payload);if(J4.match(S)){m();return}if(X2.match(S))return f(S.payload);let E=x.getState();const P=()=>{if(E===Hw)throw new Error(Or(23));return E};let j;try{if(j=k(S),t.size>0){const _=x.getState(),O=Array.from(t.values());for(const N of O){let C=!1;try{C=N.predicate(S,_,E)}catch(R){C=!1,Vw(s,R,{raisedBy:"predicate"})}C&&h(N,S,x,P)}}}finally{E=Hw}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 tL={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Z2=Jt({name:"chartLayout",initialState:tL,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}}}),Xf=Z2.actions,rL=Xf.setMargin,nL=Xf.setLayout,iL=Xf.setChartSize,aL=Xf.setScale,oL=Z2.reducer;function J2(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 _n(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function qw(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 Wo(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 Wo(Wo({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&s!=="middle"&&be(e[s]))return Wo(Wo({},e),{},{[s]:e[s]+(i||0)})}return e},Mn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",eO=(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},tO=(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,x=e.axisType;if(!s)return null;var k=u==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,S=i==="category"&&s.bandwidth?s.bandwidth()/k:0;if(S=x==="angleAxis"&&o&&o.length>=2?Lr(o[0]-o[1])*2*S:S,m||v){var E=(m||v||[]).map((P,j)=>{var _=n?n.indexOf(P):P,O=s.map(_);return Fe(O)?{coordinate:O+S,value:P,offset:S,index:j}:null}).filter(vr);return E}return d&&f?f.map((P,j)=>{var _=s.map(P);return Fe(_)?{coordinate:_+S,value:P,index:j,offset:S}:null}).filter(vr):s.ticks&&h!=null?s.ticks(h).map((P,j)=>{var _=s.map(P);return Fe(_)?{coordinate:_+S,value:P,index:j,offset:S}:null}).filter(vr):s.domain().map((P,j)=>{var _=s.map(P);return Fe(_)?{coordinate:_+S,value:n?n[P]:P,index:j,offset:S}:null}).filter(vr)},dL=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)}}}},fL=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)}}}},hL={sign:dL,expand:j5,none:Wa,silhouette:_5,wiggle:N5,positive:fL},pL=(e,t,r)=>{var n,i=(n=hL[r])!==null&&n!==void 0?n:Wa,o=C5().keys(t).value((u,d)=>Number(Nt(u,d,0))).order(Uv).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 mL(e){return e==null?void 0:String(e)}function Gw(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=l2(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 vL=e=>{var t=e.flat(2).filter(be);return[Math.min(...t),Math.max(...t)]},gL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],yL=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return gL(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=J2(f,t,r),m=vL(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]))},Yw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Kd=(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=Bf(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},bL=(e,t)=>t==="centric"?e.angle:e.radius,ai=e=>e.layout.width,oi=e=>e.layout.height,wL=e=>e.layout.scale,nO=e=>e.layout.margin,Zf=H(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Jf=H(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),SL="data-recharts-item-index",kL="data-recharts-item-id",Pu=60;function Zw(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 ud(e){for(var t=1;te.brush.height;function CL(e){var t=Jf(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Pu;return r+i}return r},0)}function jL(e){var t=Jf(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Pu;return r+i}return r},0)}function _L(e){var t=Zf(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function NL(e){var t=Zf(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Ht=H([ai,oi,nO,OL,CL,jL,_L,NL,k2,Z$],(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=ud(ud({},m),h),x=v.bottom;v.bottom+=n,v=cL(v,d,f);var k=e-v.left-v.right,S=t-v.top-v.bottom;return ud(ud({brushBottom:x},v),{},{width:Math.max(k,0),height:Math.max(S,0)})}),IL=H(Ht,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),iO=H(ai,oi,(e,t)=>({x:0,y:0,width:e,height:t})),ML=y.createContext(null),yr=()=>y.useContext(ML)!=null,eh=e=>e.brush,th=H([eh,Ht,nO],(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 TL(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(),x()};let h=null;const m=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},t)},v=()=>{h!==null&&(clearTimeout(h),h=null)},x=()=>{v(),i=void 0,o=null},k=()=>{d()},S=function(...E){if(r!=null&&r.aborted)return;i=this,o=E;const P=h==null;m(),s&&P&&d()};return S.schedule=m,S.cancel=x,S.flush=k,r==null||r.addEventListener("abort",x,{once:!0}),S}function DL(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=TL(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 RL(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return DL(e,t,{leading:n,maxWait:t,trailing:i})}var Vd=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi[s++]))}},En={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},aO=(e,t,r)=>{var n=r.width,i=n===void 0?En.width:n,o=r.height,s=o===void 0?En.height:o,u=r.aspect,d=r.maxHeight,f=Ha(i)?e:Number(i),h=Ha(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}},$L={width:0,height:0,overflow:"visible"},LL={width:0,overflowX:"visible"},zL={height:0,overflowY:"visible"},FL={},BL=e=>{var t=e.width,r=e.height,n=Ha(t),i=Ha(r);return n&&i?$L:n?LL:i?zL:FL};function UL(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=En.width,o=En.height):i===void 0?i=n&&n>0?void 0:En.width:o===void 0&&(o=n&&n>0?void 0:En.height),{width:i,height:o}}var WL=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function qd(){return qd=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 ez(i)?y.createElement(oO.Provider,{value:i},t):null}var hy=()=>y.useContext(oO),tz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?En.initialDimension:n,o=e.width,s=e.height,u=e.minWidth,d=u===void 0?En.minWidth:u,f=e.minHeight,h=e.maxHeight,m=e.children,v=e.debounce,x=v===void 0?En.debounce:v,k=e.id,S=e.className,E=e.onResize,P=e.style,j=P===void 0?{}:P,_=ZL(e,WL),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 Pl;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)}};x>0&&(fe=RL(fe,x,{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,x]);var Q=z.containerWidth,B=z.containerHeight;Vd(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ue=aO(Q,B,{width:o,height:s,aspect:r,maxHeight:h}),G=ue.calculatedWidth,le=ue.calculatedHeight;return Vd(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",qd({id:k?"".concat(k):void 0,className:Xe("recharts-responsive-container",S),style:eS(eS({},j),{},{width:o,height:s,minWidth:d,minHeight:f,maxHeight:h}),ref:O},_),y.createElement("div",{style:BL({width:o,height:s})},y.createElement(lO,{width:G,height:le},m)))}),rz=y.forwardRef((e,t)=>{var r=hy();if(_n(r.width)&&_n(r.height))return e.children;var n=UL({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,s=aO(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(lO,{width:u,height:d},e.children):y.createElement(tz,qd({},e,{width:i,height:o,ref:t}))});function py(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 rh=()=>{var e,t=yr(),r=Ee(IL),n=Ee(th),i=(e=Ee(eh))===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}},nz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},sO=()=>{var e;return(e=Ee(Ht))!==null&&e!==void 0?e:nz},uO=()=>Ee(ai),cO=()=>Ee(oi),ot=e=>e.layout.layoutType,Al=()=>Ee(ot),my=()=>{var e=Al();if(e==="horizontal"||e==="vertical")return e},dO=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},iz=()=>{var e=Al();return e!==void 0},Au=e=>{var t=xt(),r=yr(),n=e.width,i=e.height,o=hy(),s=n,u=i;return o&&(s=o.width>0?o.width:n,u=o.height>0?o.height:i),y.useEffect(()=>{!r&&_n(s)&&_n(u)&&t(iL({width:s,height:u}))},[t,r,s,u]),null},fO=Symbol.for("immer-nothing"),rS=Symbol.for("immer-draftable"),jr=Symbol.for("immer-state");function nn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tu=Object.getPrototypeOf;function ml(e){return!!e&&!!e[jr]}function Va(e){var t;return e?hO(e)||Array.isArray(e)||!!e[rS]||!!((t=e.constructor)!=null&&t[rS])||Ou(e)||ih(e):!1}var az=Object.prototype.constructor.toString(),nS=new WeakMap;function hO(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=nS.get(r);return n===void 0&&(n=Function.toString.call(r),nS.set(r,n)),n===az}function Gd(e,t,r=!0){nh(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 nh(e){const t=e[jr];return t?t.type_:Array.isArray(e)?1:Ou(e)?2:ih(e)?3:0}function ng(e,t){return nh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pO(e,t,r){const n=nh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function oz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ou(e){return e instanceof Map}function ih(e){return e instanceof Set}function wa(e){return e.copy_||e.base_}function ig(e,t){if(Ou(e))return new Map(e);if(ih(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=hO(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:cd,add:cd,clear:cd,delete:cd}),Object.freeze(e),t&&Object.values(e).forEach(r=>vy(r,!0))),e}function lz(){nn(2)}var cd={value:lz};function ah(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var sz={};function qa(e){const t=sz[e];return t||nn(0,e),t}var ru;function mO(){return ru}function uz(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function iS(e,t){t&&(qa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ag(e){og(e),e.drafts_.forEach(cz),e.drafts_=null}function og(e){e===ru&&(ru=e.parent_)}function aS(e){return ru=uz(ru,e)}function cz(e){const t=e[jr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[jr].modified_&&(ag(t),nn(4)),Va(e)&&(e=Yd(t,e),t.parent_||Qd(t,e)),t.patches_&&qa("Patches").generateReplacementPatches_(r[jr].base_,e,t.patches_,t.inversePatches_)):e=Yd(t,r,[]),ag(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==fO?e:void 0}function Yd(e,t,r){if(ah(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[jr];if(!i)return Gd(t,(o,s)=>lS(e,i,t,o,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Qd(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),Gd(s,(d,f)=>lS(e,i,o,d,f,r,u),n),Qd(e,o,!1),r&&e.patches_&&qa("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function lS(e,t,r,n,i,o,s){if(i==null||typeof i!="object"&&!s)return;const u=ah(i);if(!(u&&!s)){if(ml(i)){const d=o&&t&&t.type_!==3&&!ng(t.assigned_,n)?o.concat(n):void 0,f=Yd(e,i,d);if(pO(r,n,f),ml(f))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Va(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;Yd(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ou(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Qd(e,i)}}}function Qd(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vy(t,r)}function dz(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:mO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=gy;r&&(i=[n],o=nu);const{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var gy={get(e,t){if(t===jr)return e;const r=wa(e);if(!ng(r,t))return fz(e,r,t);const n=r[t];return e.finalized_||!Va(n)?n:n===Um(e.base_,t)?(Wm(e),e.copy_[t]=sg(n,e)):n},has(e,t){return t in wa(e)},ownKeys(e){return Reflect.ownKeys(wa(e))},set(e,t,r){const n=vO(wa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Um(wa(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(oz(r,i)&&(r!==void 0||ng(e.base_,t)))return!0;Wm(e),lg(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 Um(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wm(e),lg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=wa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){nn(11)},getPrototypeOf(e){return tu(e.base_)},setPrototypeOf(){nn(12)}},nu={};Gd(gy,(e,t)=>{nu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});nu.deleteProperty=function(e,t){return nu.set.call(this,e,t,void 0)};nu.set=function(e,t,r){return gy.set.call(this,e[0],t,r,e[0])};function Um(e,t){const r=e[jr];return(r?wa(r):e)[t]}function fz(e,t,r){var i;const n=vO(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function vO(e,t){if(!(t in e))return;let r=tu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=tu(r)}}function lg(e){e.modified_||(e.modified_=!0,e.parent_&&lg(e.parent_))}function Wm(e){e.copy_||(e.copy_=ig(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hz=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"&&nn(6),n!==void 0&&typeof n!="function"&&nn(7);let i;if(Va(t)){const o=aS(this),s=sg(t,void 0);let u=!0;try{i=r(s),u=!1}finally{u?ag(o):og(o)}return iS(o,n),oS(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===fO&&(i=void 0),this.autoFreeze_&&vy(i,!0),n){const o=[],s=[];qa("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else nn(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){Va(e)||nn(8),ml(e)&&(e=pz(e));const t=aS(this),r=sg(e,void 0);return r[jr].isManual_=!0,og(t),r}finishDraft(e,t){const r=e&&e[jr];(!r||!r.isManual_)&&nn(9);const{scope_:n}=r;return iS(n,t),oS(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=qa("Patches").applyPatches_;return ml(e)?n(e,t):this.produce(e,i=>n(i,t))}};function sg(e,t){const r=Ou(e)?qa("MapSet").proxyMap_(e,t):ih(e)?qa("MapSet").proxySet_(e,t):dz(e,t);return(t?t.scope_:mO()).drafts_.push(r),r}function pz(e){return ml(e)||nn(10,e),gO(e)}function gO(e){if(!Va(e)||ah(e))return e;const t=e[jr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ig(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ig(e,!0);return Gd(r,(i,o)=>{pO(r,i,gO(o))},n),t&&(t.finalized_=!1),r}var mz=new hz;mz.produce;var vz={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},yO=Jt({name:"legend",initialState:vz,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()}}}),Cu=yO.actions;Cu.setLegendSize;Cu.setLegendSettings;var gz=Cu.addLegendPayload,yz=Cu.replaceLegendPayload,xz=Cu.removeLegendPayload,bz=yO.reducer,Hm={exports:{}},Km={};/** + * @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 sS;function wz(){if(sS)return Km;sS=1;var e=kl();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 Km.useSyncExternalStoreWithSelector=function(d,f,h,m,v){var x=i(null);if(x.current===null){var k={hasValue:!1,value:null};x.current=k}else k=x.current;x=s(function(){function E(N){if(!P){if(P=!0,j=N,N=m(N),v!==void 0&&k.hasValue){var C=k.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 S=n(d,x[0],x[1]);return o(function(){k.hasValue=!0,k.value=S},[S]),u(S),S},Km}var uS;function Sz(){return uS||(uS=1,Hm.exports=wz()),Hm.exports}Sz();function kz(e){e()}function Ez(){let e=null,t=null;return{clear(){e=null,t=null},notify(){kz(()=>{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 cS={notify(){},get:()=>[]};function Pz(e,t){let r,n=cS,i=0,o=!1;function s(S){h();const E=n.subscribe(S);let P=!1;return()=>{P||(P=!0,E(),m())}}function u(){n.notify()}function d(){k.onStateChange&&k.onStateChange()}function f(){return o}function h(){i++,r||(r=e.subscribe(d),n=Ez())}function m(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=cS)}function v(){o||(o=!0,h())}function x(){o&&(o=!1,m())}const k={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:d,isSubscribed:f,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>n};return k}var Az=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Oz=Az(),Cz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",jz=Cz(),_z=()=>Oz||jz?y.useLayoutEffect:y.useEffect,Nz=_z();function dS(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Iz(e,t){if(dS(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=Pz(i);return{store:i,subscription:d,getServerState:n?()=>n:void 0}},[i,n]),s=y.useMemo(()=>i.getState(),[i]);Nz(()=>{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||Tz;return y.createElement(u.Provider,{value:o},t)}var Rz=Dz,$z=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Lz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function oh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if($z.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Iz(e[n],t[n]))return!1}else if(!Lz(e[n],t[n]))return!1;return!0}function ug(){return ug=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?Mo.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,s=o===void 0?Mo.labelStyle:o,u=e.payload,d=e.formatter,f=e.itemSorter,h=e.wrapperClassName,m=e.labelClassName,v=e.label,x=e.labelFormatter,k=e.accessibilityLayer,S=k===void 0?Mo.accessibilityLayer:k,E=()=>{if(u&&u.length){var z={padding:0,margin:0},F=Gz(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=Uz(Y,2);fe=ae[0],de=ae[1]}else if(Y!=null)fe=Y;else return null}var X=Cs(Cs({},Mo.itemStyle),{},{color:Q.color||Mo.itemStyle.color},i);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(B),style:X},jn(de)?y.createElement("span",{className:"recharts-tooltip-item-name"},de):null,jn(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=Cs(Cs({},Mo.contentStyle),n),j=Cs({margin:0},s),_=!Ut(v),O=_?v:"",N=Xe("recharts-default-tooltip",h),C=Xe("recharts-tooltip-label",m);_&&x&&u!==void 0&&u!==null&&(O=x(v,u));var R=S?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",ug({className:N,style:P},R),y.createElement("p",{className:C,style:j},y.isValidElement(O)?O:"".concat(O)),E())},js="recharts-tooltip-wrapper",Qz={visibility:"hidden"};function Xz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Xe(js,{["".concat(js,"-right")]:be(r)&&t&&be(t.x)&&r>=t.x,["".concat(js,"-left")]:be(r)&&t&&be(t.x)&&r=t.y,["".concat(js,"-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 x=h,k=v;return xE?Math.max(h,v):Math.max(m,v)}function Zz(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 Jz(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=pS({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:s,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),v=pS({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:s,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),h=Zz({translateX:m,translateY:v,useTranslate3d:d})):h=Qz,{cssProperties:h,cssClasses:Xz({translateX:m,translateY:v,coordinate:r})}}var eF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ju={isSsr:eF()};function tF(e,t){return aF(e)||iF(e,t)||nF(e,t)||rF()}function rF(){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 nF(e,t){if(e){if(typeof e=="string")return mS(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)?mS(e,t):void 0}}function mS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rju.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=tF(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 vS(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 To(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=uF(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(To(To({},h),{},{dismissed:!1}));var v=Jz({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}),x=v.cssClasses,k=v.cssProperties,S=e.hasPortalFromProps?{}:To(To({transition:pF({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),E=To(To({},S),{},{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:x,style:E,ref:e.innerRef},e.children)}var vF=y.memo(mF),bO=()=>{var e;return(e=Ee(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function cg(){return cg=Object.assign?Object.assign.bind():function(e){for(var t=1;tFe(e.x)&&Fe(e.y),wS=e=>e.base!=null&&Xd(e.base)&&Xd(e),_s=e=>e.x,Ns=e=>e.y,bF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(ny(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=bS["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return bS[r]||zf},SS={connectNulls:!1,type:"linear"},wF=e=>{var t=e.type,r=t===void 0?SS.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,s=e.layout,u=e.connectNulls,d=u===void 0?SS.connectNulls:u,f=bF(r,s),h=d?i.filter(Xd):i;if(Array.isArray(o)){var m,v=i.map((P,j)=>xS(xS({},P),{},{base:o[j]}));s==="vertical"?m=nd().y(Ns).x1(_s).x0(P=>P.base.x):m=nd().x(_s).y1(Ns).y0(P=>P.base.y);var x=m.defined(wS).curve(f),k=d?v.filter(wS):v;return x(k)}var S;s==="vertical"&&be(o)?S=nd().y(Ns).x1(_s).x0(o):be(o)?S=nd().x(_s).y1(Ns).y0(o):S=YA().x(_s).y(Ns);var E=S.defined(Xd).curve(f);return E(h)},Od=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=Al();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?wF(s):n;return y.createElement("path",cg({},on(e),iy(e),{className:Xe("recharts-curve",t),d:u===null?void 0:u,ref:i}))},SF=["x","y","top","left","width","height","className"];function dg(){return dg=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),_F=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,x=e.className,k=OF(e,SF),S=kF({x:r,y:i,top:s,left:d,width:h,height:v},k);return!be(r)||!be(i)||!be(h)||!be(v)||!be(s)||!be(d)?null:y.createElement("path",dg({},Br(S),{className:Xe("recharts-cross",x),d:jF(r,i,h,v,s,d)}))};function NF(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 Zd=1e-4,wO=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],SO=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),ES=(e,t)=>r=>{var n=wO(e,t);return SO(n,r)},IF=(e,t)=>r=>{var n=wO(e,t),i=[...n.map((o,s)=>o*s).slice(1),0];return SO(i,r)},MF=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]]},TF=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=ES(e,r),o=ES(t,n),s=IF(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 x=i(m)-h,k=s(m);if(Math.abs(x-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,x=0;x{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}},$F=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return PS(e);case"spring":return RF();default:if(e.split("(")[0]==="cubic-bezier")return PS(e)}return typeof e=="function"?e:null},LF=(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()}},kO=y.createContext(LF);kO.Provider;function zF(e){var t=y.useContext(kO);return y.useMemo(()=>e??t,[e,t])}function FF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=UF(e,"string");return typeof t=="symbol"?t:t+""}function UF(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 AS="init",OS="pending",CS="active",WF="completed";function Gm(e){return Math.max(0,e)}class HF{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;FF(this,"state",AS),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Gm(t.animationDuration),this.animationBegin=Gm(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()===AS)return this.state=OS,this.beginStartedTime=t,this.animationBegin;if(this.getState()===OS){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=CS,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Gm(this.animationBegin-r)}if(this.getState()===CS){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=WF}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class KF extends HF{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Yn(this.getFrom(),this.getTo(),this.getProgress()))}}class VF{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 XF(e)||QF(e,t)||YF(e,t)||GF()}function GF(){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 YF(e,t){if(e){if(typeof e=="string")return jS(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)?jS(e,t):void 0}}function jS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},_S=0,Ym=1;function EO(e){var t=Hr(e,ZF),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=xO(),v=n==="auto"?!ju.isSsr&&!m:n,x=zF(t.animationController),k=y.useState(v?_S:Ym),S=qF(k,2),E=S[0],P=S[1];return y.useEffect(()=>{v||P(Ym)},[v]),y.useEffect(()=>{var j=$F(s);if(!v||!i||j==null)return Pl;var _=new VF,O=new KF({animationId:r,easing:j,animationDuration:o,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:_S,to:Ym});return x(_,O,P)},[x,r,v,i,o,s,u,f,d]),h(Number(E))}function PO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(Xs(t)),n=y.useRef(e);return n.current!==e&&(r.current=Xs(t),n.current=e),r.current}var JF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),e6=(e,t,r)=>e.map(n=>"".concat(JF(n)," ").concat(t,"ms ").concat(r)).join(","),t6=["radius"],r6=["radius"],NS,IS,MS,TS,DS,RS,$S,LS,zS,FS;function BS(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 US(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=Gi(r),s=Gi(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],x=0,k=4;xu?u:E}m=Lt(NS||(NS=gn(["M",",",""])),e,t+d*v[0]),v[0]>0&&(m+=Lt(IS||(IS=gn(["A ",",",",0,0,",",",",",""])),v[0],v[0],h,e+f*v[0],t)),m+=Lt(MS||(MS=gn(["L ",",",""])),e+r-f*v[1],t),v[1]>0&&(m+=Lt(TS||(TS=gn(["A ",",",",0,0,",`, + `,",",""])),v[1],v[1],h,e+r,t+d*v[1])),m+=Lt(DS||(DS=gn(["L ",",",""])),e+r,t+n-d*v[2]),v[2]>0&&(m+=Lt(RS||(RS=gn(["A ",",",",0,0,",`, + `,",",""])),v[2],v[2],h,e+r-f*v[2],t+n)),m+=Lt($S||($S=gn(["L ",",",""])),e+f*v[3],t+n),v[3]>0&&(m+=Lt(LS||(LS=gn(["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(zS||(zS=gn(["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(FS||(FS=gn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return m},VS={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},f6=e=>{var t=Hr(e,VS),r=y.useRef(null),n=y.useState(-1),i=l6(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,x=t.animationEasing,k=t.animationDuration,S=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=PO(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=WS(F,t6);return y.createElement("path",Jd({},V,{x:Gi(u),y:Gi(d),width:Gi(f),height:Gi(h),radius:typeof m=="number"?m:void 0,className:z,d:KS(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=e6(["strokeDasharray"],k,typeof x=="string"?x:VS.animationEasing);return y.createElement(EO,{animationId:R,key:R,canBegin:o>0,duration:k,easing:x,isActive:P,begin:S},Y=>{var ae=Yn(Q,f,Y),X=Yn(B,h,Y),M=Yn(ue,u,Y),T=Yn(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=WS(se,r6);return y.createElement("path",Jd({},te,{radius:typeof m=="number"?m:void 0,className:z,d:KS(M,T,ae,X,m),ref:r,style:US(US({},Z),t.style)}))})};function qS(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 GS(e){for(var t=1;te*180/Math.PI,Bt=(e,t,r,n)=>({x:e+Math.cos(-ef*n)*r,y:t+Math.sin(-ef*n)*r}),g6=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},y6=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},x6=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,s=y6({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:v6(d),angleInRadian:d}},b6=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}},w6=(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},S6=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=x6({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=b6(t),h=f.startAngle,m=f.endAngle,v=s,x;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 x?GS(GS({},t),{},{radius:o,angle:w6(v,t)}):null};function AO(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 YS,QS,XS,ZS,JS,ek,tk;function fg(){return fg=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},dd=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)/ef,m=d?i:i+o*h,v=Bt(t,r,f,m),x=Bt(t,r,n,m),k=d?i-o*h:i,S=Bt(t,r,f*Math.cos(h*ef),k);return{center:v,circleTangency:x,lineTangency:S,theta:h}},OO=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,s=e.endAngle,u=k6(o,s),d=o+u,f=Bt(t,r,i,o),h=Bt(t,r,i,d),m=Lt(YS||(YS=Pa(["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),x=Bt(t,r,n,d);m+=Lt(QS||(QS=Pa(["L ",",",` + A `,",",`,0, + `,",",`, + `,","," Z"])),x.x,x.y,n,n,+(Math.abs(u)>180),+(o<=d),v.x,v.y)}else m+=Lt(XS||(XS=Pa(["L ",","," Z"])),t,r);return m},E6=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=dd({cx:t,cy:r,radius:i,angle:d,sign:h,cornerRadius:o,cornerIsExternal:u}),v=m.circleTangency,x=m.lineTangency,k=m.theta,S=dd({cx:t,cy:r,radius:i,angle:f,sign:-h,cornerRadius:o,cornerIsExternal:u}),E=S.circleTangency,P=S.lineTangency,j=S.theta,_=u?Math.abs(d-f):Math.abs(d-f)-k-j;if(_<0)return s?Lt(ZS||(ZS=Pa(["M ",",",` + a`,",",",0,0,1,",`,0 + a`,",",",0,0,1,",`,0 + `])),x.x,x.y,o,o,o*2,o,o,-o*2):OO({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:d,endAngle:f});var O=Lt(JS||(JS=Pa(["M ",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",",` + `])),x.x,x.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=dd({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=dd({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(ek||(ek=Pa(["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(tk||(tk=Pa(["L",",","Z"])),t,r);return O},P6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},A6=e=>{var t=Hr(e,P6),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?S=E6({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(k,x/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:h}):S=OO({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:f,endAngle:h}),y.createElement("path",fg({},Br(t),{className:v,d:S}))};function O6(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(s2(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 AO(t)}}function C6(e){return S2(e)?NaN:Number(e)}function Qm(e){return e?(e=C6(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function CO(e,t,r){r&&typeof r!="number"&&Vv(e,t,r)&&(t=r=void 0),e=Qm(e),t===void 0?(t=e,e=0):t=Qm(t),r=r===void 0?ee.chartData,yy=H([cn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),lh=(e,t,r,n)=>n?yy(e):cn(e),j6=(e,t,r)=>r?yy(e):cn(e),_6=H([lh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});H([yy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var N6=H([cn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function xy(e,t){return D6(e)||T6(e,t)||M6(e,t)||I6()}function I6(){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 M6(e,t){if(e){if(typeof e=="string")return rk(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)?rk(e,t):void 0}}function rk(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 Jn(this,new this.constructor(e))};ve.dividedToIntegerBy=ve.idiv=function(e){var t=this,r=t.constructor;return Ge(Jn(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=Jn(iu(r,o),iu(e,o),o),at=!0,Ge(t,i))};ve.minus=ve.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?MO(t,e):NO(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=Jn(r,e,0,1).times(e),at=!0,r.minus(t)):Ge(new n(r),i)};ve.naturalExponential=ve.exp=function(){return IO(this)};ve.naturalLogarithm=ve.ln=function(){return iu(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?NO(t,e):MO(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(Fa+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=Pn(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Cl((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(Jn(u,o,s+2)).times(.5),Pn(o.d).slice(0,s)===(t=Pn(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(Ge(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;s+=4}return at=!0,Ge(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,x=(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=x.length,d=0;){for(t=0,i=d+n;i>n;)u=o[i]+x[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?Ge(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:(Nn(e,0,Ol),t===void 0?t=n.rounding:Nn(t,0,8),Ge(r,e+yt(r)+1,t))};ve.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ga(n,!0):(Nn(e,0,Ol),t===void 0?t=i.rounding:Nn(t,0,8),n=Ge(new i(n),e+1,t),r=Ga(n,!0,e+1)),r};ve.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Ga(i):(Nn(e,0,Ol),t===void 0?t=o.rounding:Nn(t,0,8),n=Ge(new o(i),e+yt(i)+1,t),r=Ga(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 Ge(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 Ge(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=u.s,s){if((r=h<0?-h:h)<=_O){for(i=new d(Pr),t=Math.ceil(n/nt+4),at=!1;r%2&&(i=i.times(u),ak(i.d,t)),r=Cl(r/2),r!==0;)u=u.times(u),ak(u.d,t);return at=!0,e.s<0?new d(Pr).div(i):Ge(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(iu(u,n+f)),at=!0,i=IO(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=Ga(i,r<=o.toExpNeg||r>=o.toExpPos)):(Nn(e,1,Ol),t===void 0?t=o.rounding:Nn(t,0,8),i=Ge(new o(i),e,t),r=yt(i),n=Ga(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):(Nn(e,1,Ol),t===void 0?t=n.rounding:Nn(t,0,8)),Ge(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 Ga(e,t<=r.toExpNeg||t>=r.toExpPos)};function NO(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?Ge(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?Ge(t,m):t}function Nn(e,t,r){if(e!==~~e||er)throw Error(Fa+e)}function Pn(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,x,k,S,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,x=new F(V),k=x.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,S=Q.slice(0,R),E=S.length;E=_t/2&&++C;do h=0,u=t(B,S,R,E),u<0?(P=S[0],R!=E&&(P=P*_t+(S[1]||0)),h=P/C|0,h>1?(h>=_t&&(h=_t-1),m=e(B,h),v=m.length,E=S.length,u=t(m,S,v,E),u==1&&(h--,r(m,R16)throw Error(by+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=Ge(i.times(e),u),r=r.times(++d),s=o.plus(Jn(i,r,u)),Pn(s.d).slice(0,u)===Pn(o.d).slice(0,u)){for(;f--;)o=Ge(o.times(o),u);return h.precision=m,t==null?(at=!0,Ge(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 Xm(e,t,r){if(t>e.LN10.sd())throw at=!0,r&&(e.precision=r),Error(Wr+"LN10 precision limit exceeded");return Ge(new e(e.LN10),t)}function $i(e){for(var t="";e--;)t+="0";return t}function iu(e,t){var r,n,i,o,s,u,d,f,h,m=1,v=10,x=e,k=x.d,S=x.constructor,E=S.precision;if(x.s<1)throw Error(Wr+(x.s?"NaN":"-Infinity"));if(x.eq(Pr))return new S(0);if(t==null?(at=!1,f=E):f=t,x.eq(10))return t==null&&(at=!0),Xm(S,f);if(f+=v,S.precision=f,r=Pn(k),n=r.charAt(0),o=yt(x),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=Pn(x.d),n=r.charAt(0),m++;o=yt(x),n>1?(x=new S("0."+r),o++):x=new S(n+"."+r.slice(1))}else return d=Xm(S,f+2,E).times(o+""),x=iu(new S(n+"."+r.slice(1)),f-v).plus(d),S.precision=E,t==null?(at=!0,Ge(x,E)):x;for(u=s=x=Jn(x.minus(Pr),x.plus(Pr),f),h=Ge(x.times(x),f),i=3;;){if(s=Ge(s.times(h),f),d=u.plus(Jn(s,new S(i),f)),Pn(d.d).slice(0,f)===Pn(u.d).slice(0,f))return u=u.times(2),o!==0&&(u=u.plus(Xm(S,f+2,E).times(o+""))),u=Jn(u,new S(m),f),S.precision=E,t==null?(at=!0,Ge(u,E)):u;u=d,i+=2}}function ik(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=Cl(r/nt),e.d=[],n=(r+1)%nt,r<0&&(n+=nt),ntf||e.e<-tf))throw Error(by+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ge(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=Cl(-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>tf||e.e<-tf))throw Error(by+yt(e));return e}function MO(e,t){var r,n,i,o,s,u,d,f,h,m,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),at?Ge(t,x):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(x/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)+$i(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+$i(-i-1)+o,r&&(n=r-s)>0&&(o+=$i(n))):i>=s?(o+=$i(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+$i(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=$i(n))),e.s<0?"-"+o:o}function ak(e,t){if(e.length>t)return e.length=t,!0}function TO(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(Fa+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 ik(s,o.toString())}else if(typeof o!="string")throw Error(Fa+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,L6.test(o))ik(s,o);else throw Error(Fa+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=TO,i.config=i.set=z6,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(Fa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fa+r+": "+n);return this}var wy=TO($6);Pr=new wy(1);const Ue=wy;function DO(e){var t;return e===0?t=1:t=Math.floor(new Ue(e).abs().log(10).toNumber())+1,t}function RO(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 au(e,t){return W6(e)||U6(e,t)||B6(e,t)||F6()}function F6(){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 B6(e,t){if(e){if(typeof e=="string")return ok(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)?ok(e,t):void 0}}function ok(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=au(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=DO(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()))},LO=(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(x=>x>=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()))},H6=(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(DO(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?zO(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))})},lk=function(t){var r=au(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=$O([n,i]),h=au(f,2),m=h[0],v=h[1];if(m===-1/0||v===1/0){var x=v===1/0?[m,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?x.reverse():x}if(m===v)return H6(m,o,s);var k=u==="snap125"?LO:Sy,S=zO(m,v,d,s,0,k),E=S.step,P=S.tickMin,j=S.tickMax,_=RO(P,j.add(new Ue(.1).mul(E)),E);return n>i?_.reverse():_},sk=function(t,r){var n=au(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=$O([i,o]),f=au(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"?LO:Sy,x=Math.max(r,2),k=v(new Ue(m).sub(h).div(x-1),s,0),S=[...RO(new Ue(h),new Ue(m),k),m];return s===!1&&(S=S.map(E=>Math.round(E))),i>o?S.reverse():S},K6=e=>e.rootProps.barCategoryGap,sh=e=>e.rootProps.stackOffset,FO=e=>e.rootProps.reverseStackOrder,ky=e=>e.options.chartName,Ey=e=>e.rootProps.syncId,BO=e=>e.rootProps.syncMethod,Py=e=>e.options.eventEmitter,V6=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},va={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},yn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},uh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function ch(e,t,r){if(r!=="auto")return r;if(e!=null)return Mn(e,t)?"category":"number"}function uk(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 rf(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Ay=H([Q6,dO],(e,t)=>{var r;if(e!=null)return e;var n=(r=ch(t,"angleAxis",ck.type))!==null&&r!==void 0?r:"category";return rf(rf({},ck),{},{type:n})}),X6=(e,t)=>e.polarAxis.radiusAxis[t],Oy=H([X6,dO],(e,t)=>{var r;if(e!=null)return e;var n=(r=ch(t,"radiusAxis",dk.type))!==null&&r!==void 0?r:"category";return rf(rf({},dk),{},{type:n})}),dh=e=>e.polarOptions,Cy=H([ai,oi,Ht],g6),UO=H([dh,Cy],(e,t)=>{if(e!=null)return ea(e.innerRadius,t,0)}),WO=H([dh,Cy],(e,t)=>{if(e!=null)return ea(e.outerRadius,t,t*.8)}),Z6=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},HO=H([dh],Z6);H([Ay,HO],uh);var KO=H([Cy,UO,WO],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});H([Oy,KO],uh);var VO=H([ot,dh,UO,WO,ai,oi],(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:ea(s,i,i/2),cy:ea(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:d,endAngle:f,clockWise:!1}}}),It=(e,t)=>t,fh=(e,t,r)=>r;function jy(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=jy(d);h.forEach((v,x)=>{var k=s==null||o?x:String(Nt(v,s,null)),S=Nt(v,d.dataKey,0),E;u.has(k)?E=u.get(k):E={},Object.assign(E,{[m]:S}),u.set(k,E)})}}),Array.from(u.values())}function _y(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var hh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function ph(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function J6(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"},jl=e=>e.tooltip.settings.axisId;function Ny(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 e8=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!An(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 Xi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function t8(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Iy(e){let t,r,n;e.length!==2?(t=Xi,r=(u,d)=>Xi(e(u),d),n=(u,d)=>e(u)-d):(t=e===Xi||e===t8?e:r8,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 r8(){return 0}function GO(e){return e===null?NaN:+e}function*n8(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const i8=Iy(Xi),_u=i8.right;Iy(GO).center;class fk extends Map{constructor(t,r=l8){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(hk(this,t))}has(t){return super.has(hk(this,t))}set(t,r){return super.set(a8(this,t),r)}delete(t){return super.delete(o8(this,t))}}function hk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function a8({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function o8({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function l8(e){return e!==null&&typeof e=="object"?e.valueOf():e}function s8(e=Xi){if(e===Xi)return YO;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 YO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const u8=Math.sqrt(50),c8=Math.sqrt(10),d8=Math.sqrt(2);function nf(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>=u8?10:o>=c8?5:o>=d8?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 mk(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 QO(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?YO:s8(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),x=Math.max(r,Math.floor(t-f*m/d+v)),k=Math.min(n,Math.floor(t+(d-f)*m/d+v));QO(e,t,x,k,i)}const o=e[t];let s=r,u=n;for(Is(e,r,t),i(e[n],o)>0&&Is(e,r,n);s0;)--u}i(e[r],o)===0?Is(e,r,u):(++u,Is(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Is(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function f8(e,t,r){if(e=Float64Array.from(n8(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return mk(e);if(t>=1)return pk(e);var n,i=(n-1)*t,o=Math.floor(i),s=pk(QO(e,o).subarray(0,o+1)),u=mk(e.subarray(o+1));return s+(u-s)*(i-o)}}function h8(e,t,r=GO){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 p8(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?fd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fd(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=g8.exec(e))?new gr(t[1],t[2],t[3],1):(t=y8.exec(e))?new gr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=x8.exec(e))?fd(t[1],t[2],t[3],t[4]):(t=b8.exec(e))?fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=w8.exec(e))?Sk(t[1],t[2]/100,t[3]/100,1):(t=S8.exec(e))?Sk(t[1],t[2]/100,t[3]/100,t[4]):vk.hasOwnProperty(e)?xk(vk[e]):e==="transparent"?new gr(NaN,NaN,NaN,0):null}function xk(e){return new gr(e>>16&255,e>>8&255,e&255,1)}function fd(e,t,r,n){return n<=0&&(e=t=r=NaN),new gr(e,t,r,n)}function P8(e){return e instanceof Nu||(e=su(e)),e?(e=e.rgb(),new gr(e.r,e.g,e.b,e.opacity)):new gr}function gg(e,t,r,n){return arguments.length===1?P8(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}Dy(gr,gg,ZO(Nu,{brighter(e){return e=e==null?af:Math.pow(af,e),new gr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ou:Math.pow(ou,e),new gr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new gr(Ba(this.r),Ba(this.g),Ba(this.b),of(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:bk,formatHex:bk,formatHex8:A8,formatRgb:wk,toString:wk}));function bk(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function A8(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function wk(){const e=of(this.opacity);return`${e===1?"rgb(":"rgba("}${Ba(this.r)}, ${Ba(this.g)}, ${Ba(this.b)}${e===1?")":`, ${e})`}`}function of(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ba(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Aa(e){return e=Ba(e),(e<16?"0":"")+e.toString(16)}function Sk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new an(e,t,r,n)}function JO(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);if(e instanceof Nu||(e=su(e)),!e)return new an;if(e instanceof an)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 an(s,u,d,e.opacity)}function O8(e,t,r,n){return arguments.length===1?JO(e):new an(e,t,r,n??1)}function an(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Dy(an,O8,ZO(Nu,{brighter(e){return e=e==null?af:Math.pow(af,e),new an(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ou:Math.pow(ou,e),new an(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(Zm(e>=240?e-240:e+120,i,n),Zm(e,i,n),Zm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new an(kk(this.h),hd(this.s),hd(this.l),of(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=of(this.opacity);return`${e===1?"hsl(":"hsla("}${kk(this.h)}, ${hd(this.s)*100}%, ${hd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kk(e){return e=(e||0)%360,e<0?e+360:e}function hd(e){return Math.max(0,Math.min(1,e||0))}function Zm(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 Ry=e=>()=>e;function C8(e,t){return function(r){return e+r*t}}function j8(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 _8(e){return(e=+e)==1?eC:function(t,r){return r-t?j8(t,r,e):Ry(isNaN(t)?r:t)}}function eC(e,t){var r=t-e;return r?C8(e,r):Ry(isNaN(e)?t:e)}const Ek=(function e(t){var r=_8(t);function n(i,o){var s=r((i=gg(i)).r,(o=gg(o)).r),u=r(i.g,o.g),d=r(i.b,o.b),f=eC(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 N8(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:lf(n,i)})),r=Jm.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function U8(e,t,r){var n=e[0],i=e[1],o=t[0],s=t[1];return i2?W8:U8,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),lf)))(v)))},m.domain=function(v){return arguments.length?(e=Array.from(v,sf),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=$y,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,x){return n=v,i=x,h()}}function Ly(){return mh()(ir,ir)}function H8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function uf(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 vl(e){return e=uf(Math.abs(e)),e?e[1]:NaN}function K8(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 V8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var q8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uu(e){if(!(t=q8.exec(e)))throw new Error("invalid format: "+e);var t;return new zy({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]})}uu.prototype=zy.prototype;function zy(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+""}zy.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 G8(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 cf;function Y8(e,t){var r=uf(e,t);if(!r)return cf=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(cf=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")+uf(e,Math.max(0,t+o-1))[0]}function Ak(e,t){var r=uf(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 Ok={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:H8,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)=>Ak(e*100,t),r:Ak,s:Y8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ck(e){return e}var jk=Array.prototype.map,_k=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Q8(e){var t=e.grouping===void 0||e.thousands===void 0?Ck:K8(jk.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?Ck:V8(jk.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=uu(m);var x=m.fill,k=m.align,S=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"):Ok[C]||(O===void 0&&(O=12),N=!0,C="g"),(P||x==="0"&&k==="=")&&(P=!0,x="0",k="=");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=Ok[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=G8(B)),Y&&+B==0&&S!=="+"&&(Y=!1),ue=(Y?S==="("?S:u:S==="-"||S==="("?"":S)+ue,G=(C==="s"&&!isNaN(B)&&cf!==void 0?_k[8+cf/3]:"")+G+(Y&&S==="("?")":""),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 x=Math.max(-8,Math.min(8,Math.floor(vl(v)/3)))*3,k=Math.pow(10,-x),S=f((m=uu(m),m.type="f",m),{suffix:_k[8+x/3]});return function(E){return S(k*E)}}return{format:f,formatPrefix:h}}var pd,Fy,tC;X8({thousands:",",grouping:[3],currency:["$",""]});function X8(e){return pd=Q8(e),Fy=pd.format,tC=pd.formatPrefix,pd}function Z8(e){return Math.max(0,-vl(Math.abs(e)))}function J8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vl(t)/3)))*3-vl(Math.abs(e)))}function eB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vl(t)-vl(e))+1}function rC(e,t,r,n){var i=mg(e,t,r),o;switch(n=uu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=J8(i,s))&&(n.precision=o),tC(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=eB(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=Z8(i))&&(n.precision=o-(n.type==="%")*2);break}}return Fy(n)}function ta(e){var t=e.domain;return e.ticks=function(r){var n=t();return hg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return rC(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=pg(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 nC(){var e=Ly();return e.copy=function(){return Iu(e,nC())},Kr.apply(e,arguments),ta(e)}function iC(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,sf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return iC(e).unknown(t)},e=arguments.length?Array.from(e,sf):[0,1],ta(r)}function aC(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 aB(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 Mk(e){return(t,r)=>-e(-t,r)}function By(e){const t=e(Nk,Ik),r=t.domain;let n=10,i,o;function s(){return i=aB(n),o=iB(n),r()[0]<0?(i=Mk(i),o=Mk(o),e(tB,rB)):e(Nk,Ik),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<=x;++v)for(k=1;kh)break;P.push(S)}}else for(;v<=x;++v)for(k=n-1;k>=1;--k)if(S=v>0?k/o(-v):k*o(v),!(Sh)break;P.push(S)}P.length*2{if(u==null&&(u=10),d==null&&(d=n===10?"s":","),typeof d!="function"&&(!(n%1)&&(d=uu(d)).precision==null&&(d.trim=!0),d=Fy(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(aC(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function oC(){const e=By(mh()).domain([1,10]);return e.copy=()=>Iu(e,oC()).base(e.base()),Kr.apply(e,arguments),e}function Tk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Dk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Uy(e){var t=1,r=e(Tk(t),Dk(t));return r.constant=function(n){return arguments.length?e(Tk(t=+n),Dk(t)):t},ta(r)}function lC(){var e=Uy(mh());return e.copy=function(){return Iu(e,lC()).constant(e.constant())},Kr.apply(e,arguments)}function Rk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lB(e){return e<0?-e*e:e*e}function Wy(e){var t=e(ir,ir),r=1;function n(){return r===1?e(ir,ir):r===.5?e(oB,lB):e(Rk(r),Rk(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ta(t)}function Hy(){var e=Wy(mh());return e.copy=function(){return Iu(e,Hy()).exponent(e.exponent())},Kr.apply(e,arguments),e}function sB(){return Hy.apply(null,arguments).exponent(.5)}function $k(e){return Math.sign(e)*e*e}function uB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function sC(){var e=Ly(),t=[0,1],r=!1,n;function i(o){var s=uB(e(o));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(o){return e.invert($k(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,sf)).map($k)),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 sC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Kr.apply(i,arguments),ta(i)}function uC(){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 cC().domain([e,t]).range(i).unknown(o)},Kr.apply(ta(s),arguments)}function dC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[_u(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 dC().domain(e).range(t).unknown(r)},Kr.apply(i,arguments)}const ev=new Date,tv=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)=>(ev.setTime(+o),tv.setTime(+s),e(ev),e(tv),Math.floor(r(ev,tv))),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 df=Et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);df.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):df);df.range;const Qn=1e3,Fr=Qn*60,Xn=Fr*60,ri=Xn*24,Ky=ri*7,Lk=ri*30,rv=ri*365,Oa=Et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getUTCSeconds());Oa.range;const Vy=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qn)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getMinutes());Vy.range;const qy=Et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCMinutes());qy.range;const Gy=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qn-e.getMinutes()*Fr)},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getHours());Gy.range;const Yy=Et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getUTCHours());Yy.range;const Mu=Et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Fr)/ri,e=>e.getDate()-1);Mu.range;const vh=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ri,e=>e.getUTCDate()-1);vh.range;const fC=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ri,e=>Math.floor(e/ri));fC.range;function Ja(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)/Ky)}const gh=Ja(0),ff=Ja(1),cB=Ja(2),dB=Ja(3),gl=Ja(4),fB=Ja(5),hB=Ja(6);gh.range;ff.range;cB.range;dB.range;gl.range;fB.range;hB.range;function eo(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)/Ky)}const yh=eo(0),hf=eo(1),pB=eo(2),mB=eo(3),yl=eo(4),vB=eo(5),gB=eo(6);yh.range;hf.range;pB.range;mB.range;yl.range;vB.range;gB.range;const Qy=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());Qy.range;const Xy=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());Xy.range;const ni=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());ni.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)});ni.range;const ii=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());ii.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)});ii.range;function hC(e,t,r,n,i,o){const s=[[Oa,1,Qn],[Oa,5,5*Qn],[Oa,15,15*Qn],[Oa,30,30*Qn],[o,1,Fr],[o,5,5*Fr],[o,15,15*Fr],[o,30,30*Fr],[i,1,Xn],[i,3,3*Xn],[i,6,6*Xn],[i,12,12*Xn],[n,1,ri],[n,2,2*ri],[r,1,Ky],[t,1,Lk],[t,3,3*Lk],[e,1,rv]];function u(f,h,m){const v=hE).right(s,v);if(x===s.length)return e.every(mg(f/rv,h/rv,m));if(x===0)return df.every(Math.max(mg(f,h,m),1));const[k,S]=s[v/s[x-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?($e=iv(Ms(ne.y,0,1)),Pe=$e.getUTCDay(),$e=Pe>4||Pe===0?hf.ceil($e):hf($e),$e=vh.offset($e,(ne.V-1)*7),ne.y=$e.getUTCFullYear(),ne.m=$e.getUTCMonth(),ne.d=$e.getUTCDate()+(ne.w+6)%7):($e=nv(Ms(ne.y,0,1)),Pe=$e.getDay(),$e=Pe>4||Pe===0?ff.ceil($e):ff($e),$e=Mu.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?iv(Ms(ne.y,0,1)).getUTCDay():nv(Ms(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,iv(ne)):nv(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 zk?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=x.exec(we.slice(Ae));return ne?(J.w=k.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=S.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 zk={"-":"",_:" ",0:"0"},Tt=/^\s*\d+/,kB=/^%/,EB=/[\\^$*+?|[\]().{}]/g;function Ke(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function AB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function OB(e,t,r){var n=Tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function CB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function jB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function _B(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Fk(e,t,r){var n=Tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Bk(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 NB(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 IB(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 MB(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 Uk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function TB(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 Wk(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function DB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function RB(e,t,r){var n=Tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function $B(e,t,r){var n=Tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function LB(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 zB(e,t,r){var n=kB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function FB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function BB(e,t,r){var n=Tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Hk(e,t){return Ke(e.getDate(),t,2)}function UB(e,t){return Ke(e.getHours(),t,2)}function WB(e,t){return Ke(e.getHours()%12||12,t,2)}function HB(e,t){return Ke(1+Mu.count(ni(e),e),t,3)}function pC(e,t){return Ke(e.getMilliseconds(),t,3)}function KB(e,t){return pC(e,t)+"000"}function VB(e,t){return Ke(e.getMonth()+1,t,2)}function qB(e,t){return Ke(e.getMinutes(),t,2)}function GB(e,t){return Ke(e.getSeconds(),t,2)}function YB(e){var t=e.getDay();return t===0?7:t}function QB(e,t){return Ke(gh.count(ni(e)-1,e),t,2)}function mC(e){var t=e.getDay();return t>=4||t===0?gl(e):gl.ceil(e)}function XB(e,t){return e=mC(e),Ke(gl.count(ni(e),e)+(ni(e).getDay()===4),t,2)}function ZB(e){return e.getDay()}function JB(e,t){return Ke(ff.count(ni(e)-1,e),t,2)}function eU(e,t){return Ke(e.getFullYear()%100,t,2)}function tU(e,t){return e=mC(e),Ke(e.getFullYear()%100,t,2)}function rU(e,t){return Ke(e.getFullYear()%1e4,t,4)}function nU(e,t){var r=e.getDay();return e=r>=4||r===0?gl(e):gl.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function iU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function Kk(e,t){return Ke(e.getUTCDate(),t,2)}function aU(e,t){return Ke(e.getUTCHours(),t,2)}function oU(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function lU(e,t){return Ke(1+vh.count(ii(e),e),t,3)}function vC(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function sU(e,t){return vC(e,t)+"000"}function uU(e,t){return Ke(e.getUTCMonth()+1,t,2)}function cU(e,t){return Ke(e.getUTCMinutes(),t,2)}function dU(e,t){return Ke(e.getUTCSeconds(),t,2)}function fU(e){var t=e.getUTCDay();return t===0?7:t}function hU(e,t){return Ke(yh.count(ii(e)-1,e),t,2)}function gC(e){var t=e.getUTCDay();return t>=4||t===0?yl(e):yl.ceil(e)}function pU(e,t){return e=gC(e),Ke(yl.count(ii(e),e)+(ii(e).getUTCDay()===4),t,2)}function mU(e){return e.getUTCDay()}function vU(e,t){return Ke(hf.count(ii(e)-1,e),t,2)}function gU(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function yU(e,t){return e=gC(e),Ke(e.getUTCFullYear()%100,t,2)}function xU(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function bU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?yl(e):yl.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function wU(){return"+0000"}function Vk(){return"%"}function qk(e){return+e}function Gk(e){return Math.floor(+e/1e3)}var Do,yC,xC;SU({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 SU(e){return Do=SB(e),yC=Do.format,Do.parse,xC=Do.utcFormat,Do.utcParse,Do}function kU(e){return new Date(e)}function EU(e){return e instanceof Date?+e:+new Date(+e)}function Zy(e,t,r,n,i,o,s,u,d,f){var h=Ly(),m=h.invert,v=h.domain,x=f(".%L"),k=f(":%S"),S=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)=>f8(e,o/n))},r.copy=function(){return kC(t).domain(e)},li.apply(r,arguments)}function bh(){var e=0,t=.5,r=1,n=1,i,o,s,u,d,f=ir,h,m=!1,v;function x(S){return isNaN(S=+S)?v:(S=.5+((S=+h(S))-o)*(n*S{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 NU(n)?n:"point"}};function IU(e,t){for(var r=0,n=e.length,i=e[0]t)?r=o+1:n=o}return r}function jC(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=IU(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 MU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):jC(e,void 0)}function Qk(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 pf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],si=(e,t)=>{var r=NC(e,t);return r??St},kt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:bg,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:Pu},IC=(e,t)=>e.cartesianAxis.yAxis[t],ui=(e,t)=>{var r=IC(e,t);return r??kt},BU={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:""},r0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??BU},or=(e,t,r)=>{switch(t){case"xAxis":return si(e,r);case"yAxis":return ui(e,r);case"zAxis":return r0(e,r);case"angleAxis":return Ay(e,r);case"radiusAxis":return Oy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},UU=(e,t,r)=>{switch(t){case"xAxis":return si(e,r);case"yAxis":return ui(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Tu=(e,t,r)=>{switch(t){case"xAxis":return si(e,r);case"yAxis":return ui(e,r);case"angleAxis":return Ay(e,r);case"radiusAxis":return Oy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},MC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function TC(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 DC=e=>e.graphicalItems.cartesianItems,WU=H([It,fh],TC),RC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Nl=H([DC,or,WU],RC,{memoizeOptions:{resultEqualityCheck:ph}}),$C=H([Nl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(_y)),LC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),HU=H([Nl],LC),zC=e=>e.map(t=>t.data).filter(Boolean).flat(1),KU=H([Nl],e=>e.some(t=>!t.data)),FC=H([Nl],zC,{memoizeOptions:{resultEqualityCheck:ph}}),BC=(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)},n0=H([FC,lh],BC),VU=(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})),UC=(e,t,r,n,i,o)=>{var s=n.chartData,u=s===void 0?[]:s,d=n.dataStartIndex,f=n.dataEndIndex,h=VU(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(x=>({value:Nt(x,t.dataKey)})).filter(x=>x.value!=null);return[...v,...h]}return h},Du=H([n0,or,Nl,lh,KU,FC],UC);function Zo(e){if(jn(e)||e instanceof Date){var t=Number(e);if(Fe(t))return t}}function Zk(e){if(Array.isArray(e)){var t=[Zo(e[0]),Zo(e[1])];return An(t)?t:void 0}var r=Zo(e);if(r!=null)return[r,r]}function In(e){return e.map(Zo).filter(vr)}function qU(e,t){var r=Zo(e),n=Zo(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var GU=H([Du],e=>e==null?void 0:e.map(t=>t.value).sort(qU));function WC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function YU(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Cn(t))n=t;else if(Array.isArray(t)){var i=In(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:In(r.flatMap(o=>{var s=Nt(e,o.dataKey),u,d;if(Array.isArray(s)){var f=_C(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=jl(e);return Tu(e,t,r)},xl=H([Pt],e=>e==null?void 0:e.dataKey),QU=H([$C,lh,Pt],qO),HC=(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=_C(s,2),d=u[0],f=u[1],h=n?[...f].reverse():f,m=h.map(jy);return[d,{stackedData:pL(e,m,r),graphicalItems:h}]}))},KC=H([QU,$C,sh,FO],HC),VC=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return yL(e,i,o)},XU=H([or],e=>e.allowDataOverflow),i0=e=>{var t;if(e==null||!("domain"in e))return bg;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=In(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:bg},qC=H([or],i0),GC=H([qC,XU],jO),ZU=H([KC,cn,It,GC],VC,{memoizeOptions:{resultEqualityCheck:hh}}),a0=e=>e.errorBars,JU=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>WC(r,n)),mf=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(x=>WC(o,x));m.forEach(x=>{var k,S=Nt(x,(k=r.dataKey)!==null&&k!==void 0?k:f.dataKey),E=YU(x,S,v);if(E.length>=2){var P=Math.min(...E),j=Math.max(...E);(u==null||Pd)&&(d=j)}var _=Zk(S);_!=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=Zk(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]},e7=H([n0,or,HU,a0,It,_6],YC,{memoizeOptions:{resultEqualityCheck:hh}});function t7(e){var t=e.value;if(jn(t)||t instanceof Date)return t}var r7=(e,t,r)=>{var n=e.map(t7).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&o2(n))?CO(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},QC=e=>e.referenceElements.dots,Il=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),n7=H([QC,It,fh],Il),XC=e=>e.referenceElements.areas,i7=H([XC,It,fh],Il),ZC=e=>e.referenceElements.lines,a7=H([ZC,It,fh],Il),JC=(e,t)=>{if(e!=null){var r=In(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},o7=H(n7,It,JC),ej=(e,t)=>{if(e!=null){var r=In(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)]}},l7=H([i7,It],ej);function s7(e){var t;if(e.x!=null)return In([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:In(r)}function u7(e){var t;if(e.y!=null)return In([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:In(r)}var tj=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?s7(n):u7(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},c7=H([a7,It],tj),d7=H(o7,c7,l7,(e,t,r)=>mf(e,r,t)),rj=(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?mf(n,o,i):mf(o,i);return R6(t,f,e.allowDataOverflow)},f7=H([or,qC,GC,ZU,e7,d7,ot,It],rj,{memoizeOptions:{resultEqualityCheck:hh}}),h7=[0,1],nj=(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=Mn(t,o);if(f&&u==null){var h;return CO(0,(h=r==null?void 0:r.length)!==null&&h!==void 0?h:0)}return d==="category"?r7(n,e,f):i==="expand"&&!f?h7:s}},o0=H([or,ot,n0,Du,sh,It,f7],nj),Ml=H([or,MC,ky],CC),ij=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=i0(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&An(e)){if(o)return lk(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return sk(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&An(e))return lk(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&An(e))return sk(e,t.tickCount,t.allowDecimals,"adaptive")}}},l0=H([o0,Tu,Ml],ij),aj=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&An(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},p7=H([or,o0,l0,It],aj),m7=H(Du,or,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(In(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=ea(r,e*o),u=e*o/2;return u-s-(u-s)/o*s}return 0}),v7=(e,t,r)=>{var n=si(e,t);return n==null||typeof n.padding!="string"?0:oj(e,"xAxis",t,r,n.padding)},g7=(e,t,r)=>{var n=ui(e,t);return n==null||typeof n.padding!="string"?0:oj(e,"yAxis",t,r,n.padding)},y7=H(si,v7,(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}}),x7=H(ui,g7,(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}}),lj=H([Ht,y7,th,eh,(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]}),sj=H([Ht,ot,x7,th,eh,(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]}),Ru=(e,t,r,n)=>{var i;switch(t){case"xAxis":return lj(e,r,n);case"yAxis":return sj(e,r,n);case"zAxis":return(i=r0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return HO(e);case"radiusAxis":return KO(e,r);default:return}},uj=H([or,Ru],uh),b7=H([Ml,p7],e8),s0=H([or,Ml,b7,uj],t0),cj=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,s=Mn(e,n);if(s&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},u0=H([ot,Du,Tu,It],cj),wh=H([s0],Ny);H([s0],MU);H([s0,GU],jC);H([Nl,a0,It],JU);function dj(e,t){return e.idt.id?1:0}var Sh=(e,t)=>t,kh=(e,t,r)=>r,w7=H(Zf,Sh,kh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(dj)),S7=H(Jf,Sh,kh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(dj)),fj=(e,t)=>({width:e.width,height:t.height}),k7=(e,t)=>{var r=typeof t.width=="number"?t.width:Pu;return{width:r,height:e.height}},E7=H(Ht,si,fj),P7=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},A7=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},O7=H(oi,Ht,w7,Sh,kh,(e,t,r,n,i)=>{var o={},s;return r.forEach(u=>{var d=fj(t,u);s==null&&(s=P7(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}),C7=H(ai,Ht,S7,Sh,kh,(e,t,r,n,i)=>{var o={},s;return r.forEach(u=>{var d=k7(t,u);s==null&&(s=A7(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}),j7=(e,t)=>{var r=si(e,t);if(r!=null)return O7(e,r.orientation,r.mirror)},_7=H([Ht,si,j7,(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}}}),N7=(e,t)=>{var r=ui(e,t);if(r!=null)return C7(e,r.orientation,r.mirror)},I7=H([Ht,ui,N7,(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}}}),M7=H(Ht,ui,(e,t)=>{var r=typeof t.width=="number"?t.width:Pu;return{width:r,height:e.height}}),hj=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,s=r.dataKey,u=Mn(e,n),d=t.map(h=>h.value),f=d.filter(h=>h!=null);if(s&&u&&o==="category"&&i&&o2(f))return d}},c0=H([ot,Du,or,It],hj),Jk=H([ot,UU,Ml,wh,c0,u0,Ru,l0,It],(e,t,r,n,i,o,s,u,d)=>{if(t!=null){var f=Mn(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}}}),T7=(e,t,r,n,i,o,s,u,d)=>{if(!(t==null||n==null)){var f=Mn(e,d),h=t.type,m=t.ticks,v=t.tickCount,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,k=h==="category"&&n.bandwidth?n.bandwidth()/x:0;k=d==="angleAxis"&&o!=null&&o.length>=2?Lr(o[0]-o[1])*2*k:k;var S=m||i;return S?S.map((E,P)=>{var j=s?s.indexOf(E):E,_=n.map(j);return Fe(_)?{index:P,coordinate:_+k,value:E,offset:k}:null}).filter(vr):f&&u?u.map((E,P)=>{var j=n.map(E);return Fe(j)?{coordinate:j+k,value:E,index:P,offset:k}:null}).filter(vr):n.ticks?n.ticks(v).map((E,P)=>{var j=n.map(E);return Fe(j)?{coordinate:j+k,value:E,index:P,offset:k}:null}).filter(vr):n.domain().map((E,P)=>{var j=n.map(E);return Fe(j)?{coordinate:j+k,value:s?s[E]:E,index:P,offset:k}:null}).filter(vr)}},pj=H([ot,Tu,Ml,wh,l0,Ru,c0,u0,It],T7),D7=(e,t,r,n,i,o,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Mn(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)}},mj=H([ot,Tu,wh,Ru,c0,u0,It],D7),vj=H(or,wh,(e,t)=>{if(!(e==null||t==null))return pf(pf({},e),{},{scale:t})}),R7=H([or,Ml,o0,uj],t0),$7=H([R7],Ny);H((e,t,r)=>r0(e,r),$7,(e,t)=>{if(!(e==null||t==null))return pf(pf({},e),{},{scale:t})});var L7=H([ot,Zf,Jf],(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}}),z7=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};H([z7],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,yj=e=>e.options.validateTooltipEventTypes;function xj(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function $u(e,t){var r=gj(e),n=yj(e);return xj(t,r,n)}function F7(e){return Ee(t=>$u(t,e))}var bj=(e,t)=>{var r,n=Number(t);if(!(Cn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},B7=e=>e.tooltip.settings,zi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},U7={itemInteraction:{click:zi,hover:zi},axisInteraction:{click:zi,hover:zi},keyboardInteraction:zi,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}},wj=Jt({name:"tooltip",initialState:U7,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=wj.actions,W7=Vr.addTooltipEntrySettings,H7=Vr.replaceTooltipEntrySettings,K7=Vr.removeTooltipEntrySettings,V7=Vr.setTooltipSettingsState,q7=Vr.setActiveMouseOverItemIndex;Vr.mouseLeaveItem;var Sj=Vr.mouseLeaveChart;Vr.setActiveClickItemIndex;var kj=Vr.setMouseOverAxisIndex,G7=Vr.setMouseClickAxisIndex,Fs=Vr.setSyncInteraction,vf=Vr.setKeyboardInteraction,Y7=wj.reducer;function eE(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 md(e){for(var t=1;t{if(t==null)return zi;var i=J7(e,t,r);if(i==null)return zi;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(e9(i)){if(o)return md(md({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return md(md({},zi),{},{coordinate:i.coordinate})};function t9(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 r9(e,t){var r=t9(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 n9(e,t,r){if(r==null||t==null)return!0;var n=Nt(e,t);return n==null||!An(r)?!0:r9(n,r)}var Us=(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||n9(f,r,n)?String(d):null},Pj=(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}}}},Aj=(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})},Oj=e=>e.options.tooltipPayloadSearcher,Tl=e=>e.tooltip;function tE(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 rE(e){for(var t=1;te(t)}function nE(e){if(typeof e=="string")return e}function c9(e){if(!(e==null||typeof e!="object")){var t="name"in e?l9(e.name):void 0,r="unit"in e?s9(e.unit):void 0,n="dataKey"in e?u9(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?nE(e.color):void 0,s="fill"in e?nE(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:s}}}function d9(e,t){return e??t}var Cj=(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,x)=>{var k,S=x.dataDefinedOnItem,E=x.settings,P=d9(S,u),j=Array.isArray(P)?J2(P,f,h):P,_=(k=E==null?void 0:E.dataKey)!==null&&k!==void 0?k:n,O=E==null?void 0:E.nameKey,N;if(n&&Array.isArray(j)&&!Array.isArray(j[0])&&s==="axis"?N=l2(j,n,i):N=o(j,t,d,O),Array.isArray(N))N.forEach(R=>{var z,F,V=c9(R),Q=V==null?void 0:V.name,B=V==null?void 0:V.dataKey,ue=V==null?void 0:V.payload,G=rE(rE({},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(Xw({tooltipEntrySettings:G,dataKey:B,payload:ue,value:Nt(ue,B),name:Q==null?void 0:String(Q)}))});else{var C;v.push(Xw({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)}},d0=H([Pt,MC,ky],CC),f9=H([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),h9=H([Mt,jl],TC),to=H([f9,Pt,h9],RC,{memoizeOptions:{resultEqualityCheck:ph}}),p9=H([to],e=>e.filter(_y)),jj=H([to],zC,{memoizeOptions:{resultEqualityCheck:ph}}),m9=H([to],e=>e.some(t=>!t.data)),Ya=H([jj,cn],BC),v9=H([p9,cn,Pt],qO),f0=H([Ya,Pt,to,cn,m9,jj],UC),_j=H([Pt],i0),g9=H([Pt],e=>e.allowDataOverflow),Nj=H([_j,g9],jO),y9=H([to],e=>e.filter(_y)),x9=H([v9,y9,sh,FO],HC),b9=H([x9,cn,Mt,Nj],VC),w9=H([to],LC),S9=H([Ya,Pt,w9,a0,Mt,N6],YC,{memoizeOptions:{resultEqualityCheck:hh}}),k9=H([QC,Mt,jl],Il),E9=H([k9,Mt],JC),P9=H([XC,Mt,jl],Il),A9=H([P9,Mt],ej),O9=H([ZC,Mt,jl],Il),C9=H([O9,Mt],tj),j9=H([E9,C9,A9],mf),_9=H([Pt,_j,Nj,b9,S9,j9,ot,Mt],rj),bl=H([Pt,ot,Ya,f0,sh,Mt,_9],nj),N9=H([bl,Pt,d0],ij),I9=H([Pt,bl,N9,Mt],aj),Ij=e=>{var t=Mt(e),r=jl(e),n=!1;return Ru(e,t,r,n)},Mj=H([Pt,Ij],uh),M9=H([Pt,d0,I9,Mj],t0),Tj=H([M9],Ny),T9=H([ot,f0,Pt,Mt],hj),D9=H([ot,f0,Pt,Mt],cj),R9=(e,t,r,n,i,o,s,u)=>{if(t){var d=t.type,f=Mn(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,x)=>{var k=n.map(v);return Fe(k)?{coordinate:k+m,value:v,index:x,offset:m}:null}).filter(vr):n.domain().map((v,x)=>{var k=n.map(v);return Fe(k)?{coordinate:k+m,value:o?o[v]:v,index:x,offset:m}:null}).filter(vr)}}},ci=H([ot,Pt,d0,Tj,Ij,T9,D9,Mt],R9),h0=H([gj,yj,B7],(e,t,r)=>xj(r.shared,e,t)),Dj=e=>e.tooltip.settings.trigger,p0=e=>e.tooltip.settings.defaultIndex,Lu=H([Tl,h0,Dj,p0],Ej),cu=H([Lu,Ya,xl,bl],Us),Rj=H([ci,cu],bj),$9=H([Lu],e=>{if(e)return e.dataKey}),L9=H([Lu],e=>{if(e)return e.graphicalItemId}),$j=H([Tl,h0,Dj,p0],Aj),z9=H([ai,oi,ot,Ht,ci,p0,$j],Pj),F9=H([Lu,z9],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),B9=H([Lu],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),U9=H([$j,cu,cn,xl,Rj,Oj,h0],Cj),W9=H([U9],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function iE(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 aE(e){for(var t=1;tEe(Pt),G9=()=>{var e=q9(),t=Ee(ci),r=Ee(Tj);return Kd(!e||!r?void 0:aE(aE({},e),{},{scale:r}),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 Ro(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}},J9=(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 Ro(Ro(Ro({},n),Bt(n.cx,n.cy,s,o)),{},{angle:o,radius:s})}var u=i.coordinate,d=n.angle;return Ro(Ro(Ro({},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 eW(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 Lj=(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,k=(h=r[u])===null||h===void 0?void 0:h.coordinate,S=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(!(x==null||k==null||S==null))if(Lr(k-x)!==Lr(S-k)){var P=[];if(Lr(S-k)===Lr(i[1]-i[0])){E=S;var j=k+i[1]-i[0];P[0]=Math.min(j,(j+x)/2),P[1]=Math.max(j,(j+x)/2)}else{E=x;var _=S+i[1]-i[0];P[0]=Math.min(k,(_+k)/2),P[1]=Math.max(k,(_+k)/2)}var O=[Math.min(k,(E+k)/2),Math.max(k,(E+k)/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(x,S),R=Math.max(x,S);if(e>(C+k)/2&&e<=(R+k)/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},zj=()=>Ee(ky),m0=(e,t)=>t,Fj=(e,t,r)=>r,v0=(e,t,r,n)=>n,tW=H(ci,e=>Bf(e,t=>t.coordinate)),g0=H([Tl,m0,Fj,v0],Ej),y0=H([g0,Ya,xl,bl],Us),rW=(e,t,r)=>{if(t!=null){var n=Tl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},Bj=H([Tl,m0,Fj,v0],Aj),gf=H([ai,oi,ot,Ht,ci,v0,Bj],Pj),nW=H([g0,gf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Uj=H([ci,y0],bj),iW=H([Bj,y0,cn,xl,Uj,Oj,m0],Cj),aW=H([g0,y0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),oW=(e,t,r,n,i,o,s)=>{if(!(!e||!r||!n||!i)&&eW(e,s)){var u=xL(e,t),d=Lj(u,o,i,r,n),f=Z9(t,i,d,e);return{activeIndex:String(d),activeCoordinate:f}}},lW=(e,t,r,n,i,o,s)=>{if(!(!e||!n||!i||!o||!r)){var u=S6(e,r);if(u){var d=bL(u,t),f=Lj(d,s,o,n,i),h=J9(t,o,f,u);return{activeIndex:String(f),activeCoordinate:h}}}},sW=(e,t,r,n,i,o,s,u)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?oW(e,t,n,i,o,s,u):lW(e,t,r,n,i,o,s)},uW=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}}),cW=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:J6}});function lE(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 sE(e){for(var t=1;tsE(sE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),pW)},vW=new Set(Object.values(nr));function gW(e){return vW.has(e)}var Wj=Jt({name:"zIndex",initialState:mW,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&&!gW(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()}}}),Eh=Wj.actions,yW=Eh.registerZIndexPortal,av=Eh.unregisterZIndexPortal,xW=Eh.registerZIndexPortalElement,bW=Eh.unregisterZIndexPortalElement,wW=Wj.reducer;function di(e){var t=e.zIndex,r=e.children,n=iz(),i=n&&t!==void 0&&t!==0,o=yr(),s=y.useRef(void 0),u=y.useRef(new Set),d=xt(),f=Ee(m=>uW(m,t,o));if(y.useLayoutEffect(()=>{if(!i){var m=u.current;m.forEach(x=>{d(av({zIndex:x}))}),m.clear(),s.current=void 0;return}if(u.current.has(t)||(d(yW({zIndex:t})),u.current.add(t)),f){s.current=f;var v=u.current;v.forEach(x=>{x!==t&&(d(av({zIndex:x})),v.delete(x))})}},[d,t,i,f]),y.useLayoutEffect(()=>{var m=u.current;return()=>{m.forEach(v=>{d(av({zIndex:v}))}),m.clear()}},[d]),!i)return r;var h=f??s.current;return h?If.createPortal(r,h):null}function wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.useContext(Hj),ov={exports:{}},cE;function jW(){return cE||(cE=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 x=new i(h,m||d,v),k=r?r+f:f;return d._events[k]?d._events[k].fn?d._events[k]=[d._events[k],x]:d._events[k].push(x):(d._events[k]=x,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,x=m.length,k=new Array(x);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Cn(r))return e[r]}},MW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},Kj=Jt({name:"options",initialState:MW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),TW=Kj.reducer,DW=Kj.actions.createEventEmitter;function RW(e){return e.tooltip.syncInteraction}var $W={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Vj=Jt({name:"chartData",initialState:$W,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)}}}),x0=Vj.actions,fE=x0.setChartData,LW=x0.setDataStartEndIndexes;x0.setComputedData;var zW=Vj.reducer,FW=["x","y"];function hE(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;td.rootProps.className);y.useEffect(()=>{if(e==null)return Pl;var d=(f,h,m)=>{if(t!==m&&e===f){if(h.payload.active===!1){r(Fs({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 x=h.payload.coordinate,k=x.x,S=x.y,E=HW(x,FW),P=h.payload.sourceViewBox,j=P.x,_=P.y,O=P.width,N=P.height,C=$o($o({},E),{},{x:s.x+(O?(k-j)/O:0)*s.width,y:s.y+(N?(S-_)/N:0)*s.height});r($o($o({},h),{},{payload:$o($o({},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(Fs({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(R==null){r(Fs({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=Fs({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 du.on(Sg,d),()=>{du.off(Sg,d)}},[u,r,t,e,n,i,o,s])}function qW(){var e=Ee(Ey),t=Ee(Py),r=xt();y.useEffect(()=>{if(e==null)return Pl;var n=(i,o,s)=>{t!==s&&e===i&&r(LW(o))};return du.on(dE,n),()=>{du.off(dE,n)}},[r,t,e])}function GW(){var e=xt();y.useEffect(()=>{e(DW())},[e]),VW(),qW()}function YW(e,t,r,n,i,o){var s=Ee(k=>rW(k,e,t)),u=Ee(L9),d=Ee(Py),f=Ee(Ey),h=Ee(BO),m=Ee(RW),v=(m==null?void 0:m.sourceViewBox)!=null,x=rh();y.useEffect(()=>{if(!v&&f!=null&&d!=null){var k=Fs({active:o,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:u});du.emit(Sg,f,k,d)}},[v,r,s,u,i,n,d,f,h,o,x])}function pE(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 mE(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{R(V7({shared:j,trigger:_,axisId:C,active:i,defaultIndex:z}))},[R,j,_,C,i,z]);var F=rh(),V=bO(),Q=F7(j),B=(t=Ee(Ae=>aW(Ae,Q,_,z)))!==null&&t!==void 0?t:{},ue=B.activeIndex,G=B.isActive,le=Ee(Ae=>iW(Ae,Q,_,z)),fe=Ee(Ae=>Uj(Ae,Q,_,z)),de=Ee(Ae=>nW(Ae,Q,_,z)),Y=le,ae=CW(),X=(r=i??G)!==null&&r!==void 0?r:!1,M=a4([Y,X]),T=JW(M,2),Z=T[0],se=T[1],te=Q==="axis"?fe:void 0;YW(Q,_,de,te,ue,X);var ce=N??ae;if(ce==null||F==null||Q==null)return null;var ge=Y??gE;X||(ge=gE),f&&ge.length&&(ge=C$(ge.filter(Ae=>Ae.value!=null&&(Ae.hide!==!0||n.includeHidden)),v,iH));var _e=ge.length>0,J=mE(mE({},n),{},{payload:ge,label:te,active:X,activeIndex:ue,coordinate:de,accessibilityLayer:V}),we=y.createElement(vF,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:h,active:X,coordinate:de,hasPayload:_e,offset:m,position:x,reverseDirection:k,useTranslate3d:S,viewBox:F,wrapperStyle:E,lastBoundingBox:Z,innerRef:se,hasPortalFromProps:!!N},aH(d,J));return y.createElement(y.Fragment,null,If.createPortal(we,ce),X&&y.createElement(OW,{cursor:P,tooltipEventType:Q,coordinate:de,payload:ge,index:ue}))}function sH(e,t,r){return(t=uH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uH(e){var t=cH(e,"string");return typeof t=="symbol"?t:t+""}function cH(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 dH{constructor(t){sH(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 yE(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 fH(e){for(var t=1;t{try{var r=document.getElementById(bE);r||(r=document.createElement("span"),r.setAttribute("id",bE),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,gH,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Ws=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ju.isSsr)return{width:0,height:0};if(!qj.enableCache)return wE(t,r);var n=yH(t,r),i=xE.get(n);if(i)return i;var o=wE(t,r);return xE.set(n,o),o},Gj;function yf(e,t){return SH(e)||wH(e,t)||bH(e,t)||xH()}function xH(){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 bH(e,t){if(e){if(typeof e=="string")return SE(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)?SE(e,t):void 0}}function SE(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(Qj));var o=i.map(u=>({word:u,width:Ws(u,n).width})),s=r?0:Ws(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}};function Zj(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function UH(e){return Ut(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var Jj=(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),WH="…",jE=(e,t,r,n,i,o,s,u)=>{var d=e.slice(0,t),f=Xj({breakAll:r,style:n,children:d+WH});if(!f)return[!1,[]];var h=Jj(f.wordsWithComputedWidth,o,s,u),m=h.length>i||e_(h).width>Number(o);return[m,h]},HH=(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=Jj(t,n,r,i);if(!f||i)return m;var v=m.length>o||e_(m).width>Number(n);if(!v)return m;for(var x=0,k=h.length-1,S=0,E;x<=k&&S<=h.length-1;){var P=Math.floor((x+k)/2),j=P-1,_=jE(h,j,d,u,o,n,r,i),O=OE(_,2),N=O[0],C=O[1],R=jE(h,P,d,u,o,n,r,i),z=OE(R,1),F=z[0];if(!N&&!F&&(x=P+1),N&&F&&(k=P-1),!N&&F){E=C;break}S++}return E||m},_E=e=>{var t=Ut(e)?[]:e.toString().split(Qj);return[{words:t,width:void 0}]},KH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,s=e.maxLines;if((t||r)&&!ju.isSsr){var u,d,f=Xj({breakAll:o,children:n,style:i});if(f){var h=f.wordsWithComputedWidth,m=f.spaceWidth;u=h,d=m}else return _E(n);return HH({breakAll:o,children:n,maxLines:s,style:i},u,d,t,!!r)}return _E(n)},t_="#808080",VH={angle:0,breakAll:!1,capHeight:"0.71em",fill:t_,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},b0=y.forwardRef((e,t)=>{var r=Hr(e,VH),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=AE(r,DH),v=y.useMemo(()=>KH({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]),x=m.dx,k=m.dy,S=m.angle,E=m.className,P=m.breakAll,j=AE(m,RH);if(!jn(n)||!jn(i)||v.length===0)return null;var _=Number(n)+(be(x)?x:0),O=Number(i)+(be(k)?k:0);if(!Fe(_)||!Fe(O))return null;var N;switch(h){case"start":N=lv("calc(".concat(s,")"));break;case"middle":N=lv("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:N=lv("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 S&&C.push("rotate(".concat(S,", ").concat(_,", ").concat(O,")")),C.length&&(j.transform=C.join(" ")),y.createElement("text",kg({},Br(j),{ref:t,x:_,y:O,className:Xe("recharts-text",E),textAnchor:f,fill:u.includes("url")?t_: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)}))});b0.displayName="Text";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 xn(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=py(t),u=s.x,d=s.y,f=s.height,h=s.upperWidth,m=s.lowerWidth,v=u,x=u+(h-m)/2,k=(v+x)/2,S=(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:x+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:k-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:k+S+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:S,height:f}:{};return r==="insideLeft"?xn({x:k+C,y:d+f/2,horizontalAnchor:z,verticalAnchor:"middle"},G):r==="insideRight"?xn({x:k+S-C,y:d+f/2,horizontalAnchor:R,verticalAnchor:"middle"},G):r==="insideTop"?xn({x:v+h/2,y:d+j,horizontalAnchor:"middle",verticalAnchor:O},G):r==="insideBottom"?xn({x:x+m/2,y:d+f-j,horizontalAnchor:"middle",verticalAnchor:_},G):r==="insideTopLeft"?xn({x:v+C,y:d+j,horizontalAnchor:z,verticalAnchor:O},G):r==="insideTopRight"?xn({x:v+h-C,y:d+j,horizontalAnchor:R,verticalAnchor:O},G):r==="insideBottomLeft"?xn({x:x+C,y:d+f-j,horizontalAnchor:z,verticalAnchor:_},G):r==="insideBottomRight"?xn({x:x+m-C,y:d+f-j,horizontalAnchor:R,verticalAnchor:_},G):r&&typeof r=="object"&&(be(r.x)||Ha(r.x))&&(be(r.y)||Ha(r.y))?xn({x:u+ea(r.x,S),y:d+ea(r.y,f),horizontalAnchor:"end",verticalAnchor:"end"},G):xn({x:E,y:d+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},G)},XH=["labelRef"],ZH=["content"];function IE(e,t){if(e==null)return{};var r,n,i=JH(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(r_.Provider,{value:d},u)},n_=()=>{var e=y.useContext(r_),t=rh();return e||(t?py(t):void 0)},iK=y.createContext(null),aK=()=>{var e=y.useContext(iK),t=Ee(VO);return e||t},oK=e=>{var t=e.value,r=e.formatter,n=Ut(e.children)?t:e.children;return typeof r=="function"?r(n):n},w0=e=>e!=null&&typeof e=="function",lK=(e,t)=>{var r=Lr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},sK=(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,x=i.clockWise,k=(f+h)/2,S=lK(m,v),E=S>=0?1:-1,P,j;switch(t){case"insideStart":P=m+E*o,j=x;break;case"insideEnd":P=v-E*o,j=!x;break;case"end":P=v+E*o,j=x;break;default:throw new Error("Unsupported position ".concat(t))}j=S<=0?j:!j;var _=Bt(u,d,k,P),O=Bt(u,d,k,P+(j?1:-1)*359),N="M".concat(_.x,",").concat(_.y,` + A`).concat(k,",").concat(k,",0,1,").concat(j?0:1,`, + `).concat(O.x,",").concat(O.y),C=Ut(e.id)?Xs("recharts-radial-line-"):e.id;return y.createElement("text",Gn({},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))},uK=(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 x=(o+s)/2,k=Bt(n,i,x,f),S=k.x,E=k.y;return{x:S,y:E,textAnchor:"middle",verticalAnchor:"middle"}},Cd=e=>e!=null&&"cx"in e&&be(e.cx),cK={angle:0,offset:5,zIndex:nr.label,position:"middle",textBreakAll:!1};function dK(e){if(!Cd(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 Li(e){var t=Hr(e,cK),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=aK(),x=n_(),k=i==="center"?x:v??x,S,E,P;r==null?S=k:Cd(r)?S=r:S=py(r);var j=dK(S);if(!S||Ut(o)&&Ut(s)&&!y.isValidElement(u)&&typeof u!="function")return null;var _=Bs(Bs({},t),{},{viewBox:S});if(y.isValidElement(u)){_.labelRef;var O=IE(_,XH);return y.cloneElement(u,O)}if(typeof u=="function"){_.content;var N=IE(_,ZH);if(E=y.createElement(u,N),y.isValidElement(E))return E}else E=oK(t);var C=Br(t);if(Cd(S)){if(i==="insideStart"||i==="insideEnd"||i==="end")return sK(t,i,E,C,S);P=uK(S,t.offset,t.position)}else{if(!j)return null;var R=QH({viewBox:j,position:i,offset:t.offset,parentViewBox:Cd(n)?void 0:n});P=Bs(Bs({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(di,{zIndex:t.zIndex},y.createElement(b0,Gn({ref:m,className:Xe("recharts-label",f)},C,P,{textAnchor:Zj(C.textAnchor)?C.textAnchor:P.textAnchor,breakAll:h}),E))}Li.displayName="Label";var fK=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(Li,Gn({key:"label-implicit"},n)):jn(e)?y.createElement(Li,Gn({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===Li?y.cloneElement(e,Bs({key:"label-implicit"},n)):y.createElement(Li,Gn({key:"label-implicit",content:e},n)):w0(e)?y.createElement(Li,Gn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(Li,Gn({},e,{key:"label-implicit"},n)):null};function hK(e){var t=e.label,r=e.labelRef,n=n_();return fK(t,n,r)||null}var pK=["valueAccessor"],mK=["dataKey","clockWise","id","textBreakAll","zIndex"];function xf(){return xf=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(UH(t))return t},i_=y.createContext(void 0),yK=i_.Provider,a_=y.createContext(void 0);a_.Provider;function xK(){return y.useContext(i_)}function bK(){return y.useContext(a_)}function jd(e){var t=e.valueAccessor,r=t===void 0?gK:t,n=TE(e,pK),i=n.dataKey;n.clockWise;var o=n.id,s=n.textBreakAll,u=n.zIndex,d=TE(n,mK),f=xK(),h=bK(),m=f||h;return!m||!m.length?null:y.createElement(di,{zIndex:u??nr.label},y.createElement(Ur,{className:"recharts-label-list"},m.map((v,x)=>{var k,S=Ut(i)?r(v,x):Nt(v.payload,i),E=Ut(o)?{}:{id:"".concat(o,"-").concat(x)};return y.createElement(Li,xf({key:"label-".concat(x)},Br(v),d,E,{fill:(k=n.fill)!==null&&k!==void 0?k:v.fill,parentViewBox:v.parentViewBox,value:S,textBreakAll:s,viewBox:v.viewBox,index:x,zIndex:0}))})))}jd.displayName="LabelList";function wK(e){var t=e.label;return t?t===!0?y.createElement(jd,{key:"labelList-implicit"}):y.isValidElement(t)||w0(t)?y.createElement(jd,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(jd,xf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Eg(){return Eg=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",Eg({},on(e),iy(e),{className:o,cx:t,cy:r,r:n})):null},SK={radiusAxis:{},angleAxis:{}},l_=Jt({name:"polarAxis",initialState:SK,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]}}}),Ph=l_.actions;Ph.addRadiusAxis;Ph.removeRadiusAxis;Ph.addAngleAxis;Ph.removeAngleAxis;var kK=l_.reducer;function EK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var s_=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function DE(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 RE(e){for(var t=1;t{n||(i.current===null?r(W7(t)):i.current!==t&&r(H7({prev:i.current,next:t})),i.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{i.current&&(r(K7(i.current)),i.current=null)},[r]),null}function TK(e){var t=e.legendPayload,r=xt(),n=yr(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(gz(t)):i.current!==t&&r(yz({prev:i.current,next:t})),i.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{i.current&&(r(xz(i.current)),i.current=null)},[r]),null}function DK(e,t){return zK(e)||LK(e,t)||$K(e,t)||RK()}function RK(){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 $K(e,t){if(e){if(typeof e=="string")return $E(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)?$E(e,t):void 0}}function $E(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 k0(n,t)}function UK(e,t){var r=t.map((n,i)=>e[i]);return k0(r,t)}function WK(e,t){for(var r=new Map,n=0;n{var x=r(m,v);if(x!=null){var k=n.get(x);if(k!==void 0)return i.add(x),k}}),s=[];for(var u of n){var d=DK(u,2),f=d[0],h=d[1];i.has(f)||s.push(h)}return k0(o,t,s)}function Pg(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===S0?BK(e,t):r===FK?UK(e,t):HK(e,t,r)}function c_(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 KK(e,t){return YK(e)||GK(e,t)||qK(e,t)||VK()}function VK(){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 LE(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)?LE(e,t):void 0}}function LE(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 XK(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,x=e.animationMatchBy,k=e.shouldUpdatePreviousRef,S=e.children,E=e.layout,P=PO(r,n),j=c_(P,o),_=(t=j.startValue)!==null&&t!==void 0?t:null,O=Pg(_,i,x??S0);return y.createElement(EO,{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=k?k(N):N>0;return j.syncStepValue(R,N,z),R==null?null:S(R,N,C)})}var sv;function ZK(e,t){return rV(e)||tV(e,t)||eV(e,t)||JK()}function JK(){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 eV(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);r{var e=y.useState(()=>Xs("uid-")),t=ZK(e,1),r=t[0];return r},d_=(sv=Cf.useId)!==null&&sv!==void 0?sv:nV;function iV(e,t){var r=d_();return t||(e?"".concat(e,"-").concat(r):r)}var aV=y.createContext(void 0),oV=e=>{var t=e.id,r=e.type,n=e.children,i=iV("recharts-".concat(r),t);return y.createElement(aV.Provider,{value:i},n(i))},lV={cartesianItems:[],polarItems:[]},f_=Jt({name:"graphicalItems",initialState:lV,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()}}}),Dl=f_.actions,sV=Dl.addCartesianGraphicalItem,uV=Dl.replaceCartesianGraphicalItem,cV=Dl.removeCartesianGraphicalItem;Dl.addPolarGraphicalItem;Dl.removePolarGraphicalItem;Dl.replacePolarGraphicalItem;var dV=f_.reducer,fV=e=>{var t=xt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(sV(e)):r.current!==e&&t(uV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(cV(r.current)),r.current=null)},[t]),null},hV=y.memo(fV),pV=["points"];function FE(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 uv(e){for(var t=1;t{var P,j,_=uv(uv(uv({r:3},s),v),{},{index:E,cx:(P=S.x)!==null&&P!==void 0?P:void 0,cy:(j=S.y)!==null&&j!==void 0?j:void 0,dataKey:o,value:S.value,payload:S.payload,points:t});return y.createElement(bV,{key:"dot-".concat(E),option:r,dotProps:_,className:i})}),k={};return u&&d!=null&&(k.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(d,")")),y.createElement(di,{zIndex:h},y.createElement(Ur,bf({className:n},k),x))}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 UE(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),RV=H([DV,ai,oi],(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)}}),E0=()=>Ee(RV),$V=()=>Ee(W9);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 cv(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=cv(cv(cv({},u),Lf(i)),iy(i)),f;return y.isValidElement(i)?f=y.cloneElement(i,d):typeof i=="function"?f=i(d):f=y.createElement(o_,d),y.createElement(Ur,{className:"recharts-active-dot",clipPath:s},f)};function HE(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(cu),f=$V();if(t==null||f==null)return null;var h=t.find(m=>f.includes(m.payload));return Ut(h)?null:y.createElement(di,{zIndex:u},y.createElement(BV,{point:h,childIndex:Number(d),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var UV=e=>{var t=e.chartData,r=xt(),n=yr();return y.useEffect(()=>n?()=>{}:(r(fE(t)),()=>{r(fE(void 0))}),[t,r,n]),null},KE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},m_=Jt({name:"brush",initialState:KE,reducers:{setBrushSettings(e,t){return t.payload==null?KE:t.payload}}});m_.actions.setBrushSettings;var WV=m_.reducer;function HV(e){return(e%180+180)%180}var KV=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=HV(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)}}}),Rl=v_.actions;Rl.addDot;Rl.removeDot;Rl.addArea;Rl.removeArea;Rl.addLine;Rl.removeLine;var qV=v_.reducer;function GV(e,t){return ZV(e)||XV(e,t)||QV(e,t)||YV()}function YV(){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 QV(e,t){if(e){if(typeof e=="string")return VE(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)?VE(e,t):void 0}}function VE(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(Xs("recharts"),"-clip")),n=GV(r,1),i=n[0],o=E0();if(o==null)return null;var s=o.x,u=o.y,d=o.width,f=o.height;return y.createElement(JV.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 g_(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 nq(e,t){return g_(e,t+1)}function iq(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 k=n==null?void 0:n[d];if(k===void 0)return{v:g_(n,f)};var S=d,E,P=()=>(E===void 0&&(E=r(k,S)),E),j=k.coordinate,_=d===0||fu(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 aq(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,x=function(){var O=n[S];if(O==null)return 0;var N=S,C,R=()=>(C===void 0&&(C=r(O,N)),C),z=O.coordinate,F=S===h||fu(e,z,R,m,d);if(!F)return v=!1,1;F&&(m=z+e*(R()/2+i))},k,S=h;S(S===void 0&&(S=r(x,v)),S);if(v===s-1){var P=e*(k.coordinate+e*E()/2-d);o[v]=k=Qt(Qt({},k),{},{tickCoord:P>0?k.coordinate-P*e:k.coordinate})}else o[v]=k=Qt(Qt({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var j=fu(e,k.tickCoord,E,u,d);j&&(d=k.tickCoord-e*(E()/2+i),o[v]=Qt(Qt({},k),{},{isShow:!0}))}},h=s-1;h>=0;h--)f(h);return o}function cq(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=Qt(Qt({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate}),h.tickCoord!=null){var x=fu(e,h.tickCoord,()=>m,d,f);x&&(f=h.tickCoord-e*(m/2+i),s[u-1]=Qt(Qt({},h),{},{isShow:!0}))}}}for(var k=o?u-1:u,S=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=Qt(Qt({},O),{},{tickCoord:R<0?O.coordinate-R*e:O.coordinate})}else s[j]=O=Qt(Qt({},O),{},{tickCoord:O.coordinate});if(O.tickCoord!=null){var z=fu(e,O.tickCoord,C,d,f);z&&(d=O.tickCoord+e*(C()/2+i),s[j]=Qt(Qt({},O),{},{isShow:!0}))}},E=0;E{var R=typeof f=="function"?f(N.value,C):N.value;return k==="width"?tq(Ws(R,{fontSize:t,letterSpacing:r}),S,m):Ws(R,{fontSize:t,letterSpacing:r})[k]},P=i[0],j=i[1],_=i.length>=2&&P!=null&&j!=null?Lr(j.coordinate-P.coordinate):1,O=rq(o,_,k);return d==="equidistantPreserveStart"?iq(_,O,E,i,s):d==="equidistantPreserveEnd"?aq(_,O,E,i,s):(d==="preserveStart"||d==="preserveStartEnd"?x=cq(_,O,E,i,s,d==="preserveStartEnd"):x=uq(_,O,E,i,s),x.filter(N=>N.isShow))}var dq=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(x=>{if(x){var k=x.getBoundingClientRect();k.width>f&&(f=k.width)}});var h=r?r.getBoundingClientRect().width:0,m=s+d,v=f+m+h+(r?i:0);return Math.round(v)}return 0},fq={xAxis:{},yAxis:{}},y_=Jt({name:"renderedTicks",initialState:fq,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]}}}),x_=y_.actions,hq=x_.setRenderedTicks,pq=x_.removeRenderedTicks,mq=y_.reducer,vq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function GE(e,t){return bq(e)||xq(e,t)||yq(e,t)||gq()}function gq(){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 yq(e,t){if(e){if(typeof e=="string")return YE(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)?YE(e,t):void 0}}function YE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return Pl;var o=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(hq({ticks:o,axisId:n,axisType:r})),()=>{i(pq({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Iq=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,x=e.x,k=e.y,S=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=P0(ht(ht({},N),{},{ticks:n}),_,O),V=on(N),Q=Lf(i),B=Zj(V.textAnchor)?V.textAnchor:Cq(m,v),ue=jq(m,v),G={};typeof o=="object"&&(G=o);var le=ht(ht({},V),{},{fill:"none"},G),fe=F.map(ae=>ht({entry:ae},Oq(ae,x,k,S,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",Qa({},le,M,{className:Xe("recharts-cartesian-axis-tick-line",Za(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,Qa({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Z.value,"-").concat(Z.coordinate,"-").concat(Z.tickCoord)},R5(C,Z,X)),i&&y.createElement(_q,{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(Nq,{ticks:F,axisId:z,axisType:R}),Y.length>0&&y.createElement(di,{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))}),Mq=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=wq(e,vq),m=y.useState(""),v=GE(m,2),x=v[0],k=v[1],S=y.useState(""),E=GE(S,2),P=E[0],j=E[1],_=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var N;return dq({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!==x||V!==P)&&(k(F),j(V))}}},[x,P]);return s||n!=null&&n<=0||i!=null&&i<=0?null:y.createElement(di,{zIndex:e.zIndex},y.createElement(Ur,{className:Xe("recharts-cartesian-axis",o)},y.createElement(Aq,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:on(e)}),y.createElement(Iq,{ref:O,axisType:d,events:h,fontSize:x,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(nK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(hK,{label:e.label,labelRef:e.labelRef}),e.children)))}),A0=y.forwardRef((e,t)=>{var r=Hr(e,ei);return y.createElement(Mq,Qa({},r,{ref:t}))});A0.displayName="CartesianAxis";var Tq=["x1","y1","x2","y2","key"],Dq=["offset"],Rq=["xAxisId","yAxisId"],$q=["xAxisId","yAxisId"];function XE(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 Xt(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 b_(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=wf(r,Tq),m=(i=on(h))!==null&&i!==void 0?i:{};m.offset;var v=wf(m,Dq);n=y.createElement("line",Ca({},v,{x1:o,y1:s,x2:u,y2:d,fill:"none",key:f}))}return n}function Wq(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=wf(e,Rq),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:t,y1:d,x2:t+r,y2:d,key:"line-".concat(f),index:f});return y.createElement(b_,{key:"line-".concat(f),option:i,lineItemProps:h})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Hq(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=wf(e,$q),u=o.map((d,f)=>{var h=Xt(Xt({},s),{},{x1:d,y1:t,x2:d,y2:t+r,key:"line-".concat(f),index:f});return y.createElement(b_,{option:i,lineItemProps:h,key:"line-".concat(f)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Kq(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,x)=>v-x);i!==h[0]&&h.unshift(0);var m=h.map((v,x)=>{var k=h[x+1],S=k==null,E=S?i+s-v:k-v;if(E<=0)return null;var P=x%t.length;return y.createElement("rect",{key:"react-".concat(x),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 Vq(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,x)=>v-x);o!==h[0]&&h.unshift(0);var m=h.map((v,x)=>{var k=h[x+1],S=k==null,E=S?o+u-v:k-v;if(E<=0)return null;var P=x%n.length;return y.createElement("rect",{key:"react-".concat(x),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 eO(P0(Xt(Xt(Xt({},ei),r),{},{ticks:tO(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},Gq=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return eO(P0(Xt(Xt(Xt({},ei),r),{},{ticks:tO(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},Yq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:nr.grid};function w_(e){var t=uO(),r=cO(),n=sO(),i=Xt(Xt({},Hr(e,Yq)),{},{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,x=i.verticalValues,k=yr(),S=Ee(F=>Jk(F,"xAxis",o,k)),E=Ee(F=>Jk(F,"yAxis",s,k));if(!_n(f)||!_n(h)||!be(u)||!be(d))return null;var P=i.verticalCoordinatesGenerator||qq,j=i.horizontalCoordinatesGenerator||Gq,_=i.horizontalPoints,O=i.verticalPoints;if((!_||!_.length)&&typeof j=="function"){var N=v&&v.length,C=j({yAxis:E?Xt(Xt({},E),{},{ticks:N?v:E.ticks}):void 0,width:t??f,height:r??h,offset:n},N?!0:m);Vd(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=x&&x.length,z=P({xAxis:S?Xt(Xt({},S),{},{ticks:R?x:S.ticks}):void 0,width:t??f,height:r??h,offset:n},R?!0:m);Vd(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof z,"]")),Array.isArray(z)&&(O=z)}return y.createElement(di,{zIndex:i.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Uq,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),y.createElement(Kq,Ca({},i,{horizontalPoints:_})),y.createElement(Vq,Ca({},i,{verticalPoints:O})),y.createElement(Wq,Ca({},i,{offset:n,horizontalPoints:_,xAxis:S,yAxis:E})),y.createElement(Hq,Ca({},i,{offset:n,verticalPoints:O,xAxis:S,yAxis:E}))))}w_.displayName="CartesianGrid";var Qq={},S_=Jt({name:"errorBars",initialState:Qq,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))}}}),O0=S_.actions;O0.addErrorBar;O0.replaceErrorBar;O0.removeErrorBar;var Xq=S_.reducer;function k_(e,t){var r,n,i=Ee(f=>si(f,e)),o=Ee(f=>ui(f,t)),s=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:St.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:kt.allowDataOverflow,d=s||u;return{needClip:d,needClipX:s,needClipY:u}}function Zq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=E0(),o=k_(t,r),s=o.needClipX,u=o.needClipY,d=o.needClip,f=Ee(_=>lj(_,t,!1)),h=Ee(_=>sj(_,r,!1));if(!d||!i)return null;var m=i.x,v=i.y,x=i.width,k=i.height,S=s&&f?Math.min(f[0],f[1]):m-x/2,E=u&&h?Math.min(h[0],h[1]):v-k/2,P=s&&f?Math.abs(f[1]-f[0]):x*2,j=u&&h?Math.abs(h[1]-h[0]):k*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:S,y:E,width:P,height:j}))}function Jq(e){var t=Lf(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 C0(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:h_}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.yAxisId)!==null&&r!==void 0?r:h_}var E_=(e,t,r)=>vj(e,"xAxis",C0(e,t),r),P_=(e,t,r)=>mj(e,"xAxis",C0(e,t),r),A_=(e,t,r)=>vj(e,"yAxis",j0(e,t),r),O_=(e,t,r)=>mj(e,"yAxis",j0(e,t),r),eG=H([ot,E_,A_,P_,O_],(e,t,r,n,i)=>Mn(e,"xAxis")?Kd(t,n,!1):Kd(r,i,!1)),tG=(e,t)=>t,C_=H([DC,tG],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),j_=e=>{var t=ot(e),r=Mn(t,"xAxis");return r?"yAxis":"xAxis"},rG=(e,t)=>{var r=j_(e);return r==="yAxis"?j0(e,t):C0(e,t)},nG=(e,t,r)=>KC(e,j_(e),rG(e,t),r),iG=H([C_,nG],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=jy(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]])}}}),aG=H([ot,E_,A_,P_,O_,iG,j6,eG,C_,V6],(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 x=d.data,k;if(x&&x.length>0?k=x:k=h==null?void 0:h.slice(m,v+1),k!=null)return NG({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:m,areaSettings:d,stackedData:o,displayedData:k,chartBaseValue:f,bandSize:u})}}),oG=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],lG=["id","baseLine"];function Hs(){return Hs=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"?[wl(wl({},r.next),{},{x:Yn(r.prev.x,r.next.x,t),y:Yn(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),N_={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:S0,animationInterpolateFn:xG,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:fG,xAxisId:0,yAxisId:0,zIndex:nr.area};function kf(e,t){return e&&e!=="none"?e:t}var bG=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:kf(n,i),value:rO(r,t),payload:e}]},wG=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:Pl,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:rO(s,t),hide:u,type:f,color:kf(n,o),unit:d,graphicalItemId:h}};return y.createElement(MK,{tooltipEntrySettings:m})});function SG(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,s=n.dataKey,u=on(n);return y.createElement(SV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:u,needClip:i,clipPathId:t})}function kG(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 wl(wl({},d),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return y.createElement(yK,{value:t?i:void 0},r)}function EG(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,x=o.isRange,k=o.shape,S=o.id,E=__(o,hG),P=Br(E),j=wl(wl({},P),{},{id:S,points:t,connectNulls:v,type:h,baseLine:r,layout:f,stroke:m,isRange:x,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(IK,{option:k,DefaultShape:N_.shape,shapeProps:j})),y.createElement(SG,{points:t,props:E,clipPathId:i}))}function PG(e,t,r){if(be(e)){var n=be(t)?t:void 0;return Yn(n,e,r)}if(Ut(e)||Cn(e)){var i=be(t)?t:void 0;return Yn(i,0,r)}return e}function AG(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,x=n.animationInterpolateFn,k=y.useMemo(()=>({points:s,baseLine:u}),[s,u]),S=c_(k,o),E=my(),P=QK(n.onAnimationStart,n.onAnimationEnd),j=P.isAnimating,_=P.handleAnimationStart,O=P.handleAnimationEnd,N=S.startValue;if(E==null)return null;var C;return Array.isArray(u)&&Array.isArray(N)?C=Pg(N,u,v):Array.isArray(u)?C=Pg(null,u,v):C=null,y.createElement(XK,{animationInput:k,animationIdPrefix:"recharts-area-",items:s,previousItemsRef:i,isAnimationActive:d,animationBegin:f,animationDuration:h,animationEasing:m,onAnimationStart:_,onAnimationEnd:O,animationInterpolateFn:x,animationMatchBy:v,layout:E},(R,z,F)=>{var V;return z===1?V=u:Array.isArray(u)?V=x(C,z,E):V=F?u:PG(u,N,z),S.syncStepValue(V,z),y.createElement(kG,{showLabels:!j,points:s},n.children,y.createElement(EG,{points:R,baseLine:V,needClip:t,clipPathId:r,props:n,animationElapsedTime:z,isAnimating:j||z<1,isEntrance:F}),y.createElement(wK,{label:n.label}))})}function OG(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=y.useRef(null),o=y.useRef();return y.createElement(AG,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class CG 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,x=t.id,k=t.baseLine,S=t.zIndex;if(r)return null;var E=Xe("recharts-area",o),P=x,j=Jq(n),_=j.r,O=j.strokeWidth,N=s_(n),C=_*2+O,R=d?"url(#clipPath-".concat(N?"":"dots-").concat(P,")"):void 0;return y.createElement(di,{zIndex:S},y.createElement(Ur,{className:E},d&&y.createElement("defs",null,y.createElement(Zq,{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(OG,{needClip:d,clipPathId:P,props:this.props})),y.createElement(HE,{points:i,mainColor:kf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:R}),this.props.isRange&&Array.isArray(k)&&y.createElement(HE,{points:k,mainColor:kf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:R}))}}function jG(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,x=e.stroke,k=e.xAxisId,S=e.yAxisId,E=__(e,pG),P=Al(),j=zj(),_=k_(k,S),O=_.needClip,N=yr(),C=(t=Ee(le=>aG(le,e.id,N)))!==null&&t!==void 0?t:{},R=C.points,z=C.isRange,F=C.baseLine,V=E0();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(CG,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:x,width:B,left:ue,top:G,xAxisId:k,yAxisId:S}))}var _G=(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 NG(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,x=e.yAxisTicks,k=e.bandSize,S=o&&o.length,E=_G(s,u,n,d,f),P=s==="horizontal",j=!1,_=h.map((N,C)=>{var R,z,F,V;if(S)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||S&&!r&&Nt(N,i)==null;if(P){var G;return{x:Gw({axis:d,ticks:v,bandSize:k,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:Gw({axis:f,ticks:x,bandSize:k,entry:N,index:C}),value:V,payload:N}}),O;return S||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 IG(e){var t=Hr(e,N_),r=yr();return y.createElement(oV,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(TK,{legendPayload:bG(t)}),y.createElement(wG,{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(hV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:mL(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(jG,Sf({},t,{id:n}))))}var I_=y.memo(IG,oh);I_.displayName="Area";var MG=["domain","range"],TG=["domain","range"];function eP(e,t){if(e==null)return{};var r,n,i=DG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(s!=null)return nP(nP({},o),{},{type:s})},[o,s]);return y.useLayoutEffect(()=>{u!=null&&(r.current===null?t(OV(u)):r.current!==u&&t(CV({prev:r.current,next:u})),r.current=u)},[u,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(jV(r.current)),r.current=null)},[t]),null}var HG=e=>{var t=e.xAxisId,r=e.className,n=Ee(iO),i=yr(),o="xAxis",s=Ee(v=>pj(v,o,t,i)),u=Ee(v=>E7(v,t)),d=Ee(v=>_7(v,t)),f=Ee(v=>NC(v,t));if(u==null||d==null||f==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=Og(e,$G);f.id,f.scale;var m=Og(f,LG);return y.createElement(A0,Ag({},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}))},KG={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:ei.axisLine,height:St.height,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:ei.tickLine,tickSize:ei.tickSize,type:St.type,niceTicks:St.niceTicks,xAxisId:0},VG=e=>{var t=Hr(e,KG);return y.createElement(y.Fragment,null,y.createElement(WG,{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(HG,t))},Cg=y.memo(VG,M_);Cg.displayName="XAxis";var qG=["type"],GG=["dangerouslySetInnerHTML","ticks","scale"],YG=["id","scale"];function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(s!=null)return aP(aP({},o),{},{type:s})},[s,o]);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}function tY(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=y.useRef(null),s=y.useRef(null),u=Ee(iO),d=yr(),f=xt(),h="yAxis",m=Ee(P=>M7(P,t)),v=Ee(P=>I7(P,t)),x=Ee(P=>pj(P,h,t,d)),k=Ee(P=>IC(P,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!m||w0(i)||y.isValidElement(i)||k==null)){var P=o.current;if(P){var j=P.getCalculatedWidth();Math.round(m.width)!==Math.round(j)&&f(MV({id:t,width:j}))}}},[x,m,f,i,t,n,k]),m==null||v==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var S=_g(e,GG);k.id,k.scale;var E=_g(k,YG);return y.createElement(A0,jg({},S,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:x,axisType:h,axisId:t}))}var rY={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:ei.axisLine,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:ei.tickLine,tickSize:ei.tickSize,type:kt.type,niceTicks:kt.niceTicks,width:kt.width,yAxisId:0},nY=e=>{var t=Hr(e,rY);return y.createElement(y.Fragment,null,y.createElement(eY,{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(tY,t))},T_=y.memo(nY,M_);T_.displayName="YAxis";var iY=(e,t)=>t,_0=H([iY,ot,VO,Mt,Mj,ci,tW,Ht],sW);function aY(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function N0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(aY(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 D_=Cr("mouseClick"),R_=Eu();R_.startListening({actionCreator:D_,effect:(e,t)=>{var r=e.payload,n=_0(t.getState(),N0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(G7({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Ng=Cr("mouseMove"),$_=Eu(),Lo=null,ga=null,dv=null;$_.startListening({actionCreator:Ng,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"));Lo!==null&&(cancelAnimationFrame(Lo),Lo=null),ga!==null&&(typeof o!="number"||!u)&&(clearTimeout(ga),ga=null),dv=N0(r);var d=()=>{var f=t.getState(),h=$u(f,f.tooltip.settings.shared);if(!dv){Lo=null,ga=null;return}if(h==="axis"){var m=_0(f,dv);(m==null?void 0:m.activeIndex)!=null?t.dispatch(kj({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(Sj())}Lo=null,ga=null};if(!u){d();return}o==="raf"?Lo=requestAnimationFrame(d):typeof o=="number"&&ga===null&&(ga=setTimeout(d,o))}});function oY(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 oP={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},L_=Jt({name:"rootProps",initialState:oP,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:oP.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}}}),lY=L_.reducer,sY=L_.actions.updateOptions,uY=null,cY={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)},z_=Jt({name:"polarOptions",initialState:uY,reducers:cY});z_.actions.updatePolarOptions;var dY=z_.reducer,F_=Cr("keyDown"),B_=Cr("focus"),U_=Cr("blur"),Ah=Eu(),zo=null,ya=null,gd=null;Ah.startListening({actionCreator:F_,effect:(e,t)=>{gd=e.payload,zo!==null&&(cancelAnimationFrame(zo),zo=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,s=o==="all"||o.includes("keydown");ya!==null&&(typeof i!="number"||!s)&&(clearTimeout(ya),ya=null);var u=()=>{try{var d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var h=d.tooltip.keyboardInteraction,m=gd;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var v=Us(h,Ya(d),xl(d),bl(d)),x=v==null?-1:Number(v),k=!Number.isFinite(x)||x<0,S=ci(d),E=Ya(d),P=$u(d,d.tooltip.settings.shared);if(m==="Enter"){if(k)return;var j=gf(d,P,"hover",String(h.index));t.dispatch(vf({active:!h.active,activeIndex:h.index,activeCoordinate:j}));return}var _=L7(d),O=_==="left-to-right"?1:-1,N=m==="ArrowRight"?1:-1,C;if(k){var R=xl(d),z=bl(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(Us(V(B),E,R,z)!=null){C=B;break}if(C<0)return}else{C=x+N*O;var ue=(S==null?void 0:S.length)||E.length;if(ue===0||C>=ue||C<0)return}var G=gf(d,P,"hover",String(C));t.dispatch(vf({active:!0,activeIndex:C.toString(),activeCoordinate:G}))}finally{zo=null,ya=null}};if(!s){u();return}i==="raf"?zo=requestAnimationFrame(u):typeof i=="number"&&ya===null&&(u(),gd=null,ya=setTimeout(()=>{gd?u():(ya=null,zo=null)},i))}});Ah.startListening({actionCreator:B_,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=$u(r,r.tooltip.settings.shared),u=gf(r,s,"hover",String(o));t.dispatch(vf({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Ah.startListening({actionCreator:U_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(vf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function W_(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"),H_=Eu(),yd=new Map,Rs=new Map,fv=new Map;H_.startListening({actionCreator:Rr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,s=W_(i);fv.set(o,{handler:n,reactEvent:s});var u=yd.get(o);u!==void 0&&(cancelAnimationFrame(u),yd.delete(o));var d=t.getState(),f=d.eventSettings,h=f.throttleDelay,m=f.throttledEvents,v=m,x=v==="all"||(v==null?void 0:v.includes(o)),k=Rs.get(o);k!==void 0&&(typeof h!="number"||!x)&&(clearTimeout(k),Rs.delete(o));var S=()=>{var j=fv.get(o);try{if(!j)return;var _=j.handler,O=j.reactEvent,N=t.getState(),C={activeCoordinate:F9(N),activeDataKey:$9(N),activeIndex:cu(N),activeLabel:Rj(N),activeTooltipIndex:cu(N),isTooltipActive:B9(N)};_&&_(C,O)}finally{yd.delete(o),Rs.delete(o),fv.delete(o)}};if(!x){S();return}if(h==="raf"){var E=requestAnimationFrame(S);yd.set(o,E)}else if(typeof h=="number"){if(!Rs.has(o)){S();var P=setTimeout(S,h);Rs.set(o,P)}}else S()}}});var fY=H([Tl],e=>e.tooltipItemPayloads),hY=H([fY,(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)}}}),K_=Cr("touchMove"),V_=Eu(),xa=null,Ti=null,lP=null,$s=null;V_.startListening({actionCreator:K_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){$s=W_(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,s=i.throttledEvents,u=s==="all"||s.includes("touchmove");xa!==null&&(cancelAnimationFrame(xa),xa=null),Ti!==null&&(typeof o!="number"||!u)&&(clearTimeout(Ti),Ti=null),lP=Array.from(r.touches).map(f=>N0({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var d=()=>{if($s!=null){var f=t.getState(),h=$u(f,f.tooltip.settings.shared);if(h==="axis"){var m,v=(m=lP)===null||m===void 0?void 0:m[0];if(v==null){xa=null,Ti=null;return}var x=_0(f,v);(x==null?void 0:x.activeIndex)!=null&&t.dispatch(kj({activeIndex:x.activeIndex,activeDataKey:void 0,activeCoordinate:x.activeCoordinate}))}else if(h==="item"){var k,S=$s.touches[0];if(document.elementFromPoint==null||S==null)return;var E=document.elementFromPoint(S.clientX,S.clientY);if(!E||!E.getAttribute)return;var P=E.getAttribute(SL),j=(k=E.getAttribute(kL))!==null&&k!==void 0?k:void 0,_=to(f).find(C=>C.id===j);if(P==null||_==null||j==null)return;var O=_.dataKey,N=hY(f,P,j);t.dispatch(q7({activeDataKey:O,activeIndex:P,activeCoordinate:N,activeGraphicalItemId:j}))}xa=null,Ti=null}};if(!u){d();return}o==="raf"?xa=requestAnimationFrame(d):typeof o=="number"&&Ti===null&&(d(),$s=null,Ti=setTimeout(()=>{$s?d():(Ti=null,xa=null)},o))}}});var q_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},G_=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)}}}),pY=G_.actions.setEventSettings,mY=G_.reducer,vY=P2({brush:WV,cartesianAxis:TV,chartData:zW,errorBars:Xq,eventSettings:mY,graphicalItems:dV,layout:oL,legend:bz,options:TW,polarAxis:kK,polarOptions:dY,referenceElements:qV,renderedTicks:mq,rootProps:lY,tooltip:Y7,zIndex:wW}),gY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return N4({reducer:vY,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([R_.middleware,$_.middleware,Ah.middleware,H_.middleware,V_.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(F2({type:"raf"}))},devTools:{serialize:{replacer:oY},name:"recharts-".concat(r)}})};function yY(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=gY(t,n));var s=oy;return y.createElement(Rz,{context:s,store:o.current},r)}function xY(e){var t=e.layout,r=e.margin,n=xt(),i=yr();return y.useEffect(()=>{i||(n(nL(t)),n(rL(r)))},[n,i,t,r]),null}var bY=y.memo(xY,oh);function wY(e){var t=xt();return y.useEffect(()=>{t(sY(e))},[t,e]),null}var SY=e=>{var t=xt();return y.useEffect(()=>{t(pY(e))},[t,e]),null},kY=y.memo(SY,oh);function sP(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),i=xt();return y.useLayoutEffect(()=>(n.current&&i(xW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(bW({zIndex:t,isPanorama:r}))}),[i,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function uP(e){var t=e.children,r=e.isPanorama,n=Ee(cW);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(sP,{key:s,zIndex:s,isPanorama:r})),t,o.map(s=>y.createElement(sP,{key:s,zIndex:s,isPanorama:r})))}var EY=["children"];function PY(e,t){if(e==null)return{};var r,n,i=AY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=uO(),n=cO(),i=bO();if(!_n(r)||!_n(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(WA,Ef({},s,{title:u,desc:d,role:h,tabIndex:f,width:r,height:n,style:OY,ref:t}),o)}),jY=e=>{var t=e.children,r=Ee(th);if(!r)return null;var n=r.width,i=r.height,o=r.y,s=r.x;return y.createElement(WA,{width:n,height:i,x:s,y:o},t)},cP=y.forwardRef((e,t)=>{var r=e.children,n=PY(e,EY),i=yr();return i?y.createElement(jY,null,y.createElement(uP,{isPanorama:!0},r)):y.createElement(CY,Ef({ref:t},n),y.createElement(uP,{isPanorama:!1},r))});function _Y(e,t){return TY(e)||MY(e,t)||IY(e,t)||NY()}function NY(){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 IY(e,t){if(e){if(typeof e=="string")return dP(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)?dP(e,t):void 0}}function dP(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(aL(u))}},[n,e,o]),i}function fP(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 RY(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(GW(),null);function Af(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var KY=y.forwardRef((e,t)=>{var r,n,i=y.useRef(null),o=y.useState({containerWidth:Af((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Af((n=e.style)===null||n===void 0?void 0:n.height)}),s=Pf(o,2),u=s[0],d=s[1],f=y.useCallback((m,v)=>{d(x=>{var k=Math.round(m),S=Math.round(v);return x.containerWidth===k&&x.containerHeight===S?x:{containerWidth:k,containerHeight:S}})},[]),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(),x=v.width,k=v.height;f(x,k);var S=P=>{var j=P[0];if(j!=null){var _=j.contentRect,O=_.width,N=_.height;f(O,N)}},E=new ResizeObserver(S);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(Au,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",Zi({ref:h},e)))}),VY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=y.useState({containerWidth:Af(r),containerHeight:Af(n)}),o=Pf(i,2),s=o[0],u=o[1],d=y.useCallback((h,m)=>{u(v=>{var x=Math.round(h),k=Math.round(m);return v.containerWidth===x&&v.containerHeight===k?v:{containerWidth:x,containerHeight:k}})},[]),f=y.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var m=h.getBoundingClientRect(),v=m.width,x=m.height;d(v,x)}},[t,d]);return y.createElement(y.Fragment,null,y.createElement(Au,{width:s.containerWidth,height:s.containerHeight}),y.createElement("div",Zi({ref:f},e)))}),qY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Au,{width:r,height:n}),y.createElement("div",Zi({ref:t},e)))}),GY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(VY,Zi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(qY,Zi({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Au,{width:r,height:n}),y.createElement("div",Zi({ref:t},e)))});function YY(e){return e?KY:GY}var QY=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,x=e.onTouchEnd,k=e.onTouchMove,S=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=Pf(R,2),F=z[0],V=z[1],Q=y.useState(null),B=Pf(Q,2),ue=B[0],G=B[1],le=DY(),fe=hy(),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(D_(Pe)),C(Rr({handler:o,reactEvent:Pe}))},[C,o]),M=y.useCallback(Pe=>{C(Ng(Pe)),C(Rr({handler:f,reactEvent:Pe}))},[C,f]),T=y.useCallback(Pe=>{C(Sj()),C(Rr({handler:h,reactEvent:Pe}))},[C,h]),Z=y.useCallback(Pe=>{C(Ng(Pe)),C(Rr({handler:m,reactEvent:Pe}))},[C,m]),se=y.useCallback(()=>{C(B_())},[C]),te=y.useCallback(()=>{C(U_())},[C]),ce=y.useCallback(Pe=>{C(F_(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:S,reactEvent:Pe}))},[C,S]),ne=y.useCallback(Pe=>{O&&C(K_(Pe)),C(Rr({handler:k,reactEvent:Pe}))},[C,O,k]),lt=y.useCallback(Pe=>{C(Rr({handler:x,reactEvent:Pe}))},[C,x]),$e=YY(j);return y.createElement(Hj.Provider,{value:F},y.createElement(c5.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:RY({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(HY,null),r)))}),XY=["width","height","responsive","children","className","style","compact","title","desc"];function ZY(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=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=ZY(e,XY),v=on(m);return d?y.createElement(y.Fragment,null,y.createElement(Au,{width:r,height:n}),y.createElement(cP,{otherAttributes:v,title:f,desc:h},o)):y.createElement(QY,{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(cP,{otherAttributes:v,title:f,desc:h,ref:t},y.createElement(eq,null,o)))});function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(lQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:sQ,tooltipPayloadSearcher:IW,categoricalChartProps:e,ref:t}));const cQ="rgba(130,130,150,0.14)",hv="rgba(130,130,150,0.85)";function dQ(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 Y_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function fQ({active:e,payload:t,unit:r,label:n}){return!e||!(t!=null&&t.length)?null:b.jsxs("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:[Number.isFinite(n)&&b.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"})}),b.jsx("div",{className:"space-y-1",children:t.map(i=>b.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[b.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),b.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:i.name}),b.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:Y_(i.value,r)})]},i.dataKey))})]})}function Q_({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176,showTime:o=!1}){var h,m;const s=e.reduce((v,x)=>t.reduce((k,S)=>Math.max(k,Number(x[S.key])||0),v),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(s*1.2/25)*25)):Math.max(dQ(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 b.jsx("div",{style:{height:i},className:"w-full",children:b.jsx(rz,{width:"100%",height:"100%",children:b.jsxs(uQ,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[b.jsx("defs",{children:t.map(v=>b.jsxs("linearGradient",{id:`grad-${v.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[b.jsx("stop",{offset:"0%",stopColor:v.color,stopOpacity:.22}),b.jsx("stop",{offset:"100%",stopColor:v.color,stopOpacity:0})]},v.key))}),b.jsx(w_,{vertical:!1,stroke:cQ}),o?b.jsx(Cg,{dataKey:"t",type:"number",domain:["dataMin","dataMax"],tickFormatter:f,tickCount:5,minTickGap:40,interval:"preserveStartEnd",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:hv},height:18}):b.jsx(Cg,{dataKey:"t",hide:!0}),b.jsx(T_,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:v=>Y_(v,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:hv}}),b.jsx(lH,{content:b.jsx(fQ,{unit:r}),cursor:{stroke:hv,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(v=>b.jsx(I_,{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 X_={"1h":60,"24h":1440},mP={live:"Live","1h":"1 h","24h":"24 h"};function Z_({value:e,onChange:t}){return b.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(mP).map(r=>b.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:mP[r]},r))})}const hQ=[{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 pQ(){var h,m,v,x;const{sys:e,hist:t}=J3(),[r,n]=y.useState("live"),i=DA(r==="live"?60:X_[r],r!=="live"),o=y.useMemo(()=>{var k;return r==="live"?t:(((k=i.data)==null?void 0:k.points)??[]).map(S=>({t:S.t*1e3,cpu:S.cpu,ram:S.ram,gpu:S.gpu,disk:S.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=hQ.filter(k=>k.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:(x=e==null?void 0:e.cpu)!=null&&x.cores?`${e.cpu.cores} Cores`:"",ram:e?`${No(e.ram.used)}/${No(e.ram.total)} GB`:"",gpu:s?`${No(e.gpu.gtt_used)}/${No(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${No(e.disk.used)}/${No(e.disk.total)} GB`:""};return b.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[b.jsx(HP,{className:"h-4.5 w-4.5 text-primary"}),b.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),r==="live"&&b.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[b.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),b.jsx("div",{className:"ml-auto",children:b.jsx(Z_,{value:r,onChange:n})})]}),e?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:u.map(k=>b.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[b.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:k.color}}),b.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:k.label}),b.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(d[k.key]??0),"%"]}),f[k.key]&&b.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:f[k.key]})]},k.key))}),r!=="live"&&o.length===0&&b.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)&&b.jsx(Q_,{data:o,series:u,unit:"%",yMode:"percent",height:176,showTime:!0})]}):b.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)&&b.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&&b.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&b.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const vP=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function mQ(){const{data:e}=$A(),t=V3(),[r,n]=y.useState("live"),i=DA(r==="live"?60:X_[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;mb.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:d.color}}),b.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:d.label}),b.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?b.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?b.jsx(Q_,{data:o,series:vP,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):b.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),b.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"}],ja=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function vQ(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 Mg(e){return Sl.reduce((t,r)=>t+(e[r.key]??0),0)}function gQ(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 yQ({t:e,scale:t}){const r=Sl.map(n=>`${n.label} ${ja(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${ja(e.mem0_ms)})`:"");return b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:vQ(e.ts)}),b.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[b.jsx("div",{className:"absolute inset-0 flex",children:Sl.map(n=>{const i=e[n.key];return!i||i<=0?null:b.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),b.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":ja(Mg(e))})]})}function xQ(){const{data:e}=j3(12),t=e??[],r=Math.max(1,...t.map(o=>Mg(o))),n=t[0],i=n?gQ(n):null;return b.jsxs("div",{className:"mc-card p-5",children:[b.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(cT,{className:"h-4.5 w-4.5 text-primary"}),b.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),b.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[b.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?b.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[b.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":ja(Mg(n))}),b.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&b.jsxs(b.Fragment,{children:[" · Täter: ",b.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",ja(i.ms)]})]})]}):b.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&b.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} ${ja(n[o.key])}`).join(" · "),n.mem0_ms!=null&&b.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",ja(n.mem0_ms)]})]})]}),b.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Sl.map(o=>b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),b.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?b.jsx("div",{className:"space-y-1.5",children:t.map(o=>b.jsx(yQ,{t:o,scale:r},o.id))}):b.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."}),b.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 Of=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function bQ({onNavigate:e}){var de,Y,ae,X;const{data:t}=RA(),{data:r}=Zg(),{data:n}=LA(),{data:i}=M3(),{data:o}=N3(),{data:s}=I3(),{data:u}=E3(),{data:d}=P3(),f=G3(),{showAlert:h,dialogElement:m}=Xg(),v=xu(),[x,k]=y.useState({});async function S(M,T){k(Z=>({...Z,[M]:!0}));try{if(T.kind==="loadModel")await Me(`/api/models/${encodeURIComponent(T.model)}/load`,{method:"POST"});else{const Z=await Me("/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{k(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 b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{children:[b.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"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[b.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[b.jsx(wQ,{verdict:f.verdict,memory:f.memory,warns:f.warns,problems:f.problems}),b.jsx(X3,{}),b.jsxs("section",{children:[b.jsx(xd,{children:"Leistung"}),b.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[b.jsx(pQ,{}),b.jsx(mQ,{})]}),b.jsx("div",{className:"mt-4",children:b.jsx(xQ,{})})]}),b.jsxs("section",{children:[b.jsx(xd,{children:"Bereiche"}),b.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[b.jsx(Io,{icon:Ug,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")}),b.jsx(Io,{icon:UP,title:"Modelle",value:E,unit:"warm",tone:E>0?"ok":"muted",hint:B?`Hirn: ${B}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),b.jsx(Io,{icon:Bg,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")}),b.jsx(Io,{icon:Nf,title:"Dienste",value:r?`${P}/${j}`:"…",unit:"laufen",tone:r?_>0?"warn":"ok":"loading",hint:G?`Ausfall: ${G}`:"Alle Dienste online",onClick:()=>Of("maintenance")}),b.jsx(Io,{icon:Hg,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:()=>Of("maintenance")}),b.jsx(Io,{icon:Wg,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")})]})]})]}),b.jsxs("div",{className:"space-y-6",children:[b.jsx(SQ,{problems:f.problems,pendingCount:N,openAuftraege:C,blockedIdeen:R,busy:x,onRepair:S,onNavigate:e}),b.jsxs("section",{children:[b.jsx(xd,{children:"Anstehendes"}),b.jsx(Z3,{})]}),b.jsxs("section",{children:[b.jsx(xd,{children:"Werkzeuge & Diagnose"}),b.jsx(kQ,{agent:o,svcErrors:_,onNavigate:e})]})]})]}),m]})}function xd({children:e}){return b.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function wQ({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:_f,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:hT,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Gs,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:i},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Gs,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 b.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:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:b.jsx(u,{className:Re("h-6 w-6",s.iconCls)})}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:s.title}),b.jsx("p",{className:"text-xs text-muted-foreground",children:s.sub})]})]}),b.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[b.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[b.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[b.jsx(fT,{className:"h-3.5 w-3.5"})," Speicher"]}),b.jsx("span",{className:Re("font-mono font-bold",d),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(1)} / ${t.totalGb.toFixed(1)} GB`})]}),b.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:b.jsx("div",{className:Re("h-full rounded-full transition-all duration-500",f),style:{width:`${t.pct}%`}})})]})]})}function SQ({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 b.jsx("div",{className:"h-full flex flex-col justify-between",children:h?b.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[b.jsx(tT,{className:"h-5 w-5 shrink-0 text-emerald-400"}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):b.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(m=>b.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:[b.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[b.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:b.jsx(m.icon,{className:"h-4.5 w-4.5"})}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("p",{className:"text-sm font-bold text-foreground",children:m.label}),b.jsx("p",{className:"truncate text-xs text-muted-foreground",children:m.detail})]})]}),m.repair&&b.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]?b.jsx(_f,{className:"h-3.5 w-3.5 animate-spin"}):b.jsx(_T,{className:"h-3.5 w-3.5"}),m.repair.label]})]},m.id)),f&&b.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:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.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:b.jsx(WP,{className:"h-4.5 w-4.5"})}),b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm font-bold text-foreground",children:[n," Karte",n===1?"":"n"," braucht deine Antwort"]}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),b.jsx(Ko,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),d&&b.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:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.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:b.jsx(Ug,{className:"h-4.5 w-4.5"})}),b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),b.jsx(Ko,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),u&&b.jsxs("button",{onClick:()=>Of("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:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.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:b.jsx(Hg,{className:"h-4.5 w-4.5"})}),b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),b.jsx(Ko,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function kQ({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:()=>Of("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return b.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:b.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 b.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:[b.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.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}),b.jsx("span",{className:Re("h-1.5 w-1.5 rounded-full",s)})]})]},o)})})})}const EQ=y.lazy(()=>sn(()=>import("./ModelsView-CoGGXlnQ.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.ModelsView}))),PQ=y.lazy(()=>sn(()=>import("./ConnectView-DegkAqmm.js"),__vite__mapDeps([5,6,7,8])).then(e=>({default:e.ConnectView}))),AQ=y.lazy(()=>sn(()=>import("./MemoryView-DNCBwc-V.js"),__vite__mapDeps([9,8,10,11])).then(e=>({default:e.MemoryView}))),OQ=y.lazy(()=>sn(()=>import("./AgentView-BsfE1obV.js"),[]).then(e=>({default:e.AgentView}))),CQ=y.lazy(()=>sn(()=>import("./KonsoleView-BbOvz3DQ.js"),[]).then(e=>({default:e.KonsoleView}))),jQ=y.lazy(()=>sn(()=>import("./GuideView-DqsY9Wr1.js"),__vite__mapDeps([12,11,3,4])).then(e=>({default:e.GuideView}))),_Q=y.lazy(()=>sn(()=>import("./AuftragsbuchView-DPitmBxF.js"),__vite__mapDeps([13,14])).then(e=>({default:e.AuftragsbuchView}))),NQ=y.lazy(()=>sn(()=>import("./IdeenView-lXJC70fR.js"),__vite__mapDeps([15,14,10,1,4,2])).then(e=>({default:e.IdeenView}))),IQ=y.lazy(()=>sn(()=>import("./ChronikView-DKRwHk9a.js"),__vite__mapDeps([16,2])).then(e=>({default:e.ChronikView}))),MQ=y.lazy(()=>sn(()=>import("./EigenlebenView-nhdxSyQi.js"),__vite__mapDeps([17,11,7])).then(e=>({default:e.EigenlebenView}))),TQ=y.lazy(()=>sn(()=>import("./WissenView-Czc4UCXS.js"),__vite__mapDeps([18,6])).then(e=>({default:e.WissenView})));function DQ(){return b.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:b.jsx(_f,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const RQ=/Mac|iPhone|iPad/.test(navigator.platform);function $Q(){q3(),k3();const[e,t]=y.useState(()=>{const S=window.location.hash.slice(1);return qo.some(E=>E.id===S)?S:"dashboard"}),r=y.useCallback(S=>{window.location.hash.slice(1)===S?t(S):window.location.hash=S},[]),[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}=TA(),{data:x}=$f();y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const S=E=>{var j;h(((j=E.detail)==null?void 0:j.tab)||"maintenance"),d(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]),y.useEffect(()=>{const S=E=>{var j;const P=(j=E.detail)==null?void 0:j.view;P&&r(P)};return window.addEventListener("mc-navigate",S),()=>window.removeEventListener("mc-navigate",S)},[r]),y.useEffect(()=>{const S=()=>{const E=window.location.hash.slice(1);qo.some(P=>P.id===E)&&t(E)};return window.addEventListener("hashchange",S),()=>window.removeEventListener("hashchange",S)},[]),y.useEffect(()=>{s(!1)},[e]);const k=qo.find(S=>S.id===e);return b.jsxs("div",{className:"flex h-full relative",children:[b.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(", ")}}),b.jsx(LR,{onNavigate:r}),b.jsx(U3,{open:u,onClose:()=>d(!1),defaultTab:f}),b.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:b.jsx(gP,{collapsed:n,onToggleCollapse:()=>{i(S=>{const E=!S;return localStorage.setItem("mc_sidebar_collapsed",E.toString()),E})},view:e,health:m,backendDown:v,sysStatus:x})}),b.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:[b.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>s(!1)}),b.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:b.jsx(gP,{collapsed:!1,onClose:()=>s(!1),view:e,health:m,backendDown:v,sysStatus:x})})]}),b.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[b.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:[b.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[b.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:b.jsx(xT,{className:"h-5 w-5","aria-hidden":"true"})}),b.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:k.hint})]}),b.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[b.jsx(b3,{}),b.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"}),b.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},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:[b.jsx(lT,{className:"h-3.5 w-3.5"}),b.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),b.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:RQ?"⌘K":"Strg+K"})]})]})]}),b.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:b.jsxs(y.Suspense,{fallback:b.jsx(DQ,{}),children:[e==="dashboard"&&b.jsx(bQ,{onNavigate:S=>r(S)}),e==="ideen"&&b.jsx(NQ,{}),e==="auftraege"&&b.jsx(_Q,{}),e==="models"&&b.jsx(EQ,{}),e==="connect"&&b.jsx(PQ,{}),e==="memory"&&b.jsx(AQ,{}),e==="wissen"&&b.jsx(TQ,{}),e==="chronik"&&b.jsx(IQ,{}),e==="eigenleben"&&b.jsx(MQ,{}),e==="agent"&&b.jsx(OQ,{}),e==="konsole"&&b.jsx(CQ,{}),e==="guide"&&b.jsx(jQ,{})]})})]})]})}function gP({collapsed:e,onToggleCollapse:t,onClose:r,view:n,health:i,backendDown:o,sysStatus:s}){var u,d,f,h,m;return b.jsxs(b.Fragment,{children:[b.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:[b.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[b.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!e&&b.jsxs("div",{className:"leading-tight",children:[b.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),b.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),t&&b.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?b.jsx(Ko,{className:"h-4 w-4","aria-hidden":"true"}):b.jsx(nT,{className:"h-4 w-4","aria-hidden":"true"})}),r&&b.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:b.jsx(bu,{className:"h-4 w-4","aria-hidden":"true"})})]}),b.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let v=null;return qo.map(x=>{const k=x.group!==v;return v=x.group,b.jsxs("div",{className:"space-y-1",children:[k&&(e?v!==qo[0].group&&b.jsx("div",{className:"my-3 border-t border-border/30"}):b.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:x.group})),b.jsxs("a",{href:`#${x.id}`,onClick:r,"aria-current":n===x.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===x.id?e?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:e?x.label:void 0,"aria-label":e?x.label:void 0,children:[b.jsx(x.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!e&&b.jsx("span",{className:"truncate",children:x.label})]})]},x.id)})})()}),b.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?b.jsx("div",{className:"flex justify-center",children:b.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"})}):b.jsxs("div",{className:"space-y-2 text-left",children:[o?b.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[b.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),b.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):i?b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"flex items-center gap-2",children:[b.jsx("span",{className:Re("h-2 w-2 rounded-full animate-pulse",i.engine_reachable?"bg-emerald-500":"bg-amber-500")}),b.jsxs("span",{className:"truncate",children:["Engine ",i.engine_reachable?"online":"offline"]})]}),i.brain&&!i.brain.ready&&b.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${i.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[b.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),b.jsxs("span",{className:"truncate",children:["Hirn offline",i.brain.model?` (${i.brain.model})`:""]})]})]}):b.jsxs("span",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",b.jsx("span",{className:"truncate",children:"Backend offline"})]}),(s==null?void 0:s.versions)&&b.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[b.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:[b.jsx("strong",{children:"MC2:"})," ",s.versions.mc2?`${s.versions.mc2.hash}${s.versions.mc2.dirty?"*":""}`:"—"]}),b.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:[b.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())||"—"]}),b.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:[b.jsx("strong",{children:"Hermes Agent:"})," ",s.versions.hermes_agent?`${s.versions.hermes_agent.hash}${s.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}class LQ extends Rg.Component{constructor(){super(...arguments);ws(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?b.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:b.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[b.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),b.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),b.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 zQ=new IM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});oM.createRoot(document.getElementById("root")).render(b.jsx(Rg.StrictMode,{children:b.jsx(LQ,{children:b.jsx(MM,{client:zQ,children:b.jsx($Q,{})})})}));export{BQ as $,jT as A,Bg as B,tT as C,rT as D,Cv as E,XQ as F,LA as G,fT as H,JQ as I,I3 as J,W1 as K,_f as L,Ko as M,iT as N,M3 as O,V1 as P,qQ as Q,CT as R,ET as S,Gs as T,VP as U,aT as V,Kg as W,bu as X,N3 as Y,sT as Z,sn as _,_3 as a,jf as a0,QM as a1,_T as a2,Vo as a3,OT as a4,As as a5,Nf as a6,UP as a7,Wg as a8,yT as a9,pk as aA,Dg as aB,cT as aa,E3 as ab,P3 as ac,nX as ad,Ug as ae,HQ as af,WP as ag,uT as ah,A3 as ai,pT as aj,XM as ak,wT as al,Hg as am,hT as an,O3 as ao,VQ as ap,K1 as aq,KQ as ar,gT as as,lf as at,Rg as au,su as av,Ek as aw,L8 as ax,My as ay,mk as az,Xg as b,ke as c,tX as d,Re as e,Mm as f,Me as g,YQ as h,WQ as i,b as j,ZM as k,RA as l,GQ as m,$f as n,QQ as o,eX as p,De as q,y as r,UQ as s,ZQ as t,xu as u,No as v,BR as w,HP as x,ST as y,rX as z}; diff --git a/frontend/dist/assets/index-D7U2T2IL.js b/frontend/dist/assets/index-D7U2T2IL.js deleted file mode 100644 index 3d51642..0000000 --- a/frontend/dist/assets/index-D7U2T2IL.js +++ /dev/null @@ -1,471 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelsView-COPS2f3N.js","assets/code-xml-CkFV2Ko3.js","assets/rotate-ccw-BWaUdhxf.js","assets/zap-pfxlcCGI.js","assets/layers-DZwkr2Nk.js","assets/ConnectView-DS-h-mAr.js","assets/folder-open-LlE6jWLt.js","assets/circle-x-sa9Q0zy2.js","assets/copy-DUEcKGga.js","assets/MemoryView-BLCZANFh.js","assets/send-Cx9Mf4tj.js","assets/book-open-Up-LJ-yQ.js","assets/GuideView-CBsLzElJ.js","assets/AuftragsbuchView-Gg_tLeQS.js","assets/SectionLabel-DDoS_VlP.js","assets/IdeenView-RZvrxznk.js","assets/ChronikView-DgGuP7UV.js","assets/EigenlebenView-CFhcs_et.js","assets/WissenView-d_MZxg2H.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:"Schreib hin, was entstehen soll",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-COPS2f3N.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.ModelsView}))),IQ=y.lazy(()=>un(()=>import("./ConnectView-DS-h-mAr.js"),__vite__mapDeps([5,6,7,8])).then(e=>({default:e.ConnectView}))),MQ=y.lazy(()=>un(()=>import("./MemoryView-BLCZANFh.js"),__vite__mapDeps([9,8,10,11])).then(e=>({default:e.MemoryView}))),TQ=y.lazy(()=>un(()=>import("./AgentView-CNx_Fgn9.js"),[]).then(e=>({default:e.AgentView}))),DQ=y.lazy(()=>un(()=>import("./KonsoleView-BD68w4l1.js"),[]).then(e=>({default:e.KonsoleView}))),RQ=y.lazy(()=>un(()=>import("./GuideView-CBsLzElJ.js"),__vite__mapDeps([12,11,3,4])).then(e=>({default:e.GuideView}))),$Q=y.lazy(()=>un(()=>import("./AuftragsbuchView-Gg_tLeQS.js"),__vite__mapDeps([13,14])).then(e=>({default:e.AuftragsbuchView}))),LQ=y.lazy(()=>un(()=>import("./IdeenView-RZvrxznk.js"),__vite__mapDeps([15,14,10,1,4,2])).then(e=>({default:e.IdeenView}))),zQ=y.lazy(()=>un(()=>import("./ChronikView-DgGuP7UV.js"),__vite__mapDeps([16,2])).then(e=>({default:e.ChronikView}))),FQ=y.lazy(()=>un(()=>import("./EigenlebenView-CFhcs_et.js"),__vite__mapDeps([17,11,7])).then(e=>({default:e.EigenlebenView}))),BQ=y.lazy(()=>un(()=>import("./WissenView-d_MZxg2H.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,VP as ag,dT 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}; diff --git a/frontend/dist/assets/layers-DZwkr2Nk.js b/frontend/dist/assets/layers-C62c1z5s.js similarity index 91% rename from frontend/dist/assets/layers-DZwkr2Nk.js rename to frontend/dist/assets/layers-C62c1z5s.js index 7b3c7a7..a84e80f 100644 --- a/frontend/dist/assets/layers-DZwkr2Nk.js +++ b/frontend/dist/assets/layers-C62c1z5s.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D7U2T2IL.js";/** +import{c as a}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/rotate-ccw-BWaUdhxf.js b/frontend/dist/assets/rotate-ccw-CPYnjQ6M.js similarity index 88% rename from frontend/dist/assets/rotate-ccw-BWaUdhxf.js rename to frontend/dist/assets/rotate-ccw-CPYnjQ6M.js index 7fa6228..3c95b20 100644 --- a/frontend/dist/assets/rotate-ccw-BWaUdhxf.js +++ b/frontend/dist/assets/rotate-ccw-CPYnjQ6M.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-D7U2T2IL.js";/** +import{c as t}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/send-Cx9Mf4tj.js b/frontend/dist/assets/send-CS1kRsDf.js similarity index 90% rename from frontend/dist/assets/send-Cx9Mf4tj.js rename to frontend/dist/assets/send-CS1kRsDf.js index 75b0fad..2fcdad7 100644 --- a/frontend/dist/assets/send-Cx9Mf4tj.js +++ b/frontend/dist/assets/send-CS1kRsDf.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D7U2T2IL.js";/** +import{c as a}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/assets/zap-pfxlcCGI.js b/frontend/dist/assets/zap-I2SMIyr4.js similarity index 96% rename from frontend/dist/assets/zap-pfxlcCGI.js rename to frontend/dist/assets/zap-I2SMIyr4.js index f78f248..7eef42c 100644 --- a/frontend/dist/assets/zap-pfxlcCGI.js +++ b/frontend/dist/assets/zap-I2SMIyr4.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-D7U2T2IL.js";/** +import{c as a}from"./index-BChEIiQl.js";/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 6fbc92a..134e2d3 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,7 +7,7 @@ Mission Control 2.0 - + diff --git a/frontend/src/components/dashboard/GovernorCard.tsx b/frontend/src/components/dashboard/GovernorCard.tsx deleted file mode 100644 index 1a4a779..0000000 --- a/frontend/src/components/dashboard/GovernorCard.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import { Fuel, ShieldAlert, Check } from "lucide-react" -import { useGovernor } from "@/lib/queries" -import type { GovernorRun } from "@/lib/api" - -// ── Token-Wächter („Tankuhr mit Handbremse") ──────────────────────────────── -// Zeigt in Klartext, wie voll die laufende Coding-Sitzung ist. Zwei Marken: -// Soft = ab hier bittet der Governor um einen Savepoint (Sitzung sauber beenden) -// Hart = ab hier antwortet er selbst und lässt das Modell gar nicht mehr ran -// Die Zeile „Schätzung vs. Wahrheit" ist der Ehrlichkeits-Nachweis: bis 25.07. lag der -// Governor bei werkzeugdichten Agenten um Faktor 3 daneben, weil er Werkzeug-Schemata -// nicht mitzählte. Jetzt lernt er aus den echten prompt_tokens jeder Antwort. - -const fmtNum = (n: number | null | undefined) => - n == null ? "–" : n.toLocaleString("de-DE") - -function ago(ts: number): string { - const s = Math.max(0, Date.now() / 1000 - ts) - if (s < 60) return `vor ${Math.round(s)} s` - if (s < 3600) return `vor ${Math.round(s / 60)} min` - return `vor ${Math.round(s / 3600)} h` -} - -const ACTION_META: Record = { - 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" }, -} - -/** Abweichung Schätzung↔Wahrheit in Prozent — der Ehrlichkeits-Messwert. */ -function drift(run: GovernorRun | undefined): number | null { - if (!run?.est || !run?.exact) return null - return ((run.est - run.exact) / run.exact) * 100 -} - -export function GovernorCard() { - const { data } = useGovernor() - - if (!data?.reachable) { - return ( -
-
- -

Token-Wächter

-
-
- Nicht erreichbar. Die Coding-Sitzungen laufen dann ohne Sitzungs-Bremse. -
- {data?.error ?? "keine Antwort von :8100"} -
-
-
- ) - } - - const soft = data.soft ?? 0 - const hard = data.hard ?? null - const runs = data.recent ?? [] - // Nur echte Bau-Läufe füllen die Tankuhr; Lucys Gespräche sind ausgenommen. - const lastBuild = runs.find((r) => !(data.exempt_models ?? []).includes(r.model)) - const füllung = lastBuild?.exact ?? lastBuild?.est ?? 0 - const skala = Math.max(hard ?? soft * 1.2, soft * 1.2, füllung) - const pct = Math.min(100, (füllung / skala) * 100) - const abw = drift(runs.find((r) => r.est != null && r.exact != null)) - const c = data.counters - - const tone = - hard && füllung >= hard ? "bg-rose-500" - : füllung >= soft ? "bg-amber-500" - : "bg-emerald-500" - - return ( -
-
-
-
- -

Token-Wächter

- - live - -
-
- - {fmtNum(füllung)} - - - Tokens in der letzten Bau-Anfrage - -
-
-
-
- Savepoint ab {fmtNum(soft)} -
- {hard != null && ( -
- Stopp ab {fmtNum(hard)} -
- )} -
-
- - {/* Tankuhr */} -
-
-
- {hard != null && ( -
- )} -
- - {/* Zählerstand */} -
- {[ - { k: "Anfragen", v: fmtNum(c?.chat) }, - { k: "Savepoints", v: fmtNum(c?.soft) }, - { k: "Stopps", v: fmtNum(c?.hard) }, - { k: "Tokens ges.", v: fmtNum(c?.tokens_prompt) }, - ].map((x) => ( -
-
{x.v}
-
{x.k}
-
- ))} -
- - {/* Ehrlichkeits-Nachweis */} - {abw != null && ( -
- {Math.abs(abw) < 15 - ? - : } - - Schätzung lag{" "} - - {abw > 0 ? "+" : ""}{abw.toFixed(1)} % - {" "} - neben der Wahrheit — er kalibriert sich aus jeder Antwort selbst nach. - -
- )} - - {/* Letzte Läufe */} - {runs.length > 0 && ( -
- {runs.slice(0, 5).map((r, i) => { - const m = ACTION_META[r.action] ?? { label: r.action, tone: "text-muted-foreground" } - return ( -
- {ago(r.t)} - {r.model || "?"} - - {fmtNum(r.exact ?? r.est)} - {r.exact != null && r.est != null && ( - (geschätzt {fmtNum(r.est)}) - )} - - {m.label} -
- ) - })} -
- )} - -
- Alle Coding-Agenten laufen durch den Wächter (:8100). Lucys Alltagsmodelle sind - ausgenommen — ein Gespräch ist keine Bau-Sitzung und wird nie unterbrochen. -
-
- ) -} diff --git a/frontend/src/views/cockpit/CockpitView.tsx b/frontend/src/views/cockpit/CockpitView.tsx index 744c95e..dc47445 100644 --- a/frontend/src/views/cockpit/CockpitView.tsx +++ b/frontend/src/views/cockpit/CockpitView.tsx @@ -18,7 +18,6 @@ import { ErinnerungenCard } from "./ErinnerungenCard" import { SystemStatusCard } from "@/components/dashboard/SystemStatusCard" import { TokenPerformanceCard } from "@/components/dashboard/TokenPerformanceCard" import { LatencyCard } from "@/components/dashboard/LatencyCard" -import { GovernorCard } from "@/components/dashboard/GovernorCard" // Öffnet die bestehende System-Schublade (Pflege/Logs) via globalem Event. const openDrawer = (tab: "maintenance" | "logs") => @@ -129,10 +128,6 @@ export function CockpitView({ onNavigate }: { onNavigate: (v: string) => void })
- {/* Token-Wächter: wie voll ist die laufende Coding-Sitzung, und wie ehrlich zählt er */} -
- -
{/* Bereichs-Kacheln (6 statt 7 - Logs ist in die Werkzeug-Liste gewandert) */}