local-operator-ui 0.17.0 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main/index.js +2481 -346
- package/out/preload/index.js +51 -3
- package/out/renderer/assets/{_basePickBy-BJr_fQtB.js → _basePickBy-BvMhn6vs.js} +1 -1
- package/out/renderer/assets/{_baseUniq-CYir-14_.js → _baseUniq-BK8pe4uQ.js} +1 -1
- package/out/renderer/assets/{agent-details-page-D6PQzszA.js → agent-details-page-CBSLlAOk.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-BU8BMGm-.js → agent-hub-page-CrP4o6ZW.js} +1 -1
- package/out/renderer/assets/{agents-page-3jWcFYcZ.js → agents-page-C6OY5Mpg.js} +2 -2
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-CCErX8Tf.js → architectureDiagram-IEHRJDOE-D8MpYATY.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-CUvjtfSj.js → blockDiagram-JOT3LUYC-B_I3ZONm.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-VeJwMCKK.js → c4Diagram-VJAJSXHY-DfXBiy8U.js} +1 -1
- package/out/renderer/assets/channel-QCRg_PDl.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-3Bq4xtvZ.js → chunk-4BMEZGHF-BJ8Xa2j3.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-B3y7xV7i.js → chunk-A2AXSNBT-C0NnqsE4.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-EVfEpH4f.js → chunk-AEK57VVT-BtRuzQyQ.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-DMvU3WoU.js → chunk-D6G4REZN-BauYOOAw.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-IvUVaxD4.js → chunk-RZ5BOZE2-BzhuQ5O_.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-qRGLrBmi.js → chunk-XZIHB7SX-Ct2eCcqa.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-Bi3kPe4h.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-Bi3kPe4h.js +1 -0
- package/out/renderer/assets/clone-A5TnVgxX.js +1 -0
- package/out/renderer/assets/{compact-pagination-C9MHaQh8.js → compact-pagination-Bou_Wr8n.js} +1 -1
- package/out/renderer/assets/{dagre-OKDRZEBW-mkOM0foV.js → dagre-OKDRZEBW-CTPq15Dg.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-nPhdvd43.js → diagram-SSKATNLV-C3Osiilj.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-DwSuRePG.js → diagram-VNBRO52H-Dz1J2itu.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-H_hDC8d0.js → erDiagram-Q7BY3M3F-hZV4173D.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-COn1sttR.js → flowDiagram-4HSFHLVR-DJ26Mgv9.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-DbxYzA4C.js → ganttDiagram-APWFNJXF-CetzfqU-.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-GJA88tpY.js → gitGraphDiagram-7IBYFJ6S-p6uBXV2t.js} +1 -1
- package/out/renderer/assets/{graph-CDkZGsbw.js → graph-DkNd5Vg_.js} +1 -1
- package/out/renderer/assets/icon-2KHv58kf.css +1 -0
- package/out/renderer/assets/{index-Coj74S4F.js → index-CH2sMRee.js} +1 -1
- package/out/renderer/assets/{index-CVSo1eIn.js → index-CsQcGUS4.js} +299 -298
- package/out/renderer/assets/{index-DyRL2cJn.js → index-DA5ogML6.js} +1 -1
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-DCDmAfuD.js → infoDiagram-PH2N3AL5-JCL1S2jO.js} +1 -1
- package/out/renderer/assets/{installer-JsKFFZ0N.js → installer-CwpKGBgz.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-D5zuKm0h.js → journeyDiagram-U35MCT3I-bsiOJp5O.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-D28NqnN2.js → kanban-definition-NDS4AKOZ-DqSB69IY.js} +1 -1
- package/out/renderer/assets/{layout-B__Skqp8.js → layout-DOCr1qf_.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-d_nYp_Kx.js → legacy-agents-page-BjfTT7Fq.js} +1 -1
- package/out/renderer/assets/{mermaid.core-BHfHBA6R.js → mermaid.core-B5-LsuoJ.js} +5 -5
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-DKRrQTAb.js → mindmap-definition-ALO5MXBD-6EZdR0xM.js} +1 -1
- package/out/renderer/assets/{page-header-JYwkpfbT.js → page-header-C-9zjakn.js} +1 -1
- package/out/renderer/assets/{parseISO-D2eiqdi5.js → parseISO-Dwm8HpJw.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-B1BtzilZ.js → pieDiagram-IB7DONF6-DJpMDsKb.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-2ZnW_kzE.js → quadrantDiagram-7GDLP6J5-DijmJtPz.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-BxdSoZJX.js → radar-MK3ICKWK-BTOUZlXe.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-Bi1-KXYI.js → radient-auth-buttons-Dwc9qPW2.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-6W-9ZOiF.js → requirementDiagram-KVF5MWMF-D3lSHecQ.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DsCO-xHN.js → sankeyDiagram-QLVOVGJD-0iNyBkZV.js} +1 -1
- package/out/renderer/assets/{schedules-page-BGkrdg_o.js → schedules-page-DardPLDn.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DTsOsVHj.js → sequenceDiagram-X6HHIX6F-CY9L6HEa.js} +1 -1
- package/out/renderer/assets/{settings-page-UqW8Dofa.js → settings-page-CjgBGEXW.js} +29 -29
- package/out/renderer/assets/{square-pen-DOIqaj9i.js → square-pen-2Yxvf_S9.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-Hgu5z66Y.js → stateDiagram-DGXRK772-DJ_q4gER.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CM2f7MUh.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-BkaQadIG.js → timeline-definition-BDJGKUSR-D0Y8Jbrj.js} +1 -1
- package/out/renderer/assets/{use-agent-like-mutation-BSrvgpki.js → use-agent-like-mutation-BXxHLNnI.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-DuWwCccB.js → xychartDiagram-VJFVF3MP-Bj6ktAuR.js} +1 -1
- package/out/renderer/index.html +3 -3
- package/out/renderer/installer.html +3 -3
- package/package.json +5 -3
- package/out/renderer/assets/channel-BtWQQlRJ.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-C298zC-3.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-C298zC-3.js +0 -1
- package/out/renderer/assets/clone-dCQCshht.js +0 -1
- package/out/renderer/assets/icon-DM6KYqqV.css +0 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BrBwSEFe.js +0 -1
- /package/out/renderer/assets/{icon-D9xnujmI.js → icon-2OdwuA9u.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as me,r as T,j as m,B as V,S as
|
|
1
|
+
import{a as me,r as T,j as m,B as V,S as Ke,G as Im,J as In,h as ie,K as J,m as j,g as Mm,t as Yu,A as Ae,I as bt,T as Zu,M as $m,N as Nm,O as Rm,Q as Dm,U as Ju,X as cf,u as Lr,L as mt,V as Dx,c as Nt,Y as qm,x as qx,z as Lx,Z as Bx,_ as Fx,i as zx,f as Lm}from"./icon-2OdwuA9u.js";import{aX as Wx,aY as lf,aZ as ff,az as Ux,g as Sn,aA as Bm,aB as pl,a1 as Fm,f as zm,M as Gx,a2 as Kx,ao as Hx,a_ as Vx,a$ as Ct,b0 as hl,b1 as Wm,ai as Xx,b2 as df,b3 as Yx,j as nr,b as Um,d as Gm,b4 as Km,aF as Zx,b5 as Jx,b6 as Un,a8 as Hm,b7 as Vm,b8 as Br,al as Qx,b9 as Xm,ba as e0,P as t0,bb as Ym,J as r0,bc as Zm,ak as Jm,bd as n0,a6 as a0,be as Qm,aO as Qu,aI as i0,bf as o0,i as s0,bg as u0,aD as c0,bh as l0,bi as f0,bj as d0,av as pf,bk as p0,aH as hf,bl as h0,bm as v0,aJ as y0,aK as m0,aG as ni,bn as g0,bo as b0,bp as x0,bq as w0,br as O0}from"./index-CsQcGUS4.js";import{P as S0}from"./page-header-C-9zjakn.js";import{S as _e,I as vl,a as Ie,R as A0,N as P0}from"./radient-auth-buttons-Dwc9qPW2.js";import{S as _0}from"./square-pen-2Yxvf_S9.js";import{a as j0,P as Q,H as E0,p as ai}from"./parseISO-Dwm8HpJw.js";import{w as eg,n as tg,M as yl,a as de,S as T0,T as C0,l as rg,b as He,t as Ea,p as ec,s as Gn,c as ng,F as k0,G as I0,H as M0,I as $0,J as N0,K as R0,L as D0,N as q0,O as L0,k as B0,P as F0,Q as z0}from"./step-DMJAOHzS.js";import{b as tc,p as Fr}from"./band-CquvqAHh.js";import{d as Kn,n as W0,e as U0,i as ml,f as rc,g as zt,h as gl,a as bl,j as vf,k as G0,m as K0,o as at,c as H0,p as Ta,q as ag,l as nc,r as V0}from"./linear-BfLTrHPc.js";import{m as yf,a as mf,p as X0,q as Y0,u as Z0,s as J0,r as Q0,v as ew,w as tw,x as rw,y as nw,z as aw,A as iw,B as ow,t as sw}from"./time-BOTM2Tp0.js";import{i as wt,a as lt}from"./init-Dmth1JHB.js";import{i as uw,o as cw}from"./ordinal-DILIJJjt.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -88,7 +88,7 @@ import{a as me,r as T,j as m,B as V,S as Ge,G as Im,J as In,h as ie,K as J,m as
|
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Ww=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Uw=me("zap",Ww),Kw=()=>{const[t,e]=T.useState(!1),[r,n]=T.useState(!1),[a,i]=T.useState(null),[o,s]=T.useState("info"),[u,c]=T.useState(null),f=T.useRef(!1),{clearDeferredUpdate:l}=Wx();T.useEffect(()=>{const y=window.api.updater.onUpdateError(b=>{if(!f.current)return;const S=["ENOENT: no such file or directory, open","Could not get code signature for running application","Cannot find latest.yml"].some(g=>b.includes(g));b.includes("manually")?(c({message:"Please update the local-operator package manually using pip.",command:"pip install --upgrade local-operator"}),s("warning"),n(!0)):S||(i(b),s("danger"),n(!0))}),v=window.api.updater.onUpdateNotAvailable(()=>{f.current&&(i("You are up to date"),s("success"),n(!0))}),p=window.api.updater.onBackendUpdateNotAvailable(()=>{f.current&&(i("The server is up to date"),s("success"),n(!0))}),x=window.api.updater.onBackendUpdateDevMode(b=>{f.current&&(i(b),s("info"),n(!0))});return()=>{y(),v(),p(),x()}},[]);const d=async()=>{try{e(!0),f.current=!0,l(ff.UI),l(ff.BACKEND),await window.api.updater.checkForAllUpdates()}catch(y){i(`Error checking for updates: ${y instanceof Error?y.message:String(y)}`),s("danger"),n(!0)}finally{e(!1),setTimeout(()=>{f.current=!1},2e3)}},h=()=>{n(!1),i(null)};return m.jsxs(m.Fragment,{children:[m.jsxs(V,{variant:"outline",onClick:d,disabled:t,children:[t?m.jsx(Ge,{size:"sm"}):null,t?"Checking...":"Check for updates"]}),u&&m.jsxs(lf,{open:r,autoHideDuration:1e4,onClose:h,variant:"warning",children:[m.jsx("p",{className:"text-body-sm",children:u.message}),m.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:u.command})]}),a&&m.jsx(lf,{open:r,autoHideDuration:6e3,onClose:h,variant:o,children:a})]})},Wn=["system-prompt"],Gw=()=>{const{shouldEnableQuery:t}=Ux();return Sn({enabled:t({bypassInternetCheck:!0}),queryKey:Wn,queryFn:async()=>{try{const r=await Bm(pl.baseUrl).config.getSystemPrompt();if(r===null)return null;if(r.status>=400)throw new Error(r.message||"Failed to fetch system prompt");return r.result}catch(e){const r=e instanceof Error?e.message:"An unknown error occurred while fetching system prompt";throw Fm(r),e}},refetchOnWindowFocus:!1,staleTime:5e3})},Hw=()=>{const t=zm(),e=Bm(pl.baseUrl);return Kx({mutationFn:async r=>{try{const n=await e.config.updateSystemPrompt(r);if(n.status>=400)throw new Error(n.message||"Failed to update system prompt");return n.result}catch(n){const a=n instanceof Error?n.message:"An unknown error occurred while updating system prompt";throw Fm(a),n}},onSuccess:async r=>{await t.invalidateQueries({queryKey:Wn,refetchType:"none"}),t.setQueryData(Wn,n=>n&&{...n,...r}),await t.refetchQueries({queryKey:Wn,type:"all"}),Gx("System prompt updated")},onError:r=>{console.error("Error updating system prompt:",r)}})},Vw=({value:t,label:e,description:r,onChange:n,icon:a,isSaving:i=!1})=>{const[o,s]=T.useState(t),u=T.useId(),c=`${u}-label`,f=`${u}-description`,l=async d=>{if(!i){s(d);try{await n(d)}catch(h){s(!d),console.error("Error toggling setting:",h)}}};return m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("span",{id:c,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[a&&m.jsx(a,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),e]}),r&&m.jsx("p",{id:f,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:r})]}),m.jsx("div",{className:"flex h-6 shrink-0 items-center",children:i?m.jsx(Ge,{size:"md",label:`Saving ${e}`}):m.jsx(Im,{checked:o,onCheckedChange:l,"aria-labelledby":c,"aria-describedby":r?f:void 0})})]})};function gf(t,e){const r=Hx(t,e?.in);if(!Vx(r))throw new RangeError("Invalid time value");const n=Ct(r.getDate(),2),a=Ct(r.getMonth()+1,2),i=r.getFullYear(),o=Ct(r.getHours(),2),s=Ct(r.getMinutes(),2),u=Ct(r.getSeconds(),2);let c="",f="";const l=r.getTimezoneOffset();if(l!==0){const d=Math.abs(l),h=Ct(Math.trunc(d/60),2),y=Ct(d%60,2);f=`${l<0?"+":"-"}${h}:${y}`}else f="Z";return`${i}-${a}-${n}T${o}:${s}:${u}${c}${f}`}function Xw(t,e,r){return j0(t,-30,r)}function Yw(t=Gn){if(t===Gn)return og;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function og(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function sg(t,e,r=0,n=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(a=a===void 0?og:Yw(a);n>r;){if(n-r>600){const u=n-r+1,c=e-r+1,f=Math.log(u),l=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*l*(u-l)/u)*(c-u/2<0?-1:1),h=Math.max(r,Math.floor(e-c*l/u+d)),y=Math.min(n,Math.floor(e+(u-c)*l/u+d));sg(t,e,h,y,a)}const i=t[e];let o=r,s=n;for(Cr(t,r,e),a(t[n],i)>0&&Cr(t,r,n);o<s;){for(Cr(t,o,s),++o,--s;a(t[o],i)<0;)++o;for(;a(t[s],i)>0;)--s}a(t[r],i)===0?Cr(t,r,s):(++s,Cr(t,s,n)),s<=e&&(r=s+1),e<=s&&(n=s-1)}return t}function Cr(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function Zw(t,e,r){if(t=Float64Array.from(W0(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return yf(t);if(e>=1)return mf(t);var n,a=(n-1)*e,i=Math.floor(a),o=mf(sg(t,i).subarray(0,i+1)),s=yf(t.subarray(i+1));return o+(s-o)*(a-i)}}function Jw(t,e,r=U0){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,a=(n-1)*e,i=Math.floor(a),o=+r(t[i],i,t),s=+r(t[i+1],i+1,t);return o+(s-o)*(a-i)}}function Qw(t,e){e===void 0&&(e=t,t=ml);for(var r=0,n=e.length-1,a=e[0],i=new Array(n<0?0:n);r<n;)i[r]=t(a,a=e[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function ug(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,rc),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return ug(t).unknown(e)},t=arguments.length?Array.from(t,rc):[0,1],zt(r)}function bf(t){return Math.log(t)}function xf(t){return Math.exp(t)}function eO(t){return-Math.log(-t)}function tO(t){return-Math.exp(-t)}function rO(t){return isFinite(t)?+("1e"+t):t<0?0:t}function nO(t){return t===10?rO:t===Math.E?Math.exp:e=>Math.pow(t,e)}function aO(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function wf(t){return(e,r)=>-t(-e,r)}function xl(t){const e=t(bf,xf),r=e.domain;let n=10,a,i;function o(){return a=aO(n),i=nO(n),r()[0]<0?(a=wf(a),i=wf(i),t(eO,tO)):t(bf,xf),e}return e.base=function(s){return arguments.length?(n=+s,o()):n},e.domain=function(s){return arguments.length?(r(s),o()):r()},e.ticks=s=>{const u=r();let c=u[0],f=u[u.length-1];const l=f<c;l&&([c,f]=[f,c]);let d=a(c),h=a(f),y,v;const p=s==null?10:+s;let x=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/i(-d):y*i(d),!(v<c)){if(v>f)break;x.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/i(-d):y*i(d),!(v<c)){if(v>f)break;x.push(v)}x.length*2<p&&(x=vf(c,f,p))}else x=vf(d,h,Math.min(h-d,p)).map(i);return l?x.reverse():x},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=K0(u)).precision==null&&(u.trim=!0),u=G0(u)),s===1/0)return u;const c=Math.max(1,n*s/e.ticks().length);return f=>{let l=f/i(Math.round(a(f)));return l*n<n-.5&&(l*=n),l<=c?u(f):""}},e.nice=()=>r(X0(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),e}function cg(){const t=xl(gl()).domain([1,10]);return t.copy=()=>bl(t,cg()).base(t.base()),wt.apply(t,arguments),t}function Of(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Sf(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function wl(t){var e=1,r=t(Of(e),Sf(e));return r.constant=function(n){return arguments.length?t(Of(e=+n),Sf(e)):e},zt(r)}function lg(){var t=wl(gl());return t.copy=function(){return bl(t,lg()).constant(t.constant())},wt.apply(t,arguments)}function Af(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function iO(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function oO(t){return t<0?-t*t:t*t}function Ol(t){var e=t(at,at),r=1;function n(){return r===1?t(at,at):r===.5?t(iO,oO):t(Af(r),Af(1/r))}return e.exponent=function(a){return arguments.length?(r=+a,n()):r},zt(e)}function Sl(){var t=Ol(gl());return t.copy=function(){return bl(t,Sl()).exponent(t.exponent())},wt.apply(t,arguments),t}function sO(){return Sl.apply(null,arguments).exponent(.5)}function Pf(t){return Math.sign(t)*t*t}function uO(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function fg(){var t=H0(),e=[0,1],r=!1,n;function a(i){var o=uO(t(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return t.invert(Pf(i))},a.domain=function(i){return arguments.length?(t.domain(i),a):t.domain()},a.range=function(i){return arguments.length?(t.range((e=Array.from(i,rc)).map(Pf)),a):e.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(t.clamp(i),a):t.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return fg(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},wt.apply(a,arguments),zt(a)}function dg(){var t=[],e=[],r=[],n;function a(){var o=0,s=Math.max(1,e.length);for(r=new Array(s-1);++o<s;)r[o-1]=Jw(t,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:e[Ta(r,o)]}return i.invertExtent=function(o){var s=e.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:t[0],s<r.length?r[s]:t[t.length-1]]},i.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let s of o)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(Gn),a()},i.range=function(o){return arguments.length?(e=Array.from(o),a()):e.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return dg().domain(t).range(e).unknown(n)},wt.apply(i,arguments)}function pg(){var t=0,e=1,r=1,n=[.5],a=[0,1],i;function o(u){return u!=null&&u<=u?a[Ta(n,u,0,r)]:i}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*e-(u-r)*t)/(r+1);return o}return o.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},o.range=function(u){return arguments.length?(r=(a=Array.from(u)).length-1,s()):a.slice()},o.invertExtent=function(u){var c=a.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,n[0]]:c>=r?[n[r-1],e]:[n[c-1],n[c]]},o.unknown=function(u){return arguments.length&&(i=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return pg().domain([t,e]).range(a).unknown(i)},wt.apply(zt(o),arguments)}function hg(){var t=[.5],e=[0,1],r,n=1;function a(i){return i!=null&&i<=i?e[Ta(t,i,0,n)]:r}return a.domain=function(i){return arguments.length?(t=Array.from(i),n=Math.min(t.length,e.length-1),a):t.slice()},a.range=function(i){return arguments.length?(e=Array.from(i),n=Math.min(t.length,e.length-1),a):e.slice()},a.invertExtent=function(i){var o=e.indexOf(i);return[t[o-1],t[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return hg().domain(t).range(e).unknown(r)},wt.apply(a,arguments)}function cO(){return wt.apply(Y0(ow,iw,aw,nw,rw,tw,ew,Q0,J0,Z0).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ca(){var t=0,e=1,r,n,a,i,o=at,s=!1,u;function c(l){return l==null||isNaN(l=+l)?u:o(a===0?.5:(l=(i(l)-r)*a,s?Math.max(0,Math.min(1,l)):l))}c.domain=function(l){return arguments.length?([t,e]=l,r=i(t=+t),n=i(e=+e),a=r===n?0:1/(n-r),c):[t,e]},c.clamp=function(l){return arguments.length?(s=!!l,c):s},c.interpolator=function(l){return arguments.length?(o=l,c):o};function f(l){return function(d){var h,y;return arguments.length?([h,y]=d,o=l(h,y),c):[o(0),o(1)]}}return c.range=f(ml),c.rangeRound=f(ag),c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return i=l,r=l(t),n=l(e),a=r===n?0:1/(n-r),c}}function Ot(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function vg(){var t=zt(Ca()(at));return t.copy=function(){return Ot(t,vg())},lt.apply(t,arguments)}function yg(){var t=xl(Ca()).domain([1,10]);return t.copy=function(){return Ot(t,yg()).base(t.base())},lt.apply(t,arguments)}function mg(){var t=wl(Ca());return t.copy=function(){return Ot(t,mg()).constant(t.constant())},lt.apply(t,arguments)}function Al(){var t=Ol(Ca());return t.copy=function(){return Ot(t,Al()).exponent(t.exponent())},lt.apply(t,arguments)}function lO(){return Al.apply(null,arguments).exponent(.5)}function gg(){var t=[],e=at;function r(n){if(n!=null&&!isNaN(n=+n))return e((Ta(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let a of n)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Gn),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,a)=>e(a/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>Zw(t,i/n))},r.copy=function(){return gg(e).domain(t)},lt.apply(r,arguments)}function ka(){var t=0,e=.5,r=1,n=1,a,i,o,s,u,c=at,f,l=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-i)*(n*v<n*i?s:u),c(l?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([t,e,r]=v,a=f(t=+t),i=f(e=+e),o=f(r=+r),s=a===i?0:.5/(i-a),u=i===o?0:.5/(o-i),n=i<a?-1:1,h):[t,e,r]},h.clamp=function(v){return arguments.length?(l=!!v,h):l},h.interpolator=function(v){return arguments.length?(c=v,h):c};function y(v){return function(p){var x,b,w;return arguments.length?([x,b,w]=p,c=Qw(v,[x,b,w]),h):[c(0),c(.5),c(1)]}}return h.range=y(ml),h.rangeRound=y(ag),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return f=v,a=v(t),i=v(e),o=v(r),s=a===i?0:.5/(i-a),u=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function bg(){var t=zt(ka()(at));return t.copy=function(){return Ot(t,bg())},lt.apply(t,arguments)}function xg(){var t=xl(ka()).domain([.1,1,10]);return t.copy=function(){return Ot(t,xg()).base(t.base())},lt.apply(t,arguments)}function wg(){var t=wl(ka());return t.copy=function(){return Ot(t,wg()).constant(t.constant())},lt.apply(t,arguments)}function Pl(){var t=Ol(ka());return t.copy=function(){return Ot(t,Pl()).exponent(t.exponent())},lt.apply(t,arguments)}function fO(){return Pl.apply(null,arguments).exponent(.5)}function Mn(t,e,r){var n=null,a=de(!0),i=null,o=yl,s=null,u=eg(c);t=typeof t=="function"?t:t===void 0?T0:de(+t),e=typeof e=="function"?e:e===void 0?de(0):de(+e),r=typeof r=="function"?r:r===void 0?C0:de(+r);function c(l){var d,h,y,v=(l=tg(l)).length,p,x=!1,b,w=new Array(v),S=new Array(v);for(i==null&&(s=o(b=u())),d=0;d<=v;++d){if(!(d<v&&a(p=l[d],d,l))===x)if(x=!x)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=d-1;y>=h;--y)s.point(w[y],S[y]);s.lineEnd(),s.areaEnd()}x&&(w[d]=+t(p,d,l),S[d]=+e(p,d,l),s.point(n?+n(p,d,l):w[d],r?+r(p,d,l):S[d]))}if(b)return s=null,b+""||null}function f(){return rg().defined(a).curve(o).context(i)}return c.x=function(l){return arguments.length?(t=typeof l=="function"?l:de(+l),n=null,c):t},c.x0=function(l){return arguments.length?(t=typeof l=="function"?l:de(+l),c):t},c.x1=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:de(+l),c):n},c.y=function(l){return arguments.length?(e=typeof l=="function"?l:de(+l),r=null,c):e},c.y0=function(l){return arguments.length?(e=typeof l=="function"?l:de(+l),c):e},c.y1=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:de(+l),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(l){return arguments.length?(a=typeof l=="function"?l:de(!!l),c):a},c.curve=function(l){return arguments.length?(o=l,i!=null&&(s=o(i)),c):o},c.context=function(l){return arguments.length?(l==null?i=s=null:s=o(i=l),c):i},c}const _l={draw(t,e){const r=He(e/ec);t.moveTo(r,0),t.arc(0,0,r,0,Ea)}},dO={draw(t,e){const r=He(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Og=He(1/3),pO=Og*2,hO={draw(t,e){const r=He(e/pO),n=r*Og;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},vO={draw(t,e){const r=He(e),n=-r/2;t.rect(n,n,r,r)}},yO=.8908130915292852,Sg=Kn(ec/10)/Kn(7*ec/10),mO=Kn(Ea/10)*Sg,gO=-ng(Ea/10)*Sg,bO={draw(t,e){const r=He(e*yO),n=mO*r,a=gO*r;t.moveTo(0,-r),t.lineTo(n,a);for(let i=1;i<5;++i){const o=Ea*i/5,s=ng(o),u=Kn(o);t.lineTo(u*r,-s*r),t.lineTo(s*n-u*a,u*n+s*a)}t.closePath()}},ii=He(3),xO={draw(t,e){const r=-He(e/(ii*3));t.moveTo(0,r*2),t.lineTo(-ii*r,-r),t.lineTo(ii*r,-r),t.closePath()}},Ne=-.5,Re=He(3)/2,ac=1/He(12),wO=(ac/2+1)*3,OO={draw(t,e){const r=He(e/wO),n=r/2,a=r*ac,i=n,o=r*ac+r,s=-i,u=o;t.moveTo(n,a),t.lineTo(i,o),t.lineTo(s,u),t.lineTo(Ne*n-Re*a,Re*n+Ne*a),t.lineTo(Ne*i-Re*o,Re*i+Ne*o),t.lineTo(Ne*s-Re*u,Re*s+Ne*u),t.lineTo(Ne*n+Re*a,Ne*a-Re*n),t.lineTo(Ne*i+Re*o,Ne*o-Re*i),t.lineTo(Ne*s+Re*u,Ne*u-Re*s),t.closePath()}};function SO(t,e){let r=null,n=eg(a);t=typeof t=="function"?t:de(t||_l),e=typeof e=="function"?e:de(e===void 0?64:+e);function a(){let i;if(r||(r=i=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(t=typeof i=="function"?i:de(i),a):t},a.size=function(i){return arguments.length?(e=typeof i=="function"?i:de(+i),a):e},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function ar(t,e){if((o=t.length)>1)for(var r=1,n,a,i=t[e[0]],o,s=i.length;r<o;++r)for(a=i,i=t[e[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function ic(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function AO(t,e){return t[e]}function PO(t){const e=[];return e.key=t,e}function _O(){var t=de([]),e=ic,r=ar,n=AO;function a(i){var o=Array.from(t.apply(this,arguments),PO),s,u=o.length,c=-1,f;for(const l of i)for(s=0,++c;s<u;++s)(o[s][c]=[0,+n(l,o[s].key,c,i)]).data=l;for(s=0,f=tg(e(o));s<u;++s)o[f[s]].index=s;return r(o,f),o}return a.keys=function(i){return arguments.length?(t=typeof i=="function"?i:de(Array.from(i)),a):t},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:de(+i),a):n},a.order=function(i){return arguments.length?(e=i==null?ic:typeof i=="function"?i:de(Array.from(i)),a):e},a.offset=function(i){return arguments.length?(r=i??ar,a):r},a}function jO(t,e){if((n=t.length)>0){for(var r,n,a=0,i=t[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=t[r][a][1]||0;if(o)for(r=0;r<n;++r)t[r][a][1]/=o}ar(t,e)}}function EO(t,e){if((a=t.length)>0){for(var r=0,n=t[e[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=t[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ar(t,e)}}function TO(t,e){if(!(!((o=t.length)>0)||!((i=(a=t[e[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,u=0,c=0;s<o;++s){for(var f=t[e[s]],l=f[n][1]||0,d=f[n-1][1]||0,h=(l-d)/2,y=0;y<s;++y){var v=t[e[y]],p=v[n][1]||0,x=v[n-1][1]||0;h+=p-x}u+=l,c+=h*l}a[n-1][1]+=a[n-1][0]=r,u&&(r-=c/u)}a[n-1][1]+=a[n-1][0]=r,ar(t,e)}}const CO=["radient","creditBalance"],kO=t=>{const{user:e,isAuthenticated:r}=hl(),n=e?.account?.tenant_id,a=r&&!!n&&t?.enabled;return Sn({queryKey:[CO,n],queryFn:async()=>{if(!n)throw new Error("Tenant ID not available");const i=await Wm({operation:"credits",tenantId:n});if(!i||typeof i.balance!="number")throw new Error("Invalid credit balance response format");return i},enabled:a,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};function IO(t,e){const[r,n]=T.useState(!1);return T.useEffect(()=>{if(!t){n(!1);return}const a=setTimeout(()=>n(!0),e);return()=>clearTimeout(a)},[t,e]),r}const MO=["radient","usageRollup"],$O=(t,e)=>{const{user:r,isAuthenticated:n}=hl(),a=r?.account?.tenant_id,i=n&&!!a&&e?.enabled;return Sn({queryKey:[...MO,a,t],queryFn:async()=>{if(!a)throw new Error("Tenant ID not available");const o={};for(const[u,c]of Object.entries(t))c!=null&&(o[u]=String(c));const s=await Wm({operation:"usage",tenantId:a,query:o});if(!s)throw new Error("Invalid usage rollup response format");return s},enabled:i,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};var oi,_f;function je(){if(_f)return oi;_f=1;var t=Array.isArray;return oi=t,oi}var si,jf;function Ag(){if(jf)return si;jf=1;var t=typeof In=="object"&&In&&In.Object===Object&&In;return si=t,si}var ui,Ef;function et(){if(Ef)return ui;Ef=1;var t=Ag(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return ui=r,ui}var ci,Tf;function An(){if(Tf)return ci;Tf=1;var t=et(),e=t.Symbol;return ci=e,ci}var li,Cf;function NO(){if(Cf)return li;Cf=1;var t=An(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,a=t?t.toStringTag:void 0;function i(o){var s=r.call(o,a),u=o[a];try{o[a]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(s?o[a]=u:delete o[a]),f}return li=i,li}var fi,kf;function RO(){if(kf)return fi;kf=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return fi=r,fi}var di,If;function ft(){if(If)return di;If=1;var t=An(),e=NO(),r=RO(),n="[object Null]",a="[object Undefined]",i=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?a:n:i&&i in Object(s)?e(s):r(s)}return di=o,di}var pi,Mf;function dt(){if(Mf)return pi;Mf=1;function t(e){return e!=null&&typeof e=="object"}return pi=t,pi}var hi,$f;function Sr(){if($f)return hi;$f=1;var t=ft(),e=dt(),r="[object Symbol]";function n(a){return typeof a=="symbol"||e(a)&&t(a)==r}return hi=n,hi}var vi,Nf;function jl(){if(Nf)return vi;Nf=1;var t=je(),e=Sr(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){if(t(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||e(i)?!0:n.test(i)||!r.test(i)||o!=null&&i in Object(o)}return vi=a,vi}var yi,Rf;function St(){if(Rf)return yi;Rf=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return yi=t,yi}var mi,Df;function El(){if(Df)return mi;Df=1;var t=ft(),e=St(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(s){if(!e(s))return!1;var u=t(s);return u==n||u==a||u==r||u==i}return mi=o,mi}var gi,qf;function DO(){if(qf)return gi;qf=1;var t=et(),e=t["__core-js_shared__"];return gi=e,gi}var bi,Lf;function qO(){if(Lf)return bi;Lf=1;var t=DO(),e=function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!e&&e in n}return bi=r,bi}var xi,Bf;function Pg(){if(Bf)return xi;Bf=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return xi=r,xi}var wi,Ff;function LO(){if(Ff)return wi;Ff=1;var t=El(),e=qO(),r=St(),n=Pg(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,f=RegExp("^"+u.call(c).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(d){if(!r(d)||e(d))return!1;var h=t(d)?f:i;return h.test(n(d))}return wi=l,wi}var Oi,zf;function BO(){if(zf)return Oi;zf=1;function t(e,r){return e?.[r]}return Oi=t,Oi}var Si,Wf;function Wt(){if(Wf)return Si;Wf=1;var t=LO(),e=BO();function r(n,a){var i=e(n,a);return t(i)?i:void 0}return Si=r,Si}var Ai,Uf;function Ia(){if(Uf)return Ai;Uf=1;var t=Wt(),e=t(Object,"create");return Ai=e,Ai}var Pi,Kf;function FO(){if(Kf)return Pi;Kf=1;var t=Ia();function e(){this.__data__=t?t(null):{},this.size=0}return Pi=e,Pi}var _i,Gf;function zO(){if(Gf)return _i;Gf=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return _i=t,_i}var ji,Hf;function WO(){if(Hf)return ji;Hf=1;var t=Ia(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(t){var s=o[i];return s===e?void 0:s}return n.call(o,i)?o[i]:void 0}return ji=a,ji}var Ei,Vf;function UO(){if(Vf)return Ei;Vf=1;var t=Ia(),e=Object.prototype,r=e.hasOwnProperty;function n(a){var i=this.__data__;return t?i[a]!==void 0:r.call(i,a)}return Ei=n,Ei}var Ti,Xf;function KO(){if(Xf)return Ti;Xf=1;var t=Ia(),e="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=t&&a===void 0?e:a,this}return Ti=r,Ti}var Ci,Yf;function GO(){if(Yf)return Ci;Yf=1;var t=FO(),e=zO(),r=WO(),n=UO(),a=KO();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Ci=i,Ci}var ki,Zf;function HO(){if(Zf)return ki;Zf=1;function t(){this.__data__=[],this.size=0}return ki=t,ki}var Ii,Jf;function Tl(){if(Jf)return Ii;Jf=1;function t(e,r){return e===r||e!==e&&r!==r}return Ii=t,Ii}var Mi,Qf;function Ma(){if(Qf)return Mi;Qf=1;var t=Tl();function e(r,n){for(var a=r.length;a--;)if(t(r[a][0],n))return a;return-1}return Mi=e,Mi}var $i,ed;function VO(){if(ed)return $i;ed=1;var t=Ma(),e=Array.prototype,r=e.splice;function n(a){var i=this.__data__,o=t(i,a);if(o<0)return!1;var s=i.length-1;return o==s?i.pop():r.call(i,o,1),--this.size,!0}return $i=n,$i}var Ni,td;function XO(){if(td)return Ni;td=1;var t=Ma();function e(r){var n=this.__data__,a=t(n,r);return a<0?void 0:n[a][1]}return Ni=e,Ni}var Ri,rd;function YO(){if(rd)return Ri;rd=1;var t=Ma();function e(r){return t(this.__data__,r)>-1}return Ri=e,Ri}var Di,nd;function ZO(){if(nd)return Di;nd=1;var t=Ma();function e(r,n){var a=this.__data__,i=t(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Di=e,Di}var qi,ad;function $a(){if(ad)return qi;ad=1;var t=HO(),e=VO(),r=XO(),n=YO(),a=ZO();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,qi=i,qi}var Li,id;function Cl(){if(id)return Li;id=1;var t=Wt(),e=et(),r=t(e,"Map");return Li=r,Li}var Bi,od;function JO(){if(od)return Bi;od=1;var t=GO(),e=$a(),r=Cl();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Bi=n,Bi}var Fi,sd;function QO(){if(sd)return Fi;sd=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Fi=t,Fi}var zi,ud;function Na(){if(ud)return zi;ud=1;var t=QO();function e(r,n){var a=r.__data__;return t(n)?a[typeof n=="string"?"string":"hash"]:a.map}return zi=e,zi}var Wi,cd;function eS(){if(cd)return Wi;cd=1;var t=Na();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Wi=e,Wi}var Ui,ld;function tS(){if(ld)return Ui;ld=1;var t=Na();function e(r){return t(this,r).get(r)}return Ui=e,Ui}var Ki,fd;function rS(){if(fd)return Ki;fd=1;var t=Na();function e(r){return t(this,r).has(r)}return Ki=e,Ki}var Gi,dd;function nS(){if(dd)return Gi;dd=1;var t=Na();function e(r,n){var a=t(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return Gi=e,Gi}var Hi,pd;function kl(){if(pd)return Hi;pd=1;var t=JO(),e=eS(),r=tS(),n=rS(),a=nS();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Hi=i,Hi}var Vi,hd;function _g(){if(hd)return Vi;hd=1;var t=kl(),e="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(e);var i=function(){var o=arguments,s=a?a.apply(this,o):o[0],u=i.cache;if(u.has(s))return u.get(s);var c=n.apply(this,o);return i.cache=u.set(s,c)||u,c};return i.cache=new(r.Cache||t),i}return r.Cache=t,Vi=r,Vi}var Xi,vd;function aS(){if(vd)return Xi;vd=1;var t=_g(),e=500;function r(n){var a=t(n,function(o){return i.size===e&&i.clear(),o}),i=a.cache;return a}return Xi=r,Xi}var Yi,yd;function iS(){if(yd)return Yi;yd=1;var t=aS(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(e,function(o,s,u,c){i.push(u?c.replace(r,"$1"):s||o)}),i});return Yi=n,Yi}var Zi,md;function Il(){if(md)return Zi;md=1;function t(e,r){for(var n=-1,a=e==null?0:e.length,i=Array(a);++n<a;)i[n]=r(e[n],n,e);return i}return Zi=t,Zi}var Ji,gd;function oS(){if(gd)return Ji;gd=1;var t=An(),e=Il(),r=je(),n=Sr(),a=t?t.prototype:void 0,i=a?a.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(n(s))return i?i.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return Ji=o,Ji}var Qi,bd;function jg(){if(bd)return Qi;bd=1;var t=oS();function e(r){return r==null?"":t(r)}return Qi=e,Qi}var eo,xd;function Eg(){if(xd)return eo;xd=1;var t=je(),e=jl(),r=iS(),n=jg();function a(i,o){return t(i)?i:e(i,o)?[i]:r(n(i))}return eo=a,eo}var to,wd;function Ra(){if(wd)return to;wd=1;var t=Sr();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return to=e,to}var ro,Od;function Ml(){if(Od)return ro;Od=1;var t=Eg(),e=Ra();function r(n,a){a=t(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[e(a[i++])];return i&&i==o?n:void 0}return ro=r,ro}var no,Sd;function Tg(){if(Sd)return no;Sd=1;var t=Ml();function e(r,n,a){var i=r==null?void 0:t(r,n);return i===void 0?a:i}return no=e,no}var sS=Tg();const De=ie(sS);var ao,Ad;function uS(){if(Ad)return ao;Ad=1;function t(e){return e==null}return ao=t,ao}var cS=uS();const X=ie(cS);var io,Pd;function lS(){if(Pd)return io;Pd=1;var t=ft(),e=je(),r=dt(),n="[object String]";function a(i){return typeof i=="string"||!e(i)&&r(i)&&t(i)==n}return io=a,io}var fS=lS();const Dt=ie(fS);var dS=El();const H=ie(dS);var pS=St();const Ar=ie(pS);var oo={exports:{}},ee={};/**
|
|
91
|
+
*/const Ww=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Uw=me("zap",Ww),Gw=()=>{const t="https://local-operator.com/download",[e,r]=T.useState(!1),[n,a]=T.useState(!1),[i,o]=T.useState(null),[s,u]=T.useState("info"),[c,f]=T.useState(null),[l,d]=T.useState(null),h=T.useRef(!1),{clearDeferredUpdate:y}=Wx();T.useEffect(()=>{const x=window.api.updater.onUpdateError(g=>{if(!h.current)return;const A=["ENOENT: no such file or directory, open","Could not get code signature for running application","Cannot find latest.yml"].some(_=>g.includes(_));g.includes("manually")?(f({message:"The server is installed outside the app, so use the tool you installed it with - uv, pipx or pip.",command:""}),u("warning"),a(!0)):A||(o(g),u("danger"),a(!0))}),b=window.api.updater.onUpdateNotAvailable(()=>{h.current&&(o("You are up to date"),u("success"),a(!0))}),w=window.api.updater.onBackendUpdateNotAvailable(()=>{h.current&&(o("The server is up to date"),u("success"),a(!0))}),S=window.api.updater.onBackendUpdateDevMode(g=>{h.current&&(o(g),u("info"),a(!0))});return()=>{x(),b(),w(),S()}},[]),T.useEffect(()=>{let x=!1;const b=()=>{window.api.updater.getLastInstallAttempt().then(S=>{x||d(S)}).catch(()=>{})};b();const w=window.api.updater.onUpdateInstallFailed(()=>b());return()=>{x=!0,w()}},[]);const v=async()=>{try{r(!0),h.current=!0,y(ff.UI),y(ff.BACKEND),await window.api.updater.checkForAllUpdates({manual:!0})}catch(x){o(`Error checking for updates: ${x instanceof Error?x.message:String(x)}`),u("danger"),a(!0)}finally{r(!1),setTimeout(()=>{h.current=!1},2e3)}},p=()=>{a(!1),o(null)};return m.jsxs(m.Fragment,{children:[l&&m.jsxs("div",{className:"mb-3 rounded-sm bg-sunken p-3",children:[m.jsxs("p",{className:"text-body-sm text-ink",children:["The last update to version ",l.targetVersion," didn't finish",l.attempts>1?` (${l.attempts} attempts)`:"",". Version ",l.runningVersion," is running."]}),m.jsxs("p",{className:"mt-1 text-meta text-ink-dim",children:["Detected"," ",l.detectedAt?new Date(l.detectedAt).toLocaleString():"at an unknown time",". ",l.detail]}),m.jsx(V,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>void window.api.openExternal(t),children:"Download a fresh copy"})]}),m.jsxs(V,{variant:"outline",onClick:()=>void v(),disabled:e,children:[e?m.jsx(Ke,{size:"sm"}):null,e?"Checking...":"Check for updates"]}),c&&m.jsxs(lf,{open:n,autoHideDuration:1e4,onClose:p,variant:"warning",children:[m.jsx("p",{className:"text-body-sm",children:c.message}),c.command&&m.jsx("code",{className:"mt-2 block rounded-sm bg-sunken p-2 text-mono-sm text-ink",children:c.command})]}),i&&m.jsx(lf,{open:n,autoHideDuration:6e3,onClose:p,variant:s,children:i})]})},Wn=["system-prompt"],Kw=()=>{const{shouldEnableQuery:t}=Ux();return Sn({enabled:t({bypassInternetCheck:!0}),queryKey:Wn,queryFn:async()=>{try{const r=await Bm(pl.baseUrl).config.getSystemPrompt();if(r===null)return null;if(r.status>=400)throw new Error(r.message||"Failed to fetch system prompt");return r.result}catch(e){const r=e instanceof Error?e.message:"An unknown error occurred while fetching system prompt";throw Fm(r),e}},refetchOnWindowFocus:!1,staleTime:5e3})},Hw=()=>{const t=zm(),e=Bm(pl.baseUrl);return Gx({mutationFn:async r=>{try{const n=await e.config.updateSystemPrompt(r);if(n.status>=400)throw new Error(n.message||"Failed to update system prompt");return n.result}catch(n){const a=n instanceof Error?n.message:"An unknown error occurred while updating system prompt";throw Fm(a),n}},onSuccess:async r=>{await t.invalidateQueries({queryKey:Wn,refetchType:"none"}),t.setQueryData(Wn,n=>n&&{...n,...r}),await t.refetchQueries({queryKey:Wn,type:"all"}),Kx("System prompt updated")},onError:r=>{console.error("Error updating system prompt:",r)}})},Vw=({value:t,label:e,description:r,onChange:n,icon:a,isSaving:i=!1})=>{const[o,s]=T.useState(t),u=T.useId(),c=`${u}-label`,f=`${u}-description`,l=async d=>{if(!i){s(d);try{await n(d)}catch(h){s(!d),console.error("Error toggling setting:",h)}}};return m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("span",{id:c,className:"flex min-h-6 items-center gap-2 text-body text-ink",children:[a&&m.jsx(a,{size:14,"aria-hidden":"true",className:"shrink-0 text-ink-dim"}),e]}),r&&m.jsx("p",{id:f,className:"mt-0.5 max-w-2xl text-body-sm text-ink-muted",children:r})]}),m.jsx("div",{className:"flex h-6 shrink-0 items-center",children:i?m.jsx(Ke,{size:"md",label:`Saving ${e}`}):m.jsx(Im,{checked:o,onCheckedChange:l,"aria-labelledby":c,"aria-describedby":r?f:void 0})})]})};function gf(t,e){const r=Hx(t,e?.in);if(!Vx(r))throw new RangeError("Invalid time value");const n=Ct(r.getDate(),2),a=Ct(r.getMonth()+1,2),i=r.getFullYear(),o=Ct(r.getHours(),2),s=Ct(r.getMinutes(),2),u=Ct(r.getSeconds(),2);let c="",f="";const l=r.getTimezoneOffset();if(l!==0){const d=Math.abs(l),h=Ct(Math.trunc(d/60),2),y=Ct(d%60,2);f=`${l<0?"+":"-"}${h}:${y}`}else f="Z";return`${i}-${a}-${n}T${o}:${s}:${u}${c}${f}`}function Xw(t,e,r){return j0(t,-30,r)}function Yw(t=Kn){if(t===Kn)return og;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function og(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function sg(t,e,r=0,n=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(a=a===void 0?og:Yw(a);n>r;){if(n-r>600){const u=n-r+1,c=e-r+1,f=Math.log(u),l=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*l*(u-l)/u)*(c-u/2<0?-1:1),h=Math.max(r,Math.floor(e-c*l/u+d)),y=Math.min(n,Math.floor(e+(u-c)*l/u+d));sg(t,e,h,y,a)}const i=t[e];let o=r,s=n;for(Cr(t,r,e),a(t[n],i)>0&&Cr(t,r,n);o<s;){for(Cr(t,o,s),++o,--s;a(t[o],i)<0;)++o;for(;a(t[s],i)>0;)--s}a(t[r],i)===0?Cr(t,r,s):(++s,Cr(t,s,n)),s<=e&&(r=s+1),e<=s&&(n=s-1)}return t}function Cr(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function Zw(t,e,r){if(t=Float64Array.from(W0(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return yf(t);if(e>=1)return mf(t);var n,a=(n-1)*e,i=Math.floor(a),o=mf(sg(t,i).subarray(0,i+1)),s=yf(t.subarray(i+1));return o+(s-o)*(a-i)}}function Jw(t,e,r=U0){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,a=(n-1)*e,i=Math.floor(a),o=+r(t[i],i,t),s=+r(t[i+1],i+1,t);return o+(s-o)*(a-i)}}function Qw(t,e){e===void 0&&(e=t,t=ml);for(var r=0,n=e.length-1,a=e[0],i=new Array(n<0?0:n);r<n;)i[r]=t(a,a=e[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function ug(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,rc),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return ug(t).unknown(e)},t=arguments.length?Array.from(t,rc):[0,1],zt(r)}function bf(t){return Math.log(t)}function xf(t){return Math.exp(t)}function eO(t){return-Math.log(-t)}function tO(t){return-Math.exp(-t)}function rO(t){return isFinite(t)?+("1e"+t):t<0?0:t}function nO(t){return t===10?rO:t===Math.E?Math.exp:e=>Math.pow(t,e)}function aO(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function wf(t){return(e,r)=>-t(-e,r)}function xl(t){const e=t(bf,xf),r=e.domain;let n=10,a,i;function o(){return a=aO(n),i=nO(n),r()[0]<0?(a=wf(a),i=wf(i),t(eO,tO)):t(bf,xf),e}return e.base=function(s){return arguments.length?(n=+s,o()):n},e.domain=function(s){return arguments.length?(r(s),o()):r()},e.ticks=s=>{const u=r();let c=u[0],f=u[u.length-1];const l=f<c;l&&([c,f]=[f,c]);let d=a(c),h=a(f),y,v;const p=s==null?10:+s;let x=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/i(-d):y*i(d),!(v<c)){if(v>f)break;x.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/i(-d):y*i(d),!(v<c)){if(v>f)break;x.push(v)}x.length*2<p&&(x=vf(c,f,p))}else x=vf(d,h,Math.min(h-d,p)).map(i);return l?x.reverse():x},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=G0(u)).precision==null&&(u.trim=!0),u=K0(u)),s===1/0)return u;const c=Math.max(1,n*s/e.ticks().length);return f=>{let l=f/i(Math.round(a(f)));return l*n<n-.5&&(l*=n),l<=c?u(f):""}},e.nice=()=>r(X0(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),e}function cg(){const t=xl(gl()).domain([1,10]);return t.copy=()=>bl(t,cg()).base(t.base()),wt.apply(t,arguments),t}function Of(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Sf(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function wl(t){var e=1,r=t(Of(e),Sf(e));return r.constant=function(n){return arguments.length?t(Of(e=+n),Sf(e)):e},zt(r)}function lg(){var t=wl(gl());return t.copy=function(){return bl(t,lg()).constant(t.constant())},wt.apply(t,arguments)}function Af(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function iO(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function oO(t){return t<0?-t*t:t*t}function Ol(t){var e=t(at,at),r=1;function n(){return r===1?t(at,at):r===.5?t(iO,oO):t(Af(r),Af(1/r))}return e.exponent=function(a){return arguments.length?(r=+a,n()):r},zt(e)}function Sl(){var t=Ol(gl());return t.copy=function(){return bl(t,Sl()).exponent(t.exponent())},wt.apply(t,arguments),t}function sO(){return Sl.apply(null,arguments).exponent(.5)}function Pf(t){return Math.sign(t)*t*t}function uO(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function fg(){var t=H0(),e=[0,1],r=!1,n;function a(i){var o=uO(t(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return t.invert(Pf(i))},a.domain=function(i){return arguments.length?(t.domain(i),a):t.domain()},a.range=function(i){return arguments.length?(t.range((e=Array.from(i,rc)).map(Pf)),a):e.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(t.clamp(i),a):t.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return fg(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},wt.apply(a,arguments),zt(a)}function dg(){var t=[],e=[],r=[],n;function a(){var o=0,s=Math.max(1,e.length);for(r=new Array(s-1);++o<s;)r[o-1]=Jw(t,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:e[Ta(r,o)]}return i.invertExtent=function(o){var s=e.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:t[0],s<r.length?r[s]:t[t.length-1]]},i.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let s of o)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(Kn),a()},i.range=function(o){return arguments.length?(e=Array.from(o),a()):e.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return dg().domain(t).range(e).unknown(n)},wt.apply(i,arguments)}function pg(){var t=0,e=1,r=1,n=[.5],a=[0,1],i;function o(u){return u!=null&&u<=u?a[Ta(n,u,0,r)]:i}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*e-(u-r)*t)/(r+1);return o}return o.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},o.range=function(u){return arguments.length?(r=(a=Array.from(u)).length-1,s()):a.slice()},o.invertExtent=function(u){var c=a.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,n[0]]:c>=r?[n[r-1],e]:[n[c-1],n[c]]},o.unknown=function(u){return arguments.length&&(i=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return pg().domain([t,e]).range(a).unknown(i)},wt.apply(zt(o),arguments)}function hg(){var t=[.5],e=[0,1],r,n=1;function a(i){return i!=null&&i<=i?e[Ta(t,i,0,n)]:r}return a.domain=function(i){return arguments.length?(t=Array.from(i),n=Math.min(t.length,e.length-1),a):t.slice()},a.range=function(i){return arguments.length?(e=Array.from(i),n=Math.min(t.length,e.length-1),a):e.slice()},a.invertExtent=function(i){var o=e.indexOf(i);return[t[o-1],t[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return hg().domain(t).range(e).unknown(r)},wt.apply(a,arguments)}function cO(){return wt.apply(Y0(ow,iw,aw,nw,rw,tw,ew,Q0,J0,Z0).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ca(){var t=0,e=1,r,n,a,i,o=at,s=!1,u;function c(l){return l==null||isNaN(l=+l)?u:o(a===0?.5:(l=(i(l)-r)*a,s?Math.max(0,Math.min(1,l)):l))}c.domain=function(l){return arguments.length?([t,e]=l,r=i(t=+t),n=i(e=+e),a=r===n?0:1/(n-r),c):[t,e]},c.clamp=function(l){return arguments.length?(s=!!l,c):s},c.interpolator=function(l){return arguments.length?(o=l,c):o};function f(l){return function(d){var h,y;return arguments.length?([h,y]=d,o=l(h,y),c):[o(0),o(1)]}}return c.range=f(ml),c.rangeRound=f(ag),c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return i=l,r=l(t),n=l(e),a=r===n?0:1/(n-r),c}}function Ot(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function vg(){var t=zt(Ca()(at));return t.copy=function(){return Ot(t,vg())},lt.apply(t,arguments)}function yg(){var t=xl(Ca()).domain([1,10]);return t.copy=function(){return Ot(t,yg()).base(t.base())},lt.apply(t,arguments)}function mg(){var t=wl(Ca());return t.copy=function(){return Ot(t,mg()).constant(t.constant())},lt.apply(t,arguments)}function Al(){var t=Ol(Ca());return t.copy=function(){return Ot(t,Al()).exponent(t.exponent())},lt.apply(t,arguments)}function lO(){return Al.apply(null,arguments).exponent(.5)}function gg(){var t=[],e=at;function r(n){if(n!=null&&!isNaN(n=+n))return e((Ta(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let a of n)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Kn),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,a)=>e(a/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>Zw(t,i/n))},r.copy=function(){return gg(e).domain(t)},lt.apply(r,arguments)}function ka(){var t=0,e=.5,r=1,n=1,a,i,o,s,u,c=at,f,l=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-i)*(n*v<n*i?s:u),c(l?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([t,e,r]=v,a=f(t=+t),i=f(e=+e),o=f(r=+r),s=a===i?0:.5/(i-a),u=i===o?0:.5/(o-i),n=i<a?-1:1,h):[t,e,r]},h.clamp=function(v){return arguments.length?(l=!!v,h):l},h.interpolator=function(v){return arguments.length?(c=v,h):c};function y(v){return function(p){var x,b,w;return arguments.length?([x,b,w]=p,c=Qw(v,[x,b,w]),h):[c(0),c(.5),c(1)]}}return h.range=y(ml),h.rangeRound=y(ag),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return f=v,a=v(t),i=v(e),o=v(r),s=a===i?0:.5/(i-a),u=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function bg(){var t=zt(ka()(at));return t.copy=function(){return Ot(t,bg())},lt.apply(t,arguments)}function xg(){var t=xl(ka()).domain([.1,1,10]);return t.copy=function(){return Ot(t,xg()).base(t.base())},lt.apply(t,arguments)}function wg(){var t=wl(ka());return t.copy=function(){return Ot(t,wg()).constant(t.constant())},lt.apply(t,arguments)}function Pl(){var t=Ol(ka());return t.copy=function(){return Ot(t,Pl()).exponent(t.exponent())},lt.apply(t,arguments)}function fO(){return Pl.apply(null,arguments).exponent(.5)}function Mn(t,e,r){var n=null,a=de(!0),i=null,o=yl,s=null,u=eg(c);t=typeof t=="function"?t:t===void 0?T0:de(+t),e=typeof e=="function"?e:e===void 0?de(0):de(+e),r=typeof r=="function"?r:r===void 0?C0:de(+r);function c(l){var d,h,y,v=(l=tg(l)).length,p,x=!1,b,w=new Array(v),S=new Array(v);for(i==null&&(s=o(b=u())),d=0;d<=v;++d){if(!(d<v&&a(p=l[d],d,l))===x)if(x=!x)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=d-1;y>=h;--y)s.point(w[y],S[y]);s.lineEnd(),s.areaEnd()}x&&(w[d]=+t(p,d,l),S[d]=+e(p,d,l),s.point(n?+n(p,d,l):w[d],r?+r(p,d,l):S[d]))}if(b)return s=null,b+""||null}function f(){return rg().defined(a).curve(o).context(i)}return c.x=function(l){return arguments.length?(t=typeof l=="function"?l:de(+l),n=null,c):t},c.x0=function(l){return arguments.length?(t=typeof l=="function"?l:de(+l),c):t},c.x1=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:de(+l),c):n},c.y=function(l){return arguments.length?(e=typeof l=="function"?l:de(+l),r=null,c):e},c.y0=function(l){return arguments.length?(e=typeof l=="function"?l:de(+l),c):e},c.y1=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:de(+l),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(l){return arguments.length?(a=typeof l=="function"?l:de(!!l),c):a},c.curve=function(l){return arguments.length?(o=l,i!=null&&(s=o(i)),c):o},c.context=function(l){return arguments.length?(l==null?i=s=null:s=o(i=l),c):i},c}const _l={draw(t,e){const r=He(e/ec);t.moveTo(r,0),t.arc(0,0,r,0,Ea)}},dO={draw(t,e){const r=He(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Og=He(1/3),pO=Og*2,hO={draw(t,e){const r=He(e/pO),n=r*Og;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},vO={draw(t,e){const r=He(e),n=-r/2;t.rect(n,n,r,r)}},yO=.8908130915292852,Sg=Gn(ec/10)/Gn(7*ec/10),mO=Gn(Ea/10)*Sg,gO=-ng(Ea/10)*Sg,bO={draw(t,e){const r=He(e*yO),n=mO*r,a=gO*r;t.moveTo(0,-r),t.lineTo(n,a);for(let i=1;i<5;++i){const o=Ea*i/5,s=ng(o),u=Gn(o);t.lineTo(u*r,-s*r),t.lineTo(s*n-u*a,u*n+s*a)}t.closePath()}},ii=He(3),xO={draw(t,e){const r=-He(e/(ii*3));t.moveTo(0,r*2),t.lineTo(-ii*r,-r),t.lineTo(ii*r,-r),t.closePath()}},Ne=-.5,Re=He(3)/2,ac=1/He(12),wO=(ac/2+1)*3,OO={draw(t,e){const r=He(e/wO),n=r/2,a=r*ac,i=n,o=r*ac+r,s=-i,u=o;t.moveTo(n,a),t.lineTo(i,o),t.lineTo(s,u),t.lineTo(Ne*n-Re*a,Re*n+Ne*a),t.lineTo(Ne*i-Re*o,Re*i+Ne*o),t.lineTo(Ne*s-Re*u,Re*s+Ne*u),t.lineTo(Ne*n+Re*a,Ne*a-Re*n),t.lineTo(Ne*i+Re*o,Ne*o-Re*i),t.lineTo(Ne*s+Re*u,Ne*u-Re*s),t.closePath()}};function SO(t,e){let r=null,n=eg(a);t=typeof t=="function"?t:de(t||_l),e=typeof e=="function"?e:de(e===void 0?64:+e);function a(){let i;if(r||(r=i=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(t=typeof i=="function"?i:de(i),a):t},a.size=function(i){return arguments.length?(e=typeof i=="function"?i:de(+i),a):e},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function ar(t,e){if((o=t.length)>1)for(var r=1,n,a,i=t[e[0]],o,s=i.length;r<o;++r)for(a=i,i=t[e[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function ic(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function AO(t,e){return t[e]}function PO(t){const e=[];return e.key=t,e}function _O(){var t=de([]),e=ic,r=ar,n=AO;function a(i){var o=Array.from(t.apply(this,arguments),PO),s,u=o.length,c=-1,f;for(const l of i)for(s=0,++c;s<u;++s)(o[s][c]=[0,+n(l,o[s].key,c,i)]).data=l;for(s=0,f=tg(e(o));s<u;++s)o[f[s]].index=s;return r(o,f),o}return a.keys=function(i){return arguments.length?(t=typeof i=="function"?i:de(Array.from(i)),a):t},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:de(+i),a):n},a.order=function(i){return arguments.length?(e=i==null?ic:typeof i=="function"?i:de(Array.from(i)),a):e},a.offset=function(i){return arguments.length?(r=i??ar,a):r},a}function jO(t,e){if((n=t.length)>0){for(var r,n,a=0,i=t[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=t[r][a][1]||0;if(o)for(r=0;r<n;++r)t[r][a][1]/=o}ar(t,e)}}function EO(t,e){if((a=t.length)>0){for(var r=0,n=t[e[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=t[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ar(t,e)}}function TO(t,e){if(!(!((o=t.length)>0)||!((i=(a=t[e[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,u=0,c=0;s<o;++s){for(var f=t[e[s]],l=f[n][1]||0,d=f[n-1][1]||0,h=(l-d)/2,y=0;y<s;++y){var v=t[e[y]],p=v[n][1]||0,x=v[n-1][1]||0;h+=p-x}u+=l,c+=h*l}a[n-1][1]+=a[n-1][0]=r,u&&(r-=c/u)}a[n-1][1]+=a[n-1][0]=r,ar(t,e)}}const CO=["radient","creditBalance"],kO=t=>{const{user:e,isAuthenticated:r}=hl(),n=e?.account?.tenant_id,a=r&&!!n&&t?.enabled;return Sn({queryKey:[CO,n],queryFn:async()=>{if(!n)throw new Error("Tenant ID not available");const i=await Wm({operation:"credits",tenantId:n});if(!i||typeof i.balance!="number")throw new Error("Invalid credit balance response format");return i},enabled:a,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};function IO(t,e){const[r,n]=T.useState(!1);return T.useEffect(()=>{if(!t){n(!1);return}const a=setTimeout(()=>n(!0),e);return()=>clearTimeout(a)},[t,e]),r}const MO=["radient","usageRollup"],$O=(t,e)=>{const{user:r,isAuthenticated:n}=hl(),a=r?.account?.tenant_id,i=n&&!!a&&e?.enabled;return Sn({queryKey:[...MO,a,t],queryFn:async()=>{if(!a)throw new Error("Tenant ID not available");const o={};for(const[u,c]of Object.entries(t))c!=null&&(o[u]=String(c));const s=await Wm({operation:"usage",tenantId:a,query:o});if(!s)throw new Error("Invalid usage rollup response format");return s},enabled:i,staleTime:5*60*1e3,refetchOnWindowFocus:!0})};var oi,_f;function je(){if(_f)return oi;_f=1;var t=Array.isArray;return oi=t,oi}var si,jf;function Ag(){if(jf)return si;jf=1;var t=typeof In=="object"&&In&&In.Object===Object&&In;return si=t,si}var ui,Ef;function et(){if(Ef)return ui;Ef=1;var t=Ag(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return ui=r,ui}var ci,Tf;function An(){if(Tf)return ci;Tf=1;var t=et(),e=t.Symbol;return ci=e,ci}var li,Cf;function NO(){if(Cf)return li;Cf=1;var t=An(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,a=t?t.toStringTag:void 0;function i(o){var s=r.call(o,a),u=o[a];try{o[a]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(s?o[a]=u:delete o[a]),f}return li=i,li}var fi,kf;function RO(){if(kf)return fi;kf=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return fi=r,fi}var di,If;function ft(){if(If)return di;If=1;var t=An(),e=NO(),r=RO(),n="[object Null]",a="[object Undefined]",i=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?a:n:i&&i in Object(s)?e(s):r(s)}return di=o,di}var pi,Mf;function dt(){if(Mf)return pi;Mf=1;function t(e){return e!=null&&typeof e=="object"}return pi=t,pi}var hi,$f;function Sr(){if($f)return hi;$f=1;var t=ft(),e=dt(),r="[object Symbol]";function n(a){return typeof a=="symbol"||e(a)&&t(a)==r}return hi=n,hi}var vi,Nf;function jl(){if(Nf)return vi;Nf=1;var t=je(),e=Sr(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){if(t(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||e(i)?!0:n.test(i)||!r.test(i)||o!=null&&i in Object(o)}return vi=a,vi}var yi,Rf;function St(){if(Rf)return yi;Rf=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return yi=t,yi}var mi,Df;function El(){if(Df)return mi;Df=1;var t=ft(),e=St(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(s){if(!e(s))return!1;var u=t(s);return u==n||u==a||u==r||u==i}return mi=o,mi}var gi,qf;function DO(){if(qf)return gi;qf=1;var t=et(),e=t["__core-js_shared__"];return gi=e,gi}var bi,Lf;function qO(){if(Lf)return bi;Lf=1;var t=DO(),e=function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!e&&e in n}return bi=r,bi}var xi,Bf;function Pg(){if(Bf)return xi;Bf=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return xi=r,xi}var wi,Ff;function LO(){if(Ff)return wi;Ff=1;var t=El(),e=qO(),r=St(),n=Pg(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,f=RegExp("^"+u.call(c).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(d){if(!r(d)||e(d))return!1;var h=t(d)?f:i;return h.test(n(d))}return wi=l,wi}var Oi,zf;function BO(){if(zf)return Oi;zf=1;function t(e,r){return e?.[r]}return Oi=t,Oi}var Si,Wf;function Wt(){if(Wf)return Si;Wf=1;var t=LO(),e=BO();function r(n,a){var i=e(n,a);return t(i)?i:void 0}return Si=r,Si}var Ai,Uf;function Ia(){if(Uf)return Ai;Uf=1;var t=Wt(),e=t(Object,"create");return Ai=e,Ai}var Pi,Gf;function FO(){if(Gf)return Pi;Gf=1;var t=Ia();function e(){this.__data__=t?t(null):{},this.size=0}return Pi=e,Pi}var _i,Kf;function zO(){if(Kf)return _i;Kf=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return _i=t,_i}var ji,Hf;function WO(){if(Hf)return ji;Hf=1;var t=Ia(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(t){var s=o[i];return s===e?void 0:s}return n.call(o,i)?o[i]:void 0}return ji=a,ji}var Ei,Vf;function UO(){if(Vf)return Ei;Vf=1;var t=Ia(),e=Object.prototype,r=e.hasOwnProperty;function n(a){var i=this.__data__;return t?i[a]!==void 0:r.call(i,a)}return Ei=n,Ei}var Ti,Xf;function GO(){if(Xf)return Ti;Xf=1;var t=Ia(),e="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=t&&a===void 0?e:a,this}return Ti=r,Ti}var Ci,Yf;function KO(){if(Yf)return Ci;Yf=1;var t=FO(),e=zO(),r=WO(),n=UO(),a=GO();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Ci=i,Ci}var ki,Zf;function HO(){if(Zf)return ki;Zf=1;function t(){this.__data__=[],this.size=0}return ki=t,ki}var Ii,Jf;function Tl(){if(Jf)return Ii;Jf=1;function t(e,r){return e===r||e!==e&&r!==r}return Ii=t,Ii}var Mi,Qf;function Ma(){if(Qf)return Mi;Qf=1;var t=Tl();function e(r,n){for(var a=r.length;a--;)if(t(r[a][0],n))return a;return-1}return Mi=e,Mi}var $i,ed;function VO(){if(ed)return $i;ed=1;var t=Ma(),e=Array.prototype,r=e.splice;function n(a){var i=this.__data__,o=t(i,a);if(o<0)return!1;var s=i.length-1;return o==s?i.pop():r.call(i,o,1),--this.size,!0}return $i=n,$i}var Ni,td;function XO(){if(td)return Ni;td=1;var t=Ma();function e(r){var n=this.__data__,a=t(n,r);return a<0?void 0:n[a][1]}return Ni=e,Ni}var Ri,rd;function YO(){if(rd)return Ri;rd=1;var t=Ma();function e(r){return t(this.__data__,r)>-1}return Ri=e,Ri}var Di,nd;function ZO(){if(nd)return Di;nd=1;var t=Ma();function e(r,n){var a=this.__data__,i=t(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Di=e,Di}var qi,ad;function $a(){if(ad)return qi;ad=1;var t=HO(),e=VO(),r=XO(),n=YO(),a=ZO();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,qi=i,qi}var Li,id;function Cl(){if(id)return Li;id=1;var t=Wt(),e=et(),r=t(e,"Map");return Li=r,Li}var Bi,od;function JO(){if(od)return Bi;od=1;var t=KO(),e=$a(),r=Cl();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Bi=n,Bi}var Fi,sd;function QO(){if(sd)return Fi;sd=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Fi=t,Fi}var zi,ud;function Na(){if(ud)return zi;ud=1;var t=QO();function e(r,n){var a=r.__data__;return t(n)?a[typeof n=="string"?"string":"hash"]:a.map}return zi=e,zi}var Wi,cd;function eS(){if(cd)return Wi;cd=1;var t=Na();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Wi=e,Wi}var Ui,ld;function tS(){if(ld)return Ui;ld=1;var t=Na();function e(r){return t(this,r).get(r)}return Ui=e,Ui}var Gi,fd;function rS(){if(fd)return Gi;fd=1;var t=Na();function e(r){return t(this,r).has(r)}return Gi=e,Gi}var Ki,dd;function nS(){if(dd)return Ki;dd=1;var t=Na();function e(r,n){var a=t(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return Ki=e,Ki}var Hi,pd;function kl(){if(pd)return Hi;pd=1;var t=JO(),e=eS(),r=tS(),n=rS(),a=nS();function i(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Hi=i,Hi}var Vi,hd;function _g(){if(hd)return Vi;hd=1;var t=kl(),e="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(e);var i=function(){var o=arguments,s=a?a.apply(this,o):o[0],u=i.cache;if(u.has(s))return u.get(s);var c=n.apply(this,o);return i.cache=u.set(s,c)||u,c};return i.cache=new(r.Cache||t),i}return r.Cache=t,Vi=r,Vi}var Xi,vd;function aS(){if(vd)return Xi;vd=1;var t=_g(),e=500;function r(n){var a=t(n,function(o){return i.size===e&&i.clear(),o}),i=a.cache;return a}return Xi=r,Xi}var Yi,yd;function iS(){if(yd)return Yi;yd=1;var t=aS(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(e,function(o,s,u,c){i.push(u?c.replace(r,"$1"):s||o)}),i});return Yi=n,Yi}var Zi,md;function Il(){if(md)return Zi;md=1;function t(e,r){for(var n=-1,a=e==null?0:e.length,i=Array(a);++n<a;)i[n]=r(e[n],n,e);return i}return Zi=t,Zi}var Ji,gd;function oS(){if(gd)return Ji;gd=1;var t=An(),e=Il(),r=je(),n=Sr(),a=t?t.prototype:void 0,i=a?a.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(n(s))return i?i.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return Ji=o,Ji}var Qi,bd;function jg(){if(bd)return Qi;bd=1;var t=oS();function e(r){return r==null?"":t(r)}return Qi=e,Qi}var eo,xd;function Eg(){if(xd)return eo;xd=1;var t=je(),e=jl(),r=iS(),n=jg();function a(i,o){return t(i)?i:e(i,o)?[i]:r(n(i))}return eo=a,eo}var to,wd;function Ra(){if(wd)return to;wd=1;var t=Sr();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return to=e,to}var ro,Od;function Ml(){if(Od)return ro;Od=1;var t=Eg(),e=Ra();function r(n,a){a=t(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[e(a[i++])];return i&&i==o?n:void 0}return ro=r,ro}var no,Sd;function Tg(){if(Sd)return no;Sd=1;var t=Ml();function e(r,n,a){var i=r==null?void 0:t(r,n);return i===void 0?a:i}return no=e,no}var sS=Tg();const De=ie(sS);var ao,Ad;function uS(){if(Ad)return ao;Ad=1;function t(e){return e==null}return ao=t,ao}var cS=uS();const X=ie(cS);var io,Pd;function lS(){if(Pd)return io;Pd=1;var t=ft(),e=je(),r=dt(),n="[object String]";function a(i){return typeof i=="string"||!e(i)&&r(i)&&t(i)==n}return io=a,io}var fS=lS();const Dt=ie(fS);var dS=El();const H=ie(dS);var pS=St();const Ar=ie(pS);var oo={exports:{}},ee={};/**
|
|
92
92
|
* @license React
|
|
93
93
|
* react-is.production.min.js
|
|
94
94
|
*
|
|
@@ -96,34 +96,34 @@ import{a as me,r as T,j as m,B as V,S as Ge,G as Im,J as In,h as ie,K as J,m as
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var _d;function hS(){if(_d)return ee;_d=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(p){if(typeof p=="object"&&p!==null){var x=p.$$typeof;switch(x){case t:switch(p=p.type,p){case r:case a:case n:case c:case f:return p;default:switch(p=p&&p.$$typeof,p){case s:case o:case u:case d:case l:case i:return p;default:return x}}case e:return x}}}return ee.ContextConsumer=o,ee.ContextProvider=i,ee.Element=t,ee.ForwardRef=u,ee.Fragment=r,ee.Lazy=d,ee.Memo=l,ee.Portal=e,ee.Profiler=a,ee.StrictMode=n,ee.Suspense=c,ee.SuspenseList=f,ee.isAsyncMode=function(){return!1},ee.isConcurrentMode=function(){return!1},ee.isContextConsumer=function(p){return v(p)===o},ee.isContextProvider=function(p){return v(p)===i},ee.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},ee.isForwardRef=function(p){return v(p)===u},ee.isFragment=function(p){return v(p)===r},ee.isLazy=function(p){return v(p)===d},ee.isMemo=function(p){return v(p)===l},ee.isPortal=function(p){return v(p)===e},ee.isProfiler=function(p){return v(p)===a},ee.isStrictMode=function(p){return v(p)===n},ee.isSuspense=function(p){return v(p)===c},ee.isSuspenseList=function(p){return v(p)===f},ee.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===a||p===n||p===c||p===f||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===l||p.$$typeof===i||p.$$typeof===o||p.$$typeof===u||p.$$typeof===y||p.getModuleId!==void 0)},ee.typeOf=v,ee}var jd;function vS(){return jd||(jd=1,oo.exports=hS()),oo.exports}var yS=vS(),so,Ed;function Cg(){if(Ed)return so;Ed=1;var t=ft(),e=dt(),r="[object Number]";function n(a){return typeof a=="number"||e(a)&&t(a)==r}return so=n,so}var uo,Td;function mS(){if(Td)return uo;Td=1;var t=Cg();function e(r){return t(r)&&r!=+r}return uo=e,uo}var gS=mS();const Pn=ie(gS);var bS=Cg();const xS=ie(bS);var Ke=function(e){return e===0?0:e>0?1:-1},Mt=function(e){return Dt(e)&&e.indexOf("%")===e.length-1},B=function(e){return xS(e)&&!Pn(e)},ve=function(e){return B(e)||Dt(e)},wS=0,_n=function(e){var r=++wS;return"".concat(e||"").concat(r)},qt=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!B(e)&&!Dt(e))return n;var i;if(Mt(e)){var o=e.indexOf("%");i=r*parseFloat(e.slice(0,o))/100}else i=+e;return Pn(i)&&(i=n),a&&i>r&&(i=r),i},yt=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},OS=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},a=0;a<r;a++)if(!n[e[a]])n[e[a]]=!0;else return!0;return!1},Ue=function(e,r){return B(e)&&B(r)?function(n){return e+n*(r-e)}:function(){return r}};function Hn(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):De(n,e))===r})}var SS=function(e,r){return B(e)&&B(r)?e-r:Dt(e)&&Dt(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function er(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function oc(t){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oc(t)}var AS=["viewBox","children"],PS=["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"],Cd=["points","pathLength"],co={svg:AS,polygon:Cd,polyline:Cd},$l=["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"],Vn=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(T.isValidElement(e)&&(n=e.props),!Ar(n))return null;var a={};return Object.keys(n).forEach(function(i){$l.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},_S=function(e,r,n){return function(a){return e(r,n,a),null}},Xn=function(e,r,n){if(!Ar(e)||oc(e)!=="object")return null;var a=null;return Object.keys(e).forEach(function(i){var o=e[i];$l.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=_S(o,r,n))}),a},jS=["children"],ES=["children"];function kd(t,e){if(t==null)return{};var r=TS(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function TS(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function sc(t){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sc(t)}var Id={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ot=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},Md=null,lo=null,Nl=function t(e){if(e===Md&&Array.isArray(lo))return lo;var r=[];return T.Children.forEach(e,function(n){X(n)||(yS.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),lo=r,Md=e,r};function qe(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(a){return ot(a)}):n=[ot(e)],Nl(t).forEach(function(a){var i=De(a,"type.displayName")||De(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function ke(t,e){var r=qe(t,e);return r&&r[0]}var $d=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,a=r.height;return!(!B(n)||n<=0||!B(a)||a<=0)},CS=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],kS=function(e){return e&&e.type&&Dt(e.type)&&CS.indexOf(e.type)>=0},IS=function(e){return e&&sc(e)==="object"&&"clipDot"in e},MS=function(e,r,n,a){var i,o=(i=co?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!H(e)&&(a&&o.includes(r)||PS.includes(r))||n&&$l.includes(r)},Z=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var a=e;if(T.isValidElement(e)&&(a=e.props),!Ar(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;MS((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},uc=function t(e,r){if(e===r)return!0;var n=T.Children.count(e);if(n!==T.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Nd(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=e[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!t(i,o))return!1}else if(!Nd(i,o))return!1}return!0},Nd=function(e,r){if(X(e)&&X(r))return!0;if(!X(e)&&!X(r)){var n=e.props||{},a=n.children,i=kd(n,jS),o=r.props||{},s=o.children,u=kd(o,ES);return a&&s?er(i,u)&&uc(a,s):!a&&!s?er(i,u):!1}return!1},Rd=function(e,r){var n=[],a={};return Nl(e).forEach(function(i,o){if(kS(i))n.push(i);else if(i){var s=ot(i.type),u=r[s]||{},c=u.handler,f=u.once;if(c&&(!f||!a[s])){var l=c(i,s,o);n.push(l),a[s]=!0}}}),n},$S=function(e){var r=e&&e.type;return r&&Id[r]?Id[r]:null},NS=function(e,r){return Nl(r).indexOf(e)},RS=["children","width","height","viewBox","className","style","title","desc"];function cc(){return cc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cc.apply(this,arguments)}function DS(t,e){if(t==null)return{};var r=qS(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qS(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function lc(t){var e=t.children,r=t.width,n=t.height,a=t.viewBox,i=t.className,o=t.style,s=t.title,u=t.desc,c=DS(t,RS),f=a||{width:r,height:n,x:0,y:0},l=J("recharts-surface",i);return j.createElement("svg",cc({},Z(c,!0,"svg"),{className:l,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),j.createElement("title",null,s),j.createElement("desc",null,u),e)}var LS=["children","className"];function fc(){return fc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fc.apply(this,arguments)}function BS(t,e){if(t==null)return{};var r=FS(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function FS(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var ce=j.forwardRef(function(t,e){var r=t.children,n=t.className,a=BS(t,LS),i=J("recharts-layer",n);return j.createElement("g",fc({className:i},Z(a,!0),{ref:e}),r)}),st=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]},fo,Dd;function zS(){if(Dd)return fo;Dd=1;function t(e,r,n){var a=-1,i=e.length;r<0&&(r=-r>i?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(i);++a<i;)o[a]=e[a+r];return o}return fo=t,fo}var po,qd;function WS(){if(qd)return po;qd=1;var t=zS();function e(r,n,a){var i=r.length;return a=a===void 0?i:a,!n&&a>=i?r:t(r,n,a)}return po=e,po}var ho,Ld;function kg(){if(Ld)return ho;Ld=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=e+r+n,i="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+a+i+"]");function u(c){return s.test(c)}return ho=u,ho}var vo,Bd;function US(){if(Bd)return vo;Bd=1;function t(e){return e.split("")}return vo=t,vo}var yo,Fd;function KS(){if(Fd)return yo;Fd=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=e+r+n,i="\\ufe0e\\ufe0f",o="["+t+"]",s="["+a+"]",u="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+u+")",f="[^"+t+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",y=c+"?",v="["+i+"]?",p="(?:"+h+"(?:"+[f,l,d].join("|")+")"+v+y+")*",x=v+y+p,b="(?:"+[f+s+"?",s,l,d,o].join("|")+")",w=RegExp(u+"(?="+u+")|"+b+x,"g");function S(g){return g.match(w)||[]}return yo=S,yo}var mo,zd;function GS(){if(zd)return mo;zd=1;var t=US(),e=kg(),r=KS();function n(a){return e(a)?r(a):t(a)}return mo=n,mo}var go,Wd;function HS(){if(Wd)return go;Wd=1;var t=WS(),e=kg(),r=GS(),n=jg();function a(i){return function(o){o=n(o);var s=e(o)?r(o):void 0,u=s?s[0]:o.charAt(0),c=s?t(s,1).join(""):o.slice(1);return u[i]()+c}}return go=a,go}var bo,Ud;function VS(){if(Ud)return bo;Ud=1;var t=HS(),e=t("toUpperCase");return bo=e,bo}var XS=VS();const Da=ie(XS);function Gr(t){"@babel/helpers - typeof";return Gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gr(t)}var YS=["type","size","sizeType"];function dc(){return dc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dc.apply(this,arguments)}function Kd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Gd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kd(Object(r),!0).forEach(function(n){ZS(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ZS(t,e,r){return e=JS(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JS(t){var e=QS(t,"string");return Gr(e)=="symbol"?e:e+""}function QS(t,e){if(Gr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Gr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e1(t,e){if(t==null)return{};var r=t1(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function t1(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var Ig={symbolCircle:_l,symbolCross:dO,symbolDiamond:hO,symbolSquare:vO,symbolStar:bO,symbolTriangle:xO,symbolWye:OO},r1=Math.PI/180,n1=function(e){var r="symbol".concat(Da(e));return Ig[r]||_l},a1=function(e,r,n){if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var a=18*r1;return 1.25*e*e*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},i1=function(e,r){Ig["symbol".concat(Da(e))]=r},Rl=function(e){var r=e.type,n=r===void 0?"circle":r,a=e.size,i=a===void 0?64:a,o=e.sizeType,s=o===void 0?"area":o,u=e1(e,YS),c=Gd(Gd({},u),{},{type:n,size:i,sizeType:s}),f=function(){var p=n1(n),x=SO().type(p).size(a1(i,s,n));return x()},l=c.className,d=c.cx,h=c.cy,y=Z(c,!0);return d===+d&&h===+h&&i===+i?j.createElement("path",dc({},y,{className:J("recharts-symbols",l),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};Rl.registerSymbol=i1;function ir(t){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(t)}function pc(){return pc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pc.apply(this,arguments)}function Hd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function o1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hd(Object(r),!0).forEach(function(n){Hr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function s1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$g(n.key),n)}}function c1(t,e,r){return e&&u1(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function l1(t,e,r){return e=Yn(e),f1(t,Mg()?Reflect.construct(e,r||[],Yn(t).constructor):e.apply(t,r))}function f1(t,e){if(e&&(ir(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d1(t)}function d1(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mg=function(){return!!t})()}function Yn(t){return Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yn(t)}function p1(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hc(t,e)}function hc(t,e){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hc(t,e)}function Hr(t,e,r){return e=$g(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $g(t){var e=h1(t,"string");return ir(e)=="symbol"?e:e+""}function h1(t,e){if(ir(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Be=32,Dl=function(t){function e(){return s1(this,e),l1(this,e,arguments)}return p1(e,t),c1(e,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Be/2,o=Be/6,s=Be/3,u=n.inactive?a:n.color;if(n.type==="plainline")return j.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Be,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return j.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(s,`
|
|
99
|
+
*/var _d;function hS(){if(_d)return ee;_d=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(p){if(typeof p=="object"&&p!==null){var x=p.$$typeof;switch(x){case t:switch(p=p.type,p){case r:case a:case n:case c:case f:return p;default:switch(p=p&&p.$$typeof,p){case s:case o:case u:case d:case l:case i:return p;default:return x}}case e:return x}}}return ee.ContextConsumer=o,ee.ContextProvider=i,ee.Element=t,ee.ForwardRef=u,ee.Fragment=r,ee.Lazy=d,ee.Memo=l,ee.Portal=e,ee.Profiler=a,ee.StrictMode=n,ee.Suspense=c,ee.SuspenseList=f,ee.isAsyncMode=function(){return!1},ee.isConcurrentMode=function(){return!1},ee.isContextConsumer=function(p){return v(p)===o},ee.isContextProvider=function(p){return v(p)===i},ee.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},ee.isForwardRef=function(p){return v(p)===u},ee.isFragment=function(p){return v(p)===r},ee.isLazy=function(p){return v(p)===d},ee.isMemo=function(p){return v(p)===l},ee.isPortal=function(p){return v(p)===e},ee.isProfiler=function(p){return v(p)===a},ee.isStrictMode=function(p){return v(p)===n},ee.isSuspense=function(p){return v(p)===c},ee.isSuspenseList=function(p){return v(p)===f},ee.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===a||p===n||p===c||p===f||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===l||p.$$typeof===i||p.$$typeof===o||p.$$typeof===u||p.$$typeof===y||p.getModuleId!==void 0)},ee.typeOf=v,ee}var jd;function vS(){return jd||(jd=1,oo.exports=hS()),oo.exports}var yS=vS(),so,Ed;function Cg(){if(Ed)return so;Ed=1;var t=ft(),e=dt(),r="[object Number]";function n(a){return typeof a=="number"||e(a)&&t(a)==r}return so=n,so}var uo,Td;function mS(){if(Td)return uo;Td=1;var t=Cg();function e(r){return t(r)&&r!=+r}return uo=e,uo}var gS=mS();const Pn=ie(gS);var bS=Cg();const xS=ie(bS);var Ge=function(e){return e===0?0:e>0?1:-1},Mt=function(e){return Dt(e)&&e.indexOf("%")===e.length-1},B=function(e){return xS(e)&&!Pn(e)},ve=function(e){return B(e)||Dt(e)},wS=0,_n=function(e){var r=++wS;return"".concat(e||"").concat(r)},qt=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!B(e)&&!Dt(e))return n;var i;if(Mt(e)){var o=e.indexOf("%");i=r*parseFloat(e.slice(0,o))/100}else i=+e;return Pn(i)&&(i=n),a&&i>r&&(i=r),i},yt=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},OS=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},a=0;a<r;a++)if(!n[e[a]])n[e[a]]=!0;else return!0;return!1},Ue=function(e,r){return B(e)&&B(r)?function(n){return e+n*(r-e)}:function(){return r}};function Hn(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):De(n,e))===r})}var SS=function(e,r){return B(e)&&B(r)?e-r:Dt(e)&&Dt(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function er(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function oc(t){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oc(t)}var AS=["viewBox","children"],PS=["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"],Cd=["points","pathLength"],co={svg:AS,polygon:Cd,polyline:Cd},$l=["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"],Vn=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(T.isValidElement(e)&&(n=e.props),!Ar(n))return null;var a={};return Object.keys(n).forEach(function(i){$l.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},_S=function(e,r,n){return function(a){return e(r,n,a),null}},Xn=function(e,r,n){if(!Ar(e)||oc(e)!=="object")return null;var a=null;return Object.keys(e).forEach(function(i){var o=e[i];$l.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=_S(o,r,n))}),a},jS=["children"],ES=["children"];function kd(t,e){if(t==null)return{};var r=TS(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function TS(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function sc(t){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sc(t)}var Id={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ot=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},Md=null,lo=null,Nl=function t(e){if(e===Md&&Array.isArray(lo))return lo;var r=[];return T.Children.forEach(e,function(n){X(n)||(yS.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),lo=r,Md=e,r};function qe(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(a){return ot(a)}):n=[ot(e)],Nl(t).forEach(function(a){var i=De(a,"type.displayName")||De(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function ke(t,e){var r=qe(t,e);return r&&r[0]}var $d=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,a=r.height;return!(!B(n)||n<=0||!B(a)||a<=0)},CS=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],kS=function(e){return e&&e.type&&Dt(e.type)&&CS.indexOf(e.type)>=0},IS=function(e){return e&&sc(e)==="object"&&"clipDot"in e},MS=function(e,r,n,a){var i,o=(i=co?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!H(e)&&(a&&o.includes(r)||PS.includes(r))||n&&$l.includes(r)},Z=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var a=e;if(T.isValidElement(e)&&(a=e.props),!Ar(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;MS((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},uc=function t(e,r){if(e===r)return!0;var n=T.Children.count(e);if(n!==T.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Nd(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=e[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!t(i,o))return!1}else if(!Nd(i,o))return!1}return!0},Nd=function(e,r){if(X(e)&&X(r))return!0;if(!X(e)&&!X(r)){var n=e.props||{},a=n.children,i=kd(n,jS),o=r.props||{},s=o.children,u=kd(o,ES);return a&&s?er(i,u)&&uc(a,s):!a&&!s?er(i,u):!1}return!1},Rd=function(e,r){var n=[],a={};return Nl(e).forEach(function(i,o){if(kS(i))n.push(i);else if(i){var s=ot(i.type),u=r[s]||{},c=u.handler,f=u.once;if(c&&(!f||!a[s])){var l=c(i,s,o);n.push(l),a[s]=!0}}}),n},$S=function(e){var r=e&&e.type;return r&&Id[r]?Id[r]:null},NS=function(e,r){return Nl(r).indexOf(e)},RS=["children","width","height","viewBox","className","style","title","desc"];function cc(){return cc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cc.apply(this,arguments)}function DS(t,e){if(t==null)return{};var r=qS(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qS(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function lc(t){var e=t.children,r=t.width,n=t.height,a=t.viewBox,i=t.className,o=t.style,s=t.title,u=t.desc,c=DS(t,RS),f=a||{width:r,height:n,x:0,y:0},l=J("recharts-surface",i);return j.createElement("svg",cc({},Z(c,!0,"svg"),{className:l,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),j.createElement("title",null,s),j.createElement("desc",null,u),e)}var LS=["children","className"];function fc(){return fc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fc.apply(this,arguments)}function BS(t,e){if(t==null)return{};var r=FS(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function FS(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var ce=j.forwardRef(function(t,e){var r=t.children,n=t.className,a=BS(t,LS),i=J("recharts-layer",n);return j.createElement("g",fc({className:i},Z(a,!0),{ref:e}),r)}),st=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]},fo,Dd;function zS(){if(Dd)return fo;Dd=1;function t(e,r,n){var a=-1,i=e.length;r<0&&(r=-r>i?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(i);++a<i;)o[a]=e[a+r];return o}return fo=t,fo}var po,qd;function WS(){if(qd)return po;qd=1;var t=zS();function e(r,n,a){var i=r.length;return a=a===void 0?i:a,!n&&a>=i?r:t(r,n,a)}return po=e,po}var ho,Ld;function kg(){if(Ld)return ho;Ld=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=e+r+n,i="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+a+i+"]");function u(c){return s.test(c)}return ho=u,ho}var vo,Bd;function US(){if(Bd)return vo;Bd=1;function t(e){return e.split("")}return vo=t,vo}var yo,Fd;function GS(){if(Fd)return yo;Fd=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=e+r+n,i="\\ufe0e\\ufe0f",o="["+t+"]",s="["+a+"]",u="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+u+")",f="[^"+t+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",y=c+"?",v="["+i+"]?",p="(?:"+h+"(?:"+[f,l,d].join("|")+")"+v+y+")*",x=v+y+p,b="(?:"+[f+s+"?",s,l,d,o].join("|")+")",w=RegExp(u+"(?="+u+")|"+b+x,"g");function S(g){return g.match(w)||[]}return yo=S,yo}var mo,zd;function KS(){if(zd)return mo;zd=1;var t=US(),e=kg(),r=GS();function n(a){return e(a)?r(a):t(a)}return mo=n,mo}var go,Wd;function HS(){if(Wd)return go;Wd=1;var t=WS(),e=kg(),r=KS(),n=jg();function a(i){return function(o){o=n(o);var s=e(o)?r(o):void 0,u=s?s[0]:o.charAt(0),c=s?t(s,1).join(""):o.slice(1);return u[i]()+c}}return go=a,go}var bo,Ud;function VS(){if(Ud)return bo;Ud=1;var t=HS(),e=t("toUpperCase");return bo=e,bo}var XS=VS();const Da=ie(XS);function Kr(t){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kr(t)}var YS=["type","size","sizeType"];function dc(){return dc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dc.apply(this,arguments)}function Gd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Kd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gd(Object(r),!0).forEach(function(n){ZS(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ZS(t,e,r){return e=JS(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JS(t){var e=QS(t,"string");return Kr(e)=="symbol"?e:e+""}function QS(t,e){if(Kr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Kr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e1(t,e){if(t==null)return{};var r=t1(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function t1(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var Ig={symbolCircle:_l,symbolCross:dO,symbolDiamond:hO,symbolSquare:vO,symbolStar:bO,symbolTriangle:xO,symbolWye:OO},r1=Math.PI/180,n1=function(e){var r="symbol".concat(Da(e));return Ig[r]||_l},a1=function(e,r,n){if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var a=18*r1;return 1.25*e*e*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},i1=function(e,r){Ig["symbol".concat(Da(e))]=r},Rl=function(e){var r=e.type,n=r===void 0?"circle":r,a=e.size,i=a===void 0?64:a,o=e.sizeType,s=o===void 0?"area":o,u=e1(e,YS),c=Kd(Kd({},u),{},{type:n,size:i,sizeType:s}),f=function(){var p=n1(n),x=SO().type(p).size(a1(i,s,n));return x()},l=c.className,d=c.cx,h=c.cy,y=Z(c,!0);return d===+d&&h===+h&&i===+i?j.createElement("path",dc({},y,{className:J("recharts-symbols",l),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};Rl.registerSymbol=i1;function ir(t){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(t)}function pc(){return pc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pc.apply(this,arguments)}function Hd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function o1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hd(Object(r),!0).forEach(function(n){Hr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function s1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$g(n.key),n)}}function c1(t,e,r){return e&&u1(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function l1(t,e,r){return e=Yn(e),f1(t,Mg()?Reflect.construct(e,r||[],Yn(t).constructor):e.apply(t,r))}function f1(t,e){if(e&&(ir(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d1(t)}function d1(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mg=function(){return!!t})()}function Yn(t){return Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yn(t)}function p1(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hc(t,e)}function hc(t,e){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hc(t,e)}function Hr(t,e,r){return e=$g(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $g(t){var e=h1(t,"string");return ir(e)=="symbol"?e:e+""}function h1(t,e){if(ir(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Be=32,Dl=function(t){function e(){return s1(this,e),l1(this,e,arguments)}return p1(e,t),c1(e,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Be/2,o=Be/6,s=Be/3,u=n.inactive?a:n.color;if(n.type==="plainline")return j.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Be,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return j.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(s,`
|
|
100
100
|
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
|
|
101
101
|
H`).concat(Be,"M").concat(2*s,",").concat(i,`
|
|
102
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return j.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Be/8,"h").concat(Be,"v").concat(Be*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(j.isValidElement(n.legendIcon)){var c=o1({},n);return delete c.legendIcon,j.cloneElement(n.legendIcon,c)}return j.createElement(Rl,{fill:u,cx:i,cy:i,size:Be,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,u=a.formatter,c=a.inactiveColor,f={x:0,y:0,width:Be,height:Be},l={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,y){var v=h.formatter||u,p=J(Hr(Hr({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var x=H(h.value)?null:h.value;st(!H(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=h.inactive?c:h.color;return j.createElement("li",pc({className:p,style:l,key:"legend-item-".concat(y)},Xn(n.props,h,y)),j.createElement(lc,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),j.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},v?v(x,h,y):x))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return j.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(T.PureComponent);Hr(Dl,"displayName","Legend");Hr(Dl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var xo,Vd;function v1(){if(Vd)return xo;Vd=1;var t=$a();function e(){this.__data__=new t,this.size=0}return xo=e,xo}var wo,Xd;function y1(){if(Xd)return wo;Xd=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return wo=t,wo}var Oo,Yd;function m1(){if(Yd)return Oo;Yd=1;function t(e){return this.__data__.get(e)}return Oo=t,Oo}var So,Zd;function g1(){if(Zd)return So;Zd=1;function t(e){return this.__data__.has(e)}return So=t,So}var Ao,Jd;function b1(){if(Jd)return Ao;Jd=1;var t=$a(),e=Cl(),r=kl(),n=200;function a(i,o){var s=this.__data__;if(s instanceof t){var u=s.__data__;if(!e||u.length<n-1)return u.push([i,o]),this.size=++s.size,this;s=this.__data__=new r(u)}return s.set(i,o),this.size=s.size,this}return Ao=a,Ao}var Po,Qd;function Ng(){if(Qd)return Po;Qd=1;var t=$a(),e=v1(),r=y1(),n=m1(),a=g1(),i=b1();function o(s){var u=this.__data__=new t(s);this.size=u.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Po=o,Po}var _o,ep;function x1(){if(ep)return _o;ep=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return _o=e,_o}var jo,tp;function w1(){if(tp)return jo;tp=1;function t(e){return this.__data__.has(e)}return jo=t,jo}var Eo,rp;function Rg(){if(rp)return Eo;rp=1;var t=kl(),e=x1(),r=w1();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new t;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,Eo=n,Eo}var To,np;function Dg(){if(np)return To;np=1;function t(e,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(e[n],n,e))return!0;return!1}return To=t,To}var Co,ap;function qg(){if(ap)return Co;ap=1;function t(e,r){return e.has(r)}return Co=t,Co}var ko,ip;function Lg(){if(ip)return ko;ip=1;var t=Rg(),e=Dg(),r=qg(),n=1,a=2;function i(o,s,u,c,f,l){var d=u&n,h=o.length,y=s.length;if(h!=y&&!(d&&y>h))return!1;var v=l.get(o),p=l.get(s);if(v&&p)return v==s&&p==o;var x=-1,b=!0,w=u&a?new t:void 0;for(l.set(o,s),l.set(s,o);++x<h;){var S=o[x],g=s[x];if(c)var O=d?c(g,S,x,s,o,l):c(S,g,x,o,s,l);if(O!==void 0){if(O)continue;b=!1;break}if(w){if(!e(s,function(A,_){if(!r(w,_)&&(S===A||f(S,A,u,c,l)))return w.push(_)})){b=!1;break}}else if(!(S===g||f(S,g,u,c,l))){b=!1;break}}return l.delete(o),l.delete(s),b}return ko=i,ko}var Io,op;function O1(){if(op)return Io;op=1;var t=et(),e=t.Uint8Array;return Io=e,Io}var Mo,sp;function S1(){if(sp)return Mo;sp=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(a,i){n[++r]=[i,a]}),n}return Mo=t,Mo}var $o,up;function ql(){if(up)return $o;up=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(a){n[++r]=a}),n}return $o=t,$o}var No,cp;function A1(){if(cp)return No;cp=1;var t=An(),e=O1(),r=Tl(),n=Lg(),a=S1(),i=ql(),o=1,s=2,u="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Map]",d="[object Number]",h="[object RegExp]",y="[object Set]",v="[object String]",p="[object Symbol]",x="[object ArrayBuffer]",b="[object DataView]",w=t?t.prototype:void 0,S=w?w.valueOf:void 0;function g(O,A,_,P,k,E,C){switch(_){case b:if(O.byteLength!=A.byteLength||O.byteOffset!=A.byteOffset)return!1;O=O.buffer,A=A.buffer;case x:return!(O.byteLength!=A.byteLength||!E(new e(O),new e(A)));case u:case c:case d:return r(+O,+A);case f:return O.name==A.name&&O.message==A.message;case h:case v:return O==A+"";case l:var I=a;case y:var N=P&o;if(I||(I=i),O.size!=A.size&&!N)return!1;var M=C.get(O);if(M)return M==A;P|=s,C.set(O,A);var R=n(I(O),I(A),P,k,E,C);return C.delete(O),R;case p:if(S)return S.call(O)==S.call(A)}return!1}return No=g,No}var Ro,lp;function Bg(){if(lp)return Ro;lp=1;function t(e,r){for(var n=-1,a=r.length,i=e.length;++n<a;)e[i+n]=r[n];return e}return Ro=t,Ro}var Do,fp;function P1(){if(fp)return Do;fp=1;var t=Bg(),e=je();function r(n,a,i){var o=a(n);return e(n)?o:t(o,i(n))}return Do=r,Do}var qo,dp;function _1(){if(dp)return qo;dp=1;function t(e,r){for(var n=-1,a=e==null?0:e.length,i=0,o=[];++n<a;){var s=e[n];r(s,n,e)&&(o[i++]=s)}return o}return qo=t,qo}var Lo,pp;function j1(){if(pp)return Lo;pp=1;function t(){return[]}return Lo=t,Lo}var Bo,hp;function E1(){if(hp)return Bo;hp=1;var t=_1(),e=j1(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),t(a(o),function(s){return n.call(o,s)}))}:e;return Bo=i,Bo}var Fo,vp;function T1(){if(vp)return Fo;vp=1;function t(e,r){for(var n=-1,a=Array(e);++n<e;)a[n]=r(n);return a}return Fo=t,Fo}var zo,yp;function C1(){if(yp)return zo;yp=1;var t=ft(),e=dt(),r="[object Arguments]";function n(a){return e(a)&&t(a)==r}return zo=n,zo}var Wo,mp;function Ll(){if(mp)return Wo;mp=1;var t=C1(),e=dt(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(o){return e(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return Wo=i,Wo}var Rr={exports:{}},Uo,gp;function k1(){if(gp)return Uo;gp=1;function t(){return!1}return Uo=t,Uo}Rr.exports;var bp;function Fg(){return bp||(bp=1,function(t,e){var r=et(),n=k1(),a=e&&!e.nodeType&&e,i=a&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===a,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||n;t.exports=c}(Rr,Rr.exports)),Rr.exports}var Ko,xp;function Bl(){if(xp)return Ko;xp=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??t,!!a&&(i=="number"||i!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<a}return Ko=r,Ko}var Go,wp;function Fl(){if(wp)return Go;wp=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Go=e,Go}var Ho,Op;function I1(){if(Op)return Ho;Op=1;var t=ft(),e=Fl(),r=dt(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",c="[object Map]",f="[object Number]",l="[object Object]",d="[object RegExp]",h="[object Set]",y="[object String]",v="[object WeakMap]",p="[object ArrayBuffer]",x="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",S="[object Int8Array]",g="[object Int16Array]",O="[object Int32Array]",A="[object Uint8Array]",_="[object Uint8ClampedArray]",P="[object Uint16Array]",k="[object Uint32Array]",E={};E[b]=E[w]=E[S]=E[g]=E[O]=E[A]=E[_]=E[P]=E[k]=!0,E[n]=E[a]=E[p]=E[i]=E[x]=E[o]=E[s]=E[u]=E[c]=E[f]=E[l]=E[d]=E[h]=E[y]=E[v]=!1;function C(I){return r(I)&&e(I.length)&&!!E[t(I)]}return Ho=C,Ho}var Vo,Sp;function zg(){if(Sp)return Vo;Sp=1;function t(e){return function(r){return e(r)}}return Vo=t,Vo}var Dr={exports:{}};Dr.exports;var Ap;function M1(){return Ap||(Ap=1,function(t,e){var r=Ag(),n=e&&!e.nodeType&&e,a=n&&!0&&t&&!t.nodeType&&t,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var u=a&&a.require&&a.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}(Dr,Dr.exports)),Dr.exports}var Xo,Pp;function Wg(){if(Pp)return Xo;Pp=1;var t=I1(),e=zg(),r=M1(),n=r&&r.isTypedArray,a=n?e(n):t;return Xo=a,Xo}var Yo,_p;function $1(){if(_p)return Yo;_p=1;var t=T1(),e=Ll(),r=je(),n=Fg(),a=Bl(),i=Wg(),o=Object.prototype,s=o.hasOwnProperty;function u(c,f){var l=r(c),d=!l&&e(c),h=!l&&!d&&n(c),y=!l&&!d&&!h&&i(c),v=l||d||h||y,p=v?t(c.length,String):[],x=p.length;for(var b in c)(f||s.call(c,b))&&!(v&&(b=="length"||h&&(b=="offset"||b=="parent")||y&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,x)))&&p.push(b);return p}return Yo=u,Yo}var Zo,jp;function N1(){if(jp)return Zo;jp=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||t;return r===a}return Zo=e,Zo}var Jo,Ep;function Ug(){if(Ep)return Jo;Ep=1;function t(e,r){return function(n){return e(r(n))}}return Jo=t,Jo}var Qo,Tp;function R1(){if(Tp)return Qo;Tp=1;var t=Ug(),e=t(Object.keys,Object);return Qo=e,Qo}var es,Cp;function D1(){if(Cp)return es;Cp=1;var t=N1(),e=R1(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!t(i))return e(i);var o=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&o.push(s);return o}return es=a,es}var ts,kp;function jn(){if(kp)return ts;kp=1;var t=El(),e=Fl();function r(n){return n!=null&&e(n.length)&&!t(n)}return ts=r,ts}var rs,Ip;function qa(){if(Ip)return rs;Ip=1;var t=$1(),e=D1(),r=jn();function n(a){return r(a)?t(a):e(a)}return rs=n,rs}var ns,Mp;function q1(){if(Mp)return ns;Mp=1;var t=P1(),e=E1(),r=qa();function n(a){return t(a,r,e)}return ns=n,ns}var as,$p;function L1(){if($p)return as;$p=1;var t=q1(),e=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,o,s,u,c,f){var l=s&e,d=t(i),h=d.length,y=t(o),v=y.length;if(h!=v&&!l)return!1;for(var p=h;p--;){var x=d[p];if(!(l?x in o:n.call(o,x)))return!1}var b=f.get(i),w=f.get(o);if(b&&w)return b==o&&w==i;var S=!0;f.set(i,o),f.set(o,i);for(var g=l;++p<h;){x=d[p];var O=i[x],A=o[x];if(u)var _=l?u(A,O,x,o,i,f):u(O,A,x,i,o,f);if(!(_===void 0?O===A||c(O,A,s,u,f):_)){S=!1;break}g||(g=x=="constructor")}if(S&&!g){var P=i.constructor,k=o.constructor;P!=k&&"constructor"in i&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof k=="function"&&k instanceof k)&&(S=!1)}return f.delete(i),f.delete(o),S}return as=a,as}var is,Np;function B1(){if(Np)return is;Np=1;var t=Wt(),e=et(),r=t(e,"DataView");return is=r,is}var os,Rp;function F1(){if(Rp)return os;Rp=1;var t=Wt(),e=et(),r=t(e,"Promise");return os=r,os}var ss,Dp;function Kg(){if(Dp)return ss;Dp=1;var t=Wt(),e=et(),r=t(e,"Set");return ss=r,ss}var us,qp;function z1(){if(qp)return us;qp=1;var t=Wt(),e=et(),r=t(e,"WeakMap");return us=r,us}var cs,Lp;function W1(){if(Lp)return cs;Lp=1;var t=B1(),e=Cl(),r=F1(),n=Kg(),a=z1(),i=ft(),o=Pg(),s="[object Map]",u="[object Object]",c="[object Promise]",f="[object Set]",l="[object WeakMap]",d="[object DataView]",h=o(t),y=o(e),v=o(r),p=o(n),x=o(a),b=i;return(t&&b(new t(new ArrayBuffer(1)))!=d||e&&b(new e)!=s||r&&b(r.resolve())!=c||n&&b(new n)!=f||a&&b(new a)!=l)&&(b=function(w){var S=i(w),g=S==u?w.constructor:void 0,O=g?o(g):"";if(O)switch(O){case h:return d;case y:return s;case v:return c;case p:return f;case x:return l}return S}),cs=b,cs}var ls,Bp;function U1(){if(Bp)return ls;Bp=1;var t=Ng(),e=Lg(),r=A1(),n=L1(),a=W1(),i=je(),o=Fg(),s=Wg(),u=1,c="[object Arguments]",f="[object Array]",l="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function y(v,p,x,b,w,S){var g=i(v),O=i(p),A=g?f:a(v),_=O?f:a(p);A=A==c?l:A,_=_==c?l:_;var P=A==l,k=_==l,E=A==_;if(E&&o(v)){if(!o(p))return!1;g=!0,P=!1}if(E&&!P)return S||(S=new t),g||s(v)?e(v,p,x,b,w,S):r(v,p,A,x,b,w,S);if(!(x&u)){var C=P&&h.call(v,"__wrapped__"),I=k&&h.call(p,"__wrapped__");if(C||I){var N=C?v.value():v,M=I?p.value():p;return S||(S=new t),w(N,M,x,b,S)}}return E?(S||(S=new t),n(v,p,x,b,w,S)):!1}return ls=y,ls}var fs,Fp;function zl(){if(Fp)return fs;Fp=1;var t=U1(),e=dt();function r(n,a,i,o,s){return n===a?!0:n==null||a==null||!e(n)&&!e(a)?n!==n&&a!==a:t(n,a,i,o,r,s)}return fs=r,fs}var ds,zp;function K1(){if(zp)return ds;zp=1;var t=Ng(),e=zl(),r=1,n=2;function a(i,o,s,u){var c=s.length,f=c,l=!u;if(i==null)return!f;for(i=Object(i);c--;){var d=s[c];if(l&&d[2]?d[1]!==i[d[0]]:!(d[0]in i))return!1}for(;++c<f;){d=s[c];var h=d[0],y=i[h],v=d[1];if(l&&d[2]){if(y===void 0&&!(h in i))return!1}else{var p=new t;if(u)var x=u(y,v,h,i,o,p);if(!(x===void 0?e(v,y,r|n,u,p):x))return!1}}return!0}return ds=a,ds}var ps,Wp;function Gg(){if(Wp)return ps;Wp=1;var t=St();function e(r){return r===r&&!t(r)}return ps=e,ps}var hs,Up;function G1(){if(Up)return hs;Up=1;var t=Gg(),e=qa();function r(n){for(var a=e(n),i=a.length;i--;){var o=a[i],s=n[o];a[i]=[o,s,t(s)]}return a}return hs=r,hs}var vs,Kp;function Hg(){if(Kp)return vs;Kp=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return vs=t,vs}var ys,Gp;function H1(){if(Gp)return ys;Gp=1;var t=K1(),e=G1(),r=Hg();function n(a){var i=e(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===a||t(o,a,i)}}return ys=n,ys}var ms,Hp;function V1(){if(Hp)return ms;Hp=1;function t(e,r){return e!=null&&r in Object(e)}return ms=t,ms}var gs,Vp;function X1(){if(Vp)return gs;Vp=1;var t=Eg(),e=Ll(),r=je(),n=Bl(),a=Fl(),i=Ra();function o(s,u,c){u=t(u,s);for(var f=-1,l=u.length,d=!1;++f<l;){var h=i(u[f]);if(!(d=s!=null&&c(s,h)))break;s=s[h]}return d||++f!=l?d:(l=s==null?0:s.length,!!l&&a(l)&&n(h,l)&&(r(s)||e(s)))}return gs=o,gs}var bs,Xp;function Y1(){if(Xp)return bs;Xp=1;var t=V1(),e=X1();function r(n,a){return n!=null&&e(n,a,t)}return bs=r,bs}var xs,Yp;function Z1(){if(Yp)return xs;Yp=1;var t=zl(),e=Tg(),r=Y1(),n=jl(),a=Gg(),i=Hg(),o=Ra(),s=1,u=2;function c(f,l){return n(f)&&a(l)?i(o(f),l):function(d){var h=e(d,f);return h===void 0&&h===l?r(d,f):t(l,h,s|u)}}return xs=c,xs}var ws,Zp;function Pr(){if(Zp)return ws;Zp=1;function t(e){return e}return ws=t,ws}var Os,Jp;function J1(){if(Jp)return Os;Jp=1;function t(e){return function(r){return r?.[e]}}return Os=t,Os}var Ss,Qp;function Q1(){if(Qp)return Ss;Qp=1;var t=Ml();function e(r){return function(n){return t(n,r)}}return Ss=e,Ss}var As,eh;function eA(){if(eh)return As;eh=1;var t=J1(),e=Q1(),r=jl(),n=Ra();function a(i){return r(i)?t(n(i)):e(i)}return As=a,As}var Ps,th;function At(){if(th)return Ps;th=1;var t=H1(),e=Z1(),r=Pr(),n=je(),a=eA();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?e(o[0],o[1]):t(o):a(o)}return Ps=i,Ps}var _s,rh;function Vg(){if(rh)return _s;rh=1;function t(e,r,n,a){for(var i=e.length,o=n+(a?1:-1);a?o--:++o<i;)if(r(e[o],o,e))return o;return-1}return _s=t,_s}var js,nh;function tA(){if(nh)return js;nh=1;function t(e){return e!==e}return js=t,js}var Es,ah;function rA(){if(ah)return Es;ah=1;function t(e,r,n){for(var a=n-1,i=e.length;++a<i;)if(e[a]===r)return a;return-1}return Es=t,Es}var Ts,ih;function nA(){if(ih)return Ts;ih=1;var t=Vg(),e=tA(),r=rA();function n(a,i,o){return i===i?r(a,i,o):t(a,e,o)}return Ts=n,Ts}var Cs,oh;function aA(){if(oh)return Cs;oh=1;var t=nA();function e(r,n){var a=r==null?0:r.length;return!!a&&t(r,n,0)>-1}return Cs=e,Cs}var ks,sh;function iA(){if(sh)return ks;sh=1;function t(e,r,n){for(var a=-1,i=e==null?0:e.length;++a<i;)if(n(r,e[a]))return!0;return!1}return ks=t,ks}var Is,uh;function oA(){if(uh)return Is;uh=1;function t(){}return Is=t,Is}var Ms,ch;function sA(){if(ch)return Ms;ch=1;var t=Kg(),e=oA(),r=ql(),n=1/0,a=t&&1/r(new t([,-0]))[1]==n?function(i){return new t(i)}:e;return Ms=a,Ms}var $s,lh;function uA(){if(lh)return $s;lh=1;var t=Rg(),e=aA(),r=iA(),n=qg(),a=sA(),i=ql(),o=200;function s(u,c,f){var l=-1,d=e,h=u.length,y=!0,v=[],p=v;if(f)y=!1,d=r;else if(h>=o){var x=c?null:a(u);if(x)return i(x);y=!1,d=n,p=new t}else p=c?[]:v;e:for(;++l<h;){var b=u[l],w=c?c(b):b;if(b=f||b!==0?b:0,y&&w===w){for(var S=p.length;S--;)if(p[S]===w)continue e;c&&p.push(w),v.push(b)}else d(p,w,f)||(p!==v&&p.push(w),v.push(b))}return v}return $s=s,$s}var Ns,fh;function cA(){if(fh)return Ns;fh=1;var t=At(),e=uA();function r(n,a){return n&&n.length?e(n,t(a,2)):[]}return Ns=r,Ns}var lA=cA();const dh=ie(lA);function Xg(t,e,r){return e===!0?dh(t,r):H(e)?dh(t,e):t}function or(t){"@babel/helpers - typeof";return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(t)}var fA=["ref"];function ph(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ph(Object(r),!0).forEach(function(n){La(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zg(n.key),n)}}function pA(t,e,r){return e&&hh(t.prototype,e),r&&hh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function hA(t,e,r){return e=Zn(e),vA(t,Yg()?Reflect.construct(e,r||[],Zn(t).constructor):e.apply(t,r))}function vA(t,e){if(e&&(or(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yA(t)}function yA(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yg=function(){return!!t})()}function Zn(t){return Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zn(t)}function mA(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vc(t,e)}function vc(t,e){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vc(t,e)}function La(t,e,r){return e=Zg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zg(t){var e=gA(t,"string");return or(e)=="symbol"?e:e+""}function gA(t,e){if(or(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(or(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function bA(t,e){if(t==null)return{};var r=xA(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function xA(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function wA(t){return t.value}function OA(t,e){if(j.isValidElement(t))return j.cloneElement(t,e);if(typeof t=="function")return j.createElement(t,e);e.ref;var r=bA(e,fA);return j.createElement(Dl,r)}var vh=1,tr=function(t){function e(){var r;dA(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=hA(this,e,[].concat(a)),La(r,"lastBoundingBox",{width:-1,height:-1}),r}return mA(e,t),pA(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>vh||Math.abs(a.height-this.lastBoundingBox.height)>vh)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?nt({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,u=a.margin,c=a.chartWidth,f=a.chartHeight,l,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();l={left:((c||0)-h.width)/2}}else l=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var y=this.getBBoxSnapshot();d={top:((f||0)-y.height)/2}}else d=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return nt(nt({},l),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,u=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,l=nt(nt({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return j.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(h){n.wrapperNode=h}},OA(i,nt(nt({},this.props),{},{payload:Xg(f,c,wA)})))}}],[{key:"getWithHeight",value:function(n,a){var i=nt(nt({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&B(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(T.PureComponent);La(tr,"displayName","Legend");La(tr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Rs,yh;function SA(){if(yh)return Rs;yh=1;var t=An(),e=Ll(),r=je(),n=t?t.isConcatSpreadable:void 0;function a(i){return r(i)||e(i)||!!(n&&i&&i[n])}return Rs=a,Rs}var Ds,mh;function Jg(){if(mh)return Ds;mh=1;var t=Bg(),e=SA();function r(n,a,i,o,s){var u=-1,c=n.length;for(i||(i=e),s||(s=[]);++u<c;){var f=n[u];a>0&&i(f)?a>1?r(f,a-1,i,o,s):t(s,f):o||(s[s.length]=f)}return s}return Ds=r,Ds}var qs,gh;function AA(){if(gh)return qs;gh=1;function t(e){return function(r,n,a){for(var i=-1,o=Object(r),s=a(r),u=s.length;u--;){var c=s[e?u:++i];if(n(o[c],c,o)===!1)break}return r}}return qs=t,qs}var Ls,bh;function PA(){if(bh)return Ls;bh=1;var t=AA(),e=t();return Ls=e,Ls}var Bs,xh;function Qg(){if(xh)return Bs;xh=1;var t=PA(),e=qa();function r(n,a){return n&&t(n,a,e)}return Bs=r,Bs}var Fs,wh;function _A(){if(wh)return Fs;wh=1;var t=jn();function e(r,n){return function(a,i){if(a==null)return a;if(!t(a))return r(a,i);for(var o=a.length,s=n?o:-1,u=Object(a);(n?s--:++s<o)&&i(u[s],s,u)!==!1;);return a}}return Fs=e,Fs}var zs,Oh;function Wl(){if(Oh)return zs;Oh=1;var t=Qg(),e=_A(),r=e(t);return zs=r,zs}var Ws,Sh;function eb(){if(Sh)return Ws;Sh=1;var t=Wl(),e=jn();function r(n,a){var i=-1,o=e(n)?Array(n.length):[];return t(n,function(s,u,c){o[++i]=a(s,u,c)}),o}return Ws=r,Ws}var Us,Ah;function jA(){if(Ah)return Us;Ah=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return Us=t,Us}var Ks,Ph;function EA(){if(Ph)return Ks;Ph=1;var t=Sr();function e(r,n){if(r!==n){var a=r!==void 0,i=r===null,o=r===r,s=t(r),u=n!==void 0,c=n===null,f=n===n,l=t(n);if(!c&&!l&&!s&&r>n||s&&u&&f&&!c&&!l||i&&u&&f||!a&&f||!o)return 1;if(!i&&!s&&!l&&r<n||l&&a&&o&&!i&&!s||c&&a&&o||!u&&o||!f)return-1}return 0}return Ks=e,Ks}var Gs,_h;function TA(){if(_h)return Gs;_h=1;var t=EA();function e(r,n,a){for(var i=-1,o=r.criteria,s=n.criteria,u=o.length,c=a.length;++i<u;){var f=t(o[i],s[i]);if(f){if(i>=c)return f;var l=a[i];return f*(l=="desc"?-1:1)}}return r.index-n.index}return Gs=e,Gs}var Hs,jh;function CA(){if(jh)return Hs;jh=1;var t=Il(),e=Ml(),r=At(),n=eb(),a=jA(),i=zg(),o=TA(),s=Pr(),u=je();function c(f,l,d){l.length?l=t(l,function(v){return u(v)?function(p){return e(p,v.length===1?v[0]:v)}:v}):l=[s];var h=-1;l=t(l,i(r));var y=n(f,function(v,p,x){var b=t(l,function(w){return w(v)});return{criteria:b,index:++h,value:v}});return a(y,function(v,p){return o(v,p,d)})}return Hs=c,Hs}var Vs,Eh;function kA(){if(Eh)return Vs;Eh=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return Vs=t,Vs}var Xs,Th;function IA(){if(Th)return Xs;Th=1;var t=kA(),e=Math.max;function r(n,a,i){return a=e(a===void 0?n.length-1:a,0),function(){for(var o=arguments,s=-1,u=e(o.length-a,0),c=Array(u);++s<u;)c[s]=o[a+s];s=-1;for(var f=Array(a+1);++s<a;)f[s]=o[s];return f[a]=i(c),t(n,this,f)}}return Xs=r,Xs}var Ys,Ch;function MA(){if(Ch)return Ys;Ch=1;function t(e){return function(){return e}}return Ys=t,Ys}var Zs,kh;function tb(){if(kh)return Zs;kh=1;var t=Wt(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return Zs=e,Zs}var Js,Ih;function $A(){if(Ih)return Js;Ih=1;var t=MA(),e=tb(),r=Pr(),n=e?function(a,i){return e(a,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:r;return Js=n,Js}var Qs,Mh;function NA(){if(Mh)return Qs;Mh=1;var t=800,e=16,r=Date.now;function n(a){var i=0,o=0;return function(){var s=r(),u=e-(s-o);if(o=s,u>0){if(++i>=t)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Qs=n,Qs}var eu,$h;function RA(){if($h)return eu;$h=1;var t=$A(),e=NA(),r=e(t);return eu=r,eu}var tu,Nh;function DA(){if(Nh)return tu;Nh=1;var t=Pr(),e=IA(),r=RA();function n(a,i){return r(e(a,i,t),a+"")}return tu=n,tu}var ru,Rh;function Ba(){if(Rh)return ru;Rh=1;var t=Tl(),e=jn(),r=Bl(),n=St();function a(i,o,s){if(!n(s))return!1;var u=typeof o;return(u=="number"?e(s)&&r(o,s.length):u=="string"&&o in s)?t(s[o],i):!1}return ru=a,ru}var nu,Dh;function qA(){if(Dh)return nu;Dh=1;var t=Jg(),e=CA(),r=DA(),n=Ba(),a=r(function(i,o){if(i==null)return[];var s=o.length;return s>1&&n(i,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),e(i,t(o,1),[])});return nu=a,nu}var LA=qA();const Ul=ie(LA);function Vr(t){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(t)}function yc(){return yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yc.apply(this,arguments)}function BA(t,e){return UA(t)||WA(t,e)||zA(t,e)||FA()}function FA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zA(t,e){if(t){if(typeof t=="string")return qh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qh(t,e)}}function qh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function WA(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function UA(t){if(Array.isArray(t))return t}function Lh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function au(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lh(Object(r),!0).forEach(function(n){KA(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function KA(t,e,r){return e=GA(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GA(t){var e=HA(t,"string");return Vr(e)=="symbol"?e:e+""}function HA(t,e){if(Vr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function VA(t){return Array.isArray(t)&&ve(t[0])&&ve(t[1])?t.join(" ~ "):t}var XA=function(e){var r=e.separator,n=r===void 0?" : ":r,a=e.contentStyle,i=a===void 0?{}:a,o=e.itemStyle,s=o===void 0?{}:o,u=e.labelStyle,c=u===void 0?{}:u,f=e.payload,l=e.formatter,d=e.itemSorter,h=e.wrapperClassName,y=e.labelClassName,v=e.label,p=e.labelFormatter,x=e.accessibilityLayer,b=x===void 0?!1:x,w=function(){if(f&&f.length){var C={padding:0,margin:0},I=(d?Ul(f,d):f).map(function(N,M){if(N.type==="none")return null;var R=au({display:"block",paddingTop:4,paddingBottom:4,color:N.color||"#000"},s),D=N.formatter||l||VA,F=N.value,z=N.name,q=F,U=z;if(D&&q!=null&&U!=null){var L=D(F,z,N,M,f);if(Array.isArray(L)){var K=BA(L,2);q=K[0],U=K[1]}else q=L}return j.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:R},ve(U)?j.createElement("span",{className:"recharts-tooltip-item-name"},U):null,ve(U)?j.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,j.createElement("span",{className:"recharts-tooltip-item-value"},q),j.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return j.createElement("ul",{className:"recharts-tooltip-item-list",style:C},I)}return null},S=au({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=au({margin:0},c),O=!X(v),A=O?v:"",_=J("recharts-default-tooltip",h),P=J("recharts-tooltip-label",y);O&&p&&f!==void 0&&f!==null&&(A=p(v,f));var k=b?{role:"status","aria-live":"assertive"}:{};return j.createElement("div",yc({className:_,style:S},k),j.createElement("p",{className:P,style:g},j.isValidElement(A)?A:"".concat(A)),w())};function Xr(t){"@babel/helpers - typeof";return Xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xr(t)}function $n(t,e,r){return e=YA(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YA(t){var e=ZA(t,"string");return Xr(e)=="symbol"?e:e+""}function ZA(t,e){if(Xr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Xr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var kr="recharts-tooltip-wrapper",JA={visibility:"hidden"};function QA(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return J(kr,$n($n($n($n({},"".concat(kr,"-right"),B(r)&&e&&B(e.x)&&r>=e.x),"".concat(kr,"-left"),B(r)&&e&&B(e.x)&&r<e.x),"".concat(kr,"-bottom"),B(n)&&e&&B(e.y)&&n>=e.y),"".concat(kr,"-top"),B(n)&&e&&B(e.y)&&n<e.y))}function Bh(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,a=t.offsetTopLeft,i=t.position,o=t.reverseDirection,s=t.tooltipDimension,u=t.viewBox,c=t.viewBoxDimension;if(i&&B(i[n]))return i[n];var f=r[n]-s-a,l=r[n]+a;if(e[n])return o[n]?f:l;if(o[n]){var d=f,h=u[n];return d<h?Math.max(l,u[n]):Math.max(f,u[n])}var y=l+s,v=u[n]+c;return y>v?Math.max(f,u[n]):Math.max(l,u[n])}function eP(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function tP(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,a=t.position,i=t.reverseDirection,o=t.tooltipBox,s=t.useTranslate3d,u=t.viewBox,c,f,l;return o.height>0&&o.width>0&&r?(f=Bh({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),l=Bh({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),c=eP({translateX:f,translateY:l,useTranslate3d:s})):c=JA,{cssProperties:c,cssClasses:QA({translateX:f,translateY:l,coordinate:r})}}function sr(t){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(t)}function Fh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function zh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fh(Object(r),!0).forEach(function(n){gc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nb(n.key),n)}}function aP(t,e,r){return e&&nP(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function iP(t,e,r){return e=Jn(e),oP(t,rb()?Reflect.construct(e,r||[],Jn(t).constructor):e.apply(t,r))}function oP(t,e){if(e&&(sr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sP(t)}function sP(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rb(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rb=function(){return!!t})()}function Jn(t){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jn(t)}function uP(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mc(t,e)}function mc(t,e){return mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},mc(t,e)}function gc(t,e,r){return e=nb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nb(t){var e=cP(t,"string");return sr(e)=="symbol"?e:e+""}function cP(t,e){if(sr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(sr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Wh=1,lP=function(t){function e(){var r;rP(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=iP(this,e,[].concat(a)),gc(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),gc(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,u,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(u=r.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&s!==void 0?s:0,y:(c=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),r}return uP(e,t),aP(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Wh||Math.abs(n.height-this.state.lastBoundingBox.height)>Wh)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,u=a.animationEasing,c=a.children,f=a.coordinate,l=a.hasPayload,d=a.isAnimationActive,h=a.offset,y=a.position,v=a.reverseDirection,p=a.useTranslate3d,x=a.viewBox,b=a.wrapperStyle,w=tP({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:x}),S=w.cssClasses,g=w.cssProperties,O=zh(zh({transition:d&&i?"transform ".concat(s,"ms ").concat(u):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&l?"visible":"hidden",position:"absolute",top:0,left:0},b);return j.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(_){n.wrapperNode=_}},c)}}])}(T.PureComponent),fP=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},_r={isSsr:fP()};function ur(t){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(t)}function Uh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Kh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uh(Object(r),!0).forEach(function(n){Kl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ib(n.key),n)}}function hP(t,e,r){return e&&pP(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function vP(t,e,r){return e=Qn(e),yP(t,ab()?Reflect.construct(e,r||[],Qn(t).constructor):e.apply(t,r))}function yP(t,e){if(e&&(ur(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mP(t)}function mP(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ab(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ab=function(){return!!t})()}function Qn(t){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qn(t)}function gP(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bc(t,e)}function bc(t,e){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bc(t,e)}function Kl(t,e,r){return e=ib(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ib(t){var e=bP(t,"string");return ur(e)=="symbol"?e:e+""}function bP(t,e){if(ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ur(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function xP(t){return t.dataKey}function wP(t,e){return j.isValidElement(t)?j.cloneElement(t,e):typeof t=="function"?j.createElement(t,e):j.createElement(XA,e)}var Ye=function(t){function e(){return dP(this,e),vP(this,e,arguments)}return gP(e,t),hP(e,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,u=a.animationEasing,c=a.content,f=a.coordinate,l=a.filterNull,d=a.isAnimationActive,h=a.offset,y=a.payload,v=a.payloadUniqBy,p=a.position,x=a.reverseDirection,b=a.useTranslate3d,w=a.viewBox,S=a.wrapperStyle,g=y??[];l&&g.length&&(g=Xg(y.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),v,xP));var O=g.length>0;return j.createElement(lP,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:d,active:i,coordinate:f,hasPayload:O,offset:h,position:p,reverseDirection:x,useTranslate3d:b,viewBox:w,wrapperStyle:S},wP(c,Kh(Kh({},this.props),{},{payload:g})))}}])}(T.PureComponent);Kl(Ye,"displayName","Tooltip");Kl(Ye,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!_r.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var iu,Gh;function OP(){if(Gh)return iu;Gh=1;var t=et(),e=function(){return t.Date.now()};return iu=e,iu}var ou,Hh;function SP(){if(Hh)return ou;Hh=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return ou=e,ou}var su,Vh;function AP(){if(Vh)return su;Vh=1;var t=SP(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return su=r,su}var uu,Xh;function ob(){if(Xh)return uu;Xh=1;var t=AP(),e=St(),r=Sr(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(c){if(typeof c=="number")return c;if(r(c))return n;if(e(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=e(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=t(c);var l=i.test(c);return l||o.test(c)?s(c.slice(2),l?2:8):a.test(c)?n:+c}return uu=u,uu}var cu,Yh;function PP(){if(Yh)return cu;Yh=1;var t=St(),e=OP(),r=ob(),n="Expected a function",a=Math.max,i=Math.min;function o(s,u,c){var f,l,d,h,y,v,p=0,x=!1,b=!1,w=!0;if(typeof s!="function")throw new TypeError(n);u=r(u)||0,t(c)&&(x=!!c.leading,b="maxWait"in c,d=b?a(r(c.maxWait)||0,u):d,w="trailing"in c?!!c.trailing:w);function S(I){var N=f,M=l;return f=l=void 0,p=I,h=s.apply(M,N),h}function g(I){return p=I,y=setTimeout(_,u),x?S(I):h}function O(I){var N=I-v,M=I-p,R=u-N;return b?i(R,d-M):R}function A(I){var N=I-v,M=I-p;return v===void 0||N>=u||N<0||b&&M>=d}function _(){var I=e();if(A(I))return P(I);y=setTimeout(_,O(I))}function P(I){return y=void 0,w&&f?S(I):(f=l=void 0,h)}function k(){y!==void 0&&clearTimeout(y),p=0,f=v=l=y=void 0}function E(){return y===void 0?h:P(e())}function C(){var I=e(),N=A(I);if(f=arguments,l=this,v=I,N){if(y===void 0)return g(v);if(b)return clearTimeout(y),y=setTimeout(_,u),S(v)}return y===void 0&&(y=setTimeout(_,u)),h}return C.cancel=k,C.flush=E,C}return cu=o,cu}var lu,Zh;function _P(){if(Zh)return lu;Zh=1;var t=PP(),e=St(),r="Expected a function";function n(a,i,o){var s=!0,u=!0;if(typeof a!="function")throw new TypeError(r);return e(o)&&(s="leading"in o?!!o.leading:s,u="trailing"in o?!!o.trailing:u),t(a,i,{leading:s,maxWait:i,trailing:u})}return lu=n,lu}var jP=_P();const sb=ie(jP);function Yr(t){"@babel/helpers - typeof";return Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yr(t)}function Jh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jh(Object(r),!0).forEach(function(n){EP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EP(t,e,r){return e=TP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TP(t){var e=CP(t,"string");return Yr(e)=="symbol"?e:e+""}function CP(t,e){if(Yr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kP(t,e){return NP(t)||$P(t,e)||MP(t,e)||IP()}function IP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
104
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MP(t,e){if(t){if(typeof t=="string")return Qh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qh(t,e)}}function Qh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $P(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function NP(t){if(Array.isArray(t))return t}var RP=T.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=t.width,o=i===void 0?"100%":i,s=t.height,u=s===void 0?"100%":s,c=t.minWidth,f=c===void 0?0:c,l=t.minHeight,d=t.maxHeight,h=t.children,y=t.debounce,v=y===void 0?0:y,p=t.id,x=t.className,b=t.onResize,w=t.style,S=w===void 0?{}:w,g=T.useRef(null),O=T.useRef();O.current=b,T.useImperativeHandle(e,function(){return Object.defineProperty(g.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),g.current},configurable:!0})});var A=T.useState({containerWidth:a.width,containerHeight:a.height}),_=kP(A,2),P=_[0],k=_[1],E=T.useCallback(function(I,N){k(function(M){var R=Math.round(I),D=Math.round(N);return M.containerWidth===R&&M.containerHeight===D?M:{containerWidth:R,containerHeight:D}})},[]);T.useEffect(function(){var I=function(z){var q,U=z[0].contentRect,L=U.width,
|
|
102
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return j.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Be/8,"h").concat(Be,"v").concat(Be*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(j.isValidElement(n.legendIcon)){var c=o1({},n);return delete c.legendIcon,j.cloneElement(n.legendIcon,c)}return j.createElement(Rl,{fill:u,cx:i,cy:i,size:Be,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,u=a.formatter,c=a.inactiveColor,f={x:0,y:0,width:Be,height:Be},l={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,y){var v=h.formatter||u,p=J(Hr(Hr({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var x=H(h.value)?null:h.value;st(!H(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=h.inactive?c:h.color;return j.createElement("li",pc({className:p,style:l,key:"legend-item-".concat(y)},Xn(n.props,h,y)),j.createElement(lc,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),j.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},v?v(x,h,y):x))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return j.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(T.PureComponent);Hr(Dl,"displayName","Legend");Hr(Dl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var xo,Vd;function v1(){if(Vd)return xo;Vd=1;var t=$a();function e(){this.__data__=new t,this.size=0}return xo=e,xo}var wo,Xd;function y1(){if(Xd)return wo;Xd=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return wo=t,wo}var Oo,Yd;function m1(){if(Yd)return Oo;Yd=1;function t(e){return this.__data__.get(e)}return Oo=t,Oo}var So,Zd;function g1(){if(Zd)return So;Zd=1;function t(e){return this.__data__.has(e)}return So=t,So}var Ao,Jd;function b1(){if(Jd)return Ao;Jd=1;var t=$a(),e=Cl(),r=kl(),n=200;function a(i,o){var s=this.__data__;if(s instanceof t){var u=s.__data__;if(!e||u.length<n-1)return u.push([i,o]),this.size=++s.size,this;s=this.__data__=new r(u)}return s.set(i,o),this.size=s.size,this}return Ao=a,Ao}var Po,Qd;function Ng(){if(Qd)return Po;Qd=1;var t=$a(),e=v1(),r=y1(),n=m1(),a=g1(),i=b1();function o(s){var u=this.__data__=new t(s);this.size=u.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Po=o,Po}var _o,ep;function x1(){if(ep)return _o;ep=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return _o=e,_o}var jo,tp;function w1(){if(tp)return jo;tp=1;function t(e){return this.__data__.has(e)}return jo=t,jo}var Eo,rp;function Rg(){if(rp)return Eo;rp=1;var t=kl(),e=x1(),r=w1();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new t;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,Eo=n,Eo}var To,np;function Dg(){if(np)return To;np=1;function t(e,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(e[n],n,e))return!0;return!1}return To=t,To}var Co,ap;function qg(){if(ap)return Co;ap=1;function t(e,r){return e.has(r)}return Co=t,Co}var ko,ip;function Lg(){if(ip)return ko;ip=1;var t=Rg(),e=Dg(),r=qg(),n=1,a=2;function i(o,s,u,c,f,l){var d=u&n,h=o.length,y=s.length;if(h!=y&&!(d&&y>h))return!1;var v=l.get(o),p=l.get(s);if(v&&p)return v==s&&p==o;var x=-1,b=!0,w=u&a?new t:void 0;for(l.set(o,s),l.set(s,o);++x<h;){var S=o[x],g=s[x];if(c)var O=d?c(g,S,x,s,o,l):c(S,g,x,o,s,l);if(O!==void 0){if(O)continue;b=!1;break}if(w){if(!e(s,function(A,_){if(!r(w,_)&&(S===A||f(S,A,u,c,l)))return w.push(_)})){b=!1;break}}else if(!(S===g||f(S,g,u,c,l))){b=!1;break}}return l.delete(o),l.delete(s),b}return ko=i,ko}var Io,op;function O1(){if(op)return Io;op=1;var t=et(),e=t.Uint8Array;return Io=e,Io}var Mo,sp;function S1(){if(sp)return Mo;sp=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(a,i){n[++r]=[i,a]}),n}return Mo=t,Mo}var $o,up;function ql(){if(up)return $o;up=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(a){n[++r]=a}),n}return $o=t,$o}var No,cp;function A1(){if(cp)return No;cp=1;var t=An(),e=O1(),r=Tl(),n=Lg(),a=S1(),i=ql(),o=1,s=2,u="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Map]",d="[object Number]",h="[object RegExp]",y="[object Set]",v="[object String]",p="[object Symbol]",x="[object ArrayBuffer]",b="[object DataView]",w=t?t.prototype:void 0,S=w?w.valueOf:void 0;function g(O,A,_,P,k,E,C){switch(_){case b:if(O.byteLength!=A.byteLength||O.byteOffset!=A.byteOffset)return!1;O=O.buffer,A=A.buffer;case x:return!(O.byteLength!=A.byteLength||!E(new e(O),new e(A)));case u:case c:case d:return r(+O,+A);case f:return O.name==A.name&&O.message==A.message;case h:case v:return O==A+"";case l:var I=a;case y:var N=P&o;if(I||(I=i),O.size!=A.size&&!N)return!1;var M=C.get(O);if(M)return M==A;P|=s,C.set(O,A);var R=n(I(O),I(A),P,k,E,C);return C.delete(O),R;case p:if(S)return S.call(O)==S.call(A)}return!1}return No=g,No}var Ro,lp;function Bg(){if(lp)return Ro;lp=1;function t(e,r){for(var n=-1,a=r.length,i=e.length;++n<a;)e[i+n]=r[n];return e}return Ro=t,Ro}var Do,fp;function P1(){if(fp)return Do;fp=1;var t=Bg(),e=je();function r(n,a,i){var o=a(n);return e(n)?o:t(o,i(n))}return Do=r,Do}var qo,dp;function _1(){if(dp)return qo;dp=1;function t(e,r){for(var n=-1,a=e==null?0:e.length,i=0,o=[];++n<a;){var s=e[n];r(s,n,e)&&(o[i++]=s)}return o}return qo=t,qo}var Lo,pp;function j1(){if(pp)return Lo;pp=1;function t(){return[]}return Lo=t,Lo}var Bo,hp;function E1(){if(hp)return Bo;hp=1;var t=_1(),e=j1(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),t(a(o),function(s){return n.call(o,s)}))}:e;return Bo=i,Bo}var Fo,vp;function T1(){if(vp)return Fo;vp=1;function t(e,r){for(var n=-1,a=Array(e);++n<e;)a[n]=r(n);return a}return Fo=t,Fo}var zo,yp;function C1(){if(yp)return zo;yp=1;var t=ft(),e=dt(),r="[object Arguments]";function n(a){return e(a)&&t(a)==r}return zo=n,zo}var Wo,mp;function Ll(){if(mp)return Wo;mp=1;var t=C1(),e=dt(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(o){return e(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return Wo=i,Wo}var Rr={exports:{}},Uo,gp;function k1(){if(gp)return Uo;gp=1;function t(){return!1}return Uo=t,Uo}Rr.exports;var bp;function Fg(){return bp||(bp=1,function(t,e){var r=et(),n=k1(),a=e&&!e.nodeType&&e,i=a&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===a,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||n;t.exports=c}(Rr,Rr.exports)),Rr.exports}var Go,xp;function Bl(){if(xp)return Go;xp=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??t,!!a&&(i=="number"||i!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<a}return Go=r,Go}var Ko,wp;function Fl(){if(wp)return Ko;wp=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Ko=e,Ko}var Ho,Op;function I1(){if(Op)return Ho;Op=1;var t=ft(),e=Fl(),r=dt(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",c="[object Map]",f="[object Number]",l="[object Object]",d="[object RegExp]",h="[object Set]",y="[object String]",v="[object WeakMap]",p="[object ArrayBuffer]",x="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",S="[object Int8Array]",g="[object Int16Array]",O="[object Int32Array]",A="[object Uint8Array]",_="[object Uint8ClampedArray]",P="[object Uint16Array]",k="[object Uint32Array]",E={};E[b]=E[w]=E[S]=E[g]=E[O]=E[A]=E[_]=E[P]=E[k]=!0,E[n]=E[a]=E[p]=E[i]=E[x]=E[o]=E[s]=E[u]=E[c]=E[f]=E[l]=E[d]=E[h]=E[y]=E[v]=!1;function C(I){return r(I)&&e(I.length)&&!!E[t(I)]}return Ho=C,Ho}var Vo,Sp;function zg(){if(Sp)return Vo;Sp=1;function t(e){return function(r){return e(r)}}return Vo=t,Vo}var Dr={exports:{}};Dr.exports;var Ap;function M1(){return Ap||(Ap=1,function(t,e){var r=Ag(),n=e&&!e.nodeType&&e,a=n&&!0&&t&&!t.nodeType&&t,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var u=a&&a.require&&a.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}(Dr,Dr.exports)),Dr.exports}var Xo,Pp;function Wg(){if(Pp)return Xo;Pp=1;var t=I1(),e=zg(),r=M1(),n=r&&r.isTypedArray,a=n?e(n):t;return Xo=a,Xo}var Yo,_p;function $1(){if(_p)return Yo;_p=1;var t=T1(),e=Ll(),r=je(),n=Fg(),a=Bl(),i=Wg(),o=Object.prototype,s=o.hasOwnProperty;function u(c,f){var l=r(c),d=!l&&e(c),h=!l&&!d&&n(c),y=!l&&!d&&!h&&i(c),v=l||d||h||y,p=v?t(c.length,String):[],x=p.length;for(var b in c)(f||s.call(c,b))&&!(v&&(b=="length"||h&&(b=="offset"||b=="parent")||y&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,x)))&&p.push(b);return p}return Yo=u,Yo}var Zo,jp;function N1(){if(jp)return Zo;jp=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||t;return r===a}return Zo=e,Zo}var Jo,Ep;function Ug(){if(Ep)return Jo;Ep=1;function t(e,r){return function(n){return e(r(n))}}return Jo=t,Jo}var Qo,Tp;function R1(){if(Tp)return Qo;Tp=1;var t=Ug(),e=t(Object.keys,Object);return Qo=e,Qo}var es,Cp;function D1(){if(Cp)return es;Cp=1;var t=N1(),e=R1(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!t(i))return e(i);var o=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&o.push(s);return o}return es=a,es}var ts,kp;function jn(){if(kp)return ts;kp=1;var t=El(),e=Fl();function r(n){return n!=null&&e(n.length)&&!t(n)}return ts=r,ts}var rs,Ip;function qa(){if(Ip)return rs;Ip=1;var t=$1(),e=D1(),r=jn();function n(a){return r(a)?t(a):e(a)}return rs=n,rs}var ns,Mp;function q1(){if(Mp)return ns;Mp=1;var t=P1(),e=E1(),r=qa();function n(a){return t(a,r,e)}return ns=n,ns}var as,$p;function L1(){if($p)return as;$p=1;var t=q1(),e=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,o,s,u,c,f){var l=s&e,d=t(i),h=d.length,y=t(o),v=y.length;if(h!=v&&!l)return!1;for(var p=h;p--;){var x=d[p];if(!(l?x in o:n.call(o,x)))return!1}var b=f.get(i),w=f.get(o);if(b&&w)return b==o&&w==i;var S=!0;f.set(i,o),f.set(o,i);for(var g=l;++p<h;){x=d[p];var O=i[x],A=o[x];if(u)var _=l?u(A,O,x,o,i,f):u(O,A,x,i,o,f);if(!(_===void 0?O===A||c(O,A,s,u,f):_)){S=!1;break}g||(g=x=="constructor")}if(S&&!g){var P=i.constructor,k=o.constructor;P!=k&&"constructor"in i&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof k=="function"&&k instanceof k)&&(S=!1)}return f.delete(i),f.delete(o),S}return as=a,as}var is,Np;function B1(){if(Np)return is;Np=1;var t=Wt(),e=et(),r=t(e,"DataView");return is=r,is}var os,Rp;function F1(){if(Rp)return os;Rp=1;var t=Wt(),e=et(),r=t(e,"Promise");return os=r,os}var ss,Dp;function Gg(){if(Dp)return ss;Dp=1;var t=Wt(),e=et(),r=t(e,"Set");return ss=r,ss}var us,qp;function z1(){if(qp)return us;qp=1;var t=Wt(),e=et(),r=t(e,"WeakMap");return us=r,us}var cs,Lp;function W1(){if(Lp)return cs;Lp=1;var t=B1(),e=Cl(),r=F1(),n=Gg(),a=z1(),i=ft(),o=Pg(),s="[object Map]",u="[object Object]",c="[object Promise]",f="[object Set]",l="[object WeakMap]",d="[object DataView]",h=o(t),y=o(e),v=o(r),p=o(n),x=o(a),b=i;return(t&&b(new t(new ArrayBuffer(1)))!=d||e&&b(new e)!=s||r&&b(r.resolve())!=c||n&&b(new n)!=f||a&&b(new a)!=l)&&(b=function(w){var S=i(w),g=S==u?w.constructor:void 0,O=g?o(g):"";if(O)switch(O){case h:return d;case y:return s;case v:return c;case p:return f;case x:return l}return S}),cs=b,cs}var ls,Bp;function U1(){if(Bp)return ls;Bp=1;var t=Ng(),e=Lg(),r=A1(),n=L1(),a=W1(),i=je(),o=Fg(),s=Wg(),u=1,c="[object Arguments]",f="[object Array]",l="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function y(v,p,x,b,w,S){var g=i(v),O=i(p),A=g?f:a(v),_=O?f:a(p);A=A==c?l:A,_=_==c?l:_;var P=A==l,k=_==l,E=A==_;if(E&&o(v)){if(!o(p))return!1;g=!0,P=!1}if(E&&!P)return S||(S=new t),g||s(v)?e(v,p,x,b,w,S):r(v,p,A,x,b,w,S);if(!(x&u)){var C=P&&h.call(v,"__wrapped__"),I=k&&h.call(p,"__wrapped__");if(C||I){var N=C?v.value():v,M=I?p.value():p;return S||(S=new t),w(N,M,x,b,S)}}return E?(S||(S=new t),n(v,p,x,b,w,S)):!1}return ls=y,ls}var fs,Fp;function zl(){if(Fp)return fs;Fp=1;var t=U1(),e=dt();function r(n,a,i,o,s){return n===a?!0:n==null||a==null||!e(n)&&!e(a)?n!==n&&a!==a:t(n,a,i,o,r,s)}return fs=r,fs}var ds,zp;function G1(){if(zp)return ds;zp=1;var t=Ng(),e=zl(),r=1,n=2;function a(i,o,s,u){var c=s.length,f=c,l=!u;if(i==null)return!f;for(i=Object(i);c--;){var d=s[c];if(l&&d[2]?d[1]!==i[d[0]]:!(d[0]in i))return!1}for(;++c<f;){d=s[c];var h=d[0],y=i[h],v=d[1];if(l&&d[2]){if(y===void 0&&!(h in i))return!1}else{var p=new t;if(u)var x=u(y,v,h,i,o,p);if(!(x===void 0?e(v,y,r|n,u,p):x))return!1}}return!0}return ds=a,ds}var ps,Wp;function Kg(){if(Wp)return ps;Wp=1;var t=St();function e(r){return r===r&&!t(r)}return ps=e,ps}var hs,Up;function K1(){if(Up)return hs;Up=1;var t=Kg(),e=qa();function r(n){for(var a=e(n),i=a.length;i--;){var o=a[i],s=n[o];a[i]=[o,s,t(s)]}return a}return hs=r,hs}var vs,Gp;function Hg(){if(Gp)return vs;Gp=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return vs=t,vs}var ys,Kp;function H1(){if(Kp)return ys;Kp=1;var t=G1(),e=K1(),r=Hg();function n(a){var i=e(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===a||t(o,a,i)}}return ys=n,ys}var ms,Hp;function V1(){if(Hp)return ms;Hp=1;function t(e,r){return e!=null&&r in Object(e)}return ms=t,ms}var gs,Vp;function X1(){if(Vp)return gs;Vp=1;var t=Eg(),e=Ll(),r=je(),n=Bl(),a=Fl(),i=Ra();function o(s,u,c){u=t(u,s);for(var f=-1,l=u.length,d=!1;++f<l;){var h=i(u[f]);if(!(d=s!=null&&c(s,h)))break;s=s[h]}return d||++f!=l?d:(l=s==null?0:s.length,!!l&&a(l)&&n(h,l)&&(r(s)||e(s)))}return gs=o,gs}var bs,Xp;function Y1(){if(Xp)return bs;Xp=1;var t=V1(),e=X1();function r(n,a){return n!=null&&e(n,a,t)}return bs=r,bs}var xs,Yp;function Z1(){if(Yp)return xs;Yp=1;var t=zl(),e=Tg(),r=Y1(),n=jl(),a=Kg(),i=Hg(),o=Ra(),s=1,u=2;function c(f,l){return n(f)&&a(l)?i(o(f),l):function(d){var h=e(d,f);return h===void 0&&h===l?r(d,f):t(l,h,s|u)}}return xs=c,xs}var ws,Zp;function Pr(){if(Zp)return ws;Zp=1;function t(e){return e}return ws=t,ws}var Os,Jp;function J1(){if(Jp)return Os;Jp=1;function t(e){return function(r){return r?.[e]}}return Os=t,Os}var Ss,Qp;function Q1(){if(Qp)return Ss;Qp=1;var t=Ml();function e(r){return function(n){return t(n,r)}}return Ss=e,Ss}var As,eh;function eA(){if(eh)return As;eh=1;var t=J1(),e=Q1(),r=jl(),n=Ra();function a(i){return r(i)?t(n(i)):e(i)}return As=a,As}var Ps,th;function At(){if(th)return Ps;th=1;var t=H1(),e=Z1(),r=Pr(),n=je(),a=eA();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?e(o[0],o[1]):t(o):a(o)}return Ps=i,Ps}var _s,rh;function Vg(){if(rh)return _s;rh=1;function t(e,r,n,a){for(var i=e.length,o=n+(a?1:-1);a?o--:++o<i;)if(r(e[o],o,e))return o;return-1}return _s=t,_s}var js,nh;function tA(){if(nh)return js;nh=1;function t(e){return e!==e}return js=t,js}var Es,ah;function rA(){if(ah)return Es;ah=1;function t(e,r,n){for(var a=n-1,i=e.length;++a<i;)if(e[a]===r)return a;return-1}return Es=t,Es}var Ts,ih;function nA(){if(ih)return Ts;ih=1;var t=Vg(),e=tA(),r=rA();function n(a,i,o){return i===i?r(a,i,o):t(a,e,o)}return Ts=n,Ts}var Cs,oh;function aA(){if(oh)return Cs;oh=1;var t=nA();function e(r,n){var a=r==null?0:r.length;return!!a&&t(r,n,0)>-1}return Cs=e,Cs}var ks,sh;function iA(){if(sh)return ks;sh=1;function t(e,r,n){for(var a=-1,i=e==null?0:e.length;++a<i;)if(n(r,e[a]))return!0;return!1}return ks=t,ks}var Is,uh;function oA(){if(uh)return Is;uh=1;function t(){}return Is=t,Is}var Ms,ch;function sA(){if(ch)return Ms;ch=1;var t=Gg(),e=oA(),r=ql(),n=1/0,a=t&&1/r(new t([,-0]))[1]==n?function(i){return new t(i)}:e;return Ms=a,Ms}var $s,lh;function uA(){if(lh)return $s;lh=1;var t=Rg(),e=aA(),r=iA(),n=qg(),a=sA(),i=ql(),o=200;function s(u,c,f){var l=-1,d=e,h=u.length,y=!0,v=[],p=v;if(f)y=!1,d=r;else if(h>=o){var x=c?null:a(u);if(x)return i(x);y=!1,d=n,p=new t}else p=c?[]:v;e:for(;++l<h;){var b=u[l],w=c?c(b):b;if(b=f||b!==0?b:0,y&&w===w){for(var S=p.length;S--;)if(p[S]===w)continue e;c&&p.push(w),v.push(b)}else d(p,w,f)||(p!==v&&p.push(w),v.push(b))}return v}return $s=s,$s}var Ns,fh;function cA(){if(fh)return Ns;fh=1;var t=At(),e=uA();function r(n,a){return n&&n.length?e(n,t(a,2)):[]}return Ns=r,Ns}var lA=cA();const dh=ie(lA);function Xg(t,e,r){return e===!0?dh(t,r):H(e)?dh(t,e):t}function or(t){"@babel/helpers - typeof";return or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},or(t)}var fA=["ref"];function ph(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ph(Object(r),!0).forEach(function(n){La(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zg(n.key),n)}}function pA(t,e,r){return e&&hh(t.prototype,e),r&&hh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function hA(t,e,r){return e=Zn(e),vA(t,Yg()?Reflect.construct(e,r||[],Zn(t).constructor):e.apply(t,r))}function vA(t,e){if(e&&(or(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yA(t)}function yA(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yg=function(){return!!t})()}function Zn(t){return Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zn(t)}function mA(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vc(t,e)}function vc(t,e){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vc(t,e)}function La(t,e,r){return e=Zg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zg(t){var e=gA(t,"string");return or(e)=="symbol"?e:e+""}function gA(t,e){if(or(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(or(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function bA(t,e){if(t==null)return{};var r=xA(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function xA(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function wA(t){return t.value}function OA(t,e){if(j.isValidElement(t))return j.cloneElement(t,e);if(typeof t=="function")return j.createElement(t,e);e.ref;var r=bA(e,fA);return j.createElement(Dl,r)}var vh=1,tr=function(t){function e(){var r;dA(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=hA(this,e,[].concat(a)),La(r,"lastBoundingBox",{width:-1,height:-1}),r}return mA(e,t),pA(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>vh||Math.abs(a.height-this.lastBoundingBox.height)>vh)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?nt({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,u=a.margin,c=a.chartWidth,f=a.chartHeight,l,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();l={left:((c||0)-h.width)/2}}else l=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var y=this.getBBoxSnapshot();d={top:((f||0)-y.height)/2}}else d=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return nt(nt({},l),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,u=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,l=nt(nt({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return j.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(h){n.wrapperNode=h}},OA(i,nt(nt({},this.props),{},{payload:Xg(f,c,wA)})))}}],[{key:"getWithHeight",value:function(n,a){var i=nt(nt({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&B(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(T.PureComponent);La(tr,"displayName","Legend");La(tr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Rs,yh;function SA(){if(yh)return Rs;yh=1;var t=An(),e=Ll(),r=je(),n=t?t.isConcatSpreadable:void 0;function a(i){return r(i)||e(i)||!!(n&&i&&i[n])}return Rs=a,Rs}var Ds,mh;function Jg(){if(mh)return Ds;mh=1;var t=Bg(),e=SA();function r(n,a,i,o,s){var u=-1,c=n.length;for(i||(i=e),s||(s=[]);++u<c;){var f=n[u];a>0&&i(f)?a>1?r(f,a-1,i,o,s):t(s,f):o||(s[s.length]=f)}return s}return Ds=r,Ds}var qs,gh;function AA(){if(gh)return qs;gh=1;function t(e){return function(r,n,a){for(var i=-1,o=Object(r),s=a(r),u=s.length;u--;){var c=s[e?u:++i];if(n(o[c],c,o)===!1)break}return r}}return qs=t,qs}var Ls,bh;function PA(){if(bh)return Ls;bh=1;var t=AA(),e=t();return Ls=e,Ls}var Bs,xh;function Qg(){if(xh)return Bs;xh=1;var t=PA(),e=qa();function r(n,a){return n&&t(n,a,e)}return Bs=r,Bs}var Fs,wh;function _A(){if(wh)return Fs;wh=1;var t=jn();function e(r,n){return function(a,i){if(a==null)return a;if(!t(a))return r(a,i);for(var o=a.length,s=n?o:-1,u=Object(a);(n?s--:++s<o)&&i(u[s],s,u)!==!1;);return a}}return Fs=e,Fs}var zs,Oh;function Wl(){if(Oh)return zs;Oh=1;var t=Qg(),e=_A(),r=e(t);return zs=r,zs}var Ws,Sh;function eb(){if(Sh)return Ws;Sh=1;var t=Wl(),e=jn();function r(n,a){var i=-1,o=e(n)?Array(n.length):[];return t(n,function(s,u,c){o[++i]=a(s,u,c)}),o}return Ws=r,Ws}var Us,Ah;function jA(){if(Ah)return Us;Ah=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return Us=t,Us}var Gs,Ph;function EA(){if(Ph)return Gs;Ph=1;var t=Sr();function e(r,n){if(r!==n){var a=r!==void 0,i=r===null,o=r===r,s=t(r),u=n!==void 0,c=n===null,f=n===n,l=t(n);if(!c&&!l&&!s&&r>n||s&&u&&f&&!c&&!l||i&&u&&f||!a&&f||!o)return 1;if(!i&&!s&&!l&&r<n||l&&a&&o&&!i&&!s||c&&a&&o||!u&&o||!f)return-1}return 0}return Gs=e,Gs}var Ks,_h;function TA(){if(_h)return Ks;_h=1;var t=EA();function e(r,n,a){for(var i=-1,o=r.criteria,s=n.criteria,u=o.length,c=a.length;++i<u;){var f=t(o[i],s[i]);if(f){if(i>=c)return f;var l=a[i];return f*(l=="desc"?-1:1)}}return r.index-n.index}return Ks=e,Ks}var Hs,jh;function CA(){if(jh)return Hs;jh=1;var t=Il(),e=Ml(),r=At(),n=eb(),a=jA(),i=zg(),o=TA(),s=Pr(),u=je();function c(f,l,d){l.length?l=t(l,function(v){return u(v)?function(p){return e(p,v.length===1?v[0]:v)}:v}):l=[s];var h=-1;l=t(l,i(r));var y=n(f,function(v,p,x){var b=t(l,function(w){return w(v)});return{criteria:b,index:++h,value:v}});return a(y,function(v,p){return o(v,p,d)})}return Hs=c,Hs}var Vs,Eh;function kA(){if(Eh)return Vs;Eh=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return Vs=t,Vs}var Xs,Th;function IA(){if(Th)return Xs;Th=1;var t=kA(),e=Math.max;function r(n,a,i){return a=e(a===void 0?n.length-1:a,0),function(){for(var o=arguments,s=-1,u=e(o.length-a,0),c=Array(u);++s<u;)c[s]=o[a+s];s=-1;for(var f=Array(a+1);++s<a;)f[s]=o[s];return f[a]=i(c),t(n,this,f)}}return Xs=r,Xs}var Ys,Ch;function MA(){if(Ch)return Ys;Ch=1;function t(e){return function(){return e}}return Ys=t,Ys}var Zs,kh;function tb(){if(kh)return Zs;kh=1;var t=Wt(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return Zs=e,Zs}var Js,Ih;function $A(){if(Ih)return Js;Ih=1;var t=MA(),e=tb(),r=Pr(),n=e?function(a,i){return e(a,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:r;return Js=n,Js}var Qs,Mh;function NA(){if(Mh)return Qs;Mh=1;var t=800,e=16,r=Date.now;function n(a){var i=0,o=0;return function(){var s=r(),u=e-(s-o);if(o=s,u>0){if(++i>=t)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Qs=n,Qs}var eu,$h;function RA(){if($h)return eu;$h=1;var t=$A(),e=NA(),r=e(t);return eu=r,eu}var tu,Nh;function DA(){if(Nh)return tu;Nh=1;var t=Pr(),e=IA(),r=RA();function n(a,i){return r(e(a,i,t),a+"")}return tu=n,tu}var ru,Rh;function Ba(){if(Rh)return ru;Rh=1;var t=Tl(),e=jn(),r=Bl(),n=St();function a(i,o,s){if(!n(s))return!1;var u=typeof o;return(u=="number"?e(s)&&r(o,s.length):u=="string"&&o in s)?t(s[o],i):!1}return ru=a,ru}var nu,Dh;function qA(){if(Dh)return nu;Dh=1;var t=Jg(),e=CA(),r=DA(),n=Ba(),a=r(function(i,o){if(i==null)return[];var s=o.length;return s>1&&n(i,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),e(i,t(o,1),[])});return nu=a,nu}var LA=qA();const Ul=ie(LA);function Vr(t){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(t)}function yc(){return yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yc.apply(this,arguments)}function BA(t,e){return UA(t)||WA(t,e)||zA(t,e)||FA()}function FA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zA(t,e){if(t){if(typeof t=="string")return qh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qh(t,e)}}function qh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function WA(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function UA(t){if(Array.isArray(t))return t}function Lh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function au(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lh(Object(r),!0).forEach(function(n){GA(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function GA(t,e,r){return e=KA(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KA(t){var e=HA(t,"string");return Vr(e)=="symbol"?e:e+""}function HA(t,e){if(Vr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function VA(t){return Array.isArray(t)&&ve(t[0])&&ve(t[1])?t.join(" ~ "):t}var XA=function(e){var r=e.separator,n=r===void 0?" : ":r,a=e.contentStyle,i=a===void 0?{}:a,o=e.itemStyle,s=o===void 0?{}:o,u=e.labelStyle,c=u===void 0?{}:u,f=e.payload,l=e.formatter,d=e.itemSorter,h=e.wrapperClassName,y=e.labelClassName,v=e.label,p=e.labelFormatter,x=e.accessibilityLayer,b=x===void 0?!1:x,w=function(){if(f&&f.length){var C={padding:0,margin:0},I=(d?Ul(f,d):f).map(function(N,M){if(N.type==="none")return null;var R=au({display:"block",paddingTop:4,paddingBottom:4,color:N.color||"#000"},s),D=N.formatter||l||VA,F=N.value,z=N.name,q=F,U=z;if(D&&q!=null&&U!=null){var L=D(F,z,N,M,f);if(Array.isArray(L)){var G=BA(L,2);q=G[0],U=G[1]}else q=L}return j.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:R},ve(U)?j.createElement("span",{className:"recharts-tooltip-item-name"},U):null,ve(U)?j.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,j.createElement("span",{className:"recharts-tooltip-item-value"},q),j.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return j.createElement("ul",{className:"recharts-tooltip-item-list",style:C},I)}return null},S=au({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=au({margin:0},c),O=!X(v),A=O?v:"",_=J("recharts-default-tooltip",h),P=J("recharts-tooltip-label",y);O&&p&&f!==void 0&&f!==null&&(A=p(v,f));var k=b?{role:"status","aria-live":"assertive"}:{};return j.createElement("div",yc({className:_,style:S},k),j.createElement("p",{className:P,style:g},j.isValidElement(A)?A:"".concat(A)),w())};function Xr(t){"@babel/helpers - typeof";return Xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xr(t)}function $n(t,e,r){return e=YA(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YA(t){var e=ZA(t,"string");return Xr(e)=="symbol"?e:e+""}function ZA(t,e){if(Xr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Xr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var kr="recharts-tooltip-wrapper",JA={visibility:"hidden"};function QA(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return J(kr,$n($n($n($n({},"".concat(kr,"-right"),B(r)&&e&&B(e.x)&&r>=e.x),"".concat(kr,"-left"),B(r)&&e&&B(e.x)&&r<e.x),"".concat(kr,"-bottom"),B(n)&&e&&B(e.y)&&n>=e.y),"".concat(kr,"-top"),B(n)&&e&&B(e.y)&&n<e.y))}function Bh(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,a=t.offsetTopLeft,i=t.position,o=t.reverseDirection,s=t.tooltipDimension,u=t.viewBox,c=t.viewBoxDimension;if(i&&B(i[n]))return i[n];var f=r[n]-s-a,l=r[n]+a;if(e[n])return o[n]?f:l;if(o[n]){var d=f,h=u[n];return d<h?Math.max(l,u[n]):Math.max(f,u[n])}var y=l+s,v=u[n]+c;return y>v?Math.max(f,u[n]):Math.max(l,u[n])}function eP(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function tP(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,a=t.position,i=t.reverseDirection,o=t.tooltipBox,s=t.useTranslate3d,u=t.viewBox,c,f,l;return o.height>0&&o.width>0&&r?(f=Bh({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),l=Bh({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),c=eP({translateX:f,translateY:l,useTranslate3d:s})):c=JA,{cssProperties:c,cssClasses:QA({translateX:f,translateY:l,coordinate:r})}}function sr(t){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(t)}function Fh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function zh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fh(Object(r),!0).forEach(function(n){gc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nb(n.key),n)}}function aP(t,e,r){return e&&nP(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function iP(t,e,r){return e=Jn(e),oP(t,rb()?Reflect.construct(e,r||[],Jn(t).constructor):e.apply(t,r))}function oP(t,e){if(e&&(sr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sP(t)}function sP(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rb(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rb=function(){return!!t})()}function Jn(t){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jn(t)}function uP(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mc(t,e)}function mc(t,e){return mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},mc(t,e)}function gc(t,e,r){return e=nb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nb(t){var e=cP(t,"string");return sr(e)=="symbol"?e:e+""}function cP(t,e){if(sr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(sr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Wh=1,lP=function(t){function e(){var r;rP(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=iP(this,e,[].concat(a)),gc(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),gc(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,u,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(u=r.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&s!==void 0?s:0,y:(c=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),r}return uP(e,t),aP(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Wh||Math.abs(n.height-this.state.lastBoundingBox.height)>Wh)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,u=a.animationEasing,c=a.children,f=a.coordinate,l=a.hasPayload,d=a.isAnimationActive,h=a.offset,y=a.position,v=a.reverseDirection,p=a.useTranslate3d,x=a.viewBox,b=a.wrapperStyle,w=tP({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:x}),S=w.cssClasses,g=w.cssProperties,O=zh(zh({transition:d&&i?"transform ".concat(s,"ms ").concat(u):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&l?"visible":"hidden",position:"absolute",top:0,left:0},b);return j.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(_){n.wrapperNode=_}},c)}}])}(T.PureComponent),fP=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},_r={isSsr:fP()};function ur(t){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(t)}function Uh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Gh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uh(Object(r),!0).forEach(function(n){Gl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ib(n.key),n)}}function hP(t,e,r){return e&&pP(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function vP(t,e,r){return e=Qn(e),yP(t,ab()?Reflect.construct(e,r||[],Qn(t).constructor):e.apply(t,r))}function yP(t,e){if(e&&(ur(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mP(t)}function mP(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ab(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ab=function(){return!!t})()}function Qn(t){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qn(t)}function gP(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bc(t,e)}function bc(t,e){return bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bc(t,e)}function Gl(t,e,r){return e=ib(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ib(t){var e=bP(t,"string");return ur(e)=="symbol"?e:e+""}function bP(t,e){if(ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ur(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function xP(t){return t.dataKey}function wP(t,e){return j.isValidElement(t)?j.cloneElement(t,e):typeof t=="function"?j.createElement(t,e):j.createElement(XA,e)}var Ye=function(t){function e(){return dP(this,e),vP(this,e,arguments)}return gP(e,t),hP(e,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,u=a.animationEasing,c=a.content,f=a.coordinate,l=a.filterNull,d=a.isAnimationActive,h=a.offset,y=a.payload,v=a.payloadUniqBy,p=a.position,x=a.reverseDirection,b=a.useTranslate3d,w=a.viewBox,S=a.wrapperStyle,g=y??[];l&&g.length&&(g=Xg(y.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),v,xP));var O=g.length>0;return j.createElement(lP,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:d,active:i,coordinate:f,hasPayload:O,offset:h,position:p,reverseDirection:x,useTranslate3d:b,viewBox:w,wrapperStyle:S},wP(c,Gh(Gh({},this.props),{},{payload:g})))}}])}(T.PureComponent);Gl(Ye,"displayName","Tooltip");Gl(Ye,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!_r.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var iu,Kh;function OP(){if(Kh)return iu;Kh=1;var t=et(),e=function(){return t.Date.now()};return iu=e,iu}var ou,Hh;function SP(){if(Hh)return ou;Hh=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return ou=e,ou}var su,Vh;function AP(){if(Vh)return su;Vh=1;var t=SP(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return su=r,su}var uu,Xh;function ob(){if(Xh)return uu;Xh=1;var t=AP(),e=St(),r=Sr(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(c){if(typeof c=="number")return c;if(r(c))return n;if(e(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=e(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=t(c);var l=i.test(c);return l||o.test(c)?s(c.slice(2),l?2:8):a.test(c)?n:+c}return uu=u,uu}var cu,Yh;function PP(){if(Yh)return cu;Yh=1;var t=St(),e=OP(),r=ob(),n="Expected a function",a=Math.max,i=Math.min;function o(s,u,c){var f,l,d,h,y,v,p=0,x=!1,b=!1,w=!0;if(typeof s!="function")throw new TypeError(n);u=r(u)||0,t(c)&&(x=!!c.leading,b="maxWait"in c,d=b?a(r(c.maxWait)||0,u):d,w="trailing"in c?!!c.trailing:w);function S(I){var N=f,M=l;return f=l=void 0,p=I,h=s.apply(M,N),h}function g(I){return p=I,y=setTimeout(_,u),x?S(I):h}function O(I){var N=I-v,M=I-p,R=u-N;return b?i(R,d-M):R}function A(I){var N=I-v,M=I-p;return v===void 0||N>=u||N<0||b&&M>=d}function _(){var I=e();if(A(I))return P(I);y=setTimeout(_,O(I))}function P(I){return y=void 0,w&&f?S(I):(f=l=void 0,h)}function k(){y!==void 0&&clearTimeout(y),p=0,f=v=l=y=void 0}function E(){return y===void 0?h:P(e())}function C(){var I=e(),N=A(I);if(f=arguments,l=this,v=I,N){if(y===void 0)return g(v);if(b)return clearTimeout(y),y=setTimeout(_,u),S(v)}return y===void 0&&(y=setTimeout(_,u)),h}return C.cancel=k,C.flush=E,C}return cu=o,cu}var lu,Zh;function _P(){if(Zh)return lu;Zh=1;var t=PP(),e=St(),r="Expected a function";function n(a,i,o){var s=!0,u=!0;if(typeof a!="function")throw new TypeError(r);return e(o)&&(s="leading"in o?!!o.leading:s,u="trailing"in o?!!o.trailing:u),t(a,i,{leading:s,maxWait:i,trailing:u})}return lu=n,lu}var jP=_P();const sb=ie(jP);function Yr(t){"@babel/helpers - typeof";return Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yr(t)}function Jh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jh(Object(r),!0).forEach(function(n){EP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EP(t,e,r){return e=TP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TP(t){var e=CP(t,"string");return Yr(e)=="symbol"?e:e+""}function CP(t,e){if(Yr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kP(t,e){return NP(t)||$P(t,e)||MP(t,e)||IP()}function IP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
104
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MP(t,e){if(t){if(typeof t=="string")return Qh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qh(t,e)}}function Qh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $P(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function NP(t){if(Array.isArray(t))return t}var RP=T.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=t.width,o=i===void 0?"100%":i,s=t.height,u=s===void 0?"100%":s,c=t.minWidth,f=c===void 0?0:c,l=t.minHeight,d=t.maxHeight,h=t.children,y=t.debounce,v=y===void 0?0:y,p=t.id,x=t.className,b=t.onResize,w=t.style,S=w===void 0?{}:w,g=T.useRef(null),O=T.useRef();O.current=b,T.useImperativeHandle(e,function(){return Object.defineProperty(g.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),g.current},configurable:!0})});var A=T.useState({containerWidth:a.width,containerHeight:a.height}),_=kP(A,2),P=_[0],k=_[1],E=T.useCallback(function(I,N){k(function(M){var R=Math.round(I),D=Math.round(N);return M.containerWidth===R&&M.containerHeight===D?M:{containerWidth:R,containerHeight:D}})},[]);T.useEffect(function(){var I=function(z){var q,U=z[0].contentRect,L=U.width,G=U.height;E(L,G),(q=O.current)===null||q===void 0||q.call(O,L,G)};v>0&&(I=sb(I,v,{trailing:!0,leading:!1}));var N=new ResizeObserver(I),M=g.current.getBoundingClientRect(),R=M.width,D=M.height;return E(R,D),N.observe(g.current),function(){N.disconnect()}},[E,v]);var C=T.useMemo(function(){var I=P.containerWidth,N=P.containerHeight;if(I<0||N<0)return null;st(Mt(o)||Mt(u),`The width(%s) and height(%s) are both fixed numbers,
|
|
105
105
|
maybe you don't need to use a ResponsiveContainer.`,o,u),st(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=Mt(o)?I:o,R=Mt(u)?N:u;r&&r>0&&(M?R=M/r:R&&(M=R*r),d&&R>d&&(R=d)),st(M>0||R>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
106
106
|
please check the style of container, or the props width(%s) and height(%s),
|
|
107
107
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
108
|
-
height and width.`,M,R,o,u,f,l,r);var D=!Array.isArray(h)&&ot(h.type).endsWith("Chart");return j.Children.map(h,function(F){return j.isValidElement(F)?T.cloneElement(F,Nn({width:M,height:R},D?{style:Nn({height:"100%",width:"100%",maxHeight:R,maxWidth:M},F.props.style)}:{})):F})},[r,h,u,d,l,f,P,o]);return j.createElement("div",{id:p?"".concat(p):void 0,className:J("recharts-responsive-container",x),style:Nn(Nn({},S),{},{width:o,height:u,minWidth:f,minHeight:l,maxHeight:d}),ref:g},C)}),ub=function(e){return null};ub.displayName="Cell";function Zr(t){"@babel/helpers - typeof";return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(t)}function ev(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function xc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ev(Object(r),!0).forEach(function(n){DP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function DP(t,e,r){return e=qP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qP(t){var e=LP(t,"string");return Zr(e)=="symbol"?e:e+""}function LP(t,e){if(Zr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ht={widthCache:{},cacheCount:0},BP=2e3,FP={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tv="recharts_measurement_span";function zP(t){var e=xc({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var zr=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||_r.isSsr)return{width:0,height:0};var n=zP(r),a=JSON.stringify({text:e,copyStyle:n});if(Ht.widthCache[a])return Ht.widthCache[a];try{var i=document.getElementById(tv);i||(i=document.createElement("span"),i.setAttribute("id",tv),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=xc(xc({},FP),n);Object.assign(i.style,o),i.textContent="".concat(e);var s=i.getBoundingClientRect(),u={width:s.width,height:s.height};return Ht.widthCache[a]=u,++Ht.cacheCount>BP&&(Ht.cacheCount=0,Ht.widthCache={}),u}catch{return{width:0,height:0}}},WP=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function Jr(t){"@babel/helpers - typeof";return Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jr(t)}function ea(t,e){return HP(t)||
|
|
109
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
110
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c_(t,e){if(t){if(typeof t=="string")return cv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cv(t,e)}}function cv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l_(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function f_(t){if(Array.isArray(t))return t}var fb=/[ \f\n\r\t\v\u2028\u2029]+/,db=function(e){var r=e.children,n=e.breakAll,a=e.style;try{var i=[];X(r)||(n?i=r.toString().split(""):i=r.toString().split(fb));var o=i.map(function(u){return{word:u,width:zr(u,a).width}}),s=n?0:zr(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},d_=function(e,r,n,a,i){var o=e.maxLines,s=e.children,u=e.style,c=e.breakAll,f=B(o),l=s,d=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function(R,D){var F=D.word,z=D.width,q=R[R.length-1];if(q&&(a==null||i||q.width+z+n<Number(a)))q.words.push(F),q.width+=z+n;else{var U={words:[F],width:z};R.push(U)}return R},[])},h=d(r),y=function(M){return M.reduce(function(R,D){return R.width>D.width?R:D})};if(!f)return h;for(var v="…",p=function(M){var R=l.slice(0,M),D=db({breakAll:c,style:u,children:R+v}).wordsWithComputedWidth,F=d(D),z=F.length>o||y(F).width>Number(a);return[z,F]},x=0,b=l.length-1,w=0,S;x<=b&&w<=l.length-1;){var g=Math.floor((x+b)/2),O=g-1,A=p(O),_=uv(A,2),P=_[0],k=_[1],E=p(g),C=uv(E,1),I=C[0];if(!P&&!I&&(x=g+1),P&&I&&(b=g-1),!P&&I){S=k;break}w++}return S||h},lv=function(e){var r=X(e)?[]:e.toString().split(fb);return[{words:r}]},p_=function(e){var r=e.width,n=e.scaleToFit,a=e.children,i=e.style,o=e.breakAll,s=e.maxLines;if((r||n)&&!_r.isSsr){var u,c,f=db({breakAll:o,children:a,style:i});if(f){var l=f.wordsWithComputedWidth,d=f.spaceWidth;u=l,c=d}else return lv(a);return d_({breakAll:o,children:a,maxLines:s,style:i},u,c,r,n)}return lv(a)},fv="#808080",ta=function(e){var r=e.x,n=r===void 0?0:r,a=e.y,i=a===void 0?0:a,o=e.lineHeight,s=o===void 0?"1em":o,u=e.capHeight,c=u===void 0?"0.71em":u,f=e.scaleToFit,l=f===void 0?!1:f,d=e.textAnchor,h=d===void 0?"start":d,y=e.verticalAnchor,v=y===void 0?"end":y,p=e.fill,x=p===void 0?fv:p,b=sv(e,i_),w=T.useMemo(function(){return p_({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:l,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,l,b.style,b.width]),S=b.dx,g=b.dy,O=b.angle,A=b.className,_=b.breakAll,P=sv(b,o_);if(!ve(n)||!ve(i))return null;var k=n+(B(S)?S:0),E=i+(B(g)?g:0),C;switch(v){case"start":C=fu("calc(".concat(c,")"));break;case"middle":C=fu("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:C=fu("calc(".concat(w.length-1," * -").concat(s,")"));break}var I=[];if(l){var N=w[0].width,M=b.width;I.push("scale(".concat((B(M)?M/N:1)/N,")"))}return O&&I.push("rotate(".concat(O,", ").concat(k,", ").concat(E,")")),I.length&&(P.transform=I.join(" ")),j.createElement("text",wc({},Z(P,!0),{x:k,y:E,className:J("recharts-text",A),textAnchor:h,fill:x.includes("url")?fv:x}),w.map(function(R,D){var F=R.words.join(_?"":" ");return j.createElement("tspan",{x:k,dy:D===0?C:s,key:"".concat(F,"-").concat(D)},F)}))};const dv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:tc,scaleDiverging:bg,scaleDivergingLog:xg,scaleDivergingPow:Pl,scaleDivergingSqrt:fO,scaleDivergingSymlog:wg,scaleIdentity:ug,scaleImplicit:uw,scaleLinear:nc,scaleLog:cg,scaleOrdinal:cw,scalePoint:Fr,scalePow:Sl,scaleQuantile:dg,scaleQuantize:pg,scaleRadial:fg,scaleSequential:vg,scaleSequentialLog:yg,scaleSequentialPow:Al,scaleSequentialQuantile:gg,scaleSequentialSqrt:lO,scaleSequentialSymlog:mg,scaleSqrt:sO,scaleSymlog:lg,scaleThreshold:hg,scaleTime:sw,scaleUtc:cO,tickFormat:V0},Symbol.toStringTag,{value:"Module"}));var du,pv;function pb(){if(pv)return du;pv=1;var t=Sr();function e(r,n,a){for(var i=-1,o=r.length;++i<o;){var s=r[i],u=n(s);if(u!=null&&(c===void 0?u===u&&!t(u):a(u,c)))var c=u,f=s}return f}return du=e,du}var pu,hv;function h_(){if(hv)return pu;hv=1;function t(e,r){return e>r}return pu=t,pu}var hu,vv;function v_(){if(vv)return hu;vv=1;var t=pb(),e=h_(),r=Pr();function n(a){return a&&a.length?t(a,r,e):void 0}return hu=n,hu}var y_=v_();const Fa=ie(y_);var vu,yv;function m_(){if(yv)return vu;yv=1;function t(e,r){return e<r}return vu=t,vu}var yu,mv;function g_(){if(mv)return yu;mv=1;var t=pb(),e=m_(),r=Pr();function n(a){return a&&a.length?t(a,r,e):void 0}return yu=n,yu}var b_=g_();const za=ie(b_);var mu,gv;function x_(){if(gv)return mu;gv=1;var t=Il(),e=At(),r=eb(),n=je();function a(i,o){var s=n(i)?t:r;return s(i,e(o,3))}return mu=a,mu}var gu,bv;function w_(){if(bv)return gu;bv=1;var t=Jg(),e=x_();function r(n,a){return t(e(n,a),1)}return gu=r,gu}var O_=w_();const S_=ie(O_);var bu,xv;function A_(){if(xv)return bu;xv=1;var t=zl();function e(r,n){return t(r,n)}return bu=e,bu}var P_=A_();const Wa=ie(P_);var jr=1e9,__={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Hl,oe=!0,Le="[DecimalError] ",Rt=Le+"Invalid argument: ",Gl=Le+"Exponent out of range: ",Er=Math.floor,It=Math.pow,j_=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Me,ye=1e7,ae=7,hb=9007199254740991,ra=Er(hb/ae),W={};W.absoluteValue=W.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};W.comparedTo=W.cmp=function(t){var e,r,n,a,i=this;if(t=new i.constructor(t),i.s!==t.s)return i.s||-t.s;if(i.e!==t.e)return i.e>t.e^i.s<0?1:-1;for(n=i.d.length,a=t.d.length,e=0,r=n<a?n:a;e<r;++e)if(i.d[e]!==t.d[e])return i.d[e]>t.d[e]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};W.decimalPlaces=W.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*ae;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};W.dividedBy=W.div=function(t){return ut(this,new this.constructor(t))};W.dividedToIntegerBy=W.idiv=function(t){var e=this,r=e.constructor;return ne(ut(e,new r(t),0,1),r.precision)};W.equals=W.eq=function(t){return!this.cmp(t)};W.exponent=function(){return pe(this)};W.greaterThan=W.gt=function(t){return this.cmp(t)>0};W.greaterThanOrEqualTo=W.gte=function(t){return this.cmp(t)>=0};W.isInteger=W.isint=function(){return this.e>this.d.length-2};W.isNegative=W.isneg=function(){return this.s<0};W.isPositive=W.ispos=function(){return this.s>0};W.isZero=function(){return this.s===0};W.lessThan=W.lt=function(t){return this.cmp(t)<0};W.lessThanOrEqualTo=W.lte=function(t){return this.cmp(t)<1};W.logarithm=W.log=function(t){var e,r=this,n=r.constructor,a=n.precision,i=a+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(Me))throw Error(Le+"NaN");if(r.s<1)throw Error(Le+(r.s?"NaN":"-Infinity"));return r.eq(Me)?new n(0):(oe=!1,e=ut(Qr(r,i),Qr(t,i),i),oe=!0,ne(e,a))};W.minus=W.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?mb(e,t):vb(e,(t.s=-t.s,t))};W.modulo=W.mod=function(t){var e,r=this,n=r.constructor,a=n.precision;if(t=new n(t),!t.s)throw Error(Le+"NaN");return r.s?(oe=!1,e=ut(r,t,0,1).times(t),oe=!0,r.minus(e)):ne(new n(r),a)};W.naturalExponential=W.exp=function(){return yb(this)};W.naturalLogarithm=W.ln=function(){return Qr(this)};W.negated=W.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};W.plus=W.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?vb(e,t):mb(e,(t.s=-t.s,t))};W.precision=W.sd=function(t){var e,r,n,a=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Rt+t);if(e=pe(a)+1,n=a.d.length-1,r=n*ae+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};W.squareRoot=W.sqrt=function(){var t,e,r,n,a,i,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(Le+"NaN")}for(t=pe(s),oe=!1,a=Math.sqrt(+s),a==0||a==1/0?(e=Ze(s.d),(e.length+t)%2==0&&(e+="0"),a=Math.sqrt(e),t=Er((t+1)/2)-(t<0||t%2),a==1/0?e="5e"+t:(e=a.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new u(e)):n=new u(a.toString()),r=u.precision,a=o=r+3;;)if(i=n,n=i.plus(ut(s,i,o+2)).times(.5),Ze(i.d).slice(0,o)===(e=Ze(n.d)).slice(0,o)){if(e=e.slice(o-3,o+1),a==o&&e=="4999"){if(ne(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(e!="9999")break;o+=4}return oe=!0,ne(n,r)};W.times=W.mul=function(t){var e,r,n,a,i,o,s,u,c,f=this,l=f.constructor,d=f.d,h=(t=new l(t)).d;if(!f.s||!t.s)return new l(0);for(t.s*=f.s,r=f.e+t.e,u=d.length,c=h.length,u<c&&(i=d,d=h,h=i,o=u,u=c,c=o),i=[],o=u+c,n=o;n--;)i.push(0);for(n=c;--n>=0;){for(e=0,a=u+n;a>n;)s=i[a]+h[n]*d[a-n-1]+e,i[a--]=s%ye|0,e=s/ye|0;i[a]=(i[a]+e)%ye|0}for(;!i[--o];)i.pop();return e?++r:i.shift(),t.d=i,t.e=r,oe?ne(t,l.precision):t};W.toDecimalPlaces=W.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(Qe(t,0,jr),e===void 0?e=n.rounding:Qe(e,0,8),ne(r,t+pe(r)+1,e))};W.toExponential=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=Lt(n,!0):(Qe(t,0,jr),e===void 0?e=a.rounding:Qe(e,0,8),n=ne(new a(n),t+1,e),r=Lt(n,!0,t+1)),r};W.toFixed=function(t,e){var r,n,a=this,i=a.constructor;return t===void 0?Lt(a):(Qe(t,0,jr),e===void 0?e=i.rounding:Qe(e,0,8),n=ne(new i(a),t+pe(a)+1,e),r=Lt(n.abs(),!1,t+pe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};W.toInteger=W.toint=function(){var t=this,e=t.constructor;return ne(new e(t),pe(t)+1,e.rounding)};W.toNumber=function(){return+this};W.toPower=W.pow=function(t){var e,r,n,a,i,o,s=this,u=s.constructor,c=12,f=+(t=new u(t));if(!t.s)return new u(Me);if(s=new u(s),!s.s){if(t.s<1)throw Error(Le+"Infinity");return s}if(s.eq(Me))return s;if(n=u.precision,t.eq(Me))return ne(s,n);if(e=t.e,r=t.d.length-1,o=e>=r,i=s.s,o){if((r=f<0?-f:f)<=hb){for(a=new u(Me),e=Math.ceil(n/ae+4),oe=!1;r%2&&(a=a.times(s),Ov(a.d,e)),r=Er(r/2),r!==0;)s=s.times(s),Ov(s.d,e);return oe=!0,t.s<0?new u(Me).div(a):ne(a,n)}}else if(i<0)throw Error(Le+"NaN");return i=i<0&&t.d[Math.max(e,r)]&1?-1:1,s.s=1,oe=!1,a=t.times(Qr(s,n+c)),oe=!0,a=yb(a),a.s=i,a};W.toPrecision=function(t,e){var r,n,a=this,i=a.constructor;return t===void 0?(r=pe(a),n=Lt(a,r<=i.toExpNeg||r>=i.toExpPos)):(Qe(t,1,jr),e===void 0?e=i.rounding:Qe(e,0,8),a=ne(new i(a),t,e),r=pe(a),n=Lt(a,t<=r||r<=i.toExpNeg,t)),n};W.toSignificantDigits=W.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(Qe(t,1,jr),e===void 0?e=n.rounding:Qe(e,0,8)),ne(new n(r),t,e)};W.toString=W.valueOf=W.val=W.toJSON=W[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=pe(t),r=t.constructor;return Lt(t,e<=r.toExpNeg||e>=r.toExpPos)};function vb(t,e){var r,n,a,i,o,s,u,c,f=t.constructor,l=f.precision;if(!t.s||!e.s)return e.s||(e=new f(t)),oe?ne(e,l):e;if(u=t.d,c=e.d,o=t.e,a=e.e,u=u.slice(),i=o-a,i){for(i<0?(n=u,i=-i,s=c.length):(n=c,a=o,s=u.length),o=Math.ceil(l/ae),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,n=c,c=u,u=n),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/ye|0,u[i]%=ye;for(r&&(u.unshift(r),++a),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=a,oe?ne(e,l):e}function Qe(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Rt+t)}function Ze(t){var e,r,n,a=t.length-1,i="",o=t[0];if(a>0){for(i+=o,e=1;e<a;e++)n=t[e]+"",r=ae-n.length,r&&(i+=vt(r)),i+=n;o=t[e],n=o+"",r=ae-n.length,r&&(i+=vt(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var ut=function(){function t(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%ye|0,o=i/ye|0;return o&&n.unshift(o),n}function e(n,a,i,o){var s,u;if(i!=o)u=i>o?1:-1;else for(s=u=0;s<i;s++)if(n[s]!=a[s]){u=n[s]>a[s]?1:-1;break}return u}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*ye+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,u,c,f,l,d,h,y,v,p,x,b,w,S,g,O,A,_,P=n.constructor,k=n.s==a.s?1:-1,E=n.d,C=a.d;if(!n.s)return new P(n);if(!a.s)throw Error(Le+"Division by zero");for(u=n.e-a.e,A=C.length,g=E.length,h=new P(k),y=h.d=[],c=0;C[c]==(E[c]||0);)++c;if(C[c]>(E[c]||0)&&--u,i==null?b=i=P.precision:o?b=i+(pe(n)-pe(a))+1:b=i,b<0)return new P(0);if(b=b/ae+2|0,c=0,A==1)for(f=0,C=C[0],b++;(c<g||f)&&b--;c++)w=f*ye+(E[c]||0),y[c]=w/C|0,f=w%C|0;else{for(f=ye/(C[0]+1)|0,f>1&&(C=t(C,f),E=t(E,f),A=C.length,g=E.length),S=A,v=E.slice(0,A),p=v.length;p<A;)v[p++]=0;_=C.slice(),_.unshift(0),O=C[0],C[1]>=ye/2&&++O;do f=0,s=e(C,v,A,p),s<0?(x=v[0],A!=p&&(x=x*ye+(v[1]||0)),f=x/O|0,f>1?(f>=ye&&(f=ye-1),l=t(C,f),d=l.length,p=v.length,s=e(l,v,d,p),s==1&&(f--,r(l,A<d?_:C,d))):(f==0&&(s=f=1),l=C.slice()),d=l.length,d<p&&l.unshift(0),r(v,l,p),s==-1&&(p=v.length,s=e(C,v,A,p),s<1&&(f++,r(v,A<p?_:C,p))),p=v.length):s===0&&(f++,v=[0]),y[c++]=f,s&&v[0]?v[p++]=E[S]||0:(v=[E[S]],p=1);while((S++<g||v[0]!==void 0)&&b--)}return y[0]||y.shift(),h.e=u,ne(h,o?i+pe(h)+1:i)}}();function yb(t,e){var r,n,a,i,o,s,u=0,c=0,f=t.constructor,l=f.precision;if(pe(t)>16)throw Error(Gl+pe(t));if(!t.s)return new f(Me);for(oe=!1,s=l,o=new f(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(n=Math.log(It(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new f(Me),f.precision=s;;){if(a=ne(a.times(t),s),r=r.times(++u),o=i.plus(ut(a,r,s)),Ze(o.d).slice(0,s)===Ze(i.d).slice(0,s)){for(;c--;)i=ne(i.times(i),s);return f.precision=l,e==null?(oe=!0,ne(i,l)):i}i=o}}function pe(t){for(var e=t.e*ae,r=t.d[0];r>=10;r/=10)e++;return e}function xu(t,e,r){if(e>t.LN10.sd())throw oe=!0,r&&(t.precision=r),Error(Le+"LN10 precision limit exceeded");return ne(new t(t.LN10),e)}function vt(t){for(var e="";t--;)e+="0";return e}function Qr(t,e){var r,n,a,i,o,s,u,c,f,l=1,d=10,h=t,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(Le+(h.s?"NaN":"-Infinity"));if(h.eq(Me))return new v(0);if(e==null?(oe=!1,c=p):c=e,h.eq(10))return e==null&&(oe=!0),xu(v,c);if(c+=d,v.precision=c,r=Ze(y),n=r.charAt(0),i=pe(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(t),r=Ze(h.d),n=r.charAt(0),l++;i=pe(h),n>1?(h=new v("0."+r),i++):h=new v(n+"."+r.slice(1))}else return u=xu(v,c+2,p).times(i+""),h=Qr(new v(n+"."+r.slice(1)),c-d).plus(u),v.precision=p,e==null?(oe=!0,ne(h,p)):h;for(s=o=h=ut(h.minus(Me),h.plus(Me),c),f=ne(h.times(h),c),a=3;;){if(o=ne(o.times(f),c),u=s.plus(ut(o,new v(a),c)),Ze(u.d).slice(0,c)===Ze(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(xu(v,c+2,p).times(i+""))),s=ut(s,new v(l),c),v.precision=p,e==null?(oe=!0,ne(s,p)):s;s=u,a+=2}}function wv(t,e){var r,n,a;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(a=e.length;e.charCodeAt(a-1)===48;)--a;if(e=e.slice(n,a),e){if(a-=n,r=r-n-1,t.e=Er(r/ae),t.d=[],n=(r+1)%ae,r<0&&(n+=ae),n<a){for(n&&t.d.push(+e.slice(0,n)),a-=ae;n<a;)t.d.push(+e.slice(n,n+=ae));e=e.slice(n),n=ae-e.length}else n-=a;for(;n--;)e+="0";if(t.d.push(+e),oe&&(t.e>ra||t.e<-ra))throw Error(Gl+r)}else t.s=0,t.e=0,t.d=[0];return t}function ne(t,e,r){var n,a,i,o,s,u,c,f,l=t.d;for(o=1,i=l[0];i>=10;i/=10)o++;if(n=e-o,n<0)n+=ae,a=e,c=l[f=0];else{if(f=Math.ceil((n+1)/ae),i=l.length,f>=i)return t;for(c=i=l[f],o=1;i>=10;i/=10)o++;n%=ae,a=n-ae+o}if(r!==void 0&&(i=It(10,o-a-1),s=c/i%10|0,u=e<0||l[f+1]!==void 0||c%i,u=r<4?(s||u)&&(r==0||r==(t.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?a>0?c/It(10,o-a):0:l[f-1])%10&1||r==(t.s<0?8:7))),e<1||!l[0])return u?(i=pe(t),l.length=1,e=e-i-1,l[0]=It(10,(ae-e%ae)%ae),t.e=Er(-e/ae)||0):(l.length=1,l[0]=t.e=t.s=0),t;if(n==0?(l.length=f,i=1,f--):(l.length=f+1,i=It(10,ae-n),l[f]=a>0?(c/It(10,o-a)%It(10,a)|0)*i:0),u)for(;;)if(f==0){(l[0]+=i)==ye&&(l[0]=1,++t.e);break}else{if(l[f]+=i,l[f]!=ye)break;l[f--]=0,i=1}for(n=l.length;l[--n]===0;)l.pop();if(oe&&(t.e>ra||t.e<-ra))throw Error(Gl+pe(t));return t}function mb(t,e){var r,n,a,i,o,s,u,c,f,l,d=t.constructor,h=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),oe?ne(e,h):e;if(u=t.d,l=e.d,n=e.e,c=t.e,u=u.slice(),o=c-n,o){for(f=o<0,f?(r=u,o=-o,s=l.length):(r=l,n=c,s=u.length),a=Math.max(Math.ceil(h/ae),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=u.length,s=l.length,f=a<s,f&&(s=a),a=0;a<s;a++)if(u[a]!=l[a]){f=u[a]<l[a];break}o=0}for(f&&(r=u,u=l,l=r,e.s=-e.s),s=u.length,a=l.length-s;a>0;--a)u[s++]=0;for(a=l.length;a>o;){if(u[--a]<l[a]){for(i=a;i&&u[--i]===0;)u[i]=ye-1;--u[i],u[a]+=ye}u[a]-=l[a]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(e.d=u,e.e=n,oe?ne(e,h):e):new d(0)}function Lt(t,e,r){var n,a=pe(t),i=Ze(t.d),o=i.length;return e?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+vt(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+vt(-a-1)+i,r&&(n=r-o)>0&&(i+=vt(n))):a>=o?(i+=vt(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+vt(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=vt(n))),t.s<0?"-"+i:i}function Ov(t,e){if(t.length>e)return t.length=e,!0}function gb(t){var e,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Rt+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return wv(o,i.toString())}else if(typeof i!="string")throw Error(Rt+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,j_.test(i))wv(o,i);else throw Error(Rt+i)}if(a.prototype=W,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=gb,a.config=a.set=E_,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return a.config(t),a}function E_(t){if(!t||typeof t!="object")throw Error(Le+"Object expected");var e,r,n,a=["precision",1,jr,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<a.length;e+=3)if((n=t[r=a[e]])!==void 0)if(Er(n)===n&&n>=a[e+1]&&n<=a[e+2])this[r]=n;else throw Error(Rt+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Rt+r+": "+n);return this}var Hl=gb(__);Me=new Hl(1);const te=Hl;function T_(t){return M_(t)||I_(t)||k_(t)||C_()}function C_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
111
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k_(t,e){if(t){if(typeof t=="string")return Oc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oc(t,e)}}function I_(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function M_(t){if(Array.isArray(t))return Oc(t)}function Oc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var $_=function(e){return e},bb={},xb=function(e){return e===bb},Sv=function(e){return function r(){return arguments.length===0||arguments.length===1&&xb(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},N_=function t(e,r){return e===1?r:Sv(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==bb}).length;return o>=e?r.apply(void 0,a):t(e-o,Sv(function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var f=a.map(function(l){return xb(l)?u.shift():l});return r.apply(void 0,T_(f).concat(u))}))})},Ua=function(e){return N_(e.length,e)},Sc=function(e,r){for(var n=[],a=e;a<r;++a)n[a-e]=a;return n},R_=Ua(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),D_=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return $_;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,u){return u(s)},i.apply(void 0,arguments))}},Ac=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},wb=function(e){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,u){return s===r[u]})||(r=i,n=e.apply(void 0,i)),n}};function q_(t){var e;return t===0?e=1:e=Math.floor(new te(t).abs().log(10).toNumber())+1,e}function L_(t,e,r){for(var n=new te(t),a=0,i=[];n.lt(e)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var B_=Ua(function(t,e,r){var n=+t,a=+e;return n+r*(a-n)}),F_=Ua(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),z_=Ua(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const
|
|
112
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U_(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function
|
|
113
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ob(t,e){if(t){if(typeof t=="string")return _c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _c(t,e)}}function _c(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function H_(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=t[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){a=!0,i=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function V_(t){if(Array.isArray(t))return t}function Sb(t){var e=en(t,2),r=e[0],n=e[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Ab(t,e,r){if(t.lte(0))return new te(0);var n=
|
|
108
|
+
height and width.`,M,R,o,u,f,l,r);var D=!Array.isArray(h)&&ot(h.type).endsWith("Chart");return j.Children.map(h,function(F){return j.isValidElement(F)?T.cloneElement(F,Nn({width:M,height:R},D?{style:Nn({height:"100%",width:"100%",maxHeight:R,maxWidth:M},F.props.style)}:{})):F})},[r,h,u,d,l,f,P,o]);return j.createElement("div",{id:p?"".concat(p):void 0,className:J("recharts-responsive-container",x),style:Nn(Nn({},S),{},{width:o,height:u,minWidth:f,minHeight:l,maxHeight:d}),ref:g},C)}),ub=function(e){return null};ub.displayName="Cell";function Zr(t){"@babel/helpers - typeof";return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(t)}function ev(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function xc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ev(Object(r),!0).forEach(function(n){DP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function DP(t,e,r){return e=qP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qP(t){var e=LP(t,"string");return Zr(e)=="symbol"?e:e+""}function LP(t,e){if(Zr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ht={widthCache:{},cacheCount:0},BP=2e3,FP={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tv="recharts_measurement_span";function zP(t){var e=xc({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var zr=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||_r.isSsr)return{width:0,height:0};var n=zP(r),a=JSON.stringify({text:e,copyStyle:n});if(Ht.widthCache[a])return Ht.widthCache[a];try{var i=document.getElementById(tv);i||(i=document.createElement("span"),i.setAttribute("id",tv),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=xc(xc({},FP),n);Object.assign(i.style,o),i.textContent="".concat(e);var s=i.getBoundingClientRect(),u={width:s.width,height:s.height};return Ht.widthCache[a]=u,++Ht.cacheCount>BP&&(Ht.cacheCount=0,Ht.widthCache={}),u}catch{return{width:0,height:0}}},WP=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function Jr(t){"@babel/helpers - typeof";return Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jr(t)}function ea(t,e){return HP(t)||KP(t,e)||GP(t,e)||UP()}function UP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
109
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GP(t,e){if(t){if(typeof t=="string")return rv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rv(t,e)}}function rv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function KP(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function HP(t){if(Array.isArray(t))return t}function VP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,YP(n.key),n)}}function XP(t,e,r){return e&&nv(t.prototype,e),r&&nv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function YP(t){var e=ZP(t,"string");return Jr(e)=="symbol"?e:e+""}function ZP(t,e){if(Jr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Jr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var av=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iv=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,JP=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,QP=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,cb={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},e_=Object.keys(cb),Zt="NaN";function t_(t,e){return t*cb[e]}var Rn=function(){function t(e,r){VP(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!JP.test(r)&&(this.num=NaN,this.unit=""),e_.includes(r)&&(this.num=t_(e,r),this.unit="px")}return XP(t,[{key:"add",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=QP.exec(r))!==null&&n!==void 0?n:[],i=ea(a,3),o=i[1],s=i[2];return new t(parseFloat(o),s??"")}}])}();function lb(t){if(t.includes(Zt))return Zt;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=av.exec(e))!==null&&r!==void 0?r:[],a=ea(n,4),i=a[1],o=a[2],s=a[3],u=Rn.parse(i??""),c=Rn.parse(s??""),f=o==="*"?u.multiply(c):u.divide(c);if(f.isNaN())return Zt;e=e.replace(av,f.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var l,d=(l=iv.exec(e))!==null&&l!==void 0?l:[],h=ea(d,4),y=h[1],v=h[2],p=h[3],x=Rn.parse(y??""),b=Rn.parse(p??""),w=v==="+"?x.add(b):x.subtract(b);if(w.isNaN())return Zt;e=e.replace(iv,w.toString())}return e}var ov=/\(([^()]*)\)/;function r_(t){for(var e=t;e.includes("(");){var r=ov.exec(e),n=ea(r,2),a=n[1];e=e.replace(ov,lb(a))}return e}function n_(t){var e=t.replace(/\s+/g,"");return e=r_(e),e=lb(e),e}function a_(t){try{return n_(t)}catch{return Zt}}function fu(t){var e=a_(t.slice(5,-1));return e===Zt?"":e}var i_=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],o_=["dx","dy","angle","className","breakAll"];function wc(){return wc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wc.apply(this,arguments)}function sv(t,e){if(t==null)return{};var r=s_(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function s_(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function uv(t,e){return f_(t)||l_(t,e)||c_(t,e)||u_()}function u_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
110
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c_(t,e){if(t){if(typeof t=="string")return cv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cv(t,e)}}function cv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l_(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function f_(t){if(Array.isArray(t))return t}var fb=/[ \f\n\r\t\v\u2028\u2029]+/,db=function(e){var r=e.children,n=e.breakAll,a=e.style;try{var i=[];X(r)||(n?i=r.toString().split(""):i=r.toString().split(fb));var o=i.map(function(u){return{word:u,width:zr(u,a).width}}),s=n?0:zr(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},d_=function(e,r,n,a,i){var o=e.maxLines,s=e.children,u=e.style,c=e.breakAll,f=B(o),l=s,d=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function(R,D){var F=D.word,z=D.width,q=R[R.length-1];if(q&&(a==null||i||q.width+z+n<Number(a)))q.words.push(F),q.width+=z+n;else{var U={words:[F],width:z};R.push(U)}return R},[])},h=d(r),y=function(M){return M.reduce(function(R,D){return R.width>D.width?R:D})};if(!f)return h;for(var v="…",p=function(M){var R=l.slice(0,M),D=db({breakAll:c,style:u,children:R+v}).wordsWithComputedWidth,F=d(D),z=F.length>o||y(F).width>Number(a);return[z,F]},x=0,b=l.length-1,w=0,S;x<=b&&w<=l.length-1;){var g=Math.floor((x+b)/2),O=g-1,A=p(O),_=uv(A,2),P=_[0],k=_[1],E=p(g),C=uv(E,1),I=C[0];if(!P&&!I&&(x=g+1),P&&I&&(b=g-1),!P&&I){S=k;break}w++}return S||h},lv=function(e){var r=X(e)?[]:e.toString().split(fb);return[{words:r}]},p_=function(e){var r=e.width,n=e.scaleToFit,a=e.children,i=e.style,o=e.breakAll,s=e.maxLines;if((r||n)&&!_r.isSsr){var u,c,f=db({breakAll:o,children:a,style:i});if(f){var l=f.wordsWithComputedWidth,d=f.spaceWidth;u=l,c=d}else return lv(a);return d_({breakAll:o,children:a,maxLines:s,style:i},u,c,r,n)}return lv(a)},fv="#808080",ta=function(e){var r=e.x,n=r===void 0?0:r,a=e.y,i=a===void 0?0:a,o=e.lineHeight,s=o===void 0?"1em":o,u=e.capHeight,c=u===void 0?"0.71em":u,f=e.scaleToFit,l=f===void 0?!1:f,d=e.textAnchor,h=d===void 0?"start":d,y=e.verticalAnchor,v=y===void 0?"end":y,p=e.fill,x=p===void 0?fv:p,b=sv(e,i_),w=T.useMemo(function(){return p_({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:l,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,l,b.style,b.width]),S=b.dx,g=b.dy,O=b.angle,A=b.className,_=b.breakAll,P=sv(b,o_);if(!ve(n)||!ve(i))return null;var k=n+(B(S)?S:0),E=i+(B(g)?g:0),C;switch(v){case"start":C=fu("calc(".concat(c,")"));break;case"middle":C=fu("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:C=fu("calc(".concat(w.length-1," * -").concat(s,")"));break}var I=[];if(l){var N=w[0].width,M=b.width;I.push("scale(".concat((B(M)?M/N:1)/N,")"))}return O&&I.push("rotate(".concat(O,", ").concat(k,", ").concat(E,")")),I.length&&(P.transform=I.join(" ")),j.createElement("text",wc({},Z(P,!0),{x:k,y:E,className:J("recharts-text",A),textAnchor:h,fill:x.includes("url")?fv:x}),w.map(function(R,D){var F=R.words.join(_?"":" ");return j.createElement("tspan",{x:k,dy:D===0?C:s,key:"".concat(F,"-").concat(D)},F)}))};const dv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:tc,scaleDiverging:bg,scaleDivergingLog:xg,scaleDivergingPow:Pl,scaleDivergingSqrt:fO,scaleDivergingSymlog:wg,scaleIdentity:ug,scaleImplicit:uw,scaleLinear:nc,scaleLog:cg,scaleOrdinal:cw,scalePoint:Fr,scalePow:Sl,scaleQuantile:dg,scaleQuantize:pg,scaleRadial:fg,scaleSequential:vg,scaleSequentialLog:yg,scaleSequentialPow:Al,scaleSequentialQuantile:gg,scaleSequentialSqrt:lO,scaleSequentialSymlog:mg,scaleSqrt:sO,scaleSymlog:lg,scaleThreshold:hg,scaleTime:sw,scaleUtc:cO,tickFormat:V0},Symbol.toStringTag,{value:"Module"}));var du,pv;function pb(){if(pv)return du;pv=1;var t=Sr();function e(r,n,a){for(var i=-1,o=r.length;++i<o;){var s=r[i],u=n(s);if(u!=null&&(c===void 0?u===u&&!t(u):a(u,c)))var c=u,f=s}return f}return du=e,du}var pu,hv;function h_(){if(hv)return pu;hv=1;function t(e,r){return e>r}return pu=t,pu}var hu,vv;function v_(){if(vv)return hu;vv=1;var t=pb(),e=h_(),r=Pr();function n(a){return a&&a.length?t(a,r,e):void 0}return hu=n,hu}var y_=v_();const Fa=ie(y_);var vu,yv;function m_(){if(yv)return vu;yv=1;function t(e,r){return e<r}return vu=t,vu}var yu,mv;function g_(){if(mv)return yu;mv=1;var t=pb(),e=m_(),r=Pr();function n(a){return a&&a.length?t(a,r,e):void 0}return yu=n,yu}var b_=g_();const za=ie(b_);var mu,gv;function x_(){if(gv)return mu;gv=1;var t=Il(),e=At(),r=eb(),n=je();function a(i,o){var s=n(i)?t:r;return s(i,e(o,3))}return mu=a,mu}var gu,bv;function w_(){if(bv)return gu;bv=1;var t=Jg(),e=x_();function r(n,a){return t(e(n,a),1)}return gu=r,gu}var O_=w_();const S_=ie(O_);var bu,xv;function A_(){if(xv)return bu;xv=1;var t=zl();function e(r,n){return t(r,n)}return bu=e,bu}var P_=A_();const Wa=ie(P_);var jr=1e9,__={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Hl,oe=!0,Le="[DecimalError] ",Rt=Le+"Invalid argument: ",Kl=Le+"Exponent out of range: ",Er=Math.floor,It=Math.pow,j_=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Me,ye=1e7,ae=7,hb=9007199254740991,ra=Er(hb/ae),W={};W.absoluteValue=W.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};W.comparedTo=W.cmp=function(t){var e,r,n,a,i=this;if(t=new i.constructor(t),i.s!==t.s)return i.s||-t.s;if(i.e!==t.e)return i.e>t.e^i.s<0?1:-1;for(n=i.d.length,a=t.d.length,e=0,r=n<a?n:a;e<r;++e)if(i.d[e]!==t.d[e])return i.d[e]>t.d[e]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};W.decimalPlaces=W.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*ae;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};W.dividedBy=W.div=function(t){return ut(this,new this.constructor(t))};W.dividedToIntegerBy=W.idiv=function(t){var e=this,r=e.constructor;return ne(ut(e,new r(t),0,1),r.precision)};W.equals=W.eq=function(t){return!this.cmp(t)};W.exponent=function(){return pe(this)};W.greaterThan=W.gt=function(t){return this.cmp(t)>0};W.greaterThanOrEqualTo=W.gte=function(t){return this.cmp(t)>=0};W.isInteger=W.isint=function(){return this.e>this.d.length-2};W.isNegative=W.isneg=function(){return this.s<0};W.isPositive=W.ispos=function(){return this.s>0};W.isZero=function(){return this.s===0};W.lessThan=W.lt=function(t){return this.cmp(t)<0};W.lessThanOrEqualTo=W.lte=function(t){return this.cmp(t)<1};W.logarithm=W.log=function(t){var e,r=this,n=r.constructor,a=n.precision,i=a+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(Me))throw Error(Le+"NaN");if(r.s<1)throw Error(Le+(r.s?"NaN":"-Infinity"));return r.eq(Me)?new n(0):(oe=!1,e=ut(Qr(r,i),Qr(t,i),i),oe=!0,ne(e,a))};W.minus=W.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?mb(e,t):vb(e,(t.s=-t.s,t))};W.modulo=W.mod=function(t){var e,r=this,n=r.constructor,a=n.precision;if(t=new n(t),!t.s)throw Error(Le+"NaN");return r.s?(oe=!1,e=ut(r,t,0,1).times(t),oe=!0,r.minus(e)):ne(new n(r),a)};W.naturalExponential=W.exp=function(){return yb(this)};W.naturalLogarithm=W.ln=function(){return Qr(this)};W.negated=W.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};W.plus=W.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?vb(e,t):mb(e,(t.s=-t.s,t))};W.precision=W.sd=function(t){var e,r,n,a=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Rt+t);if(e=pe(a)+1,n=a.d.length-1,r=n*ae+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};W.squareRoot=W.sqrt=function(){var t,e,r,n,a,i,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(Le+"NaN")}for(t=pe(s),oe=!1,a=Math.sqrt(+s),a==0||a==1/0?(e=Ze(s.d),(e.length+t)%2==0&&(e+="0"),a=Math.sqrt(e),t=Er((t+1)/2)-(t<0||t%2),a==1/0?e="5e"+t:(e=a.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new u(e)):n=new u(a.toString()),r=u.precision,a=o=r+3;;)if(i=n,n=i.plus(ut(s,i,o+2)).times(.5),Ze(i.d).slice(0,o)===(e=Ze(n.d)).slice(0,o)){if(e=e.slice(o-3,o+1),a==o&&e=="4999"){if(ne(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(e!="9999")break;o+=4}return oe=!0,ne(n,r)};W.times=W.mul=function(t){var e,r,n,a,i,o,s,u,c,f=this,l=f.constructor,d=f.d,h=(t=new l(t)).d;if(!f.s||!t.s)return new l(0);for(t.s*=f.s,r=f.e+t.e,u=d.length,c=h.length,u<c&&(i=d,d=h,h=i,o=u,u=c,c=o),i=[],o=u+c,n=o;n--;)i.push(0);for(n=c;--n>=0;){for(e=0,a=u+n;a>n;)s=i[a]+h[n]*d[a-n-1]+e,i[a--]=s%ye|0,e=s/ye|0;i[a]=(i[a]+e)%ye|0}for(;!i[--o];)i.pop();return e?++r:i.shift(),t.d=i,t.e=r,oe?ne(t,l.precision):t};W.toDecimalPlaces=W.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(Qe(t,0,jr),e===void 0?e=n.rounding:Qe(e,0,8),ne(r,t+pe(r)+1,e))};W.toExponential=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=Lt(n,!0):(Qe(t,0,jr),e===void 0?e=a.rounding:Qe(e,0,8),n=ne(new a(n),t+1,e),r=Lt(n,!0,t+1)),r};W.toFixed=function(t,e){var r,n,a=this,i=a.constructor;return t===void 0?Lt(a):(Qe(t,0,jr),e===void 0?e=i.rounding:Qe(e,0,8),n=ne(new i(a),t+pe(a)+1,e),r=Lt(n.abs(),!1,t+pe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};W.toInteger=W.toint=function(){var t=this,e=t.constructor;return ne(new e(t),pe(t)+1,e.rounding)};W.toNumber=function(){return+this};W.toPower=W.pow=function(t){var e,r,n,a,i,o,s=this,u=s.constructor,c=12,f=+(t=new u(t));if(!t.s)return new u(Me);if(s=new u(s),!s.s){if(t.s<1)throw Error(Le+"Infinity");return s}if(s.eq(Me))return s;if(n=u.precision,t.eq(Me))return ne(s,n);if(e=t.e,r=t.d.length-1,o=e>=r,i=s.s,o){if((r=f<0?-f:f)<=hb){for(a=new u(Me),e=Math.ceil(n/ae+4),oe=!1;r%2&&(a=a.times(s),Ov(a.d,e)),r=Er(r/2),r!==0;)s=s.times(s),Ov(s.d,e);return oe=!0,t.s<0?new u(Me).div(a):ne(a,n)}}else if(i<0)throw Error(Le+"NaN");return i=i<0&&t.d[Math.max(e,r)]&1?-1:1,s.s=1,oe=!1,a=t.times(Qr(s,n+c)),oe=!0,a=yb(a),a.s=i,a};W.toPrecision=function(t,e){var r,n,a=this,i=a.constructor;return t===void 0?(r=pe(a),n=Lt(a,r<=i.toExpNeg||r>=i.toExpPos)):(Qe(t,1,jr),e===void 0?e=i.rounding:Qe(e,0,8),a=ne(new i(a),t,e),r=pe(a),n=Lt(a,t<=r||r<=i.toExpNeg,t)),n};W.toSignificantDigits=W.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(Qe(t,1,jr),e===void 0?e=n.rounding:Qe(e,0,8)),ne(new n(r),t,e)};W.toString=W.valueOf=W.val=W.toJSON=W[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=pe(t),r=t.constructor;return Lt(t,e<=r.toExpNeg||e>=r.toExpPos)};function vb(t,e){var r,n,a,i,o,s,u,c,f=t.constructor,l=f.precision;if(!t.s||!e.s)return e.s||(e=new f(t)),oe?ne(e,l):e;if(u=t.d,c=e.d,o=t.e,a=e.e,u=u.slice(),i=o-a,i){for(i<0?(n=u,i=-i,s=c.length):(n=c,a=o,s=u.length),o=Math.ceil(l/ae),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,n=c,c=u,u=n),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/ye|0,u[i]%=ye;for(r&&(u.unshift(r),++a),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=a,oe?ne(e,l):e}function Qe(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Rt+t)}function Ze(t){var e,r,n,a=t.length-1,i="",o=t[0];if(a>0){for(i+=o,e=1;e<a;e++)n=t[e]+"",r=ae-n.length,r&&(i+=vt(r)),i+=n;o=t[e],n=o+"",r=ae-n.length,r&&(i+=vt(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var ut=function(){function t(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%ye|0,o=i/ye|0;return o&&n.unshift(o),n}function e(n,a,i,o){var s,u;if(i!=o)u=i>o?1:-1;else for(s=u=0;s<i;s++)if(n[s]!=a[s]){u=n[s]>a[s]?1:-1;break}return u}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*ye+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,u,c,f,l,d,h,y,v,p,x,b,w,S,g,O,A,_,P=n.constructor,k=n.s==a.s?1:-1,E=n.d,C=a.d;if(!n.s)return new P(n);if(!a.s)throw Error(Le+"Division by zero");for(u=n.e-a.e,A=C.length,g=E.length,h=new P(k),y=h.d=[],c=0;C[c]==(E[c]||0);)++c;if(C[c]>(E[c]||0)&&--u,i==null?b=i=P.precision:o?b=i+(pe(n)-pe(a))+1:b=i,b<0)return new P(0);if(b=b/ae+2|0,c=0,A==1)for(f=0,C=C[0],b++;(c<g||f)&&b--;c++)w=f*ye+(E[c]||0),y[c]=w/C|0,f=w%C|0;else{for(f=ye/(C[0]+1)|0,f>1&&(C=t(C,f),E=t(E,f),A=C.length,g=E.length),S=A,v=E.slice(0,A),p=v.length;p<A;)v[p++]=0;_=C.slice(),_.unshift(0),O=C[0],C[1]>=ye/2&&++O;do f=0,s=e(C,v,A,p),s<0?(x=v[0],A!=p&&(x=x*ye+(v[1]||0)),f=x/O|0,f>1?(f>=ye&&(f=ye-1),l=t(C,f),d=l.length,p=v.length,s=e(l,v,d,p),s==1&&(f--,r(l,A<d?_:C,d))):(f==0&&(s=f=1),l=C.slice()),d=l.length,d<p&&l.unshift(0),r(v,l,p),s==-1&&(p=v.length,s=e(C,v,A,p),s<1&&(f++,r(v,A<p?_:C,p))),p=v.length):s===0&&(f++,v=[0]),y[c++]=f,s&&v[0]?v[p++]=E[S]||0:(v=[E[S]],p=1);while((S++<g||v[0]!==void 0)&&b--)}return y[0]||y.shift(),h.e=u,ne(h,o?i+pe(h)+1:i)}}();function yb(t,e){var r,n,a,i,o,s,u=0,c=0,f=t.constructor,l=f.precision;if(pe(t)>16)throw Error(Kl+pe(t));if(!t.s)return new f(Me);for(oe=!1,s=l,o=new f(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(n=Math.log(It(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new f(Me),f.precision=s;;){if(a=ne(a.times(t),s),r=r.times(++u),o=i.plus(ut(a,r,s)),Ze(o.d).slice(0,s)===Ze(i.d).slice(0,s)){for(;c--;)i=ne(i.times(i),s);return f.precision=l,e==null?(oe=!0,ne(i,l)):i}i=o}}function pe(t){for(var e=t.e*ae,r=t.d[0];r>=10;r/=10)e++;return e}function xu(t,e,r){if(e>t.LN10.sd())throw oe=!0,r&&(t.precision=r),Error(Le+"LN10 precision limit exceeded");return ne(new t(t.LN10),e)}function vt(t){for(var e="";t--;)e+="0";return e}function Qr(t,e){var r,n,a,i,o,s,u,c,f,l=1,d=10,h=t,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(Le+(h.s?"NaN":"-Infinity"));if(h.eq(Me))return new v(0);if(e==null?(oe=!1,c=p):c=e,h.eq(10))return e==null&&(oe=!0),xu(v,c);if(c+=d,v.precision=c,r=Ze(y),n=r.charAt(0),i=pe(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(t),r=Ze(h.d),n=r.charAt(0),l++;i=pe(h),n>1?(h=new v("0."+r),i++):h=new v(n+"."+r.slice(1))}else return u=xu(v,c+2,p).times(i+""),h=Qr(new v(n+"."+r.slice(1)),c-d).plus(u),v.precision=p,e==null?(oe=!0,ne(h,p)):h;for(s=o=h=ut(h.minus(Me),h.plus(Me),c),f=ne(h.times(h),c),a=3;;){if(o=ne(o.times(f),c),u=s.plus(ut(o,new v(a),c)),Ze(u.d).slice(0,c)===Ze(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(xu(v,c+2,p).times(i+""))),s=ut(s,new v(l),c),v.precision=p,e==null?(oe=!0,ne(s,p)):s;s=u,a+=2}}function wv(t,e){var r,n,a;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(a=e.length;e.charCodeAt(a-1)===48;)--a;if(e=e.slice(n,a),e){if(a-=n,r=r-n-1,t.e=Er(r/ae),t.d=[],n=(r+1)%ae,r<0&&(n+=ae),n<a){for(n&&t.d.push(+e.slice(0,n)),a-=ae;n<a;)t.d.push(+e.slice(n,n+=ae));e=e.slice(n),n=ae-e.length}else n-=a;for(;n--;)e+="0";if(t.d.push(+e),oe&&(t.e>ra||t.e<-ra))throw Error(Kl+r)}else t.s=0,t.e=0,t.d=[0];return t}function ne(t,e,r){var n,a,i,o,s,u,c,f,l=t.d;for(o=1,i=l[0];i>=10;i/=10)o++;if(n=e-o,n<0)n+=ae,a=e,c=l[f=0];else{if(f=Math.ceil((n+1)/ae),i=l.length,f>=i)return t;for(c=i=l[f],o=1;i>=10;i/=10)o++;n%=ae,a=n-ae+o}if(r!==void 0&&(i=It(10,o-a-1),s=c/i%10|0,u=e<0||l[f+1]!==void 0||c%i,u=r<4?(s||u)&&(r==0||r==(t.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?a>0?c/It(10,o-a):0:l[f-1])%10&1||r==(t.s<0?8:7))),e<1||!l[0])return u?(i=pe(t),l.length=1,e=e-i-1,l[0]=It(10,(ae-e%ae)%ae),t.e=Er(-e/ae)||0):(l.length=1,l[0]=t.e=t.s=0),t;if(n==0?(l.length=f,i=1,f--):(l.length=f+1,i=It(10,ae-n),l[f]=a>0?(c/It(10,o-a)%It(10,a)|0)*i:0),u)for(;;)if(f==0){(l[0]+=i)==ye&&(l[0]=1,++t.e);break}else{if(l[f]+=i,l[f]!=ye)break;l[f--]=0,i=1}for(n=l.length;l[--n]===0;)l.pop();if(oe&&(t.e>ra||t.e<-ra))throw Error(Kl+pe(t));return t}function mb(t,e){var r,n,a,i,o,s,u,c,f,l,d=t.constructor,h=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),oe?ne(e,h):e;if(u=t.d,l=e.d,n=e.e,c=t.e,u=u.slice(),o=c-n,o){for(f=o<0,f?(r=u,o=-o,s=l.length):(r=l,n=c,s=u.length),a=Math.max(Math.ceil(h/ae),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=u.length,s=l.length,f=a<s,f&&(s=a),a=0;a<s;a++)if(u[a]!=l[a]){f=u[a]<l[a];break}o=0}for(f&&(r=u,u=l,l=r,e.s=-e.s),s=u.length,a=l.length-s;a>0;--a)u[s++]=0;for(a=l.length;a>o;){if(u[--a]<l[a]){for(i=a;i&&u[--i]===0;)u[i]=ye-1;--u[i],u[a]+=ye}u[a]-=l[a]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(e.d=u,e.e=n,oe?ne(e,h):e):new d(0)}function Lt(t,e,r){var n,a=pe(t),i=Ze(t.d),o=i.length;return e?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+vt(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+vt(-a-1)+i,r&&(n=r-o)>0&&(i+=vt(n))):a>=o?(i+=vt(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+vt(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=vt(n))),t.s<0?"-"+i:i}function Ov(t,e){if(t.length>e)return t.length=e,!0}function gb(t){var e,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Rt+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return wv(o,i.toString())}else if(typeof i!="string")throw Error(Rt+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,j_.test(i))wv(o,i);else throw Error(Rt+i)}if(a.prototype=W,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=gb,a.config=a.set=E_,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return a.config(t),a}function E_(t){if(!t||typeof t!="object")throw Error(Le+"Object expected");var e,r,n,a=["precision",1,jr,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<a.length;e+=3)if((n=t[r=a[e]])!==void 0)if(Er(n)===n&&n>=a[e+1]&&n<=a[e+2])this[r]=n;else throw Error(Rt+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Rt+r+": "+n);return this}var Hl=gb(__);Me=new Hl(1);const te=Hl;function T_(t){return M_(t)||I_(t)||k_(t)||C_()}function C_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
111
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k_(t,e){if(t){if(typeof t=="string")return Oc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oc(t,e)}}function I_(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function M_(t){if(Array.isArray(t))return Oc(t)}function Oc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var $_=function(e){return e},bb={},xb=function(e){return e===bb},Sv=function(e){return function r(){return arguments.length===0||arguments.length===1&&xb(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},N_=function t(e,r){return e===1?r:Sv(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==bb}).length;return o>=e?r.apply(void 0,a):t(e-o,Sv(function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var f=a.map(function(l){return xb(l)?u.shift():l});return r.apply(void 0,T_(f).concat(u))}))})},Ua=function(e){return N_(e.length,e)},Sc=function(e,r){for(var n=[],a=e;a<r;++a)n[a-e]=a;return n},R_=Ua(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),D_=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return $_;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,u){return u(s)},i.apply(void 0,arguments))}},Ac=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},wb=function(e){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,u){return s===r[u]})||(r=i,n=e.apply(void 0,i)),n}};function q_(t){var e;return t===0?e=1:e=Math.floor(new te(t).abs().log(10).toNumber())+1,e}function L_(t,e,r){for(var n=new te(t),a=0,i=[];n.lt(e)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var B_=Ua(function(t,e,r){var n=+t,a=+e;return n+r*(a-n)}),F_=Ua(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),z_=Ua(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Ga={rangeStep:L_,getDigitCount:q_,interpolateNumber:B_,uninterpolateNumber:F_,uninterpolateTruncation:z_};function Pc(t){return G_(t)||U_(t)||Ob(t)||W_()}function W_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
112
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U_(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function G_(t){if(Array.isArray(t))return _c(t)}function en(t,e){return V_(t)||H_(t,e)||Ob(t,e)||K_()}function K_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
113
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ob(t,e){if(t){if(typeof t=="string")return _c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _c(t,e)}}function _c(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function H_(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=t[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){a=!0,i=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function V_(t){if(Array.isArray(t))return t}function Sb(t){var e=en(t,2),r=e[0],n=e[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Ab(t,e,r){if(t.lte(0))return new te(0);var n=Ga.getDigitCount(t.toNumber()),a=new te(10).pow(n),i=t.div(a),o=n!==1?.05:.1,s=new te(Math.ceil(i.div(o).toNumber())).add(r).mul(o),u=s.mul(a);return e?u:new te(Math.ceil(u))}function X_(t,e,r){var n=1,a=new te(t);if(!a.isint()&&r){var i=Math.abs(t);i<1?(n=new te(10).pow(Ga.getDigitCount(t)-1),a=new te(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new te(Math.floor(t)))}else t===0?a=new te(Math.floor((e-1)/2)):r||(a=new te(Math.floor(t)));var o=Math.floor((e-1)/2),s=D_(R_(function(u){return a.add(new te(u-o).mul(n)).toNumber()}),Sc);return s(0,e)}function Pb(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new te(0),tickMin:new te(0),tickMax:new te(0)};var i=Ab(new te(e).sub(t).div(r-1),n,a),o;t<=0&&e>=0?o=new te(0):(o=new te(t).add(e).div(2),o=o.sub(new te(o).mod(i)));var s=Math.ceil(o.sub(t).div(i).toNumber()),u=Math.ceil(new te(e).sub(o).div(i).toNumber()),c=s+u+1;return c>r?Pb(t,e,r,n,a+1):(c<r&&(u=e>0?u+(r-c):u,s=e>0?s:s+(r-c)),{step:i,tickMin:o.sub(new te(s).mul(i)),tickMax:o.add(new te(u).mul(i))})}function Y_(t){var e=en(t,2),r=e[0],n=e[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=Sb([r,n]),u=en(s,2),c=u[0],f=u[1];if(c===-1/0||f===1/0){var l=f===1/0?[c].concat(Pc(Sc(0,a-1).map(function(){return 1/0}))):[].concat(Pc(Sc(0,a-1).map(function(){return-1/0})),[f]);return r>n?Ac(l):l}if(c===f)return X_(c,a,i);var d=Pb(c,f,o,i),h=d.step,y=d.tickMin,v=d.tickMax,p=Ga.rangeStep(y,v.add(new te(.1).mul(h)),h);return r>n?Ac(p):p}function Z_(t,e){var r=en(t,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Sb([n,a]),s=en(o,2),u=s[0],c=s[1];if(u===-1/0||c===1/0)return[n,a];if(u===c)return[u];var f=Math.max(e,2),l=Ab(new te(c).sub(u).div(f-1),i,0),d=[].concat(Pc(Ga.rangeStep(new te(u),new te(c).sub(new te(.99).mul(l)),l)),[c]);return n>a?Ac(d):d}var J_=wb(Y_),Q_=wb(Z_),ej="Invariant failed";function Bt(t,e){throw new Error(ej)}var tj=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function cr(t){"@babel/helpers - typeof";return cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cr(t)}function na(){return na=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},na.apply(this,arguments)}function rj(t,e){return oj(t)||ij(t,e)||aj(t,e)||nj()}function nj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
114
114
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aj(t,e){if(t){if(typeof t=="string")return Av(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Av(t,e)}}function Av(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ij(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function oj(t){if(Array.isArray(t))return t}function sj(t,e){if(t==null)return{};var r=uj(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function uj(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function cj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eb(n.key),n)}}function fj(t,e,r){return e&&lj(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function dj(t,e,r){return e=aa(e),pj(t,_b()?Reflect.construct(e,r||[],aa(t).constructor):e.apply(t,r))}function pj(t,e){if(e&&(cr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hj(t)}function hj(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_b=function(){return!!t})()}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},aa(t)}function vj(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jc(t,e)}function jc(t,e){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},jc(t,e)}function jb(t,e,r){return e=Eb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Eb(t){var e=yj(t,"string");return cr(e)=="symbol"?e:e+""}function yj(t,e){if(cr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(cr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var En=function(t){function e(){return cj(this,e),dj(this,e,arguments)}return vj(e,t),fj(e,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,u=n.data,c=n.dataPointFormatter,f=n.xAxis,l=n.yAxis,d=sj(n,tj),h=Z(d,!1);this.props.direction==="x"&&f.type!=="number"&&Bt();var y=u.map(function(v){var p=c(v,s),x=p.x,b=p.y,w=p.value,S=p.errorVal;if(!S)return null;var g=[],O,A;if(Array.isArray(S)){var _=rj(S,2);O=_[0],A=_[1]}else O=A=S;if(i==="vertical"){var P=f.scale,k=b+a,E=k+o,C=k-o,I=P(w-O),N=P(w+A);g.push({x1:N,y1:E,x2:N,y2:C}),g.push({x1:I,y1:k,x2:N,y2:k}),g.push({x1:I,y1:E,x2:I,y2:C})}else if(i==="horizontal"){var M=l.scale,R=x+a,D=R-o,F=R+o,z=M(w-O),q=M(w+A);g.push({x1:D,y1:q,x2:F,y2:q}),g.push({x1:R,y1:z,x2:R,y2:q}),g.push({x1:D,y1:z,x2:F,y2:z})}return j.createElement(ce,na({className:"recharts-errorBar",key:"bar-".concat(g.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},h),g.map(function(U){return j.createElement("line",na({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return j.createElement(ce,{className:"recharts-errorBars"},y)}}])}(j.Component);jb(En,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});jb(En,"displayName","ErrorBar");function tn(t){"@babel/helpers - typeof";return tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(t)}function Pv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pv(Object(r),!0).forEach(function(n){mj(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mj(t,e,r){return e=gj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gj(t){var e=bj(t,"string");return tn(e)=="symbol"?e:e+""}function bj(t,e){if(tn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(tn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Tb=function(e){var r=e.children,n=e.formattedGraphicalItems,a=e.legendWidth,i=e.legendContent,o=ke(r,tr);if(!o)return null;var s=tr.defaultProps,u=s!==void 0?kt(kt({},s),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:i==="children"?c=(n||[]).reduce(function(f,l){var d=l.item,h=l.props,y=h.sectors||h.data||[];return f.concat(y.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):c=(n||[]).map(function(f){var l=f.item,d=l.type.defaultProps,h=d!==void 0?kt(kt({},d),l.props):{},y=h.dataKey,v=h.name,p=h.legendType,x=h.hide;return{inactive:x,dataKey:y,type:u.iconType||p||"square",color:Vl(l),value:v||y,payload:h}}),kt(kt(kt({},u),tr.getWithHeight(o,a)),{},{payload:c,item:o})};function rn(t){"@babel/helpers - typeof";return rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(t)}function _v(t){return Sj(t)||Oj(t)||wj(t)||xj()}function xj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wj(t,e){if(t){if(typeof t=="string")return Ec(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ec(t,e)}}function Oj(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Sj(t){if(Array.isArray(t))return Ec(t)}function Ec(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jv(Object(r),!0).forEach(function(n){rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rr(t,e,r){return e=Aj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Aj(t){var e=Pj(t,"string");return rn(e)=="symbol"?e:e+""}function Pj(t,e){if(rn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $e(t,e,r){return X(t)||X(e)?r:ve(e)?De(t,e,r):H(e)?e(t):r}function Wr(t,e,r,n){var a=S_(t,function(s){return $e(s,e)});if(r==="number"){var i=a.filter(function(s){return B(s)||parseFloat(s)});return i.length?[za(i),Fa(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!X(s)}):a;return o.map(function(s){return ve(s)||s instanceof Date?s:""})}var _j=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n?.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var u=i.range,c=0;c<s;c++){var f=c>0?a[c-1].coordinate:a[s-1].coordinate,l=a[c].coordinate,d=c>=s-1?a[0].coordinate:a[c+1].coordinate,h=void 0;if(Ke(l-f)!==Ke(d-l)){var y=[];if(Ke(d-l)===Ke(u[1]-u[0])){h=d;var v=l+u[1]-u[0];y[0]=Math.min(v,(v+f)/2),y[1]=Math.max(v,(v+f)/2)}else{h=f;var p=d+u[1]-u[0];y[0]=Math.min(l,(p+l)/2),y[1]=Math.max(l,(p+l)/2)}var x=[Math.min(l,(h+l)/2),Math.max(l,(h+l)/2)];if(e>x[0]&&e<=x[1]||e>=y[0]&&e<=y[1]){o=a[c].index;break}}else{var b=Math.min(f,d),w=Math.max(f,d);if(e>(b+l)/2&&e<=(w+l)/2){o=a[c].index;break}}}else for(var S=0;S<s;S++)if(S===0&&e<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<s-1&&e>(n[S].coordinate+n[S-1].coordinate)/2&&e<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&e>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Vl=function(e){var r,n=e,a=n.type.displayName,i=(r=e.type)!==null&&r!==void 0&&r.defaultProps?se(se({},e.type.defaultProps),e.props):e.props,o=i.stroke,s=i.fill,u;switch(a){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:s;break;default:u=s;break}return u},jj=function(e){var r=e.barSize,n=e.totalSize,a=e.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),u=0,c=s.length;u<c;u++)for(var f=i[s[u]].stackGroups,l=Object.keys(f),d=0,h=l.length;d<h;d++){var y=f[l[d]],v=y.items,p=y.cateAxisId,x=v.filter(function(A){return ot(A.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,w=b!==void 0?se(se({},b),x[0].props):x[0].props,S=w.barSize,g=w[p];o[g]||(o[g]=[]);var O=X(S)?r:S;o[g].push({item:x[0],stackList:x.slice(1),barSize:X(O)?void 0:qt(O,n,0)})}}return o},Ej=function(e){var r=e.barGap,n=e.barCategoryGap,a=e.bandSize,i=e.sizeList,o=i===void 0?[]:i,s=e.maxBarSize,u=o.length;if(u<1)return null;var c=qt(r,a,0,!0),f,l=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/u,y=o.reduce(function(S,g){return S+g.barSize||0},0);y+=(u-1)*c,y>=a&&(y-=(u-1)*c,c=0),y>=a&&h>0&&(d=!0,h*=.9,y=u*h);var v=(a-y)/2>>0,p={offset:v-c,size:0};f=o.reduce(function(S,g){var O={item:g.item,position:{offset:p.offset+p.size+c,size:d?h:g.barSize}},A=[].concat(_v(S),[O]);return p=A[A.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(_){A.push({item:_,position:p})}),A},l)}else{var x=qt(n,a,0,!0);a-2*x-(u-1)*c<=0&&(c=0);var b=(a-2*x-(u-1)*c)/u;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;f=o.reduce(function(S,g,O){var A=[].concat(_v(S),[{item:g.item,position:{offset:x+(b+c)*O+(b-w)/2,size:w}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(_){A.push({item:_,position:A[A.length-1].position})}),A},l)}return f},Tj=function(e,r,n,a){var i=n.children,o=n.width,s=n.margin,u=o-(s.left||0)-(s.right||0),c=Tb({children:i,legendWidth:u});if(c){var f=a||{},l=f.width,d=f.height,h=c.align,y=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&B(e[h]))return se(se({},e),{},rr({},h,e[h]+(l||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&B(e[y]))return se(se({},e),{},rr({},y,e[y]+(d||0)))}return e},Cj=function(e,r,n){return X(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Cb=function(e,r,n,a,i){var o=r.props.children,s=qe(o,En).filter(function(c){return Cj(a,i,c.props.direction)});if(s&&s.length){var u=s.map(function(c){return c.props.dataKey});return e.reduce(function(c,f){var l=$e(f,n);if(X(l))return c;var d=Array.isArray(l)?[za(l),Fa(l)]:[l,l],h=u.reduce(function(y,v){var p=$e(f,v,0),x=d[0]-Math.abs(Array.isArray(p)?p[0]:p),b=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(x,y[0]),Math.max(b,y[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},kj=function(e,r,n,a,i){var o=r.map(function(s){return Cb(e,s,n,i,a)}).filter(function(s){return!X(s)});return o&&o.length?o.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},kb=function(e,r,n,a,i){var o=r.map(function(u){var c=u.props.dataKey;return n==="number"&&c&&Cb(e,u,c,a)||Wr(e,c,n,i)});if(n==="number")return o.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(u,c){for(var f=0,l=c.length;f<l;f++)s[c[f]]||(s[c[f]]=!0,u.push(c[f]));return u},[])},Ib=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Mb=function(e,r,n,a){if(a)return e.map(function(u){return u.coordinate});var i,o,s=e.map(function(u){return u.coordinate===r&&(i=!0),u.coordinate===n&&(o=!0),u.coordinate});return i||s.push(r),o||s.push(n),s},it=function(e,r,n){if(!e)return null;var a=e.scale,i=e.duplicateDomain,o=e.type,s=e.range,u=e.realScaleType==="scaleBand"?a.bandwidth()/2:2,c=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/u:0;if(c=e.axisType==="angleAxis"&&s?.length>=2?Ke(s[0]-s[1])*2*c:c,r&&(e.ticks||e.niceTicks)){var f=(e.ticks||e.niceTicks).map(function(l){var d=i?i.indexOf(l):l;return{coordinate:a(d)+c,value:l,offset:c}});return f.filter(function(l){return!Pn(l.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(l,d){return{coordinate:a(l)+c,value:l,index:d,offset:c}}):a.ticks&&!n?a.ticks(e.tickCount).map(function(l){return{coordinate:a(l)+c,value:l,offset:c}}):a.domain().map(function(l,d){return{coordinate:a(l)+c,value:i?i[l]:l,index:d,offset:c}})},wu=new WeakMap,Dn=function(e,r){if(typeof r!="function")return e;wu.has(e)||wu.set(e,new WeakMap);var n=wu.get(e);if(n.has(r))return n.get(r);var a=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},Ij=function(e,r,n){var a=e.scale,i=e.type,o=e.layout,s=e.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:tc(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:nc(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Fr(),realScaleType:"point"}:i==="category"?{scale:tc(),realScaleType:"band"}:{scale:nc(),realScaleType:"linear"};if(Dt(a)){var u="scale".concat(Da(a));return{scale:(dv[u]||Fr)(),realScaleType:dv[u]?u:"point"}}return H(a)?{scale:a}:{scale:Fr(),realScaleType:"point"}},Ev=1e-4,Mj=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,a=e.range(),i=Math.min(a[0],a[1])-Ev,o=Math.max(a[0],a[1])+Ev,s=e(r[0]),u=e(r[n-1]);(s<i||s>o||u<i||u>o)&&e.domain([r[0],r[n-1]])}},$j=function(e,r){if(!e)return null;for(var n=0,a=e.length;n<a;n++)if(e[n].item===r)return e[n].position;return null},Nj=function(e,r){if(!r||r.length!==2||!B(r[0])||!B(r[1]))return e;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[e[0],e[1]];return(!B(e[0])||e[0]<n)&&(i[0]=n),(!B(e[1])||e[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},Rj=function(e){var r=e.length;if(!(r<=0))for(var n=0,a=e[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var u=Pn(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=i,e[s][n][1]=i+u,i=e[s][n][1]):(e[s][n][0]=o,e[s][n][1]=o+u,o=e[s][n][1])}},Dj=function(e){var r=e.length;if(!(r<=0))for(var n=0,a=e[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=Pn(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},qj={sign:Rj,expand:jO,none:ar,silhouette:EO,wiggle:TO,positive:Dj},Lj=function(e,r,n){var a=r.map(function(s){return s.props.dataKey}),i=qj[n],o=_O().keys(a).value(function(s,u){return+$e(s,u,0)}).order(ic).offset(i);return o(e)},Bj=function(e,r,n,a,i,o){if(!e)return null;var s=o?r.reverse():r,u={},c=s.reduce(function(l,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?se(se({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return l;var x=y[n],b=l[x]||{hasStack:!1,stackGroups:{}};if(ve(v)){var w=b.stackGroups[v]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),b.hasStack=!0,b.stackGroups[v]=w}else b.stackGroups[_n("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return se(se({},l),{},rr({},x,b))},u),f={};return Object.keys(c).reduce(function(l,d){var h=c[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var x=h.stackGroups[p];return se(se({},v),{},rr({},p,{numericAxisId:n,cateAxisId:a,items:x.items,stackedData:Lj(e,x.items,i)}))},y)}return se(se({},l),{},rr({},d,h))},f)},Fj=function(e,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=e.domain();if(!c.length)return null;var f=J_(c,i,s);return e.domain([za(f),Fa(f)]),{niceTicks:f}}if(i&&a==="number"){var l=e.domain(),d=Q_(l,i,s);return{niceTicks:d}}return null};function Tv(t){var e=t.axis,r=t.ticks,n=t.bandSize,a=t.entry,i=t.index,o=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!X(a[e.dataKey])){var s=Hn(r,"value",a[e.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var u=$e(a,X(o)?e.dataKey:o);return X(u)?null:e.scale(u)}var Cv=function(e){var r=e.axis,n=e.ticks,a=e.offset,i=e.bandSize,o=e.entry,s=e.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var u=$e(o,r.dataKey,r.domain[s]);return X(u)?null:r.scale(u)-i/2+a},zj=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},Wj=function(e,r){var n,a=(n=e.type)!==null&&n!==void 0&&n.defaultProps?se(se({},e.type.defaultProps),e.props):e.props,i=a.stackId;if(ve(i)){var o=r[i];if(o){var s=o.items.indexOf(e);return s>=0?o.stackedData[s]:null}}return null},Uj=function(e){return e.reduce(function(r,n){return[za(n.concat([r[0]]).filter(B)),Fa(n.concat([r[1]]).filter(B))]},[1/0,-1/0])},$b=function(e,r,n){return Object.keys(e).reduce(function(a,i){var o=e[i],s=o.stackedData,u=s.reduce(function(c,f){var l=Uj(f.slice(r,n+1));return[Math.min(c[0],l[0]),Math.max(c[1],l[1])]},[1/0,-1/0]);return[Math.min(u[0],a[0]),Math.max(u[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},kv=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Iv=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Tc=function(e,r,n){if(H(e))return e(r,n);if(!Array.isArray(e))return r;var a=[];if(B(e[0]))a[0]=n?e[0]:Math.min(e[0],r[0]);else if(kv.test(e[0])){var i=+kv.exec(e[0])[1];a[0]=r[0]-i}else H(e[0])?a[0]=e[0](r[0]):a[0]=r[0];if(B(e[1]))a[1]=n?e[1]:Math.max(e[1],r[1]);else if(Iv.test(e[1])){var o=+Iv.exec(e[1])[1];a[1]=r[1]+o}else H(e[1])?a[1]=e[1](r[1]):a[1]=r[1];return a},ia=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var a=e.scale.bandwidth();if(!n||a>0)return a}if(e&&r&&r.length>=2){for(var i=Ul(r,function(l){return l.coordinate}),o=1/0,s=1,u=i.length;s<u;s++){var c=i[s],f=i[s-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Mv=function(e,r,n){return!e||!e.length||Wa(e,De(n,"type.defaultProps.domain"))?r:e},Nb=function(e,r){var n=e.type.defaultProps?se(se({},e.type.defaultProps),e.props):e.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,u=n.tooltipType,c=n.chartType,f=n.hide;return se(se({},Z(e,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Vl(e),value:$e(r,a),type:u,payload:r,chartType:c,hide:f})};function nn(t){"@babel/helpers - typeof";return nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(t)}function $v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$v(Object(r),!0).forEach(function(n){Kj(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Kj(t,e,r){return e=Gj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gj(t){var e=Hj(t,"string");return nn(e)=="symbol"?e:e+""}function Hj(t,e){if(nn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oa=Math.PI/180,Vj=function(e){return e*180/Math.PI},be=function(e,r,n,a){return{x:e+Math.cos(-oa*a)*n,y:r+Math.sin(-oa*a)*n}},Xj=function(e,r){var n=e.x,a=e.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},Yj=function(e,r){var n=e.x,a=e.y,i=r.cx,o=r.cy,s=Xj({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var u=(n-i)/s,c=Math.acos(u);return a>o&&(c=2*Math.PI-c),{radius:s,angle:Vj(c),angleInRadian:c}},Zj=function(e){var r=e.startAngle,n=e.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},Jj=function(e,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return e+s*360},Rv=function(e,r){var n=e.x,a=e.y,i=Yj({x:n,y:a},r),o=i.radius,s=i.angle,u=r.innerRadius,c=r.outerRadius;if(o<u||o>c)return!1;if(o===0)return!0;var f=Zj(r),l=f.startAngle,d=f.endAngle,h=s,y;if(l<=d){for(;h>d;)h-=360;for(;h<l;)h+=360;y=h>=l&&h<=d}else{for(;h>l;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=l}return y?Nv(Nv({},r),{},{radius:o,angle:Jj(h,r)}):null};function an(t){"@babel/helpers - typeof";return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(t)}var Qj=["offset"];function eE(t){return aE(t)||nE(t)||rE(t)||tE()}function tE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
116
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rE(t,e){if(t){if(typeof t=="string")return Cc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cc(t,e)}}function nE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aE(t){if(Array.isArray(t))return Cc(t)}function Cc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iE(t,e){if(t==null)return{};var r=oE(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function oE(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Dv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function he(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dv(Object(r),!0).forEach(function(n){sE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sE(t,e,r){return e=uE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uE(t){var e=cE(t,"string");return an(e)=="symbol"?e:e+""}function cE(t,e){if(an(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(an(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(){return on=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},on.apply(this,arguments)}var lE=function(e){var r=e.value,n=e.formatter,a=X(e.children)?r:e.children;return H(n)?n(a):a},fE=function(e,r){var n=
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wj(t,e){if(t){if(typeof t=="string")return Ec(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ec(t,e)}}function Oj(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Sj(t){if(Array.isArray(t))return Ec(t)}function Ec(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jv(Object(r),!0).forEach(function(n){rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rr(t,e,r){return e=Aj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Aj(t){var e=Pj(t,"string");return rn(e)=="symbol"?e:e+""}function Pj(t,e){if(rn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $e(t,e,r){return X(t)||X(e)?r:ve(e)?De(t,e,r):H(e)?e(t):r}function Wr(t,e,r,n){var a=S_(t,function(s){return $e(s,e)});if(r==="number"){var i=a.filter(function(s){return B(s)||parseFloat(s)});return i.length?[za(i),Fa(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!X(s)}):a;return o.map(function(s){return ve(s)||s instanceof Date?s:""})}var _j=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n?.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var u=i.range,c=0;c<s;c++){var f=c>0?a[c-1].coordinate:a[s-1].coordinate,l=a[c].coordinate,d=c>=s-1?a[0].coordinate:a[c+1].coordinate,h=void 0;if(Ge(l-f)!==Ge(d-l)){var y=[];if(Ge(d-l)===Ge(u[1]-u[0])){h=d;var v=l+u[1]-u[0];y[0]=Math.min(v,(v+f)/2),y[1]=Math.max(v,(v+f)/2)}else{h=f;var p=d+u[1]-u[0];y[0]=Math.min(l,(p+l)/2),y[1]=Math.max(l,(p+l)/2)}var x=[Math.min(l,(h+l)/2),Math.max(l,(h+l)/2)];if(e>x[0]&&e<=x[1]||e>=y[0]&&e<=y[1]){o=a[c].index;break}}else{var b=Math.min(f,d),w=Math.max(f,d);if(e>(b+l)/2&&e<=(w+l)/2){o=a[c].index;break}}}else for(var S=0;S<s;S++)if(S===0&&e<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<s-1&&e>(n[S].coordinate+n[S-1].coordinate)/2&&e<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&e>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Vl=function(e){var r,n=e,a=n.type.displayName,i=(r=e.type)!==null&&r!==void 0&&r.defaultProps?se(se({},e.type.defaultProps),e.props):e.props,o=i.stroke,s=i.fill,u;switch(a){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:s;break;default:u=s;break}return u},jj=function(e){var r=e.barSize,n=e.totalSize,a=e.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),u=0,c=s.length;u<c;u++)for(var f=i[s[u]].stackGroups,l=Object.keys(f),d=0,h=l.length;d<h;d++){var y=f[l[d]],v=y.items,p=y.cateAxisId,x=v.filter(function(A){return ot(A.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,w=b!==void 0?se(se({},b),x[0].props):x[0].props,S=w.barSize,g=w[p];o[g]||(o[g]=[]);var O=X(S)?r:S;o[g].push({item:x[0],stackList:x.slice(1),barSize:X(O)?void 0:qt(O,n,0)})}}return o},Ej=function(e){var r=e.barGap,n=e.barCategoryGap,a=e.bandSize,i=e.sizeList,o=i===void 0?[]:i,s=e.maxBarSize,u=o.length;if(u<1)return null;var c=qt(r,a,0,!0),f,l=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/u,y=o.reduce(function(S,g){return S+g.barSize||0},0);y+=(u-1)*c,y>=a&&(y-=(u-1)*c,c=0),y>=a&&h>0&&(d=!0,h*=.9,y=u*h);var v=(a-y)/2>>0,p={offset:v-c,size:0};f=o.reduce(function(S,g){var O={item:g.item,position:{offset:p.offset+p.size+c,size:d?h:g.barSize}},A=[].concat(_v(S),[O]);return p=A[A.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(_){A.push({item:_,position:p})}),A},l)}else{var x=qt(n,a,0,!0);a-2*x-(u-1)*c<=0&&(c=0);var b=(a-2*x-(u-1)*c)/u;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;f=o.reduce(function(S,g,O){var A=[].concat(_v(S),[{item:g.item,position:{offset:x+(b+c)*O+(b-w)/2,size:w}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(_){A.push({item:_,position:A[A.length-1].position})}),A},l)}return f},Tj=function(e,r,n,a){var i=n.children,o=n.width,s=n.margin,u=o-(s.left||0)-(s.right||0),c=Tb({children:i,legendWidth:u});if(c){var f=a||{},l=f.width,d=f.height,h=c.align,y=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&B(e[h]))return se(se({},e),{},rr({},h,e[h]+(l||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&B(e[y]))return se(se({},e),{},rr({},y,e[y]+(d||0)))}return e},Cj=function(e,r,n){return X(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Cb=function(e,r,n,a,i){var o=r.props.children,s=qe(o,En).filter(function(c){return Cj(a,i,c.props.direction)});if(s&&s.length){var u=s.map(function(c){return c.props.dataKey});return e.reduce(function(c,f){var l=$e(f,n);if(X(l))return c;var d=Array.isArray(l)?[za(l),Fa(l)]:[l,l],h=u.reduce(function(y,v){var p=$e(f,v,0),x=d[0]-Math.abs(Array.isArray(p)?p[0]:p),b=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(x,y[0]),Math.max(b,y[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},kj=function(e,r,n,a,i){var o=r.map(function(s){return Cb(e,s,n,i,a)}).filter(function(s){return!X(s)});return o&&o.length?o.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},kb=function(e,r,n,a,i){var o=r.map(function(u){var c=u.props.dataKey;return n==="number"&&c&&Cb(e,u,c,a)||Wr(e,c,n,i)});if(n==="number")return o.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(u,c){for(var f=0,l=c.length;f<l;f++)s[c[f]]||(s[c[f]]=!0,u.push(c[f]));return u},[])},Ib=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Mb=function(e,r,n,a){if(a)return e.map(function(u){return u.coordinate});var i,o,s=e.map(function(u){return u.coordinate===r&&(i=!0),u.coordinate===n&&(o=!0),u.coordinate});return i||s.push(r),o||s.push(n),s},it=function(e,r,n){if(!e)return null;var a=e.scale,i=e.duplicateDomain,o=e.type,s=e.range,u=e.realScaleType==="scaleBand"?a.bandwidth()/2:2,c=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/u:0;if(c=e.axisType==="angleAxis"&&s?.length>=2?Ge(s[0]-s[1])*2*c:c,r&&(e.ticks||e.niceTicks)){var f=(e.ticks||e.niceTicks).map(function(l){var d=i?i.indexOf(l):l;return{coordinate:a(d)+c,value:l,offset:c}});return f.filter(function(l){return!Pn(l.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(l,d){return{coordinate:a(l)+c,value:l,index:d,offset:c}}):a.ticks&&!n?a.ticks(e.tickCount).map(function(l){return{coordinate:a(l)+c,value:l,offset:c}}):a.domain().map(function(l,d){return{coordinate:a(l)+c,value:i?i[l]:l,index:d,offset:c}})},wu=new WeakMap,Dn=function(e,r){if(typeof r!="function")return e;wu.has(e)||wu.set(e,new WeakMap);var n=wu.get(e);if(n.has(r))return n.get(r);var a=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},Ij=function(e,r,n){var a=e.scale,i=e.type,o=e.layout,s=e.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:tc(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:nc(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Fr(),realScaleType:"point"}:i==="category"?{scale:tc(),realScaleType:"band"}:{scale:nc(),realScaleType:"linear"};if(Dt(a)){var u="scale".concat(Da(a));return{scale:(dv[u]||Fr)(),realScaleType:dv[u]?u:"point"}}return H(a)?{scale:a}:{scale:Fr(),realScaleType:"point"}},Ev=1e-4,Mj=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,a=e.range(),i=Math.min(a[0],a[1])-Ev,o=Math.max(a[0],a[1])+Ev,s=e(r[0]),u=e(r[n-1]);(s<i||s>o||u<i||u>o)&&e.domain([r[0],r[n-1]])}},$j=function(e,r){if(!e)return null;for(var n=0,a=e.length;n<a;n++)if(e[n].item===r)return e[n].position;return null},Nj=function(e,r){if(!r||r.length!==2||!B(r[0])||!B(r[1]))return e;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[e[0],e[1]];return(!B(e[0])||e[0]<n)&&(i[0]=n),(!B(e[1])||e[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},Rj=function(e){var r=e.length;if(!(r<=0))for(var n=0,a=e[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var u=Pn(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=i,e[s][n][1]=i+u,i=e[s][n][1]):(e[s][n][0]=o,e[s][n][1]=o+u,o=e[s][n][1])}},Dj=function(e){var r=e.length;if(!(r<=0))for(var n=0,a=e[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=Pn(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},qj={sign:Rj,expand:jO,none:ar,silhouette:EO,wiggle:TO,positive:Dj},Lj=function(e,r,n){var a=r.map(function(s){return s.props.dataKey}),i=qj[n],o=_O().keys(a).value(function(s,u){return+$e(s,u,0)}).order(ic).offset(i);return o(e)},Bj=function(e,r,n,a,i,o){if(!e)return null;var s=o?r.reverse():r,u={},c=s.reduce(function(l,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?se(se({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return l;var x=y[n],b=l[x]||{hasStack:!1,stackGroups:{}};if(ve(v)){var w=b.stackGroups[v]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),b.hasStack=!0,b.stackGroups[v]=w}else b.stackGroups[_n("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return se(se({},l),{},rr({},x,b))},u),f={};return Object.keys(c).reduce(function(l,d){var h=c[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var x=h.stackGroups[p];return se(se({},v),{},rr({},p,{numericAxisId:n,cateAxisId:a,items:x.items,stackedData:Lj(e,x.items,i)}))},y)}return se(se({},l),{},rr({},d,h))},f)},Fj=function(e,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=e.domain();if(!c.length)return null;var f=J_(c,i,s);return e.domain([za(f),Fa(f)]),{niceTicks:f}}if(i&&a==="number"){var l=e.domain(),d=Q_(l,i,s);return{niceTicks:d}}return null};function Tv(t){var e=t.axis,r=t.ticks,n=t.bandSize,a=t.entry,i=t.index,o=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!X(a[e.dataKey])){var s=Hn(r,"value",a[e.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var u=$e(a,X(o)?e.dataKey:o);return X(u)?null:e.scale(u)}var Cv=function(e){var r=e.axis,n=e.ticks,a=e.offset,i=e.bandSize,o=e.entry,s=e.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var u=$e(o,r.dataKey,r.domain[s]);return X(u)?null:r.scale(u)-i/2+a},zj=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},Wj=function(e,r){var n,a=(n=e.type)!==null&&n!==void 0&&n.defaultProps?se(se({},e.type.defaultProps),e.props):e.props,i=a.stackId;if(ve(i)){var o=r[i];if(o){var s=o.items.indexOf(e);return s>=0?o.stackedData[s]:null}}return null},Uj=function(e){return e.reduce(function(r,n){return[za(n.concat([r[0]]).filter(B)),Fa(n.concat([r[1]]).filter(B))]},[1/0,-1/0])},$b=function(e,r,n){return Object.keys(e).reduce(function(a,i){var o=e[i],s=o.stackedData,u=s.reduce(function(c,f){var l=Uj(f.slice(r,n+1));return[Math.min(c[0],l[0]),Math.max(c[1],l[1])]},[1/0,-1/0]);return[Math.min(u[0],a[0]),Math.max(u[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},kv=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Iv=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Tc=function(e,r,n){if(H(e))return e(r,n);if(!Array.isArray(e))return r;var a=[];if(B(e[0]))a[0]=n?e[0]:Math.min(e[0],r[0]);else if(kv.test(e[0])){var i=+kv.exec(e[0])[1];a[0]=r[0]-i}else H(e[0])?a[0]=e[0](r[0]):a[0]=r[0];if(B(e[1]))a[1]=n?e[1]:Math.max(e[1],r[1]);else if(Iv.test(e[1])){var o=+Iv.exec(e[1])[1];a[1]=r[1]+o}else H(e[1])?a[1]=e[1](r[1]):a[1]=r[1];return a},ia=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var a=e.scale.bandwidth();if(!n||a>0)return a}if(e&&r&&r.length>=2){for(var i=Ul(r,function(l){return l.coordinate}),o=1/0,s=1,u=i.length;s<u;s++){var c=i[s],f=i[s-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Mv=function(e,r,n){return!e||!e.length||Wa(e,De(n,"type.defaultProps.domain"))?r:e},Nb=function(e,r){var n=e.type.defaultProps?se(se({},e.type.defaultProps),e.props):e.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,u=n.tooltipType,c=n.chartType,f=n.hide;return se(se({},Z(e,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Vl(e),value:$e(r,a),type:u,payload:r,chartType:c,hide:f})};function nn(t){"@babel/helpers - typeof";return nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(t)}function $v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$v(Object(r),!0).forEach(function(n){Gj(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Gj(t,e,r){return e=Kj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kj(t){var e=Hj(t,"string");return nn(e)=="symbol"?e:e+""}function Hj(t,e){if(nn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oa=Math.PI/180,Vj=function(e){return e*180/Math.PI},be=function(e,r,n,a){return{x:e+Math.cos(-oa*a)*n,y:r+Math.sin(-oa*a)*n}},Xj=function(e,r){var n=e.x,a=e.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},Yj=function(e,r){var n=e.x,a=e.y,i=r.cx,o=r.cy,s=Xj({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var u=(n-i)/s,c=Math.acos(u);return a>o&&(c=2*Math.PI-c),{radius:s,angle:Vj(c),angleInRadian:c}},Zj=function(e){var r=e.startAngle,n=e.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},Jj=function(e,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return e+s*360},Rv=function(e,r){var n=e.x,a=e.y,i=Yj({x:n,y:a},r),o=i.radius,s=i.angle,u=r.innerRadius,c=r.outerRadius;if(o<u||o>c)return!1;if(o===0)return!0;var f=Zj(r),l=f.startAngle,d=f.endAngle,h=s,y;if(l<=d){for(;h>d;)h-=360;for(;h<l;)h+=360;y=h>=l&&h<=d}else{for(;h>l;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=l}return y?Nv(Nv({},r),{},{radius:o,angle:Jj(h,r)}):null};function an(t){"@babel/helpers - typeof";return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(t)}var Qj=["offset"];function eE(t){return aE(t)||nE(t)||rE(t)||tE()}function tE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
116
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rE(t,e){if(t){if(typeof t=="string")return Cc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cc(t,e)}}function nE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aE(t){if(Array.isArray(t))return Cc(t)}function Cc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iE(t,e){if(t==null)return{};var r=oE(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function oE(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Dv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function he(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dv(Object(r),!0).forEach(function(n){sE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sE(t,e,r){return e=uE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uE(t){var e=cE(t,"string");return an(e)=="symbol"?e:e+""}function cE(t,e){if(an(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(an(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function on(){return on=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},on.apply(this,arguments)}var lE=function(e){var r=e.value,n=e.formatter,a=X(e.children)?r:e.children;return H(n)?n(a):a},fE=function(e,r){var n=Ge(r-e),a=Math.min(Math.abs(r-e),360);return n*a},dE=function(e,r,n){var a=e.position,i=e.viewBox,o=e.offset,s=e.className,u=i,c=u.cx,f=u.cy,l=u.innerRadius,d=u.outerRadius,h=u.startAngle,y=u.endAngle,v=u.clockWise,p=(l+d)/2,x=fE(h,y),b=x>=0?1:-1,w,S;a==="insideStart"?(w=h+b*o,S=v):a==="insideEnd"?(w=y-b*o,S=!v):a==="end"&&(w=y+b*o,S=v),S=x<=0?S:!S;var g=be(c,f,p,w),O=be(c,f,p,w+(S?1:-1)*359),A="M".concat(g.x,",").concat(g.y,`
|
|
117
117
|
A`).concat(p,",").concat(p,",0,1,").concat(S?0:1,`,
|
|
118
118
|
`).concat(O.x,",").concat(O.y),_=X(e.id)?_n("recharts-radial-line-"):e.id;return j.createElement("text",on({},n,{dominantBaseline:"central",className:J("recharts-radial-bar-label",s)}),j.createElement("defs",null,j.createElement("path",{id:_,d:A})),j.createElement("textPath",{xlinkHref:"#".concat(_)},r))},pE=function(e){var r=e.viewBox,n=e.offset,a=e.position,i=r,o=i.cx,s=i.cy,u=i.innerRadius,c=i.outerRadius,f=i.startAngle,l=i.endAngle,d=(f+l)/2;if(a==="outside"){var h=be(o,s,c+n,d),y=h.x,v=h.y;return{x:y,y:v,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var p=(u+c)/2,x=be(o,s,p,d),b=x.x,w=x.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},hE=function(e){var r=e.viewBox,n=e.parentViewBox,a=e.offset,i=e.position,o=r,s=o.x,u=o.y,c=o.width,f=o.height,l=f>=0?1:-1,d=l*a,h=l>0?"end":"start",y=l>0?"start":"end",v=c>=0?1:-1,p=v*a,x=v>0?"end":"start",b=v>0?"start":"end";if(i==="top"){var w={x:s+c/2,y:u-l*a,textAnchor:"middle",verticalAnchor:h};return he(he({},w),n?{height:Math.max(u-n.y,0),width:c}:{})}if(i==="bottom"){var S={x:s+c/2,y:u+f+d,textAnchor:"middle",verticalAnchor:y};return he(he({},S),n?{height:Math.max(n.y+n.height-(u+f),0),width:c}:{})}if(i==="left"){var g={x:s-p,y:u+f/2,textAnchor:x,verticalAnchor:"middle"};return he(he({},g),n?{width:Math.max(g.x-n.x,0),height:f}:{})}if(i==="right"){var O={x:s+c+p,y:u+f/2,textAnchor:b,verticalAnchor:"middle"};return he(he({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:f}:{})}var A=n?{width:c,height:f}:{};return i==="insideLeft"?he({x:s+p,y:u+f/2,textAnchor:b,verticalAnchor:"middle"},A):i==="insideRight"?he({x:s+c-p,y:u+f/2,textAnchor:x,verticalAnchor:"middle"},A):i==="insideTop"?he({x:s+c/2,y:u+d,textAnchor:"middle",verticalAnchor:y},A):i==="insideBottom"?he({x:s+c/2,y:u+f-d,textAnchor:"middle",verticalAnchor:h},A):i==="insideTopLeft"?he({x:s+p,y:u+d,textAnchor:b,verticalAnchor:y},A):i==="insideTopRight"?he({x:s+c-p,y:u+d,textAnchor:x,verticalAnchor:y},A):i==="insideBottomLeft"?he({x:s+p,y:u+f-d,textAnchor:b,verticalAnchor:h},A):i==="insideBottomRight"?he({x:s+c-p,y:u+f-d,textAnchor:x,verticalAnchor:h},A):Ar(i)&&(B(i.x)||Mt(i.x))&&(B(i.y)||Mt(i.y))?he({x:s+qt(i.x,c),y:u+qt(i.y,f),textAnchor:"end",verticalAnchor:"end"},A):he({x:s+c/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},vE=function(e){return"cx"in e&&B(e.cx)};function Oe(t){var e=t.offset,r=e===void 0?5:e,n=iE(t,Qj),a=he({offset:r},n),i=a.viewBox,o=a.position,s=a.value,u=a.children,c=a.content,f=a.className,l=f===void 0?"":f,d=a.textBreakAll;if(!i||X(s)&&X(u)&&!T.isValidElement(c)&&!H(c))return null;if(T.isValidElement(c))return T.cloneElement(c,a);var h;if(H(c)){if(h=T.createElement(c,a),T.isValidElement(h))return h}else h=lE(a);var y=vE(i),v=Z(a,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return dE(a,h,v);var p=y?pE(a):hE(a);return j.createElement(ta,on({className:J("recharts-label",l)},v,p,{breakAll:d}),h)}Oe.displayName="Label";var Rb=function(e){var r=e.cx,n=e.cy,a=e.angle,i=e.startAngle,o=e.endAngle,s=e.r,u=e.radius,c=e.innerRadius,f=e.outerRadius,l=e.x,d=e.y,h=e.top,y=e.left,v=e.width,p=e.height,x=e.clockWise,b=e.labelViewBox;if(b)return b;if(B(v)&&B(p)){if(B(l)&&B(d))return{x:l,y:d,width:v,height:p};if(B(h)&&B(y))return{x:h,y,width:v,height:p}}return B(l)&&B(d)?{x:l,y:d,width:0,height:0}:B(r)&&B(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:c||0,outerRadius:f||u||s||0,clockWise:x}:e.viewBox?e.viewBox:{}},yE=function(e,r){return e?e===!0?j.createElement(Oe,{key:"label-implicit",viewBox:r}):ve(e)?j.createElement(Oe,{key:"label-implicit",viewBox:r,value:e}):T.isValidElement(e)?e.type===Oe?T.cloneElement(e,{key:"label-implicit",viewBox:r}):j.createElement(Oe,{key:"label-implicit",content:e,viewBox:r}):H(e)?j.createElement(Oe,{key:"label-implicit",content:e,viewBox:r}):Ar(e)?j.createElement(Oe,on({viewBox:r},e,{key:"label-implicit"})):null:null},mE=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var a=e.children,i=Rb(e),o=qe(a,Oe).map(function(u,c){return T.cloneElement(u,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=yE(e.label,r||i);return[s].concat(eE(o))};Oe.parseViewBox=Rb;Oe.renderCallByParent=mE;var Ou,qv;function gE(){if(qv)return Ou;qv=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return Ou=t,Ou}var bE=gE();const xE=ie(bE);function sn(t){"@babel/helpers - typeof";return sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(t)}var wE=["valueAccessor"],OE=["data","dataKey","clockWise","id","textBreakAll"];function SE(t){return jE(t)||_E(t)||PE(t)||AE()}function AE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
119
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PE(t,e){if(t){if(typeof t=="string")return kc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kc(t,e)}}function _E(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jE(t){if(Array.isArray(t))return kc(t)}function kc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sa(){return sa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sa.apply(this,arguments)}function Lv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Bv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lv(Object(r),!0).forEach(function(n){EE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EE(t,e,r){return e=TE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TE(t){var e=CE(t,"string");return sn(e)=="symbol"?e:e+""}function CE(t,e){if(sn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(sn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fv(t,e){if(t==null)return{};var r=kE(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kE(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var IE=function(e){return Array.isArray(e.value)?xE(e.value):e.value};function xt(t){var e=t.valueAccessor,r=e===void 0?IE:e,n=Fv(t,wE),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,u=n.textBreakAll,c=Fv(n,OE);return!a||!a.length?null:j.createElement(ce,{className:"recharts-label-list"},a.map(function(f,l){var d=X(i)?r(f,l):$e(f&&f.payload,i),h=X(s)?{}:{id:"".concat(s,"-").concat(l)};return j.createElement(Oe,sa({},Z(f,!0),c,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:Oe.parseViewBox(X(o)?f:Bv(Bv({},f),{},{clockWise:o})),key:"label-".concat(l),index:l}))}))}xt.displayName="LabelList";function ME(t,e){return t?t===!0?j.createElement(xt,{key:"labelList-implicit",data:e}):j.isValidElement(t)||H(t)?j.createElement(xt,{key:"labelList-implicit",data:e,content:t}):Ar(t)?j.createElement(xt,sa({data:e},t,{key:"labelList-implicit"})):null:null}function $E(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,a=qe(n,xt).map(function(o,s){return T.cloneElement(o,{data:e,key:"labelList-".concat(s)})});if(!r)return a;var i=ME(t.label,e);return[i].concat(SE(a))}xt.renderCallByParent=$E;function un(t){"@babel/helpers - typeof";return un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(t)}function Ic(){return Ic=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ic.apply(this,arguments)}function zv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Wv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zv(Object(r),!0).forEach(function(n){NE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function NE(t,e,r){return e=RE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RE(t){var e=DE(t,"string");return un(e)=="symbol"?e:e+""}function DE(t,e){if(un(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qE=function(e,r){var n=
|
|
119
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PE(t,e){if(t){if(typeof t=="string")return kc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kc(t,e)}}function _E(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jE(t){if(Array.isArray(t))return kc(t)}function kc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sa(){return sa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sa.apply(this,arguments)}function Lv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Bv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lv(Object(r),!0).forEach(function(n){EE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EE(t,e,r){return e=TE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TE(t){var e=CE(t,"string");return sn(e)=="symbol"?e:e+""}function CE(t,e){if(sn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(sn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fv(t,e){if(t==null)return{};var r=kE(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kE(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var IE=function(e){return Array.isArray(e.value)?xE(e.value):e.value};function xt(t){var e=t.valueAccessor,r=e===void 0?IE:e,n=Fv(t,wE),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,u=n.textBreakAll,c=Fv(n,OE);return!a||!a.length?null:j.createElement(ce,{className:"recharts-label-list"},a.map(function(f,l){var d=X(i)?r(f,l):$e(f&&f.payload,i),h=X(s)?{}:{id:"".concat(s,"-").concat(l)};return j.createElement(Oe,sa({},Z(f,!0),c,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:Oe.parseViewBox(X(o)?f:Bv(Bv({},f),{},{clockWise:o})),key:"label-".concat(l),index:l}))}))}xt.displayName="LabelList";function ME(t,e){return t?t===!0?j.createElement(xt,{key:"labelList-implicit",data:e}):j.isValidElement(t)||H(t)?j.createElement(xt,{key:"labelList-implicit",data:e,content:t}):Ar(t)?j.createElement(xt,sa({data:e},t,{key:"labelList-implicit"})):null:null}function $E(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,a=qe(n,xt).map(function(o,s){return T.cloneElement(o,{data:e,key:"labelList-".concat(s)})});if(!r)return a;var i=ME(t.label,e);return[i].concat(SE(a))}xt.renderCallByParent=$E;function un(t){"@babel/helpers - typeof";return un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(t)}function Ic(){return Ic=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ic.apply(this,arguments)}function zv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Wv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zv(Object(r),!0).forEach(function(n){NE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function NE(t,e,r){return e=RE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RE(t){var e=DE(t,"string");return un(e)=="symbol"?e:e+""}function DE(t,e){if(un(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qE=function(e,r){var n=Ge(r-e),a=Math.min(Math.abs(r-e),359.999);return n*a},qn=function(e){var r=e.cx,n=e.cy,a=e.radius,i=e.angle,o=e.sign,s=e.isExternal,u=e.cornerRadius,c=e.cornerIsExternal,f=u*(s?1:-1)+a,l=Math.asin(u/f)/oa,d=c?i:i+o*l,h=be(r,n,f,d),y=be(r,n,a,d),v=c?i-o*l:i,p=be(r,n,f*Math.cos(l*oa),v);return{center:h,circleTangency:y,lineTangency:p,theta:l}},Db=function(e){var r=e.cx,n=e.cy,a=e.innerRadius,i=e.outerRadius,o=e.startAngle,s=e.endAngle,u=qE(o,s),c=o+u,f=be(r,n,i,o),l=be(r,n,i,c),d="M ".concat(f.x,",").concat(f.y,`
|
|
120
120
|
A `).concat(i,",").concat(i,`,0,
|
|
121
121
|
`).concat(+(Math.abs(u)>180),",").concat(+(o>c),`,
|
|
122
122
|
`).concat(l.x,",").concat(l.y,`
|
|
123
123
|
`);if(a>0){var h=be(r,n,a,o),y=be(r,n,a,c);d+="L ".concat(y.x,",").concat(y.y,`
|
|
124
124
|
A `).concat(a,",").concat(a,`,0,
|
|
125
125
|
`).concat(+(Math.abs(u)>180),",").concat(+(o<=c),`,
|
|
126
|
-
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},LE=function(e){var r=e.cx,n=e.cy,a=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,u=e.cornerIsExternal,c=e.startAngle,f=e.endAngle,l=
|
|
126
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},LE=function(e){var r=e.cx,n=e.cy,a=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,u=e.cornerIsExternal,c=e.startAngle,f=e.endAngle,l=Ge(f-c),d=qn({cx:r,cy:n,radius:i,angle:c,sign:l,cornerRadius:o,cornerIsExternal:u}),h=d.circleTangency,y=d.lineTangency,v=d.theta,p=qn({cx:r,cy:n,radius:i,angle:f,sign:-l,cornerRadius:o,cornerIsExternal:u}),x=p.circleTangency,b=p.lineTangency,w=p.theta,S=u?Math.abs(c-f):Math.abs(c-f)-v-w;if(S<0)return s?"M ".concat(y.x,",").concat(y.y,`
|
|
127
127
|
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
128
128
|
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
129
129
|
`):Db({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:f});var g="M ".concat(y.x,",").concat(y.y,`
|
|
@@ -133,13 +133,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
133
133
|
`);if(a>0){var O=qn({cx:r,cy:n,radius:a,angle:c,sign:l,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),A=O.circleTangency,_=O.lineTangency,P=O.theta,k=qn({cx:r,cy:n,radius:a,angle:f,sign:-l,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),E=k.circleTangency,C=k.lineTangency,I=k.theta,N=u?Math.abs(c-f):Math.abs(c-f)-P-I;if(N<0&&o===0)return"".concat(g,"L").concat(r,",").concat(n,"Z");g+="L".concat(C.x,",").concat(C.y,`
|
|
134
134
|
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(E.x,",").concat(E.y,`
|
|
135
135
|
A`).concat(a,",").concat(a,",0,").concat(+(N>180),",").concat(+(l>0),",").concat(A.x,",").concat(A.y,`
|
|
136
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(_.x,",").concat(_.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},BE={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},qb=function(e){var r=Wv(Wv({},BE),e),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,u=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,l=r.endAngle,d=r.className;if(o<i||f===l)return null;var h=J("recharts-sector",d),y=o-i,v=qt(s,y,0,!0),p;return v>0&&Math.abs(f-l)<360?p=LE({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:u,cornerIsExternal:c,startAngle:f,endAngle:l}):p=Db({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:f,endAngle:l}),j.createElement("path",Ic({},Z(r,!0),{className:h,d:p,role:"img"}))};function cn(t){"@babel/helpers - typeof";return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(t)}function Mc(){return Mc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mc.apply(this,arguments)}function Uv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function
|
|
136
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(_.x,",").concat(_.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},BE={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},qb=function(e){var r=Wv(Wv({},BE),e),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,u=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,l=r.endAngle,d=r.className;if(o<i||f===l)return null;var h=J("recharts-sector",d),y=o-i,v=qt(s,y,0,!0),p;return v>0&&Math.abs(f-l)<360?p=LE({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:u,cornerIsExternal:c,startAngle:f,endAngle:l}):p=Db({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:f,endAngle:l}),j.createElement("path",Ic({},Z(r,!0),{className:h,d:p,role:"img"}))};function cn(t){"@babel/helpers - typeof";return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(t)}function Mc(){return Mc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mc.apply(this,arguments)}function Uv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Gv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uv(Object(r),!0).forEach(function(n){FE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function FE(t,e,r){return e=zE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zE(t){var e=WE(t,"string");return cn(e)=="symbol"?e:e+""}function WE(t,e){if(cn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(cn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Kv={curveBasisClosed:z0,curveBasisOpen:F0,curveBasis:B0,curveBumpX:L0,curveBumpY:q0,curveLinearClosed:D0,curveLinear:yl,curveMonotoneX:R0,curveMonotoneY:N0,curveNatural:$0,curveStep:M0,curveStepAfter:I0,curveStepBefore:k0},Ln=function(e){return e.x===+e.x&&e.y===+e.y},Ir=function(e){return e.x},Mr=function(e){return e.y},UE=function(e,r){if(H(e))return e;var n="curve".concat(Da(e));return(n==="curveMonotone"||n==="curveBump")&&r?Kv["".concat(n).concat(r==="vertical"?"Y":"X")]:Kv[n]||yl},GE=function(e){var r=e.type,n=r===void 0?"linear":r,a=e.points,i=a===void 0?[]:a,o=e.baseLine,s=e.layout,u=e.connectNulls,c=u===void 0?!1:u,f=UE(n,s),l=c?i.filter(function(v){return Ln(v)}):i,d;if(Array.isArray(o)){var h=c?o.filter(function(v){return Ln(v)}):o,y=l.map(function(v,p){return Gv(Gv({},v),{},{base:h[p]})});return s==="vertical"?d=Mn().y(Mr).x1(Ir).x0(function(v){return v.base.x}):d=Mn().x(Ir).y1(Mr).y0(function(v){return v.base.y}),d.defined(Ln).curve(f),d(y)}return s==="vertical"&&B(o)?d=Mn().y(Mr).x1(Ir).x0(o):B(o)?d=Mn().x(Ir).y1(Mr).y0(o):d=rg().x(Ir).y(Mr),d.defined(Ln).curve(f),d(l)},$c=function(e){var r=e.className,n=e.points,a=e.path,i=e.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?GE(e):a;return j.createElement("path",Mc({},Z(e,!1),Vn(e),{className:J("recharts-curve",r),d:o,ref:i}))},KE=Object.getOwnPropertyNames,HE=Object.getOwnPropertySymbols,VE=Object.prototype.hasOwnProperty;function Hv(t,e){return function(n,a,i){return t(n,a,i)&&e(n,a,i)}}function Bn(t){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var u=t(r,n,a);return i.delete(r),i.delete(n),u}}function Vv(t){return KE(t).concat(HE(t))}var XE=Object.hasOwn||function(t,e){return VE.call(t,e)};function Ut(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var YE="__v",ZE="__o",JE="_owner",Xv=Object.getOwnPropertyDescriptor,Yv=Object.keys;function QE(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function eT(t,e){return Ut(t.getTime(),e.getTime())}function tT(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function rT(t,e){return t===e}function Zv(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var a=new Array(n),i=t.entries(),o,s,u=0;(o=i.next())&&!o.done;){for(var c=e.entries(),f=!1,l=0;(s=c.next())&&!s.done;){if(a[l]){l++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],u,l,t,e,r)&&r.equals(d[1],h[1],d[0],h[0],t,e,r)){f=a[l]=!0;break}l++}if(!f)return!1;u++}return!0}var nT=Ut;function aT(t,e,r){var n=Yv(t),a=n.length;if(Yv(e).length!==a)return!1;for(;a-- >0;)if(!Lb(t,e,r,n[a]))return!1;return!0}function $r(t,e,r){var n=Vv(t),a=n.length;if(Vv(e).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!Lb(t,e,r,i)||(o=Xv(t,i),s=Xv(e,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function iT(t,e){return Ut(t.valueOf(),e.valueOf())}function oT(t,e){return t.source===e.source&&t.flags===e.flags}function Jv(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var a=new Array(n),i=t.values(),o,s;(o=i.next())&&!o.done;){for(var u=e.values(),c=!1,f=0;(s=u.next())&&!s.done;){if(!a[f]&&r.equals(o.value,s.value,o.value,s.value,t,e,r)){c=a[f]=!0;break}f++}if(!c)return!1}return!0}function sT(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function uT(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function Lb(t,e,r,n){return(n===JE||n===ZE||n===YE)&&(t.$$typeof||e.$$typeof)?!0:XE(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var cT="[object Arguments]",lT="[object Boolean]",fT="[object Date]",dT="[object Error]",pT="[object Map]",hT="[object Number]",vT="[object Object]",yT="[object RegExp]",mT="[object Set]",gT="[object String]",bT="[object URL]",xT=Array.isArray,Qv=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,ey=Object.assign,wT=Object.prototype.toString.call.bind(Object.prototype.toString);function OT(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,a=t.areFunctionsEqual,i=t.areMapsEqual,o=t.areNumbersEqual,s=t.areObjectsEqual,u=t.arePrimitiveWrappersEqual,c=t.areRegExpsEqual,f=t.areSetsEqual,l=t.areTypedArraysEqual,d=t.areUrlsEqual;return function(y,v,p){if(y===v)return!0;if(y==null||v==null)return!1;var x=typeof y;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?o(y,v,p):x==="function"?a(y,v,p):!1;var b=y.constructor;if(b!==v.constructor)return!1;if(b===Object)return s(y,v,p);if(xT(y))return e(y,v,p);if(Qv!=null&&Qv(y))return l(y,v,p);if(b===Date)return r(y,v,p);if(b===RegExp)return c(y,v,p);if(b===Map)return i(y,v,p);if(b===Set)return f(y,v,p);var w=wT(y);return w===fT?r(y,v,p):w===yT?c(y,v,p):w===pT?i(y,v,p):w===mT?f(y,v,p):w===vT?typeof y.then!="function"&&typeof v.then!="function"&&s(y,v,p):w===bT?d(y,v,p):w===dT?n(y,v,p):w===cT?s(y,v,p):w===lT||w===hT||w===gT?u(y,v,p):!1}}function ST(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,a={areArraysEqual:n?$r:QE,areDatesEqual:eT,areErrorsEqual:tT,areFunctionsEqual:rT,areMapsEqual:n?Hv(Zv,$r):Zv,areNumbersEqual:nT,areObjectsEqual:n?$r:aT,arePrimitiveWrappersEqual:iT,areRegExpsEqual:oT,areSetsEqual:n?Hv(Jv,$r):Jv,areTypedArraysEqual:n?$r:sT,areUrlsEqual:uT};if(r&&(a=ey({},a,r(a))),e){var i=Bn(a.areArraysEqual),o=Bn(a.areMapsEqual),s=Bn(a.areObjectsEqual),u=Bn(a.areSetsEqual);a=ey({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:u})}return a}function AT(t){return function(e,r,n,a,i,o,s){return t(e,r,s)}}function PT(t){var e=t.circular,r=t.comparator,n=t.createState,a=t.equals,i=t.strict;if(n)return function(u,c){var f=n(),l=f.cache,d=l===void 0?e?new WeakMap:void 0:l,h=f.meta;return r(u,c,{cache:d,equals:a,meta:h,strict:i})};if(e)return function(u,c){return r(u,c,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(u,c){return r(u,c,o)}}var _T=Pt();Pt({strict:!0});Pt({circular:!0});Pt({circular:!0,strict:!0});Pt({createInternalComparator:function(){return Ut}});Pt({strict:!0,createInternalComparator:function(){return Ut}});Pt({circular:!0,createInternalComparator:function(){return Ut}});Pt({circular:!0,createInternalComparator:function(){return Ut},strict:!0});function Pt(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,n=t.createInternalComparator,a=t.createState,i=t.strict,o=i===void 0?!1:i,s=ST(t),u=OT(s),c=n?n(u):AT(u);return PT({circular:r,comparator:u,createState:a,equals:c,strict:o})}function jT(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function ty(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>e?(t(i),r=-1):jT(a)};requestAnimationFrame(n)}function Nc(t){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nc(t)}function ET(t){return IT(t)||kT(t)||CT(t)||TT()}function TT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
137
137
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CT(t,e){if(t){if(typeof t=="string")return ry(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ry(t,e)}}function ry(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function IT(t){if(Array.isArray(t))return t}function MT(){var t={},e=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=ET(o),u=s[0],c=s.slice(1);if(typeof u=="number"){ty(a.bind(null,c),u);return}a(u),ty(a.bind(null,c));return}Nc(i)==="object"&&(t=i,e(t)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return e=i,function(){e=function(){return null}}}}}function ln(t){"@babel/helpers - typeof";return ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(t)}function ny(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ay(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ny(Object(r),!0).forEach(function(n){Bb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Bb(t,e,r){return e=$T(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $T(t){var e=NT(t,"string");return ln(e)==="symbol"?e:String(e)}function NT(t,e){if(ln(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ln(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var RT=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},DT=function(e){return e},qT=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Ur=function(e,r){return Object.keys(r).reduce(function(n,a){return ay(ay({},n),{},Bb({},a,e(a,r[a])))},{})},iy=function(e,r,n){return e.map(function(a){return"".concat(qT(a)," ").concat(r,"ms ").concat(n)}).join(",")};function LT(t,e){return zT(t)||FT(t,e)||Fb(t,e)||BT()}function BT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
138
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FT(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function zT(t){if(Array.isArray(t))return t}function WT(t){return
|
|
139
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fb(t,e){if(t){if(typeof t=="string")return Rc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rc(t,e)}}function
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FT(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function zT(t){if(Array.isArray(t))return t}function WT(t){return KT(t)||GT(t)||Fb(t)||UT()}function UT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fb(t,e){if(t){if(typeof t=="string")return Rc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rc(t,e)}}function GT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function KT(t){if(Array.isArray(t))return Rc(t)}function Rc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ua=1e-4,zb=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},Wb=function(e,r){return e.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},oy=function(e,r){return function(n){var a=zb(e,r);return Wb(a,n)}},HT=function(e,r){return function(n){var a=zb(e,r),i=[].concat(WT(a.map(function(o,s){return o*s}).slice(1)),[0]);return Wb(i,n)}},sy=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var u=r[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var c=u[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=LT(c,4);a=f[0],i=f[1],o=f[2],s=f[3]}}}var l=oy(a,o),d=oy(i,s),h=HT(a,o),y=function(x){return x>1?1:x<0?0:x},v=function(x){for(var b=x>1?1:x,w=b,S=0;S<8;++S){var g=l(w)-b,O=h(w);if(Math.abs(g-b)<ua||O<ua)return d(w);w=y(w-g/O)}return d(w)};return v.isStepper=!1,v},VT=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.stiff,n=r===void 0?100:r,a=e.damping,i=a===void 0?8:a,o=e.dt,s=o===void 0?17:o,u=function(f,l,d){var h=-(f-l)*n,y=d*i,v=d+(h-y)*s/1e3,p=d*s/1e3+f;return Math.abs(p-l)<ua&&Math.abs(v)<ua?[l,0]:[p,v]};return u.isStepper=!0,u.dt=s,u},XT=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return sy(a);case"spring":return VT();default:if(a.split("(")[0]==="cubic-bezier")return sy(a)}return typeof a=="function"?a:null};function fn(t){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fn(t)}function uy(t){return JT(t)||ZT(t)||Ub(t)||YT()}function YT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
140
140
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JT(t){if(Array.isArray(t))return qc(t)}function cy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ge(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cy(Object(r),!0).forEach(function(n){Dc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Dc(t,e,r){return e=QT(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QT(t){var e=eC(t,"string");return fn(e)==="symbol"?e:String(e)}function eC(t,e){if(fn(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tC(t,e){return aC(t)||nC(t,e)||Ub(t,e)||rC()}function rC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
141
141
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ub(t,e){if(t){if(typeof t=="string")return qc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qc(t,e)}}function qc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nC(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function aC(t){if(Array.isArray(t))return t}var ca=function(e,r,n){return e+(r-e)*n},Lc=function(e){var r=e.from,n=e.to;return r!==n},iC=function t(e,r,n){var a=Ur(function(i,o){if(Lc(o)){var s=e(o.from,o.to,o.velocity),u=tC(s,2),c=u[0],f=u[1];return ge(ge({},o),{},{from:c,velocity:f})}return o},r);return n<1?Ur(function(i,o){return Lc(o)?ge(ge({},o),{},{velocity:ca(o.velocity,a[i].velocity,n),from:ca(o.from,a[i].from,n)}):o},r):t(e,a,n-1)};const oC=function(t,e,r,n,a){var i=RT(t,e),o=i.reduce(function(p,x){return ge(ge({},p),{},Dc({},x,[t[x],e[x]]))},{}),s=i.reduce(function(p,x){return ge(ge({},p),{},Dc({},x,{from:t[x],velocity:0,to:e[x]}))},{}),u=-1,c,f,l=function(){return null},d=function(){return Ur(function(x,b){return b.from},s)},h=function(){return!Object.values(s).filter(Lc).length},y=function(x){c||(c=x);var b=x-c,w=b/r.dt;s=iC(r,s,w),a(ge(ge(ge({},t),e),d())),c=x,h()||(u=requestAnimationFrame(l))},v=function(x){f||(f=x);var b=(x-f)/n,w=Ur(function(g,O){return ca.apply(void 0,uy(O).concat([r(b)]))},o);if(a(ge(ge(ge({},t),e),w)),b<1)u=requestAnimationFrame(l);else{var S=Ur(function(g,O){return ca.apply(void 0,uy(O).concat([r(1)]))},o);a(ge(ge(ge({},t),e),S))}};return l=r.isStepper?y:v,function(){return requestAnimationFrame(l),function(){cancelAnimationFrame(u)}}};function lr(t){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lr(t)}var sC=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function uC(t,e){if(t==null)return{};var r=cC(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function cC(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Su(t){return pC(t)||dC(t)||fC(t)||lC()}function lC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
142
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fC(t,e){if(t){if(typeof t=="string")return Bc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bc(t,e)}}function dC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function pC(t){if(Array.isArray(t))return Bc(t)}function Bc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ly(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Fe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ly(Object(r),!0).forEach(function(n){qr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ly(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qr(t,e,r){return e=
|
|
142
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fC(t,e){if(t){if(typeof t=="string")return Bc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bc(t,e)}}function dC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function pC(t){if(Array.isArray(t))return Bc(t)}function Bc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ly(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Fe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ly(Object(r),!0).forEach(function(n){qr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ly(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qr(t,e,r){return e=Gb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gb(n.key),n)}}function yC(t,e,r){return e&&vC(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gb(t){var e=mC(t,"string");return lr(e)==="symbol"?e:String(e)}function mC(t,e){if(lr(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(lr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fc(t,e)}function Fc(t,e){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fc(t,e)}function bC(t){var e=xC();return function(){var n=la(t),a;if(e){var i=la(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return zc(this,a)}}function zc(t,e){if(e&&(lr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wc(t)}function Wc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xC(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function la(t){return la=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},la(t)}var ct=function(t){gC(r,t);var e=bC(r);function r(n,a){var i;hC(this,r),i=e.call(this,n,a);var o=i.props,s=o.isActive,u=o.attributeName,c=o.from,f=o.to,l=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Wc(i)),i.changeStyle=i.changeStyle.bind(Wc(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:f}),zc(i);if(l&&l.length)i.state={style:l[0].style};else if(c){if(typeof d=="function")return i.state={style:c},zc(i);i.state={style:u?qr({},u,c):c}}else i.state={style:{}};return i}return yC(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,u=i.attributeName,c=i.shouldReAnimate,f=i.to,l=i.from,d=this.state.style;if(s){if(!o){var h={style:u?qr({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(h);return}if(!(_T(a.to,f)&&a.canBegin&&a.isActive)){var y=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||c?l:a.to;if(this.state&&d){var p={style:u?qr({},u,v):v};(u&&d[u]!==v||!u&&d!==v)&&this.setState(p)}this.runAnimation(Fe(Fe({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,u=a.duration,c=a.easing,f=a.begin,l=a.onAnimationEnd,d=a.onAnimationStart,h=oC(o,s,XT(c),u,this.changeStyle),y=function(){i.stopJSAnimation=h()};this.manager.start([d,f,y,u,l])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,u=a.onAnimationStart,c=o[0],f=c.style,l=c.duration,d=l===void 0?0:l,h=function(v,p,x){if(x===0)return v;var b=p.duration,w=p.easing,S=w===void 0?"ease":w,g=p.style,O=p.properties,A=p.onAnimationEnd,_=x>0?o[x-1]:p,P=O||Object.keys(g);if(typeof S=="function"||S==="spring")return[].concat(Su(v),[i.runJSAnimation.bind(i,{from:_.style,to:g,duration:b,easing:S}),b]);var k=iy(P,b,S),E=Fe(Fe(Fe({},_.style),g),{},{transition:k});return[].concat(Su(v),[E,b,A]).filter(DT)};return this.manager.start([u].concat(Su(o.reduce(h,[f,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=MT());var i=a.begin,o=a.duration,s=a.attributeName,u=a.to,c=a.easing,f=a.onAnimationStart,l=a.onAnimationEnd,d=a.steps,h=a.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var v=s?qr({},s,u):u,p=iy(Object.keys(v),o,c);y.start([f,i,Fe(Fe({},v),{},{transition:p}),o,l])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var u=uC(a,sC),c=T.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!s||c===0||o<=0)return i;var l=function(h){var y=h.props,v=y.style,p=v===void 0?{}:v,x=y.className,b=T.cloneElement(h,Fe(Fe({},u),{},{style:Fe(Fe({},p),f),className:x}));return b};return c===1?l(T.Children.only(i)):j.createElement("div",null,T.Children.map(i,function(d){return l(d)}))}}]),r}(T.PureComponent);ct.displayName="Animate";ct.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ct.propTypes={from:Q.oneOfType([Q.object,Q.string]),to:Q.oneOfType([Q.object,Q.string]),attributeName:Q.string,duration:Q.number,begin:Q.number,easing:Q.oneOfType([Q.string,Q.func]),steps:Q.arrayOf(Q.shape({duration:Q.number.isRequired,style:Q.object.isRequired,easing:Q.oneOfType([Q.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Q.func]),properties:Q.arrayOf("string"),onAnimationEnd:Q.func})),children:Q.oneOfType([Q.node,Q.func]),isActive:Q.bool,canBegin:Q.bool,onAnimationEnd:Q.func,shouldReAnimate:Q.bool,onAnimationStart:Q.func,onAnimationReStart:Q.func};function dn(t){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(t)}function fa(){return fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fa.apply(this,arguments)}function wC(t,e){return PC(t)||AC(t,e)||SC(t,e)||OC()}function OC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
143
143
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SC(t,e){if(t){if(typeof t=="string")return fy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fy(t,e)}}function fy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function AC(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function PC(t){if(Array.isArray(t))return t}function dy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function py(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dy(Object(r),!0).forEach(function(n){_C(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _C(t,e,r){return e=jC(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jC(t){var e=EC(t,"string");return dn(e)=="symbol"?e:e+""}function EC(t,e){if(dn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var hy=function(e,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,u=n>=0?1:-1,c=a>=0&&n>=0||a<0&&n<0?1:0,f;if(o>0&&i instanceof Array){for(var l=[0,0,0,0],d=0,h=4;d<h;d++)l[d]=i[d]>o?o:i[d];f="M".concat(e,",").concat(r+s*l[0]),l[0]>0&&(f+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(c,",").concat(e+u*l[0],",").concat(r)),f+="L ".concat(e+n-u*l[1],",").concat(r),l[1]>0&&(f+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(c,`,
|
|
144
144
|
`).concat(e+n,",").concat(r+s*l[1])),f+="L ".concat(e+n,",").concat(r+a-s*l[2]),l[2]>0&&(f+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(c,`,
|
|
145
145
|
`).concat(e+n-u*l[2],",").concat(r+a)),f+="L ".concat(e+u*l[3],",").concat(r+a),l[3]>0&&(f+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(c,`,
|
|
@@ -150,16 +150,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
150
150
|
L `).concat(e+n,",").concat(r+a-s*y,`
|
|
151
151
|
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e+n-u*y,",").concat(r+a,`
|
|
152
152
|
L `).concat(e+u*y,",").concat(r+a,`
|
|
153
|
-
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e,",").concat(r+a-s*y," Z")}else f="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},TC=function(e,r){if(!e||!r)return!1;var n=e.x,a=e.y,i=r.x,o=r.y,s=r.width,u=r.height;if(Math.abs(s)>0&&Math.abs(u)>0){var c=Math.min(i,i+s),f=Math.max(i,i+s),l=Math.min(o,o+u),d=Math.max(o,o+u);return n>=c&&n<=f&&a>=l&&a<=d}return!1},CC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Xl=function(e){var r=py(py({},CC),e),n=T.useRef(),a=T.useState(-1),i=wC(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var u=r.x,c=r.y,f=r.width,l=r.height,d=r.radius,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,x=r.isAnimationActive,b=r.isUpdateAnimationActive;if(u!==+u||c!==+c||f!==+f||l!==+l||f===0||l===0)return null;var w=J("recharts-rectangle",h);return b?j.createElement(ct,{canBegin:o>0,from:{width:f,height:l,x:u,y:c},to:{width:f,height:l,x:u,y:c},duration:v,animationEasing:y,isActive:b},function(S){var g=S.width,O=S.height,A=S.x,_=S.y;return j.createElement(ct,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:x,easing:y},j.createElement("path",fa({},Z(r,!0),{className:w,d:hy(A,_,g,O,d),ref:n})))}):j.createElement("path",fa({},Z(r,!0),{className:w,d:hy(u,c,f,l,d)}))};function Uc(){return Uc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Uc.apply(this,arguments)}var Yl=function(e){var r=e.cx,n=e.cy,a=e.r,i=e.className,o=J("recharts-dot",i);return r===+r&&n===+n&&a===+a?j.createElement("circle",Uc({},Z(e,!1),Vn(e),{className:o,cx:r,cy:n,r:a})):null};function pn(t){"@babel/helpers - typeof";return pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pn(t)}var kC=["x","y","top","left","width","height","className"];function
|
|
154
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XC(t,e){if(t){if(typeof t=="string")return by(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return by(t,e)}}function by(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function YC(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function ZC(t){if(Array.isArray(t))return t}function xy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xy(Object(r),!0).forEach(function(n){JC(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function JC(t,e,r){return e=QC(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QC(t){var e=ek(t,"string");return hn(e)=="symbol"?e:e+""}function ek(t,e){if(hn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Oy=function(e,r,n,a,i){var o=n-a,s;return s="M ".concat(e,",").concat(r),s+="L ".concat(e+n,",").concat(r),s+="L ".concat(e+n-o/2,",").concat(r+i),s+="L ".concat(e+n-o/2-a,",").concat(r+i),s+="L ".concat(e,",").concat(r," Z"),s},tk={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rk=function(e){var r=wy(wy({},tk),e),n=T.useRef(),a=T.useState(-1),i=HC(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var u=r.x,c=r.y,f=r.upperWidth,l=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,x=r.isUpdateAnimationActive;if(u!==+u||c!==+c||f!==+f||l!==+l||d!==+d||f===0&&l===0||d===0)return null;var b=J("recharts-trapezoid",h);return x?j.createElement(ct,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:c},to:{upperWidth:f,lowerWidth:l,height:d,x:u,y:c},duration:v,animationEasing:y,isActive:x},function(w){var S=w.upperWidth,g=w.lowerWidth,O=w.height,A=w.x,_=w.y;return j.createElement(ct,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},j.createElement("path",da({},Z(r,!0),{className:b,d:Oy(A,_,S,g,O),ref:n})))}):j.createElement("g",null,j.createElement("path",da({},Z(r,!0),{className:b,d:Oy(u,c,f,l,d)})))},nk=["option","shapeType","propTransformer","activeClassName","isActive"];function vn(t){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(t)}function ak(t,e){if(t==null)return{};var r=ik(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ik(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Sy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sy(Object(r),!0).forEach(function(n){ok(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ok(t,e,r){return e=sk(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sk(t){var e=uk(t,"string");return vn(e)=="symbol"?e:e+""}function uk(t,e){if(vn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ck(t,e){return pa(pa({},e),t)}function lk(t,e){return t==="symbols"}function Ay(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return j.createElement(Xl,r);case"trapezoid":return j.createElement(rk,r);case"sector":return j.createElement(qb,r);case"symbols":if(lk(e))return j.createElement(Rl,r);break;default:return null}}function fk(t){return T.isValidElement(t)?t.props:t}function dk(t){var e=t.option,r=t.shapeType,n=t.propTransformer,a=n===void 0?ck:n,i=t.activeClassName,o=i===void 0?"recharts-active-shape":i,s=t.isActive,u=ak(t,nk),c;if(T.isValidElement(e))c=T.cloneElement(e,pa(pa({},u),fk(e)));else if(H(e))c=e(u);else if(WC(e)&&!GC(e)){var f=a(e,u);c=j.createElement(Ay,{shapeType:r,elementProps:f})}else{var l=u;c=j.createElement(Ay,{shapeType:r,elementProps:l})}return s?j.createElement(ce,{className:o},c):c}function Ga(t,e){return e!=null&&"trapezoids"in t.props}function Ha(t,e){return e!=null&&"sectors"in t.props}function yn(t,e){return e!=null&&"points"in t.props}function pk(t,e){var r,n,a=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,i=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return a&&i}function hk(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function vk(t,e){var r=t.x===e.x,n=t.y===e.y,a=t.z===e.z;return r&&n&&a}function yk(t,e){var r;return Ga(t,e)?r=pk:Ha(t,e)?r=hk:yn(t,e)&&(r=vk),r}function mk(t,e){var r;return Ga(t,e)?r="trapezoids":Ha(t,e)?r="sectors":yn(t,e)&&(r="points"),r}function gk(t,e){if(Ga(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Ha(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return yn(t,e)?e.payload:{}}function bk(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,a=mk(r,e),i=gk(r,e),o=n.filter(function(u,c){var f=Wa(i,u),l=r.props[a].filter(function(y){var v=yk(r,e);return v(y,e)}),d=r.props[a].indexOf(l[l.length-1]),h=c===d;return f&&h}),s=n.indexOf(o[o.length-1]);return s}var ju,Py;function xk(){if(Py)return ju;Py=1;var t=Math.ceil,e=Math.max;function r(n,a,i,o){for(var s=-1,u=e(t((a-n)/(i||1)),0),c=Array(u);u--;)c[o?u:++s]=n,n+=i;return c}return ju=r,ju}var Eu,_y;function Gb(){if(_y)return Eu;_y=1;var t=ob(),e=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=t(a),a===e||a===-1/0){var i=a<0?-1:1;return i*r}return a===a?a:0}return Eu=n,Eu}var Tu,jy;function wk(){if(jy)return Tu;jy=1;var t=xk(),e=Ba(),r=Gb();function n(a){return function(i,o,s){return s&&typeof s!="number"&&e(i,o,s)&&(o=s=void 0),i=r(i),o===void 0?(o=i,i=0):o=r(o),s=s===void 0?i<o?1:-1:r(s),t(i,o,s,a)}}return Tu=n,Tu}var Cu,Ey;function Ok(){if(Ey)return Cu;Ey=1;var t=wk(),e=t();return Cu=e,Cu}var Sk=Ok();const ha=ie(Sk);function mn(t){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(t)}function Ty(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Cy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ty(Object(r),!0).forEach(function(n){Hb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hb(t,e,r){return e=Ak(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ak(t){var e=Pk(t,"string");return mn(e)=="symbol"?e:e+""}function Pk(t,e){if(mn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _k=["Webkit","Moz","O","ms"],jk=function(e,r){var n=e.replace(/(\w)/,function(i){return i.toUpperCase()}),a=_k.reduce(function(i,o){return Cy(Cy({},i),{},Hb({},o+n,r))},{});return a[e]=r,a};function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function va(){return va=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},va.apply(this,arguments)}function ky(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ku(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ky(Object(r),!0).forEach(function(n){Ce(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ky(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ek(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Iy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xb(n.key),n)}}function Tk(t,e,r){return e&&Iy(t.prototype,e),r&&Iy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ck(t,e,r){return e=ya(e),kk(t,Vb()?Reflect.construct(e,r||[],ya(t).constructor):e.apply(t,r))}function kk(t,e){if(e&&(fr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ik(t)}function Ik(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vb(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vb=function(){return!!t})()}function ya(t){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ya(t)}function Mk(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gc(t,e)}function Gc(t,e){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gc(t,e)}function Ce(t,e,r){return e=Xb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xb(t){var e=$k(t,"string");return fr(e)=="symbol"?e:e+""}function $k(t,e){if(fr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Nk=function(e){var r=e.data,n=e.startIndex,a=e.endIndex,i=e.x,o=e.width,s=e.travellerWidth;if(!r||!r.length)return{};var u=r.length,c=Fr().domain(ha(0,u)).range([i,i+o-s]),f=c.domain().map(function(l){return c(l)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(a),scale:c,scaleValues:f}},My=function(e){return e.changedTouches&&!!e.changedTouches.length},dr=function(t){function e(r){var n;return Ek(this,e),n=Ck(this,e,[r]),Ce(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),Ce(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),Ce(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o?.({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),Ce(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Ce(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Ce(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Ce(n,"handleSlideDragStart",function(a){var i=My(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Mk(e,t),Tk(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,u=s.gap,c=s.data,f=c.length-1,l=Math.min(a,i),d=Math.max(a,i),h=e.getIndexInRange(o,l),y=e.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:y===f?f:y-y%u}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,u=$e(i[n],s,n);return H(o)?o(u,n):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,u=this.props,c=u.x,f=u.width,l=u.travellerWidth,d=u.startIndex,h=u.endIndex,y=u.onChange,v=n.pageX-i;v>0?v=Math.min(v,c+f-l-s,c+f-l-o):v<0&&(v=Math.max(v,c-o,c-s));var p=this.getIndex({startX:o+v,endX:s+v});(p.startIndex!==d||p.endIndex!==h)&&y&&y(p),this.setState({startX:o+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=My(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,u=a.startX,c=this.state[o],f=this.props,l=f.x,d=f.width,h=f.travellerWidth,y=f.onChange,v=f.gap,p=f.data,x={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,l+d-h-c):b<0&&(b=Math.max(b,l-c)),x[o]=c+b;var w=this.getIndex(x),S=w.startIndex,g=w.endIndex,O=function(){var _=p.length-1;return o==="startX"&&(s>u?S%v===0:g%v===0)||s<u&&g===_||o==="endX"&&(s>u?g%v===0:S%v===0)||s>u&&g===_};this.setState(Ce(Ce({},o,c+b),"brushMoveStartX",n.pageX),function(){y&&O()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,u=o.startX,c=o.endX,f=this.state[a],l=s.indexOf(f);if(l!==-1){var d=l+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=c||a==="endX"&&h<=u||this.setState(Ce({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,u=n.fill,c=n.stroke;return j.createElement("rect",{stroke:c,fill:u,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,u=n.data,c=n.children,f=n.padding,l=T.Children.only(c);return l?j.cloneElement(l,{x:a,y:i,width:o,height:s,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,u=this.props,c=u.y,f=u.travellerWidth,l=u.height,d=u.traveller,h=u.ariaLabel,y=u.data,v=u.startIndex,p=u.endIndex,x=Math.max(n,this.props.x),b=ku(ku({},Z(this.props,!1)),{},{x,y:c,width:f,height:l}),w=h||"Min value: ".concat((i=y[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return j.createElement(ce,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(g){["ArrowLeft","ArrowRight"].includes(g.key)&&(g.preventDefault(),g.stopPropagation(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,u=i.stroke,c=i.travellerWidth,f=Math.min(n,a)+c,l=Math.max(Math.abs(a-n)-c,0);return j.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:l,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,u=n.travellerWidth,c=n.stroke,f=this.state,l=f.startX,d=f.endX,h=5,y={pointerEvents:"none",fill:c};return j.createElement(ce,{className:"recharts-brush-texts"},j.createElement(ta,va({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,d)-h,y:o+s/2},y),this.getTextOfTick(a)),j.createElement(ta,va({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,d)+u+h,y:o+s/2},y),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,u=n.y,c=n.width,f=n.height,l=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,x=d.isTravellerMoving,b=d.isTravellerFocused;if(!a||!a.length||!B(s)||!B(u)||!B(c)||!B(f)||c<=0||f<=0)return null;var w=J("recharts-brush",i),S=j.Children.count(o)===1,g=jk("userSelect","none");return j.createElement(ce,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||x||b||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,u=n.stroke,c=Math.floor(i+s/2)-1;return j.createElement(j.Fragment,null,j.createElement("rect",{x:a,y:i,width:o,height:s,fill:u,stroke:"none"}),j.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),j.createElement("line",{x1:a+1,y1:c+2,x2:a+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return j.isValidElement(n)?i=j.cloneElement(n,a):H(n)?i=n(a):i=e.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,u=n.travellerWidth,c=n.updateId,f=n.startIndex,l=n.endIndex;if(i!==a.prevData||c!==a.prevUpdateId)return ku({prevData:i,prevTravellerWidth:u,prevUpdateId:c,prevX:s,prevWidth:o},i&&i.length?Nk({data:i,width:o,x:s,travellerWidth:u,startIndex:f,endIndex:l}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([s,s+o-u]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:u,prevUpdateId:c,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var u=Math.floor((o+s)/2);n[u]>a?s=u:o=u}return a>=n[s]?s:o}}])}(T.PureComponent);Ce(dr,"displayName","Brush");Ce(dr,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Iu,$y;function Rk(){if($y)return Iu;$y=1;var t=Wl();function e(r,n){var a;return t(r,function(i,o,s){return a=n(i,o,s),!a}),!!a}return Iu=e,Iu}var Mu,Ny;function Dk(){if(Ny)return Mu;Ny=1;var t=Dg(),e=At(),r=Rk(),n=je(),a=Ba();function i(o,s,u){var c=n(o)?t:r;return u&&a(o,s,u)&&(s=void 0),c(o,e(s,3))}return Mu=i,Mu}var qk=Dk();const Lk=ie(qk);var Je=function(e,r){var n=e.alwaysShow,a=e.ifOverflow;return n&&(a="extendDomain"),a===r},$u,Ry;function Bk(){if(Ry)return $u;Ry=1;var t=tb();function e(r,n,a){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return $u=e,$u}var Nu,Dy;function Fk(){if(Dy)return Nu;Dy=1;var t=Bk(),e=Qg(),r=At();function n(a,i){var o={};return i=r(i,3),e(a,function(s,u,c){t(o,u,i(s,u,c))}),o}return Nu=n,Nu}var zk=Fk();const Wk=ie(zk);var Ru,qy;function Uk(){if(qy)return Ru;qy=1;function t(e,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(!r(e[n],n,e))return!1;return!0}return Ru=t,Ru}var Du,Ly;function Kk(){if(Ly)return Du;Ly=1;var t=Wl();function e(r,n){var a=!0;return t(r,function(i,o,s){return a=!!n(i,o,s),a}),a}return Du=e,Du}var qu,By;function Gk(){if(By)return qu;By=1;var t=Uk(),e=Kk(),r=At(),n=je(),a=Ba();function i(o,s,u){var c=n(o)?t:e;return u&&a(o,s,u)&&(s=void 0),c(o,r(s,3))}return qu=i,qu}var Hk=Gk();const Yb=ie(Hk);var Vk=["x","y"];function gn(t){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(t)}function Hc(){return Hc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hc.apply(this,arguments)}function Fy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fy(Object(r),!0).forEach(function(n){Xk(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xk(t,e,r){return e=Yk(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yk(t){var e=Zk(t,"string");return gn(e)=="symbol"?e:e+""}function Zk(t,e){if(gn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jk(t,e){if(t==null)return{};var r=Qk(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Qk(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function eI(t,e){var r=t.x,n=t.y,a=Jk(t,Vk),i="".concat(r),o=parseInt(i,10),s="".concat(n),u=parseInt(s,10),c="".concat(e.height||a.height),f=parseInt(c,10),l="".concat(e.width||a.width),d=parseInt(l,10);return Nr(Nr(Nr(Nr(Nr({},e),a),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:e.name,radius:e.radius})}function zy(t){return j.createElement(dk,Hc({shapeType:"rectangle",propTransformer:eI,activeClassName:"recharts-active-bar"},t))}var tI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof e=="number")return e;var i=typeof n=="number";return i?e(n,a):(i||Bt(),r)}},rI=["value","background"],Zb;function pr(t){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(t)}function nI(t,e){if(t==null)return{};var r=aI(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function aI(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ma(){return ma=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ma.apply(this,arguments)}function Wy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function fe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wy(Object(r),!0).forEach(function(n){gt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qb(n.key),n)}}function oI(t,e,r){return e&&Uy(t.prototype,e),r&&Uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function sI(t,e,r){return e=ga(e),uI(t,Jb()?Reflect.construct(e,r||[],ga(t).constructor):e.apply(t,r))}function uI(t,e){if(e&&(pr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cI(t)}function cI(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jb(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jb=function(){return!!t})()}function ga(t){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(t)}function lI(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vc(t,e)}function Vc(t,e){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vc(t,e)}function gt(t,e,r){return e=Qb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qb(t){var e=fI(t,"string");return pr(e)=="symbol"?e:e+""}function fI(t,e){if(pr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Tn=function(t){function e(){var r;iI(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=sI(this,e,[].concat(a)),gt(r,"state",{isAnimationFinished:!1}),gt(r,"id",_n("recharts-bar-")),gt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),gt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return lI(e,t),oI(e,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,u=i.activeIndex,c=i.activeBar,f=Z(this.props,!1);return n&&n.map(function(l,d){var h=d===u,y=h?c:o,v=fe(fe(fe({},f),l),{},{isActive:h,option:y,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return j.createElement(ce,ma({className:"recharts-bar-rectangle"},Xn(a.props,l,d),{key:"rectangle-".concat(l?.x,"-").concat(l?.y,"-").concat(l?.value,"-").concat(d)}),j.createElement(zy,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,u=a.animationBegin,c=a.animationDuration,f=a.animationEasing,l=a.animationId,d=this.state.prevData;return j.createElement(ct,{begin:u,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,v=i.map(function(p,x){var b=d&&d[x];if(b){var w=Ue(b.x,p.x),S=Ue(b.y,p.y),g=Ue(b.width,p.width),O=Ue(b.height,p.height);return fe(fe({},p),{},{x:w(y),y:S(y),width:g(y),height:O(y)})}if(o==="horizontal"){var A=Ue(0,p.height),_=A(y);return fe(fe({},p),{},{y:p.y+p.height-_,height:_})}var P=Ue(0,p.width),k=P(y);return fe(fe({},p),{},{width:k})});return j.createElement(ce,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Wa(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,u=Z(this.props.background,!1);return i.map(function(c,f){c.value;var l=c.background,d=nI(c,rI);if(!l)return null;var h=fe(fe(fe(fe(fe({},d),{},{fill:"#eee"},l),u),Xn(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return j.createElement(zy,ma({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,u=i.yAxis,c=i.layout,f=i.children,l=qe(f,En);if(!l)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(p,x){var b=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:b,errorVal:$e(p,x)}},y={clipPath:n?"url(#clipPath-".concat(a,")"):null};return j.createElement(ce,y,l.map(function(v){return j.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:u,layout:c,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,u=n.yAxis,c=n.left,f=n.top,l=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,x=J("recharts-bar",o),b=s&&s.allowDataOverflow,w=u&&u.allowDataOverflow,S=b||w,g=X(v)?this.id:v;return j.createElement(ce,{className:x},b||w?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(g)},j.createElement("rect",{x:b?c:c-l/2,y:w?f:f-d/2,width:b?l:l*2,height:w?d:d*2}))):null,j.createElement(ce,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(g,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,g),(!h||p)&&xt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(T.PureComponent);Zb=Tn;gt(Tn,"displayName","Bar");gt(Tn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!_r.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});gt(Tn,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,a=t.bandSize,i=t.xAxis,o=t.yAxis,s=t.xAxisTicks,u=t.yAxisTicks,c=t.stackedData,f=t.dataStartIndex,l=t.displayedData,d=t.offset,h=$j(n,r);if(!h)return null;var y=e.layout,v=r.type.defaultProps,p=v!==void 0?fe(fe({},v),r.props):r.props,x=p.dataKey,b=p.children,w=p.minPointSize,S=y==="horizontal"?o:i,g=c?S.scale.domain():null,O=zj({numericAxis:S}),A=qe(b,ub),_=l.map(function(P,k){var E,C,I,N,M,R;c?E=Nj(c[f+k],g):(E=$e(P,x),Array.isArray(E)||(E=[O,E]));var D=tI(w,Zb.defaultProps.minPointSize)(E[1],k);if(y==="horizontal"){var F,z=[o.scale(E[0]),o.scale(E[1])],q=z[0],U=z[1];C=Cv({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:P,index:k}),I=(F=U??q)!==null&&F!==void 0?F:void 0,N=h.size;var L=q-U;if(M=Number.isNaN(L)?0:L,R={x:C,y:o.y,width:N,height:o.height},Math.abs(D)>0&&Math.abs(M)<Math.abs(D)){var K=Ke(M||D)*(Math.abs(D)-Math.abs(M));I-=K,M+=K}}else{var Y=[i.scale(E[0]),i.scale(E[1])],re=Y[0],ue=Y[1];if(C=re,I=Cv({axis:o,ticks:u,bandSize:a,offset:h.offset,entry:P,index:k}),N=ue-re,M=h.size,R={x:i.x,y:I,width:i.width,height:M},Math.abs(D)>0&&Math.abs(N)<Math.abs(D)){var Ve=Ke(N||D)*(Math.abs(D)-Math.abs(N));N+=Ve}}return fe(fe(fe({},P),{},{x:C,y:I,width:N,height:M,value:c?E:E[1],payload:P,background:R},A&&A[k]&&A[k].props),{},{tooltipPayload:[Nb(r,P)],tooltipPosition:{x:C+N/2,y:I+M/2}})});return fe({data:_,layout:y},d)});function bn(t){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(t)}function dI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ky(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ex(n.key),n)}}function pI(t,e,r){return e&&Ky(t.prototype,e),r&&Ky(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ze(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gy(Object(r),!0).forEach(function(n){Va(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Va(t,e,r){return e=ex(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ex(t){var e=hI(t,"string");return bn(e)=="symbol"?e:e+""}function hI(t,e){if(bn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vI=function(e,r,n,a,i){var o=e.width,s=e.height,u=e.layout,c=e.children,f=Object.keys(r),l={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!ke(c,Tn);return f.reduce(function(h,y){var v=r[y],p=v.orientation,x=v.domain,b=v.padding,w=b===void 0?{}:b,S=v.mirror,g=v.reversed,O="".concat(p).concat(S?"Mirror":""),A,_,P,k,E;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var C=x[1]-x[0],I=1/0,N=v.categoricalDomain.sort(SS);if(N.forEach(function(Y,re){re>0&&(I=Math.min((Y||0)-(N[re-1]||0),I))}),Number.isFinite(I)){var M=I/C,R=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(A=M*R/2),v.padding==="no-gap"){var D=qt(e.barCategoryGap,M*R),F=M*R/2;A=F-D-(F-D)/R*D}}}a==="xAxis"?_=[n.left+(w.left||0)+(A||0),n.left+n.width-(w.right||0)-(A||0)]:a==="yAxis"?_=u==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(A||0),n.top+n.height-(w.bottom||0)-(A||0)]:_=v.range,g&&(_=[_[1],_[0]]);var z=Ij(v,i,d),q=z.scale,U=z.realScaleType;q.domain(x).range(_),Mj(q);var L=Fj(q,ze(ze({},v),{},{realScaleType:U}));a==="xAxis"?(E=p==="top"&&!S||p==="bottom"&&S,P=n.left,k=l[O]-E*v.height):a==="yAxis"&&(E=p==="left"&&!S||p==="right"&&S,P=l[O]-E*v.width,k=n.top);var K=ze(ze(ze({},v),L),{},{realScaleType:U,x:P,y:k,scale:q,width:a==="xAxis"?n.width:v.width,height:a==="yAxis"?n.height:v.height});return K.bandSize=ia(K,L),!v.hide&&a==="xAxis"?l[O]+=(E?-1:1)*K.height:v.hide||(l[O]+=(E?-1:1)*K.width),ze(ze({},h),{},Va({},y,K))},{})},tx=function(e,r){var n=e.x,a=e.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},yI=function(e){var r=e.x1,n=e.y1,a=e.x2,i=e.y2;return tx({x:r,y:n},{x:a,y:i})},rx=function(){function t(e){dI(this,t),this.scale=e}return pI(t,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new t(r)}}])}();Va(rx,"EPS",1e-4);var Zl=function(e){var r=Object.keys(e).reduce(function(n,a){return ze(ze({},n),{},Va({},a,rx.create(e[a])))},{});return ze(ze({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return Wk(a,function(u,c){return r[c].apply(u,{bandAware:o,position:s})})},isInRange:function(a){return Yb(a,function(i,o){return r[o].isInRange(i)})}})};function mI(t){return(t%180+180)%180}var gI=function(e){var r=e.width,n=e.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=mI(a),o=i*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},Lu,Hy;function bI(){if(Hy)return Lu;Hy=1;var t=At(),e=jn(),r=qa();function n(a){return function(i,o,s){var u=Object(i);if(!e(i)){var c=t(o,3);i=r(i),o=function(l){return c(u[l],l,u)}}var f=a(i,o,s);return f>-1?u[c?i[f]:f]:void 0}}return Lu=n,Lu}var Bu,Vy;function xI(){if(Vy)return Bu;Vy=1;var t=Gb();function e(r){var n=t(r),a=n%1;return n===n?a?n-a:n:0}return Bu=e,Bu}var Fu,Xy;function wI(){if(Xy)return Fu;Xy=1;var t=Vg(),e=At(),r=xI(),n=Math.max;function a(i,o,s){var u=i==null?0:i.length;if(!u)return-1;var c=s==null?0:r(s);return c<0&&(c=n(u+c,0)),t(i,e(o,3),c)}return Fu=a,Fu}var zu,Yy;function OI(){if(Yy)return zu;Yy=1;var t=bI(),e=wI(),r=t(e);return zu=r,zu}var SI=OI();const AI=ie(SI);var PI=_g();const _I=ie(PI);var jI=_I(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),Jl=T.createContext(void 0),Ql=T.createContext(void 0),nx=T.createContext(void 0),ax=T.createContext({}),ix=T.createContext(void 0),ox=T.createContext(0),sx=T.createContext(0),Zy=function(e){var r=e.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=e.clipPathId,s=e.children,u=e.width,c=e.height,f=jI(i);return j.createElement(Jl.Provider,{value:n},j.createElement(Ql.Provider,{value:a},j.createElement(ax.Provider,{value:i},j.createElement(nx.Provider,{value:f},j.createElement(ix.Provider,{value:o},j.createElement(ox.Provider,{value:c},j.createElement(sx.Provider,{value:u},s)))))))},EI=function(){return T.useContext(ix)},ux=function(e){var r=T.useContext(Jl);r==null&&Bt();var n=r[e];return n==null&&Bt(),n},TI=function(){var e=T.useContext(Jl);return yt(e)},CI=function(){var e=T.useContext(Ql),r=AI(e,function(n){return Yb(n.domain,Number.isFinite)});return r||yt(e)},cx=function(e){var r=T.useContext(Ql);r==null&&Bt();var n=r[e];return n==null&&Bt(),n},kI=function(){var e=T.useContext(nx);return e},II=function(){return T.useContext(ax)},ef=function(){return T.useContext(sx)},tf=function(){return T.useContext(ox)};function hr(t){"@babel/helpers - typeof";return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(t)}function MI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $I(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fx(n.key),n)}}function NI(t,e,r){return e&&$I(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function RI(t,e,r){return e=ba(e),DI(t,lx()?Reflect.construct(e,r||[],ba(t).constructor):e.apply(t,r))}function DI(t,e){if(e&&(hr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qI(t)}function qI(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lx=function(){return!!t})()}function ba(t){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ba(t)}function LI(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xc(t,e)}function Xc(t,e){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xc(t,e)}function Jy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Qy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jy(Object(r),!0).forEach(function(n){rf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rf(t,e,r){return e=fx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fx(t){var e=BI(t,"string");return hr(e)=="symbol"?e:e+""}function BI(t,e){if(hr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function FI(t,e){return KI(t)||UI(t,e)||WI(t,e)||zI()}function zI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
155
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WI(t,e){if(t){if(typeof t=="string")return em(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return em(t,e)}}function em(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function UI(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function KI(t){if(Array.isArray(t))return t}function Yc(){return Yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yc.apply(this,arguments)}var GI=function(e,r){var n;return j.isValidElement(e)?n=j.cloneElement(e,r):H(e)?n=e(r):n=j.createElement("line",Yc({},r,{className:"recharts-reference-line-line"})),n},HI=function(e,r,n,a,i,o,s,u,c){var f=i.x,l=i.y,d=i.width,h=i.height;if(n){var y=c.y,v=e.y.apply(y,{position:o});if(Je(c,"discard")&&!e.y.isInRange(v))return null;var p=[{x:f+d,y:v},{x:f,y:v}];return u==="left"?p.reverse():p}if(r){var x=c.x,b=e.x.apply(x,{position:o});if(Je(c,"discard")&&!e.x.isInRange(b))return null;var w=[{x:b,y:l+h},{x:b,y:l}];return s==="top"?w.reverse():w}if(a){var S=c.segment,g=S.map(function(O){return e.apply(O,{position:o})});return Je(c,"discard")&&Lk(g,function(O){return!e.isInRange(O)})?null:g}return null};function VI(t){var e=t.x,r=t.y,n=t.segment,a=t.xAxisId,i=t.yAxisId,o=t.shape,s=t.className,u=t.alwaysShow,c=EI(),f=ux(a),l=cx(i),d=kI();if(!c||!d)return null;st(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Zl({x:f.scale,y:l.scale}),y=ve(e),v=ve(r),p=n&&n.length===2,x=HI(h,y,v,p,d,t.position,f.orientation,l.orientation,t);if(!x)return null;var b=FI(x,2),w=b[0],S=w.x,g=w.y,O=b[1],A=O.x,_=O.y,P=Je(t,"hidden")?"url(#".concat(c,")"):void 0,k=Qy(Qy({clipPath:P},Z(t,!0)),{},{x1:S,y1:g,x2:A,y2:_});return j.createElement(ce,{className:J("recharts-reference-line",s)},GI(o,k),Oe.renderCallByParent(t,yI({x1:S,y1:g,x2:A,y2:_})))}var nf=function(t){function e(){return MI(this,e),RI(this,e,arguments)}return LI(e,t),NI(e,[{key:"render",value:function(){return j.createElement(VI,this.props)}}])}(j.Component);rf(nf,"displayName","ReferenceLine");rf(nf,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Zc(){return Zc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zc.apply(this,arguments)}function vr(t){"@babel/helpers - typeof";return vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(t)}function tm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function rm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tm(Object(r),!0).forEach(function(n){Xa(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function XI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,px(n.key),n)}}function ZI(t,e,r){return e&&YI(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function JI(t,e,r){return e=xa(e),QI(t,dx()?Reflect.construct(e,r||[],xa(t).constructor):e.apply(t,r))}function QI(t,e){if(e&&(vr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eM(t)}function eM(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dx=function(){return!!t})()}function xa(t){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xa(t)}function tM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jc(t,e)}function Jc(t,e){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jc(t,e)}function Xa(t,e,r){return e=px(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function px(t){var e=rM(t,"string");return vr(e)=="symbol"?e:e+""}function rM(t,e){if(vr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var nM=function(e){var r=e.x,n=e.y,a=e.xAxis,i=e.yAxis,o=Zl({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Je(e,"discard")&&!o.isInRange(s)?null:s},Ya=function(t){function e(){return XI(this,e),JI(this,e,arguments)}return tM(e,t),ZI(e,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,u=n.clipPathId,c=ve(a),f=ve(i);if(st(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var l=nM(this.props);if(!l)return null;var d=l.x,h=l.y,y=this.props,v=y.shape,p=y.className,x=Je(this.props,"hidden")?"url(#".concat(u,")"):void 0,b=rm(rm({clipPath:x},Z(this.props,!0)),{},{cx:d,cy:h});return j.createElement(ce,{className:J("recharts-reference-dot",p)},e.renderDot(v,b),Oe.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(j.Component);Xa(Ya,"displayName","ReferenceDot");Xa(Ya,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Xa(Ya,"renderDot",function(t,e){var r;return j.isValidElement(t)?r=j.cloneElement(t,e):H(t)?r=t(e):r=j.createElement(Yl,Zc({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function Qc(){return Qc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qc.apply(this,arguments)}function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function nm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function am(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nm(Object(r),!0).forEach(function(n){Za(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vx(n.key),n)}}function oM(t,e,r){return e&&iM(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function sM(t,e,r){return e=wa(e),uM(t,hx()?Reflect.construct(e,r||[],wa(t).constructor):e.apply(t,r))}function uM(t,e){if(e&&(yr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cM(t)}function cM(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hx=function(){return!!t})()}function wa(t){return wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wa(t)}function lM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&el(t,e)}function el(t,e){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},el(t,e)}function Za(t,e,r){return e=vx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vx(t){var e=fM(t,"string");return yr(e)=="symbol"?e:e+""}function fM(t,e){if(yr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var dM=function(e,r,n,a,i){var o=i.x1,s=i.x2,u=i.y1,c=i.y2,f=i.xAxis,l=i.yAxis;if(!f||!l)return null;var d=Zl({x:f.scale,y:l.scale}),h={x:e?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(u,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(c,{position:"end"}):d.y.rangeMax};return Je(i,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:tx(h,y)},Ja=function(t){function e(){return aM(this,e),sM(this,e,arguments)}return lM(e,t),oM(e,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,u=n.className,c=n.alwaysShow,f=n.clipPathId;st(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=ve(a),d=ve(i),h=ve(o),y=ve(s),v=this.props.shape;if(!l&&!d&&!h&&!y&&!v)return null;var p=dM(l,d,h,y,this.props);if(!p&&!v)return null;var x=Je(this.props,"hidden")?"url(#".concat(f,")"):void 0;return j.createElement(ce,{className:J("recharts-reference-area",u)},e.renderRect(v,am(am({clipPath:x},Z(this.props,!0)),p)),Oe.renderCallByParent(this.props,p))}}])}(j.Component);Za(Ja,"displayName","ReferenceArea");Za(Ja,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Za(Ja,"renderRect",function(t,e){var r;return j.isValidElement(t)?r=j.cloneElement(t,e):H(t)?r=t(e):r=j.createElement(Xl,Qc({},e,{className:"recharts-reference-area-rect"})),r});function yx(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],a=0;a<t.length;a+=e)n.push(t[a]);return n}function pM(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return gI(n,r)}function hM(t,e,r){var n=r==="width",a=t.x,i=t.y,o=t.width,s=t.height;return e===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function Oa(t,e,r,n,a){if(t*e<t*n||t*e>t*a)return!1;var i=r();return t*(e-t*i/2-n)>=0&&t*(e+t*i/2-a)<=0}function vM(t,e){return yx(t,e+1)}function yM(t,e,r,n,a){for(var i=(n||[]).slice(),o=e.start,s=e.end,u=0,c=1,f=o,l=function(){var y=n?.[u];if(y===void 0)return{v:yx(n,c)};var v=u,p,x=function(){return p===void 0&&(p=r(y,v)),p},b=y.coordinate,w=u===0||Oa(t,b,x,f,s);w||(u=0,f=o,c+=1),w&&(f=b+t*(x()/2+a),u+=c)},d;c<=i.length;)if(d=l(),d)return d.v;return[]}function xn(t){"@babel/helpers - typeof";return xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(t)}function im(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function we(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?im(Object(r),!0).forEach(function(n){mM(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mM(t,e,r){return e=gM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gM(t){var e=bM(t,"string");return xn(e)=="symbol"?e:e+""}function bM(t,e){if(xn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xM(t,e,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=e.start,u=e.end,c=function(d){var h=i[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=t*(h.coordinate+t*v()/2-u);i[d]=h=we(we({},h),{},{tickCoord:p>0?h.coordinate-p*t:h.coordinate})}else i[d]=h=we(we({},h),{},{tickCoord:h.coordinate});var x=Oa(t,h.tickCoord,v,s,u);x&&(u=h.tickCoord-t*(v()/2+a),i[d]=we(we({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return i}function wM(t,e,r,n,a,i){var o=(n||[]).slice(),s=o.length,u=e.start,c=e.end;if(i){var f=n[s-1],l=r(f,s-1),d=t*(f.coordinate+t*l/2-c);o[s-1]=f=we(we({},f),{},{tickCoord:d>0?f.coordinate-d*t:f.coordinate});var h=Oa(t,f.tickCoord,function(){return l},u,c);h&&(c=f.tickCoord-t*(l/2+a),o[s-1]=we(we({},f),{},{isShow:!0}))}for(var y=i?s-1:s,v=function(b){var w=o[b],S,g=function(){return S===void 0&&(S=r(w,b)),S};if(b===0){var O=t*(w.coordinate-t*g()/2-u);o[b]=w=we(we({},w),{},{tickCoord:O<0?w.coordinate-O*t:w.coordinate})}else o[b]=w=we(we({},w),{},{tickCoord:w.coordinate});var A=Oa(t,w.tickCoord,g,u,c);A&&(u=w.tickCoord+t*(g()/2+a),o[b]=we(we({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function af(t,e,r){var n=t.tick,a=t.ticks,i=t.viewBox,o=t.minTickGap,s=t.orientation,u=t.interval,c=t.tickFormatter,f=t.unit,l=t.angle;if(!a||!a.length||!n)return[];if(B(u)||_r.isSsr)return vM(a,typeof u=="number"&&B(u)?u:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",y=f&&h==="width"?zr(f,{fontSize:e,letterSpacing:r}):{width:0,height:0},v=function(w,S){var g=H(c)?c(w.value,S):w.value;return h==="width"?pM(zr(g,{fontSize:e,letterSpacing:r}),y,l):zr(g,{fontSize:e,letterSpacing:r})[h]},p=a.length>=2?Ke(a[1].coordinate-a[0].coordinate):1,x=hM(i,p,h);return u==="equidistantPreserveStart"?yM(p,x,v,a,o):(u==="preserveStart"||u==="preserveStartEnd"?d=wM(p,x,v,a,o,u==="preserveStartEnd"):d=xM(p,x,v,a,o),d.filter(function(b){return b.isShow}))}var OM=["viewBox"],SM=["viewBox"],AM=["ticks"];function mr(t){"@babel/helpers - typeof";return mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(t)}function Jt(){return Jt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jt.apply(this,arguments)}function om(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Pe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?om(Object(r),!0).forEach(function(n){of(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):om(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wu(t,e){if(t==null)return{};var r=PM(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function PM(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function _M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gx(n.key),n)}}function jM(t,e,r){return e&&sm(t.prototype,e),r&&sm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function EM(t,e,r){return e=Sa(e),TM(t,mx()?Reflect.construct(e,r||[],Sa(t).constructor):e.apply(t,r))}function TM(t,e){if(e&&(mr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CM(t)}function CM(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mx=function(){return!!t})()}function Sa(t){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sa(t)}function kM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}function tl(t,e){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tl(t,e)}function of(t,e,r){return e=gx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gx(t){var e=IM(t,"string");return mr(e)=="symbol"?e:e+""}function IM(t,e){if(mr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Tr=function(t){function e(r){var n;return _M(this,e),n=EM(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return kM(e,t),jM(e,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Wu(n,OM),s=this.props,u=s.viewBox,c=Wu(s,SM);return!er(i,u)||!er(o,c)||!er(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,u=a.height,c=a.orientation,f=a.tickSize,l=a.mirror,d=a.tickMargin,h,y,v,p,x,b,w=l?-1:1,S=n.tickSize||f,g=B(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=y=n.coordinate,p=o+ +!l*u,v=p-w*S,b=v-w*d,x=g;break;case"left":v=p=n.coordinate,y=i+ +!l*s,h=y-w*S,x=h-w*d,b=g;break;case"right":v=p=n.coordinate,y=i+ +l*s,h=y+w*S,x=h+w*d,b=g;break;default:h=y=n.coordinate,p=o+ +l*u,v=p+w*S,b=v+w*d,x=g;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,u=n.orientation,c=n.mirror,f=n.axisLine,l=Pe(Pe(Pe({},Z(this.props,!1)),Z(f,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!c||u==="bottom"&&c);l=Pe(Pe({},l),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(u==="left"&&!c||u==="right"&&c);l=Pe(Pe({},l),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return j.createElement("line",Jt({},l,{className:J("recharts-cartesian-axis-line",De(f,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,u=s.tickLine,c=s.stroke,f=s.tick,l=s.tickFormatter,d=s.unit,h=af(Pe(Pe({},this.props),{},{ticks:n}),a,i),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=Z(this.props,!1),x=Z(f,!1),b=Pe(Pe({},p),{},{fill:"none"},Z(u,!1)),w=h.map(function(S,g){var O=o.getTickLineCoord(S),A=O.line,_=O.tick,P=Pe(Pe(Pe(Pe({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:c},x),_),{},{index:g,payload:S,visibleTicksCount:h.length,tickFormatter:l});return j.createElement(ce,Jt({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Xn(o.props,S,g)),u&&j.createElement("line",Jt({},b,A,{className:J("recharts-cartesian-axis-tick-line",De(u,"className"))})),f&&e.renderTickItem(f,P,"".concat(H(l)?l(S.value,g):S.value).concat(d||"")))});return j.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,u=a.ticksGenerator,c=a.className,f=a.hide;if(f)return null;var l=this.props,d=l.ticks,h=Wu(l,AM),y=d;return H(u)&&(y=d&&d.length>0?u(this.props):u(h)),o<=0||s<=0||!y||!y.length?null:j.createElement(ce,{className:J("recharts-cartesian-axis",c),ref:function(p){n.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Oe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o;return j.isValidElement(n)?o=j.cloneElement(n,a):H(n)?o=n(a):o=j.createElement(ta,Jt({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(T.Component);of(Tr,"displayName","CartesianAxis");of(Tr,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var MM=["x1","y1","x2","y2","key"],$M=["offset"];function Ft(t){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(t)}function um(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?um(Object(r),!0).forEach(function(n){NM(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function NM(t,e,r){return e=RM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RM(t){var e=DM(t,"string");return Ft(e)=="symbol"?e:e+""}function DM(t,e){if(Ft(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $t(){return $t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$t.apply(this,arguments)}function cm(t,e){if(t==null)return{};var r=qM(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qM(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var LM=function(e){var r=e.fill;if(!r||r==="none")return null;var n=e.fillOpacity,a=e.x,i=e.y,o=e.width,s=e.height,u=e.ry;return j.createElement("rect",{x:a,y:i,ry:u,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function bx(t,e){var r;if(j.isValidElement(t))r=j.cloneElement(t,e);else if(H(t))r=t(e);else{var n=e.x1,a=e.y1,i=e.x2,o=e.y2,s=e.key,u=cm(e,MM),c=Z(u,!1);c.offset;var f=cm(c,$M);r=j.createElement("line",$t({},f,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function BM(t){var e=t.x,r=t.width,n=t.horizontal,a=n===void 0?!0:n,i=t.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,u){var c=Se(Se({},t),{},{x1:e,y1:s,x2:e+r,y2:s,key:"line-".concat(u),index:u});return bx(a,c)});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function FM(t){var e=t.y,r=t.height,n=t.vertical,a=n===void 0?!0:n,i=t.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,u){var c=Se(Se({},t),{},{x1:s,y1:e,x2:s,y2:e+r,key:"line-".concat(u),index:u});return bx(a,c)});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function zM(t){var e=t.horizontalFill,r=t.fillOpacity,n=t.x,a=t.y,i=t.width,o=t.height,s=t.horizontalPoints,u=t.horizontal,c=u===void 0?!0:u;if(!c||!e||!e.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?a+o-d:f[h+1]-d;if(v<=0)return null;var p=h%e.length;return j.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:i,stroke:"none",fill:e[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}function WM(t){var e=t.vertical,r=e===void 0?!0:e,n=t.verticalFill,a=t.fillOpacity,i=t.x,o=t.y,s=t.width,u=t.height,c=t.verticalPoints;if(!r||!n||!n.length)return null;var f=c.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?i+s-d:f[h+1]-d;if(v<=0)return null;var p=h%n.length;return j.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:u,stroke:"none",fill:n[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}var UM=function(e,r){var n=e.xAxis,a=e.width,i=e.height,o=e.offset;return Mb(af(Se(Se(Se({},Tr.defaultProps),n),{},{ticks:it(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},KM=function(e,r){var n=e.yAxis,a=e.width,i=e.height,o=e.offset;return Mb(af(Se(Se(Se({},Tr.defaultProps),n),{},{ticks:it(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Vt={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function xx(t){var e,r,n,a,i,o,s=ef(),u=tf(),c=II(),f=Se(Se({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:Vt.stroke,fill:(r=t.fill)!==null&&r!==void 0?r:Vt.fill,horizontal:(n=t.horizontal)!==null&&n!==void 0?n:Vt.horizontal,horizontalFill:(a=t.horizontalFill)!==null&&a!==void 0?a:Vt.horizontalFill,vertical:(i=t.vertical)!==null&&i!==void 0?i:Vt.vertical,verticalFill:(o=t.verticalFill)!==null&&o!==void 0?o:Vt.verticalFill,x:B(t.x)?t.x:c.left,y:B(t.y)?t.y:c.top,width:B(t.width)?t.width:c.width,height:B(t.height)?t.height:c.height}),l=f.x,d=f.y,h=f.width,y=f.height,v=f.syncWithTicks,p=f.horizontalValues,x=f.verticalValues,b=TI(),w=CI();if(!B(h)||h<=0||!B(y)||y<=0||!B(l)||l!==+l||!B(d)||d!==+d)return null;var S=f.verticalCoordinatesGenerator||UM,g=f.horizontalCoordinatesGenerator||KM,O=f.horizontalPoints,A=f.verticalPoints;if((!O||!O.length)&&H(g)){var _=p&&p.length,P=g({yAxis:w?Se(Se({},w),{},{ticks:_?p:w.ticks}):void 0,width:s,height:u,offset:c},_?!0:v);st(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ft(P),"]")),Array.isArray(P)&&(O=P)}if((!A||!A.length)&&H(S)){var k=x&&x.length,E=S({xAxis:b?Se(Se({},b),{},{ticks:k?x:b.ticks}):void 0,width:s,height:u,offset:c},k?!0:v);st(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ft(E),"]")),Array.isArray(E)&&(A=E)}return j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(LM,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),j.createElement(BM,$t({},f,{offset:c,horizontalPoints:O,xAxis:b,yAxis:w})),j.createElement(FM,$t({},f,{offset:c,verticalPoints:A,xAxis:b,yAxis:w})),j.createElement(zM,$t({},f,{horizontalPoints:O})),j.createElement(WM,$t({},f,{verticalPoints:A})))}xx.displayName="CartesianGrid";var GM=["type","layout","connectNulls","ref"],HM=["key"];function gr(t){"@babel/helpers - typeof";return gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gr(t)}function lm(t,e){if(t==null)return{};var r=VM(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function VM(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Kr(){return Kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Kr.apply(this,arguments)}function fm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Te(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fm(Object(r),!0).forEach(function(n){We(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xt(t){return JM(t)||ZM(t)||YM(t)||XM()}function XM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
156
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YM(t,e){if(t){if(typeof t=="string")return rl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rl(t,e)}}function ZM(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JM(t){if(Array.isArray(t))return rl(t)}function rl(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function QM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ox(n.key),n)}}function e$(t,e,r){return e&&dm(t.prototype,e),r&&dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function t$(t,e,r){return e=Aa(e),r$(t,wx()?Reflect.construct(e,r||[],Aa(t).constructor):e.apply(t,r))}function r$(t,e){if(e&&(gr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n$(t)}function n$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wx=function(){return!!t})()}function Aa(t){return Aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Aa(t)}function a$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nl(t,e)}function nl(t,e){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},nl(t,e)}function We(t,e,r){return e=Ox(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ox(t){var e=i$(t,"string");return gr(e)=="symbol"?e:e+""}function i$(t,e){if(gr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Cn=function(t){function e(){var r;QM(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=t$(this,e,[].concat(a)),We(r,"state",{isAnimationFinished:!0,totalLength:0}),We(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),We(r,"getStrokeDasharray",function(o,s,u){var c=u.reduce(function(x,b){return x+b});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/c),l=o%c,d=s-o,h=[],y=0,v=0;y<u.length;v+=u[y],++y)if(v+u[y]>l){h=[].concat(Xt(u.slice(0,y)),[l-v]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(Xt(e.repeat(u,f)),Xt(h),p).map(function(x){return"".concat(x,"px")}).join(", ")}),We(r,"id",_n("recharts-line-")),We(r,"pathRef",function(o){r.mainCurve=o}),We(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),We(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return a$(e,t),e$(e,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,u=i.yAxis,c=i.layout,f=i.children,l=qe(f,En);if(!l)return null;var d=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:$e(v.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return j.createElement(ce,h,l.map(function(y){return j.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:u,layout:c,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,c=s.points,f=s.dataKey,l=Z(this.props,!1),d=Z(u,!0),h=c.map(function(v,p){var x=Te(Te(Te({key:"dot-".concat(p),r:3},l),d),{},{index:p,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:c});return e.renderDotItem(u,x)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return j.createElement(ce,Kr({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,u=s.type,c=s.layout,f=s.connectNulls;s.ref;var l=lm(s,GM),d=Te(Te(Te({},Z(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:u,layout:c,connectNulls:f});return j.createElement($c,Kr({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,u=o.strokeDasharray,c=o.isAnimationActive,f=o.animationBegin,l=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,v=o.width,p=o.height,x=this.state,b=x.prevPoints,w=x.totalLength;return j.createElement(ct,{begin:f,duration:l,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var g=S.t;if(b){var O=b.length/s.length,A=s.map(function(C,I){var N=Math.floor(I*O);if(b[N]){var M=b[N],R=Ue(M.x,C.x),D=Ue(M.y,C.y);return Te(Te({},C),{},{x:R(g),y:D(g)})}if(y){var F=Ue(v*2,C.x),z=Ue(p/2,C.y);return Te(Te({},C),{},{x:F(g),y:z(g)})}return Te(Te({},C),{},{x:C.x,y:C.y})});return i.renderCurveStatically(A,n,a)}var _=Ue(0,w),P=_(g),k;if(u){var E="".concat(u).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});k=i.getStrokeDasharray(P,w,E)}else k=i.generateSimpleStrokeDasharray(w,P);return i.renderCurveStatically(s,n,a,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.totalLength;return s&&o&&o.length&&(!c&&f>0||!Wa(c,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,u=a.className,c=a.xAxis,f=a.yAxis,l=a.top,d=a.left,h=a.width,y=a.height,v=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=J("recharts-line",u),S=c&&c.allowDataOverflow,g=f&&f.allowDataOverflow,O=S||g,A=X(p)?this.id:p,_=(n=Z(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=_.r,k=P===void 0?3:P,E=_.strokeWidth,C=E===void 0?2:E,I=IS(o)?o:{},N=I.clipDot,M=N===void 0?!0:N,R=k*2+C;return j.createElement(ce,{className:w},S||g?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(A)},j.createElement("rect",{x:S?d:d-h/2,y:g?l:l-y/2,width:S?h:h*2,height:g?y:y*2})),!M&&j.createElement("clipPath",{id:"clipPath-dots-".concat(A)},j.createElement("rect",{x:d-R/2,y:l-R/2,width:h+R,height:y+R}))):null,!b&&this.renderCurve(O,A),this.renderErrorBar(O,A),(b||o)&&this.renderDots(O,M,A),(!v||x)&&xt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Xt(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Xt(o),Xt(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(j.isValidElement(n))i=j.cloneElement(n,a);else if(H(n))i=n(a);else{var o=a.key,s=lm(a,HM),u=J("recharts-line-dot",typeof n!="boolean"?n.className:"");i=j.createElement(Yl,Kr({key:o},s,{className:u}))}return i}}])}(T.PureComponent);We(Cn,"displayName","Line");We(Cn,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!_r.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});We(Cn,"getComposedData",function(t){var e=t.props,r=t.xAxis,n=t.yAxis,a=t.xAxisTicks,i=t.yAxisTicks,o=t.dataKey,s=t.bandSize,u=t.displayedData,c=t.offset,f=e.layout,l=u.map(function(d,h){var y=$e(d,o);return f==="horizontal"?{x:Tv({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:X(y)?null:n.scale(y),value:y,payload:d}:{x:X(y)?null:r.scale(y),y:Tv({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:y,payload:d}});return Te({points:l,layout:f},c)});function br(t){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(t)}function o$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Px(n.key),n)}}function u$(t,e,r){return e&&s$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c$(t,e,r){return e=Pa(e),l$(t,Sx()?Reflect.construct(e,r||[],Pa(t).constructor):e.apply(t,r))}function l$(t,e){if(e&&(br(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f$(t)}function f$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sx=function(){return!!t})()}function Pa(t){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pa(t)}function d$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&al(t,e)}function al(t,e){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},al(t,e)}function Ax(t,e,r){return e=Px(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Px(t){var e=p$(t,"string");return br(e)=="symbol"?e:e+""}function p$(t,e){if(br(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(br(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function il(){return il=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},il.apply(this,arguments)}function h$(t){var e=t.xAxisId,r=ef(),n=tf(),a=ux(e);return a==null?null:j.createElement(Tr,il({},a,{className:J("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return it(o,!0)}}))}var Qa=function(t){function e(){return o$(this,e),c$(this,e,arguments)}return d$(e,t),u$(e,[{key:"render",value:function(){return j.createElement(h$,this.props)}}])}(j.Component);Ax(Qa,"displayName","XAxis");Ax(Qa,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function xr(t){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(t)}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ex(n.key),n)}}function m$(t,e,r){return e&&y$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function g$(t,e,r){return e=_a(e),b$(t,_x()?Reflect.construct(e,r||[],_a(t).constructor):e.apply(t,r))}function b$(t,e){if(e&&(xr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x$(t)}function x$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_x=function(){return!!t})()}function _a(t){return _a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_a(t)}function w$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ol(t,e)}function ol(t,e){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ol(t,e)}function jx(t,e,r){return e=Ex(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ex(t){var e=O$(t,"string");return xr(e)=="symbol"?e:e+""}function O$(t,e){if(xr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function sl(){return sl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sl.apply(this,arguments)}var S$=function(e){var r=e.yAxisId,n=ef(),a=tf(),i=cx(r);return i==null?null:j.createElement(Tr,sl({},i,{className:J("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return it(s,!0)}}))},ei=function(t){function e(){return v$(this,e),g$(this,e,arguments)}return w$(e,t),m$(e,[{key:"render",value:function(){return j.createElement(S$,this.props)}}])}(j.Component);jx(ei,"displayName","YAxis");jx(ei,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function pm(t){return j$(t)||_$(t)||P$(t)||A$()}function A$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
157
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P$(t,e){if(t){if(typeof t=="string")return ul(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ul(t,e)}}function _$(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function j$(t){if(Array.isArray(t))return ul(t)}function ul(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var cl=function(e,r,n,a,i){var o=qe(e,nf),s=qe(e,Ya),u=[].concat(pm(o),pm(s)),c=qe(e,Ja),f="".concat(a,"Id"),l=a[0],d=r;if(u.length&&(d=u.reduce(function(v,p){if(p.props[f]===n&&Je(p.props,"extendDomain")&&B(p.props[l])){var x=p.props[l];return[Math.min(v[0],x),Math.max(v[1],x)]}return v},d)),c.length){var h="".concat(l,"1"),y="".concat(l,"2");d=c.reduce(function(v,p){if(p.props[f]===n&&Je(p.props,"extendDomain")&&B(p.props[h])&&B(p.props[y])){var x=p.props[h],b=p.props[y];return[Math.min(v[0],x,b),Math.max(v[1],x,b)]}return v},d)}return i&&i.length&&(d=i.reduce(function(v,p){return B(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},Uu={exports:{}},hm;function E$(){return hm||(hm=1,function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(u,c,f){this.fn=u,this.context=c,this.once=f||!1}function i(u,c,f,l,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new a(f,l||u,d),y=r?r+c:c;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],h]:u._events[y].push(h):(u._events[y]=h,u._eventsCount++),u}function o(u,c){--u._eventsCount===0?u._events=new n:delete u._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,l;if(this._eventsCount===0)return c;for(l in f=this._events)e.call(f,l)&&c.push(r?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=r?r+c:c,l=this._events[f];if(!l)return[];if(l.fn)return[l.fn];for(var d=0,h=l.length,y=new Array(h);d<h;d++)y[d]=l[d].fn;return y},s.prototype.listenerCount=function(c){var f=r?r+c:c,l=this._events[f];return l?l.fn?1:l.length:0},s.prototype.emit=function(c,f,l,d,h,y){var v=r?r+c:c;if(!this._events[v])return!1;var p=this._events[v],x=arguments.length,b,w;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),x){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,l),!0;case 4:return p.fn.call(p.context,f,l,d),!0;case 5:return p.fn.call(p.context,f,l,d,h),!0;case 6:return p.fn.call(p.context,f,l,d,h,y),!0}for(w=1,b=new Array(x-1);w<x;w++)b[w-1]=arguments[w];p.fn.apply(p.context,b)}else{var S=p.length,g;for(w=0;w<S;w++)switch(p[w].once&&this.removeListener(c,p[w].fn,void 0,!0),x){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,f);break;case 3:p[w].fn.call(p[w].context,f,l);break;case 4:p[w].fn.call(p[w].context,f,l,d);break;default:if(!b)for(g=1,b=new Array(x-1);g<x;g++)b[g-1]=arguments[g];p[w].fn.apply(p[w].context,b)}}return!0},s.prototype.on=function(c,f,l){return i(this,c,f,l,!1)},s.prototype.once=function(c,f,l){return i(this,c,f,l,!0)},s.prototype.removeListener=function(c,f,l,d){var h=r?r+c:c;if(!this._events[h])return this;if(!f)return o(this,h),this;var y=this._events[h];if(y.fn)y.fn===f&&(!d||y.once)&&(!l||y.context===l)&&o(this,h);else{for(var v=0,p=[],x=y.length;v<x;v++)(y[v].fn!==f||d&&!y[v].once||l&&y[v].context!==l)&&p.push(y[v]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s}(Uu)),Uu.exports}var T$=E$();const C$=ie(T$);var Ku=new C$,Gu="recharts.syncMouseEvents";function wn(t){"@babel/helpers - typeof";return wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(t)}function k$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tx(n.key),n)}}function M$(t,e,r){return e&&I$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hu(t,e,r){return e=Tx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tx(t){var e=$$(t,"string");return wn(e)=="symbol"?e:e+""}function $$(t,e){if(wn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var N$=function(){function t(){k$(this,t),Hu(this,"activeIndex",0),Hu(this,"coordinateList",[]),Hu(this,"layout","horizontal")}return M$(t,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,u=r.layout,c=u===void 0?null:u,f=r.offset,l=f===void 0?null:f,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=l??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,u=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,l=i+u+c,d=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:l,pageY:d})}}}])}();function R$(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t?.[0],a=t?.[1];if(n&&a&&B(n)&&B(a))return!0}return!1}function D$(t,e,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-a:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-a,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function Cx(t){var e=t.cx,r=t.cy,n=t.radius,a=t.startAngle,i=t.endAngle,o=be(e,r,n,a),s=be(e,r,n,i);return{points:[o,s],cx:e,cy:r,radius:n,startAngle:a,endAngle:i}}function q$(t,e,r){var n,a,i,o;if(t==="horizontal")n=e.x,i=n,a=r.top,o=r.top+r.height;else if(t==="vertical")a=e.y,o=a,n=r.left,i=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var s=e.cx,u=e.cy,c=e.innerRadius,f=e.outerRadius,l=e.angle,d=be(s,u,c,l),h=be(s,u,f,l);n=d.x,a=d.y,i=h.x,o=h.y}else return Cx(e);return[{x:n,y:a},{x:i,y:o}]}function On(t){"@babel/helpers - typeof";return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},On(t)}function vm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Fn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vm(Object(r),!0).forEach(function(n){L$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function L$(t,e,r){return e=B$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B$(t){var e=F$(t,"string");return On(e)=="symbol"?e:e+""}function F$(t,e){if(On(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(On(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function z$(t){var e,r,n=t.element,a=t.tooltipEventType,i=t.isActive,o=t.activeCoordinate,s=t.activePayload,u=t.offset,c=t.activeTooltipIndex,f=t.tooltipAxisBandSize,l=t.layout,d=t.chartName,h=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var y,v=$c;if(d==="ScatterChart")y=o,v=LC;else if(d==="BarChart")y=D$(l,o,u,f),v=Xl;else if(l==="radial"){var p=Cx(o),x=p.cx,b=p.cy,w=p.radius,S=p.startAngle,g=p.endAngle;y={cx:x,cy:b,startAngle:S,endAngle:g,innerRadius:w,outerRadius:w},v=qb}else y={points:q$(l,o,u)},v=$c;var O=Fn(Fn(Fn(Fn({stroke:"#ccc",pointerEvents:"none"},u),y),Z(h,!1)),{},{payload:s,payloadIndex:c,className:J("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,O):T.createElement(v,O)}var W$=["item"],U$=["children","className","width","height","style","compact","title","desc"];function wr(t){"@babel/helpers - typeof";return wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(t)}function Qt(){return Qt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qt.apply(this,arguments)}function ym(t,e){return H$(t)||G$(t,e)||Ix(t,e)||K$()}function K$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
158
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
159
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ix(t,e){if(t){if(typeof t=="string")return fl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fl(t,e)}}function nN(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aN(t){if(Array.isArray(t))return fl(t)}function fl(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function gm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function $(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gm(Object(r),!0).forEach(function(n){G(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function G(t,e,r){return e=Mx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mx(t){var e=iN(t,"string");return wr(e)=="symbol"?e:e+""}function iN(t,e){if(wr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(wr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oN={xAxis:["bottom","top"],yAxis:["left","right"]},sN={width:"100%",height:"100%"},$x={x:0,y:0};function zn(t){return t}var uN=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},cN=function(e,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(e==="horizontal")return{x:i.coordinate,y:a.y};if(e==="vertical")return{x:a.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,s=a.radius;return $($($({},a),be(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var u=i.coordinate,c=a.angle;return $($($({},a),be(a.cx,a.cy,u,c)),{},{angle:c,radius:u})}return $x},ti=function(e,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,u){var c=u.props.data;return c&&c.length?[].concat(Or(s),Or(c)):s},[]);return o.length>0?o:e&&e.length&&B(a)&&B(i)?e.slice(a,i+1):[]};function Nx(t){return t==="number"?[0,"auto"]:void 0}var dl=function(e,r,n,a){var i=e.graphicalItems,o=e.tooltipAxis,s=ti(r,e);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(u,c){var f,l=(f=c.props.data)!==null&&f!==void 0?f:r;l&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(l=l.slice(e.dataStartIndex,e.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=l===void 0?s:l;d=Hn(h,o.dataKey,a)}else d=l&&l[n]||s[n];return d?[].concat(Or(u),[Nb(c,d)]):u},[])},bm=function(e,r,n,a){var i=a||{x:e.chartX,y:e.chartY},o=uN(i,n),s=e.orderedTooltipTicks,u=e.tooltipAxis,c=e.tooltipTicks,f=_j(o,s,c,u);if(f>=0&&c){var l=c[f]&&c[f].value,d=dl(e,r,f,l),h=cN(n,s,f,i);return{activeTooltipIndex:f,activeLabel:l,activePayload:d,activeCoordinate:h}}return null},lN=function(e,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=e.layout,l=e.children,d=e.stackOffset,h=Ib(f,i);return n.reduce(function(y,v){var p,x=v.type.defaultProps!==void 0?$($({},v.type.defaultProps),v.props):v.props,b=x.type,w=x.dataKey,S=x.allowDataOverflow,g=x.allowDuplicatedCategory,O=x.scale,A=x.ticks,_=x.includeHidden,P=x[o];if(y[P])return y;var k=ti(e.data,{graphicalItems:a.filter(function(L){var K,Y=o in L.props?L.props[o]:(K=L.type.defaultProps)===null||K===void 0?void 0:K[o];return Y===P}),dataStartIndex:u,dataEndIndex:c}),E=k.length,C,I,N;R$(x.domain,S,b)&&(C=Tc(x.domain,null,S),h&&(b==="number"||O!=="auto")&&(N=Wr(k,w,"category")));var M=Nx(b);if(!C||C.length===0){var R,D=(R=x.domain)!==null&&R!==void 0?R:M;if(w){if(C=Wr(k,w,b),b==="category"&&h){var F=OS(C);g&&F?(I=C,C=ha(0,E)):g||(C=Mv(D,C,v).reduce(function(L,K){return L.indexOf(K)>=0?L:[].concat(Or(L),[K])},[]))}else if(b==="category")g?C=C.filter(function(L){return L!==""&&!X(L)}):C=Mv(D,C,v).reduce(function(L,K){return L.indexOf(K)>=0||K===""||X(K)?L:[].concat(Or(L),[K])},[]);else if(b==="number"){var z=kj(k,a.filter(function(L){var K,Y,re=o in L.props?L.props[o]:(K=L.type.defaultProps)===null||K===void 0?void 0:K[o],ue="hide"in L.props?L.props.hide:(Y=L.type.defaultProps)===null||Y===void 0?void 0:Y.hide;return re===P&&(_||!ue)}),w,i,f);z&&(C=z)}h&&(b==="number"||O!=="auto")&&(N=Wr(k,w,"category"))}else h?C=ha(0,E):s&&s[P]&&s[P].hasStack&&b==="number"?C=d==="expand"?[0,1]:$b(s[P].stackGroups,u,c):C=kb(k,a.filter(function(L){var K=o in L.props?L.props[o]:L.type.defaultProps[o],Y="hide"in L.props?L.props.hide:L.type.defaultProps.hide;return K===P&&(_||!Y)}),b,f,!0);if(b==="number")C=cl(l,C,P,i,A),D&&(C=Tc(D,C,S));else if(b==="category"&&D){var q=D,U=C.every(function(L){return q.indexOf(L)>=0});U&&(C=q)}}return $($({},y),{},G({},P,$($({},x),{},{axisType:i,domain:C,categoricalDomain:N,duplicateDomain:I,originalDomain:(p=x.domain)!==null&&p!==void 0?p:M,isCategorical:h,layout:f})))},{})},fN=function(e,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=e.layout,l=e.children,d=ti(e.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:c}),h=d.length,y=Ib(f,i),v=-1;return n.reduce(function(p,x){var b=x.type.defaultProps!==void 0?$($({},x.type.defaultProps),x.props):x.props,w=b[o],S=Nx("number");if(!p[w]){v++;var g;return y?g=ha(0,h):s&&s[w]&&s[w].hasStack?(g=$b(s[w].stackGroups,u,c),g=cl(l,g,w,i)):(g=Tc(S,kb(d,n.filter(function(O){var A,_,P=o in O.props?O.props[o]:(A=O.type.defaultProps)===null||A===void 0?void 0:A[o],k="hide"in O.props?O.props.hide:(_=O.type.defaultProps)===null||_===void 0?void 0:_.hide;return P===w&&!k}),"number",f),a.defaultProps.allowDataOverflow),g=cl(l,g,w,i)),$($({},p),{},G({},w,$($({axisType:i},a.defaultProps),{},{hide:!0,orientation:De(oN,"".concat(i,".").concat(v%2),null),domain:g,originalDomain:S,isCategorical:y,layout:f})))}return p},{})},dN=function(e,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=e.children,l="".concat(a,"Id"),d=qe(f,i),h={};return d&&d.length?h=lN(e,{axes:d,graphicalItems:o,axisType:a,axisIdKey:l,stackGroups:s,dataStartIndex:u,dataEndIndex:c}):o&&o.length&&(h=fN(e,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:l,stackGroups:s,dataStartIndex:u,dataEndIndex:c})),h},pN=function(e){var r=yt(e),n=it(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ul(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ia(r,n)}},xm=function(e){var r=e.children,n=e.defaultShowTooltip,a=ke(r,dr),i=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},hN=function(e){return!e||!e.length?!1:e.some(function(r){var n=ot(r&&r.type);return n&&n.indexOf("Bar")>=0})},wm=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},vN=function(e,r){var n=e.props,a=e.graphicalItems,i=e.xAxisMap,o=i===void 0?{}:i,s=e.yAxisMap,u=s===void 0?{}:s,c=n.width,f=n.height,l=n.children,d=n.margin||{},h=ke(l,dr),y=ke(l,tr),v=Object.keys(u).reduce(function(g,O){var A=u[O],_=A.orientation;return!A.mirror&&!A.hide?$($({},g),{},G({},_,g[_]+A.width)):g},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(g,O){var A=o[O],_=A.orientation;return!A.mirror&&!A.hide?$($({},g),{},G({},_,De(g,"".concat(_))+A.height)):g},{top:d.top||0,bottom:d.bottom||0}),x=$($({},p),v),b=x.bottom;h&&(x.bottom+=h.props.height||dr.defaultProps.height),y&&r&&(x=Tj(x,a,n,r));var w=c-x.left-x.right,S=f-x.top-x.bottom;return $($({brushBottom:b},x),{},{width:Math.max(w,0),height:Math.max(S,0)})},yN=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},mN=function(e){var r=e.chartName,n=e.GraphicalChild,a=e.defaultTooltipEventType,i=a===void 0?"axis":a,o=e.validateTooltipEventTypes,s=o===void 0?["axis"]:o,u=e.axisComponents,c=e.legendContent,f=e.formatAxisMap,l=e.defaultProps,d=function(x,b){var w=b.graphicalItems,S=b.stackGroups,g=b.offset,O=b.updateId,A=b.dataStartIndex,_=b.dataEndIndex,P=x.barSize,k=x.layout,E=x.barGap,C=x.barCategoryGap,I=x.maxBarSize,N=wm(k),M=N.numericAxisName,R=N.cateAxisName,D=hN(w),F=[];return w.forEach(function(z,q){var U=ti(x.data,{graphicalItems:[z],dataStartIndex:A,dataEndIndex:_}),L=z.type.defaultProps!==void 0?$($({},z.type.defaultProps),z.props):z.props,K=L.dataKey,Y=L.maxBarSize,re=L["".concat(M,"Id")],ue=L["".concat(R,"Id")],Ve={},le=u.reduce(function(Et,Tt){var ri=b["".concat(Tt.axisType,"Map")],sf=L["".concat(Tt.axisType,"Id")];ri&&ri[sf]||Tt.axisType==="zAxis"||Bt();var uf=ri[sf];return $($({},Et),{},G(G({},Tt.axisType,uf),"".concat(Tt.axisType,"Ticks"),it(uf)))},Ve),xe=le[R],Xe=le["".concat(R,"Ticks")],Ee=S&&S[re]&&S[re].hasStack&&Wj(z,S[re].stackGroups),_t=ot(z.type).indexOf("Bar")>=0,tt=ia(xe,Xe),pt=[],jt=D&&jj({barSize:P,stackGroups:S,totalSize:yN(le,R)});if(_t){var Kt,rt,ht=X(Y)?I:Y,Gt=(Kt=(rt=ia(xe,Xe,!0))!==null&&rt!==void 0?rt:ht)!==null&&Kt!==void 0?Kt:0;pt=Ej({barGap:E,barCategoryGap:C,bandSize:Gt!==tt?Gt:tt,sizeList:jt[ue],maxBarSize:ht}),Gt!==tt&&(pt=pt.map(function(Et){return $($({},Et),{},{position:$($({},Et.position),{},{offset:Et.position.offset-Gt/2})})}))}var kn=z&&z.type&&z.type.getComposedData;kn&&F.push({props:$($({},kn($($({},le),{},{displayedData:U,props:x,dataKey:K,item:z,bandSize:tt,barPosition:pt,offset:g,stackedData:Ee,layout:k,dataStartIndex:A,dataEndIndex:_}))),{},G(G(G({key:z.key||"item-".concat(q)},M,le[M]),R,le[R]),"animationId",O)),childIndex:NS(z,x.children),item:z})}),F},h=function(x,b){var w=x.props,S=x.dataStartIndex,g=x.dataEndIndex,O=x.updateId;if(!$d({props:w}))return null;var A=w.children,_=w.layout,P=w.stackOffset,k=w.data,E=w.reverseStackOrder,C=wm(_),I=C.numericAxisName,N=C.cateAxisName,M=qe(A,n),R=Bj(k,M,"".concat(I,"Id"),"".concat(N,"Id"),P,E),D=u.reduce(function(L,K){var Y="".concat(K.axisType,"Map");return $($({},L),{},G({},Y,dN(w,$($({},K),{},{graphicalItems:M,stackGroups:K.axisType===I&&R,dataStartIndex:S,dataEndIndex:g}))))},{}),F=vN($($({},D),{},{props:w,graphicalItems:M}),b?.legendBBox);Object.keys(D).forEach(function(L){D[L]=f(w,D[L],F,L.replace("Map",""),r)});var z=D["".concat(N,"Map")],q=pN(z),U=d(w,$($({},D),{},{dataStartIndex:S,dataEndIndex:g,updateId:O,graphicalItems:M,stackGroups:R,offset:F}));return $($({formattedGraphicalItems:U,graphicalItems:M,offset:F,stackGroups:R},q),D)},y=function(p){function x(b){var w,S,g;return X$(this,x),g=J$(this,x,[b]),G(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),G(g,"accessibilityManager",new N$),G(g,"handleLegendBBoxUpdate",function(O){if(O){var A=g.state,_=A.dataStartIndex,P=A.dataEndIndex,k=A.updateId;g.setState($({legendBBox:O},h({props:g.props,dataStartIndex:_,dataEndIndex:P,updateId:k},$($({},g.state),{},{legendBBox:O}))))}}),G(g,"handleReceiveSyncEvent",function(O,A,_){if(g.props.syncId===O){if(_===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(A)}}),G(g,"handleBrushChange",function(O){var A=O.startIndex,_=O.endIndex;if(A!==g.state.dataStartIndex||_!==g.state.dataEndIndex){var P=g.state.updateId;g.setState(function(){return $({dataStartIndex:A,dataEndIndex:_},h({props:g.props,dataStartIndex:A,dataEndIndex:_,updateId:P},g.state))}),g.triggerSyncEvent({dataStartIndex:A,dataEndIndex:_})}}),G(g,"handleMouseEnter",function(O){var A=g.getMouseInfo(O);if(A){var _=$($({},A),{},{isTooltipActive:!0});g.setState(_),g.triggerSyncEvent(_);var P=g.props.onMouseEnter;H(P)&&P(_,O)}}),G(g,"triggeredAfterMouseMove",function(O){var A=g.getMouseInfo(O),_=A?$($({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(_),g.triggerSyncEvent(_);var P=g.props.onMouseMove;H(P)&&P(_,O)}),G(g,"handleItemMouseEnter",function(O){g.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),G(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),G(g,"handleMouseMove",function(O){O.persist(),g.throttleTriggeredAfterMouseMove(O)}),G(g,"handleMouseLeave",function(O){g.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};g.setState(A),g.triggerSyncEvent(A);var _=g.props.onMouseLeave;H(_)&&_(A,O)}),G(g,"handleOuterEvent",function(O){var A=$S(O),_=De(g.props,"".concat(A));if(A&&H(_)){var P,k;/.*touch.*/i.test(A)?k=g.getMouseInfo(O.changedTouches[0]):k=g.getMouseInfo(O),_((P=k)!==null&&P!==void 0?P:{},O)}}),G(g,"handleClick",function(O){var A=g.getMouseInfo(O);if(A){var _=$($({},A),{},{isTooltipActive:!0});g.setState(_),g.triggerSyncEvent(_);var P=g.props.onClick;H(P)&&P(_,O)}}),G(g,"handleMouseDown",function(O){var A=g.props.onMouseDown;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),G(g,"handleMouseUp",function(O){var A=g.props.onMouseUp;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),G(g,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),G(g,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseDown(O.changedTouches[0])}),G(g,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseUp(O.changedTouches[0])}),G(g,"handleDoubleClick",function(O){var A=g.props.onDoubleClick;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),G(g,"handleContextMenu",function(O){var A=g.props.onContextMenu;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),G(g,"triggerSyncEvent",function(O){g.props.syncId!==void 0&&Ku.emit(Gu,g.props.syncId,O,g.eventEmitterSymbol)}),G(g,"applySyncEvent",function(O){var A=g.props,_=A.layout,P=A.syncMethod,k=g.state.updateId,E=O.dataStartIndex,C=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)g.setState($({dataStartIndex:E,dataEndIndex:C},h({props:g.props,dataStartIndex:E,dataEndIndex:C,updateId:k},g.state)));else if(O.activeTooltipIndex!==void 0){var I=O.chartX,N=O.chartY,M=O.activeTooltipIndex,R=g.state,D=R.offset,F=R.tooltipTicks;if(!D)return;if(typeof P=="function")M=P(F,O);else if(P==="value"){M=-1;for(var z=0;z<F.length;z++)if(F[z].value===O.activeLabel){M=z;break}}var q=$($({},D),{},{x:D.left,y:D.top}),U=Math.min(I,q.x+q.width),L=Math.min(N,q.y+q.height),K=F[M]&&F[M].value,Y=dl(g.state,g.props.data,M),re=F[M]?{x:_==="horizontal"?F[M].coordinate:U,y:_==="horizontal"?L:F[M].coordinate}:$x;g.setState($($({},O),{},{activeLabel:K,activeCoordinate:re,activePayload:Y,activeTooltipIndex:M}))}else g.setState(O)}),G(g,"renderCursor",function(O){var A,_=g.state,P=_.isTooltipActive,k=_.activeCoordinate,E=_.activePayload,C=_.offset,I=_.activeTooltipIndex,N=_.tooltipAxisBandSize,M=g.getTooltipEventType(),R=(A=O.props.active)!==null&&A!==void 0?A:P,D=g.props.layout,F=O.key||"_recharts-cursor";return j.createElement(z$,{key:F,activeCoordinate:k,activePayload:E,activeTooltipIndex:I,chartName:r,element:O,isActive:R,layout:D,offset:C,tooltipAxisBandSize:N,tooltipEventType:M})}),G(g,"renderPolarAxis",function(O,A,_){var P=De(O,"type.axisType"),k=De(g.state,"".concat(P,"Map")),E=O.type.defaultProps,C=E!==void 0?$($({},E),O.props):O.props,I=k&&k[C["".concat(P,"Id")]];return T.cloneElement(O,$($({},I),{},{className:J(P,I.className),key:O.key||"".concat(A,"-").concat(_),ticks:it(I,!0)}))}),G(g,"renderPolarGrid",function(O){var A=O.props,_=A.radialLines,P=A.polarAngles,k=A.polarRadius,E=g.state,C=E.radiusAxisMap,I=E.angleAxisMap,N=yt(C),M=yt(I),R=M.cx,D=M.cy,F=M.innerRadius,z=M.outerRadius;return T.cloneElement(O,{polarAngles:Array.isArray(P)?P:it(M,!0).map(function(q){return q.coordinate}),polarRadius:Array.isArray(k)?k:it(N,!0).map(function(q){return q.coordinate}),cx:R,cy:D,innerRadius:F,outerRadius:z,key:O.key||"polar-grid",radialLines:_})}),G(g,"renderLegend",function(){var O=g.state.formattedGraphicalItems,A=g.props,_=A.children,P=A.width,k=A.height,E=g.props.margin||{},C=P-(E.left||0)-(E.right||0),I=Tb({children:_,formattedGraphicalItems:O,legendWidth:C,legendContent:c});if(!I)return null;var N=I.item,M=mm(I,W$);return T.cloneElement(N,$($({},M),{},{chartWidth:P,chartHeight:k,margin:E,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),G(g,"renderTooltip",function(){var O,A=g.props,_=A.children,P=A.accessibilityLayer,k=ke(_,Ye);if(!k)return null;var E=g.state,C=E.isTooltipActive,I=E.activeCoordinate,N=E.activePayload,M=E.activeLabel,R=E.offset,D=(O=k.props.active)!==null&&O!==void 0?O:C;return T.cloneElement(k,{viewBox:$($({},R),{},{x:R.left,y:R.top}),active:D,label:M,payload:D?N:[],coordinate:I,accessibilityLayer:P})}),G(g,"renderBrush",function(O){var A=g.props,_=A.margin,P=A.data,k=g.state,E=k.offset,C=k.dataStartIndex,I=k.dataEndIndex,N=k.updateId;return T.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Dn(g.handleBrushChange,O.props.onChange),data:P,x:B(O.props.x)?O.props.x:E.left,y:B(O.props.y)?O.props.y:E.top+E.height+E.brushBottom-(_.bottom||0),width:B(O.props.width)?O.props.width:E.width,startIndex:C,endIndex:I,updateId:"brush-".concat(N)})}),G(g,"renderReferenceElement",function(O,A,_){if(!O)return null;var P=g,k=P.clipPathId,E=g.state,C=E.xAxisMap,I=E.yAxisMap,N=E.offset,M=O.type.defaultProps||{},R=O.props,D=R.xAxisId,F=D===void 0?M.xAxisId:D,z=R.yAxisId,q=z===void 0?M.yAxisId:z;return T.cloneElement(O,{key:O.key||"".concat(A,"-").concat(_),xAxis:C[F],yAxis:I[q],viewBox:{x:N.left,y:N.top,width:N.width,height:N.height},clipPathId:k})}),G(g,"renderActivePoints",function(O){var A=O.item,_=O.activePoint,P=O.basePoint,k=O.childIndex,E=O.isRange,C=[],I=A.props.key,N=A.item.type.defaultProps!==void 0?$($({},A.item.type.defaultProps),A.item.props):A.item.props,M=N.activeDot,R=N.dataKey,D=$($({index:k,dataKey:R,cx:_.x,cy:_.y,r:4,fill:Vl(A.item),strokeWidth:2,stroke:"#fff",payload:_.payload,value:_.value},Z(M,!1)),Vn(M));return C.push(x.renderActiveDot(M,D,"".concat(I,"-activePoint-").concat(k))),P?C.push(x.renderActiveDot(M,$($({},D),{},{cx:P.x,cy:P.y}),"".concat(I,"-basePoint-").concat(k))):E&&C.push(null),C}),G(g,"renderGraphicChild",function(O,A,_){var P=g.filterFormatItem(O,A,_);if(!P)return null;var k=g.getTooltipEventType(),E=g.state,C=E.isTooltipActive,I=E.tooltipAxis,N=E.activeTooltipIndex,M=E.activeLabel,R=g.props.children,D=ke(R,Ye),F=P.props,z=F.points,q=F.isRange,U=F.baseLine,L=P.item.type.defaultProps!==void 0?$($({},P.item.type.defaultProps),P.item.props):P.item.props,K=L.activeDot,Y=L.hide,re=L.activeBar,ue=L.activeShape,Ve=!!(!Y&&C&&D&&(K||re||ue)),le={};k!=="axis"&&D&&D.props.trigger==="click"?le={onClick:Dn(g.handleItemMouseEnter,O.props.onClick)}:k!=="axis"&&(le={onMouseLeave:Dn(g.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Dn(g.handleItemMouseEnter,O.props.onMouseEnter)});var xe=T.cloneElement(O,$($({},P.props),le));function Xe(Tt){return typeof I.dataKey=="function"?I.dataKey(Tt.payload):null}if(Ve)if(N>=0){var Ee,_t;if(I.dataKey&&!I.allowDuplicatedCategory){var tt=typeof I.dataKey=="function"?Xe:"payload.".concat(I.dataKey.toString());Ee=Hn(z,tt,M),_t=q&&U&&Hn(U,tt,M)}else Ee=z?.[N],_t=q&&U&&U[N];if(ue||re){var pt=O.props.activeIndex!==void 0?O.props.activeIndex:N;return[T.cloneElement(O,$($($({},P.props),le),{},{activeIndex:pt})),null,null]}if(!X(Ee))return[xe].concat(Or(g.renderActivePoints({item:P,activePoint:Ee,basePoint:_t,childIndex:N,isRange:q})))}else{var jt,Kt=(jt=g.getItemByXY(g.state.activeCoordinate))!==null&&jt!==void 0?jt:{graphicalItem:xe},rt=Kt.graphicalItem,ht=rt.item,Gt=ht===void 0?O:ht,kn=rt.childIndex,Et=$($($({},P.props),le),{},{activeIndex:kn});return[T.cloneElement(Gt,Et),null,null]}return q?[xe,null,null]:[xe,null]}),G(g,"renderCustomized",function(O,A,_){return T.cloneElement(O,$($({key:"recharts-customized-".concat(_)},g.props),g.state))}),G(g,"renderMap",{CartesianGrid:{handler:zn,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:zn},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:zn},YAxis:{handler:zn},Brush:{handler:g.renderBrush,once:!0},Bar:{handler:g.renderGraphicChild},Line:{handler:g.renderGraphicChild},Area:{handler:g.renderGraphicChild},Radar:{handler:g.renderGraphicChild},RadialBar:{handler:g.renderGraphicChild},Scatter:{handler:g.renderGraphicChild},Pie:{handler:g.renderGraphicChild},Funnel:{handler:g.renderGraphicChild},Tooltip:{handler:g.renderCursor,once:!0},PolarGrid:{handler:g.renderPolarGrid,once:!0},PolarAngleAxis:{handler:g.renderPolarAxis},PolarRadiusAxis:{handler:g.renderPolarAxis},Customized:{handler:g.renderCustomized}}),g.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:_n("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=sb(g.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),g.state={},g}return tN(x,p),Z$(x,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,g=w.data,O=w.height,A=w.layout,_=ke(S,Ye);if(_){var P=_.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,E=dl(this.state,g,P,k),C=this.state.tooltipTicks[P].coordinate,I=(this.state.offset.top+O)/2,N=A==="horizontal",M=N?{x:C,y:I}:{y:C,x:I},R=this.state.formattedGraphicalItems.find(function(F){var z=F.item;return z.type.name==="Scatter"});R&&(M=$($({},M),R.props.points[P].tooltipPosition),E=R.props.points[P].tooltipPayload);var D={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:k,activePayload:E,activeCoordinate:M};this.setState(D),this.renderCursor(_),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var g,O;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(w){uc([ke(w.children,Ye)],[ke(this.props.children,Ye)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=ke(this.props.children,Ye);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return s.indexOf(S)>=0?S:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,g=S.getBoundingClientRect(),O=WP(g),A={chartX:Math.round(w.pageX-O.left),chartY:Math.round(w.pageY-O.top)},_=g.width/S.offsetWidth||1,P=this.inRange(A.chartX,A.chartY,_);if(!P)return null;var k=this.state,E=k.xAxisMap,C=k.yAxisMap,I=this.getTooltipEventType(),N=bm(this.state,this.props.data,this.props.layout,P);if(I!=="axis"&&E&&C){var M=yt(E).scale,R=yt(C).scale,D=M&&M.invert?M.invert(A.chartX):null,F=R&&R.invert?R.invert(A.chartY):null;return $($({},A),{},{xValue:D,yValue:F},N)}return N?$($({},A),N):null}},{key:"inRange",value:function(w,S){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,A=w/g,_=S/g;if(O==="horizontal"||O==="vertical"){var P=this.state.offset,k=A>=P.left&&A<=P.left+P.width&&_>=P.top&&_<=P.top+P.height;return k?{x:A,y:_}:null}var E=this.state,C=E.angleAxisMap,I=E.radiusAxisMap;if(C&&I){var N=yt(C);return Rv({x:A,y:_},N)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),g=ke(w,Ye),O={};g&&S==="axis"&&(g.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var A=Vn(this.props,this.handleOuterEvent);return $($({},A),O)}},{key:"addListener",value:function(){Ku.on(Gu,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Ku.removeListener(Gu,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,g){for(var O=this.state.formattedGraphicalItems,A=0,_=O.length;A<_;A++){var P=O[A];if(P.item===w||P.props.key===w.key||S===ot(P.item.type)&&g===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,g=S.left,O=S.top,A=S.height,_=S.width;return j.createElement("defs",null,j.createElement("clipPath",{id:w},j.createElement("rect",{x:g,y:O,height:A,width:_})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,g){var O=ym(g,2),A=O[0],_=O[1];return $($({},S),{},G({},A,_.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,g){var O=ym(g,2),A=O[0],_=O[1];return $($({},S),{},G({},A,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,g=S.formattedGraphicalItems,O=S.activeItem;if(g&&g.length)for(var A=0,_=g.length;A<_;A++){var P=g[A],k=P.props,E=P.item,C=E.type.defaultProps!==void 0?$($({},E.type.defaultProps),E.props):E.props,I=ot(E.type);if(I==="Bar"){var N=(k.data||[]).find(function(F){return TC(w,F)});if(N)return{graphicalItem:P,payload:N}}else if(I==="RadialBar"){var M=(k.data||[]).find(function(F){return Rv(w,F)});if(M)return{graphicalItem:P,payload:M}}else if(Ga(P,O)||Ha(P,O)||yn(P,O)){var R=bk({graphicalItem:P,activeTooltipItem:O,itemData:C.data}),D=C.activeIndex===void 0?R:C.activeIndex;return{graphicalItem:$($({},P),{},{childIndex:D}),payload:yn(P,O)?C.data[R]:P.props.data[R]}}}return null}},{key:"render",value:function(){var w=this;if(!$d(this))return null;var S=this.props,g=S.children,O=S.className,A=S.width,_=S.height,P=S.style,k=S.compact,E=S.title,C=S.desc,I=mm(S,U$),N=Z(I,!1);if(k)return j.createElement(Zy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},j.createElement(lc,Qt({},N,{width:A,height:_,title:E,desc:C}),this.renderClipPath(),Rd(g,this.renderMap)));if(this.props.accessibilityLayer){var M,R;N.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,N.role=(R=this.props.role)!==null&&R!==void 0?R:"application",N.onKeyDown=function(F){w.accessibilityManager.keyboardEvent(F)},N.onFocus=function(){w.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return j.createElement(Zy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},j.createElement("div",Qt({className:J("recharts-wrapper",O),style:$({position:"relative",cursor:"default",width:A,height:_},P)},D,{ref:function(z){w.container=z}}),j.createElement(lc,Qt({},N,{width:A,height:_,title:E,desc:C,style:sN}),this.renderClipPath(),Rd(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);G(y,"displayName",r),G(y,"defaultProps",$({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},l)),G(y,"getDerivedStateFromProps",function(p,x){var b=p.dataKey,w=p.data,S=p.children,g=p.width,O=p.height,A=p.layout,_=p.stackOffset,P=p.margin,k=x.dataStartIndex,E=x.dataEndIndex;if(x.updateId===void 0){var C=xm(p);return $($($({},C),{},{updateId:0},h($($({props:p},C),{},{updateId:0}),x)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:O,prevLayout:A,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(b!==x.prevDataKey||w!==x.prevData||g!==x.prevWidth||O!==x.prevHeight||A!==x.prevLayout||_!==x.prevStackOffset||!er(P,x.prevMargin)){var I=xm(p),N={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},M=$($({},bm(x,w,A)),{},{updateId:x.updateId+1}),R=$($($({},I),N),M);return $($($({},R),h($({props:p},R),x)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:O,prevLayout:A,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(!uc(S,x.prevChildren)){var D,F,z,q,U=ke(S,dr),L=U&&(D=(F=U.props)===null||F===void 0?void 0:F.startIndex)!==null&&D!==void 0?D:k,K=U&&(z=(q=U.props)===null||q===void 0?void 0:q.endIndex)!==null&&z!==void 0?z:E,Y=L!==k||K!==E,re=!X(w),ue=re&&!Y?x.updateId:x.updateId+1;return $($({updateId:ue},h($($({props:p},x),{},{updateId:ue,dataStartIndex:L,dataEndIndex:K}),x)),{},{prevChildren:S,dataStartIndex:L,dataEndIndex:K})}return null}),G(y,"renderActiveDot",function(p,x,b){var w;return T.isValidElement(p)?w=T.cloneElement(p,x):H(p)?w=p(x):w=j.createElement(Yl,x),j.createElement(ce,{className:"recharts-active-dot",key:b},w)});var v=T.forwardRef(function(x,b){return j.createElement(y,Qt({},x,{ref:b}))});return v.displayName=y.displayName,v},gN=mN({chartName:"LineChart",GraphicalChild:Cn,axisComponents:[{axisType:"xAxis",AxisComp:Qa},{axisType:"yAxis",AxisComp:ei}],formatAxisMap:vI});const bN=()=>m.jsx(Kw,{}),xN=()=>{const[t,e]=T.useState("Loading..."),[r,n]=T.useState("Loading..."),[a,i]=T.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});T.useEffect(()=>{let s=!0;const u=async()=>{try{const[f,l]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);s&&(e(f),i(l))}catch(f){console.error("Error fetching app information:",f)}},c=async()=>{try{const f=await df.healthCheck(pl.baseUrl),l=df.getServerVersion(f);s&&n(l)}catch(f){console.error("Error fetching server version:",f),s&&n("Unavailable")}};return u(),c(),()=>{s=!1}},[]);const o=(s,u,c)=>m.jsx(Ie,{label:m.jsx(Mm,{content:c,children:m.jsxs("span",{className:"inline-flex cursor-help items-center gap-1.5",children:[m.jsx(Yu,{size:12,className:"shrink-0"}),s]})}),value:u});return m.jsx(_e,{title:"Application updates and info",icon:Xx,description:"Check for updates and view information about your Local Operator installation.",dataTourTag:"settings-app-updates-section",children:m.jsxs("div",{className:"flex flex-col gap-6",children:[m.jsxs(vl,{children:[o("Application version",t,"The version of the Local Operator user interface application."),o("Server version",r,"The version of the Local Operator API server backend."),o("Platform",`${a.platform} (${a.arch})`,"The operating system and architecture your application is running on."),o("Node.js version",a.nodeVersion,"The JavaScript runtime environment version."),o("Electron version",a.electronVersion,"The framework version enabling this desktop application.")]}),m.jsx(bN,{})]})})},Rx="__cascade__";function Yt(t){return t==null?"":typeof t=="object"?JSON.stringify(t):String(t)}function wN(t,e){return t.kind==="cascade"?e!==Rx:t.kind==="list"?e!==t.value?.join(`
|
|
153
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e,",").concat(r+a-s*y," Z")}else f="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},TC=function(e,r){if(!e||!r)return!1;var n=e.x,a=e.y,i=r.x,o=r.y,s=r.width,u=r.height;if(Math.abs(s)>0&&Math.abs(u)>0){var c=Math.min(i,i+s),f=Math.max(i,i+s),l=Math.min(o,o+u),d=Math.max(o,o+u);return n>=c&&n<=f&&a>=l&&a<=d}return!1},CC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Xl=function(e){var r=py(py({},CC),e),n=T.useRef(),a=T.useState(-1),i=wC(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var u=r.x,c=r.y,f=r.width,l=r.height,d=r.radius,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,x=r.isAnimationActive,b=r.isUpdateAnimationActive;if(u!==+u||c!==+c||f!==+f||l!==+l||f===0||l===0)return null;var w=J("recharts-rectangle",h);return b?j.createElement(ct,{canBegin:o>0,from:{width:f,height:l,x:u,y:c},to:{width:f,height:l,x:u,y:c},duration:v,animationEasing:y,isActive:b},function(S){var g=S.width,O=S.height,A=S.x,_=S.y;return j.createElement(ct,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:x,easing:y},j.createElement("path",fa({},Z(r,!0),{className:w,d:hy(A,_,g,O,d),ref:n})))}):j.createElement("path",fa({},Z(r,!0),{className:w,d:hy(u,c,f,l,d)}))};function Uc(){return Uc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Uc.apply(this,arguments)}var Yl=function(e){var r=e.cx,n=e.cy,a=e.r,i=e.className,o=J("recharts-dot",i);return r===+r&&n===+n&&a===+a?j.createElement("circle",Uc({},Z(e,!1),Vn(e),{className:o,cx:r,cy:n,r:a})):null};function pn(t){"@babel/helpers - typeof";return pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pn(t)}var kC=["x","y","top","left","width","height","className"];function Gc(){return Gc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gc.apply(this,arguments)}function vy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function IC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vy(Object(r),!0).forEach(function(n){MC(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function MC(t,e,r){return e=$C(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $C(t){var e=NC(t,"string");return pn(e)=="symbol"?e:e+""}function NC(t,e){if(pn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function RC(t,e){if(t==null)return{};var r=DC(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function DC(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var qC=function(e,r,n,a,i,o){return"M".concat(e,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},LC=function(e){var r=e.x,n=r===void 0?0:r,a=e.y,i=a===void 0?0:a,o=e.top,s=o===void 0?0:o,u=e.left,c=u===void 0?0:u,f=e.width,l=f===void 0?0:f,d=e.height,h=d===void 0?0:d,y=e.className,v=RC(e,kC),p=IC({x:n,y:i,top:s,left:c,width:l,height:h},v);return!B(n)||!B(i)||!B(l)||!B(h)||!B(s)||!B(c)?null:j.createElement("path",Gc({},Z(p,!0),{className:J("recharts-cross",y),d:qC(n,i,l,h,s,c)}))},Au,yy;function BC(){if(yy)return Au;yy=1;var t=Ug(),e=t(Object.getPrototypeOf,Object);return Au=e,Au}var Pu,my;function FC(){if(my)return Pu;my=1;var t=ft(),e=BC(),r=dt(),n="[object Object]",a=Function.prototype,i=Object.prototype,o=a.toString,s=i.hasOwnProperty,u=o.call(Object);function c(f){if(!r(f)||t(f)!=n)return!1;var l=e(f);if(l===null)return!0;var d=s.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&o.call(d)==u}return Pu=c,Pu}var zC=FC();const WC=ie(zC);var _u,gy;function UC(){if(gy)return _u;gy=1;var t=ft(),e=dt(),r="[object Boolean]";function n(a){return a===!0||a===!1||e(a)&&t(a)==r}return _u=n,_u}var GC=UC();const KC=ie(GC);function hn(t){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(t)}function da(){return da=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},da.apply(this,arguments)}function HC(t,e){return ZC(t)||YC(t,e)||XC(t,e)||VC()}function VC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
154
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XC(t,e){if(t){if(typeof t=="string")return by(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return by(t,e)}}function by(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function YC(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function ZC(t){if(Array.isArray(t))return t}function xy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xy(Object(r),!0).forEach(function(n){JC(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function JC(t,e,r){return e=QC(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QC(t){var e=ek(t,"string");return hn(e)=="symbol"?e:e+""}function ek(t,e){if(hn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Oy=function(e,r,n,a,i){var o=n-a,s;return s="M ".concat(e,",").concat(r),s+="L ".concat(e+n,",").concat(r),s+="L ".concat(e+n-o/2,",").concat(r+i),s+="L ".concat(e+n-o/2-a,",").concat(r+i),s+="L ".concat(e,",").concat(r," Z"),s},tk={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rk=function(e){var r=wy(wy({},tk),e),n=T.useRef(),a=T.useState(-1),i=HC(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var u=r.x,c=r.y,f=r.upperWidth,l=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,x=r.isUpdateAnimationActive;if(u!==+u||c!==+c||f!==+f||l!==+l||d!==+d||f===0&&l===0||d===0)return null;var b=J("recharts-trapezoid",h);return x?j.createElement(ct,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:c},to:{upperWidth:f,lowerWidth:l,height:d,x:u,y:c},duration:v,animationEasing:y,isActive:x},function(w){var S=w.upperWidth,g=w.lowerWidth,O=w.height,A=w.x,_=w.y;return j.createElement(ct,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},j.createElement("path",da({},Z(r,!0),{className:b,d:Oy(A,_,S,g,O),ref:n})))}):j.createElement("g",null,j.createElement("path",da({},Z(r,!0),{className:b,d:Oy(u,c,f,l,d)})))},nk=["option","shapeType","propTransformer","activeClassName","isActive"];function vn(t){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(t)}function ak(t,e){if(t==null)return{};var r=ik(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ik(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Sy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sy(Object(r),!0).forEach(function(n){ok(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ok(t,e,r){return e=sk(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sk(t){var e=uk(t,"string");return vn(e)=="symbol"?e:e+""}function uk(t,e){if(vn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ck(t,e){return pa(pa({},e),t)}function lk(t,e){return t==="symbols"}function Ay(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return j.createElement(Xl,r);case"trapezoid":return j.createElement(rk,r);case"sector":return j.createElement(qb,r);case"symbols":if(lk(e))return j.createElement(Rl,r);break;default:return null}}function fk(t){return T.isValidElement(t)?t.props:t}function dk(t){var e=t.option,r=t.shapeType,n=t.propTransformer,a=n===void 0?ck:n,i=t.activeClassName,o=i===void 0?"recharts-active-shape":i,s=t.isActive,u=ak(t,nk),c;if(T.isValidElement(e))c=T.cloneElement(e,pa(pa({},u),fk(e)));else if(H(e))c=e(u);else if(WC(e)&&!KC(e)){var f=a(e,u);c=j.createElement(Ay,{shapeType:r,elementProps:f})}else{var l=u;c=j.createElement(Ay,{shapeType:r,elementProps:l})}return s?j.createElement(ce,{className:o},c):c}function Ka(t,e){return e!=null&&"trapezoids"in t.props}function Ha(t,e){return e!=null&&"sectors"in t.props}function yn(t,e){return e!=null&&"points"in t.props}function pk(t,e){var r,n,a=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,i=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return a&&i}function hk(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function vk(t,e){var r=t.x===e.x,n=t.y===e.y,a=t.z===e.z;return r&&n&&a}function yk(t,e){var r;return Ka(t,e)?r=pk:Ha(t,e)?r=hk:yn(t,e)&&(r=vk),r}function mk(t,e){var r;return Ka(t,e)?r="trapezoids":Ha(t,e)?r="sectors":yn(t,e)&&(r="points"),r}function gk(t,e){if(Ka(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Ha(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return yn(t,e)?e.payload:{}}function bk(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,a=mk(r,e),i=gk(r,e),o=n.filter(function(u,c){var f=Wa(i,u),l=r.props[a].filter(function(y){var v=yk(r,e);return v(y,e)}),d=r.props[a].indexOf(l[l.length-1]),h=c===d;return f&&h}),s=n.indexOf(o[o.length-1]);return s}var ju,Py;function xk(){if(Py)return ju;Py=1;var t=Math.ceil,e=Math.max;function r(n,a,i,o){for(var s=-1,u=e(t((a-n)/(i||1)),0),c=Array(u);u--;)c[o?u:++s]=n,n+=i;return c}return ju=r,ju}var Eu,_y;function Kb(){if(_y)return Eu;_y=1;var t=ob(),e=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=t(a),a===e||a===-1/0){var i=a<0?-1:1;return i*r}return a===a?a:0}return Eu=n,Eu}var Tu,jy;function wk(){if(jy)return Tu;jy=1;var t=xk(),e=Ba(),r=Kb();function n(a){return function(i,o,s){return s&&typeof s!="number"&&e(i,o,s)&&(o=s=void 0),i=r(i),o===void 0?(o=i,i=0):o=r(o),s=s===void 0?i<o?1:-1:r(s),t(i,o,s,a)}}return Tu=n,Tu}var Cu,Ey;function Ok(){if(Ey)return Cu;Ey=1;var t=wk(),e=t();return Cu=e,Cu}var Sk=Ok();const ha=ie(Sk);function mn(t){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(t)}function Ty(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Cy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ty(Object(r),!0).forEach(function(n){Hb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hb(t,e,r){return e=Ak(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ak(t){var e=Pk(t,"string");return mn(e)=="symbol"?e:e+""}function Pk(t,e){if(mn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _k=["Webkit","Moz","O","ms"],jk=function(e,r){var n=e.replace(/(\w)/,function(i){return i.toUpperCase()}),a=_k.reduce(function(i,o){return Cy(Cy({},i),{},Hb({},o+n,r))},{});return a[e]=r,a};function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function va(){return va=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},va.apply(this,arguments)}function ky(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ku(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ky(Object(r),!0).forEach(function(n){Ce(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ky(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ek(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Iy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xb(n.key),n)}}function Tk(t,e,r){return e&&Iy(t.prototype,e),r&&Iy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ck(t,e,r){return e=ya(e),kk(t,Vb()?Reflect.construct(e,r||[],ya(t).constructor):e.apply(t,r))}function kk(t,e){if(e&&(fr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ik(t)}function Ik(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vb(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vb=function(){return!!t})()}function ya(t){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ya(t)}function Mk(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kc(t,e)}function Kc(t,e){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kc(t,e)}function Ce(t,e,r){return e=Xb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xb(t){var e=$k(t,"string");return fr(e)=="symbol"?e:e+""}function $k(t,e){if(fr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Nk=function(e){var r=e.data,n=e.startIndex,a=e.endIndex,i=e.x,o=e.width,s=e.travellerWidth;if(!r||!r.length)return{};var u=r.length,c=Fr().domain(ha(0,u)).range([i,i+o-s]),f=c.domain().map(function(l){return c(l)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(a),scale:c,scaleValues:f}},My=function(e){return e.changedTouches&&!!e.changedTouches.length},dr=function(t){function e(r){var n;return Ek(this,e),n=Ck(this,e,[r]),Ce(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),Ce(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),Ce(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o?.({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),Ce(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Ce(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Ce(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Ce(n,"handleSlideDragStart",function(a){var i=My(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Mk(e,t),Tk(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,u=s.gap,c=s.data,f=c.length-1,l=Math.min(a,i),d=Math.max(a,i),h=e.getIndexInRange(o,l),y=e.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:y===f?f:y-y%u}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,u=$e(i[n],s,n);return H(o)?o(u,n):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,u=this.props,c=u.x,f=u.width,l=u.travellerWidth,d=u.startIndex,h=u.endIndex,y=u.onChange,v=n.pageX-i;v>0?v=Math.min(v,c+f-l-s,c+f-l-o):v<0&&(v=Math.max(v,c-o,c-s));var p=this.getIndex({startX:o+v,endX:s+v});(p.startIndex!==d||p.endIndex!==h)&&y&&y(p),this.setState({startX:o+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=My(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,u=a.startX,c=this.state[o],f=this.props,l=f.x,d=f.width,h=f.travellerWidth,y=f.onChange,v=f.gap,p=f.data,x={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,l+d-h-c):b<0&&(b=Math.max(b,l-c)),x[o]=c+b;var w=this.getIndex(x),S=w.startIndex,g=w.endIndex,O=function(){var _=p.length-1;return o==="startX"&&(s>u?S%v===0:g%v===0)||s<u&&g===_||o==="endX"&&(s>u?g%v===0:S%v===0)||s>u&&g===_};this.setState(Ce(Ce({},o,c+b),"brushMoveStartX",n.pageX),function(){y&&O()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,u=o.startX,c=o.endX,f=this.state[a],l=s.indexOf(f);if(l!==-1){var d=l+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=c||a==="endX"&&h<=u||this.setState(Ce({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,u=n.fill,c=n.stroke;return j.createElement("rect",{stroke:c,fill:u,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,u=n.data,c=n.children,f=n.padding,l=T.Children.only(c);return l?j.cloneElement(l,{x:a,y:i,width:o,height:s,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,u=this.props,c=u.y,f=u.travellerWidth,l=u.height,d=u.traveller,h=u.ariaLabel,y=u.data,v=u.startIndex,p=u.endIndex,x=Math.max(n,this.props.x),b=ku(ku({},Z(this.props,!1)),{},{x,y:c,width:f,height:l}),w=h||"Min value: ".concat((i=y[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return j.createElement(ce,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(g){["ArrowLeft","ArrowRight"].includes(g.key)&&(g.preventDefault(),g.stopPropagation(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,u=i.stroke,c=i.travellerWidth,f=Math.min(n,a)+c,l=Math.max(Math.abs(a-n)-c,0);return j.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:l,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,u=n.travellerWidth,c=n.stroke,f=this.state,l=f.startX,d=f.endX,h=5,y={pointerEvents:"none",fill:c};return j.createElement(ce,{className:"recharts-brush-texts"},j.createElement(ta,va({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,d)-h,y:o+s/2},y),this.getTextOfTick(a)),j.createElement(ta,va({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,d)+u+h,y:o+s/2},y),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,u=n.y,c=n.width,f=n.height,l=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,x=d.isTravellerMoving,b=d.isTravellerFocused;if(!a||!a.length||!B(s)||!B(u)||!B(c)||!B(f)||c<=0||f<=0)return null;var w=J("recharts-brush",i),S=j.Children.count(o)===1,g=jk("userSelect","none");return j.createElement(ce,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||x||b||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,u=n.stroke,c=Math.floor(i+s/2)-1;return j.createElement(j.Fragment,null,j.createElement("rect",{x:a,y:i,width:o,height:s,fill:u,stroke:"none"}),j.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),j.createElement("line",{x1:a+1,y1:c+2,x2:a+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return j.isValidElement(n)?i=j.cloneElement(n,a):H(n)?i=n(a):i=e.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,u=n.travellerWidth,c=n.updateId,f=n.startIndex,l=n.endIndex;if(i!==a.prevData||c!==a.prevUpdateId)return ku({prevData:i,prevTravellerWidth:u,prevUpdateId:c,prevX:s,prevWidth:o},i&&i.length?Nk({data:i,width:o,x:s,travellerWidth:u,startIndex:f,endIndex:l}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([s,s+o-u]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:u,prevUpdateId:c,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var u=Math.floor((o+s)/2);n[u]>a?s=u:o=u}return a>=n[s]?s:o}}])}(T.PureComponent);Ce(dr,"displayName","Brush");Ce(dr,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Iu,$y;function Rk(){if($y)return Iu;$y=1;var t=Wl();function e(r,n){var a;return t(r,function(i,o,s){return a=n(i,o,s),!a}),!!a}return Iu=e,Iu}var Mu,Ny;function Dk(){if(Ny)return Mu;Ny=1;var t=Dg(),e=At(),r=Rk(),n=je(),a=Ba();function i(o,s,u){var c=n(o)?t:r;return u&&a(o,s,u)&&(s=void 0),c(o,e(s,3))}return Mu=i,Mu}var qk=Dk();const Lk=ie(qk);var Je=function(e,r){var n=e.alwaysShow,a=e.ifOverflow;return n&&(a="extendDomain"),a===r},$u,Ry;function Bk(){if(Ry)return $u;Ry=1;var t=tb();function e(r,n,a){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return $u=e,$u}var Nu,Dy;function Fk(){if(Dy)return Nu;Dy=1;var t=Bk(),e=Qg(),r=At();function n(a,i){var o={};return i=r(i,3),e(a,function(s,u,c){t(o,u,i(s,u,c))}),o}return Nu=n,Nu}var zk=Fk();const Wk=ie(zk);var Ru,qy;function Uk(){if(qy)return Ru;qy=1;function t(e,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(!r(e[n],n,e))return!1;return!0}return Ru=t,Ru}var Du,Ly;function Gk(){if(Ly)return Du;Ly=1;var t=Wl();function e(r,n){var a=!0;return t(r,function(i,o,s){return a=!!n(i,o,s),a}),a}return Du=e,Du}var qu,By;function Kk(){if(By)return qu;By=1;var t=Uk(),e=Gk(),r=At(),n=je(),a=Ba();function i(o,s,u){var c=n(o)?t:e;return u&&a(o,s,u)&&(s=void 0),c(o,r(s,3))}return qu=i,qu}var Hk=Kk();const Yb=ie(Hk);var Vk=["x","y"];function gn(t){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(t)}function Hc(){return Hc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hc.apply(this,arguments)}function Fy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fy(Object(r),!0).forEach(function(n){Xk(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xk(t,e,r){return e=Yk(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yk(t){var e=Zk(t,"string");return gn(e)=="symbol"?e:e+""}function Zk(t,e){if(gn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jk(t,e){if(t==null)return{};var r=Qk(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Qk(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function eI(t,e){var r=t.x,n=t.y,a=Jk(t,Vk),i="".concat(r),o=parseInt(i,10),s="".concat(n),u=parseInt(s,10),c="".concat(e.height||a.height),f=parseInt(c,10),l="".concat(e.width||a.width),d=parseInt(l,10);return Nr(Nr(Nr(Nr(Nr({},e),a),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:e.name,radius:e.radius})}function zy(t){return j.createElement(dk,Hc({shapeType:"rectangle",propTransformer:eI,activeClassName:"recharts-active-bar"},t))}var tI=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof e=="number")return e;var i=typeof n=="number";return i?e(n,a):(i||Bt(),r)}},rI=["value","background"],Zb;function pr(t){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(t)}function nI(t,e){if(t==null)return{};var r=aI(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function aI(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ma(){return ma=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ma.apply(this,arguments)}function Wy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function fe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wy(Object(r),!0).forEach(function(n){gt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qb(n.key),n)}}function oI(t,e,r){return e&&Uy(t.prototype,e),r&&Uy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function sI(t,e,r){return e=ga(e),uI(t,Jb()?Reflect.construct(e,r||[],ga(t).constructor):e.apply(t,r))}function uI(t,e){if(e&&(pr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cI(t)}function cI(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jb(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jb=function(){return!!t})()}function ga(t){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(t)}function lI(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vc(t,e)}function Vc(t,e){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vc(t,e)}function gt(t,e,r){return e=Qb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qb(t){var e=fI(t,"string");return pr(e)=="symbol"?e:e+""}function fI(t,e){if(pr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Tn=function(t){function e(){var r;iI(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=sI(this,e,[].concat(a)),gt(r,"state",{isAnimationFinished:!1}),gt(r,"id",_n("recharts-bar-")),gt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),gt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return lI(e,t),oI(e,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,u=i.activeIndex,c=i.activeBar,f=Z(this.props,!1);return n&&n.map(function(l,d){var h=d===u,y=h?c:o,v=fe(fe(fe({},f),l),{},{isActive:h,option:y,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return j.createElement(ce,ma({className:"recharts-bar-rectangle"},Xn(a.props,l,d),{key:"rectangle-".concat(l?.x,"-").concat(l?.y,"-").concat(l?.value,"-").concat(d)}),j.createElement(zy,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,u=a.animationBegin,c=a.animationDuration,f=a.animationEasing,l=a.animationId,d=this.state.prevData;return j.createElement(ct,{begin:u,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,v=i.map(function(p,x){var b=d&&d[x];if(b){var w=Ue(b.x,p.x),S=Ue(b.y,p.y),g=Ue(b.width,p.width),O=Ue(b.height,p.height);return fe(fe({},p),{},{x:w(y),y:S(y),width:g(y),height:O(y)})}if(o==="horizontal"){var A=Ue(0,p.height),_=A(y);return fe(fe({},p),{},{y:p.y+p.height-_,height:_})}var P=Ue(0,p.width),k=P(y);return fe(fe({},p),{},{width:k})});return j.createElement(ce,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Wa(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,u=Z(this.props.background,!1);return i.map(function(c,f){c.value;var l=c.background,d=nI(c,rI);if(!l)return null;var h=fe(fe(fe(fe(fe({},d),{},{fill:"#eee"},l),u),Xn(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return j.createElement(zy,ma({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,u=i.yAxis,c=i.layout,f=i.children,l=qe(f,En);if(!l)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(p,x){var b=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:b,errorVal:$e(p,x)}},y={clipPath:n?"url(#clipPath-".concat(a,")"):null};return j.createElement(ce,y,l.map(function(v){return j.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:u,layout:c,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,u=n.yAxis,c=n.left,f=n.top,l=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,x=J("recharts-bar",o),b=s&&s.allowDataOverflow,w=u&&u.allowDataOverflow,S=b||w,g=X(v)?this.id:v;return j.createElement(ce,{className:x},b||w?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(g)},j.createElement("rect",{x:b?c:c-l/2,y:w?f:f-d/2,width:b?l:l*2,height:w?d:d*2}))):null,j.createElement(ce,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(g,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,g),(!h||p)&&xt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(T.PureComponent);Zb=Tn;gt(Tn,"displayName","Bar");gt(Tn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!_r.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});gt(Tn,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,a=t.bandSize,i=t.xAxis,o=t.yAxis,s=t.xAxisTicks,u=t.yAxisTicks,c=t.stackedData,f=t.dataStartIndex,l=t.displayedData,d=t.offset,h=$j(n,r);if(!h)return null;var y=e.layout,v=r.type.defaultProps,p=v!==void 0?fe(fe({},v),r.props):r.props,x=p.dataKey,b=p.children,w=p.minPointSize,S=y==="horizontal"?o:i,g=c?S.scale.domain():null,O=zj({numericAxis:S}),A=qe(b,ub),_=l.map(function(P,k){var E,C,I,N,M,R;c?E=Nj(c[f+k],g):(E=$e(P,x),Array.isArray(E)||(E=[O,E]));var D=tI(w,Zb.defaultProps.minPointSize)(E[1],k);if(y==="horizontal"){var F,z=[o.scale(E[0]),o.scale(E[1])],q=z[0],U=z[1];C=Cv({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:P,index:k}),I=(F=U??q)!==null&&F!==void 0?F:void 0,N=h.size;var L=q-U;if(M=Number.isNaN(L)?0:L,R={x:C,y:o.y,width:N,height:o.height},Math.abs(D)>0&&Math.abs(M)<Math.abs(D)){var G=Ge(M||D)*(Math.abs(D)-Math.abs(M));I-=G,M+=G}}else{var Y=[i.scale(E[0]),i.scale(E[1])],re=Y[0],ue=Y[1];if(C=re,I=Cv({axis:o,ticks:u,bandSize:a,offset:h.offset,entry:P,index:k}),N=ue-re,M=h.size,R={x:i.x,y:I,width:i.width,height:M},Math.abs(D)>0&&Math.abs(N)<Math.abs(D)){var Ve=Ge(N||D)*(Math.abs(D)-Math.abs(N));N+=Ve}}return fe(fe(fe({},P),{},{x:C,y:I,width:N,height:M,value:c?E:E[1],payload:P,background:R},A&&A[k]&&A[k].props),{},{tooltipPayload:[Nb(r,P)],tooltipPosition:{x:C+N/2,y:I+M/2}})});return fe({data:_,layout:y},d)});function bn(t){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(t)}function dI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ex(n.key),n)}}function pI(t,e,r){return e&&Gy(t.prototype,e),r&&Gy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ky(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ze(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ky(Object(r),!0).forEach(function(n){Va(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ky(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Va(t,e,r){return e=ex(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ex(t){var e=hI(t,"string");return bn(e)=="symbol"?e:e+""}function hI(t,e){if(bn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vI=function(e,r,n,a,i){var o=e.width,s=e.height,u=e.layout,c=e.children,f=Object.keys(r),l={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!ke(c,Tn);return f.reduce(function(h,y){var v=r[y],p=v.orientation,x=v.domain,b=v.padding,w=b===void 0?{}:b,S=v.mirror,g=v.reversed,O="".concat(p).concat(S?"Mirror":""),A,_,P,k,E;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var C=x[1]-x[0],I=1/0,N=v.categoricalDomain.sort(SS);if(N.forEach(function(Y,re){re>0&&(I=Math.min((Y||0)-(N[re-1]||0),I))}),Number.isFinite(I)){var M=I/C,R=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(A=M*R/2),v.padding==="no-gap"){var D=qt(e.barCategoryGap,M*R),F=M*R/2;A=F-D-(F-D)/R*D}}}a==="xAxis"?_=[n.left+(w.left||0)+(A||0),n.left+n.width-(w.right||0)-(A||0)]:a==="yAxis"?_=u==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(A||0),n.top+n.height-(w.bottom||0)-(A||0)]:_=v.range,g&&(_=[_[1],_[0]]);var z=Ij(v,i,d),q=z.scale,U=z.realScaleType;q.domain(x).range(_),Mj(q);var L=Fj(q,ze(ze({},v),{},{realScaleType:U}));a==="xAxis"?(E=p==="top"&&!S||p==="bottom"&&S,P=n.left,k=l[O]-E*v.height):a==="yAxis"&&(E=p==="left"&&!S||p==="right"&&S,P=l[O]-E*v.width,k=n.top);var G=ze(ze(ze({},v),L),{},{realScaleType:U,x:P,y:k,scale:q,width:a==="xAxis"?n.width:v.width,height:a==="yAxis"?n.height:v.height});return G.bandSize=ia(G,L),!v.hide&&a==="xAxis"?l[O]+=(E?-1:1)*G.height:v.hide||(l[O]+=(E?-1:1)*G.width),ze(ze({},h),{},Va({},y,G))},{})},tx=function(e,r){var n=e.x,a=e.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},yI=function(e){var r=e.x1,n=e.y1,a=e.x2,i=e.y2;return tx({x:r,y:n},{x:a,y:i})},rx=function(){function t(e){dI(this,t),this.scale=e}return pI(t,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new t(r)}}])}();Va(rx,"EPS",1e-4);var Zl=function(e){var r=Object.keys(e).reduce(function(n,a){return ze(ze({},n),{},Va({},a,rx.create(e[a])))},{});return ze(ze({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return Wk(a,function(u,c){return r[c].apply(u,{bandAware:o,position:s})})},isInRange:function(a){return Yb(a,function(i,o){return r[o].isInRange(i)})}})};function mI(t){return(t%180+180)%180}var gI=function(e){var r=e.width,n=e.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=mI(a),o=i*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},Lu,Hy;function bI(){if(Hy)return Lu;Hy=1;var t=At(),e=jn(),r=qa();function n(a){return function(i,o,s){var u=Object(i);if(!e(i)){var c=t(o,3);i=r(i),o=function(l){return c(u[l],l,u)}}var f=a(i,o,s);return f>-1?u[c?i[f]:f]:void 0}}return Lu=n,Lu}var Bu,Vy;function xI(){if(Vy)return Bu;Vy=1;var t=Kb();function e(r){var n=t(r),a=n%1;return n===n?a?n-a:n:0}return Bu=e,Bu}var Fu,Xy;function wI(){if(Xy)return Fu;Xy=1;var t=Vg(),e=At(),r=xI(),n=Math.max;function a(i,o,s){var u=i==null?0:i.length;if(!u)return-1;var c=s==null?0:r(s);return c<0&&(c=n(u+c,0)),t(i,e(o,3),c)}return Fu=a,Fu}var zu,Yy;function OI(){if(Yy)return zu;Yy=1;var t=bI(),e=wI(),r=t(e);return zu=r,zu}var SI=OI();const AI=ie(SI);var PI=_g();const _I=ie(PI);var jI=_I(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),Jl=T.createContext(void 0),Ql=T.createContext(void 0),nx=T.createContext(void 0),ax=T.createContext({}),ix=T.createContext(void 0),ox=T.createContext(0),sx=T.createContext(0),Zy=function(e){var r=e.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=e.clipPathId,s=e.children,u=e.width,c=e.height,f=jI(i);return j.createElement(Jl.Provider,{value:n},j.createElement(Ql.Provider,{value:a},j.createElement(ax.Provider,{value:i},j.createElement(nx.Provider,{value:f},j.createElement(ix.Provider,{value:o},j.createElement(ox.Provider,{value:c},j.createElement(sx.Provider,{value:u},s)))))))},EI=function(){return T.useContext(ix)},ux=function(e){var r=T.useContext(Jl);r==null&&Bt();var n=r[e];return n==null&&Bt(),n},TI=function(){var e=T.useContext(Jl);return yt(e)},CI=function(){var e=T.useContext(Ql),r=AI(e,function(n){return Yb(n.domain,Number.isFinite)});return r||yt(e)},cx=function(e){var r=T.useContext(Ql);r==null&&Bt();var n=r[e];return n==null&&Bt(),n},kI=function(){var e=T.useContext(nx);return e},II=function(){return T.useContext(ax)},ef=function(){return T.useContext(sx)},tf=function(){return T.useContext(ox)};function hr(t){"@babel/helpers - typeof";return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(t)}function MI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $I(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fx(n.key),n)}}function NI(t,e,r){return e&&$I(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function RI(t,e,r){return e=ba(e),DI(t,lx()?Reflect.construct(e,r||[],ba(t).constructor):e.apply(t,r))}function DI(t,e){if(e&&(hr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qI(t)}function qI(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lx=function(){return!!t})()}function ba(t){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ba(t)}function LI(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xc(t,e)}function Xc(t,e){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xc(t,e)}function Jy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Qy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jy(Object(r),!0).forEach(function(n){rf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rf(t,e,r){return e=fx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fx(t){var e=BI(t,"string");return hr(e)=="symbol"?e:e+""}function BI(t,e){if(hr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function FI(t,e){return GI(t)||UI(t,e)||WI(t,e)||zI()}function zI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
155
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WI(t,e){if(t){if(typeof t=="string")return em(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return em(t,e)}}function em(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function UI(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function GI(t){if(Array.isArray(t))return t}function Yc(){return Yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yc.apply(this,arguments)}var KI=function(e,r){var n;return j.isValidElement(e)?n=j.cloneElement(e,r):H(e)?n=e(r):n=j.createElement("line",Yc({},r,{className:"recharts-reference-line-line"})),n},HI=function(e,r,n,a,i,o,s,u,c){var f=i.x,l=i.y,d=i.width,h=i.height;if(n){var y=c.y,v=e.y.apply(y,{position:o});if(Je(c,"discard")&&!e.y.isInRange(v))return null;var p=[{x:f+d,y:v},{x:f,y:v}];return u==="left"?p.reverse():p}if(r){var x=c.x,b=e.x.apply(x,{position:o});if(Je(c,"discard")&&!e.x.isInRange(b))return null;var w=[{x:b,y:l+h},{x:b,y:l}];return s==="top"?w.reverse():w}if(a){var S=c.segment,g=S.map(function(O){return e.apply(O,{position:o})});return Je(c,"discard")&&Lk(g,function(O){return!e.isInRange(O)})?null:g}return null};function VI(t){var e=t.x,r=t.y,n=t.segment,a=t.xAxisId,i=t.yAxisId,o=t.shape,s=t.className,u=t.alwaysShow,c=EI(),f=ux(a),l=cx(i),d=kI();if(!c||!d)return null;st(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Zl({x:f.scale,y:l.scale}),y=ve(e),v=ve(r),p=n&&n.length===2,x=HI(h,y,v,p,d,t.position,f.orientation,l.orientation,t);if(!x)return null;var b=FI(x,2),w=b[0],S=w.x,g=w.y,O=b[1],A=O.x,_=O.y,P=Je(t,"hidden")?"url(#".concat(c,")"):void 0,k=Qy(Qy({clipPath:P},Z(t,!0)),{},{x1:S,y1:g,x2:A,y2:_});return j.createElement(ce,{className:J("recharts-reference-line",s)},KI(o,k),Oe.renderCallByParent(t,yI({x1:S,y1:g,x2:A,y2:_})))}var nf=function(t){function e(){return MI(this,e),RI(this,e,arguments)}return LI(e,t),NI(e,[{key:"render",value:function(){return j.createElement(VI,this.props)}}])}(j.Component);rf(nf,"displayName","ReferenceLine");rf(nf,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Zc(){return Zc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zc.apply(this,arguments)}function vr(t){"@babel/helpers - typeof";return vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(t)}function tm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function rm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tm(Object(r),!0).forEach(function(n){Xa(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function XI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,px(n.key),n)}}function ZI(t,e,r){return e&&YI(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function JI(t,e,r){return e=xa(e),QI(t,dx()?Reflect.construct(e,r||[],xa(t).constructor):e.apply(t,r))}function QI(t,e){if(e&&(vr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eM(t)}function eM(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dx=function(){return!!t})()}function xa(t){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xa(t)}function tM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jc(t,e)}function Jc(t,e){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jc(t,e)}function Xa(t,e,r){return e=px(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function px(t){var e=rM(t,"string");return vr(e)=="symbol"?e:e+""}function rM(t,e){if(vr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var nM=function(e){var r=e.x,n=e.y,a=e.xAxis,i=e.yAxis,o=Zl({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Je(e,"discard")&&!o.isInRange(s)?null:s},Ya=function(t){function e(){return XI(this,e),JI(this,e,arguments)}return tM(e,t),ZI(e,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,u=n.clipPathId,c=ve(a),f=ve(i);if(st(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var l=nM(this.props);if(!l)return null;var d=l.x,h=l.y,y=this.props,v=y.shape,p=y.className,x=Je(this.props,"hidden")?"url(#".concat(u,")"):void 0,b=rm(rm({clipPath:x},Z(this.props,!0)),{},{cx:d,cy:h});return j.createElement(ce,{className:J("recharts-reference-dot",p)},e.renderDot(v,b),Oe.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(j.Component);Xa(Ya,"displayName","ReferenceDot");Xa(Ya,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Xa(Ya,"renderDot",function(t,e){var r;return j.isValidElement(t)?r=j.cloneElement(t,e):H(t)?r=t(e):r=j.createElement(Yl,Zc({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function Qc(){return Qc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qc.apply(this,arguments)}function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function nm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function am(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nm(Object(r),!0).forEach(function(n){Za(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iM(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vx(n.key),n)}}function oM(t,e,r){return e&&iM(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function sM(t,e,r){return e=wa(e),uM(t,hx()?Reflect.construct(e,r||[],wa(t).constructor):e.apply(t,r))}function uM(t,e){if(e&&(yr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cM(t)}function cM(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hx=function(){return!!t})()}function wa(t){return wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wa(t)}function lM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&el(t,e)}function el(t,e){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},el(t,e)}function Za(t,e,r){return e=vx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vx(t){var e=fM(t,"string");return yr(e)=="symbol"?e:e+""}function fM(t,e){if(yr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var dM=function(e,r,n,a,i){var o=i.x1,s=i.x2,u=i.y1,c=i.y2,f=i.xAxis,l=i.yAxis;if(!f||!l)return null;var d=Zl({x:f.scale,y:l.scale}),h={x:e?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(u,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(c,{position:"end"}):d.y.rangeMax};return Je(i,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:tx(h,y)},Ja=function(t){function e(){return aM(this,e),sM(this,e,arguments)}return lM(e,t),oM(e,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,u=n.className,c=n.alwaysShow,f=n.clipPathId;st(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=ve(a),d=ve(i),h=ve(o),y=ve(s),v=this.props.shape;if(!l&&!d&&!h&&!y&&!v)return null;var p=dM(l,d,h,y,this.props);if(!p&&!v)return null;var x=Je(this.props,"hidden")?"url(#".concat(f,")"):void 0;return j.createElement(ce,{className:J("recharts-reference-area",u)},e.renderRect(v,am(am({clipPath:x},Z(this.props,!0)),p)),Oe.renderCallByParent(this.props,p))}}])}(j.Component);Za(Ja,"displayName","ReferenceArea");Za(Ja,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Za(Ja,"renderRect",function(t,e){var r;return j.isValidElement(t)?r=j.cloneElement(t,e):H(t)?r=t(e):r=j.createElement(Xl,Qc({},e,{className:"recharts-reference-area-rect"})),r});function yx(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],a=0;a<t.length;a+=e)n.push(t[a]);return n}function pM(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return gI(n,r)}function hM(t,e,r){var n=r==="width",a=t.x,i=t.y,o=t.width,s=t.height;return e===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function Oa(t,e,r,n,a){if(t*e<t*n||t*e>t*a)return!1;var i=r();return t*(e-t*i/2-n)>=0&&t*(e+t*i/2-a)<=0}function vM(t,e){return yx(t,e+1)}function yM(t,e,r,n,a){for(var i=(n||[]).slice(),o=e.start,s=e.end,u=0,c=1,f=o,l=function(){var y=n?.[u];if(y===void 0)return{v:yx(n,c)};var v=u,p,x=function(){return p===void 0&&(p=r(y,v)),p},b=y.coordinate,w=u===0||Oa(t,b,x,f,s);w||(u=0,f=o,c+=1),w&&(f=b+t*(x()/2+a),u+=c)},d;c<=i.length;)if(d=l(),d)return d.v;return[]}function xn(t){"@babel/helpers - typeof";return xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(t)}function im(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function we(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?im(Object(r),!0).forEach(function(n){mM(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mM(t,e,r){return e=gM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gM(t){var e=bM(t,"string");return xn(e)=="symbol"?e:e+""}function bM(t,e){if(xn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xM(t,e,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=e.start,u=e.end,c=function(d){var h=i[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=t*(h.coordinate+t*v()/2-u);i[d]=h=we(we({},h),{},{tickCoord:p>0?h.coordinate-p*t:h.coordinate})}else i[d]=h=we(we({},h),{},{tickCoord:h.coordinate});var x=Oa(t,h.tickCoord,v,s,u);x&&(u=h.tickCoord-t*(v()/2+a),i[d]=we(we({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return i}function wM(t,e,r,n,a,i){var o=(n||[]).slice(),s=o.length,u=e.start,c=e.end;if(i){var f=n[s-1],l=r(f,s-1),d=t*(f.coordinate+t*l/2-c);o[s-1]=f=we(we({},f),{},{tickCoord:d>0?f.coordinate-d*t:f.coordinate});var h=Oa(t,f.tickCoord,function(){return l},u,c);h&&(c=f.tickCoord-t*(l/2+a),o[s-1]=we(we({},f),{},{isShow:!0}))}for(var y=i?s-1:s,v=function(b){var w=o[b],S,g=function(){return S===void 0&&(S=r(w,b)),S};if(b===0){var O=t*(w.coordinate-t*g()/2-u);o[b]=w=we(we({},w),{},{tickCoord:O<0?w.coordinate-O*t:w.coordinate})}else o[b]=w=we(we({},w),{},{tickCoord:w.coordinate});var A=Oa(t,w.tickCoord,g,u,c);A&&(u=w.tickCoord+t*(g()/2+a),o[b]=we(we({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function af(t,e,r){var n=t.tick,a=t.ticks,i=t.viewBox,o=t.minTickGap,s=t.orientation,u=t.interval,c=t.tickFormatter,f=t.unit,l=t.angle;if(!a||!a.length||!n)return[];if(B(u)||_r.isSsr)return vM(a,typeof u=="number"&&B(u)?u:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",y=f&&h==="width"?zr(f,{fontSize:e,letterSpacing:r}):{width:0,height:0},v=function(w,S){var g=H(c)?c(w.value,S):w.value;return h==="width"?pM(zr(g,{fontSize:e,letterSpacing:r}),y,l):zr(g,{fontSize:e,letterSpacing:r})[h]},p=a.length>=2?Ge(a[1].coordinate-a[0].coordinate):1,x=hM(i,p,h);return u==="equidistantPreserveStart"?yM(p,x,v,a,o):(u==="preserveStart"||u==="preserveStartEnd"?d=wM(p,x,v,a,o,u==="preserveStartEnd"):d=xM(p,x,v,a,o),d.filter(function(b){return b.isShow}))}var OM=["viewBox"],SM=["viewBox"],AM=["ticks"];function mr(t){"@babel/helpers - typeof";return mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(t)}function Jt(){return Jt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jt.apply(this,arguments)}function om(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Pe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?om(Object(r),!0).forEach(function(n){of(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):om(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wu(t,e){if(t==null)return{};var r=PM(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function PM(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function _M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gx(n.key),n)}}function jM(t,e,r){return e&&sm(t.prototype,e),r&&sm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function EM(t,e,r){return e=Sa(e),TM(t,mx()?Reflect.construct(e,r||[],Sa(t).constructor):e.apply(t,r))}function TM(t,e){if(e&&(mr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CM(t)}function CM(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mx=function(){return!!t})()}function Sa(t){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sa(t)}function kM(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}function tl(t,e){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tl(t,e)}function of(t,e,r){return e=gx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gx(t){var e=IM(t,"string");return mr(e)=="symbol"?e:e+""}function IM(t,e){if(mr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Tr=function(t){function e(r){var n;return _M(this,e),n=EM(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return kM(e,t),jM(e,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Wu(n,OM),s=this.props,u=s.viewBox,c=Wu(s,SM);return!er(i,u)||!er(o,c)||!er(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,u=a.height,c=a.orientation,f=a.tickSize,l=a.mirror,d=a.tickMargin,h,y,v,p,x,b,w=l?-1:1,S=n.tickSize||f,g=B(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=y=n.coordinate,p=o+ +!l*u,v=p-w*S,b=v-w*d,x=g;break;case"left":v=p=n.coordinate,y=i+ +!l*s,h=y-w*S,x=h-w*d,b=g;break;case"right":v=p=n.coordinate,y=i+ +l*s,h=y+w*S,x=h+w*d,b=g;break;default:h=y=n.coordinate,p=o+ +l*u,v=p+w*S,b=v+w*d,x=g;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,u=n.orientation,c=n.mirror,f=n.axisLine,l=Pe(Pe(Pe({},Z(this.props,!1)),Z(f,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!c||u==="bottom"&&c);l=Pe(Pe({},l),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(u==="left"&&!c||u==="right"&&c);l=Pe(Pe({},l),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return j.createElement("line",Jt({},l,{className:J("recharts-cartesian-axis-line",De(f,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,u=s.tickLine,c=s.stroke,f=s.tick,l=s.tickFormatter,d=s.unit,h=af(Pe(Pe({},this.props),{},{ticks:n}),a,i),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=Z(this.props,!1),x=Z(f,!1),b=Pe(Pe({},p),{},{fill:"none"},Z(u,!1)),w=h.map(function(S,g){var O=o.getTickLineCoord(S),A=O.line,_=O.tick,P=Pe(Pe(Pe(Pe({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:c},x),_),{},{index:g,payload:S,visibleTicksCount:h.length,tickFormatter:l});return j.createElement(ce,Jt({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Xn(o.props,S,g)),u&&j.createElement("line",Jt({},b,A,{className:J("recharts-cartesian-axis-tick-line",De(u,"className"))})),f&&e.renderTickItem(f,P,"".concat(H(l)?l(S.value,g):S.value).concat(d||"")))});return j.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,u=a.ticksGenerator,c=a.className,f=a.hide;if(f)return null;var l=this.props,d=l.ticks,h=Wu(l,AM),y=d;return H(u)&&(y=d&&d.length>0?u(this.props):u(h)),o<=0||s<=0||!y||!y.length?null:j.createElement(ce,{className:J("recharts-cartesian-axis",c),ref:function(p){n.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Oe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o;return j.isValidElement(n)?o=j.cloneElement(n,a):H(n)?o=n(a):o=j.createElement(ta,Jt({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(T.Component);of(Tr,"displayName","CartesianAxis");of(Tr,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var MM=["x1","y1","x2","y2","key"],$M=["offset"];function Ft(t){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(t)}function um(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?um(Object(r),!0).forEach(function(n){NM(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function NM(t,e,r){return e=RM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RM(t){var e=DM(t,"string");return Ft(e)=="symbol"?e:e+""}function DM(t,e){if(Ft(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $t(){return $t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$t.apply(this,arguments)}function cm(t,e){if(t==null)return{};var r=qM(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qM(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var LM=function(e){var r=e.fill;if(!r||r==="none")return null;var n=e.fillOpacity,a=e.x,i=e.y,o=e.width,s=e.height,u=e.ry;return j.createElement("rect",{x:a,y:i,ry:u,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function bx(t,e){var r;if(j.isValidElement(t))r=j.cloneElement(t,e);else if(H(t))r=t(e);else{var n=e.x1,a=e.y1,i=e.x2,o=e.y2,s=e.key,u=cm(e,MM),c=Z(u,!1);c.offset;var f=cm(c,$M);r=j.createElement("line",$t({},f,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function BM(t){var e=t.x,r=t.width,n=t.horizontal,a=n===void 0?!0:n,i=t.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,u){var c=Se(Se({},t),{},{x1:e,y1:s,x2:e+r,y2:s,key:"line-".concat(u),index:u});return bx(a,c)});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function FM(t){var e=t.y,r=t.height,n=t.vertical,a=n===void 0?!0:n,i=t.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,u){var c=Se(Se({},t),{},{x1:s,y1:e,x2:s,y2:e+r,key:"line-".concat(u),index:u});return bx(a,c)});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function zM(t){var e=t.horizontalFill,r=t.fillOpacity,n=t.x,a=t.y,i=t.width,o=t.height,s=t.horizontalPoints,u=t.horizontal,c=u===void 0?!0:u;if(!c||!e||!e.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?a+o-d:f[h+1]-d;if(v<=0)return null;var p=h%e.length;return j.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:i,stroke:"none",fill:e[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}function WM(t){var e=t.vertical,r=e===void 0?!0:e,n=t.verticalFill,a=t.fillOpacity,i=t.x,o=t.y,s=t.width,u=t.height,c=t.verticalPoints;if(!r||!n||!n.length)return null;var f=c.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?i+s-d:f[h+1]-d;if(v<=0)return null;var p=h%n.length;return j.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:u,stroke:"none",fill:n[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}var UM=function(e,r){var n=e.xAxis,a=e.width,i=e.height,o=e.offset;return Mb(af(Se(Se(Se({},Tr.defaultProps),n),{},{ticks:it(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},GM=function(e,r){var n=e.yAxis,a=e.width,i=e.height,o=e.offset;return Mb(af(Se(Se(Se({},Tr.defaultProps),n),{},{ticks:it(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Vt={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function xx(t){var e,r,n,a,i,o,s=ef(),u=tf(),c=II(),f=Se(Se({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:Vt.stroke,fill:(r=t.fill)!==null&&r!==void 0?r:Vt.fill,horizontal:(n=t.horizontal)!==null&&n!==void 0?n:Vt.horizontal,horizontalFill:(a=t.horizontalFill)!==null&&a!==void 0?a:Vt.horizontalFill,vertical:(i=t.vertical)!==null&&i!==void 0?i:Vt.vertical,verticalFill:(o=t.verticalFill)!==null&&o!==void 0?o:Vt.verticalFill,x:B(t.x)?t.x:c.left,y:B(t.y)?t.y:c.top,width:B(t.width)?t.width:c.width,height:B(t.height)?t.height:c.height}),l=f.x,d=f.y,h=f.width,y=f.height,v=f.syncWithTicks,p=f.horizontalValues,x=f.verticalValues,b=TI(),w=CI();if(!B(h)||h<=0||!B(y)||y<=0||!B(l)||l!==+l||!B(d)||d!==+d)return null;var S=f.verticalCoordinatesGenerator||UM,g=f.horizontalCoordinatesGenerator||GM,O=f.horizontalPoints,A=f.verticalPoints;if((!O||!O.length)&&H(g)){var _=p&&p.length,P=g({yAxis:w?Se(Se({},w),{},{ticks:_?p:w.ticks}):void 0,width:s,height:u,offset:c},_?!0:v);st(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ft(P),"]")),Array.isArray(P)&&(O=P)}if((!A||!A.length)&&H(S)){var k=x&&x.length,E=S({xAxis:b?Se(Se({},b),{},{ticks:k?x:b.ticks}):void 0,width:s,height:u,offset:c},k?!0:v);st(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ft(E),"]")),Array.isArray(E)&&(A=E)}return j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(LM,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),j.createElement(BM,$t({},f,{offset:c,horizontalPoints:O,xAxis:b,yAxis:w})),j.createElement(FM,$t({},f,{offset:c,verticalPoints:A,xAxis:b,yAxis:w})),j.createElement(zM,$t({},f,{horizontalPoints:O})),j.createElement(WM,$t({},f,{verticalPoints:A})))}xx.displayName="CartesianGrid";var KM=["type","layout","connectNulls","ref"],HM=["key"];function gr(t){"@babel/helpers - typeof";return gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gr(t)}function lm(t,e){if(t==null)return{};var r=VM(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function VM(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Gr(){return Gr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gr.apply(this,arguments)}function fm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Te(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fm(Object(r),!0).forEach(function(n){We(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xt(t){return JM(t)||ZM(t)||YM(t)||XM()}function XM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
156
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YM(t,e){if(t){if(typeof t=="string")return rl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rl(t,e)}}function ZM(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JM(t){if(Array.isArray(t))return rl(t)}function rl(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function QM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ox(n.key),n)}}function e$(t,e,r){return e&&dm(t.prototype,e),r&&dm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function t$(t,e,r){return e=Aa(e),r$(t,wx()?Reflect.construct(e,r||[],Aa(t).constructor):e.apply(t,r))}function r$(t,e){if(e&&(gr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n$(t)}function n$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wx=function(){return!!t})()}function Aa(t){return Aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Aa(t)}function a$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nl(t,e)}function nl(t,e){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},nl(t,e)}function We(t,e,r){return e=Ox(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ox(t){var e=i$(t,"string");return gr(e)=="symbol"?e:e+""}function i$(t,e){if(gr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Cn=function(t){function e(){var r;QM(this,e);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=t$(this,e,[].concat(a)),We(r,"state",{isAnimationFinished:!0,totalLength:0}),We(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),We(r,"getStrokeDasharray",function(o,s,u){var c=u.reduce(function(x,b){return x+b});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/c),l=o%c,d=s-o,h=[],y=0,v=0;y<u.length;v+=u[y],++y)if(v+u[y]>l){h=[].concat(Xt(u.slice(0,y)),[l-v]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(Xt(e.repeat(u,f)),Xt(h),p).map(function(x){return"".concat(x,"px")}).join(", ")}),We(r,"id",_n("recharts-line-")),We(r,"pathRef",function(o){r.mainCurve=o}),We(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),We(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return a$(e,t),e$(e,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,u=i.yAxis,c=i.layout,f=i.children,l=qe(f,En);if(!l)return null;var d=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:$e(v.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return j.createElement(ce,h,l.map(function(y){return j.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:u,layout:c,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,c=s.points,f=s.dataKey,l=Z(this.props,!1),d=Z(u,!0),h=c.map(function(v,p){var x=Te(Te(Te({key:"dot-".concat(p),r:3},l),d),{},{index:p,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:c});return e.renderDotItem(u,x)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return j.createElement(ce,Gr({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,u=s.type,c=s.layout,f=s.connectNulls;s.ref;var l=lm(s,KM),d=Te(Te(Te({},Z(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:u,layout:c,connectNulls:f});return j.createElement($c,Gr({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,u=o.strokeDasharray,c=o.isAnimationActive,f=o.animationBegin,l=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,v=o.width,p=o.height,x=this.state,b=x.prevPoints,w=x.totalLength;return j.createElement(ct,{begin:f,duration:l,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var g=S.t;if(b){var O=b.length/s.length,A=s.map(function(C,I){var N=Math.floor(I*O);if(b[N]){var M=b[N],R=Ue(M.x,C.x),D=Ue(M.y,C.y);return Te(Te({},C),{},{x:R(g),y:D(g)})}if(y){var F=Ue(v*2,C.x),z=Ue(p/2,C.y);return Te(Te({},C),{},{x:F(g),y:z(g)})}return Te(Te({},C),{},{x:C.x,y:C.y})});return i.renderCurveStatically(A,n,a)}var _=Ue(0,w),P=_(g),k;if(u){var E="".concat(u).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});k=i.getStrokeDasharray(P,w,E)}else k=i.generateSimpleStrokeDasharray(w,P);return i.renderCurveStatically(s,n,a,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.totalLength;return s&&o&&o.length&&(!c&&f>0||!Wa(c,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,u=a.className,c=a.xAxis,f=a.yAxis,l=a.top,d=a.left,h=a.width,y=a.height,v=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=J("recharts-line",u),S=c&&c.allowDataOverflow,g=f&&f.allowDataOverflow,O=S||g,A=X(p)?this.id:p,_=(n=Z(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=_.r,k=P===void 0?3:P,E=_.strokeWidth,C=E===void 0?2:E,I=IS(o)?o:{},N=I.clipDot,M=N===void 0?!0:N,R=k*2+C;return j.createElement(ce,{className:w},S||g?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(A)},j.createElement("rect",{x:S?d:d-h/2,y:g?l:l-y/2,width:S?h:h*2,height:g?y:y*2})),!M&&j.createElement("clipPath",{id:"clipPath-dots-".concat(A)},j.createElement("rect",{x:d-R/2,y:l-R/2,width:h+R,height:y+R}))):null,!b&&this.renderCurve(O,A),this.renderErrorBar(O,A),(b||o)&&this.renderDots(O,M,A),(!v||x)&&xt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Xt(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Xt(o),Xt(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(j.isValidElement(n))i=j.cloneElement(n,a);else if(H(n))i=n(a);else{var o=a.key,s=lm(a,HM),u=J("recharts-line-dot",typeof n!="boolean"?n.className:"");i=j.createElement(Yl,Gr({key:o},s,{className:u}))}return i}}])}(T.PureComponent);We(Cn,"displayName","Line");We(Cn,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!_r.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});We(Cn,"getComposedData",function(t){var e=t.props,r=t.xAxis,n=t.yAxis,a=t.xAxisTicks,i=t.yAxisTicks,o=t.dataKey,s=t.bandSize,u=t.displayedData,c=t.offset,f=e.layout,l=u.map(function(d,h){var y=$e(d,o);return f==="horizontal"?{x:Tv({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:X(y)?null:n.scale(y),value:y,payload:d}:{x:X(y)?null:r.scale(y),y:Tv({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:y,payload:d}});return Te({points:l,layout:f},c)});function br(t){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(t)}function o$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Px(n.key),n)}}function u$(t,e,r){return e&&s$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c$(t,e,r){return e=Pa(e),l$(t,Sx()?Reflect.construct(e,r||[],Pa(t).constructor):e.apply(t,r))}function l$(t,e){if(e&&(br(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f$(t)}function f$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sx=function(){return!!t})()}function Pa(t){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pa(t)}function d$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&al(t,e)}function al(t,e){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},al(t,e)}function Ax(t,e,r){return e=Px(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Px(t){var e=p$(t,"string");return br(e)=="symbol"?e:e+""}function p$(t,e){if(br(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(br(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function il(){return il=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},il.apply(this,arguments)}function h$(t){var e=t.xAxisId,r=ef(),n=tf(),a=ux(e);return a==null?null:j.createElement(Tr,il({},a,{className:J("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return it(o,!0)}}))}var Qa=function(t){function e(){return o$(this,e),c$(this,e,arguments)}return d$(e,t),u$(e,[{key:"render",value:function(){return j.createElement(h$,this.props)}}])}(j.Component);Ax(Qa,"displayName","XAxis");Ax(Qa,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function xr(t){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(t)}function v$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ex(n.key),n)}}function m$(t,e,r){return e&&y$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function g$(t,e,r){return e=_a(e),b$(t,_x()?Reflect.construct(e,r||[],_a(t).constructor):e.apply(t,r))}function b$(t,e){if(e&&(xr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x$(t)}function x$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_x=function(){return!!t})()}function _a(t){return _a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_a(t)}function w$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ol(t,e)}function ol(t,e){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ol(t,e)}function jx(t,e,r){return e=Ex(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ex(t){var e=O$(t,"string");return xr(e)=="symbol"?e:e+""}function O$(t,e){if(xr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function sl(){return sl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sl.apply(this,arguments)}var S$=function(e){var r=e.yAxisId,n=ef(),a=tf(),i=cx(r);return i==null?null:j.createElement(Tr,sl({},i,{className:J("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return it(s,!0)}}))},ei=function(t){function e(){return v$(this,e),g$(this,e,arguments)}return w$(e,t),m$(e,[{key:"render",value:function(){return j.createElement(S$,this.props)}}])}(j.Component);jx(ei,"displayName","YAxis");jx(ei,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function pm(t){return j$(t)||_$(t)||P$(t)||A$()}function A$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
157
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P$(t,e){if(t){if(typeof t=="string")return ul(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ul(t,e)}}function _$(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function j$(t){if(Array.isArray(t))return ul(t)}function ul(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var cl=function(e,r,n,a,i){var o=qe(e,nf),s=qe(e,Ya),u=[].concat(pm(o),pm(s)),c=qe(e,Ja),f="".concat(a,"Id"),l=a[0],d=r;if(u.length&&(d=u.reduce(function(v,p){if(p.props[f]===n&&Je(p.props,"extendDomain")&&B(p.props[l])){var x=p.props[l];return[Math.min(v[0],x),Math.max(v[1],x)]}return v},d)),c.length){var h="".concat(l,"1"),y="".concat(l,"2");d=c.reduce(function(v,p){if(p.props[f]===n&&Je(p.props,"extendDomain")&&B(p.props[h])&&B(p.props[y])){var x=p.props[h],b=p.props[y];return[Math.min(v[0],x,b),Math.max(v[1],x,b)]}return v},d)}return i&&i.length&&(d=i.reduce(function(v,p){return B(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},Uu={exports:{}},hm;function E$(){return hm||(hm=1,function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(u,c,f){this.fn=u,this.context=c,this.once=f||!1}function i(u,c,f,l,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new a(f,l||u,d),y=r?r+c:c;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],h]:u._events[y].push(h):(u._events[y]=h,u._eventsCount++),u}function o(u,c){--u._eventsCount===0?u._events=new n:delete u._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,l;if(this._eventsCount===0)return c;for(l in f=this._events)e.call(f,l)&&c.push(r?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=r?r+c:c,l=this._events[f];if(!l)return[];if(l.fn)return[l.fn];for(var d=0,h=l.length,y=new Array(h);d<h;d++)y[d]=l[d].fn;return y},s.prototype.listenerCount=function(c){var f=r?r+c:c,l=this._events[f];return l?l.fn?1:l.length:0},s.prototype.emit=function(c,f,l,d,h,y){var v=r?r+c:c;if(!this._events[v])return!1;var p=this._events[v],x=arguments.length,b,w;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),x){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,l),!0;case 4:return p.fn.call(p.context,f,l,d),!0;case 5:return p.fn.call(p.context,f,l,d,h),!0;case 6:return p.fn.call(p.context,f,l,d,h,y),!0}for(w=1,b=new Array(x-1);w<x;w++)b[w-1]=arguments[w];p.fn.apply(p.context,b)}else{var S=p.length,g;for(w=0;w<S;w++)switch(p[w].once&&this.removeListener(c,p[w].fn,void 0,!0),x){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,f);break;case 3:p[w].fn.call(p[w].context,f,l);break;case 4:p[w].fn.call(p[w].context,f,l,d);break;default:if(!b)for(g=1,b=new Array(x-1);g<x;g++)b[g-1]=arguments[g];p[w].fn.apply(p[w].context,b)}}return!0},s.prototype.on=function(c,f,l){return i(this,c,f,l,!1)},s.prototype.once=function(c,f,l){return i(this,c,f,l,!0)},s.prototype.removeListener=function(c,f,l,d){var h=r?r+c:c;if(!this._events[h])return this;if(!f)return o(this,h),this;var y=this._events[h];if(y.fn)y.fn===f&&(!d||y.once)&&(!l||y.context===l)&&o(this,h);else{for(var v=0,p=[],x=y.length;v<x;v++)(y[v].fn!==f||d&&!y[v].once||l&&y[v].context!==l)&&p.push(y[v]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s}(Uu)),Uu.exports}var T$=E$();const C$=ie(T$);var Gu=new C$,Ku="recharts.syncMouseEvents";function wn(t){"@babel/helpers - typeof";return wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(t)}function k$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tx(n.key),n)}}function M$(t,e,r){return e&&I$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hu(t,e,r){return e=Tx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tx(t){var e=$$(t,"string");return wn(e)=="symbol"?e:e+""}function $$(t,e){if(wn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var N$=function(){function t(){k$(this,t),Hu(this,"activeIndex",0),Hu(this,"coordinateList",[]),Hu(this,"layout","horizontal")}return M$(t,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,u=r.layout,c=u===void 0?null:u,f=r.offset,l=f===void 0?null:f,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=l??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,u=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,l=i+u+c,d=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:l,pageY:d})}}}])}();function R$(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t?.[0],a=t?.[1];if(n&&a&&B(n)&&B(a))return!0}return!1}function D$(t,e,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-a:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-a,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function Cx(t){var e=t.cx,r=t.cy,n=t.radius,a=t.startAngle,i=t.endAngle,o=be(e,r,n,a),s=be(e,r,n,i);return{points:[o,s],cx:e,cy:r,radius:n,startAngle:a,endAngle:i}}function q$(t,e,r){var n,a,i,o;if(t==="horizontal")n=e.x,i=n,a=r.top,o=r.top+r.height;else if(t==="vertical")a=e.y,o=a,n=r.left,i=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var s=e.cx,u=e.cy,c=e.innerRadius,f=e.outerRadius,l=e.angle,d=be(s,u,c,l),h=be(s,u,f,l);n=d.x,a=d.y,i=h.x,o=h.y}else return Cx(e);return[{x:n,y:a},{x:i,y:o}]}function On(t){"@babel/helpers - typeof";return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},On(t)}function vm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Fn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vm(Object(r),!0).forEach(function(n){L$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function L$(t,e,r){return e=B$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B$(t){var e=F$(t,"string");return On(e)=="symbol"?e:e+""}function F$(t,e){if(On(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(On(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function z$(t){var e,r,n=t.element,a=t.tooltipEventType,i=t.isActive,o=t.activeCoordinate,s=t.activePayload,u=t.offset,c=t.activeTooltipIndex,f=t.tooltipAxisBandSize,l=t.layout,d=t.chartName,h=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var y,v=$c;if(d==="ScatterChart")y=o,v=LC;else if(d==="BarChart")y=D$(l,o,u,f),v=Xl;else if(l==="radial"){var p=Cx(o),x=p.cx,b=p.cy,w=p.radius,S=p.startAngle,g=p.endAngle;y={cx:x,cy:b,startAngle:S,endAngle:g,innerRadius:w,outerRadius:w},v=qb}else y={points:q$(l,o,u)},v=$c;var O=Fn(Fn(Fn(Fn({stroke:"#ccc",pointerEvents:"none"},u),y),Z(h,!1)),{},{payload:s,payloadIndex:c,className:J("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,O):T.createElement(v,O)}var W$=["item"],U$=["children","className","width","height","style","compact","title","desc"];function wr(t){"@babel/helpers - typeof";return wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(t)}function Qt(){return Qt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qt.apply(this,arguments)}function ym(t,e){return H$(t)||K$(t,e)||Ix(t,e)||G$()}function G$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
158
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K$(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function H$(t){if(Array.isArray(t))return t}function mm(t,e){if(t==null)return{};var r=V$(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function V$(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function X$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mx(n.key),n)}}function Z$(t,e,r){return e&&Y$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function J$(t,e,r){return e=ja(e),Q$(t,kx()?Reflect.construct(e,r||[],ja(t).constructor):e.apply(t,r))}function Q$(t,e){if(e&&(wr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eN(t)}function eN(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kx=function(){return!!t})()}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ja(t)}function tN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ll(t,e)}function ll(t,e){return ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ll(t,e)}function Or(t){return aN(t)||nN(t)||Ix(t)||rN()}function rN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
159
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ix(t,e){if(t){if(typeof t=="string")return fl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fl(t,e)}}function nN(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function aN(t){if(Array.isArray(t))return fl(t)}function fl(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function gm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function $(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gm(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function K(t,e,r){return e=Mx(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mx(t){var e=iN(t,"string");return wr(e)=="symbol"?e:e+""}function iN(t,e){if(wr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(wr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oN={xAxis:["bottom","top"],yAxis:["left","right"]},sN={width:"100%",height:"100%"},$x={x:0,y:0};function zn(t){return t}var uN=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},cN=function(e,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(e==="horizontal")return{x:i.coordinate,y:a.y};if(e==="vertical")return{x:a.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,s=a.radius;return $($($({},a),be(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var u=i.coordinate,c=a.angle;return $($($({},a),be(a.cx,a.cy,u,c)),{},{angle:c,radius:u})}return $x},ti=function(e,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,u){var c=u.props.data;return c&&c.length?[].concat(Or(s),Or(c)):s},[]);return o.length>0?o:e&&e.length&&B(a)&&B(i)?e.slice(a,i+1):[]};function Nx(t){return t==="number"?[0,"auto"]:void 0}var dl=function(e,r,n,a){var i=e.graphicalItems,o=e.tooltipAxis,s=ti(r,e);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(u,c){var f,l=(f=c.props.data)!==null&&f!==void 0?f:r;l&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(l=l.slice(e.dataStartIndex,e.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=l===void 0?s:l;d=Hn(h,o.dataKey,a)}else d=l&&l[n]||s[n];return d?[].concat(Or(u),[Nb(c,d)]):u},[])},bm=function(e,r,n,a){var i=a||{x:e.chartX,y:e.chartY},o=uN(i,n),s=e.orderedTooltipTicks,u=e.tooltipAxis,c=e.tooltipTicks,f=_j(o,s,c,u);if(f>=0&&c){var l=c[f]&&c[f].value,d=dl(e,r,f,l),h=cN(n,s,f,i);return{activeTooltipIndex:f,activeLabel:l,activePayload:d,activeCoordinate:h}}return null},lN=function(e,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=e.layout,l=e.children,d=e.stackOffset,h=Ib(f,i);return n.reduce(function(y,v){var p,x=v.type.defaultProps!==void 0?$($({},v.type.defaultProps),v.props):v.props,b=x.type,w=x.dataKey,S=x.allowDataOverflow,g=x.allowDuplicatedCategory,O=x.scale,A=x.ticks,_=x.includeHidden,P=x[o];if(y[P])return y;var k=ti(e.data,{graphicalItems:a.filter(function(L){var G,Y=o in L.props?L.props[o]:(G=L.type.defaultProps)===null||G===void 0?void 0:G[o];return Y===P}),dataStartIndex:u,dataEndIndex:c}),E=k.length,C,I,N;R$(x.domain,S,b)&&(C=Tc(x.domain,null,S),h&&(b==="number"||O!=="auto")&&(N=Wr(k,w,"category")));var M=Nx(b);if(!C||C.length===0){var R,D=(R=x.domain)!==null&&R!==void 0?R:M;if(w){if(C=Wr(k,w,b),b==="category"&&h){var F=OS(C);g&&F?(I=C,C=ha(0,E)):g||(C=Mv(D,C,v).reduce(function(L,G){return L.indexOf(G)>=0?L:[].concat(Or(L),[G])},[]))}else if(b==="category")g?C=C.filter(function(L){return L!==""&&!X(L)}):C=Mv(D,C,v).reduce(function(L,G){return L.indexOf(G)>=0||G===""||X(G)?L:[].concat(Or(L),[G])},[]);else if(b==="number"){var z=kj(k,a.filter(function(L){var G,Y,re=o in L.props?L.props[o]:(G=L.type.defaultProps)===null||G===void 0?void 0:G[o],ue="hide"in L.props?L.props.hide:(Y=L.type.defaultProps)===null||Y===void 0?void 0:Y.hide;return re===P&&(_||!ue)}),w,i,f);z&&(C=z)}h&&(b==="number"||O!=="auto")&&(N=Wr(k,w,"category"))}else h?C=ha(0,E):s&&s[P]&&s[P].hasStack&&b==="number"?C=d==="expand"?[0,1]:$b(s[P].stackGroups,u,c):C=kb(k,a.filter(function(L){var G=o in L.props?L.props[o]:L.type.defaultProps[o],Y="hide"in L.props?L.props.hide:L.type.defaultProps.hide;return G===P&&(_||!Y)}),b,f,!0);if(b==="number")C=cl(l,C,P,i,A),D&&(C=Tc(D,C,S));else if(b==="category"&&D){var q=D,U=C.every(function(L){return q.indexOf(L)>=0});U&&(C=q)}}return $($({},y),{},K({},P,$($({},x),{},{axisType:i,domain:C,categoricalDomain:N,duplicateDomain:I,originalDomain:(p=x.domain)!==null&&p!==void 0?p:M,isCategorical:h,layout:f})))},{})},fN=function(e,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=e.layout,l=e.children,d=ti(e.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:c}),h=d.length,y=Ib(f,i),v=-1;return n.reduce(function(p,x){var b=x.type.defaultProps!==void 0?$($({},x.type.defaultProps),x.props):x.props,w=b[o],S=Nx("number");if(!p[w]){v++;var g;return y?g=ha(0,h):s&&s[w]&&s[w].hasStack?(g=$b(s[w].stackGroups,u,c),g=cl(l,g,w,i)):(g=Tc(S,kb(d,n.filter(function(O){var A,_,P=o in O.props?O.props[o]:(A=O.type.defaultProps)===null||A===void 0?void 0:A[o],k="hide"in O.props?O.props.hide:(_=O.type.defaultProps)===null||_===void 0?void 0:_.hide;return P===w&&!k}),"number",f),a.defaultProps.allowDataOverflow),g=cl(l,g,w,i)),$($({},p),{},K({},w,$($({axisType:i},a.defaultProps),{},{hide:!0,orientation:De(oN,"".concat(i,".").concat(v%2),null),domain:g,originalDomain:S,isCategorical:y,layout:f})))}return p},{})},dN=function(e,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,u=r.dataStartIndex,c=r.dataEndIndex,f=e.children,l="".concat(a,"Id"),d=qe(f,i),h={};return d&&d.length?h=lN(e,{axes:d,graphicalItems:o,axisType:a,axisIdKey:l,stackGroups:s,dataStartIndex:u,dataEndIndex:c}):o&&o.length&&(h=fN(e,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:l,stackGroups:s,dataStartIndex:u,dataEndIndex:c})),h},pN=function(e){var r=yt(e),n=it(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ul(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ia(r,n)}},xm=function(e){var r=e.children,n=e.defaultShowTooltip,a=ke(r,dr),i=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},hN=function(e){return!e||!e.length?!1:e.some(function(r){var n=ot(r&&r.type);return n&&n.indexOf("Bar")>=0})},wm=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},vN=function(e,r){var n=e.props,a=e.graphicalItems,i=e.xAxisMap,o=i===void 0?{}:i,s=e.yAxisMap,u=s===void 0?{}:s,c=n.width,f=n.height,l=n.children,d=n.margin||{},h=ke(l,dr),y=ke(l,tr),v=Object.keys(u).reduce(function(g,O){var A=u[O],_=A.orientation;return!A.mirror&&!A.hide?$($({},g),{},K({},_,g[_]+A.width)):g},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(g,O){var A=o[O],_=A.orientation;return!A.mirror&&!A.hide?$($({},g),{},K({},_,De(g,"".concat(_))+A.height)):g},{top:d.top||0,bottom:d.bottom||0}),x=$($({},p),v),b=x.bottom;h&&(x.bottom+=h.props.height||dr.defaultProps.height),y&&r&&(x=Tj(x,a,n,r));var w=c-x.left-x.right,S=f-x.top-x.bottom;return $($({brushBottom:b},x),{},{width:Math.max(w,0),height:Math.max(S,0)})},yN=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},mN=function(e){var r=e.chartName,n=e.GraphicalChild,a=e.defaultTooltipEventType,i=a===void 0?"axis":a,o=e.validateTooltipEventTypes,s=o===void 0?["axis"]:o,u=e.axisComponents,c=e.legendContent,f=e.formatAxisMap,l=e.defaultProps,d=function(x,b){var w=b.graphicalItems,S=b.stackGroups,g=b.offset,O=b.updateId,A=b.dataStartIndex,_=b.dataEndIndex,P=x.barSize,k=x.layout,E=x.barGap,C=x.barCategoryGap,I=x.maxBarSize,N=wm(k),M=N.numericAxisName,R=N.cateAxisName,D=hN(w),F=[];return w.forEach(function(z,q){var U=ti(x.data,{graphicalItems:[z],dataStartIndex:A,dataEndIndex:_}),L=z.type.defaultProps!==void 0?$($({},z.type.defaultProps),z.props):z.props,G=L.dataKey,Y=L.maxBarSize,re=L["".concat(M,"Id")],ue=L["".concat(R,"Id")],Ve={},le=u.reduce(function(Et,Tt){var ri=b["".concat(Tt.axisType,"Map")],sf=L["".concat(Tt.axisType,"Id")];ri&&ri[sf]||Tt.axisType==="zAxis"||Bt();var uf=ri[sf];return $($({},Et),{},K(K({},Tt.axisType,uf),"".concat(Tt.axisType,"Ticks"),it(uf)))},Ve),xe=le[R],Xe=le["".concat(R,"Ticks")],Ee=S&&S[re]&&S[re].hasStack&&Wj(z,S[re].stackGroups),_t=ot(z.type).indexOf("Bar")>=0,tt=ia(xe,Xe),pt=[],jt=D&&jj({barSize:P,stackGroups:S,totalSize:yN(le,R)});if(_t){var Gt,rt,ht=X(Y)?I:Y,Kt=(Gt=(rt=ia(xe,Xe,!0))!==null&&rt!==void 0?rt:ht)!==null&&Gt!==void 0?Gt:0;pt=Ej({barGap:E,barCategoryGap:C,bandSize:Kt!==tt?Kt:tt,sizeList:jt[ue],maxBarSize:ht}),Kt!==tt&&(pt=pt.map(function(Et){return $($({},Et),{},{position:$($({},Et.position),{},{offset:Et.position.offset-Kt/2})})}))}var kn=z&&z.type&&z.type.getComposedData;kn&&F.push({props:$($({},kn($($({},le),{},{displayedData:U,props:x,dataKey:G,item:z,bandSize:tt,barPosition:pt,offset:g,stackedData:Ee,layout:k,dataStartIndex:A,dataEndIndex:_}))),{},K(K(K({key:z.key||"item-".concat(q)},M,le[M]),R,le[R]),"animationId",O)),childIndex:NS(z,x.children),item:z})}),F},h=function(x,b){var w=x.props,S=x.dataStartIndex,g=x.dataEndIndex,O=x.updateId;if(!$d({props:w}))return null;var A=w.children,_=w.layout,P=w.stackOffset,k=w.data,E=w.reverseStackOrder,C=wm(_),I=C.numericAxisName,N=C.cateAxisName,M=qe(A,n),R=Bj(k,M,"".concat(I,"Id"),"".concat(N,"Id"),P,E),D=u.reduce(function(L,G){var Y="".concat(G.axisType,"Map");return $($({},L),{},K({},Y,dN(w,$($({},G),{},{graphicalItems:M,stackGroups:G.axisType===I&&R,dataStartIndex:S,dataEndIndex:g}))))},{}),F=vN($($({},D),{},{props:w,graphicalItems:M}),b?.legendBBox);Object.keys(D).forEach(function(L){D[L]=f(w,D[L],F,L.replace("Map",""),r)});var z=D["".concat(N,"Map")],q=pN(z),U=d(w,$($({},D),{},{dataStartIndex:S,dataEndIndex:g,updateId:O,graphicalItems:M,stackGroups:R,offset:F}));return $($({formattedGraphicalItems:U,graphicalItems:M,offset:F,stackGroups:R},q),D)},y=function(p){function x(b){var w,S,g;return X$(this,x),g=J$(this,x,[b]),K(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),K(g,"accessibilityManager",new N$),K(g,"handleLegendBBoxUpdate",function(O){if(O){var A=g.state,_=A.dataStartIndex,P=A.dataEndIndex,k=A.updateId;g.setState($({legendBBox:O},h({props:g.props,dataStartIndex:_,dataEndIndex:P,updateId:k},$($({},g.state),{},{legendBBox:O}))))}}),K(g,"handleReceiveSyncEvent",function(O,A,_){if(g.props.syncId===O){if(_===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(A)}}),K(g,"handleBrushChange",function(O){var A=O.startIndex,_=O.endIndex;if(A!==g.state.dataStartIndex||_!==g.state.dataEndIndex){var P=g.state.updateId;g.setState(function(){return $({dataStartIndex:A,dataEndIndex:_},h({props:g.props,dataStartIndex:A,dataEndIndex:_,updateId:P},g.state))}),g.triggerSyncEvent({dataStartIndex:A,dataEndIndex:_})}}),K(g,"handleMouseEnter",function(O){var A=g.getMouseInfo(O);if(A){var _=$($({},A),{},{isTooltipActive:!0});g.setState(_),g.triggerSyncEvent(_);var P=g.props.onMouseEnter;H(P)&&P(_,O)}}),K(g,"triggeredAfterMouseMove",function(O){var A=g.getMouseInfo(O),_=A?$($({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(_),g.triggerSyncEvent(_);var P=g.props.onMouseMove;H(P)&&P(_,O)}),K(g,"handleItemMouseEnter",function(O){g.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),K(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),K(g,"handleMouseMove",function(O){O.persist(),g.throttleTriggeredAfterMouseMove(O)}),K(g,"handleMouseLeave",function(O){g.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};g.setState(A),g.triggerSyncEvent(A);var _=g.props.onMouseLeave;H(_)&&_(A,O)}),K(g,"handleOuterEvent",function(O){var A=$S(O),_=De(g.props,"".concat(A));if(A&&H(_)){var P,k;/.*touch.*/i.test(A)?k=g.getMouseInfo(O.changedTouches[0]):k=g.getMouseInfo(O),_((P=k)!==null&&P!==void 0?P:{},O)}}),K(g,"handleClick",function(O){var A=g.getMouseInfo(O);if(A){var _=$($({},A),{},{isTooltipActive:!0});g.setState(_),g.triggerSyncEvent(_);var P=g.props.onClick;H(P)&&P(_,O)}}),K(g,"handleMouseDown",function(O){var A=g.props.onMouseDown;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),K(g,"handleMouseUp",function(O){var A=g.props.onMouseUp;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),K(g,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),K(g,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseDown(O.changedTouches[0])}),K(g,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseUp(O.changedTouches[0])}),K(g,"handleDoubleClick",function(O){var A=g.props.onDoubleClick;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),K(g,"handleContextMenu",function(O){var A=g.props.onContextMenu;if(H(A)){var _=g.getMouseInfo(O);A(_,O)}}),K(g,"triggerSyncEvent",function(O){g.props.syncId!==void 0&&Gu.emit(Ku,g.props.syncId,O,g.eventEmitterSymbol)}),K(g,"applySyncEvent",function(O){var A=g.props,_=A.layout,P=A.syncMethod,k=g.state.updateId,E=O.dataStartIndex,C=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)g.setState($({dataStartIndex:E,dataEndIndex:C},h({props:g.props,dataStartIndex:E,dataEndIndex:C,updateId:k},g.state)));else if(O.activeTooltipIndex!==void 0){var I=O.chartX,N=O.chartY,M=O.activeTooltipIndex,R=g.state,D=R.offset,F=R.tooltipTicks;if(!D)return;if(typeof P=="function")M=P(F,O);else if(P==="value"){M=-1;for(var z=0;z<F.length;z++)if(F[z].value===O.activeLabel){M=z;break}}var q=$($({},D),{},{x:D.left,y:D.top}),U=Math.min(I,q.x+q.width),L=Math.min(N,q.y+q.height),G=F[M]&&F[M].value,Y=dl(g.state,g.props.data,M),re=F[M]?{x:_==="horizontal"?F[M].coordinate:U,y:_==="horizontal"?L:F[M].coordinate}:$x;g.setState($($({},O),{},{activeLabel:G,activeCoordinate:re,activePayload:Y,activeTooltipIndex:M}))}else g.setState(O)}),K(g,"renderCursor",function(O){var A,_=g.state,P=_.isTooltipActive,k=_.activeCoordinate,E=_.activePayload,C=_.offset,I=_.activeTooltipIndex,N=_.tooltipAxisBandSize,M=g.getTooltipEventType(),R=(A=O.props.active)!==null&&A!==void 0?A:P,D=g.props.layout,F=O.key||"_recharts-cursor";return j.createElement(z$,{key:F,activeCoordinate:k,activePayload:E,activeTooltipIndex:I,chartName:r,element:O,isActive:R,layout:D,offset:C,tooltipAxisBandSize:N,tooltipEventType:M})}),K(g,"renderPolarAxis",function(O,A,_){var P=De(O,"type.axisType"),k=De(g.state,"".concat(P,"Map")),E=O.type.defaultProps,C=E!==void 0?$($({},E),O.props):O.props,I=k&&k[C["".concat(P,"Id")]];return T.cloneElement(O,$($({},I),{},{className:J(P,I.className),key:O.key||"".concat(A,"-").concat(_),ticks:it(I,!0)}))}),K(g,"renderPolarGrid",function(O){var A=O.props,_=A.radialLines,P=A.polarAngles,k=A.polarRadius,E=g.state,C=E.radiusAxisMap,I=E.angleAxisMap,N=yt(C),M=yt(I),R=M.cx,D=M.cy,F=M.innerRadius,z=M.outerRadius;return T.cloneElement(O,{polarAngles:Array.isArray(P)?P:it(M,!0).map(function(q){return q.coordinate}),polarRadius:Array.isArray(k)?k:it(N,!0).map(function(q){return q.coordinate}),cx:R,cy:D,innerRadius:F,outerRadius:z,key:O.key||"polar-grid",radialLines:_})}),K(g,"renderLegend",function(){var O=g.state.formattedGraphicalItems,A=g.props,_=A.children,P=A.width,k=A.height,E=g.props.margin||{},C=P-(E.left||0)-(E.right||0),I=Tb({children:_,formattedGraphicalItems:O,legendWidth:C,legendContent:c});if(!I)return null;var N=I.item,M=mm(I,W$);return T.cloneElement(N,$($({},M),{},{chartWidth:P,chartHeight:k,margin:E,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),K(g,"renderTooltip",function(){var O,A=g.props,_=A.children,P=A.accessibilityLayer,k=ke(_,Ye);if(!k)return null;var E=g.state,C=E.isTooltipActive,I=E.activeCoordinate,N=E.activePayload,M=E.activeLabel,R=E.offset,D=(O=k.props.active)!==null&&O!==void 0?O:C;return T.cloneElement(k,{viewBox:$($({},R),{},{x:R.left,y:R.top}),active:D,label:M,payload:D?N:[],coordinate:I,accessibilityLayer:P})}),K(g,"renderBrush",function(O){var A=g.props,_=A.margin,P=A.data,k=g.state,E=k.offset,C=k.dataStartIndex,I=k.dataEndIndex,N=k.updateId;return T.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Dn(g.handleBrushChange,O.props.onChange),data:P,x:B(O.props.x)?O.props.x:E.left,y:B(O.props.y)?O.props.y:E.top+E.height+E.brushBottom-(_.bottom||0),width:B(O.props.width)?O.props.width:E.width,startIndex:C,endIndex:I,updateId:"brush-".concat(N)})}),K(g,"renderReferenceElement",function(O,A,_){if(!O)return null;var P=g,k=P.clipPathId,E=g.state,C=E.xAxisMap,I=E.yAxisMap,N=E.offset,M=O.type.defaultProps||{},R=O.props,D=R.xAxisId,F=D===void 0?M.xAxisId:D,z=R.yAxisId,q=z===void 0?M.yAxisId:z;return T.cloneElement(O,{key:O.key||"".concat(A,"-").concat(_),xAxis:C[F],yAxis:I[q],viewBox:{x:N.left,y:N.top,width:N.width,height:N.height},clipPathId:k})}),K(g,"renderActivePoints",function(O){var A=O.item,_=O.activePoint,P=O.basePoint,k=O.childIndex,E=O.isRange,C=[],I=A.props.key,N=A.item.type.defaultProps!==void 0?$($({},A.item.type.defaultProps),A.item.props):A.item.props,M=N.activeDot,R=N.dataKey,D=$($({index:k,dataKey:R,cx:_.x,cy:_.y,r:4,fill:Vl(A.item),strokeWidth:2,stroke:"#fff",payload:_.payload,value:_.value},Z(M,!1)),Vn(M));return C.push(x.renderActiveDot(M,D,"".concat(I,"-activePoint-").concat(k))),P?C.push(x.renderActiveDot(M,$($({},D),{},{cx:P.x,cy:P.y}),"".concat(I,"-basePoint-").concat(k))):E&&C.push(null),C}),K(g,"renderGraphicChild",function(O,A,_){var P=g.filterFormatItem(O,A,_);if(!P)return null;var k=g.getTooltipEventType(),E=g.state,C=E.isTooltipActive,I=E.tooltipAxis,N=E.activeTooltipIndex,M=E.activeLabel,R=g.props.children,D=ke(R,Ye),F=P.props,z=F.points,q=F.isRange,U=F.baseLine,L=P.item.type.defaultProps!==void 0?$($({},P.item.type.defaultProps),P.item.props):P.item.props,G=L.activeDot,Y=L.hide,re=L.activeBar,ue=L.activeShape,Ve=!!(!Y&&C&&D&&(G||re||ue)),le={};k!=="axis"&&D&&D.props.trigger==="click"?le={onClick:Dn(g.handleItemMouseEnter,O.props.onClick)}:k!=="axis"&&(le={onMouseLeave:Dn(g.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Dn(g.handleItemMouseEnter,O.props.onMouseEnter)});var xe=T.cloneElement(O,$($({},P.props),le));function Xe(Tt){return typeof I.dataKey=="function"?I.dataKey(Tt.payload):null}if(Ve)if(N>=0){var Ee,_t;if(I.dataKey&&!I.allowDuplicatedCategory){var tt=typeof I.dataKey=="function"?Xe:"payload.".concat(I.dataKey.toString());Ee=Hn(z,tt,M),_t=q&&U&&Hn(U,tt,M)}else Ee=z?.[N],_t=q&&U&&U[N];if(ue||re){var pt=O.props.activeIndex!==void 0?O.props.activeIndex:N;return[T.cloneElement(O,$($($({},P.props),le),{},{activeIndex:pt})),null,null]}if(!X(Ee))return[xe].concat(Or(g.renderActivePoints({item:P,activePoint:Ee,basePoint:_t,childIndex:N,isRange:q})))}else{var jt,Gt=(jt=g.getItemByXY(g.state.activeCoordinate))!==null&&jt!==void 0?jt:{graphicalItem:xe},rt=Gt.graphicalItem,ht=rt.item,Kt=ht===void 0?O:ht,kn=rt.childIndex,Et=$($($({},P.props),le),{},{activeIndex:kn});return[T.cloneElement(Kt,Et),null,null]}return q?[xe,null,null]:[xe,null]}),K(g,"renderCustomized",function(O,A,_){return T.cloneElement(O,$($({key:"recharts-customized-".concat(_)},g.props),g.state))}),K(g,"renderMap",{CartesianGrid:{handler:zn,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:zn},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:zn},YAxis:{handler:zn},Brush:{handler:g.renderBrush,once:!0},Bar:{handler:g.renderGraphicChild},Line:{handler:g.renderGraphicChild},Area:{handler:g.renderGraphicChild},Radar:{handler:g.renderGraphicChild},RadialBar:{handler:g.renderGraphicChild},Scatter:{handler:g.renderGraphicChild},Pie:{handler:g.renderGraphicChild},Funnel:{handler:g.renderGraphicChild},Tooltip:{handler:g.renderCursor,once:!0},PolarGrid:{handler:g.renderPolarGrid,once:!0},PolarAngleAxis:{handler:g.renderPolarAxis},PolarRadiusAxis:{handler:g.renderPolarAxis},Customized:{handler:g.renderCustomized}}),g.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:_n("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=sb(g.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),g.state={},g}return tN(x,p),Z$(x,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,g=w.data,O=w.height,A=w.layout,_=ke(S,Ye);if(_){var P=_.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,E=dl(this.state,g,P,k),C=this.state.tooltipTicks[P].coordinate,I=(this.state.offset.top+O)/2,N=A==="horizontal",M=N?{x:C,y:I}:{y:C,x:I},R=this.state.formattedGraphicalItems.find(function(F){var z=F.item;return z.type.name==="Scatter"});R&&(M=$($({},M),R.props.points[P].tooltipPosition),E=R.props.points[P].tooltipPayload);var D={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:k,activePayload:E,activeCoordinate:M};this.setState(D),this.renderCursor(_),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var g,O;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(w){uc([ke(w.children,Ye)],[ke(this.props.children,Ye)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=ke(this.props.children,Ye);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return s.indexOf(S)>=0?S:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,g=S.getBoundingClientRect(),O=WP(g),A={chartX:Math.round(w.pageX-O.left),chartY:Math.round(w.pageY-O.top)},_=g.width/S.offsetWidth||1,P=this.inRange(A.chartX,A.chartY,_);if(!P)return null;var k=this.state,E=k.xAxisMap,C=k.yAxisMap,I=this.getTooltipEventType(),N=bm(this.state,this.props.data,this.props.layout,P);if(I!=="axis"&&E&&C){var M=yt(E).scale,R=yt(C).scale,D=M&&M.invert?M.invert(A.chartX):null,F=R&&R.invert?R.invert(A.chartY):null;return $($({},A),{},{xValue:D,yValue:F},N)}return N?$($({},A),N):null}},{key:"inRange",value:function(w,S){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,A=w/g,_=S/g;if(O==="horizontal"||O==="vertical"){var P=this.state.offset,k=A>=P.left&&A<=P.left+P.width&&_>=P.top&&_<=P.top+P.height;return k?{x:A,y:_}:null}var E=this.state,C=E.angleAxisMap,I=E.radiusAxisMap;if(C&&I){var N=yt(C);return Rv({x:A,y:_},N)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),g=ke(w,Ye),O={};g&&S==="axis"&&(g.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var A=Vn(this.props,this.handleOuterEvent);return $($({},A),O)}},{key:"addListener",value:function(){Gu.on(Ku,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gu.removeListener(Ku,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,g){for(var O=this.state.formattedGraphicalItems,A=0,_=O.length;A<_;A++){var P=O[A];if(P.item===w||P.props.key===w.key||S===ot(P.item.type)&&g===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,g=S.left,O=S.top,A=S.height,_=S.width;return j.createElement("defs",null,j.createElement("clipPath",{id:w},j.createElement("rect",{x:g,y:O,height:A,width:_})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,g){var O=ym(g,2),A=O[0],_=O[1];return $($({},S),{},K({},A,_.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,g){var O=ym(g,2),A=O[0],_=O[1];return $($({},S),{},K({},A,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,g=S.formattedGraphicalItems,O=S.activeItem;if(g&&g.length)for(var A=0,_=g.length;A<_;A++){var P=g[A],k=P.props,E=P.item,C=E.type.defaultProps!==void 0?$($({},E.type.defaultProps),E.props):E.props,I=ot(E.type);if(I==="Bar"){var N=(k.data||[]).find(function(F){return TC(w,F)});if(N)return{graphicalItem:P,payload:N}}else if(I==="RadialBar"){var M=(k.data||[]).find(function(F){return Rv(w,F)});if(M)return{graphicalItem:P,payload:M}}else if(Ka(P,O)||Ha(P,O)||yn(P,O)){var R=bk({graphicalItem:P,activeTooltipItem:O,itemData:C.data}),D=C.activeIndex===void 0?R:C.activeIndex;return{graphicalItem:$($({},P),{},{childIndex:D}),payload:yn(P,O)?C.data[R]:P.props.data[R]}}}return null}},{key:"render",value:function(){var w=this;if(!$d(this))return null;var S=this.props,g=S.children,O=S.className,A=S.width,_=S.height,P=S.style,k=S.compact,E=S.title,C=S.desc,I=mm(S,U$),N=Z(I,!1);if(k)return j.createElement(Zy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},j.createElement(lc,Qt({},N,{width:A,height:_,title:E,desc:C}),this.renderClipPath(),Rd(g,this.renderMap)));if(this.props.accessibilityLayer){var M,R;N.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,N.role=(R=this.props.role)!==null&&R!==void 0?R:"application",N.onKeyDown=function(F){w.accessibilityManager.keyboardEvent(F)},N.onFocus=function(){w.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return j.createElement(Zy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},j.createElement("div",Qt({className:J("recharts-wrapper",O),style:$({position:"relative",cursor:"default",width:A,height:_},P)},D,{ref:function(z){w.container=z}}),j.createElement(lc,Qt({},N,{width:A,height:_,title:E,desc:C,style:sN}),this.renderClipPath(),Rd(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);K(y,"displayName",r),K(y,"defaultProps",$({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},l)),K(y,"getDerivedStateFromProps",function(p,x){var b=p.dataKey,w=p.data,S=p.children,g=p.width,O=p.height,A=p.layout,_=p.stackOffset,P=p.margin,k=x.dataStartIndex,E=x.dataEndIndex;if(x.updateId===void 0){var C=xm(p);return $($($({},C),{},{updateId:0},h($($({props:p},C),{},{updateId:0}),x)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:O,prevLayout:A,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(b!==x.prevDataKey||w!==x.prevData||g!==x.prevWidth||O!==x.prevHeight||A!==x.prevLayout||_!==x.prevStackOffset||!er(P,x.prevMargin)){var I=xm(p),N={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},M=$($({},bm(x,w,A)),{},{updateId:x.updateId+1}),R=$($($({},I),N),M);return $($($({},R),h($({props:p},R),x)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:O,prevLayout:A,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(!uc(S,x.prevChildren)){var D,F,z,q,U=ke(S,dr),L=U&&(D=(F=U.props)===null||F===void 0?void 0:F.startIndex)!==null&&D!==void 0?D:k,G=U&&(z=(q=U.props)===null||q===void 0?void 0:q.endIndex)!==null&&z!==void 0?z:E,Y=L!==k||G!==E,re=!X(w),ue=re&&!Y?x.updateId:x.updateId+1;return $($({updateId:ue},h($($({props:p},x),{},{updateId:ue,dataStartIndex:L,dataEndIndex:G}),x)),{},{prevChildren:S,dataStartIndex:L,dataEndIndex:G})}return null}),K(y,"renderActiveDot",function(p,x,b){var w;return T.isValidElement(p)?w=T.cloneElement(p,x):H(p)?w=p(x):w=j.createElement(Yl,x),j.createElement(ce,{className:"recharts-active-dot",key:b},w)});var v=T.forwardRef(function(x,b){return j.createElement(y,Qt({},x,{ref:b}))});return v.displayName=y.displayName,v},gN=mN({chartName:"LineChart",GraphicalChild:Cn,axisComponents:[{axisType:"xAxis",AxisComp:Qa},{axisType:"yAxis",AxisComp:ei}],formatAxisMap:vI});const bN=()=>m.jsx(Gw,{}),xN=()=>{const[t,e]=T.useState("Loading..."),[r,n]=T.useState("Loading..."),[a,i]=T.useState({platform:"Loading...",arch:"...",nodeVersion:"Loading...",electronVersion:"Loading...",chromeVersion:"Loading..."});T.useEffect(()=>{let s=!0;const u=async()=>{try{const[f,l]=await Promise.all([window.api.systemInfo.getAppVersion(),window.api.systemInfo.getPlatformInfo()]);s&&(e(f),i(l))}catch(f){console.error("Error fetching app information:",f)}},c=async()=>{try{const f=await df.healthCheck(pl.baseUrl),l=df.getServerVersion(f);s&&n(l)}catch(f){console.error("Error fetching server version:",f),s&&n("Unavailable")}};return u(),c(),()=>{s=!1}},[]);const o=(s,u,c)=>m.jsx(Ie,{label:m.jsx(Mm,{content:c,children:m.jsxs("span",{className:"inline-flex cursor-help items-center gap-1.5",children:[m.jsx(Yu,{size:12,className:"shrink-0"}),s]})}),value:u});return m.jsx(_e,{title:"Application updates and info",icon:Xx,description:"Check for updates and view information about your Local Operator installation.",dataTourTag:"settings-app-updates-section",children:m.jsxs("div",{className:"flex flex-col gap-6",children:[m.jsxs(vl,{children:[o("Application version",t,"The version of the Local Operator user interface application."),o("Server version",r,"The version of the Local Operator API server backend."),o("Platform",`${a.platform} (${a.arch})`,"The operating system and architecture your application is running on."),o("Node.js version",a.nodeVersion,"The JavaScript runtime environment version."),o("Electron version",a.electronVersion,"The framework version enabling this desktop application.")]}),m.jsx(bN,{})]})})},Rx="__cascade__";function Yt(t){return t==null?"":typeof t=="object"?JSON.stringify(t):String(t)}function wN(t,e){return t.kind==="cascade"?e!==Rx:t.kind==="list"?e!==t.value?.join(`
|
|
160
160
|
`):e!==Yt(t.value)}const ON=({setting:t,scope:e,onSaved:r,children:n})=>{const[a,i]=T.useState({value:t.kind==="list"?(t.value??[]).join(`
|
|
161
161
|
`):t.kind==="cascade"?Rx:Yt(t.value),cascadeBase:null,saving:!1,error:null}),o=wN(t,a.value)||a.cascadeBase!==null,s=async()=>{let l=null,d;const h=()=>({op:"settings.edit",key:t.key,value:l,...d?{base:d}:{}});switch(t.kind){case"bool":l=a.value==="true";break;case"int":if(l=Number.parseInt(a.value,10),Number.isNaN(l)){i(y=>({...y,error:"Enter a whole number."}));return}break;case"float":{const y=Number.parseFloat(a.value);if(!Number.isFinite(y)){i(v=>({...v,error:"Enter a finite number."}));return}l=y;break}case"enum":{const y=t.choices.find(v=>Yt(v.value)===a.value);l=y?y.value:a.value;break}case"list":l=a.value.split(`
|
|
162
162
|
`).map(y=>y.trim()).filter(Boolean);break;case"cascade":{if(!a.cascadeBase)return;const y={};for(const[v,p]of Object.entries(a.cascadeBase))y[v]=p;l=y,d=t.value??void 0;break}default:t.empty_unsets&&a.value.trim()===""?l=null:l=a.value}i(y=>({...y,saving:!0,error:null}));try{await nr(h()),i(y=>({...y,saving:!1,cascadeBase:null})),await r?.()}catch(y){i(v=>({...v,saving:!1,error:y instanceof Error?y.message:"The setting could not be saved."}))}},u=async()=>{i(l=>({...l,saving:!0,error:null}));try{await nr({op:"settings.reset",key:t.key}),i(l=>({...l,saving:!1})),await r?.()}catch(l){i(d=>({...d,saving:!1,error:l instanceof Error?l.message:"The setting could not be reset."}))}};if(t.redacted)return m.jsx(Ae,{variant:"neutral",className:"w-full",children:"This value carries inline credentials or query parameters and cannot be edited here. Secrets belong in the credential manager."});if(t.kind==="readonly")return m.jsx("p",{className:"text-body-sm text-ink-muted",children:Yt(t.value)||"Not set"});let c;switch(t.kind){case"bool":c=m.jsx(Im,{checked:a.value==="true",onCheckedChange:l=>i(d=>({...d,value:l?"true":"false"})),"aria-label":t.label});break;case"enum":c=m.jsxs($m,{value:a.value,onValueChange:l=>i(d=>({...d,value:l})),children:[m.jsx(Nm,{"aria-label":t.label,className:"w-full",children:m.jsx(Rm,{})}),m.jsx(Dm,{children:t.choices.map(l=>m.jsx(Ju,{value:Yt(l.value),children:l.label},Yt(l.value)))})]});break;case"int":case"float":c=m.jsx(bt,{type:"number",value:a.value,min:t.minimum??void 0,max:t.maximum??void 0,step:t.kind==="int"?1:"any",onChange:l=>i(d=>({...d,value:l.target.value})),"aria-label":t.label});break;case"list":c=m.jsx(Zu,{value:a.value,rows:Math.min(6,t.members.length+2),onChange:l=>i(d=>({...d,value:l.target.value})),"aria-label":t.label,className:"font-mono text-body-sm"});break;case"cascade":{const l=a.cascadeBase??t.value??{};c=m.jsxs("div",{className:"flex flex-col gap-3",children:[Object.entries(l).map(([d,h])=>m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("span",{className:"font-mono text-meta text-ink-dim",children:d}),m.jsx(Zu,{value:h.join(`
|
|
163
163
|
`),rows:Math.max(2,h.length+1),onChange:y=>i(v=>({...v,cascadeBase:{...v.cascadeBase??l,[d]:y.target.value.split(`
|
|
164
|
-
`).map(p=>p.trim()).filter(Boolean)}})),"aria-label":`${t.label}: ${d}`,className:"font-mono text-body-sm"})]},d)),m.jsx("p",{className:"text-meta text-ink-dim",children:"One hop per line, as provider/model (effort). An empty chain moves to the next provider."})]});break}default:c=m.jsx(bt,{value:a.value,onChange:l=>i(d=>({...d,value:l.target.value})),"aria-label":t.label})}const f=m.jsxs("div",{className:"flex flex-col gap-2","data-setting-key":t.key,children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m.jsx("span",{className:"text-body-sm text-ink",children:t.label}),t.help&&m.jsx("span",{className:"text-meta text-ink-dim",children:t.help})]}),m.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[!t.is_default&&m.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>void u(),disabled:a.saving,children:[m.jsx(zw,{"aria-hidden":"true"}),"Use default"]}),o&&m.jsx(V,{variant:"primary",size:"sm",onClick:()=>void s(),disabled:a.saving,children:a.saving?"Saving":"Save"})]})]}),c,t.kind!=="bool"&&!t.is_default&&m.jsxs("p",{className:"text-meta text-ink-dim",children:["Changed from the default",e?`; ${e}`:""]}),a.error&&m.jsx(Ae,{variant:"danger",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:a.error}),m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>void s(),disabled:a.saving,children:[m.jsx(Yx,{"aria-hidden":"true"}),"Retry"]})]})})]});return n?n(f):f},SN={all:["desktop","settings"]},Vu={live:"Takes effect immediately","new launch":"Takes effect the next time the app starts","new sessions":"Takes effect for new conversations"},AN=({focusKey:t,initialFilter:e=""})=>{const r=Um(),n=Km(r.data,"settings"),[a,i]=T.useState(e),[o,s]=T.useState(new Set),u=T.useRef(!1),c=Sn({queryKey:SN.all,queryFn:()=>nr({op:"settings.list"}),enabled:n,staleTime:1e4}),f=c.data,l=T.useMemo(()=>{if(!f)return null;const v=x=>x.toLowerCase().replace(/[-_]/g," "),p=v(a.trim());return p?f.settings.filter(x=>v([x.label,x.help,x.key,x.section].join(" ")).includes(p)):f.settings},[f,a]);if(T.useEffect(()=>{if(!t||!f||u.current)return;u.current=!0;const v=f.settings.find(p=>p.key===t);v&&(s(p=>{if(!p.has(v.section))return p;const x=new Set(p);return x.delete(v.section),x}),requestAnimationFrame(()=>{const p=document.querySelector(`[data-setting-key="${CSS.escape(t)}"] input, [data-setting-key="${CSS.escape(t)}"] textarea, [data-setting-key="${CSS.escape(t)}"] button[role="switch"], [data-setting-key="${CSS.escape(t)}"] button`);p?.focus(),p?.scrollIntoView({block:"center"})}))},[t,f]),r.data&&!n)return m.jsx(Ae,{variant:"warning",children:"Searchable settings need a newer Local Operator server. Update the server and restart the app to manage these settings here."});if(c.isLoading||r.isLoading)return m.jsx("div",{className:"flex h-40 items-center justify-center",children:m.jsx(Ge,{size:"lg",label:"Loading settings"})});const d=(r.data?null:r.error)??c.error;if(d||!f||!l){const v=r.isFetching||c.isFetching;return m.jsx(Ae,{variant:"warning",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:Gm("Your settings could not be loaded.",d)}),m.jsx(V,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{r.isError?r.refetch():c.refetch()},disabled:v,children:v?"Retrying":"Retry"})]})})}const h=f.sections.filter(v=>l.some(p=>p.section===v.name)),y=v=>s(p=>{const x=new Set(p);return x.has(v)?x.delete(v):x.add(v),x});return m.jsxs("div",{className:"flex flex-col gap-6",children:[m.jsxs("div",{className:"relative",children:[m.jsx(Zx,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-ink-dim","aria-hidden":"true"}),m.jsx(bt,{value:a,onChange:v=>i(v.target.value),placeholder:"Search settings by name, description or key","aria-label":"Search settings",className:"pl-9"}),a&&m.jsx(V,{variant:"ghost",size:"icon-sm",className:"absolute top-1/2 right-1 -translate-y-1/2",onClick:()=>i(""),"aria-label":"Clear search",children:m.jsx(cf,{"aria-hidden":"true"})})]}),l.length===0&&m.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[m.jsx("p",{className:"text-body-sm text-ink-muted",children:"No settings match this search."}),m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>i(""),children:[m.jsx(cf,{"aria-hidden":"true"}),"Clear search"]})]}),h.map(v=>{const p=l.filter(b=>b.section===v.name),x=o.has(v.name);return m.jsxs("section",{"data-settings-section":v.name,className:"flex flex-col gap-3",children:[m.jsxs("button",{type:"button",onClick:()=>y(v.name),"aria-expanded":!x,className:"flex items-baseline justify-between gap-3 text-left",children:[m.jsxs("span",{className:"flex flex-col gap-0.5",children:[m.jsx("span",{className:"text-heading text-ink",children:v.title}),v.description&&m.jsx("span",{className:"text-meta text-ink-dim",children:v.description})]}),Vu[v.scope]&&m.jsx(Lr,{variant:"neutral",children:Vu[v.scope]})]}),!x&&m.jsx("div",{className:"flex flex-col gap-5",children:p.map(b=>m.jsx(ON,{setting:b,scope:Vu[v.scope],onSaved:()=>c.refetch()},b.key))})]},v.name)})]})},Om=({credentialKey:t,isConfigured:e=!1,onEdit:r,onClear:n,onAdd:a})=>{const i=Jx(t),o=e?_w:Un;return m.jsxs("div",{className:"flex flex-col rounded-md p-3 transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsxs("h3",{className:"flex items-center gap-2 text-body font-medium text-ink",children:[m.jsx(o,{className:"size-3.5 shrink-0 text-ink-dim"}),i.name]}),m.jsx("p",{className:"mt-1 break-all text-mono-sm text-ink-dim",children:t}),m.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:i.description})]}),m.jsx("div",{className:"mt-auto flex flex-wrap items-center justify-end gap-2 pt-4",children:e?m.jsxs(m.Fragment,{children:[m.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>r?.(t),children:[m.jsx(_0,{}),"Update"]}),m.jsxs(V,{variant:"ghost",size:"sm",className:"text-danger hover:bg-danger-wash hover:text-danger",onClick:()=>n?.(t),children:[m.jsx(Hm,{}),"Clear"]})]}):m.jsxs(m.Fragment,{children:[m.jsxs(V,{variant:"outline",size:"sm",onClick:()=>a?.(t),children:[m.jsx(Un,{}),"Configure"]}),i.url&&m.jsx(Mm,{content:`Get your ${i.name} key`,children:m.jsx(V,{variant:"ghost",size:"icon-sm",asChild:!0,children:m.jsx("a",{href:i.url,target:"_blank",rel:"noopener noreferrer","aria-label":`Get your ${i.name} key`,children:m.jsx(Vm,{})})})})]})})]})},Xu="_custom_",Sm="credential-custom-key",Am="credential-custom-key-error",Pm="credential-type",_m="credential-type-help",jm="credential-value",Em="credential-value-help",Tm=({open:t,onClose:e,onSave:r,initialKey:n="",existingKeys:a,isSaving:i,isEditMode:o})=>{const[s,u]=T.useState(n),[c,f]=T.useState(""),[l,d]=T.useState(""),[h,y]=T.useState(!1);T.useEffect(()=>{if(t){const P=Br.some(E=>E.key===n),k=!o&&n&&!P;u(P?n:""),f(""),d(k?n:""),y(k||o&&!P)}},[t,n,o]);const v=()=>{let P="";if(o?P=n:P=h?l.trim():s,!P){console.error("No key provided for credential");return}if(!c.trim()){console.error("No value provided for credential");return}r({key:P,value:c})},p=P=>a.includes(P)&&P!==n,x=p(l),b=o?!0:h?l.trim()!==""&&!x:s!==""&&!p(s),w=c.trim()!=="",S=b&&w&&!i,g=Br.find(P=>P.key===s),O=!!g&&!h,A=o?"Update credential":"Add new credential",_=m.jsxs(m.Fragment,{children:[m.jsx(V,{variant:"secondary",onClick:e,children:"Cancel"}),m.jsxs(V,{variant:"primary",onClick:v,disabled:!S,children:[i&&m.jsx(Ge,{size:"sm",className:"border-t-on-accent"}),i?"Saving...":"Save"]})]});return m.jsx(Qx,{open:t,onClose:e,title:A,actions:_,maxWidth:"sm",fullWidth:!0,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[o?m.jsx(Ie,{label:"Credential key",value:m.jsx("span",{className:"text-mono-sm",children:n})}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:Pm,children:"Credential type"}),m.jsxs($m,{value:h?Xu:s,onValueChange:P=>{P===Xu?(y(!0),u("")):(y(!1),u(P),d(""))},children:[m.jsx(Nm,{id:Pm,"aria-describedby":O?_m:void 0,children:m.jsx(Rm,{placeholder:"Select a credential type"})}),m.jsxs(Dm,{children:[Br.filter(P=>!P.internal).map(P=>m.jsxs(Ju,{value:P.key,disabled:p(P.key),children:[P.name,p(P.key)&&" (configured)"]},P.key)),m.jsx(Ju,{value:Xu,children:"Custom credential"})]})]}),O&&g&&m.jsxs("div",{id:_m,className:"flex flex-col items-start gap-1",children:[m.jsx("p",{className:"text-meta text-ink-dim",children:g.description}),g.url&&m.jsxs("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"text-accent text-meta underline-offset-4 hover:text-accent-hover hover:underline",children:["Get your ",g.name," key"]})]})]}),h&&m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:Sm,children:"Custom credential key"}),m.jsx(bt,{id:Sm,value:l,onChange:P=>d(P.target.value),"aria-invalid":x||void 0,"aria-describedby":x?Am:void 0,required:!0,autoFocus:!0}),x&&m.jsx("p",{id:Am,className:"text-danger text-meta",children:"This credential already exists"})]})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:jm,children:"Credential value"}),m.jsx(bt,{id:jm,type:"password",value:c,onChange:P=>f(P.target.value),onKeyDown:P=>{P.key==="Enter"&&S&&v()},"aria-describedby":o?Em:void 0,required:!0,autoFocus:o,placeholder:"Enter the credential value or API key"}),o&&m.jsxs("p",{id:Em,className:"text-ink-dim text-meta",children:["Enter the new value for ",n]})]})]})})},Cm=({title:t,description:e,children:r,isEmpty:n=!1,emptyStateType:a="noCredentials"})=>m.jsxs("section",{children:[m.jsx("h3",{className:"text-body font-medium text-ink",children:t}),m.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:e}),m.jsx(Dx,{variant:"surface",padding:"sm",className:"mt-3",children:n?m.jsx(PN,{type:a}):m.jsx("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(260px,1fr))] gap-2",children:r})})]}),PN=({type:t,className:e})=>{const r=t==="noCredentials",n=r?Un:qm;return m.jsxs("div",{className:Nt("flex flex-col items-center px-4 py-8 text-center",e),children:[m.jsx(n,{size:20,className:"text-ink-dim","aria-hidden":!0}),m.jsx("p",{className:"mt-3 text-body font-medium text-ink",children:r?"No credentials configured":"All available credentials configured"}),m.jsx("p",{className:"mt-1 max-w-sm text-body-sm text-ink-muted",children:r?"You haven't set up any API credentials yet. Add credentials from the available options or add a custom one.":"You've configured all the common API credentials. You can still add custom credentials if needed."})]})},_N=()=>{const{data:t,isLoading:e,error:r,refetch:n}=Xm(),a=e0(),[i,o]=T.useState(!1),[s,u]=T.useState(!1),[c,f]=T.useState(null),l=w=>{f(w),o(!0)},d=(w=null)=>{f(w),u(!0)},h=()=>{o(!1),u(!1),f(null)},y=async w=>{try{await a.mutateAsync(w),h(),await n()}catch(S){console.error("Error saving credential:",S)}},v=async w=>{try{await a.mutateAsync({key:w,value:""}),await n()}catch(S){console.error("Error clearing credential:",S)}},p=T.useMemo(()=>t?.keys?.filter(w=>!Br.find(S=>S.key===w)?.internal)??[],[t]),x=T.useMemo(()=>Br.filter(w=>!p.includes(w.key)&&!w.internal),[p]),b=()=>e?m.jsx("div",{className:"flex min-h-40 items-center justify-center",children:m.jsx(Ge,{size:"lg",label:"Loading credentials"})}):r||!t?m.jsxs(Ae,{variant:"danger",role:"alert",children:[m.jsx(qx,{children:"Could not load credentials"}),m.jsx(Lx,{children:r instanceof Error?r.message:"The server did not say why. Check that Local Operator is running, then reopen this page."})]}):m.jsxs(m.Fragment,{children:[m.jsx(Cm,{title:"Configured credentials",description:"These API credentials are currently configured and available for use.",isEmpty:p.length===0,emptyStateType:"noCredentials",children:p.map(w=>m.jsx(Om,{credentialKey:w,isConfigured:!0,onEdit:l,onClear:v},w))}),m.jsx(Cm,{title:"Available credentials",description:"These are common API credentials you can configure to enhance functionality.",isEmpty:x.length===0,emptyStateType:"allConfigured",children:x.map(w=>m.jsx(Om,{credentialKey:w.key,isConfigured:!1,onAdd:()=>d(w.key)},w.key))}),m.jsx("div",{className:"flex justify-center",children:m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>d(null),children:[m.jsx(t0,{}),"Add custom credential"]})}),i&&m.jsx(Tm,{open:i,onClose:h,onSave:y,initialKey:c||"",existingKeys:p,isSaving:a.isPending,isEditMode:!0}),s&&m.jsx(Tm,{open:s,onClose:h,onSave:y,initialKey:c||"",existingKeys:p,isSaving:a.isPending,isEditMode:!1})]});return m.jsx("div",{className:"flex flex-col gap-6",children:b()})},km={list:t=>["desktop","mcp",t]},jN=({sessionId:t,onAdded:e})=>{const[r,n]=T.useState(""),[a,i]=T.useState("command"),[o,s]=T.useState(""),[u,c]=T.useState(""),[f,l]=T.useState(""),[d,h]=T.useState("global"),[y,v]=T.useState(null),[p,x]=T.useState(!1),b=async()=>{x(!0),v(null);try{await nr({op:"mcp.control",sessionId:t,control:{action:"add",name:r,scope:d,...a==="command"?{command:o,args:u.split(`
|
|
165
|
-
`).map(w=>w.trim()).filter(Boolean)}:{url:f}}}),n(""),s(""),c(""),l(""),e()}catch(w){v(w instanceof Error?w.message:"The server could not be added.")}finally{x(!1)}};return m.jsxs("form",{className:"flex flex-col gap-3 rounded-md border border-control bg-surface p-4",onSubmit:w=>{w.preventDefault(),b()},children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-name",children:"Name"}),m.jsx(bt,{id:"mcp-add-name",value:r,onChange:w=>n(w.target.value),required:!0})]}),m.jsxs("fieldset",{className:"flex gap-2",children:[m.jsx("legend",{className:"sr-only",children:"Server transport"}),m.jsx(V,{type:"button",variant:a==="command"?"secondary":"ghost",size:"sm",onClick:()=>i("command"),children:"Local command"}),m.jsx(V,{type:"button",variant:a==="url"?"secondary":"ghost",size:"sm",onClick:()=>i("url"),children:"Remote URL"})]}),a==="command"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-command",children:"Command"}),m.jsx(bt,{id:"mcp-add-command",value:o,onChange:w=>s(w.target.value),className:"font-mono",required:!0})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-args",children:"Arguments, one per line"}),m.jsx("textarea",{id:"mcp-add-args",value:u,onChange:w=>c(w.target.value),rows:2,className:"rounded-sm border border-control bg-surface p-2 font-mono text-body-sm text-ink"})]})]}):m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-url",children:"URL"}),m.jsx(bt,{id:"mcp-add-url",type:"url",value:f,onChange:w=>l(w.target.value),className:"font-mono",required:!0}),m.jsx("p",{className:"text-meta text-ink-dim",children:"No inline credentials or query parameters; secrets are referenced from the credential manager."})]}),m.jsxs("fieldset",{className:"flex gap-2",children:[m.jsx("legend",{className:"sr-only",children:"Configuration scope"}),m.jsx(V,{type:"button",variant:d==="global"?"secondary":"ghost",size:"sm",onClick:()=>h("global"),children:"Global"}),m.jsx(V,{type:"button",variant:d==="project"?"secondary":"ghost",size:"sm",onClick:()=>h("project"),children:"This project"})]}),y&&m.jsx(Ae,{variant:"danger",children:y}),m.jsx("div",{children:m.jsxs(V,{type:"submit",variant:"primary",size:"sm",disabled:p||!r||!(a==="command"?o:f),children:[p?m.jsx(Ge,{size:"sm"}):null,"Add server"]})})]})},EN=({sessionId:t,sectionRef:e,highlightServer:r})=>{const n=Um(),a=Km(n.data,"mcp"),i=zm(),[o,s]=T.useState(null),[u,c]=T.useState(null),[f,l]=T.useState(!1),d=Sn({queryKey:km.list(t??""),queryFn:()=>{if(!t)throw new Error("No conversation selected.");return nr({op:"mcp.list",sessionId:t}).then(b=>b.data)},enabled:a&&!!t,staleTime:1e4}),h=d.data?.servers??[],y=T.useRef(null),v=T.useRef(null);T.useEffect(()=>{!r||h.length===0||v.current!==r&&h.some(b=>b.name===r)&&(v.current=r,y.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[r,h]);const p=T.useCallback(()=>{t&&i.invalidateQueries({queryKey:km.list(t)})},[i,t]),x=T.useCallback(async(b,w,S={})=>{if(t){c(null);try{await nr({op:"mcp.control",sessionId:t,control:{action:b,name:w,...S}}),p()}catch(g){c(g instanceof Error?g.message:"The MCP change could not be completed.")}}},[t,p]);return a?t?m.jsx(_e,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts. A connected server is a working transport; the account behind it may still need its own sign-in.",sectionRef:e,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[u&&m.jsx(Ae,{variant:"danger",children:u}),d.isLoading&&m.jsx("div",{className:"flex h-24 items-center justify-center",children:m.jsx(Ge,{size:"lg",label:"Loading MCP servers"})}),d.isError&&m.jsx(Ae,{variant:"warning",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:"MCP servers could not be loaded."}),m.jsx(V,{variant:"secondary",size:"sm",onClick:()=>void d.refetch(),children:"Retry"})]})}),d.isSuccess&&h.length===0&&m.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers configured yet. Add one below."}),h.length>0&&m.jsx("ul",{className:"flex flex-col gap-2",children:h.map(b=>{const w=b.status==="connected",S=b.name===r;return m.jsxs("li",{ref:S?y:void 0,className:Nt("flex flex-col gap-2 rounded-md border border-control bg-surface p-3",S&&"border-accent bg-elevated"),children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{className:"truncate font-medium text-body text-ink",children:b.name}),b.scope&&m.jsx(Lr,{variant:"neutral",children:b.scope}),b.transport&&m.jsx(Lr,{variant:"outline",children:b.transport})]}),m.jsx(Lr,{variant:w?"success":b.status==="connecting"?"info":"neutral",children:b.status??"unknown"})]}),typeof b.tool_count=="number"&&m.jsxs("p",{className:"text-meta text-ink-dim",children:[b.tool_count," tools available"]}),b.error&&m.jsx("p",{className:"text-body-sm text-danger",children:b.error}),m.jsxs("p",{className:"text-meta text-ink-dim",children:["Account authorization:"," ",b.downstream_authorization==="unknown"||!b.downstream_authorization?"unknown":b.downstream_authorization]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[w?m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>{s(null),x("disconnect",b.name,{confirmed:!0})},children:[m.jsx(Ym,{"aria-hidden":"true"}),"Disconnect"]}):m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>void x("connect",b.name),children:[m.jsx($w,{"aria-hidden":"true"}),"Connect"]}),m.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>void x("reload",b.name),children:[m.jsx(Bx,{"aria-hidden":"true"}),"Reload"]}),b.transport==="http"&&b.transport_oauth_supported!==!1?m.jsx(V,{variant:"ghost",size:"sm",onClick:()=>void x("login",b.name),children:"Grant account access"}):b.setup_prompt?m.jsx(V,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(b.setup_prompt??"").catch(()=>{})},children:"Copy setup prompt"}):null,o===b.name?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-body-sm text-ink",children:["Remove ",b.name,"?"]}),m.jsx(V,{variant:"danger",size:"sm",onClick:()=>{s(null),x("remove",b.name,{confirmed:!0,scope:b.scope==="project"?"project":"global"})},children:"Confirm removal"}),m.jsx(V,{variant:"ghost",size:"sm",onClick:()=>s(null),children:"Keep"})]}):m.jsxs(V,{variant:"ghost",size:"sm",className:"text-danger",onClick:()=>s(b.name),children:[m.jsx(Hm,{"aria-hidden":"true"}),"Remove"]})]})]},b.name)})}),f?m.jsx(jN,{sessionId:t,onAdded:()=>{l(!1),p()}}):m.jsx("div",{children:m.jsx(V,{variant:"secondary",size:"sm",onClick:()=>l(!0),"data-tour-tag":"mcp-add-server",children:"Add server"})})]})}):m.jsx(_e,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:e,children:m.jsx("p",{className:"text-body-sm text-ink-muted",children:"Open a conversation to manage its MCP servers."})}):m.jsx(_e,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:e,children:m.jsx(Ae,{variant:"warning",children:"Integration management needs a newer Local Operator backend. Update the backend and restart the app to manage MCP servers here."})})},TN=({onAfterCredentialUpdate:t})=>{const{isAuthenticated:e,user:r,isLoading:n,error:a,signOut:i}=r0(),o=Zm(f=>f.isSigningOut),s=T.useCallback(async()=>{try{await i()}catch(f){console.error("Error signing out:",f)}},[i]),u=T.useMemo(()=>{if(!e||!r?.radientUser)return null;const{account:f,identity:l}=r.radientUser;return m.jsxs(m.Fragment,{children:[m.jsxs(vl,{children:[m.jsx(Ie,{label:"Status",value:m.jsxs("span",{className:"inline-flex items-center gap-2",children:["Connected",m.jsx(Lr,{variant:"success",className:"capitalize",children:f.status})]})}),m.jsx(Ie,{label:"Name",value:f.name||"Not provided"}),m.jsx(Ie,{label:"Email",value:f.email}),m.jsx(Ie,{label:"Account ID",value:m.jsx("span",{className:"text-mono-sm",children:f.id})}),m.jsx(Ie,{label:"Tenant ID",value:m.jsx("span",{className:"text-mono-sm",children:f.tenant_id})}),m.jsx(Ie,{label:"Provider",value:m.jsx("span",{className:"capitalize",children:l.provider})}),m.jsx(Ie,{label:"Created",value:Jm(f.created_at)})]}),m.jsxs("div",{className:"mt-8",children:[m.jsx("p",{className:"text-body-sm text-ink-muted",children:"Need to sign out or switch accounts?"}),m.jsxs(V,{variant:"danger",className:"mt-3",onClick:s,children:[m.jsx(n0,{}),"Sign out from Radient"]})]})]})},[e,r?.radientUser,s]),c=T.useMemo(()=>e&&r?null:m.jsxs("div",{children:[m.jsx("p",{className:"text-body-sm text-ink-muted",children:"You are not currently signed in to Radient. Sign in to access your account details or sign up to get free credits and unified access to models, tools, and more with Radient Pass. Radient's automatic model router will automatically select the best model for your agents to balance cost and performance. It is often cheaper to use Radient Pass than to use single AI providers due to automatic cost optimization."}),m.jsx("div",{className:"mt-6",children:m.jsx(A0,{titleText:"",onAfterCredentialUpdate:t,descriptionText:"",onSignInSuccess:()=>{}})})]}),[e,r,t]);return n||o?m.jsx("div",{className:"flex min-h-36 items-center justify-center",children:m.jsx(Ge,{size:"lg",label:"Loading account"})}):e&&r?.radientUser?u:m.jsxs("div",{className:"flex flex-col gap-4",children:[a&&m.jsxs(Ae,{variant:"danger",children:["Error checking account status:"," ",a instanceof Error?a.message:String(a)]}),c]})},CN=()=>{const{data:t,isLoading:e,error:r,refetch:n}=Gw(),a=Hw(),[i,o]=T.useState(""),[s,u]=T.useState(!1);T.useEffect(()=>{o(t?.content??""),u(!1)},[t]);const c=y=>{const v=y.target.value;o(v),u(v!==(t?.content??""))},f=async()=>{if(!(!s||a.isPending))try{const y={content:i};await a.mutateAsync(y),await n(),u(!1)}catch(y){console.error("Error updating system prompt:",y)}},l=()=>{o(t?.content??""),u(!1)},d=a.isPending,h=()=>m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:"app-system-prompt",children:"Instructions"}),m.jsx(Zu,{id:"app-system-prompt",name:"systemPrompt",value:i,onChange:c,placeholder:"Enter instructions for how all agents should behave and respond to your requests...",className:"min-h-50"})]}),m.jsxs("div",{className:"flex gap-3",children:[m.jsxs(V,{variant:"primary",onClick:f,disabled:!s||d,children:[d?m.jsx(Ge,{size:"sm"}):m.jsx(a0,{}),d?"Saving...":"Save changes"]}),m.jsx(V,{onClick:l,disabled:!s||d,children:"Cancel"})]}),t?.last_modified&&m.jsxs("p",{className:"text-ink-dim text-meta",children:["Last modified:"," ",m.jsx("span",{className:"font-mono text-mono-sm",children:Qm(t.last_modified)})]})]});return m.jsx(_e,{title:"System prompt",icon:P0,description:"Every Local Operator agent receives this prompt in addition to its own instructions, so it is the place for baseline expectations and for details you want every agent to know about you, such as your name, location, or preferences. It is sent to your selected hosting provider.",children:e?m.jsx("div",{className:"flex min-h-50 items-center justify-center",children:m.jsx(Ge,{size:"lg",label:"Loading system prompt"})}):r?m.jsxs(Ae,{variant:"danger",children:["Failed to load system prompt:"," ",r instanceof Error?r.message:"Unknown error"]}):h()})},kN={localOperatorDark:Cw,localOperatorLight:Bw,radient:Ow,dracula:Rw,dune:xw,sage:Aw,monokai:zx,tokyoNight:Iw,iceberg:qw,neon:Uw,obsidian:ig,synth:fw},IN=({id:t})=>m.jsxs("div",{"data-theme":t,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[m.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1.5",children:[m.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:m.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),m.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),m.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),m.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2",children:[m.jsxs("div",{className:"flex flex-col gap-1.5 rounded-sm bg-surface p-2",children:[m.jsx("span",{className:"h-1.5 w-3/5 rounded-xs bg-ink"}),m.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"}),m.jsx("span",{className:"h-1 w-4/5 rounded-xs bg-ink-dim"})]}),m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"h-3 w-9 rounded-xs bg-accent"}),m.jsx("span",{className:"h-3 w-6 rounded-xs border border-control"})]})]})]}),MN=({id:t,name:e,description:r,isSelected:n,onSelect:a})=>{const i=kN[t];return m.jsxs("button",{type:"button","aria-pressed":n,onClick:a,className:Nt("flex flex-col gap-2 rounded-lg p-2 text-left transition-colors duration-fast ease-out-quart",n?"bg-accent-wash":"hover:bg-surface"),children:[m.jsx("span",{className:Nt("block aspect-16/10 overflow-hidden rounded-md border transition-colors duration-fast ease-out-quart",n?"border-accent":"border-hairline"),children:m.jsx(IN,{id:t})}),m.jsxs("span",{className:"flex items-center gap-2 px-1",children:[m.jsx(i,{size:14,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),m.jsx("span",{className:Nt("min-w-0 flex-1 truncate text-body-sm text-ink",n&&"font-medium"),children:e}),n&&m.jsx(qm,{size:14,className:"shrink-0 text-accent","aria-hidden":"true"})]}),m.jsx("span",{className:"px-1 pb-1 text-meta text-ink-muted",children:r})]})},$N=()=>{const{themeName:t,setTheme:e}=Qu(),r=T.useMemo(()=>{const n=Object.values(Fx);return[{label:"Dark",items:n.filter(a=>a.theme.palette.mode==="dark")},{label:"Light",items:n.filter(a=>a.theme.palette.mode==="light")}].filter(a=>a.items.length>0)},[]);return m.jsx("div",{className:"flex flex-col gap-6",children:r.map(n=>m.jsxs("div",{children:[m.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:n.label}),m.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2",children:n.items.map(({id:a,name:i,description:o})=>m.jsx(MN,{id:a,name:i,description:o,isSelected:a===t,onSelect:()=>e(a)},a))})]},n.label))})},NN=()=>{const{data:t,isLoading:e,error:r}=kO({enabled:!0});return m.jsxs("div",{children:[m.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[m.jsx(gw,{size:16,className:"shrink-0 text-ink-dim"}),"Radient Pass"]}),e&&m.jsx(Lm,{className:"h-6 w-36"}),r&&m.jsxs(Ae,{variant:"warning",children:["Could not load your credit balance. ",r.message]}),t&&!e&&!r&&m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[m.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:["Available credits"," ",m.jsx("span",{className:"font-medium text-ink",children:t.balance.toFixed(2)})]}),m.jsx(V,{variant:"secondary",size:"sm",asChild:!0,children:m.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(vw,{}),"Add credits"]})})]})]})},RN=[{id:"credits",label:"Credits"},{id:"tokens",label:"Tokens"}],DN=({active:t,label:e,payload:r,unit:n})=>!t||!r?.length?null:m.jsxs("div",{className:"rounded-md border border-hairline bg-elevated px-3 py-2 shadow-overlay",children:[m.jsx("p",{className:"text-meta text-ink-dim",children:e}),m.jsxs("p",{className:"text-mono text-ink",children:[r[0]?.value," ",n]})]}),qN=()=>{const[t,e]=T.useState("credits"),r=T.useMemo(()=>{const s=new Date,u=Xw(s);return{start_date:gf(u),end_date:gf(s),rollup:"daily"}},[]),{data:n,isLoading:a,error:i}=$O(r,{enabled:!0}),o=T.useMemo(()=>n?.data_points?[...n.data_points].sort((u,c)=>ai(u.timestamp).getTime()-ai(c.timestamp).getTime()).map(u=>({date:w0(ai(u.timestamp),"MMM dd"),credits:Number.parseFloat(u.total_cost.toFixed(2)),tokens:u.total_tokens})):[],[n]);return m.jsxs("div",{children:[m.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[m.jsx(pw,{size:16,className:"shrink-0 text-ink-dim"}),"Usage (last 30 days)"]}),m.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[m.jsx("legend",{className:"sr-only",children:"Usage metric"}),m.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:RN.map(({id:s,label:u})=>m.jsx(V,{variant:"ghost",size:"sm","aria-pressed":t===s,onClick:()=>e(s),className:Nt(t===s&&"bg-surface text-ink hover:bg-surface"),children:u},s))})]})]}),a&&m.jsx(Lm,{className:"h-62 w-full"}),i&&m.jsxs(Ae,{variant:"warning",children:["Could not load your usage data. ",i.message]}),!a&&!i&&n&&o.length>0&&m.jsx("div",{className:Nt("h-62 w-full","[&_.recharts-cartesian-grid_line]:stroke-hairline","[&_.recharts-cartesian-axis-tick-value]:fill-ink-dim [&_.recharts-cartesian-axis-tick-value]:text-meta","[&_.recharts-line-curve]:stroke-accent","[&_.recharts-active-dot_circle]:fill-accent","[&_.recharts-tooltip-cursor]:stroke-hairline"),children:m.jsx(RP,{width:"100%",height:"100%",children:m.jsxs(gN,{data:o,margin:{top:5,right:20,left:10,bottom:5},children:[m.jsx(xx,{strokeDasharray:"3 3"}),m.jsx(Qa,{dataKey:"date",tickLine:!1,axisLine:!1}),m.jsx(ei,{tickLine:!1,axisLine:!1,width:48}),m.jsx(Ye,{content:m.jsx(DN,{unit:t==="credits"?"credits":"tokens"})}),m.jsx(Cn,{type:"monotone",dataKey:t,strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:t==="credits"?"Credits consumed":"Tokens used"})]})})}),!a&&!i&&(!n||o.length===0)&&m.jsx("p",{className:"text-body-sm text-ink-muted",children:"No usage recorded in the last 30 days."})]})},LN=()=>m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[m.jsx(O0,{size:16,className:"shrink-0 text-ink-dim"}),"Radient account"]}),m.jsx(V,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:m.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:["Go to Radient console",m.jsx(Vm,{})]})})]}),JN=()=>{const t=Qu(q=>q.showAgentReasoning),e=Qu(q=>q.setShowAgentReasoning),{data:r,isLoading:n,isFetching:a,error:i,refetch:o}=i0(),s=o0(),[u,c]=T.useState(null),f=Zm(),{isAuthenticated:l,isLoading:d}=hl(),h=s0(q=>q.activeSessionId),[y,v]=T.useState("general"),[p,x]=T.useState(!1),b=T.useRef(null),w=T.useRef(null),{startTour:S}=u0(),g=c0(),{data:O,refetch:A}=Xm(),{refreshModels:_}=l0(),P=T.useMemo(()=>O?.keys?[...O.keys].sort():[],[O?.keys]),k=T.useRef({keys:"",hosting:void 0});T.useEffect(()=>{const q=P.join(","),U=r?.values?.hosting;(k.current.keys!==q||k.current.hosting!==U)&&(k.current={keys:q,hosting:U},_().catch(L=>{console.error("Failed to refresh models after credentials or hosting change:",L)}))},[P,r?.values?.hosting,_]);const E=T.useRef({general:T.useRef(null),radient:T.useRef(null),integrations:T.useRef(null),appearance:T.useRef(null),credentials:T.useRef(null),providers:T.useRef(null),backend:T.useRef(null),updates:T.useRef(null)}).current,C=T.useMemo(()=>new URLSearchParams(g.search).get("setting"),[g.search]),I=T.useMemo(()=>new URLSearchParams(g.search).get("filter")??"",[g.search]),N=T.useMemo(()=>new URLSearchParams(g.search).get("mcp")??void 0,[g.search]),M=T.useMemo(()=>new URLSearchParams(g.search).get("provider"),[g.search]),R=T.useCallback(q=>{v(q),x(!0);const U=E[q],L=w.current;if(U?.current&&L){const Y=U.current.getBoundingClientRect().top-L.getBoundingClientRect().top;L.scrollHeight>L.clientHeight?L.scrollTo({top:Math.max(0,L.scrollTop+Y-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,U.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(b.current??void 0),b.current=setTimeout(()=>{x(!1),b.current=null},800)}else x(!1)},[E]);T.useEffect(()=>{const q=setTimeout(()=>{const U=w.current;if(!U)return;const L=()=>{if(p)return;const K=U.getBoundingClientRect(),Y=K.height;let re="",ue=0;for(const[Ve,le]of Object.entries(E))if(le.current){const xe=le.current.getBoundingClientRect(),Xe=K.top,Ee=xe.top-Xe,_t=xe.bottom-Xe,tt=xe.height,pt=Math.max(0,Ee),jt=Math.min(Y,_t),rt=Math.max(0,jt-pt)/tt,ht=rt+(Ee<Y*.3?.1:0);ht>ue&&rt>.1&&(ue=ht,re=Ve)}re&&re!==y&&v(re)};return L(),U.addEventListener("scroll",L,{passive:!0}),()=>{U.removeEventListener("scroll",L),clearTimeout(b.current??void 0)}},100);return()=>clearTimeout(q)},[E,y,p]),T.useEffect(()=>{const q=new URLSearchParams(g.search),U=q.get("section"),L=q.get("setting")?"backend":U,K=L?E[L]:void 0;if(!L||!K)return;let Y=!1,re=Number.NaN,ue=0;const Ve=window.setTimeout(()=>{Y||(Y=!0,xe.disconnect(),R(L))},2e3),le=()=>{if(Y)return;const Xe=K.current;if(!Xe){ue=requestAnimationFrame(le);return}const Ee=Math.round(Xe.getBoundingClientRect().top+window.scrollY);if(Ee===re&&Ee>0){Y=!0,xe.disconnect(),window.clearTimeout(Ve),R(L);return}re=Ee,ue=requestAnimationFrame(le)},xe=new ResizeObserver(()=>{Y||(cancelAnimationFrame(ue),ue=requestAnimationFrame(le))});return w.current&&xe.observe(w.current),ue=requestAnimationFrame(le),()=>{Y=!0,cancelAnimationFrame(ue),xe.disconnect(),window.clearTimeout(Ve)}},[g.search,E,R]);const D=async(q,U)=>{c(q);try{await s.mutateAsync({[q]:U}),await o()}catch(L){console.error(`Error updating ${q}:`,L)}finally{c(null)}},F=n||d,z=IO(F,4e3);return i?m.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:m.jsx(Ae,{variant:"warning",className:"w-full max-w-xl",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:Gm("Your settings could not be loaded.",i)}),m.jsx(V,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void o(),disabled:a,children:a?"Retrying":"Retry"})]})})}):F?m.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[m.jsx(Ge,{size:"lg",label:z?void 0:"Loading settings"}),z&&m.jsx("p",{className:"max-w-sm text-center text-body-sm text-ink-muted",children:"The Local Operator server is taking longer than usual to answer. If it does not respond, you will be able to retry from here."})]}):r?m.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-canvas",children:[m.jsx("div",{className:"w-12 shrink-0 overflow-y-auto border-r border-hairline min-[1040px]:w-55",children:m.jsx(f0,{activeSection:y,onSelectSection:R,sections:d0})}),m.jsx("div",{ref:w,"data-settings-content":!0,"data-tour-tag":"settings-general-section",className:"flex-1 overflow-y-auto overflow-x-hidden p-4 sm:p-6 md:p-8",children:m.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[m.jsx(S0,{title:"Settings",icon:pf}),m.jsxs("div",{className:"flex flex-col gap-8",children:[m.jsxs("div",{ref:E.general,className:"flex flex-col gap-8",children:[m.jsx(_e,{title:"User profile",icon:p0,description:`Your user profile information displayed in the application. This information is not provided to the agents. ${l?"These details are provided through your Radient account.":""}`,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(hf,{value:f.profile.name,label:"Display name",placeholder:"Enter your name...",isSaving:u==="user_name",onSave:async q=>{c("user_name");try{f.updateName(q)}finally{c(null)}},readOnly:l}),m.jsx(hf,{value:f.profile.email,label:"Email address",placeholder:"Enter your email...",isSaving:u==="user_email",onSave:async q=>{c("user_email");try{f.updateEmail(q)}finally{c(null)}},readOnly:l})]})}),m.jsx(_e,{title:"Application tour",description:"Missed the application onboarding tour or want a refresher? Start it again here.",children:m.jsxs(V,{variant:"secondary",onClick:()=>{S({forceModalCompleted:!0})},children:[m.jsx(h0,{}),"Take the tour"]})}),m.jsx(_e,{title:"Model settings",icon:v0,description:"Configure the default AI model and hosting providers used for generating responses. This will be used for all agents that don't have a specific model or hosting provider configured. You can override these settings for individual agents in the agent settings.",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(y0,{value:r.values.hosting,isSaving:u==="hosting",onSave:q=>D("hosting",q),filterByCredentials:!0,allowCustom:!0,allowDefault:!1,emptyHelperText:"No hosting providers available. Add one in API credentials, in the list on the left."}),m.jsx(m0,{value:r.values.model_name,hostingId:r.values.hosting,isSaving:u==="model_name",onSave:q=>D("model_name",q),allowCustom:!0,allowDefault:!1}),m.jsx(Ae,{variant:"neutral",icon:m.jsx(Yu,{className:"size-4","aria-hidden":"true"}),children:"You need a Radient account or your own API keys to reach cloud providers. If you don't see more hosting providers and models here, add credentials or sign in to Radient."})]})}),m.jsx(CN,{}),m.jsx(_e,{title:"History settings",icon:E0,description:"Configure how much conversation history is retained and displayed. These are tools to help balance cost and performance by controlling the amount of data used by the agents.",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(ni,{value:r.values.conversation_length,label:"Maximum conversation history",description:"Number of messages to keep in conversation history for context. More messages will make the agents have longer memory but more expensive to run. Recommended: 100",min:10,max:500,step:10,unit:"msgs",icon:Ew,isSaving:u==="conversation_length",onChange:q=>D("conversation_length",q)}),m.jsx(ni,{value:r.values.detail_length,label:"Detail view length",description:"Maximum number of messages to show in the detailed conversation view. Messages beyond this limit will be summarized. Shortening this will decrease costs but some important details could get lost from earlier messages. Recommended: 15",min:10,max:500,step:5,unit:"msgs",icon:g0,isSaving:u==="detail_length",onChange:q=>D("detail_length",q)}),m.jsx(ni,{value:r.values.max_learnings_history,label:"Maximum learnings history",description:"Agents note down specific insights and key learnings in memory which persist beyond the maximum conversation history and summarization. This setting controls the maximum number of learning items to retain. More items will make the agents acquire a longer history of knowledge from your conversations but more expensive to run. Recommended: 50",min:10,max:200,step:10,unit:"notes",icon:b0,isSaving:u==="max_learnings_history",onChange:q=>D("max_learnings_history",q)})]})}),m.jsx(_e,{title:"Configuration information",icon:Yu,description:"System information about the current configuration.",children:m.jsxs(vl,{children:[m.jsx(Ie,{label:"Version",value:m.jsx("span",{className:"text-mono-sm",children:r.version})}),m.jsx(Ie,{label:"Created",value:Jm(r.metadata.created_at)}),m.jsx(Ie,{label:"Last modified",value:Qm(r.metadata.last_modified)}),m.jsx(Ie,{label:"Description",value:r.metadata.description||"No description available"})]})})]}),m.jsx(_e,{title:"Appearance",icon:ig,description:"Customize the look and feel of Local Operator",sectionRef:E.appearance,dataTourTag:"settings-appearance-section",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx($N,{}),m.jsx(Vw,{value:t,label:"Show agent reasoning",description:"Adds the agent's Reasoning and Thinking rows to conversations. They stay closed until you open one.",onChange:async q=>e(q)})]})}),m.jsx(_e,{title:"Radient account",titleComponent:m.jsx(LN,{}),description:"Manage your Radient account, Radient Pass details, and credits.",sectionRef:E.radient,dataTourTag:"settings-radient-account-section",children:m.jsxs("div",{className:"flex flex-col gap-8",children:[m.jsx(TN,{onAfterCredentialUpdate:()=>{_(),A()}}),l&&m.jsxs(m.Fragment,{children:[m.jsx(NN,{}),m.jsx(qN,{})]})]})}),m.jsx(_e,{title:"Providers",icon:Ym,description:"Model providers, how you sign in to each, and which are connected.",sectionRef:E.providers,children:m.jsx(x0,{initialProviderId:M})}),m.jsx(_e,{title:"Backend settings",icon:pf,description:"Every setting the backend registry owns, searchable, with typed editors and scopes.",sectionRef:E.backend,children:m.jsx(AN,{focusKey:C,initialFilter:I})}),m.jsx(EN,{sessionId:h??void 0,sectionRef:E.integrations,highlightServer:N}),m.jsx(_e,{title:"API credentials",icon:Un,description:"Manage your API keys for various services and integrations",sectionRef:E.credentials,dataTourTag:"settings-api-credentials-section",children:m.jsx(_N,{})}),m.jsx("div",{ref:E.updates,children:m.jsx(xN,{})})]})]})})]}):m.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:m.jsx(Ae,{variant:"warning",className:"w-full max-w-xl",children:"Your settings could not be loaded."})})};export{JN as SettingsPage};
|
|
164
|
+
`).map(p=>p.trim()).filter(Boolean)}})),"aria-label":`${t.label}: ${d}`,className:"font-mono text-body-sm"})]},d)),m.jsx("p",{className:"text-meta text-ink-dim",children:"One hop per line, as provider/model (effort). An empty chain moves to the next provider."})]});break}default:c=m.jsx(bt,{value:a.value,onChange:l=>i(d=>({...d,value:l.target.value})),"aria-label":t.label})}const f=m.jsxs("div",{className:"flex flex-col gap-2","data-setting-key":t.key,children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m.jsx("span",{className:"text-body-sm text-ink",children:t.label}),t.help&&m.jsx("span",{className:"text-meta text-ink-dim",children:t.help})]}),m.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[!t.is_default&&m.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>void u(),disabled:a.saving,children:[m.jsx(zw,{"aria-hidden":"true"}),"Use default"]}),o&&m.jsx(V,{variant:"primary",size:"sm",onClick:()=>void s(),disabled:a.saving,children:a.saving?"Saving":"Save"})]})]}),c,t.kind!=="bool"&&!t.is_default&&m.jsxs("p",{className:"text-meta text-ink-dim",children:["Changed from the default",e?`; ${e}`:""]}),a.error&&m.jsx(Ae,{variant:"danger",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:a.error}),m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>void s(),disabled:a.saving,children:[m.jsx(Yx,{"aria-hidden":"true"}),"Retry"]})]})})]});return n?n(f):f},SN={all:["desktop","settings"]},Vu={live:"Takes effect immediately","new launch":"Takes effect the next time the app starts","new sessions":"Takes effect for new conversations"},AN=({focusKey:t,initialFilter:e=""})=>{const r=Um(),n=Gm(r.data,"settings"),[a,i]=T.useState(e),[o,s]=T.useState(new Set),u=T.useRef(!1),c=Sn({queryKey:SN.all,queryFn:()=>nr({op:"settings.list"}),enabled:n,staleTime:1e4}),f=c.data,l=T.useMemo(()=>{if(!f)return null;const v=x=>x.toLowerCase().replace(/[-_]/g," "),p=v(a.trim());return p?f.settings.filter(x=>v([x.label,x.help,x.key,x.section].join(" ")).includes(p)):f.settings},[f,a]);if(T.useEffect(()=>{if(!t||!f||u.current)return;u.current=!0;const v=f.settings.find(p=>p.key===t);v&&(s(p=>{if(!p.has(v.section))return p;const x=new Set(p);return x.delete(v.section),x}),requestAnimationFrame(()=>{const p=document.querySelector(`[data-setting-key="${CSS.escape(t)}"] input, [data-setting-key="${CSS.escape(t)}"] textarea, [data-setting-key="${CSS.escape(t)}"] button[role="switch"], [data-setting-key="${CSS.escape(t)}"] button`);p?.focus(),p?.scrollIntoView({block:"center"})}))},[t,f]),r.data&&!n)return m.jsx(Ae,{variant:"warning",children:"Searchable settings need a newer Local Operator server. Update the server and restart the app to manage these settings here."});if(c.isLoading||r.isLoading)return m.jsx("div",{className:"flex h-40 items-center justify-center",children:m.jsx(Ke,{size:"lg",label:"Loading settings"})});const d=(r.data?null:r.error)??c.error;if(d||!f||!l){const v=r.isFetching||c.isFetching;return m.jsx(Ae,{variant:"warning",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:Km("Your settings could not be loaded.",d)}),m.jsx(V,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>{r.isError?r.refetch():c.refetch()},disabled:v,children:v?"Retrying":"Retry"})]})})}const h=f.sections.filter(v=>l.some(p=>p.section===v.name)),y=v=>s(p=>{const x=new Set(p);return x.has(v)?x.delete(v):x.add(v),x});return m.jsxs("div",{className:"flex flex-col gap-6",children:[m.jsxs("div",{className:"relative",children:[m.jsx(Zx,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-ink-dim","aria-hidden":"true"}),m.jsx(bt,{value:a,onChange:v=>i(v.target.value),placeholder:"Search settings by name, description or key","aria-label":"Search settings",className:"pl-9"}),a&&m.jsx(V,{variant:"ghost",size:"icon-sm",className:"absolute top-1/2 right-1 -translate-y-1/2",onClick:()=>i(""),"aria-label":"Clear search",children:m.jsx(cf,{"aria-hidden":"true"})})]}),l.length===0&&m.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[m.jsx("p",{className:"text-body-sm text-ink-muted",children:"No settings match this search."}),m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>i(""),children:[m.jsx(cf,{"aria-hidden":"true"}),"Clear search"]})]}),h.map(v=>{const p=l.filter(b=>b.section===v.name),x=o.has(v.name);return m.jsxs("section",{"data-settings-section":v.name,className:"flex flex-col gap-3",children:[m.jsxs("button",{type:"button",onClick:()=>y(v.name),"aria-expanded":!x,className:"flex items-baseline justify-between gap-3 text-left",children:[m.jsxs("span",{className:"flex flex-col gap-0.5",children:[m.jsx("span",{className:"text-heading text-ink",children:v.title}),v.description&&m.jsx("span",{className:"text-meta text-ink-dim",children:v.description})]}),Vu[v.scope]&&m.jsx(Lr,{variant:"neutral",children:Vu[v.scope]})]}),!x&&m.jsx("div",{className:"flex flex-col gap-5",children:p.map(b=>m.jsx(ON,{setting:b,scope:Vu[v.scope],onSaved:()=>c.refetch()},b.key))})]},v.name)})]})},Om=({credentialKey:t,isConfigured:e=!1,onEdit:r,onClear:n,onAdd:a})=>{const i=Jx(t),o=e?_w:Un;return m.jsxs("div",{className:"flex flex-col rounded-md p-3 transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsxs("h3",{className:"flex items-center gap-2 text-body font-medium text-ink",children:[m.jsx(o,{className:"size-3.5 shrink-0 text-ink-dim"}),i.name]}),m.jsx("p",{className:"mt-1 break-all text-mono-sm text-ink-dim",children:t}),m.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:i.description})]}),m.jsx("div",{className:"mt-auto flex flex-wrap items-center justify-end gap-2 pt-4",children:e?m.jsxs(m.Fragment,{children:[m.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>r?.(t),children:[m.jsx(_0,{}),"Update"]}),m.jsxs(V,{variant:"ghost",size:"sm",className:"text-danger hover:bg-danger-wash hover:text-danger",onClick:()=>n?.(t),children:[m.jsx(Hm,{}),"Clear"]})]}):m.jsxs(m.Fragment,{children:[m.jsxs(V,{variant:"outline",size:"sm",onClick:()=>a?.(t),children:[m.jsx(Un,{}),"Configure"]}),i.url&&m.jsx(Mm,{content:`Get your ${i.name} key`,children:m.jsx(V,{variant:"ghost",size:"icon-sm",asChild:!0,children:m.jsx("a",{href:i.url,target:"_blank",rel:"noopener noreferrer","aria-label":`Get your ${i.name} key`,children:m.jsx(Vm,{})})})})]})})]})},Xu="_custom_",Sm="credential-custom-key",Am="credential-custom-key-error",Pm="credential-type",_m="credential-type-help",jm="credential-value",Em="credential-value-help",Tm=({open:t,onClose:e,onSave:r,initialKey:n="",existingKeys:a,isSaving:i,isEditMode:o})=>{const[s,u]=T.useState(n),[c,f]=T.useState(""),[l,d]=T.useState(""),[h,y]=T.useState(!1);T.useEffect(()=>{if(t){const P=Br.some(E=>E.key===n),k=!o&&n&&!P;u(P?n:""),f(""),d(k?n:""),y(k||o&&!P)}},[t,n,o]);const v=()=>{let P="";if(o?P=n:P=h?l.trim():s,!P){console.error("No key provided for credential");return}if(!c.trim()){console.error("No value provided for credential");return}r({key:P,value:c})},p=P=>a.includes(P)&&P!==n,x=p(l),b=o?!0:h?l.trim()!==""&&!x:s!==""&&!p(s),w=c.trim()!=="",S=b&&w&&!i,g=Br.find(P=>P.key===s),O=!!g&&!h,A=o?"Update credential":"Add new credential",_=m.jsxs(m.Fragment,{children:[m.jsx(V,{variant:"secondary",onClick:e,children:"Cancel"}),m.jsxs(V,{variant:"primary",onClick:v,disabled:!S,children:[i&&m.jsx(Ke,{size:"sm",className:"border-t-on-accent"}),i?"Saving...":"Save"]})]});return m.jsx(Qx,{open:t,onClose:e,title:A,actions:_,maxWidth:"sm",fullWidth:!0,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[o?m.jsx(Ie,{label:"Credential key",value:m.jsx("span",{className:"text-mono-sm",children:n})}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:Pm,children:"Credential type"}),m.jsxs($m,{value:h?Xu:s,onValueChange:P=>{P===Xu?(y(!0),u("")):(y(!1),u(P),d(""))},children:[m.jsx(Nm,{id:Pm,"aria-describedby":O?_m:void 0,children:m.jsx(Rm,{placeholder:"Select a credential type"})}),m.jsxs(Dm,{children:[Br.filter(P=>!P.internal).map(P=>m.jsxs(Ju,{value:P.key,disabled:p(P.key),children:[P.name,p(P.key)&&" (configured)"]},P.key)),m.jsx(Ju,{value:Xu,children:"Custom credential"})]})]}),O&&g&&m.jsxs("div",{id:_m,className:"flex flex-col items-start gap-1",children:[m.jsx("p",{className:"text-meta text-ink-dim",children:g.description}),g.url&&m.jsxs("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"text-accent text-meta underline-offset-4 hover:text-accent-hover hover:underline",children:["Get your ",g.name," key"]})]})]}),h&&m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:Sm,children:"Custom credential key"}),m.jsx(bt,{id:Sm,value:l,onChange:P=>d(P.target.value),"aria-invalid":x||void 0,"aria-describedby":x?Am:void 0,required:!0,autoFocus:!0}),x&&m.jsx("p",{id:Am,className:"text-danger text-meta",children:"This credential already exists"})]})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:jm,children:"Credential value"}),m.jsx(bt,{id:jm,type:"password",value:c,onChange:P=>f(P.target.value),onKeyDown:P=>{P.key==="Enter"&&S&&v()},"aria-describedby":o?Em:void 0,required:!0,autoFocus:o,placeholder:"Enter the credential value or API key"}),o&&m.jsxs("p",{id:Em,className:"text-ink-dim text-meta",children:["Enter the new value for ",n]})]})]})})},Cm=({title:t,description:e,children:r,isEmpty:n=!1,emptyStateType:a="noCredentials"})=>m.jsxs("section",{children:[m.jsx("h3",{className:"text-body font-medium text-ink",children:t}),m.jsx("p",{className:"mt-1 max-w-2xl text-body-sm text-ink-muted",children:e}),m.jsx(Dx,{variant:"surface",padding:"sm",className:"mt-3",children:n?m.jsx(PN,{type:a}):m.jsx("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(260px,1fr))] gap-2",children:r})})]}),PN=({type:t,className:e})=>{const r=t==="noCredentials",n=r?Un:qm;return m.jsxs("div",{className:Nt("flex flex-col items-center px-4 py-8 text-center",e),children:[m.jsx(n,{size:20,className:"text-ink-dim","aria-hidden":!0}),m.jsx("p",{className:"mt-3 text-body font-medium text-ink",children:r?"No credentials configured":"All available credentials configured"}),m.jsx("p",{className:"mt-1 max-w-sm text-body-sm text-ink-muted",children:r?"You haven't set up any API credentials yet. Add credentials from the available options or add a custom one.":"You've configured all the common API credentials. You can still add custom credentials if needed."})]})},_N=()=>{const{data:t,isLoading:e,error:r,refetch:n}=Xm(),a=e0(),[i,o]=T.useState(!1),[s,u]=T.useState(!1),[c,f]=T.useState(null),l=w=>{f(w),o(!0)},d=(w=null)=>{f(w),u(!0)},h=()=>{o(!1),u(!1),f(null)},y=async w=>{try{await a.mutateAsync(w),h(),await n()}catch(S){console.error("Error saving credential:",S)}},v=async w=>{try{await a.mutateAsync({key:w,value:""}),await n()}catch(S){console.error("Error clearing credential:",S)}},p=T.useMemo(()=>t?.keys?.filter(w=>!Br.find(S=>S.key===w)?.internal)??[],[t]),x=T.useMemo(()=>Br.filter(w=>!p.includes(w.key)&&!w.internal),[p]),b=()=>e?m.jsx("div",{className:"flex min-h-40 items-center justify-center",children:m.jsx(Ke,{size:"lg",label:"Loading credentials"})}):r||!t?m.jsxs(Ae,{variant:"danger",role:"alert",children:[m.jsx(qx,{children:"Could not load credentials"}),m.jsx(Lx,{children:r instanceof Error?r.message:"The server did not say why. Check that Local Operator is running, then reopen this page."})]}):m.jsxs(m.Fragment,{children:[m.jsx(Cm,{title:"Configured credentials",description:"These API credentials are currently configured and available for use.",isEmpty:p.length===0,emptyStateType:"noCredentials",children:p.map(w=>m.jsx(Om,{credentialKey:w,isConfigured:!0,onEdit:l,onClear:v},w))}),m.jsx(Cm,{title:"Available credentials",description:"These are common API credentials you can configure to enhance functionality.",isEmpty:x.length===0,emptyStateType:"allConfigured",children:x.map(w=>m.jsx(Om,{credentialKey:w.key,isConfigured:!1,onAdd:()=>d(w.key)},w.key))}),m.jsx("div",{className:"flex justify-center",children:m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>d(null),children:[m.jsx(t0,{}),"Add custom credential"]})}),i&&m.jsx(Tm,{open:i,onClose:h,onSave:y,initialKey:c||"",existingKeys:p,isSaving:a.isPending,isEditMode:!0}),s&&m.jsx(Tm,{open:s,onClose:h,onSave:y,initialKey:c||"",existingKeys:p,isSaving:a.isPending,isEditMode:!1})]});return m.jsx("div",{className:"flex flex-col gap-6",children:b()})},km={list:t=>["desktop","mcp",t]},jN=({sessionId:t,onAdded:e})=>{const[r,n]=T.useState(""),[a,i]=T.useState("command"),[o,s]=T.useState(""),[u,c]=T.useState(""),[f,l]=T.useState(""),[d,h]=T.useState("global"),[y,v]=T.useState(null),[p,x]=T.useState(!1),b=async()=>{x(!0),v(null);try{await nr({op:"mcp.control",sessionId:t,control:{action:"add",name:r,scope:d,...a==="command"?{command:o,args:u.split(`
|
|
165
|
+
`).map(w=>w.trim()).filter(Boolean)}:{url:f}}}),n(""),s(""),c(""),l(""),e()}catch(w){v(w instanceof Error?w.message:"The server could not be added.")}finally{x(!1)}};return m.jsxs("form",{className:"flex flex-col gap-3 rounded-md border border-control bg-surface p-4",onSubmit:w=>{w.preventDefault(),b()},children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-name",children:"Name"}),m.jsx(bt,{id:"mcp-add-name",value:r,onChange:w=>n(w.target.value),required:!0})]}),m.jsxs("fieldset",{className:"flex gap-2",children:[m.jsx("legend",{className:"sr-only",children:"Server transport"}),m.jsx(V,{type:"button",variant:a==="command"?"secondary":"ghost",size:"sm",onClick:()=>i("command"),children:"Local command"}),m.jsx(V,{type:"button",variant:a==="url"?"secondary":"ghost",size:"sm",onClick:()=>i("url"),children:"Remote URL"})]}),a==="command"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-command",children:"Command"}),m.jsx(bt,{id:"mcp-add-command",value:o,onChange:w=>s(w.target.value),className:"font-mono",required:!0})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-args",children:"Arguments, one per line"}),m.jsx("textarea",{id:"mcp-add-args",value:u,onChange:w=>c(w.target.value),rows:2,className:"rounded-sm border border-control bg-surface p-2 font-mono text-body-sm text-ink"})]})]}):m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{htmlFor:"mcp-add-url",children:"URL"}),m.jsx(bt,{id:"mcp-add-url",type:"url",value:f,onChange:w=>l(w.target.value),className:"font-mono",required:!0}),m.jsx("p",{className:"text-meta text-ink-dim",children:"No inline credentials or query parameters; secrets are referenced from the credential manager."})]}),m.jsxs("fieldset",{className:"flex gap-2",children:[m.jsx("legend",{className:"sr-only",children:"Configuration scope"}),m.jsx(V,{type:"button",variant:d==="global"?"secondary":"ghost",size:"sm",onClick:()=>h("global"),children:"Global"}),m.jsx(V,{type:"button",variant:d==="project"?"secondary":"ghost",size:"sm",onClick:()=>h("project"),children:"This project"})]}),y&&m.jsx(Ae,{variant:"danger",children:y}),m.jsx("div",{children:m.jsxs(V,{type:"submit",variant:"primary",size:"sm",disabled:p||!r||!(a==="command"?o:f),children:[p?m.jsx(Ke,{size:"sm"}):null,"Add server"]})})]})},EN=({sessionId:t,sectionRef:e,highlightServer:r})=>{const n=Um(),a=Gm(n.data,"mcp"),i=zm(),[o,s]=T.useState(null),[u,c]=T.useState(null),[f,l]=T.useState(!1),d=Sn({queryKey:km.list(t??""),queryFn:()=>{if(!t)throw new Error("No conversation selected.");return nr({op:"mcp.list",sessionId:t}).then(b=>b.data)},enabled:a&&!!t,staleTime:1e4}),h=d.data?.servers??[],y=T.useRef(null),v=T.useRef(null);T.useEffect(()=>{!r||h.length===0||v.current!==r&&h.some(b=>b.name===r)&&(v.current=r,y.current?.scrollIntoView({block:"center",behavior:"smooth"}))},[r,h]);const p=T.useCallback(()=>{t&&i.invalidateQueries({queryKey:km.list(t)})},[i,t]),x=T.useCallback(async(b,w,S={})=>{if(t){c(null);try{await nr({op:"mcp.control",sessionId:t,control:{action:b,name:w,...S}}),p()}catch(g){c(g instanceof Error?g.message:"The MCP change could not be completed.")}}},[t,p]);return a?t?m.jsx(_e,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts. A connected server is a working transport; the account behind it may still need its own sign-in.",sectionRef:e,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[u&&m.jsx(Ae,{variant:"danger",children:u}),d.isLoading&&m.jsx("div",{className:"flex h-24 items-center justify-center",children:m.jsx(Ke,{size:"lg",label:"Loading MCP servers"})}),d.isError&&m.jsx(Ae,{variant:"warning",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:"MCP servers could not be loaded."}),m.jsx(V,{variant:"secondary",size:"sm",onClick:()=>void d.refetch(),children:"Retry"})]})}),d.isSuccess&&h.length===0&&m.jsx("p",{className:"text-body-sm text-ink-muted",children:"No MCP servers configured yet. Add one below."}),h.length>0&&m.jsx("ul",{className:"flex flex-col gap-2",children:h.map(b=>{const w=b.status==="connected",S=b.name===r;return m.jsxs("li",{ref:S?y:void 0,className:Nt("flex flex-col gap-2 rounded-md border border-control bg-surface p-3",S&&"border-accent bg-elevated"),children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[m.jsx("span",{className:"truncate font-medium text-body text-ink",children:b.name}),b.scope&&m.jsx(Lr,{variant:"neutral",children:b.scope}),b.transport&&m.jsx(Lr,{variant:"outline",children:b.transport})]}),m.jsx(Lr,{variant:w?"success":b.status==="connecting"?"info":"neutral",children:b.status??"unknown"})]}),typeof b.tool_count=="number"&&m.jsxs("p",{className:"text-meta text-ink-dim",children:[b.tool_count," tools available"]}),b.error&&m.jsx("p",{className:"text-body-sm text-danger",children:b.error}),m.jsxs("p",{className:"text-meta text-ink-dim",children:["Account authorization:"," ",b.downstream_authorization==="unknown"||!b.downstream_authorization?"unknown":b.downstream_authorization]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[w?m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>{s(null),x("disconnect",b.name,{confirmed:!0})},children:[m.jsx(Ym,{"aria-hidden":"true"}),"Disconnect"]}):m.jsxs(V,{variant:"secondary",size:"sm",onClick:()=>void x("connect",b.name),children:[m.jsx($w,{"aria-hidden":"true"}),"Connect"]}),m.jsxs(V,{variant:"ghost",size:"sm",onClick:()=>void x("reload",b.name),children:[m.jsx(Bx,{"aria-hidden":"true"}),"Reload"]}),b.transport==="http"&&b.transport_oauth_supported!==!1?m.jsx(V,{variant:"ghost",size:"sm",onClick:()=>void x("login",b.name),children:"Grant account access"}):b.setup_prompt?m.jsx(V,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(b.setup_prompt??"").catch(()=>{})},children:"Copy setup prompt"}):null,o===b.name?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"text-body-sm text-ink",children:["Remove ",b.name,"?"]}),m.jsx(V,{variant:"danger",size:"sm",onClick:()=>{s(null),x("remove",b.name,{confirmed:!0,scope:b.scope==="project"?"project":"global"})},children:"Confirm removal"}),m.jsx(V,{variant:"ghost",size:"sm",onClick:()=>s(null),children:"Keep"})]}):m.jsxs(V,{variant:"ghost",size:"sm",className:"text-danger",onClick:()=>s(b.name),children:[m.jsx(Hm,{"aria-hidden":"true"}),"Remove"]})]})]},b.name)})}),f?m.jsx(jN,{sessionId:t,onAdded:()=>{l(!1),p()}}):m.jsx("div",{children:m.jsx(V,{variant:"secondary",size:"sm",onClick:()=>l(!0),"data-tour-tag":"mcp-add-server",children:"Add server"})})]})}):m.jsx(_e,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:e,children:m.jsx("p",{className:"text-body-sm text-ink-muted",children:"Open a conversation to manage its MCP servers."})}):m.jsx(_e,{title:"Integrations",description:"MCP servers connect agents to your tools and accounts.",sectionRef:e,children:m.jsx(Ae,{variant:"warning",children:"Integration management needs a newer Local Operator backend. Update the backend and restart the app to manage MCP servers here."})})},TN=({onAfterCredentialUpdate:t})=>{const{isAuthenticated:e,user:r,isLoading:n,error:a,signOut:i}=r0(),o=Zm(f=>f.isSigningOut),s=T.useCallback(async()=>{try{await i()}catch(f){console.error("Error signing out:",f)}},[i]),u=T.useMemo(()=>{if(!e||!r?.radientUser)return null;const{account:f,identity:l}=r.radientUser;return m.jsxs(m.Fragment,{children:[m.jsxs(vl,{children:[m.jsx(Ie,{label:"Status",value:m.jsxs("span",{className:"inline-flex items-center gap-2",children:["Connected",m.jsx(Lr,{variant:"success",className:"capitalize",children:f.status})]})}),m.jsx(Ie,{label:"Name",value:f.name||"Not provided"}),m.jsx(Ie,{label:"Email",value:f.email}),m.jsx(Ie,{label:"Account ID",value:m.jsx("span",{className:"text-mono-sm",children:f.id})}),m.jsx(Ie,{label:"Tenant ID",value:m.jsx("span",{className:"text-mono-sm",children:f.tenant_id})}),m.jsx(Ie,{label:"Provider",value:m.jsx("span",{className:"capitalize",children:l.provider})}),m.jsx(Ie,{label:"Created",value:Jm(f.created_at)})]}),m.jsxs("div",{className:"mt-8",children:[m.jsx("p",{className:"text-body-sm text-ink-muted",children:"Need to sign out or switch accounts?"}),m.jsxs(V,{variant:"danger",className:"mt-3",onClick:s,children:[m.jsx(n0,{}),"Sign out from Radient"]})]})]})},[e,r?.radientUser,s]),c=T.useMemo(()=>e&&r?null:m.jsxs("div",{children:[m.jsx("p",{className:"text-body-sm text-ink-muted",children:"You are not currently signed in to Radient. Sign in to access your account details or sign up to get free credits and unified access to models, tools, and more with Radient Pass. Radient's automatic model router will automatically select the best model for your agents to balance cost and performance. It is often cheaper to use Radient Pass than to use single AI providers due to automatic cost optimization."}),m.jsx("div",{className:"mt-6",children:m.jsx(A0,{titleText:"",onAfterCredentialUpdate:t,descriptionText:"",onSignInSuccess:()=>{}})})]}),[e,r,t]);return n||o?m.jsx("div",{className:"flex min-h-36 items-center justify-center",children:m.jsx(Ke,{size:"lg",label:"Loading account"})}):e&&r?.radientUser?u:m.jsxs("div",{className:"flex flex-col gap-4",children:[a&&m.jsxs(Ae,{variant:"danger",children:["Error checking account status:"," ",a instanceof Error?a.message:String(a)]}),c]})},CN=()=>{const{data:t,isLoading:e,error:r,refetch:n}=Kw(),a=Hw(),[i,o]=T.useState(""),[s,u]=T.useState(!1);T.useEffect(()=>{o(t?.content??""),u(!1)},[t]);const c=y=>{const v=y.target.value;o(v),u(v!==(t?.content??""))},f=async()=>{if(!(!s||a.isPending))try{const y={content:i};await a.mutateAsync(y),await n(),u(!1)}catch(y){console.error("Error updating system prompt:",y)}},l=()=>{o(t?.content??""),u(!1)},d=a.isPending,h=()=>m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:"app-system-prompt",children:"Instructions"}),m.jsx(Zu,{id:"app-system-prompt",name:"systemPrompt",value:i,onChange:c,placeholder:"Enter instructions for how all agents should behave and respond to your requests...",className:"min-h-50"})]}),m.jsxs("div",{className:"flex gap-3",children:[m.jsxs(V,{variant:"primary",onClick:f,disabled:!s||d,children:[d?m.jsx(Ke,{size:"sm"}):m.jsx(a0,{}),d?"Saving...":"Save changes"]}),m.jsx(V,{onClick:l,disabled:!s||d,children:"Cancel"})]}),t?.last_modified&&m.jsxs("p",{className:"text-ink-dim text-meta",children:["Last modified:"," ",m.jsx("span",{className:"font-mono text-mono-sm",children:Qm(t.last_modified)})]})]});return m.jsx(_e,{title:"System prompt",icon:P0,description:"Every Local Operator agent receives this prompt in addition to its own instructions, so it is the place for baseline expectations and for details you want every agent to know about you, such as your name, location, or preferences. It is sent to your selected hosting provider.",children:e?m.jsx("div",{className:"flex min-h-50 items-center justify-center",children:m.jsx(Ke,{size:"lg",label:"Loading system prompt"})}):r?m.jsxs(Ae,{variant:"danger",children:["Failed to load system prompt:"," ",r instanceof Error?r.message:"Unknown error"]}):h()})},kN={localOperatorDark:Cw,localOperatorLight:Bw,radient:Ow,dracula:Rw,dune:xw,sage:Aw,monokai:zx,tokyoNight:Iw,iceberg:qw,neon:Uw,obsidian:ig,synth:fw},IN=({id:t})=>m.jsxs("div",{"data-theme":t,"aria-hidden":"true",className:"flex h-full bg-canvas",children:[m.jsxs("div",{className:"flex w-1/4 flex-col gap-1 bg-sunken p-1.5",children:[m.jsx("span",{className:"flex h-2.5 items-center rounded-xs bg-accent-wash px-1",children:m.jsx("span",{className:"h-1 w-full rounded-xs bg-accent"})}),m.jsx("span",{className:"mx-1 h-1 w-2/3 rounded-xs bg-ink-dim"}),m.jsx("span",{className:"mx-1 h-1 w-1/2 rounded-xs bg-ink-dim"})]}),m.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2",children:[m.jsxs("div",{className:"flex flex-col gap-1.5 rounded-sm bg-surface p-2",children:[m.jsx("span",{className:"h-1.5 w-3/5 rounded-xs bg-ink"}),m.jsx("span",{className:"h-1 w-full rounded-xs bg-ink-dim"}),m.jsx("span",{className:"h-1 w-4/5 rounded-xs bg-ink-dim"})]}),m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"h-3 w-9 rounded-xs bg-accent"}),m.jsx("span",{className:"h-3 w-6 rounded-xs border border-control"})]})]})]}),MN=({id:t,name:e,description:r,isSelected:n,onSelect:a})=>{const i=kN[t];return m.jsxs("button",{type:"button","aria-pressed":n,onClick:a,className:Nt("flex flex-col gap-2 rounded-lg p-2 text-left transition-colors duration-fast ease-out-quart",n?"bg-accent-wash":"hover:bg-surface"),children:[m.jsx("span",{className:Nt("block aspect-16/10 overflow-hidden rounded-md border transition-colors duration-fast ease-out-quart",n?"border-accent":"border-hairline"),children:m.jsx(IN,{id:t})}),m.jsxs("span",{className:"flex items-center gap-2 px-1",children:[m.jsx(i,{size:14,className:"shrink-0 text-ink-dim","aria-hidden":"true"}),m.jsx("span",{className:Nt("min-w-0 flex-1 truncate text-body-sm text-ink",n&&"font-medium"),children:e}),n&&m.jsx(qm,{size:14,className:"shrink-0 text-accent","aria-hidden":"true"})]}),m.jsx("span",{className:"px-1 pb-1 text-meta text-ink-muted",children:r})]})},$N=()=>{const{themeName:t,setTheme:e}=Qu(),r=T.useMemo(()=>{const n=Object.values(Fx);return[{label:"Dark",items:n.filter(a=>a.theme.palette.mode==="dark")},{label:"Light",items:n.filter(a=>a.theme.palette.mode==="light")}].filter(a=>a.items.length>0)},[]);return m.jsx("div",{className:"flex flex-col gap-6",children:r.map(n=>m.jsxs("div",{children:[m.jsx("h3",{className:"px-1 pb-2 text-meta text-ink-dim",children:n.label}),m.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-2",children:n.items.map(({id:a,name:i,description:o})=>m.jsx(MN,{id:a,name:i,description:o,isSelected:a===t,onSelect:()=>e(a)},a))})]},n.label))})},NN=()=>{const{data:t,isLoading:e,error:r}=kO({enabled:!0});return m.jsxs("div",{children:[m.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-heading text-ink",children:[m.jsx(gw,{size:16,className:"shrink-0 text-ink-dim"}),"Radient Pass"]}),e&&m.jsx(Lm,{className:"h-6 w-36"}),r&&m.jsxs(Ae,{variant:"warning",children:["Could not load your credit balance. ",r.message]}),t&&!e&&!r&&m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[m.jsxs("p",{className:"flex-1 text-body-sm text-ink-muted",children:["Available credits"," ",m.jsx("span",{className:"font-medium text-ink",children:t.balance.toFixed(2)})]}),m.jsx(V,{variant:"secondary",size:"sm",asChild:!0,children:m.jsxs("a",{href:"https://console.radienthq.com/dashboard/billing",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(vw,{}),"Add credits"]})})]})]})},RN=[{id:"credits",label:"Credits"},{id:"tokens",label:"Tokens"}],DN=({active:t,label:e,payload:r,unit:n})=>!t||!r?.length?null:m.jsxs("div",{className:"rounded-md border border-hairline bg-elevated px-3 py-2 shadow-overlay",children:[m.jsx("p",{className:"text-meta text-ink-dim",children:e}),m.jsxs("p",{className:"text-mono text-ink",children:[r[0]?.value," ",n]})]}),qN=()=>{const[t,e]=T.useState("credits"),r=T.useMemo(()=>{const s=new Date,u=Xw(s);return{start_date:gf(u),end_date:gf(s),rollup:"daily"}},[]),{data:n,isLoading:a,error:i}=$O(r,{enabled:!0}),o=T.useMemo(()=>n?.data_points?[...n.data_points].sort((u,c)=>ai(u.timestamp).getTime()-ai(c.timestamp).getTime()).map(u=>({date:w0(ai(u.timestamp),"MMM dd"),credits:Number.parseFloat(u.total_cost.toFixed(2)),tokens:u.total_tokens})):[],[n]);return m.jsxs("div",{children:[m.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("h3",{className:"flex items-center gap-2 text-heading text-ink",children:[m.jsx(pw,{size:16,className:"shrink-0 text-ink-dim"}),"Usage (last 30 days)"]}),m.jsxs("fieldset",{className:"m-0 w-fit border-0 p-0",children:[m.jsx("legend",{className:"sr-only",children:"Usage metric"}),m.jsx("div",{className:"flex gap-0.5 rounded-md bg-sunken p-0.5",children:RN.map(({id:s,label:u})=>m.jsx(V,{variant:"ghost",size:"sm","aria-pressed":t===s,onClick:()=>e(s),className:Nt(t===s&&"bg-surface text-ink hover:bg-surface"),children:u},s))})]})]}),a&&m.jsx(Lm,{className:"h-62 w-full"}),i&&m.jsxs(Ae,{variant:"warning",children:["Could not load your usage data. ",i.message]}),!a&&!i&&n&&o.length>0&&m.jsx("div",{className:Nt("h-62 w-full","[&_.recharts-cartesian-grid_line]:stroke-hairline","[&_.recharts-cartesian-axis-tick-value]:fill-ink-dim [&_.recharts-cartesian-axis-tick-value]:text-meta","[&_.recharts-line-curve]:stroke-accent","[&_.recharts-active-dot_circle]:fill-accent","[&_.recharts-tooltip-cursor]:stroke-hairline"),children:m.jsx(RP,{width:"100%",height:"100%",children:m.jsxs(gN,{data:o,margin:{top:5,right:20,left:10,bottom:5},children:[m.jsx(xx,{strokeDasharray:"3 3"}),m.jsx(Qa,{dataKey:"date",tickLine:!1,axisLine:!1}),m.jsx(ei,{tickLine:!1,axisLine:!1,width:48}),m.jsx(Ye,{content:m.jsx(DN,{unit:t==="credits"?"credits":"tokens"})}),m.jsx(Cn,{type:"monotone",dataKey:t,strokeWidth:2,dot:!1,activeDot:{r:4,strokeWidth:0},name:t==="credits"?"Credits consumed":"Tokens used"})]})})}),!a&&!i&&(!n||o.length===0)&&m.jsx("p",{className:"text-body-sm text-ink-muted",children:"No usage recorded in the last 30 days."})]})},LN=()=>m.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("h2",{className:"flex items-center gap-2 text-heading text-ink",children:[m.jsx(O0,{size:16,className:"shrink-0 text-ink-dim"}),"Radient account"]}),m.jsx(V,{variant:"secondary",size:"sm",className:"self-start sm:self-center",asChild:!0,children:m.jsxs("a",{href:"https://console.radienthq.com",target:"_blank",rel:"noopener noreferrer",children:["Go to Radient console",m.jsx(Vm,{})]})})]}),JN=()=>{const t=Qu(q=>q.showAgentReasoning),e=Qu(q=>q.setShowAgentReasoning),{data:r,isLoading:n,isFetching:a,error:i,refetch:o}=i0(),s=o0(),[u,c]=T.useState(null),f=Zm(),{isAuthenticated:l,isLoading:d}=hl(),h=s0(q=>q.activeSessionId),[y,v]=T.useState("general"),[p,x]=T.useState(!1),b=T.useRef(null),w=T.useRef(null),{startTour:S}=u0(),g=c0(),{data:O,refetch:A}=Xm(),{refreshModels:_}=l0(),P=T.useMemo(()=>O?.keys?[...O.keys].sort():[],[O?.keys]),k=T.useRef({keys:"",hosting:void 0});T.useEffect(()=>{const q=P.join(","),U=r?.values?.hosting;(k.current.keys!==q||k.current.hosting!==U)&&(k.current={keys:q,hosting:U},_().catch(L=>{console.error("Failed to refresh models after credentials or hosting change:",L)}))},[P,r?.values?.hosting,_]);const E=T.useRef({general:T.useRef(null),radient:T.useRef(null),integrations:T.useRef(null),appearance:T.useRef(null),credentials:T.useRef(null),providers:T.useRef(null),backend:T.useRef(null),updates:T.useRef(null)}).current,C=T.useMemo(()=>new URLSearchParams(g.search).get("setting"),[g.search]),I=T.useMemo(()=>new URLSearchParams(g.search).get("filter")??"",[g.search]),N=T.useMemo(()=>new URLSearchParams(g.search).get("mcp")??void 0,[g.search]),M=T.useMemo(()=>new URLSearchParams(g.search).get("provider"),[g.search]),R=T.useCallback(q=>{v(q),x(!0);const U=E[q],L=w.current;if(U?.current&&L){const Y=U.current.getBoundingClientRect().top-L.getBoundingClientRect().top;L.scrollHeight>L.clientHeight?L.scrollTo({top:Math.max(0,L.scrollTop+Y-80),behavior:"smooth"}):window.scrollTo({top:Math.max(0,U.current.getBoundingClientRect().top+window.scrollY-80),behavior:"smooth"}),clearTimeout(b.current??void 0),b.current=setTimeout(()=>{x(!1),b.current=null},800)}else x(!1)},[E]);T.useEffect(()=>{const q=setTimeout(()=>{const U=w.current;if(!U)return;const L=()=>{if(p)return;const G=U.getBoundingClientRect(),Y=G.height;let re="",ue=0;for(const[Ve,le]of Object.entries(E))if(le.current){const xe=le.current.getBoundingClientRect(),Xe=G.top,Ee=xe.top-Xe,_t=xe.bottom-Xe,tt=xe.height,pt=Math.max(0,Ee),jt=Math.min(Y,_t),rt=Math.max(0,jt-pt)/tt,ht=rt+(Ee<Y*.3?.1:0);ht>ue&&rt>.1&&(ue=ht,re=Ve)}re&&re!==y&&v(re)};return L(),U.addEventListener("scroll",L,{passive:!0}),()=>{U.removeEventListener("scroll",L),clearTimeout(b.current??void 0)}},100);return()=>clearTimeout(q)},[E,y,p]),T.useEffect(()=>{const q=new URLSearchParams(g.search),U=q.get("section"),L=q.get("setting")?"backend":U,G=L?E[L]:void 0;if(!L||!G)return;let Y=!1,re=Number.NaN,ue=0;const Ve=window.setTimeout(()=>{Y||(Y=!0,xe.disconnect(),R(L))},2e3),le=()=>{if(Y)return;const Xe=G.current;if(!Xe){ue=requestAnimationFrame(le);return}const Ee=Math.round(Xe.getBoundingClientRect().top+window.scrollY);if(Ee===re&&Ee>0){Y=!0,xe.disconnect(),window.clearTimeout(Ve),R(L);return}re=Ee,ue=requestAnimationFrame(le)},xe=new ResizeObserver(()=>{Y||(cancelAnimationFrame(ue),ue=requestAnimationFrame(le))});return w.current&&xe.observe(w.current),ue=requestAnimationFrame(le),()=>{Y=!0,cancelAnimationFrame(ue),xe.disconnect(),window.clearTimeout(Ve)}},[g.search,E,R]);const D=async(q,U)=>{c(q);try{await s.mutateAsync({[q]:U}),await o()}catch(L){console.error(`Error updating ${q}:`,L)}finally{c(null)}},F=n||d,z=IO(F,4e3);return i?m.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:m.jsx(Ae,{variant:"warning",className:"w-full max-w-xl",children:m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{children:Km("Your settings could not be loaded.",i)}),m.jsx(V,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>void o(),disabled:a,children:a?"Retrying":"Retry"})]})})}):F?m.jsxs("div",{role:"status",className:"flex h-full w-full flex-col items-center justify-center gap-3 bg-canvas",children:[m.jsx(Ke,{size:"lg",label:z?void 0:"Loading settings"}),z&&m.jsx("p",{className:"max-w-sm text-center text-body-sm text-ink-muted",children:"The Local Operator server is taking longer than usual to answer. If it does not respond, you will be able to retry from here."})]}):r?m.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-canvas",children:[m.jsx("div",{className:"w-12 shrink-0 overflow-y-auto border-r border-hairline min-[1040px]:w-55",children:m.jsx(f0,{activeSection:y,onSelectSection:R,sections:d0})}),m.jsx("div",{ref:w,"data-settings-content":!0,"data-tour-tag":"settings-general-section",className:"flex-1 overflow-y-auto overflow-x-hidden p-4 sm:p-6 md:p-8",children:m.jsxs("div",{className:"mx-auto flex w-full max-w-4xl flex-col gap-8 pb-8",children:[m.jsx(S0,{title:"Settings",icon:pf}),m.jsxs("div",{className:"flex flex-col gap-8",children:[m.jsxs("div",{ref:E.general,className:"flex flex-col gap-8",children:[m.jsx(_e,{title:"User profile",icon:p0,description:`Your user profile information displayed in the application. This information is not provided to the agents. ${l?"These details are provided through your Radient account.":""}`,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(hf,{value:f.profile.name,label:"Display name",placeholder:"Enter your name...",isSaving:u==="user_name",onSave:async q=>{c("user_name");try{f.updateName(q)}finally{c(null)}},readOnly:l}),m.jsx(hf,{value:f.profile.email,label:"Email address",placeholder:"Enter your email...",isSaving:u==="user_email",onSave:async q=>{c("user_email");try{f.updateEmail(q)}finally{c(null)}},readOnly:l})]})}),m.jsx(_e,{title:"Application tour",description:"Missed the application onboarding tour or want a refresher? Start it again here.",children:m.jsxs(V,{variant:"secondary",onClick:()=>{S({forceModalCompleted:!0})},children:[m.jsx(h0,{}),"Take the tour"]})}),m.jsx(_e,{title:"Model settings",icon:v0,description:"Configure the default AI model and hosting providers used for generating responses. This will be used for all agents that don't have a specific model or hosting provider configured. You can override these settings for individual agents in the agent settings.",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(y0,{value:r.values.hosting,isSaving:u==="hosting",onSave:q=>D("hosting",q),filterByCredentials:!0,allowCustom:!0,allowDefault:!1,emptyHelperText:"No hosting providers available. Add one in API credentials, in the list on the left."}),m.jsx(m0,{value:r.values.model_name,hostingId:r.values.hosting,isSaving:u==="model_name",onSave:q=>D("model_name",q),allowCustom:!0,allowDefault:!1}),m.jsx(Ae,{variant:"neutral",icon:m.jsx(Yu,{className:"size-4","aria-hidden":"true"}),children:"You need a Radient account or your own API keys to reach cloud providers. If you don't see more hosting providers and models here, add credentials or sign in to Radient."})]})}),m.jsx(CN,{}),m.jsx(_e,{title:"History settings",icon:E0,description:"Configure how much conversation history is retained and displayed. These are tools to help balance cost and performance by controlling the amount of data used by the agents.",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(ni,{value:r.values.conversation_length,label:"Maximum conversation history",description:"Number of messages to keep in conversation history for context. More messages will make the agents have longer memory but more expensive to run. Recommended: 100",min:10,max:500,step:10,unit:"msgs",icon:Ew,isSaving:u==="conversation_length",onChange:q=>D("conversation_length",q)}),m.jsx(ni,{value:r.values.detail_length,label:"Detail view length",description:"Maximum number of messages to show in the detailed conversation view. Messages beyond this limit will be summarized. Shortening this will decrease costs but some important details could get lost from earlier messages. Recommended: 15",min:10,max:500,step:5,unit:"msgs",icon:g0,isSaving:u==="detail_length",onChange:q=>D("detail_length",q)}),m.jsx(ni,{value:r.values.max_learnings_history,label:"Maximum learnings history",description:"Agents note down specific insights and key learnings in memory which persist beyond the maximum conversation history and summarization. This setting controls the maximum number of learning items to retain. More items will make the agents acquire a longer history of knowledge from your conversations but more expensive to run. Recommended: 50",min:10,max:200,step:10,unit:"notes",icon:b0,isSaving:u==="max_learnings_history",onChange:q=>D("max_learnings_history",q)})]})}),m.jsx(_e,{title:"Configuration information",icon:Yu,description:"System information about the current configuration.",children:m.jsxs(vl,{children:[m.jsx(Ie,{label:"Version",value:m.jsx("span",{className:"text-mono-sm",children:r.version})}),m.jsx(Ie,{label:"Created",value:Jm(r.metadata.created_at)}),m.jsx(Ie,{label:"Last modified",value:Qm(r.metadata.last_modified)}),m.jsx(Ie,{label:"Description",value:r.metadata.description||"No description available"})]})})]}),m.jsx(_e,{title:"Appearance",icon:ig,description:"Customize the look and feel of Local Operator",sectionRef:E.appearance,dataTourTag:"settings-appearance-section",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx($N,{}),m.jsx(Vw,{value:t,label:"Show agent reasoning",description:"Adds the agent's Reasoning and Thinking rows to conversations. They stay closed until you open one.",onChange:async q=>e(q)})]})}),m.jsx(_e,{title:"Radient account",titleComponent:m.jsx(LN,{}),description:"Manage your Radient account, Radient Pass details, and credits.",sectionRef:E.radient,dataTourTag:"settings-radient-account-section",children:m.jsxs("div",{className:"flex flex-col gap-8",children:[m.jsx(TN,{onAfterCredentialUpdate:()=>{_(),A()}}),l&&m.jsxs(m.Fragment,{children:[m.jsx(NN,{}),m.jsx(qN,{})]})]})}),m.jsx(_e,{title:"Providers",icon:Ym,description:"Model providers, how you sign in to each, and which are connected.",sectionRef:E.providers,children:m.jsx(x0,{initialProviderId:M})}),m.jsx(_e,{title:"Backend settings",icon:pf,description:"Every setting the backend registry owns, searchable, with typed editors and scopes.",sectionRef:E.backend,children:m.jsx(AN,{focusKey:C,initialFilter:I})}),m.jsx(EN,{sessionId:h??void 0,sectionRef:E.integrations,highlightServer:N}),m.jsx(_e,{title:"API credentials",icon:Un,description:"Manage your API keys for various services and integrations",sectionRef:E.credentials,dataTourTag:"settings-api-credentials-section",children:m.jsx(_N,{})}),m.jsx("div",{ref:E.updates,children:m.jsx(xN,{})})]})]})})]}):m.jsx("div",{className:"flex h-full w-full items-center justify-center bg-canvas p-6",children:m.jsx(Ae,{variant:"warning",className:"w-full max-w-xl",children:"Your settings could not be loaded."})})};export{JN as SettingsPage};
|