import{a$ as Za,ba as Ay,e as y,am as Ja,an as Qa,aq as rd,aZ as nd,X as Ke,t as Pt,aH as jy,B as We,T as _e,M as id,P as K,bb as Ee,r as I,bc as ts,bd as oe,be as P,Q as xl,A as ct,aJ as Ht,aN as Y,S as Be,at as aa,aO as oa,av as wt,aw as J,au as sa,bf as Ic,bg as Dc,bh as Nr,bi as ad,bj as od,u as ta,bk as ra,b3 as Py,N as sd,D as Ty,f as _y,aM as ld,g as Ey,ar as cd,as as ud,bl as rs,bm as Ot,l as ky,n as $y,U as Cy,w as My,x as Iy,aD as Dy,E as Ny,V as Ly,bn as By,b4 as Ry,o as zy,ao as Wy,bo as Fy,a7 as Uy,G as Nc,bp as qy,bq as _n,b2 as En,F as Ky,J as Vy,K as Hy}from"./index-_6SmYgWK.js";import{i as fd,_ as hd,a as ki,g as it,b as sn,c as te,t as Gy,d as dd,e as Xy,f as Yy,h as Zy,j as Ut,k as Jy,l as eo,m as Qy,n as em,o as wl,p as tm,q as rm,r as $i,s as nm,u as im,v as am,w as to,x as pd,y as om,z as sm,A as lm,B as cm,C as um,D as fm,E as vd,F as hm,G as dm,H as pm,I as vm,J as ym}from"./_baseAssignValue-YwoXCWsZ.js";import{c as mm,i as ns,a as Lc,b as gm,d as Bc}from"./string-BbYD24iH.js";import{S as yd,I as bm,T as xm,a as wm,b as Om,c as Sm,d as Am,e as jm,f as Pm,t as Tm}from"./TimelineSeparator-CYoEBuNS.js";/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var _m=Za("outline","maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Em=Za("outline","minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var km=Za("outline","percentage","IconPercentage",[["path",{d:"M17 17m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M7 7m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M6 18l12 -12",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.31.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var $m=Za("outline","run","IconRun",[["path",{d:"M13 4m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M4 17l5 1l.75 -1.5",key:"svg-1"}],["path",{d:"M15 21l0 -4l-4 -3l1 -6",key:"svg-2"}],["path",{d:"M7 12l0 -3l5 -1l3 3l3 1",key:"svg-3"}]]);const Cm=Ay(y.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Mm(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function Im(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dm(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=ln(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function Nm(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Lm(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=ln(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}function ln(e,t){var r=typeof t,n;return t==null||r==="boolean"?mm(t):(r==="number"?ns:r==="string"?(n=Bc(t))?(t=n,Lc):gm:t instanceof Bc?Lc:t instanceof Date?Nm:Im(t)?Mm:Array.isArray(t)?Dm:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Lm:ns)(e,t)}function Ol(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Bm(e,t){t===void 0&&(t=e,e=ln);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}var Sl={},Rm=Ja;Object.defineProperty(Sl,"__esModule",{value:!0});var vr=Sl.default=void 0,zm=Rm(Qa()),Wm=y,Fm=(0,zm.default)((0,Wm.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm.88 15.76V19h-1.75v-1.29c-.74-.18-2.39-.77-3.02-2.96l1.65-.67c.06.22.58 2.09 2.4 2.09.93 0 1.98-.48 1.98-1.61 0-.96-.7-1.46-2.28-2.03-1.1-.39-3.35-1.03-3.35-3.31 0-.1.01-2.4 2.62-2.96V5h1.75v1.24c1.84.32 2.51 1.79 2.66 2.23l-1.58.67c-.11-.35-.59-1.34-1.9-1.34-.7 0-1.81.37-1.81 1.39 0 .95.86 1.31 2.64 1.9 2.4.83 3.01 2.05 3.01 3.45 0 2.63-2.5 3.13-3.02 3.22z"}),"Paid");vr=Sl.default=Fm;var Al={},Um=Ja;Object.defineProperty(Al,"__esModule",{value:!0});var jl=Al.default=void 0,qm=Um(Qa()),Km=y,Vm=(0,qm.default)((0,Km.jsx)("path",{d:"M15.5 13.5c0 2-2.5 3.5-2.5 5h-2c0-1.5-2.5-3-2.5-5 0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5zm-2.5 6h-2V21h2v-1.5zm6-6.5c0 1.68-.59 3.21-1.58 4.42l1.42 1.42C20.18 17.27 21 15.23 21 13c0-2.74-1.23-5.19-3.16-6.84l-1.42 1.42C17.99 8.86 19 10.82 19 13zm-3-8-4-4v3c-4.97 0-9 4.03-9 9 0 2.23.82 4.27 2.16 5.84l1.42-1.42C5.59 16.21 5 14.68 5 13c0-3.86 3.14-7 7-7v3l4-4z"}),"ModelTraining");jl=Al.default=Vm;var Pl={},Hm=Ja;Object.defineProperty(Pl,"__esModule",{value:!0});var ut=Pl.default=void 0,Gm=Hm(Qa()),Xm=y,Ym=(0,Gm.default)((0,Xm.jsx)("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"}),"AlarmOn");ut=Pl.default=Ym;var Tl={},Zm=Ja;Object.defineProperty(Tl,"__esModule",{value:!0});var Zt=Tl.default=void 0,Jm=Zm(Qa()),Qm=y,eg=(0,Jm.default)((0,Qm.jsx)("path",{d:"M14 2H4c-1.11 0-2 .9-2 2v10h2V4h10V2zm4 4H8c-1.11 0-2 .9-2 2v10h2V8h10V6zm2 4h-8c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h8c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2z"}),"AutoAwesomeMotion");Zt=Tl.default=eg;const tg=()=>y.jsx(rd,{children:y.jsx(nd,{children:y.jsxs(Ke,{container:!0,direction:"column",children:[y.jsx(Ke,{item:!0,children:y.jsxs(Ke,{container:!0,justifyContent:"space-between",children:[y.jsx(Ke,{item:!0,children:y.jsx(Pt,{variant:"rectangular",width:44,height:44})}),y.jsx(Ke,{item:!0,children:y.jsx(Pt,{variant:"rectangular",width:34,height:34})})]})}),y.jsx(Ke,{item:!0,children:y.jsx(Pt,{variant:"rectangular",sx:{my:2},height:40})}),y.jsx(Ke,{item:!0,children:y.jsx(Pt,{variant:"rectangular",height:30})})]})})}),rg=jy(id)(({theme:e})=>({background:e.palette.card.main,color:e.darkTextPrimary,overflow:"hidden",position:"relative",boxShadow:"0 2px 14px 0 rgb(32 40 45 / 8%)",cursor:"pointer","&:hover":{background:e.palette.card.hover,boxShadow:"0 2px 14px 0 rgb(32 40 45 / 20%)"},overflowWrap:"break-word",whiteSpace:"pre-line"})),na=({isLoading:e,data:t,component:r})=>y.jsx(y.Fragment,{children:e?y.jsx(tg,{}):y.jsxs(rg,{content:!1,sx:{height:270,cursor:"auto",textAlign:"center",border:"false"},children:[y.jsx(We,{sx:{p:2.25},children:y.jsx(Ke,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",children:y.jsx(Ke,{item:!0,children:y.jsxs(Ke,{container:!0,alignItems:"center",justifyContent:"center",gap:1,children:[y.jsx(Ke,{item:!0,children:t.icon}),y.jsx(Ke,{item:!0,children:y.jsx(_e,{variant:"h5",children:t.header})})]})})})}),y.jsx(We,{children:r})]})});na.propTypes={isLoading:K.bool,data:K.object,component:K.element};function ng(e){return e==null}var ig=ng;const ie=Ee(ig);var ag=hd,og=fd,sg="[object Number]";function lg(e){return typeof e=="number"||og(e)&&ag(e)==sg}var md=lg;const cg=Ee(md);var ug=md;function fg(e){return ug(e)&&e!=+e}var hg=fg;const Ci=Ee(hg);var Ge=function(t){return t===0?0:t>0?1:-1},hr=function(t){return ki(t)&&t.indexOf("%")===t.length-1},z=function(t){return cg(t)&&!Ci(t)},Ie=function(t){return z(t)||ki(t)},dg=0,cn=function(t){var r=++dg;return"".concat(t||"").concat(r)},Xe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!z(t)&&!ki(t))return n;var a;if(hr(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Ci(a)&&(a=n),i&&a>r&&(a=r),a},Yt=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},pg=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},rt=function(t,r){return z(t)&&z(r)?function(n){return t+n*(r-t)}:function(){return r}};function la(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):it(n,t))===r})}function Lr(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function is(e){"@babel/helpers - typeof";return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(e)}var vg=["viewBox","children"],yg=["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"],Rc=["points","pathLength"],ko={svg:vg,polygon:Rc,polyline:Rc},_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"],ca=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(I.isValidElement(t)&&(n=t.props),!sn(n))return null;var i={};return Object.keys(n).forEach(function(a){_l.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},mg=function(t,r,n){return function(i){return t(r,n,i),null}},mr=function(t,r,n){if(!sn(t)||is(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];_l.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=mg(o,r,n))}),i},gg=["children"],bg=["children"];function zc(e,t){if(e==null)return{};var r=xg(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xg(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function as(e){"@babel/helpers - typeof";return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},as(e)}var Wc={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Lt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Fc=null,$o=null,El=function e(t){if(t===Fc&&Array.isArray($o))return $o;var r=[];return I.Children.forEach(t,function(n){ie(n)||(ts.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),$o=r,Fc=t,r};function at(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Lt(i)}):n=[Lt(t)],El(e).forEach(function(i){var a=it(i,"type.displayName")||it(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function tt(e,t){var r=at(e,t);return r&&r[0]}var Uc=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!z(n)||n<=0||!z(i)||i<=0)},wg=["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"],Og=function(t){return t&&t.type&&ki(t.type)&&wg.indexOf(t.type)>=0},Sg=function(t){return t&&as(t)==="object"&&"cx"in t&&"cy"in t&&"r"in t},Ag=function(t,r,n,i){var a,o=(a=ko==null?void 0:ko[i])!==null&&a!==void 0?a:[];return!te(t)&&(i&&o.includes(r)||yg.includes(r))||n&&_l.includes(r)},X=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(I.isValidElement(t)&&(i=t.props),!sn(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;Ag((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},os=function e(t,r){if(t===r)return!0;var n=I.Children.count(t);if(n!==I.Children.count(r))return!1;if(n===0)return!0;if(n===1)return qc(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!qc(a,o))return!1}return!0},qc=function(t,r){if(ie(t)&&ie(r))return!0;if(!ie(t)&&!ie(r)){var n=t.props||{},i=n.children,a=zc(n,gg),o=r.props||{},s=o.children,l=zc(o,bg);return i&&s?Lr(a,l)&&os(i,s):!i&&!s?Lr(a,l):!1}return!1},Kc=function(t,r){var n=[],i={};return El(t).forEach(function(a,o){if(Og(a))n.push(a);else if(a){var s=Lt(a.type),l=r[s]||{},c=l.handler,f=l.once;if(c&&(!f||!i[s])){var u=c(a,s,o);n.push(u),i[s]=!0}}}),n},jg=function(t){var r=t&&t.type;return r&&Wc[r]?Wc[r]:null},Pg=function(t,r){return El(r).indexOf(t)},Tg=["children","width","height","viewBox","className","style","title","desc"];function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ss.apply(this,arguments)}function _g(e,t){if(e==null)return{};var r=Eg(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Eg(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function ls(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,c=_g(e,Tg),f=i||{width:r,height:n,x:0,y:0},u=oe("recharts-surface",a);return P.createElement("svg",ss({},X(c,!0,"svg"),{className:u,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),P.createElement("title",null,s),P.createElement("desc",null,l),t)}var kg=["children","className"];function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cs.apply(this,arguments)}function $g(e,t){if(e==null)return{};var r=Cg(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cg(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var de=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=$g(e,kg),a=oe("recharts-layer",n);return P.createElement("g",cs({className:a},X(i,!0),{ref:t}),r)}),St=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function Mg(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var Ig=Mg,Dg=Ig;function Ng(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Dg(e,t,r)}var Lg=Ng,Bg="\\ud800-\\udfff",Rg="\\u0300-\\u036f",zg="\\ufe20-\\ufe2f",Wg="\\u20d0-\\u20ff",Fg=Rg+zg+Wg,Ug="\\ufe0e\\ufe0f",qg="\\u200d",Kg=RegExp("["+qg+Bg+Fg+Ug+"]");function Vg(e){return Kg.test(e)}var gd=Vg;function Hg(e){return e.split("")}var Gg=Hg,bd="\\ud800-\\udfff",Xg="\\u0300-\\u036f",Yg="\\ufe20-\\ufe2f",Zg="\\u20d0-\\u20ff",Jg=Xg+Yg+Zg,Qg="\\ufe0e\\ufe0f",eb="["+bd+"]",us="["+Jg+"]",fs="\\ud83c[\\udffb-\\udfff]",tb="(?:"+us+"|"+fs+")",xd="[^"+bd+"]",wd="(?:\\ud83c[\\udde6-\\uddff]){2}",Od="[\\ud800-\\udbff][\\udc00-\\udfff]",rb="\\u200d",Sd=tb+"?",Ad="["+Qg+"]?",nb="(?:"+rb+"(?:"+[xd,wd,Od].join("|")+")"+Ad+Sd+")*",ib=Ad+Sd+nb,ab="(?:"+[xd+us+"?",us,wd,Od,eb].join("|")+")",ob=RegExp(fs+"(?="+fs+")|"+ab+ib,"g");function sb(e){return e.match(ob)||[]}var lb=sb,cb=Gg,ub=gd,fb=lb;function hb(e){return ub(e)?fb(e):cb(e)}var db=hb,pb=Lg,vb=gd,yb=db,mb=Gy;function gb(e){return function(t){t=mb(t);var r=vb(t)?yb(t):void 0,n=r?r[0]:t.charAt(0),i=r?pb(r,1).join(""):t.slice(1);return n[e]()+i}}var bb=gb,xb=bb,wb=xb("toUpperCase"),Ob=wb;const ro=Ee(Ob);function xe(e){return function(){return e}}const jd=Math.cos,ua=Math.sin,At=Math.sqrt,fa=Math.PI,no=2*fa,hs=Math.PI,ds=2*hs,cr=1e-6,Sb=ds-cr;function Pd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Ab(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pd;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class jb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Pd:Ab(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=n-t,c=i-r,f=o-t,u=s-r,h=f*f+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>cr)if(!(Math.abs(u*l-c*f)>cr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=n-o,v=i-s,p=l*l+c*c,m=d*d+v*v,w=Math.sqrt(p),x=Math.sqrt(h),O=a*Math.tan((hs-Math.acos((p+h-m)/(2*w*x)))/2),g=O/x,b=O/w;Math.abs(g-1)>cr&&this._append`L${t+g*f},${r+g*u}`,this._append`A${a},${a},0,0,${+(u*d>f*v)},${this._x1=t+b*l},${this._y1=r+b*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),c=t+s,f=r+l,u=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-f)>cr)&&this._append`L${c},${f}`,n&&(h<0&&(h=h%ds+ds),h>Sb?this._append`A${n},${n},0,1,${u},${t-s},${r-l}A${n},${n},0,1,${u},${this._x1=c},${this._y1=f}`:h>cr&&this._append`A${n},${n},0,${+(h>=hs)},${u},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function kl(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new jb(t)}function $l(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Td(e){this._context=e}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function io(e){return new Td(e)}function _d(e){return e[0]}function Ed(e){return e[1]}function kd(e,t){var r=xe(!0),n=null,i=io,a=null,o=kl(s);e=typeof e=="function"?e:e===void 0?_d:xe(e),t=typeof t=="function"?t:t===void 0?Ed:xe(t);function s(l){var c,f=(l=$l(l)).length,u,h=!1,d;for(n==null&&(a=i(d=o())),c=0;c<=f;++c)!(c<f&&r(u=l[c],c,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:xe(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:xe(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:xe(!!l),s):r},s.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),s):i},s.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),s):n},s}function qi(e,t,r){var n=null,i=xe(!0),a=null,o=io,s=null,l=kl(c);e=typeof e=="function"?e:e===void 0?_d:xe(+e),t=typeof t=="function"?t:xe(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Ed:xe(+r);function c(u){var h,d,v,p=(u=$l(u)).length,m,w=!1,x,O=new Array(p),g=new Array(p);for(a==null&&(s=o(x=l())),h=0;h<=p;++h){if(!(h<p&&i(m=u[h],h,u))===w)if(w=!w)d=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=h-1;v>=d;--v)s.point(O[v],g[v]);s.lineEnd(),s.areaEnd()}w&&(O[h]=+e(m,h,u),g[h]=+t(m,h,u),s.point(n?+n(m,h,u):O[h],r?+r(m,h,u):g[h]))}if(x)return s=null,x+""||null}function f(){return kd().defined(i).curve(o).context(a)}return c.x=function(u){return arguments.length?(e=typeof u=="function"?u:xe(+u),n=null,c):e},c.x0=function(u){return arguments.length?(e=typeof u=="function"?u:xe(+u),c):e},c.x1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:xe(+u),c):n},c.y=function(u){return arguments.length?(t=typeof u=="function"?u:xe(+u),r=null,c):t},c.y0=function(u){return arguments.length?(t=typeof u=="function"?u:xe(+u),c):t},c.y1=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:xe(+u),c):r},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(r)},c.lineX1=function(){return f().x(n).y(t)},c.defined=function(u){return arguments.length?(i=typeof u=="function"?u:xe(!!u),c):i},c.curve=function(u){return arguments.length?(o=u,a!=null&&(s=o(a)),c):o},c.context=function(u){return arguments.length?(u==null?a=s=null:s=o(a=u),c):a},c}class $d{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Pb(e){return new $d(e,!0)}function Tb(e){return new $d(e,!1)}const Cl={draw(e,t){const r=At(t/fa);e.moveTo(r,0),e.arc(0,0,r,0,no)}},_b={draw(e,t){const r=At(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Cd=At(1/3),Eb=Cd*2,kb={draw(e,t){const r=At(t/Eb),n=r*Cd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},$b={draw(e,t){const r=At(t),n=-r/2;e.rect(n,n,r,r)}},Cb=.8908130915292852,Md=ua(fa/10)/ua(7*fa/10),Mb=ua(no/10)*Md,Ib=-jd(no/10)*Md,Db={draw(e,t){const r=At(t*Cb),n=Mb*r,i=Ib*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=no*a/5,s=jd(o),l=ua(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Co=At(3),Nb={draw(e,t){const r=-At(t/(Co*3));e.moveTo(0,r*2),e.lineTo(-Co*r,-r),e.lineTo(Co*r,-r),e.closePath()}},ot=-.5,st=At(3)/2,ps=1/At(12),Lb=(ps/2+1)*3,Bb={draw(e,t){const r=At(t/Lb),n=r/2,i=r*ps,a=n,o=r*ps+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(ot*n-st*i,st*n+ot*i),e.lineTo(ot*a-st*o,st*a+ot*o),e.lineTo(ot*s-st*l,st*s+ot*l),e.lineTo(ot*n+st*i,ot*i-st*n),e.lineTo(ot*a+st*o,ot*o-st*a),e.lineTo(ot*s+st*l,ot*l-st*s),e.closePath()}};function Rb(e,t){let r=null,n=kl(i);e=typeof e=="function"?e:xe(e||Cl),t=typeof t=="function"?t:xe(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:xe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:xe(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ha(){}function da(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Id(e){this._context=e}Id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:da(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zb(e){return new Id(e)}function Dd(e){this._context=e}Dd.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wb(e){return new Dd(e)}function Nd(e){this._context=e}Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:da(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fb(e){return new Nd(e)}function Ld(e){this._context=e}Ld.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ub(e){return new Ld(e)}function Vc(e){return e<0?-1:1}function Hc(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Vc(a)+Vc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Gc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Mo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function pa(e){this._context=e}pa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mo(this,this._t0,Gc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Mo(this,Gc(this,r=Hc(this,e,t)),r);break;default:Mo(this,this._t0,r=Hc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Bd(e){this._context=new Rd(e)}(Bd.prototype=Object.create(pa.prototype)).point=function(e,t){pa.prototype.point.call(this,t,e)};function Rd(e){this._context=e}Rd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function qb(e){return new pa(e)}function Kb(e){return new Bd(e)}function zd(e){this._context=e}zd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Xc(e),i=Xc(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Xc(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Vb(e){return new zd(e)}function ao(e,t){this._context=e,this._t=t}ao.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Hb(e){return new ao(e,.5)}function Gb(e){return new ao(e,0)}function Xb(e){return new ao(e,1)}function zr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function vs(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Yb(e,t){return e[t]}function Zb(e){const t=[];return t.key=e,t}function Jb(){var e=xe([]),t=vs,r=zr,n=Yb;function i(a){var o=Array.from(e.apply(this,arguments),Zb),s,l=o.length,c=-1,f;for(const u of a)for(s=0,++c;s<l;++s)(o[s][c]=[0,+n(u,o[s].key,c,a)]).data=u;for(s=0,f=$l(t(o));s<l;++s)o[f[s]].index=s;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:xe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:xe(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?vs:typeof a=="function"?a:xe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??zr,i):r},i}function Qb(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}zr(e,t)}}function e0(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}zr(e,t)}}function t0(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,l=0,c=0;s<o;++s){for(var f=e[t[s]],u=f[n][1]||0,h=f[n-1][1]||0,d=(u-h)/2,v=0;v<s;++v){var p=e[t[v]],m=p[n][1]||0,w=p[n-1][1]||0;d+=m-w}l+=u,c+=d*u}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,zr(e,t)}}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}var r0=["type","size","sizeType"];function ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ys.apply(this,arguments)}function Yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yc(Object(r),!0).forEach(function(n){n0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n0(e,t,r){return t=i0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i0(e){var t=a0(e,"string");return Xn(t)=="symbol"?t:String(t)}function a0(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o0(e,t){if(e==null)return{};var r=s0(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function s0(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Wd={symbolCircle:Cl,symbolCross:_b,symbolDiamond:kb,symbolSquare:$b,symbolStar:Db,symbolTriangle:Nb,symbolWye:Bb},l0=Math.PI/180,c0=function(t){var r="symbol".concat(ro(t));return Wd[r]||Cl},u0=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*l0;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},f0=function(t,r){Wd["symbol".concat(ro(t))]=r},Ml=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=o0(t,r0),c=Zc(Zc({},l),{},{type:n,size:a,sizeType:s}),f=function(){var m=c0(n),w=Rb().type(m).size(u0(a,s,n));return w()},u=c.className,h=c.cx,d=c.cy,v=X(c,!0);return h===+h&&d===+d&&a===+a?P.createElement("path",ys({},v,{className:oe("recharts-symbols",u),transform:"translate(".concat(h,", ").concat(d,")"),d:f()})):null};Ml.registerSymbol=f0;function Wr(e){"@babel/helpers - typeof";return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(e)}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(this,arguments)}function Jc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function h0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jc(Object(r),!0).forEach(function(n){Yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ud(n.key),n)}}function v0(e,t,r){return t&&p0(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y0(e,t,r){return t=va(t),m0(e,Fd()?Reflect.construct(t,r||[],va(e).constructor):t.apply(e,r))}function m0(e,t){if(t&&(Wr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g0(e)}function g0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fd=function(){return!!e})()}function va(e){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},va(e)}function b0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gs(e,t)}function gs(e,t){return gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},gs(e,t)}function Yn(e,t,r){return t=Ud(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ud(e){var t=x0(e,"string");return Wr(t)=="symbol"?t:String(t)}function x0(e,t){if(Wr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lt=32,Il=function(e){b0(t,e);function t(){return d0(this,t),y0(this,t,arguments)}return v0(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=lt/2,o=lt/6,s=lt/3,l=n.inactive?i:n.color;if(n.type==="plainline")return P.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:lt,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return P.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
            A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
            H`).concat(lt,"M").concat(2*s,",").concat(a,`
            A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return P.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(lt/8,"h").concat(lt,"v").concat(lt*3/4,"h").concat(-lt,"z"),className:"recharts-legend-icon"});if(P.isValidElement(n.legendIcon)){var c=h0({},n);return delete c.legendIcon,P.cloneElement(n.legendIcon,c)}return P.createElement(Ml,{fill:l,cx:a,cy:a,size:lt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,c=i.inactiveColor,f={x:0,y:0,width:lt,height:lt},u={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(d,v){var p=d.formatter||l,m=oe(Yn(Yn({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",d.inactive));if(d.type==="none")return null;var w=te(d.value)?null:d.value;St(!te(d.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 x=d.inactive?c:d.color;return P.createElement("li",ms({className:m,style:u,key:"legend-item-".concat(v)},mr(n.props,d,v)),P.createElement(ls,{width:o,height:o,viewBox:f,style:h},n.renderIcon(d)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},p?p(w,d,v):w))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return P.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),t}(I.PureComponent);Yn(Il,"displayName","Legend");Yn(Il,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});function w0(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var qd=w0;function O0(e){return e!==e}var S0=O0;function A0(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var j0=A0,P0=qd,T0=S0,_0=j0;function E0(e,t,r){return t===t?_0(e,t,r):P0(e,T0,r)}var k0=E0,$0=k0;function C0(e,t){var r=e==null?0:e.length;return!!r&&$0(e,t,0)>-1}var M0=C0;function I0(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var D0=I0;function N0(){}var L0=N0,Io=Xy,B0=L0,R0=dd,z0=1/0,W0=Io&&1/R0(new Io([,-0]))[1]==z0?function(e){return new Io(e)}:B0,F0=W0,U0=Yy,q0=M0,K0=D0,V0=Zy,H0=F0,G0=dd,X0=200;function Y0(e,t,r){var n=-1,i=q0,a=e.length,o=!0,s=[],l=s;if(r)o=!1,i=K0;else if(a>=X0){var c=t?null:H0(e);if(c)return G0(c);o=!1,i=V0,l=new U0}else l=t?[]:s;e:for(;++n<a;){var f=e[n],u=t?t(f):f;if(f=r||f!==0?f:0,o&&u===u){for(var h=l.length;h--;)if(l[h]===u)continue e;t&&l.push(u),s.push(f)}else i(l,u,r)||(l!==s&&l.push(u),s.push(f))}return s}var Z0=Y0,J0=Ut,Q0=Z0;function ex(e,t){return e&&e.length?Q0(e,J0(t)):[]}var tx=ex;const Qc=Ee(tx);function Kd(e,t,r){return t===!0?Qc(e,r):te(t)?Qc(e,t):e}function Fr(e){"@babel/helpers - typeof";return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fr(e)}var rx=["ref"];function eu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eu(Object(r),!0).forEach(function(n){oo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gd(n.key),n)}}function ix(e,t,r){return t&&tu(e.prototype,t),r&&tu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ax(e,t,r){return t=ya(t),ox(e,Vd()?Reflect.construct(t,r||[],ya(e).constructor):t.apply(e,r))}function ox(e,t){if(t&&(Fr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hd(e)}function Vd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vd=function(){return!!e})()}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ya(e)}function Hd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bs(e,t)}function bs(e,t){return bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bs(e,t)}function oo(e,t,r){return t=Gd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gd(e){var t=lx(e,"string");return Fr(t)=="symbol"?t:String(t)}function lx(e,t){if(Fr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cx(e,t){if(e==null)return{};var r=ux(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ux(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function fx(e){return e.value}function hx(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var r=cx(t,rx);return P.createElement(Il,r)}var ru=1,Ur=function(e){sx(t,e);function t(){var r;nx(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=ax(this,t,[].concat(i)),oo(Hd(r),"lastBoundingBox",{width:-1,height:-1}),r}return ix(t,[{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,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>ru||Math.abs(i.height-this.lastBoundingBox.height)>ru)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(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?or({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,f=i.chartHeight,u,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var d=this.getBBoxSnapshot();u={left:((c||0)-d.width)/2}}else u=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((f||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return or(or({},u),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,u=or(or({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return P.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(d){n.wrapperNode=d}},hx(a,or(or({},this.props),{},{payload:Kd(f,c,fx)})))}}],[{key:"getWithHeight",value:function(n,i){var a=n.props.layout;return a==="vertical"&&z(n.props.height)?{height:n.props.height}:a==="horizontal"?{width:n.props.width||i}:null}}]),t}(I.PureComponent);oo(Ur,"displayName","Legend");oo(Ur,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var nu=Jy,dx=Qy,px=eo,iu=nu?nu.isConcatSpreadable:void 0;function vx(e){return px(e)||dx(e)||!!(iu&&e&&e[iu])}var yx=vx,mx=em,gx=yx;function Xd(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=gx),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?Xd(s,t-1,r,n,i):mx(i,s):n||(i[i.length]=s)}return i}var Yd=Xd;function bx(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var xx=bx,au=wl;function wx(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=au(e),o=t!==void 0,s=t===null,l=t===t,c=au(t);if(!s&&!c&&!a&&e>t||a&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&e<t||c&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!l)return-1}return 0}var Ox=wx,Sx=Ox;function Ax(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var l=Sx(i[n],a[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}var jx=Ax,Do=tm,Px=rm,Tx=Ut,_x=im,Ex=xx,kx=nm,$x=jx,Cx=$i,Mx=eo;function Ix(e,t,r){t.length?t=Do(t,function(a){return Mx(a)?function(o){return Px(o,a.length===1?a[0]:a)}:a}):t=[Cx];var n=-1;t=Do(t,kx(Tx));var i=_x(e,function(a,o,s){var l=Do(t,function(c){return c(a)});return{criteria:l,index:++n,value:a}});return Ex(i,function(a,o){return $x(a,o,r)})}var Dx=Ix;function Nx(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Lx=Nx,Bx=Lx,ou=Math.max;function Rx(e,t,r){return t=ou(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=ou(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),Bx(e,this,s)}}var zx=Rx;function Wx(e){return function(){return e}}var Fx=Wx,Ux=Fx,su=am,qx=$i,Kx=su?function(e,t){return su(e,"toString",{configurable:!0,enumerable:!1,value:Ux(t),writable:!0})}:qx,Vx=Kx,Hx=800,Gx=16,Xx=Date.now;function Yx(e){var t=0,r=0;return function(){var n=Xx(),i=Gx-(n-r);if(r=n,i>0){if(++t>=Hx)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Zx=Yx,Jx=Vx,Qx=Zx,e1=Qx(Jx),t1=e1,r1=$i,n1=zx,i1=t1;function a1(e,t){return i1(n1(e,t,r1),e+"")}var o1=a1,s1=sm,l1=pd,c1=om,u1=to;function f1(e,t,r){if(!u1(r))return!1;var n=typeof t;return(n=="number"?l1(r)&&c1(t,r.length):n=="string"&&t in r)?s1(r[t],e):!1}var so=f1,h1=Yd,d1=Dx,p1=o1,lu=so,v1=p1(function(e,t){if(e==null)return[];var r=t.length;return r>1&&lu(e,t[0],t[1])?t=[]:r>2&&lu(t[0],t[1],t[2])&&(t=[t[0]]),d1(e,h1(t,1),[])}),y1=v1;const Dl=Ee(y1);function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xs.apply(this,arguments)}function m1(e,t){return w1(e)||x1(e,t)||b1(e,t)||g1()}function g1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b1(e,t){if(e){if(typeof e=="string")return cu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cu(e,t)}}function cu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x1(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function w1(e){if(Array.isArray(e))return e}function uu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function No(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uu(Object(r),!0).forEach(function(n){O1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O1(e,t,r){return t=S1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S1(e){var t=A1(e,"string");return Zn(t)=="symbol"?t:String(t)}function A1(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j1(e){return Array.isArray(e)&&Ie(e[0])&&Ie(e[1])?e.join(" ~ "):e}var P1=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,c=l===void 0?{}:l,f=t.payload,u=t.formatter,h=t.itemSorter,d=t.wrapperClassName,v=t.labelClassName,p=t.label,m=t.labelFormatter,w=t.accessibilityLayer,x=w===void 0?!1:w,O=function(){if(f&&f.length){var T={padding:0,margin:0},C=(h?Dl(f,h):f).map(function($,N){if($.type==="none")return null;var M=No({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},s),B=$.formatter||u||j1,R=$.value,q=$.name,H=R,Z=q;if(B&&H!=null&&Z!=null){var V=B(R,q,$,N,f);if(Array.isArray(V)){var re=m1(V,2);H=re[0],Z=re[1]}else H=V}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(N),style:M},Ie(Z)?P.createElement("span",{className:"recharts-tooltip-item-name"},Z):null,Ie(Z)?P.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,P.createElement("span",{className:"recharts-tooltip-item-value"},H),P.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:T},C)}return null},g=No({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),b=No({margin:0},c),S=!ie(p),A=S?p:"",j=oe("recharts-default-tooltip",d),k=oe("recharts-tooltip-label",v);S&&m&&f!==void 0&&f!==null&&(A=m(p,f));var _=x?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",xs({className:j,style:g},_),P.createElement("p",{className:k,style:b},P.isValidElement(A)?A:"".concat(A)),O())};function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function Ki(e,t,r){return t=T1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T1(e){var t=_1(e,"string");return Jn(t)=="symbol"?t:String(t)}function _1(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kn="recharts-tooltip-wrapper",E1={visibility:"hidden"};function k1(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return oe(kn,Ki(Ki(Ki(Ki({},"".concat(kn,"-right"),z(r)&&t&&z(t.x)&&r>=t.x),"".concat(kn,"-left"),z(r)&&t&&z(t.x)&&r<t.x),"".concat(kn,"-bottom"),z(n)&&t&&z(t.y)&&n>=t.y),"".concat(kn,"-top"),z(n)&&t&&z(t.y)&&n<t.y))}function fu(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(a&&z(a[n]))return a[n];var f=r[n]-s-i,u=r[n]+i;if(t[n])return o[n]?f:u;if(o[n]){var h=f,d=l[n];return h<d?Math.max(u,l[n]):Math.max(f,l[n])}var v=u+s,p=l[n]+c;return v>p?Math.max(f,l[n]):Math.max(u,l[n])}function $1(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function C1(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,f,u;return o.height>0&&o.width>0&&r?(f=fu({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),u=fu({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=$1({translateX:f,translateY:u,useTranslate3d:s})):c=E1,{cssProperties:c,cssClasses:k1({translateX:f,translateY:u,coordinate:r})}}function qr(e){"@babel/helpers - typeof";return qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(e)}function hu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hu(Object(r),!0).forEach(function(n){Ss(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jd(n.key),n)}}function D1(e,t,r){return t&&I1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N1(e,t,r){return t=ma(t),L1(e,Zd()?Reflect.construct(t,r||[],ma(e).constructor):t.apply(e,r))}function L1(e,t){if(t&&(qr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ws(e)}function Zd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zd=function(){return!!e})()}function ma(e){return ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ma(e)}function ws(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B1(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Os(e,t)}function Os(e,t){return Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Os(e,t)}function Ss(e,t,r){return t=Jd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jd(e){var t=R1(e,"string");return qr(t)=="symbol"?t:String(t)}function R1(e,t){if(qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pu=1,z1=function(e){B1(t,e);function t(){var r;M1(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=N1(this,t,[].concat(i)),Ss(ws(r),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Ss(ws(r),"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.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 D1(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>pu||Math.abs(n.height-this.state.lastBoundingBox.height)>pu)&&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,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,f=i.coordinate,u=i.hasPayload,h=i.isAnimationActive,d=i.offset,v=i.position,p=i.reverseDirection,m=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,O=C1({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:d,position:v,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:w}),g=O.cssClasses,b=O.cssProperties,S=du(du({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&u?"visible":"hidden",position:"absolute",top:0,left:0},x);return P.createElement("div",{tabIndex:-1,className:g,style:S,ref:function(j){n.wrapperNode=j}},c)}}]),t}(I.PureComponent),W1=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Or={isSsr:W1()};function Kr(e){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(e)}function vu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vu(Object(r),!0).forEach(function(n){Nl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ep(n.key),n)}}function q1(e,t,r){return t&&U1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function K1(e,t,r){return t=ga(t),V1(e,Qd()?Reflect.construct(t,r||[],ga(e).constructor):t.apply(e,r))}function V1(e,t){if(t&&(Kr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H1(e)}function H1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qd=function(){return!!e})()}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(e)}function G1(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&As(e,t)}function As(e,t){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},As(e,t)}function Nl(e,t,r){return t=ep(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ep(e){var t=X1(e,"string");return Kr(t)=="symbol"?t:String(t)}function X1(e,t){if(Kr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Y1(e){return e.dataKey}function Z1(e,t){return P.isValidElement(e)?P.cloneElement(e,t):typeof e=="function"?P.createElement(e,t):P.createElement(P1,t)}var gt=function(e){G1(t,e);function t(){return F1(this,t),K1(this,t,arguments)}return q1(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.content,f=i.coordinate,u=i.filterNull,h=i.isAnimationActive,d=i.offset,v=i.payload,p=i.payloadUniqBy,m=i.position,w=i.reverseDirection,x=i.useTranslate3d,O=i.viewBox,g=i.wrapperStyle,b=v??[];u&&b.length&&(b=Kd(v.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),p,Y1));var S=b.length>0;return P.createElement(z1,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:f,hasPayload:S,offset:d,position:m,reverseDirection:w,useTranslate3d:x,viewBox:O,wrapperStyle:g},Z1(c,yu(yu({},this.props),{},{payload:b})))}}]),t}(I.PureComponent);Nl(gt,"displayName","Tooltip");Nl(gt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Or.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 J1=lm,Q1=function(){return J1.Date.now()},ew=Q1,tw=/\s/;function rw(e){for(var t=e.length;t--&&tw.test(e.charAt(t)););return t}var nw=rw,iw=nw,aw=/^\s+/;function ow(e){return e&&e.slice(0,iw(e)+1).replace(aw,"")}var sw=ow,lw=sw,mu=to,cw=wl,gu=NaN,uw=/^[-+]0x[0-9a-f]+$/i,fw=/^0b[01]+$/i,hw=/^0o[0-7]+$/i,dw=parseInt;function pw(e){if(typeof e=="number")return e;if(cw(e))return gu;if(mu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=mu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lw(e);var r=fw.test(e);return r||hw.test(e)?dw(e.slice(2),r?2:8):uw.test(e)?gu:+e}var tp=pw,vw=to,Lo=ew,bu=tp,yw="Expected a function",mw=Math.max,gw=Math.min;function bw(e,t,r){var n,i,a,o,s,l,c=0,f=!1,u=!1,h=!0;if(typeof e!="function")throw new TypeError(yw);t=bu(t)||0,vw(r)&&(f=!!r.leading,u="maxWait"in r,a=u?mw(bu(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function d(S){var A=n,j=i;return n=i=void 0,c=S,o=e.apply(j,A),o}function v(S){return c=S,s=setTimeout(w,t),f?d(S):o}function p(S){var A=S-l,j=S-c,k=t-A;return u?gw(k,a-j):k}function m(S){var A=S-l,j=S-c;return l===void 0||A>=t||A<0||u&&j>=a}function w(){var S=Lo();if(m(S))return x(S);s=setTimeout(w,p(S))}function x(S){return s=void 0,h&&n?d(S):(n=i=void 0,o)}function O(){s!==void 0&&clearTimeout(s),c=0,n=l=i=s=void 0}function g(){return s===void 0?o:x(Lo())}function b(){var S=Lo(),A=m(S);if(n=arguments,i=this,l=S,A){if(s===void 0)return v(l);if(u)return clearTimeout(s),s=setTimeout(w,t),d(l)}return s===void 0&&(s=setTimeout(w,t)),o}return b.cancel=O,b.flush=g,b}var xw=bw,ww=xw,Ow=to,Sw="Expected a function";function Aw(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Sw);return Ow(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ww(e,t,{leading:n,maxWait:t,trailing:i})}var jw=Aw;const rp=Ee(jw);function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xu(Object(r),!0).forEach(function(n){Pw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pw(e,t,r){return t=Tw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tw(e){var t=_w(e,"string");return Qn(t)=="symbol"?t:String(t)}function _w(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ew(e,t){return Mw(e)||Cw(e,t)||$w(e,t)||kw()}function kw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $w(e,t){if(e){if(typeof e=="string")return wu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wu(e,t)}}function wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cw(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Mw(e){if(Array.isArray(e))return e}var Ll=I.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,f=c===void 0?0:c,u=e.minHeight,h=e.maxHeight,d=e.children,v=e.debounce,p=v===void 0?0:v,m=e.id,w=e.className,x=e.onResize,O=e.style,g=O===void 0?{}:O,b=I.useRef(null),S=I.useRef();S.current=x,I.useImperativeHandle(t,function(){return Object.defineProperty(b.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),b.current},configurable:!0})});var A=I.useState({containerWidth:i.width,containerHeight:i.height}),j=Ew(A,2),k=j[0],_=j[1],E=I.useCallback(function(C,$){_(function(N){var M=Math.round(C),B=Math.round($);return N.containerWidth===M&&N.containerHeight===B?N:{containerWidth:M,containerHeight:B}})},[]);I.useEffect(function(){var C=function(q){var H,Z=q[0].contentRect,V=Z.width,re=Z.height;E(V,re),(H=S.current)===null||H===void 0||H.call(S,V,re)};p>0&&(C=rp(C,p,{trailing:!0,leading:!1}));var $=new ResizeObserver(C),N=b.current.getBoundingClientRect(),M=N.width,B=N.height;return E(M,B),$.observe(b.current),function(){$.disconnect()}},[E,p]);var T=I.useMemo(function(){var C=k.containerWidth,$=k.containerHeight;if(C<0||$<0)return null;St(hr(o)||hr(l),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,o,l),St(!r||r>0,"The aspect(%s) must be greater than zero.",r);var N=hr(o)?C:o,M=hr(l)?$:l;r&&r>0&&(N?M=N/r:M&&(N=M*r),h&&M>h&&(M=h)),St(N>0||M>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,N,M,o,l,f,u,r);var B=!Array.isArray(d)&&ts.isElement(d)&&Lt(d.type).endsWith("Chart");return P.Children.map(d,function(R){return ts.isElement(R)?I.cloneElement(R,Vi({width:N,height:M},B?{style:Vi({height:"100%",width:"100%",maxHeight:M,maxWidth:N},R.props.style)}:{})):R})},[r,d,l,h,u,f,k,o]);return P.createElement("div",{id:m?"".concat(m):void 0,className:oe("recharts-responsive-container",w),style:Vi(Vi({},g),{},{width:o,height:l,minWidth:f,minHeight:u,maxHeight:h}),ref:b},T)}),Br=function(t){return null};Br.displayName="Cell";function ei(e){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(e)}function Ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ou(Object(r),!0).forEach(function(n){Iw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ou(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iw(e,t,r){return t=Dw(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dw(e){var t=Nw(e,"string");return ei(t)=="symbol"?t:String(t)}function Nw(e,t){if(ei(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tr={widthCache:{},cacheCount:0},Lw=2e3,Bw={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Su="recharts_measurement_span";function Rw(e){var t=js({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Wn=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Or.isSsr)return{width:0,height:0};var n=Rw(r),i=JSON.stringify({text:t,copyStyle:n});if(Tr.widthCache[i])return Tr.widthCache[i];try{var a=document.getElementById(Su);a||(a=document.createElement("span"),a.setAttribute("id",Su),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=js(js({},Bw),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Tr.widthCache[i]=l,++Tr.cacheCount>Lw&&(Tr.cacheCount=0,Tr.widthCache={}),l}catch{return{width:0,height:0}}},zw=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ti(e){"@babel/helpers - typeof";return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(e)}function ba(e,t){return qw(e)||Uw(e,t)||Fw(e,t)||Ww()}function Ww(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fw(e,t){if(e){if(typeof e=="string")return Au(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Au(e,t)}}function Au(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Uw(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function qw(e){if(Array.isArray(e))return e}function Kw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ju(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hw(n.key),n)}}function Vw(e,t,r){return t&&ju(e.prototype,t),r&&ju(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hw(e){var t=Gw(e,"string");return ti(t)=="symbol"?t:String(t)}function Gw(e,t){if(ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pu=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Tu=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Xw=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Yw=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,np={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Zw=Object.keys(np),Cr="NaN";function Jw(e,t){return e*np[t]}var Hi=function(){function e(t,r){Kw(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Xw.test(r)&&(this.num=NaN,this.unit=""),Zw.includes(r)&&(this.num=Jw(t,r),this.unit="px")}return Vw(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(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,i=(n=Yw.exec(r))!==null&&n!==void 0?n:[],a=ba(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}]),e}();function ip(e){if(e.includes(Cr))return Cr;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Pu.exec(t))!==null&&r!==void 0?r:[],i=ba(n,4),a=i[1],o=i[2],s=i[3],l=Hi.parse(a??""),c=Hi.parse(s??""),f=o==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return Cr;t=t.replace(Pu,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,h=(u=Tu.exec(t))!==null&&u!==void 0?u:[],d=ba(h,4),v=d[1],p=d[2],m=d[3],w=Hi.parse(v??""),x=Hi.parse(m??""),O=p==="+"?w.add(x):w.subtract(x);if(O.isNaN())return Cr;t=t.replace(Tu,O.toString())}return t}var _u=/\(([^()]*)\)/;function Qw(e){for(var t=e;t.includes("(");){var r=_u.exec(t),n=ba(r,2),i=n[1];t=t.replace(_u,ip(i))}return t}function eO(e){var t=e.replace(/\s+/g,"");return t=Qw(t),t=ip(t),t}function tO(e){try{return eO(e)}catch{return Cr}}function Bo(e){var t=tO(e.slice(5,-1));return t===Cr?"":t}var rO=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],nO=["dx","dy","angle","className","breakAll"];function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ps.apply(this,arguments)}function Eu(e,t){if(e==null)return{};var r=iO(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iO(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function ku(e,t){return lO(e)||sO(e,t)||oO(e,t)||aO()}function aO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oO(e,t){if(e){if(typeof e=="string")return $u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $u(e,t)}}function $u(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sO(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function lO(e){if(Array.isArray(e))return e}var ap=/[ \f\n\r\t\v\u2028\u2029]+/,op=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];ie(r)||(n?a=r.toString().split(""):a=r.toString().split(ap));var o=a.map(function(l){return{word:l,width:Wn(l,i).width}}),s=n?0:Wn(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},cO=function(t,r,n,i,a){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,f=z(o),u=s,h=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return N.reduce(function(M,B){var R=B.word,q=B.width,H=M[M.length-1];if(H&&(i==null||a||H.width+q+n<Number(i)))H.words.push(R),H.width+=q+n;else{var Z={words:[R],width:q};M.push(Z)}return M},[])},d=h(r),v=function(N){return N.reduce(function(M,B){return M.width>B.width?M:B})};if(!f)return d;for(var p="…",m=function(N){var M=u.slice(0,N),B=op({breakAll:c,style:l,children:M+p}).wordsWithComputedWidth,R=h(B),q=R.length>o||v(R).width>Number(i);return[q,R]},w=0,x=u.length-1,O=0,g;w<=x&&O<=u.length-1;){var b=Math.floor((w+x)/2),S=b-1,A=m(S),j=ku(A,2),k=j[0],_=j[1],E=m(b),T=ku(E,1),C=T[0];if(!k&&!C&&(w=b+1),k&&C&&(x=b-1),!k&&C){g=_;break}O++}return g||d},Cu=function(t){var r=ie(t)?[]:t.toString().split(ap);return[{words:r}]},uO=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!Or.isSsr){var l,c,f=op({breakAll:o,children:i,style:a});if(f){var u=f.wordsWithComputedWidth,h=f.spaceWidth;l=u,c=h}else return Cu(i);return cO({breakAll:o,children:i,maxLines:s,style:a},l,c,r,n)}return Cu(i)},Mu="#808080",gr=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,u=f===void 0?!1:f,h=t.textAnchor,d=h===void 0?"start":h,v=t.verticalAnchor,p=v===void 0?"end":v,m=t.fill,w=m===void 0?Mu:m,x=Eu(t,rO),O=I.useMemo(function(){return uO({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:u,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,u,x.style,x.width]),g=x.dx,b=x.dy,S=x.angle,A=x.className,j=x.breakAll,k=Eu(x,nO);if(!Ie(n)||!Ie(a))return null;var _=n+(z(g)?g:0),E=a+(z(b)?b:0),T;switch(p){case"start":T=Bo("calc(".concat(c,")"));break;case"middle":T=Bo("calc(".concat((O.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:T=Bo("calc(".concat(O.length-1," * -").concat(s,")"));break}var C=[];if(u){var $=O[0].width,N=x.width;C.push("scale(".concat((z(N)?N/$:1)/$,")"))}return S&&C.push("rotate(".concat(S,", ").concat(_,", ").concat(E,")")),C.length&&(k.transform=C.join(" ")),P.createElement("text",Ps({},X(k,!0),{x:_,y:E,className:oe("recharts-text",A),textAnchor:d,fill:w.includes("url")?Mu:w}),O.map(function(M,B){var R=M.words.join(j?"":" ");return P.createElement("tspan",{x:_,dy:B===0?T:s,key:R},R)}))};function Qt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fO(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Bl(e){let t,r,n;e.length!==2?(t=Qt,r=(s,l)=>Qt(e(s),l),n=(s,l)=>e(s)-l):(t=e===Qt||e===fO?e:hO,r=e,n=e);function i(s,l,c=0,f=s.length){if(c<f){if(t(l,l)!==0)return f;do{const u=c+f>>>1;r(s[u],l)<0?c=u+1:f=u}while(c<f)}return c}function a(s,l,c=0,f=s.length){if(c<f){if(t(l,l)!==0)return f;do{const u=c+f>>>1;r(s[u],l)<=0?c=u+1:f=u}while(c<f)}return c}function o(s,l,c=0,f=s.length){const u=i(s,l,c,f-1);return u>c&&n(s[u-1],l)>-n(s[u],l)?u-1:u}return{left:i,center:o,right:a}}function hO(){return 0}function sp(e){return e===null?NaN:+e}function*dO(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const pO=Bl(Qt),Mi=pO.right;Bl(sp).center;class Iu extends Map{constructor(t,r=mO){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Du(this,t))}has(t){return super.has(Du(this,t))}set(t,r){return super.set(vO(this,t),r)}delete(t){return super.delete(yO(this,t))}}function Du({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function vO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function yO({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function mO(e){return e!==null&&typeof e=="object"?e.valueOf():e}function gO(e=Qt){if(e===Qt)return lp;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function lp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const bO=Math.sqrt(50),xO=Math.sqrt(10),wO=Math.sqrt(2);function xa(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=bO?10:a>=xO?5:a>=wO?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?xa(e,t,r*2):[s,l,c]}function Ts(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?xa(t,e,r):xa(e,t,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function _s(e,t,r){return t=+t,e=+e,r=+r,xa(e,t,r)[2]}function Es(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?_s(t,e,r):_s(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Nu(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Lu(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function cp(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?lp:gO(i);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,f=Math.log(l),u=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*u*(l-u)/l)*(c-l/2<0?-1:1),d=Math.max(r,Math.floor(t-c*u/l+h)),v=Math.min(n,Math.floor(t+(l-c)*u/l+h));cp(e,t,d,v,i)}const a=e[t];let o=r,s=n;for($n(e,r,t),i(e[n],a)>0&&$n(e,r,n);o<s;){for($n(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?$n(e,r,s):(++s,$n(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function $n(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function OO(e,t,r){if(e=Float64Array.from(dO(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Lu(e);if(t>=1)return Nu(e);var n,i=(n-1)*t,a=Math.floor(i),o=Nu(cp(e,a).subarray(0,a+1)),s=Lu(e.subarray(a+1));return o+(s-o)*(i-a)}}function SO(e,t,r=sp){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function AO(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function vt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qt(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ks=Symbol("implicit");function Rl(){var e=new Iu,t=[],r=[],n=ks;function i(a){let o=e.get(a);if(o===void 0){if(n!==ks)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Iu;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Rl(t,r).unknown(n)},vt.apply(i,arguments),i}function ri(){var e=Rl().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,c=0,f=.5;delete e.unknown;function u(){var h=t().length,d=i<n,v=d?i:n,p=d?n:i;a=(p-v)/Math.max(1,h-l+c*2),s&&(a=Math.floor(a)),v+=(p-v-a*(h-l))*f,o=a*(1-l),s&&(v=Math.round(v),o=Math.round(o));var m=AO(h).map(function(w){return v+a*w});return r(d?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),u()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,u()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,u()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,u()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),u()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),u()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,u()):c},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),u()):f},e.copy=function(){return ri(t(),[n,i]).round(s).paddingInner(l).paddingOuter(c).align(f)},vt.apply(u(),arguments)}function up(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return up(t())},e}function Fn(){return up(ri.apply(null,arguments).paddingInner(1))}function jO(e){return function(){return e}}function wa(e){return+e}var Bu=[0,1];function Ye(e){return e}function $s(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:jO(isNaN(t)?NaN:.5)}function PO(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function TO(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=$s(i,n),a=r(o,a)):(n=$s(n,i),a=r(a,o)),function(s){return a(n(s))}}function _O(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=$s(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=Mi(e,s,1,n)-1;return a[l](i[l](s))}}function Ii(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function lo(){var e=Bu,t=Bu,r=ln,n,i,a,o=Ye,s,l,c;function f(){var h=Math.min(e.length,t.length);return o!==Ye&&(o=PO(e[0],e[h-1])),s=h>2?_O:TO,l=c=null,u}function u(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return u.invert=function(h){return o(i((c||(c=s(t,e.map(n),ns)))(h)))},u.domain=function(h){return arguments.length?(e=Array.from(h,wa),f()):e.slice()},u.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},u.rangeRound=function(h){return t=Array.from(h),r=Ol,f()},u.clamp=function(h){return arguments.length?(o=h?!0:Ye,f()):o!==Ye},u.interpolate=function(h){return arguments.length?(r=h,f()):r},u.unknown=function(h){return arguments.length?(a=h,u):a},function(h,d){return n=h,i=d,f()}}function zl(){return lo()(Ye,Ye)}function EO(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Oa(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Vr(e){return e=Oa(Math.abs(e)),e?e[1]:NaN}function kO(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function $O(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var CO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ni(e){if(!(t=CO.exec(e)))throw new Error("invalid format: "+e);var t;return new Wl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ni.prototype=Wl.prototype;function Wl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Wl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function MO(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var fp;function IO(e,t){var r=Oa(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(fp=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Oa(e,Math.max(0,t+a-1))[0]}function Ru(e,t){var r=Oa(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const zu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:EO,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ru(e*100,t),r:Ru,s:IO,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Wu(e){return e}var Fu=Array.prototype.map,Uu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DO(e){var t=e.grouping===void 0||e.thousands===void 0?Wu:kO(Fu.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Wu:$O(Fu.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(u){u=ni(u);var h=u.fill,d=u.align,v=u.sign,p=u.symbol,m=u.zero,w=u.width,x=u.comma,O=u.precision,g=u.trim,b=u.type;b==="n"?(x=!0,b="g"):zu[b]||(O===void 0&&(O=12),g=!0,b="g"),(m||h==="0"&&d==="=")&&(m=!0,h="0",d="=");var S=p==="$"?r:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",A=p==="$"?n:/[%p]/.test(b)?o:"",j=zu[b],k=/[defgprs%]/.test(b);O=O===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function _(E){var T=S,C=A,$,N,M;if(b==="c")C=j(E)+C,E="";else{E=+E;var B=E<0||1/E<0;if(E=isNaN(E)?l:j(Math.abs(E),O),g&&(E=MO(E)),B&&+E==0&&v!=="+"&&(B=!1),T=(B?v==="("?v:s:v==="-"||v==="("?"":v)+T,C=(b==="s"?Uu[8+fp/3]:"")+C+(B&&v==="("?")":""),k){for($=-1,N=E.length;++$<N;)if(M=E.charCodeAt($),48>M||M>57){C=(M===46?i+E.slice($+1):E.slice($))+C,E=E.slice(0,$);break}}}x&&!m&&(E=t(E,1/0));var R=T.length+E.length+C.length,q=R<w?new Array(w-R+1).join(h):"";switch(x&&m&&(E=t(q+E,q.length?w-C.length:1/0),q=""),d){case"<":E=T+E+C+q;break;case"=":E=T+q+E+C;break;case"^":E=q.slice(0,R=q.length>>1)+T+E+C+q.slice(R);break;default:E=q+T+E+C;break}return a(E)}return _.toString=function(){return u+""},_}function f(u,h){var d=c((u=ni(u),u.type="f",u)),v=Math.max(-8,Math.min(8,Math.floor(Vr(h)/3)))*3,p=Math.pow(10,-v),m=Uu[8+v/3];return function(w){return d(p*w)+m}}return{format:c,formatPrefix:f}}var Gi,Fl,hp;NO({thousands:",",grouping:[3],currency:["$",""]});function NO(e){return Gi=DO(e),Fl=Gi.format,hp=Gi.formatPrefix,Gi}function LO(e){return Math.max(0,-Vr(Math.abs(e)))}function BO(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vr(t)/3)))*3-Vr(Math.abs(e)))}function RO(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vr(t)-Vr(e))+1}function dp(e,t,r,n){var i=Es(e,t,r),a;switch(n=ni(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=BO(i,o))&&(n.precision=a),hp(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=RO(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=LO(i))&&(n.precision=a-(n.type==="%")*2);break}}return Fl(n)}function tr(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ts(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return dp(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,c,f=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);f-- >0;){if(c=_s(o,s,r),c===l)return n[i]=o,n[a]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Sa(){var e=zl();return e.copy=function(){return Ii(e,Sa())},vt.apply(e,arguments),tr(e)}function pp(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,wa),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return pp(e).unknown(t)},e=arguments.length?Array.from(e,wa):[0,1],tr(r)}function vp(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function qu(e){return Math.log(e)}function Ku(e){return Math.exp(e)}function zO(e){return-Math.log(-e)}function WO(e){return-Math.exp(-e)}function FO(e){return isFinite(e)?+("1e"+e):e<0?0:e}function UO(e){return e===10?FO:e===Math.E?Math.exp:t=>Math.pow(e,t)}function qO(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Vu(e){return(t,r)=>-e(-t,r)}function Ul(e){const t=e(qu,Ku),r=t.domain;let n=10,i,a;function o(){return i=qO(n),a=UO(n),r()[0]<0?(i=Vu(i),a=Vu(a),e(zO,WO)):e(qu,Ku),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let c=l[0],f=l[l.length-1];const u=f<c;u&&([c,f]=[f,c]);let h=i(c),d=i(f),v,p;const m=s==null?10:+s;let w=[];if(!(n%1)&&d-h<m){if(h=Math.floor(h),d=Math.ceil(d),c>0){for(;h<=d;++h)for(v=1;v<n;++v)if(p=h<0?v/a(-h):v*a(h),!(p<c)){if(p>f)break;w.push(p)}}else for(;h<=d;++h)for(v=n-1;v>=1;--v)if(p=h>0?v/a(-h):v*a(h),!(p<c)){if(p>f)break;w.push(p)}w.length*2<m&&(w=Ts(c,f,m))}else w=Ts(h,d,Math.min(d-h,m)).map(a);return u?w.reverse():w},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ni(l)).precision==null&&(l.trim=!0),l=Fl(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return f=>{let u=f/a(Math.round(i(f)));return u*n<n-.5&&(u*=n),u<=c?l(f):""}},t.nice=()=>r(vp(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function yp(){const e=Ul(lo()).domain([1,10]);return e.copy=()=>Ii(e,yp()).base(e.base()),vt.apply(e,arguments),e}function Hu(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Gu(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ql(e){var t=1,r=e(Hu(t),Gu(t));return r.constant=function(n){return arguments.length?e(Hu(t=+n),Gu(t)):t},tr(r)}function mp(){var e=ql(lo());return e.copy=function(){return Ii(e,mp()).constant(e.constant())},vt.apply(e,arguments)}function Xu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function KO(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function VO(e){return e<0?-e*e:e*e}function Kl(e){var t=e(Ye,Ye),r=1;function n(){return r===1?e(Ye,Ye):r===.5?e(KO,VO):e(Xu(r),Xu(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},tr(t)}function Vl(){var e=Kl(lo());return e.copy=function(){return Ii(e,Vl()).exponent(e.exponent())},vt.apply(e,arguments),e}function HO(){return Vl.apply(null,arguments).exponent(.5)}function Yu(e){return Math.sign(e)*e*e}function GO(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function gp(){var e=zl(),t=[0,1],r=!1,n;function i(a){var o=GO(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(Yu(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,wa)).map(Yu)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return gp(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},vt.apply(i,arguments),tr(i)}function bp(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=SO(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Mi(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Qt),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return bp().domain(e).range(t).unknown(n)},vt.apply(a,arguments)}function xp(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[Mi(n,l,0,r)]:a}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return xp().domain([e,t]).range(i).unknown(a)},vt.apply(tr(o),arguments)}function wp(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Mi(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return wp().domain(e).range(t).unknown(r)},vt.apply(i,arguments)}const Ro=new Date,zo=new Date;function De(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return l},i.filter=a=>De(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Ro.setTime(+a),zo.setTime(+o),e(Ro),e(zo),Math.floor(r(Ro,zo))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Aa=De(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Aa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?De(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Aa);Aa.range;const It=1e3,dt=It*60,Dt=dt*60,zt=Dt*24,Hl=zt*7,Zu=zt*30,Wo=zt*365,dr=De(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*It)},(e,t)=>(t-e)/It,e=>e.getUTCSeconds());dr.range;const Gl=De(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*It)},(e,t)=>{e.setTime(+e+t*dt)},(e,t)=>(t-e)/dt,e=>e.getMinutes());Gl.range;const Xl=De(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*dt)},(e,t)=>(t-e)/dt,e=>e.getUTCMinutes());Xl.range;const Yl=De(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*It-e.getMinutes()*dt)},(e,t)=>{e.setTime(+e+t*Dt)},(e,t)=>(t-e)/Dt,e=>e.getHours());Yl.range;const Zl=De(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Dt)},(e,t)=>(t-e)/Dt,e=>e.getUTCHours());Zl.range;const Di=De(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dt)/zt,e=>e.getDate()-1);Di.range;const co=De(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zt,e=>e.getUTCDate()-1);co.range;const Op=De(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zt,e=>Math.floor(e/zt));Op.range;function Sr(e){return De(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*dt)/Hl)}const uo=Sr(0),ja=Sr(1),XO=Sr(2),YO=Sr(3),Hr=Sr(4),ZO=Sr(5),JO=Sr(6);uo.range;ja.range;XO.range;YO.range;Hr.range;ZO.range;JO.range;function Ar(e){return De(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Hl)}const fo=Ar(0),Pa=Ar(1),QO=Ar(2),eS=Ar(3),Gr=Ar(4),tS=Ar(5),rS=Ar(6);fo.range;Pa.range;QO.range;eS.range;Gr.range;tS.range;rS.range;const Jl=De(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Jl.range;const Ql=De(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ql.range;const Wt=De(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Wt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:De(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Wt.range;const Ft=De(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ft.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:De(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ft.range;function Sp(e,t,r,n,i,a){const o=[[dr,1,It],[dr,5,5*It],[dr,15,15*It],[dr,30,30*It],[a,1,dt],[a,5,5*dt],[a,15,15*dt],[a,30,30*dt],[i,1,Dt],[i,3,3*Dt],[i,6,6*Dt],[i,12,12*Dt],[n,1,zt],[n,2,2*zt],[r,1,Hl],[t,1,Zu],[t,3,3*Zu],[e,1,Wo]];function s(c,f,u){const h=f<c;h&&([c,f]=[f,c]);const d=u&&typeof u.range=="function"?u:l(c,f,u),v=d?d.range(c,+f+1):[];return h?v.reverse():v}function l(c,f,u){const h=Math.abs(f-c)/u,d=Bl(([,,m])=>m).right(o,h);if(d===o.length)return e.every(Es(c/Wo,f/Wo,u));if(d===0)return Aa.every(Math.max(Es(c,f,u),1));const[v,p]=o[h/o[d-1][2]<o[d][2]/h?d-1:d];return v.every(p)}return[s,l]}const[nS,iS]=Sp(Ft,Ql,fo,Op,Zl,Xl),[aS,oS]=Sp(Wt,Jl,uo,Di,Yl,Gl);function Fo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Uo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Cn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function sS(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Mn(i),f=In(i),u=Mn(a),h=In(a),d=Mn(o),v=In(o),p=Mn(s),m=In(s),w=Mn(l),x=In(l),O={a:B,A:R,b:q,B:H,c:null,d:nf,e:nf,f:kS,g:zS,G:FS,H:TS,I:_S,j:ES,L:Ap,m:$S,M:CS,p:Z,q:V,Q:sf,s:lf,S:MS,u:IS,U:DS,V:NS,w:LS,W:BS,x:null,X:null,y:RS,Y:WS,Z:US,"%":of},g={a:re,A:G,b:ne,B:ve,c:null,d:af,e:af,f:HS,g:nA,G:aA,H:qS,I:KS,j:VS,L:Pp,m:GS,M:XS,p:ye,q:Ue,Q:sf,s:lf,S:YS,u:ZS,U:JS,V:QS,w:eA,W:tA,x:null,X:null,y:rA,Y:iA,Z:oA,"%":of},b={a:_,A:E,b:T,B:C,c:$,d:tf,e:tf,f:SS,g:ef,G:Qu,H:rf,I:rf,j:bS,L:OS,m:gS,M:xS,p:k,q:mS,Q:jS,s:PS,S:wS,u:hS,U:dS,V:pS,w:fS,W:vS,x:N,X:M,y:ef,Y:Qu,Z:yS,"%":AS};O.x=S(r,O),O.X=S(n,O),O.c=S(t,O),g.x=S(r,g),g.X=S(n,g),g.c=S(t,g);function S(W,ee){return function(ae){var L=[],je=-1,ue=0,Te=W.length,Pe,ke,yt;for(ae instanceof Date||(ae=new Date(+ae));++je<Te;)W.charCodeAt(je)===37&&(L.push(W.slice(ue,je)),(ke=Ju[Pe=W.charAt(++je)])!=null?Pe=W.charAt(++je):ke=Pe==="e"?" ":"0",(yt=ee[Pe])&&(Pe=yt(ae,ke)),L.push(Pe),ue=je+1);return L.push(W.slice(ue,je)),L.join("")}}function A(W,ee){return function(ae){var L=Cn(1900,void 0,1),je=j(L,W,ae+="",0),ue,Te;if(je!=ae.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(ee&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(ue=Uo(Cn(L.y,0,1)),Te=ue.getUTCDay(),ue=Te>4||Te===0?Pa.ceil(ue):Pa(ue),ue=co.offset(ue,(L.V-1)*7),L.y=ue.getUTCFullYear(),L.m=ue.getUTCMonth(),L.d=ue.getUTCDate()+(L.w+6)%7):(ue=Fo(Cn(L.y,0,1)),Te=ue.getDay(),ue=Te>4||Te===0?ja.ceil(ue):ja(ue),ue=Di.offset(ue,(L.V-1)*7),L.y=ue.getFullYear(),L.m=ue.getMonth(),L.d=ue.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),Te="Z"in L?Uo(Cn(L.y,0,1)).getUTCDay():Fo(Cn(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(Te+5)%7:L.w+L.U*7-(Te+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Uo(L)):Fo(L)}}function j(W,ee,ae,L){for(var je=0,ue=ee.length,Te=ae.length,Pe,ke;je<ue;){if(L>=Te)return-1;if(Pe=ee.charCodeAt(je++),Pe===37){if(Pe=ee.charAt(je++),ke=b[Pe in Ju?ee.charAt(je++):Pe],!ke||(L=ke(W,ae,L))<0)return-1}else if(Pe!=ae.charCodeAt(L++))return-1}return L}function k(W,ee,ae){var L=c.exec(ee.slice(ae));return L?(W.p=f.get(L[0].toLowerCase()),ae+L[0].length):-1}function _(W,ee,ae){var L=d.exec(ee.slice(ae));return L?(W.w=v.get(L[0].toLowerCase()),ae+L[0].length):-1}function E(W,ee,ae){var L=u.exec(ee.slice(ae));return L?(W.w=h.get(L[0].toLowerCase()),ae+L[0].length):-1}function T(W,ee,ae){var L=w.exec(ee.slice(ae));return L?(W.m=x.get(L[0].toLowerCase()),ae+L[0].length):-1}function C(W,ee,ae){var L=p.exec(ee.slice(ae));return L?(W.m=m.get(L[0].toLowerCase()),ae+L[0].length):-1}function $(W,ee,ae){return j(W,t,ee,ae)}function N(W,ee,ae){return j(W,r,ee,ae)}function M(W,ee,ae){return j(W,n,ee,ae)}function B(W){return o[W.getDay()]}function R(W){return a[W.getDay()]}function q(W){return l[W.getMonth()]}function H(W){return s[W.getMonth()]}function Z(W){return i[+(W.getHours()>=12)]}function V(W){return 1+~~(W.getMonth()/3)}function re(W){return o[W.getUTCDay()]}function G(W){return a[W.getUTCDay()]}function ne(W){return l[W.getUTCMonth()]}function ve(W){return s[W.getUTCMonth()]}function ye(W){return i[+(W.getUTCHours()>=12)]}function Ue(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var ee=S(W+="",O);return ee.toString=function(){return W},ee},parse:function(W){var ee=A(W+="",!1);return ee.toString=function(){return W},ee},utcFormat:function(W){var ee=S(W+="",g);return ee.toString=function(){return W},ee},utcParse:function(W){var ee=A(W+="",!0);return ee.toString=function(){return W},ee}}}var Ju={"-":"",_:" ",0:"0"},ze=/^\s*\d+/,lS=/^%/,cS=/[\\^$*+?|[\]().{}]/g;function pe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function uS(e){return e.replace(cS,"\\$&")}function Mn(e){return new RegExp("^(?:"+e.map(uS).join("|")+")","i")}function In(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function fS(e,t,r){var n=ze.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function hS(e,t,r){var n=ze.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function pS(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function vS(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Qu(e,t,r){var n=ze.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function ef(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function yS(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function mS(e,t,r){var n=ze.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function gS(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function tf(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function bS(e,t,r){var n=ze.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function rf(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function xS(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function wS(e,t,r){var n=ze.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function OS(e,t,r){var n=ze.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function SS(e,t,r){var n=ze.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function AS(e,t,r){var n=lS.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function jS(e,t,r){var n=ze.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function PS(e,t,r){var n=ze.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function nf(e,t){return pe(e.getDate(),t,2)}function TS(e,t){return pe(e.getHours(),t,2)}function _S(e,t){return pe(e.getHours()%12||12,t,2)}function ES(e,t){return pe(1+Di.count(Wt(e),e),t,3)}function Ap(e,t){return pe(e.getMilliseconds(),t,3)}function kS(e,t){return Ap(e,t)+"000"}function $S(e,t){return pe(e.getMonth()+1,t,2)}function CS(e,t){return pe(e.getMinutes(),t,2)}function MS(e,t){return pe(e.getSeconds(),t,2)}function IS(e){var t=e.getDay();return t===0?7:t}function DS(e,t){return pe(uo.count(Wt(e)-1,e),t,2)}function jp(e){var t=e.getDay();return t>=4||t===0?Hr(e):Hr.ceil(e)}function NS(e,t){return e=jp(e),pe(Hr.count(Wt(e),e)+(Wt(e).getDay()===4),t,2)}function LS(e){return e.getDay()}function BS(e,t){return pe(ja.count(Wt(e)-1,e),t,2)}function RS(e,t){return pe(e.getFullYear()%100,t,2)}function zS(e,t){return e=jp(e),pe(e.getFullYear()%100,t,2)}function WS(e,t){return pe(e.getFullYear()%1e4,t,4)}function FS(e,t){var r=e.getDay();return e=r>=4||r===0?Hr(e):Hr.ceil(e),pe(e.getFullYear()%1e4,t,4)}function US(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+pe(t/60|0,"0",2)+pe(t%60,"0",2)}function af(e,t){return pe(e.getUTCDate(),t,2)}function qS(e,t){return pe(e.getUTCHours(),t,2)}function KS(e,t){return pe(e.getUTCHours()%12||12,t,2)}function VS(e,t){return pe(1+co.count(Ft(e),e),t,3)}function Pp(e,t){return pe(e.getUTCMilliseconds(),t,3)}function HS(e,t){return Pp(e,t)+"000"}function GS(e,t){return pe(e.getUTCMonth()+1,t,2)}function XS(e,t){return pe(e.getUTCMinutes(),t,2)}function YS(e,t){return pe(e.getUTCSeconds(),t,2)}function ZS(e){var t=e.getUTCDay();return t===0?7:t}function JS(e,t){return pe(fo.count(Ft(e)-1,e),t,2)}function Tp(e){var t=e.getUTCDay();return t>=4||t===0?Gr(e):Gr.ceil(e)}function QS(e,t){return e=Tp(e),pe(Gr.count(Ft(e),e)+(Ft(e).getUTCDay()===4),t,2)}function eA(e){return e.getUTCDay()}function tA(e,t){return pe(Pa.count(Ft(e)-1,e),t,2)}function rA(e,t){return pe(e.getUTCFullYear()%100,t,2)}function nA(e,t){return e=Tp(e),pe(e.getUTCFullYear()%100,t,2)}function iA(e,t){return pe(e.getUTCFullYear()%1e4,t,4)}function aA(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Gr(e):Gr.ceil(e),pe(e.getUTCFullYear()%1e4,t,4)}function oA(){return"+0000"}function of(){return"%"}function sf(e){return+e}function lf(e){return Math.floor(+e/1e3)}var _r,_p,Ep;sA({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function sA(e){return _r=sS(e),_p=_r.format,_r.parse,Ep=_r.utcFormat,_r.utcParse,_r}function lA(e){return new Date(e)}function cA(e){return e instanceof Date?+e:+new Date(+e)}function ec(e,t,r,n,i,a,o,s,l,c){var f=zl(),u=f.invert,h=f.domain,d=c(".%L"),v=c(":%S"),p=c("%I:%M"),m=c("%I %p"),w=c("%a %d"),x=c("%b %d"),O=c("%B"),g=c("%Y");function b(S){return(l(S)<S?d:s(S)<S?v:o(S)<S?p:a(S)<S?m:n(S)<S?i(S)<S?w:x:r(S)<S?O:g)(S)}return f.invert=function(S){return new Date(u(S))},f.domain=function(S){return arguments.length?h(Array.from(S,cA)):h().map(lA)},f.ticks=function(S){var A=h();return e(A[0],A[A.length-1],S??10)},f.tickFormat=function(S,A){return A==null?b:c(A)},f.nice=function(S){var A=h();return(!S||typeof S.range!="function")&&(S=t(A[0],A[A.length-1],S??10)),S?h(vp(A,S)):f},f.copy=function(){return Ii(f,ec(e,t,r,n,i,a,o,s,l,c))},f}function uA(){return vt.apply(ec(aS,oS,Wt,Jl,uo,Di,Yl,Gl,dr,_p).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function fA(){return vt.apply(ec(nS,iS,Ft,Ql,fo,co,Zl,Xl,dr,Ep).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ho(){var e=0,t=1,r,n,i,a,o=Ye,s=!1,l;function c(u){return u==null||isNaN(u=+u)?l:o(i===0?.5:(u=(a(u)-r)*i,s?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([e,t]=u,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(u){return arguments.length?(s=!!u,c):s},c.interpolator=function(u){return arguments.length?(o=u,c):o};function f(u){return function(h){var d,v;return arguments.length?([d,v]=h,o=u(d,v),c):[o(0),o(1)]}}return c.range=f(ln),c.rangeRound=f(Ol),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return a=u,r=u(e),n=u(t),i=r===n?0:1/(n-r),c}}function rr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function kp(){var e=tr(ho()(Ye));return e.copy=function(){return rr(e,kp())},qt.apply(e,arguments)}function $p(){var e=Ul(ho()).domain([1,10]);return e.copy=function(){return rr(e,$p()).base(e.base())},qt.apply(e,arguments)}function Cp(){var e=ql(ho());return e.copy=function(){return rr(e,Cp()).constant(e.constant())},qt.apply(e,arguments)}function tc(){var e=Kl(ho());return e.copy=function(){return rr(e,tc()).exponent(e.exponent())},qt.apply(e,arguments)}function hA(){return tc.apply(null,arguments).exponent(.5)}function Mp(){var e=[],t=Ye;function r(n){if(n!=null&&!isNaN(n=+n))return t((Mi(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Qt),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>OO(e,a/n))},r.copy=function(){return Mp(t).domain(e)},qt.apply(r,arguments)}function po(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,c=Ye,f,u=!1,h;function d(p){return isNaN(p=+p)?h:(p=.5+((p=+f(p))-a)*(n*p<n*a?s:l),c(u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([e,t,r]=p,i=f(e=+e),a=f(t=+t),o=f(r=+r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,d):[e,t,r]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(c=p,d):c};function v(p){return function(m){var w,x,O;return arguments.length?([w,x,O]=m,c=Bm(p,[w,x,O]),d):[c(0),c(.5),c(1)]}}return d.range=v(ln),d.rangeRound=v(Ol),d.unknown=function(p){return arguments.length?(h=p,d):h},function(p){return f=p,i=p(e),a=p(t),o=p(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,d}}function Ip(){var e=tr(po()(Ye));return e.copy=function(){return rr(e,Ip())},qt.apply(e,arguments)}function Dp(){var e=Ul(po()).domain([.1,1,10]);return e.copy=function(){return rr(e,Dp()).base(e.base())},qt.apply(e,arguments)}function Np(){var e=ql(po());return e.copy=function(){return rr(e,Np()).constant(e.constant())},qt.apply(e,arguments)}function rc(){var e=Kl(po());return e.copy=function(){return rr(e,rc()).exponent(e.exponent())},qt.apply(e,arguments)}function dA(){return rc.apply(null,arguments).exponent(.5)}const cf=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ri,scaleDiverging:Ip,scaleDivergingLog:Dp,scaleDivergingPow:rc,scaleDivergingSqrt:dA,scaleDivergingSymlog:Np,scaleIdentity:pp,scaleImplicit:ks,scaleLinear:Sa,scaleLog:yp,scaleOrdinal:Rl,scalePoint:Fn,scalePow:Vl,scaleQuantile:bp,scaleQuantize:xp,scaleRadial:gp,scaleSequential:kp,scaleSequentialLog:$p,scaleSequentialPow:tc,scaleSequentialQuantile:Mp,scaleSequentialSqrt:hA,scaleSequentialSymlog:Cp,scaleSqrt:HO,scaleSymlog:mp,scaleThreshold:wp,scaleTime:uA,scaleUtc:fA,tickFormat:dp},Symbol.toStringTag,{value:"Module"}));var pA=wl;function vA(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(s===void 0?o===o&&!pA(o):r(o,s)))var s=o,l=a}return l}var vo=vA;function yA(e,t){return e>t}var Lp=yA,mA=vo,gA=Lp,bA=$i;function xA(e){return e&&e.length?mA(e,bA,gA):void 0}var wA=xA;const yo=Ee(wA);function OA(e,t){return e<t}var Bp=OA,SA=vo,AA=Bp,jA=$i;function PA(e){return e&&e.length?SA(e,jA,AA):void 0}var TA=PA;const mo=Ee(TA);var _A=Yd,EA=cm;function kA(e,t){return _A(EA(e,t),1)}var $A=kA;const CA=Ee($A);var MA=um;function IA(e,t){return MA(e,t)}var DA=IA;const Ni=Ee(DA);var un=1e9,NA={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},ic,Ae=!0,pt="[DecimalError] ",yr=pt+"Invalid argument: ",nc=pt+"Exponent out of range: ",fn=Math.floor,ur=Math.pow,LA=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,nt,Le=1e7,Oe=7,Rp=9007199254740991,Ta=fn(Rp/Oe),U={};U.absoluteValue=U.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};U.comparedTo=U.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};U.decimalPlaces=U.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Oe;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};U.dividedBy=U.div=function(e){return Bt(this,new this.constructor(e))};U.dividedToIntegerBy=U.idiv=function(e){var t=this,r=t.constructor;return be(Bt(t,new r(e),0,1),r.precision)};U.equals=U.eq=function(e){return!this.cmp(e)};U.exponent=function(){return $e(this)};U.greaterThan=U.gt=function(e){return this.cmp(e)>0};U.greaterThanOrEqualTo=U.gte=function(e){return this.cmp(e)>=0};U.isInteger=U.isint=function(){return this.e>this.d.length-2};U.isNegative=U.isneg=function(){return this.s<0};U.isPositive=U.ispos=function(){return this.s>0};U.isZero=function(){return this.s===0};U.lessThan=U.lt=function(e){return this.cmp(e)<0};U.lessThanOrEqualTo=U.lte=function(e){return this.cmp(e)<1};U.logarithm=U.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(nt))throw Error(pt+"NaN");if(r.s<1)throw Error(pt+(r.s?"NaN":"-Infinity"));return r.eq(nt)?new n(0):(Ae=!1,t=Bt(ii(r,a),ii(e,a),a),Ae=!0,be(t,i))};U.minus=U.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Fp(t,e):zp(t,(e.s=-e.s,e))};U.modulo=U.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(pt+"NaN");return r.s?(Ae=!1,t=Bt(r,e,0,1).times(e),Ae=!0,r.minus(t)):be(new n(r),i)};U.naturalExponential=U.exp=function(){return Wp(this)};U.naturalLogarithm=U.ln=function(){return ii(this)};U.negated=U.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};U.plus=U.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zp(t,e):Fp(t,(e.s=-e.s,e))};U.precision=U.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(yr+e);if(t=$e(i)+1,n=i.d.length-1,r=n*Oe+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};U.squareRoot=U.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(pt+"NaN")}for(e=$e(s),Ae=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Tt(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=fn((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Bt(s,a,o+2)).times(.5),Tt(a.d).slice(0,o)===(t=Tt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(be(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ae=!0,be(n,r)};U.times=U.mul=function(e){var t,r,n,i,a,o,s,l,c,f=this,u=f.constructor,h=f.d,d=(e=new u(e)).d;if(!f.s||!e.s)return new u(0);for(e.s*=f.s,r=f.e+e.e,l=h.length,c=d.length,l<c&&(a=h,h=d,d=a,o=l,l=c,c=o),a=[],o=l+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=l+n;i>n;)s=a[i]+d[n]*h[i-n-1]+t,a[i--]=s%Le|0,t=s/Le|0;a[i]=(a[i]+t)%Le|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ae?be(e,u.precision):e};U.toDecimalPlaces=U.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Et(e,0,un),t===void 0?t=n.rounding:Et(t,0,8),be(r,e+$e(r)+1,t))};U.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=br(n,!0):(Et(e,0,un),t===void 0?t=i.rounding:Et(t,0,8),n=be(new i(n),e+1,t),r=br(n,!0,e+1)),r};U.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?br(i):(Et(e,0,un),t===void 0?t=a.rounding:Et(t,0,8),n=be(new a(i),e+$e(i)+1,t),r=br(n.abs(),!1,e+$e(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};U.toInteger=U.toint=function(){var e=this,t=e.constructor;return be(new t(e),$e(e)+1,t.rounding)};U.toNumber=function(){return+this};U.toPower=U.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(nt);if(s=new l(s),!s.s){if(e.s<1)throw Error(pt+"Infinity");return s}if(s.eq(nt))return s;if(n=l.precision,e.eq(nt))return be(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=Rp){for(i=new l(nt),t=Math.ceil(n/Oe+4),Ae=!1;r%2&&(i=i.times(s),ff(i.d,t)),r=fn(r/2),r!==0;)s=s.times(s),ff(s.d,t);return Ae=!0,e.s<0?new l(nt).div(i):be(i,n)}}else if(a<0)throw Error(pt+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ae=!1,i=e.times(ii(s,n+c)),Ae=!0,i=Wp(i),i.s=a,i};U.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=$e(i),n=br(i,r<=a.toExpNeg||r>=a.toExpPos)):(Et(e,1,un),t===void 0?t=a.rounding:Et(t,0,8),i=be(new a(i),e,t),r=$e(i),n=br(i,e<=r||r<=a.toExpNeg,e)),n};U.toSignificantDigits=U.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Et(e,1,un),t===void 0?t=n.rounding:Et(t,0,8)),be(new n(r),e,t)};U.toString=U.valueOf=U.val=U.toJSON=U[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$e(e),r=e.constructor;return br(e,t<=r.toExpNeg||t>=r.toExpPos)};function zp(e,t){var r,n,i,a,o,s,l,c,f=e.constructor,u=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ae?be(t,u):t;if(l=e.d,c=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=c.length):(n=c,i=o,s=l.length),o=Math.ceil(u/Oe),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,n=c,c=l,l=n),r=0;a;)r=(l[--a]=l[a]+c[a]+r)/Le|0,l[a]%=Le;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ae?be(t,u):t}function Et(e,t,r){if(e!==~~e||e<t||e>r)throw Error(yr+e)}function Tt(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Oe-n.length,r&&(a+=Xt(r)),a+=n;o=e[t],n=o+"",r=Oe-n.length,r&&(a+=Xt(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Bt=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%Le|0,o=a/Le|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Le+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,c,f,u,h,d,v,p,m,w,x,O,g,b,S,A,j,k=n.constructor,_=n.s==i.s?1:-1,E=n.d,T=i.d;if(!n.s)return new k(n);if(!i.s)throw Error(pt+"Division by zero");for(l=n.e-i.e,A=T.length,b=E.length,d=new k(_),v=d.d=[],c=0;T[c]==(E[c]||0);)++c;if(T[c]>(E[c]||0)&&--l,a==null?x=a=k.precision:o?x=a+($e(n)-$e(i))+1:x=a,x<0)return new k(0);if(x=x/Oe+2|0,c=0,A==1)for(f=0,T=T[0],x++;(c<b||f)&&x--;c++)O=f*Le+(E[c]||0),v[c]=O/T|0,f=O%T|0;else{for(f=Le/(T[0]+1)|0,f>1&&(T=e(T,f),E=e(E,f),A=T.length,b=E.length),g=A,p=E.slice(0,A),m=p.length;m<A;)p[m++]=0;j=T.slice(),j.unshift(0),S=T[0],T[1]>=Le/2&&++S;do f=0,s=t(T,p,A,m),s<0?(w=p[0],A!=m&&(w=w*Le+(p[1]||0)),f=w/S|0,f>1?(f>=Le&&(f=Le-1),u=e(T,f),h=u.length,m=p.length,s=t(u,p,h,m),s==1&&(f--,r(u,A<h?j:T,h))):(f==0&&(s=f=1),u=T.slice()),h=u.length,h<m&&u.unshift(0),r(p,u,m),s==-1&&(m=p.length,s=t(T,p,A,m),s<1&&(f++,r(p,A<m?j:T,m))),m=p.length):s===0&&(f++,p=[0]),v[c++]=f,s&&p[0]?p[m++]=E[g]||0:(p=[E[g]],m=1);while((g++<b||p[0]!==void 0)&&x--)}return v[0]||v.shift(),d.e=l,be(d,o?a+$e(d)+1:a)}}();function Wp(e,t){var r,n,i,a,o,s,l=0,c=0,f=e.constructor,u=f.precision;if($e(e)>16)throw Error(nc+$e(e));if(!e.s)return new f(nt);for(Ae=!1,s=u,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(ur(2,c))/Math.LN10*2+5|0,s+=n,r=i=a=new f(nt),f.precision=s;;){if(i=be(i.times(e),s),r=r.times(++l),o=a.plus(Bt(i,r,s)),Tt(o.d).slice(0,s)===Tt(a.d).slice(0,s)){for(;c--;)a=be(a.times(a),s);return f.precision=u,t==null?(Ae=!0,be(a,u)):a}a=o}}function $e(e){for(var t=e.e*Oe,r=e.d[0];r>=10;r/=10)t++;return t}function qo(e,t,r){if(t>e.LN10.sd())throw Ae=!0,r&&(e.precision=r),Error(pt+"LN10 precision limit exceeded");return be(new e(e.LN10),t)}function Xt(e){for(var t="";e--;)t+="0";return t}function ii(e,t){var r,n,i,a,o,s,l,c,f,u=1,h=10,d=e,v=d.d,p=d.constructor,m=p.precision;if(d.s<1)throw Error(pt+(d.s?"NaN":"-Infinity"));if(d.eq(nt))return new p(0);if(t==null?(Ae=!1,c=m):c=t,d.eq(10))return t==null&&(Ae=!0),qo(p,c);if(c+=h,p.precision=c,r=Tt(v),n=r.charAt(0),a=$e(d),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=Tt(d.d),n=r.charAt(0),u++;a=$e(d),n>1?(d=new p("0."+r),a++):d=new p(n+"."+r.slice(1))}else return l=qo(p,c+2,m).times(a+""),d=ii(new p(n+"."+r.slice(1)),c-h).plus(l),p.precision=m,t==null?(Ae=!0,be(d,m)):d;for(s=o=d=Bt(d.minus(nt),d.plus(nt),c),f=be(d.times(d),c),i=3;;){if(o=be(o.times(f),c),l=s.plus(Bt(o,new p(i),c)),Tt(l.d).slice(0,c)===Tt(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(qo(p,c+2,m).times(a+""))),s=Bt(s,new p(u),c),p.precision=m,t==null?(Ae=!0,be(s,m)):s;s=l,i+=2}}function uf(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=fn(r/Oe),e.d=[],n=(r+1)%Oe,r<0&&(n+=Oe),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Oe;n<i;)e.d.push(+t.slice(n,n+=Oe));t=t.slice(n),n=Oe-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Ae&&(e.e>Ta||e.e<-Ta))throw Error(nc+r)}else e.s=0,e.e=0,e.d=[0];return e}function be(e,t,r){var n,i,a,o,s,l,c,f,u=e.d;for(o=1,a=u[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Oe,i=t,c=u[f=0];else{if(f=Math.ceil((n+1)/Oe),a=u.length,f>=a)return e;for(c=a=u[f],o=1;a>=10;a/=10)o++;n%=Oe,i=n-Oe+o}if(r!==void 0&&(a=ur(10,o-i-1),s=c/a%10|0,l=t<0||u[f+1]!==void 0||c%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?c/ur(10,o-i):0:u[f-1])%10&1||r==(e.s<0?8:7))),t<1||!u[0])return l?(a=$e(e),u.length=1,t=t-a-1,u[0]=ur(10,(Oe-t%Oe)%Oe),e.e=fn(-t/Oe)||0):(u.length=1,u[0]=e.e=e.s=0),e;if(n==0?(u.length=f,a=1,f--):(u.length=f+1,a=ur(10,Oe-n),u[f]=i>0?(c/ur(10,o-i)%ur(10,i)|0)*a:0),l)for(;;)if(f==0){(u[0]+=a)==Le&&(u[0]=1,++e.e);break}else{if(u[f]+=a,u[f]!=Le)break;u[f--]=0,a=1}for(n=u.length;u[--n]===0;)u.pop();if(Ae&&(e.e>Ta||e.e<-Ta))throw Error(nc+$e(e));return e}function Fp(e,t){var r,n,i,a,o,s,l,c,f,u,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ae?be(t,d):t;if(l=e.d,u=t.d,n=t.e,c=e.e,l=l.slice(),o=c-n,o){for(f=o<0,f?(r=l,o=-o,s=u.length):(r=u,n=c,s=l.length),i=Math.max(Math.ceil(d/Oe),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=u.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(l[i]!=u[i]){f=l[i]<u[i];break}o=0}for(f&&(r=l,l=u,u=r,t.s=-t.s),s=l.length,i=u.length-s;i>0;--i)l[s++]=0;for(i=u.length;i>o;){if(l[--i]<u[i]){for(a=i;a&&l[--a]===0;)l[a]=Le-1;--l[a],l[i]+=Le}l[i]-=u[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Ae?be(t,d):t):new h(0)}function br(e,t,r){var n,i=$e(e),a=Tt(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Xt(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Xt(-i-1)+a,r&&(n=r-o)>0&&(a+=Xt(n))):i>=o?(a+=Xt(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Xt(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Xt(n))),e.s<0?"-"+a:a}function ff(e,t){if(e.length>t)return e.length=t,!0}function Up(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(yr+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return uf(o,a.toString())}else if(typeof a!="string")throw Error(yr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,LA.test(a))uf(o,a);else throw Error(yr+a)}if(i.prototype=U,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Up,i.config=i.set=BA,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function BA(e){if(!e||typeof e!="object")throw Error(pt+"Object expected");var t,r,n,i=["precision",1,un,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(fn(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(yr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(yr+r+": "+n);return this}var ic=Up(NA);nt=new ic(1);const ge=ic;function RA(e){return UA(e)||FA(e)||WA(e)||zA()}function zA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WA(e,t){if(e){if(typeof e=="string")return Cs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cs(e,t)}}function FA(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function UA(e){if(Array.isArray(e))return Cs(e)}function Cs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qA=function(t){return t},qp={},Kp=function(t){return t===qp},hf=function(t){return function r(){return arguments.length===0||arguments.length===1&&Kp(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},KA=function e(t,r){return t===1?r:hf(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==qp}).length;return o>=t?r.apply(void 0,i):e(t-o,hf(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var f=i.map(function(u){return Kp(u)?l.shift():u});return r.apply(void 0,RA(f).concat(l))}))})},go=function(t){return KA(t.length,t)},Ms=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},VA=go(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),HA=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return qA;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},Is=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Vp=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,l){return s===r[l]})||(r=a,n=t.apply(void 0,a)),n}};function GA(e){var t;return e===0?t=1:t=Math.floor(new ge(e).abs().log(10).toNumber())+1,t}function XA(e,t,r){for(var n=new ge(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var YA=go(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),ZA=go(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),JA=go(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const bo={rangeStep:XA,getDigitCount:GA,interpolateNumber:YA,uninterpolateNumber:ZA,uninterpolateTruncation:JA};function Ds(e){return tj(e)||ej(e)||Hp(e)||QA()}function QA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ej(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tj(e){if(Array.isArray(e))return Ns(e)}function ai(e,t){return ij(e)||nj(e,t)||Hp(e,t)||rj()}function rj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hp(e,t){if(e){if(typeof e=="string")return Ns(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ns(e,t)}}function Ns(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nj(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function ij(e){if(Array.isArray(e))return e}function Gp(e){var t=ai(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function Xp(e,t,r){if(e.lte(0))return new ge(0);var n=bo.getDigitCount(e.toNumber()),i=new ge(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new ge(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new ge(Math.ceil(l))}function aj(e,t,r){var n=1,i=new ge(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ge(10).pow(bo.getDigitCount(e)-1),i=new ge(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ge(Math.floor(e)))}else e===0?i=new ge(Math.floor((t-1)/2)):r||(i=new ge(Math.floor(e)));var o=Math.floor((t-1)/2),s=HA(VA(function(l){return i.add(new ge(l-o).mul(n)).toNumber()}),Ms);return s(0,t)}function Yp(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ge(0),tickMin:new ge(0),tickMax:new ge(0)};var a=Xp(new ge(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ge(0):(o=new ge(e).add(t).div(2),o=o.sub(new ge(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new ge(t).sub(o).div(a).toNumber()),c=s+l+1;return c>r?Yp(e,t,r,n,i+1):(c<r&&(l=t>0?l+(r-c):l,s=t>0?s:s+(r-c)),{step:a,tickMin:o.sub(new ge(s).mul(a)),tickMax:o.add(new ge(l).mul(a))})}function oj(e){var t=ai(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=Gp([r,n]),l=ai(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0){var u=f===1/0?[c].concat(Ds(Ms(0,i-1).map(function(){return 1/0}))):[].concat(Ds(Ms(0,i-1).map(function(){return-1/0})),[f]);return r>n?Is(u):u}if(c===f)return aj(c,i,a);var h=Yp(c,f,o,a),d=h.step,v=h.tickMin,p=h.tickMax,m=bo.rangeStep(v,p.add(new ge(.1).mul(d)),d);return r>n?Is(m):m}function sj(e,t){var r=ai(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Gp([n,i]),s=ai(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,i];if(l===c)return[l];var f=Math.max(t,2),u=Xp(new ge(c).sub(l).div(f-1),a,0),h=[].concat(Ds(bo.rangeStep(new ge(l),new ge(c).sub(new ge(.99).mul(u)),u)),[c]);return n>i?Is(h):h}var lj=Vp(oj),cj=Vp(sj),uj="Invariant failed";function xr(e,t){throw new Error(uj)}var fj=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _a(){return _a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_a.apply(this,arguments)}function hj(e,t){return yj(e)||vj(e,t)||pj(e,t)||dj()}function dj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pj(e,t){if(e){if(typeof e=="string")return df(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return df(e,t)}}function df(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vj(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function yj(e){if(Array.isArray(e))return e}function mj(e,t){if(e==null)return{};var r=gj(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gj(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Li(e){var t=e.offset,r=e.layout,n=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=mj(e,fj),f=X(c,!1);e.direction==="x"&&s.type!=="number"&&xr();var u=a.map(function(h){var d=o(h,i),v=d.x,p=d.y,m=d.value,w=d.errorVal;if(!w)return null;var x=[],O,g;if(Array.isArray(w)){var b=hj(w,2);O=b[0],g=b[1]}else O=g=w;if(r==="vertical"){var S=s.scale,A=p+t,j=A+n,k=A-n,_=S(m-O),E=S(m+g);x.push({x1:E,y1:j,x2:E,y2:k}),x.push({x1:_,y1:A,x2:E,y2:A}),x.push({x1:_,y1:j,x2:_,y2:k})}else if(r==="horizontal"){var T=l.scale,C=v+t,$=C-n,N=C+n,M=T(m-O),B=T(m+g);x.push({x1:$,y1:B,x2:N,y2:B}),x.push({x1:C,y1:M,x2:C,y2:B}),x.push({x1:$,y1:M,x2:N,y2:M})}return P.createElement(de,_a({className:"recharts-errorBar",key:"bar-".concat(x.map(function(R){return"".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))},f),x.map(function(R){return P.createElement("line",_a({},R,{key:"line-".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))}))});return P.createElement(de,{className:"recharts-errorBars"},u)}Li.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};Li.displayName="ErrorBar";function oi(e){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(e)}function pf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ko(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pf(Object(r),!0).forEach(function(n){bj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bj(e,t,r){return t=xj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xj(e){var t=wj(e,"string");return oi(t)=="symbol"?t:String(t)}function wj(e,t){if(oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zp=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=tt(r,Ur);if(!o)return null;var s;return o.props&&o.props.payload?s=o.props&&o.props.payload:a==="children"?s=(n||[]).reduce(function(l,c){var f=c.item,u=c.props,h=u.sectors||u.data||[];return l.concat(h.map(function(d){return{type:o.props.iconType||f.props.legendType,value:d.name,color:d.fill,payload:d}}))},[]):s=(n||[]).map(function(l){var c=l.item,f=c.props,u=f.dataKey,h=f.name,d=f.legendType,v=f.hide;return{inactive:v,dataKey:u,type:o.props.iconType||d||"square",color:ac(c),value:h||u,payload:c.props}}),Ko(Ko(Ko({},o.props),Ur.getWithHeight(o,i)),{},{payload:s,item:o})};function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function vf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vf(Object(r),!0).forEach(function(n){Rr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rr(e,t,r){return t=Oj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oj(e){var t=Sj(e,"string");return si(t)=="symbol"?t:String(t)}function Sj(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yf(e){return Tj(e)||Pj(e)||jj(e)||Aj()}function Aj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jj(e,t){if(e){if(typeof e=="string")return Ls(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ls(e,t)}}function Pj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tj(e){if(Array.isArray(e))return Ls(e)}function Ls(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Me(e,t,r){return ie(e)||ie(t)?r:Ie(t)?it(e,t,r):te(t)?t(e):r}function Un(e,t,r,n){var i=CA(e,function(s){return Me(s,t)});if(r==="number"){var a=i.filter(function(s){return z(s)||parseFloat(s)});return a.length?[mo(a),yo(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!ie(s)}):i;return o.map(function(s){return Ie(s)||s instanceof Date?s:""})}var _j=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,c=0;c<s;c++){var f=c>0?i[c-1].coordinate:i[s-1].coordinate,u=i[c].coordinate,h=c>=s-1?i[0].coordinate:i[c+1].coordinate,d=void 0;if(Ge(u-f)!==Ge(h-u)){var v=[];if(Ge(h-u)===Ge(l[1]-l[0])){d=h;var p=u+l[1]-l[0];v[0]=Math.min(p,(p+f)/2),v[1]=Math.max(p,(p+f)/2)}else{d=f;var m=h+l[1]-l[0];v[0]=Math.min(u,(m+u)/2),v[1]=Math.max(u,(m+u)/2)}var w=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(t>w[0]&&t<=w[1]||t>=v[0]&&t<=v[1]){o=i[c].index;break}}else{var x=Math.min(f,h),O=Math.max(f,h);if(t>(x+u)/2&&t<=(O+u)/2){o=i[c].index;break}}}else for(var g=0;g<s;g++)if(g===0&&t<=(n[g].coordinate+n[g+1].coordinate)/2||g>0&&g<s-1&&t>(n[g].coordinate+n[g-1].coordinate)/2&&t<=(n[g].coordinate+n[g+1].coordinate)/2||g===s-1&&t>(n[g].coordinate+n[g-1].coordinate)/2){o=n[g].index;break}return o},ac=function(t){var r=t,n=r.type.displayName,i=t.props,a=i.stroke,o=i.fill,s;switch(n){case"Line":s=a;break;case"Area":case"Radar":s=a&&a!=="none"?a:o;break;default:s=o;break}return s},Ej=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,c=s.length;l<c;l++)for(var f=a[s[l]].stackGroups,u=Object.keys(f),h=0,d=u.length;h<d;h++){var v=f[u[h]],p=v.items,m=v.cateAxisId,w=p.filter(function(b){return Lt(b.type).indexOf("Bar")>=0});if(w&&w.length){var x=w[0].props.barSize,O=w[0].props[m];o[O]||(o[O]=[]);var g=ie(x)?r:x;o[O].push({item:w[0],stackList:w.slice(1),barSize:ie(g)?void 0:Xe(g,n,0)})}}return o},kj=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=Xe(r,i,0,!0),f,u=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/l,v=o.reduce(function(g,b){return g+b.barSize||0},0);v+=(l-1)*c,v>=i&&(v-=(l-1)*c,c=0),v>=i&&d>0&&(h=!0,d*=.9,v=l*d);var p=(i-v)/2>>0,m={offset:p-c,size:0};f=o.reduce(function(g,b){var S={item:b.item,position:{offset:m.offset+m.size+c,size:h?d:b.barSize}},A=[].concat(yf(g),[S]);return m=A[A.length-1].position,b.stackList&&b.stackList.length&&b.stackList.forEach(function(j){A.push({item:j,position:m})}),A},u)}else{var w=Xe(n,i,0,!0);i-2*w-(l-1)*c<=0&&(c=0);var x=(i-2*w-(l-1)*c)/l;x>1&&(x>>=0);var O=s===+s?Math.min(x,s):x;f=o.reduce(function(g,b,S){var A=[].concat(yf(g),[{item:b.item,position:{offset:w+(x+c)*S+(x-O)/2,size:O}}]);return b.stackList&&b.stackList.length&&b.stackList.forEach(function(j){A.push({item:j,position:A[A.length-1].position})}),A},u)}return f},$j=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=Zp({children:a,legendWidth:l});if(c){var f=i||{},u=f.width,h=f.height,d=c.align,v=c.verticalAlign,p=c.layout;if((p==="vertical"||p==="horizontal"&&v==="middle")&&d!=="center"&&z(t[d]))return ft(ft({},t),{},Rr({},d,t[d]+(u||0)));if((p==="horizontal"||p==="vertical"&&d==="center")&&v!=="middle"&&z(t[v]))return ft(ft({},t),{},Rr({},v,t[v]+(h||0)))}return t},Cj=function(t,r,n){return ie(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Jp=function(t,r,n,i,a){var o=r.props.children,s=at(o,Li).filter(function(c){return Cj(i,a,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var u=Me(f,n);if(ie(u))return c;var h=Array.isArray(u)?[mo(u),yo(u)]:[u,u],d=l.reduce(function(v,p){var m=Me(f,p,0),w=h[0]-Math.abs(Array.isArray(m)?m[0]:m),x=h[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(w,v[0]),Math.max(x,v[1])]},[1/0,-1/0]);return[Math.min(d[0],c[0]),Math.max(d[1],c[1])]},[1/0,-1/0])}return null},Mj=function(t,r,n,i,a){var o=r.map(function(s){return Jp(t,s,n,a,i)}).filter(function(s){return!ie(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Qp=function(t,r,n,i,a){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&Jp(t,l,c,i)||Un(t,c,n,a)});if(n==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var f=0,u=c.length;f<u;f++)s[c[f]]||(s[c[f]]=!0,l.push(c[f]));return l},[])},ev=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},tv=function(t,r,n,i){if(i)return t.map(function(l){return l.coordinate});var a,o,s=t.map(function(l){return l.coordinate===r&&(a=!0),l.coordinate===n&&(o=!0),l.coordinate});return a||s.push(r),o||s.push(n),s},Nt=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Ge(s[0]-s[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(u){var h=a?a.indexOf(u):u;return{coordinate:i(h)+c,value:u,offset:c}});return f.filter(function(u){return!Ci(u.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(u,h){return{coordinate:i(u)+c,value:u,index:h,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(u){return{coordinate:i(u)+c,value:u,offset:c}}):i.domain().map(function(u,h){return{coordinate:i(u)+c,value:a?a[u]:u,index:h,offset:c}})},Vo=new WeakMap,Xi=function(t,r){if(typeof r!="function")return t;Vo.has(t)||Vo.set(t,new WeakMap);var n=Vo.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},rv=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:ri(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Sa(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Fn(),realScaleType:"point"}:a==="category"?{scale:ri(),realScaleType:"band"}:{scale:Sa(),realScaleType:"linear"};if(ki(i)){var l="scale".concat(ro(i));return{scale:(cf[l]||Fn)(),realScaleType:cf[l]?l:"point"}}return te(i)?{scale:i}:{scale:Fn(),realScaleType:"point"}},mf=1e-4,nv=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-mf,o=Math.max(i[0],i[1])+mf,s=t(r[0]),l=t(r[n-1]);(s<a||s>o||l<a||l>o)&&t.domain([r[0],r[n-1]])}},Ij=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},Dj=function(t,r){if(!r||r.length!==2||!z(r[0])||!z(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!z(t[0])||t[0]<n)&&(a[0]=n),(!z(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Nj=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var l=Ci(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},Lj=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=Ci(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Bj={sign:Nj,expand:Qb,none:zr,silhouette:e0,wiggle:t0,positive:Lj},Rj=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=Bj[n],o=Jb().keys(i).value(function(s,l){return+Me(s,l,0)}).order(vs).offset(a);return o(t)},zj=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},c=s.reduce(function(u,h){var d=h.props,v=d.stackId,p=d.hide;if(p)return u;var m=h.props[n],w=u[m]||{hasStack:!1,stackGroups:{}};if(Ie(v)){var x=w.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(h),w.hasStack=!0,w.stackGroups[v]=x}else w.stackGroups[cn("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return ft(ft({},u),{},Rr({},m,w))},l),f={};return Object.keys(c).reduce(function(u,h){var d=c[h];if(d.hasStack){var v={};d.stackGroups=Object.keys(d.stackGroups).reduce(function(p,m){var w=d.stackGroups[m];return ft(ft({},p),{},Rr({},m,{numericAxisId:n,cateAxisId:i,items:w.items,stackedData:Rj(t,w.items,a)}))},v)}return ft(ft({},u),{},Rr({},h,d))},f)},iv=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var f=lj(c,a,s);return t.domain([mo(f),yo(f)]),{niceTicks:f}}if(a&&i==="number"){var u=t.domain(),h=cj(u,a,s);return{niceTicks:h}}return null};function gf(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ie(i[t.dataKey])){var s=la(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Me(i,ie(o)?t.dataKey:o);return ie(l)?null:t.scale(l)}var bf=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Me(o,r.dataKey,r.domain[s]);return ie(l)?null:r.scale(l)-a/2+i},Wj=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Fj=function(t,r){var n=t.props.stackId;if(Ie(n)){var i=r[n];if(i){var a=i.items.indexOf(t);return a>=0?i.stackedData[a]:null}}return null},Uj=function(t){return t.reduce(function(r,n){return[mo(n.concat([r[0]]).filter(z)),yo(n.concat([r[1]]).filter(z))]},[1/0,-1/0])},av=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(c,f){var u=Uj(f.slice(r,n+1));return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},xf=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wf=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Bs=function(t,r,n){if(te(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(z(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(xf.test(t[0])){var a=+xf.exec(t[0])[1];i[0]=r[0]-a}else te(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(z(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(wf.test(t[1])){var o=+wf.exec(t[1])[1];i[1]=r[1]+o}else te(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Ea=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Dl(r,function(u){return u.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var c=a[s],f=a[s-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Of=function(t,r,n){return!t||!t.length||Ni(t,it(n,"type.defaultProps.domain"))?r:t},ov=function(t,r){var n=t.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,c=n.chartType,f=n.hide;return ft(ft({},X(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:ac(t),value:Me(r,i),type:l,payload:r,chartType:c,hide:f})};function li(e){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(e)}function Sf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sf(Object(r),!0).forEach(function(n){sv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sv(e,t,r){return t=qj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qj(e){var t=Kj(e,"string");return li(t)=="symbol"?t:String(t)}function Kj(e,t){if(li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vj(e,t){return Yj(e)||Xj(e,t)||Gj(e,t)||Hj()}function Hj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gj(e,t){if(e){if(typeof e=="string")return Af(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Af(e,t)}}function Af(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xj(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Yj(e){if(Array.isArray(e))return e}var ka=Math.PI/180,Zj=function(t){return t*180/Math.PI},we=function(t,r,n,i){return{x:t+Math.cos(-ka*i)*n,y:r+Math.sin(-ka*i)*n}},lv=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Jj=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,c=t.endAngle,f=Xe(t.cx,o,o/2),u=Xe(t.cy,s,s/2),h=lv(o,s,n),d=Xe(t.innerRadius,h,0),v=Xe(t.outerRadius,h,h*.8),p=Object.keys(r);return p.reduce(function(m,w){var x=r[w],O=x.domain,g=x.reversed,b;if(ie(x.range))i==="angleAxis"?b=[l,c]:i==="radiusAxis"&&(b=[d,v]),g&&(b=[b[1],b[0]]);else{b=x.range;var S=b,A=Vj(S,2);l=A[0],c=A[1]}var j=rv(x,a),k=j.realScaleType,_=j.scale;_.domain(O).range(b),nv(_);var E=iv(_,Mt(Mt({},x),{},{realScaleType:k})),T=Mt(Mt(Mt({},x),E),{},{range:b,radius:v,realScaleType:k,scale:_,cx:f,cy:u,innerRadius:d,outerRadius:v,startAngle:l,endAngle:c});return Mt(Mt({},m),{},sv({},w,T))},{})},Qj=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},eP=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=Qj({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,c=Math.acos(l);return i>o&&(c=2*Math.PI-c),{radius:s,angle:Zj(c),angleInRadian:c}},tP=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},rP=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},jf=function(t,r){var n=t.x,i=t.y,a=eP({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,c=r.outerRadius;if(o<l||o>c)return!1;if(o===0)return!0;var f=tP(r),u=f.startAngle,h=f.endAngle,d=s,v;if(u<=h){for(;d>h;)d-=360;for(;d<u;)d+=360;v=d>=u&&d<=h}else{for(;d>u;)d-=360;for(;d<h;)d+=360;v=d>=h&&d<=u}return v?Mt(Mt({},r),{},{radius:o,angle:rP(d,r)}):null},cv=function(t){return!I.isValidElement(t)&&!te(t)&&typeof t!="boolean"?t.className:""};function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}var nP=["offset"];function iP(e){return lP(e)||sP(e)||oP(e)||aP()}function aP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oP(e,t){if(e){if(typeof e=="string")return Rs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rs(e,t)}}function sP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lP(e){if(Array.isArray(e))return Rs(e)}function Rs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cP(e,t){if(e==null)return{};var r=uP(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uP(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Pf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pf(Object(r),!0).forEach(function(n){fP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fP(e,t,r){return t=hP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hP(e){var t=dP(e,"string");return ci(t)=="symbol"?t:String(t)}function dP(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ui(){return ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ui.apply(this,arguments)}var pP=function(t){var r=t.value,n=t.formatter,i=ie(t.children)?r:t.children;return te(n)?n(i):i},vP=function(t,r){var n=Ge(r-t),i=Math.min(Math.abs(r-t),360);return n*i},yP=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,c=l.cx,f=l.cy,u=l.innerRadius,h=l.outerRadius,d=l.startAngle,v=l.endAngle,p=l.clockWise,m=(u+h)/2,w=vP(d,v),x=w>=0?1:-1,O,g;i==="insideStart"?(O=d+x*o,g=p):i==="insideEnd"?(O=v-x*o,g=!p):i==="end"&&(O=v+x*o,g=p),g=w<=0?g:!g;var b=we(c,f,m,O),S=we(c,f,m,O+(g?1:-1)*359),A="M".concat(b.x,",").concat(b.y,`
    A`).concat(m,",").concat(m,",0,1,").concat(g?0:1,`,
    `).concat(S.x,",").concat(S.y),j=ie(t.id)?cn("recharts-radial-line-"):t.id;return P.createElement("text",ui({},n,{dominantBaseline:"central",className:oe("recharts-radial-bar-label",s)}),P.createElement("defs",null,P.createElement("path",{id:j,d:A})),P.createElement("textPath",{xlinkHref:"#".concat(j)},r))},mP=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,c=a.outerRadius,f=a.startAngle,u=a.endAngle,h=(f+u)/2;if(i==="outside"){var d=we(o,s,c+n,h),v=d.x,p=d.y;return{x:v,y:p,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var m=(l+c)/2,w=we(o,s,m,h),x=w.x,O=w.y;return{x,y:O,textAnchor:"middle",verticalAnchor:"middle"}},gP=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,c=o.width,f=o.height,u=f>=0?1:-1,h=u*i,d=u>0?"end":"start",v=u>0?"start":"end",p=c>=0?1:-1,m=p*i,w=p>0?"end":"start",x=p>0?"start":"end";if(a==="top"){var O={x:s+c/2,y:l-u*i,textAnchor:"middle",verticalAnchor:d};return Ce(Ce({},O),n?{height:Math.max(l-n.y,0),width:c}:{})}if(a==="bottom"){var g={x:s+c/2,y:l+f+h,textAnchor:"middle",verticalAnchor:v};return Ce(Ce({},g),n?{height:Math.max(n.y+n.height-(l+f),0),width:c}:{})}if(a==="left"){var b={x:s-m,y:l+f/2,textAnchor:w,verticalAnchor:"middle"};return Ce(Ce({},b),n?{width:Math.max(b.x-n.x,0),height:f}:{})}if(a==="right"){var S={x:s+c+m,y:l+f/2,textAnchor:x,verticalAnchor:"middle"};return Ce(Ce({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var A=n?{width:c,height:f}:{};return a==="insideLeft"?Ce({x:s+m,y:l+f/2,textAnchor:x,verticalAnchor:"middle"},A):a==="insideRight"?Ce({x:s+c-m,y:l+f/2,textAnchor:w,verticalAnchor:"middle"},A):a==="insideTop"?Ce({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:v},A):a==="insideBottom"?Ce({x:s+c/2,y:l+f-h,textAnchor:"middle",verticalAnchor:d},A):a==="insideTopLeft"?Ce({x:s+m,y:l+h,textAnchor:x,verticalAnchor:v},A):a==="insideTopRight"?Ce({x:s+c-m,y:l+h,textAnchor:w,verticalAnchor:v},A):a==="insideBottomLeft"?Ce({x:s+m,y:l+f-h,textAnchor:x,verticalAnchor:d},A):a==="insideBottomRight"?Ce({x:s+c-m,y:l+f-h,textAnchor:w,verticalAnchor:d},A):sn(a)&&(z(a.x)||hr(a.x))&&(z(a.y)||hr(a.y))?Ce({x:s+Xe(a.x,c),y:l+Xe(a.y,f),textAnchor:"end",verticalAnchor:"end"},A):Ce({x:s+c/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},bP=function(t){return"cx"in t&&z(t.cx)};function Re(e){var t=e.offset,r=t===void 0?5:t,n=cP(e,nP),i=Ce({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,c=i.content,f=i.className,u=f===void 0?"":f,h=i.textBreakAll;if(!a||ie(s)&&ie(l)&&!I.isValidElement(c)&&!te(c))return null;if(I.isValidElement(c))return I.cloneElement(c,i);var d;if(te(c)){if(d=I.createElement(c,i),I.isValidElement(d))return d}else d=pP(i);var v=bP(a),p=X(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return yP(i,d,p);var m=v?mP(i):gP(i);return P.createElement(gr,ui({className:oe("recharts-label",u)},p,m,{breakAll:h}),d)}Re.displayName="Label";var uv=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,f=t.outerRadius,u=t.x,h=t.y,d=t.top,v=t.left,p=t.width,m=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(z(p)&&z(m)){if(z(u)&&z(h))return{x:u,y:h,width:p,height:m};if(z(d)&&z(v))return{x:d,y:v,width:p,height:m}}return z(u)&&z(h)?{x:u,y:h,width:0,height:0}:z(r)&&z(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:f||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},xP=function(t,r){return t?t===!0?P.createElement(Re,{key:"label-implicit",viewBox:r}):Ie(t)?P.createElement(Re,{key:"label-implicit",viewBox:r,value:t}):I.isValidElement(t)?t.type===Re?I.cloneElement(t,{key:"label-implicit",viewBox:r}):P.createElement(Re,{key:"label-implicit",content:t,viewBox:r}):te(t)?P.createElement(Re,{key:"label-implicit",content:t,viewBox:r}):sn(t)?P.createElement(Re,ui({viewBox:r},t,{key:"label-implicit"})):null:null},wP=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=uv(t),o=at(i,Re).map(function(l,c){return I.cloneElement(l,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return o;var s=xP(t.label,r||a);return[s].concat(iP(o))};Re.parseViewBox=uv;Re.renderCallByParent=wP;function OP(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var SP=OP;const AP=Ee(SP);function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}var jP=["valueAccessor"],PP=["data","dataKey","clockWise","id","textBreakAll"];function TP(e){return $P(e)||kP(e)||EP(e)||_P()}function _P(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EP(e,t){if(e){if(typeof e=="string")return zs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zs(e,t)}}function kP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $P(e){if(Array.isArray(e))return zs(e)}function zs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$a.apply(this,arguments)}function Tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tf(Object(r),!0).forEach(function(n){CP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CP(e,t,r){return t=MP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MP(e){var t=IP(e,"string");return fi(t)=="symbol"?t:String(t)}function IP(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ef(e,t){if(e==null)return{};var r=DP(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DP(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var NP=function(t){return Array.isArray(t.value)?AP(t.value):t.value};function Rt(e){var t=e.valueAccessor,r=t===void 0?NP:t,n=Ef(e,jP),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Ef(n,PP);return!i||!i.length?null:P.createElement(de,{className:"recharts-label-list"},i.map(function(f,u){var h=ie(a)?r(f,u):Me(f&&f.payload,a),d=ie(s)?{}:{id:"".concat(s,"-").concat(u)};return P.createElement(Re,$a({},X(f,!0),c,d,{parentViewBox:f.parentViewBox,value:h,textBreakAll:l,viewBox:Re.parseViewBox(ie(o)?f:_f(_f({},f),{},{clockWise:o})),key:"label-".concat(u),index:u}))}))}Rt.displayName="LabelList";function LP(e,t){return e?e===!0?P.createElement(Rt,{key:"labelList-implicit",data:t}):P.isValidElement(e)||te(e)?P.createElement(Rt,{key:"labelList-implicit",data:t,content:e}):sn(e)?P.createElement(Rt,$a({data:t},e,{key:"labelList-implicit"})):null:null}function BP(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=at(n,Rt).map(function(o,s){return I.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=LP(e.label,t);return[a].concat(TP(i))}Rt.renderCallByParent=BP;function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ws.apply(this,arguments)}function kf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kf(Object(r),!0).forEach(function(n){RP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RP(e,t,r){return t=zP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zP(e){var t=WP(e,"string");return hi(t)=="symbol"?t:String(t)}function WP(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FP=function(t,r){var n=Ge(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Yi=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,f=l*(s?1:-1)+i,u=Math.asin(l/f)/ka,h=c?a:a+o*u,d=we(r,n,f,h),v=we(r,n,i,h),p=c?a-o*u:a,m=we(r,n,f*Math.cos(u*ka),p);return{center:d,circleTangency:v,lineTangency:m,theta:u}},fv=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=FP(o,s),c=o+l,f=we(r,n,a,o),u=we(r,n,a,c),h="M ".concat(f.x,",").concat(f.y,`
    A `).concat(a,",").concat(a,`,0,
    `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
    `).concat(u.x,",").concat(u.y,`
  `);if(i>0){var d=we(r,n,i,o),v=we(r,n,i,c);h+="L ".concat(v.x,",").concat(v.y,`
            A `).concat(i,",").concat(i,`,0,
            `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
            `).concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},UP=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,u=Ge(f-c),h=Yi({cx:r,cy:n,radius:a,angle:c,sign:u,cornerRadius:o,cornerIsExternal:l}),d=h.circleTangency,v=h.lineTangency,p=h.theta,m=Yi({cx:r,cy:n,radius:a,angle:f,sign:-u,cornerRadius:o,cornerIsExternal:l}),w=m.circleTangency,x=m.lineTangency,O=m.theta,g=l?Math.abs(c-f):Math.abs(c-f)-p-O;if(g<0)return s?"M ".concat(v.x,",").concat(v.y,`
        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
      `):fv({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:f});var b="M ".concat(v.x,",").concat(v.y,`
    A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,`
    A`).concat(a,",").concat(a,",0,").concat(+(g>180),",").concat(+(u<0),",").concat(w.x,",").concat(w.y,`
    A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,`
  `);if(i>0){var S=Yi({cx:r,cy:n,radius:i,angle:c,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=S.circleTangency,j=S.lineTangency,k=S.theta,_=Yi({cx:r,cy:n,radius:i,angle:f,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=_.circleTangency,T=_.lineTangency,C=_.theta,$=l?Math.abs(c-f):Math.abs(c-f)-k-C;if($<0&&o===0)return"".concat(b,"L").concat(r,",").concat(n,"Z");b+="L".concat(T.x,",").concat(T.y,`
      A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(E.x,",").concat(E.y,`
      A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(u>0),",").concat(A.x,",").concat(A.y,`
      A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(j.x,",").concat(j.y,"Z")}else b+="L".concat(r,",").concat(n,"Z");return b},qP={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hv=function(t){var r=$f($f({},qP),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,u=r.endAngle,h=r.className;if(o<a||f===u)return null;var d=oe("recharts-sector",h),v=o-a,p=Xe(s,v,0,!0),m;return p>0&&Math.abs(f-u)<360?m=UP({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(p,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:u}):m=fv({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:u}),P.createElement("path",Ws({},X(r,!0),{className:d,d:m,role:"img"}))};function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}function Fs(){return Fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fs.apply(this,arguments)}function Cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(n){KP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KP(e,t,r){return t=VP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VP(e){var t=HP(e,"string");return di(t)=="symbol"?t:String(t)}function HP(e,t){if(di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var If={curveBasisClosed:Wb,curveBasisOpen:Fb,curveBasis:zb,curveBumpX:Pb,curveBumpY:Tb,curveLinearClosed:Ub,curveLinear:io,curveMonotoneX:qb,curveMonotoneY:Kb,curveNatural:Vb,curveStep:Hb,curveStepAfter:Xb,curveStepBefore:Gb},Zi=function(t){return t.x===+t.x&&t.y===+t.y},Dn=function(t){return t.x},Nn=function(t){return t.y},GP=function(t,r){if(te(t))return t;var n="curve".concat(ro(t));return(n==="curveMonotone"||n==="curveBump")&&r?If["".concat(n).concat(r==="vertical"?"Y":"X")]:If[n]||io},XP=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,f=GP(n,s),u=c?a.filter(function(p){return Zi(p)}):a,h;if(Array.isArray(o)){var d=c?o.filter(function(p){return Zi(p)}):o,v=u.map(function(p,m){return Mf(Mf({},p),{},{base:d[m]})});return s==="vertical"?h=qi().y(Nn).x1(Dn).x0(function(p){return p.base.x}):h=qi().x(Dn).y1(Nn).y0(function(p){return p.base.y}),h.defined(Zi).curve(f),h(v)}return s==="vertical"&&z(o)?h=qi().y(Nn).x1(Dn).x0(o):z(o)?h=qi().x(Dn).y1(Nn).y0(o):h=kd().x(Dn).y(Nn),h.defined(Zi).curve(f),h(u)},Ca=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?XP(t):i;return P.createElement("path",Fs({},X(t,!1),ca(t),{className:oe("recharts-curve",r),d:o,ref:a}))},YP=Object.getOwnPropertyNames,ZP=Object.getOwnPropertySymbols,JP=Object.prototype.hasOwnProperty;function Df(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Ji(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);var l=e(r,n,i);return a.delete(r),a.delete(n),l}}function Nf(e){return YP(e).concat(ZP(e))}var dv=Object.hasOwn||function(e,t){return JP.call(e,t)};function hn(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var pv="_owner",Lf=Object.getOwnPropertyDescriptor,Bf=Object.keys;function QP(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function eT(e,t){return hn(e.getTime(),t.getTime())}function Rf(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.entries(),a=0,o,s;(o=i.next())&&!o.done;){for(var l=t.entries(),c=!1,f=0;(s=l.next())&&!s.done;){var u=o.value,h=u[0],d=u[1],v=s.value,p=v[0],m=v[1];!c&&!n[f]&&(c=r.equals(h,p,a,f,e,t,r)&&r.equals(d,m,h,p,e,t,r))&&(n[f]=!0),f++}if(!c)return!1;a++}return!0}function tT(e,t,r){var n=Bf(e),i=n.length;if(Bf(t).length!==i)return!1;for(var a;i-- >0;)if(a=n[i],a===pv&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!dv(t,a)||!r.equals(e[a],t[a],a,a,e,t,r))return!1;return!0}function Ln(e,t,r){var n=Nf(e),i=n.length;if(Nf(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],a===pv&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!dv(t,a)||!r.equals(e[a],t[a],a,a,e,t,r)||(o=Lf(e,a),s=Lf(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function rT(e,t){return hn(e.valueOf(),t.valueOf())}function nT(e,t){return e.source===t.source&&e.flags===t.flags}function zf(e,t,r){if(e.size!==t.size)return!1;for(var n={},i=e.values(),a,o;(a=i.next())&&!a.done;){for(var s=t.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!n[c]&&(l=r.equals(a.value,o.value,a.value,o.value,e,t,r))&&(n[c]=!0),c++;if(!l)return!1}return!0}function iT(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var aT="[object Arguments]",oT="[object Boolean]",sT="[object Date]",lT="[object Map]",cT="[object Number]",uT="[object Object]",fT="[object RegExp]",hT="[object Set]",dT="[object String]",pT=Array.isArray,Wf=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Ff=Object.assign,vT=Object.prototype.toString.call.bind(Object.prototype.toString);function yT(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,i=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,u,h){if(f===u)return!0;if(f==null||u==null||typeof f!="object"||typeof u!="object")return f!==f&&u!==u;var d=f.constructor;if(d!==u.constructor)return!1;if(d===Object)return i(f,u,h);if(pT(f))return t(f,u,h);if(Wf!=null&&Wf(f))return l(f,u,h);if(d===Date)return r(f,u,h);if(d===RegExp)return o(f,u,h);if(d===Map)return n(f,u,h);if(d===Set)return s(f,u,h);var v=vT(f);return v===sT?r(f,u,h):v===fT?o(f,u,h):v===lT?n(f,u,h):v===hT?s(f,u,h):v===uT?typeof f.then!="function"&&typeof u.then!="function"&&i(f,u,h):v===aT?i(f,u,h):v===oT||v===cT||v===dT?a(f,u,h):!1}}function mT(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Ln:QP,areDatesEqual:eT,areMapsEqual:n?Df(Rf,Ln):Rf,areObjectsEqual:n?Ln:tT,arePrimitiveWrappersEqual:rT,areRegExpsEqual:nT,areSetsEqual:n?Df(zf,Ln):zf,areTypedArraysEqual:n?Ln:iT};if(r&&(i=Ff({},i,r(i))),t){var a=Ji(i.areArraysEqual),o=Ji(i.areMapsEqual),s=Ji(i.areObjectsEqual),l=Ji(i.areSetsEqual);i=Ff({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function gT(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function bT(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(l,c){var f=n(),u=f.cache,h=u===void 0?t?new WeakMap:void 0:u,d=f.meta;return r(l,c,{cache:h,equals:i,meta:d,strict:a})};if(t)return function(l,c){return r(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return r(l,c,o)}}var xT=nr();nr({strict:!0});nr({circular:!0});nr({circular:!0,strict:!0});nr({createInternalComparator:function(){return hn}});nr({strict:!0,createInternalComparator:function(){return hn}});nr({circular:!0,createInternalComparator:function(){return hn}});nr({circular:!0,createInternalComparator:function(){return hn},strict:!0});function nr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=mT(e),l=yT(s),c=n?n(l):gT(l);return bT({circular:r,comparator:l,createState:i,equals:c,strict:o})}function wT(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Uf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):wT(i)};requestAnimationFrame(n)}function Us(e){"@babel/helpers - typeof";return Us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(e)}function OT(e){return PT(e)||jT(e)||AT(e)||ST()}function ST(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AT(e,t){if(e){if(typeof e=="string")return qf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qf(e,t)}}function qf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PT(e){if(Array.isArray(e))return e}function TT(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=OT(o),l=s[0],c=s.slice(1);if(typeof l=="number"){Uf(i.bind(null,c),l);return}i(l),Uf(i.bind(null,c));return}Us(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function Kf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kf(Object(r),!0).forEach(function(n){vv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vv(e,t,r){return t=_T(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _T(e){var t=ET(e,"string");return pi(t)==="symbol"?t:String(t)}function ET(e,t){if(pi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kT=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},$T=function(t){return t},CT=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},qn=function(t,r){return Object.keys(r).reduce(function(n,i){return Vf(Vf({},n),{},vv({},i,t(i,r[i])))},{})},Hf=function(t,r,n){return t.map(function(i){return"".concat(CT(i)," ").concat(r,"ms ").concat(n)}).join(",")};function MT(e,t){return NT(e)||DT(e,t)||yv(e,t)||IT()}function IT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function NT(e){if(Array.isArray(e))return e}function LT(e){return zT(e)||RT(e)||yv(e)||BT()}function BT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yv(e,t){if(e){if(typeof e=="string")return qs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qs(e,t)}}function RT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zT(e){if(Array.isArray(e))return qs(e)}function qs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ma=1e-4,mv=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},gv=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},Gf=function(t,r){return function(n){var i=mv(t,r);return gv(i,n)}},WT=function(t,r){return function(n){var i=mv(t,r),a=[].concat(LT(i.map(function(o,s){return o*s}).slice(1)),[0]);return gv(a,n)}},Xf=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(m){return parseFloat(m)}),f=MT(c,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var u=Gf(i,o),h=Gf(a,s),d=WT(i,o),v=function(w){return w>1?1:w<0?0:w},p=function(w){for(var x=w>1?1:w,O=x,g=0;g<8;++g){var b=u(O)-x,S=d(O);if(Math.abs(b-x)<Ma||S<Ma)return h(O);O=v(O-b/S)}return h(O)};return p.isStepper=!1,p},FT=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,u,h){var d=-(f-u)*n,v=h*a,p=h+(d-v)*s/1e3,m=h*s/1e3+f;return Math.abs(m-u)<Ma&&Math.abs(p)<Ma?[u,0]:[m,p]};return l.isStepper=!0,l.dt=s,l},UT=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Xf(i);case"spring":return FT();default:if(i.split("(")[0]==="cubic-bezier")return Xf(i)}return typeof i=="function"?i:null};function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}function Yf(e){return VT(e)||KT(e)||bv(e)||qT()}function qT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VT(e){if(Array.isArray(e))return Vs(e)}function Zf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zf(Object(r),!0).forEach(function(n){Ks(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ks(e,t,r){return t=HT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HT(e){var t=GT(e,"string");return vi(t)==="symbol"?t:String(t)}function GT(e,t){if(vi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XT(e,t){return JT(e)||ZT(e,t)||bv(e,t)||YT()}function YT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bv(e,t){if(e){if(typeof e=="string")return Vs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vs(e,t)}}function Vs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ZT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function JT(e){if(Array.isArray(e))return e}var Ia=function(t,r,n){return t+(r-t)*n},Hs=function(t){var r=t.from,n=t.to;return r!==n},QT=function e(t,r,n){var i=qn(function(a,o){if(Hs(o)){var s=t(o.from,o.to,o.velocity),l=XT(s,2),c=l[0],f=l[1];return Fe(Fe({},o),{},{from:c,velocity:f})}return o},r);return n<1?qn(function(a,o){return Hs(o)?Fe(Fe({},o),{},{velocity:Ia(o.velocity,i[a].velocity,n),from:Ia(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const e_=function(e,t,r,n,i){var a=kT(e,t),o=a.reduce(function(m,w){return Fe(Fe({},m),{},Ks({},w,[e[w],t[w]]))},{}),s=a.reduce(function(m,w){return Fe(Fe({},m),{},Ks({},w,{from:e[w],velocity:0,to:t[w]}))},{}),l=-1,c,f,u=function(){return null},h=function(){return qn(function(w,x){return x.from},s)},d=function(){return!Object.values(s).filter(Hs).length},v=function(w){c||(c=w);var x=w-c,O=x/r.dt;s=QT(r,s,O),i(Fe(Fe(Fe({},e),t),h())),c=w,d()||(l=requestAnimationFrame(u))},p=function(w){f||(f=w);var x=(w-f)/n,O=qn(function(b,S){return Ia.apply(void 0,Yf(S).concat([r(x)]))},o);if(i(Fe(Fe(Fe({},e),t),O)),x<1)l=requestAnimationFrame(u);else{var g=qn(function(b,S){return Ia.apply(void 0,Yf(S).concat([r(1)]))},o);i(Fe(Fe(Fe({},e),t),g))}};return u=r.isStepper?v:p,function(){return requestAnimationFrame(u),function(){cancelAnimationFrame(l)}}};function Xr(e){"@babel/helpers - typeof";return Xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xr(e)}var t_=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function r_(e,t){if(e==null)return{};var r=n_(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n_(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Ho(e){return s_(e)||o_(e)||a_(e)||i_()}function i_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a_(e,t){if(e){if(typeof e=="string")return Gs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gs(e,t)}}function o_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s_(e){if(Array.isArray(e))return Gs(e)}function Gs(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jf(Object(r),!0).forEach(function(n){Rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rn(e,t,r){return t=xv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xv(n.key),n)}}function u_(e,t,r){return t&&c_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xv(e){var t=f_(e,"string");return Xr(t)==="symbol"?t:String(t)}function f_(e,t){if(Xr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xs(e,t)}function Xs(e,t){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xs(e,t)}function d_(e){var t=p_();return function(){var n=Da(e),i;if(t){var a=Da(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Ys(this,i)}}function Ys(e,t){if(t&&(Xr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zs(e)}function Zs(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p_(){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 Da(e){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Da(e)}var kt=function(e){h_(r,e);var t=d_(r);function r(n,i){var a;l_(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,c=o.from,f=o.to,u=o.steps,h=o.children,d=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Zs(a)),a.changeStyle=a.changeStyle.bind(Zs(a)),!s||d<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),Ys(a);if(u&&u.length)a.state={style:u[0].style};else if(c){if(typeof h=="function")return a.state={style:c},Ys(a);a.state={style:l?Rn({},l,c):c}}else a.state={style:{}};return a}return u_(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,f=a.to,u=a.from,h=this.state.style;if(s){if(!o){var d={style:l?Rn({},l,f):f};this.state&&h&&(l&&h[l]!==f||!l&&h!==f)&&this.setState(d);return}if(!(xT(i.to,f)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=v||c?u:i.to;if(this.state&&h){var m={style:l?Rn({},l,p):p};(l&&h[l]!==p||!l&&h!==p)&&this.setState(m)}this.runAnimation(mt(mt({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,c=i.easing,f=i.begin,u=i.onAnimationEnd,h=i.onAnimationStart,d=e_(o,s,UT(c),l,this.changeStyle),v=function(){a.stopJSAnimation=d()};this.manager.start([h,f,v,l,u])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,c=o[0],f=c.style,u=c.duration,h=u===void 0?0:u,d=function(p,m,w){if(w===0)return p;var x=m.duration,O=m.easing,g=O===void 0?"ease":O,b=m.style,S=m.properties,A=m.onAnimationEnd,j=w>0?o[w-1]:m,k=S||Object.keys(b);if(typeof g=="function"||g==="spring")return[].concat(Ho(p),[a.runJSAnimation.bind(a,{from:j.style,to:b,duration:x,easing:g}),x]);var _=Hf(k,x,g),E=mt(mt(mt({},j.style),b),{},{transition:_});return[].concat(Ho(p),[E,x,A]).filter($T)};return this.manager.start([l].concat(Ho(o.reduce(d,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=TT());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,c=i.easing,f=i.onAnimationStart,u=i.onAnimationEnd,h=i.steps,d=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof c=="function"||typeof d=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var p=s?Rn({},s,l):l,m=Hf(Object.keys(p),o,c);v.start([f,a,mt(mt({},p),{},{transition:m}),o,u])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=r_(i,t_),c=I.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||c===0||o<=0)return a;var u=function(d){var v=d.props,p=v.style,m=p===void 0?{}:p,w=v.className,x=I.cloneElement(d,mt(mt({},l),{},{style:mt(mt({},m),f),className:w}));return x};return c===1?u(I.Children.only(a)):P.createElement("div",null,I.Children.map(a,function(h){return u(h)}))}}]),r}(I.PureComponent);kt.displayName="Animate";kt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};kt.propTypes={from:K.oneOfType([K.object,K.string]),to:K.oneOfType([K.object,K.string]),attributeName:K.string,duration:K.number,begin:K.number,easing:K.oneOfType([K.string,K.func]),steps:K.arrayOf(K.shape({duration:K.number.isRequired,style:K.object.isRequired,easing:K.oneOfType([K.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),K.func]),properties:K.arrayOf("string"),onAnimationEnd:K.func})),children:K.oneOfType([K.node,K.func]),isActive:K.bool,canBegin:K.bool,onAnimationEnd:K.func,shouldReAnimate:K.bool,onAnimationStart:K.func,onAnimationReStart:K.func};K.object,K.object,K.object,K.element;K.object,K.object,K.object,K.oneOfType([K.array,K.element]),K.any;function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Na.apply(this,arguments)}function v_(e,t){return b_(e)||g_(e,t)||m_(e,t)||y_()}function y_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m_(e,t){if(e){if(typeof e=="string")return Qf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qf(e,t)}}function Qf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g_(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function b_(e){if(Array.isArray(e))return e}function eh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function th(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(r),!0).forEach(function(n){x_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x_(e,t,r){return t=w_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w_(e){var t=O_(e,"string");return yi(t)=="symbol"?t:String(t)}function O_(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rh=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,l=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var u=[0,0,0,0],h=0,d=4;h<d;h++)u[h]=a[h]>o?o:a[h];f="M".concat(t,",").concat(r+s*u[0]),u[0]>0&&(f+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(t+l*u[0],",").concat(r)),f+="L ".concat(t+n-l*u[1],",").concat(r),u[1]>0&&(f+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,`,
        `).concat(t+n,",").concat(r+s*u[1])),f+="L ".concat(t+n,",").concat(r+i-s*u[2]),u[2]>0&&(f+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,`,
        `).concat(t+n-l*u[2],",").concat(r+i)),f+="L ".concat(t+l*u[3],",").concat(r+i),u[3]>0&&(f+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,`,
        `).concat(t,",").concat(r+i-s*u[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);f="M ".concat(t,",").concat(r+s*v,`
            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+l*v,",").concat(r,`
            L `).concat(t+n-l*v,",").concat(r,`
            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*v,`
            L `).concat(t+n,",").concat(r+i-s*v,`
            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n-l*v,",").concat(r+i,`
            L `).concat(t+l*v,",").concat(r+i,`
            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t,",").concat(r+i-s*v," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},S_=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(a,a+s),f=Math.max(a,a+s),u=Math.min(o,o+l),h=Math.max(o,o+l);return n>=c&&n<=f&&i>=u&&i<=h}return!1},A_={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oc=function(t){var r=th(th({},A_),t),n=I.useRef(),i=I.useState(-1),a=v_(i,2),o=a[0],s=a[1];I.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var g=n.current.getTotalLength();g&&s(g)}catch{}},[]);var l=r.x,c=r.y,f=r.width,u=r.height,h=r.radius,d=r.className,v=r.animationEasing,p=r.animationDuration,m=r.animationBegin,w=r.isAnimationActive,x=r.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||u!==+u||f===0||u===0)return null;var O=oe("recharts-rectangle",d);return x?P.createElement(kt,{canBegin:o>0,from:{width:f,height:u,x:l,y:c},to:{width:f,height:u,x:l,y:c},duration:p,animationEasing:v,isActive:x},function(g){var b=g.width,S=g.height,A=g.x,j=g.y;return P.createElement(kt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,isActive:w,easing:v},P.createElement("path",Na({},X(r,!0),{className:O,d:rh(A,j,b,S,h),ref:n})))}):P.createElement("path",Na({},X(r,!0),{className:O,d:rh(l,c,f,u,h)}))},j_=["points","className","baseLinePoints","connectNulls"];function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mr.apply(this,arguments)}function P_(e,t){if(e==null)return{};var r=T_(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function T_(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function nh(e){return $_(e)||k_(e)||E_(e)||__()}function __(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E_(e,t){if(e){if(typeof e=="string")return Js(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Js(e,t)}}function k_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $_(e){if(Array.isArray(e))return Js(e)}function Js(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ih=function(t){return t&&t.x===+t.x&&t.y===+t.y},C_=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){ih(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),ih(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Kn=function(t,r){var n=C_(t);r&&(n=[n.reduce(function(a,o){return[].concat(nh(a),nh(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},M_=function(t,r,n){var i=Kn(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Kn(r.reverse(),n).slice(1))},I_=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=P_(t,j_);if(!r||!r.length)return null;var s=oe("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",c=M_(r,i,a);return P.createElement("g",{className:s},P.createElement("path",Mr({},X(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:c})),l?P.createElement("path",Mr({},X(o,!0),{fill:"none",d:Kn(r,a)})):null,l?P.createElement("path",Mr({},X(o,!0),{fill:"none",d:Kn(i,a)})):null)}var f=Kn(r,a);return P.createElement("path",Mr({},X(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qs.apply(this,arguments)}var xo=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=oe("recharts-dot",a);return r===+r&&n===+n&&i===+i?P.createElement("circle",Qs({},X(t,!1),ca(t),{className:o,cx:r,cy:n,r:i})):null};function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}var D_=["x","y","top","left","width","height","className"];function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},el.apply(this,arguments)}function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){L_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L_(e,t,r){return t=B_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B_(e){var t=R_(e,"string");return mi(t)=="symbol"?t:String(t)}function R_(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z_(e,t){if(e==null)return{};var r=W_(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W_(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var F_=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},U_=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,f=t.width,u=f===void 0?0:f,h=t.height,d=h===void 0?0:h,v=t.className,p=z_(t,D_),m=N_({x:n,y:a,top:s,left:c,width:u,height:d},p);return!z(n)||!z(a)||!z(u)||!z(d)||!z(s)||!z(c)?null:P.createElement("path",el({},X(m,!0),{className:oe("recharts-cross",v),d:F_(n,a,u,d,s,c)}))},q_=vo,K_=Lp,V_=Ut;function H_(e,t){return e&&e.length?q_(e,V_(t),K_):void 0}var G_=H_;const X_=Ee(G_);var Y_=vo,Z_=Ut,J_=Bp;function Q_(e,t){return e&&e.length?Y_(e,Z_(t),J_):void 0}var eE=Q_;const tE=Ee(eE);var rE=["cx","cy","angle","ticks","axisLine"],nE=["ticks","tick","angle","tickFormatter","stroke"];function Yr(e){"@babel/helpers - typeof";return Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yr(e)}function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vn.apply(this,arguments)}function oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oh(Object(r),!0).forEach(function(n){wo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sh(e,t){if(e==null)return{};var r=iE(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iE(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function aE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ov(n.key),n)}}function oE(e,t,r){return t&&lh(e.prototype,t),r&&lh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sE(e,t,r){return t=La(t),lE(e,wv()?Reflect.construct(t,r||[],La(e).constructor):t.apply(e,r))}function lE(e,t){if(t&&(Yr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cE(e)}function cE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wv=function(){return!!e})()}function La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},La(e)}function uE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tl(e,t)}function tl(e,t){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},tl(e,t)}function wo(e,t,r){return t=Ov(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ov(e){var t=fE(e,"string");return Yr(t)=="symbol"?t:String(t)}function fE(e,t){if(Yr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oo=function(e){uE(t,e);function t(){return aE(this,t),sE(this,t,arguments)}return oE(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,s=a.cx,l=a.cy;return we(s,l,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,l=X_(s,function(f){return f.coordinate||0}),c=tE(s,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,l=n.axisLine,c=sh(n,rE),f=s.reduce(function(v,p){return[Math.min(v[0],p.coordinate),Math.max(v[1],p.coordinate)]},[1/0,-1/0]),u=we(i,a,f[0],o),h=we(i,a,f[1],o),d=sr(sr(sr({},X(c,!1)),{},{fill:"none"},X(l,!1)),{},{x1:u.x,y1:u.y,x2:h.x,y2:h.y});return P.createElement("line",Vn({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,l=i.tickFormatter,c=i.stroke,f=sh(i,nE),u=this.getTickTextAnchor(),h=X(f,!1),d=X(o,!1),v=a.map(function(p,m){var w=n.getTickValueCoord(p),x=sr(sr(sr(sr({textAnchor:u,transform:"rotate(".concat(90-s,", ").concat(w.x,", ").concat(w.y,")")},h),{},{stroke:"none",fill:c},d),{},{index:m},w),{},{payload:p});return P.createElement(de,Vn({className:oe("recharts-polar-radius-axis-tick",cv(o)),key:"tick-".concat(p.coordinate)},mr(n.props,p,m)),t.renderTickItem(o,x,l?l(p.value,m):p.value))});return P.createElement(de,{className:"recharts-polar-radius-axis-ticks"},v)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:P.createElement(de,{className:oe("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Re.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):te(n)?o=n(i):o=P.createElement(gr,Vn({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}]),t}(I.PureComponent);wo(Oo,"displayName","PolarRadiusAxis");wo(Oo,"axisType","radiusAxis");wo(Oo,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Zr(e){"@babel/helpers - typeof";return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zr(e)}function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fr.apply(this,arguments)}function ch(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(r),!0).forEach(function(n){So(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Av(n.key),n)}}function dE(e,t,r){return t&&uh(e.prototype,t),r&&uh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pE(e,t,r){return t=Ba(t),vE(e,Sv()?Reflect.construct(t,r||[],Ba(e).constructor):t.apply(e,r))}function vE(e,t){if(t&&(Zr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yE(e)}function yE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sv=function(){return!!e})()}function Ba(e){return Ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ba(e)}function mE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rl(e,t)}function rl(e,t){return rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rl(e,t)}function So(e,t,r){return t=Av(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Av(e){var t=gE(e,"string");return Zr(t)=="symbol"?t:String(t)}function gE(e,t){if(Zr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bE=Math.PI/180,fh=1e-5,Ao=function(e){mE(t,e);function t(){return hE(this,t),pE(this,t,arguments)}return dE(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,s=i.radius,l=i.orientation,c=i.tickSize,f=c||8,u=we(a,o,s,n.coordinate),h=we(a,o,s+(l==="inner"?-1:1)*f,n.coordinate);return{x1:u.x,y1:u.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*bE),o;return a>fh?o=i==="outer"?"start":"end":a<-fh?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,c=lr(lr({},X(this.props,!1)),{},{fill:"none"},X(s,!1));if(l==="circle")return P.createElement(xo,fr({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:o}));var f=this.props.ticks,u=f.map(function(h){return we(i,a,o,h.coordinate)});return P.createElement(I_,fr({className:"recharts-polar-angle-axis-line"},c,{points:u}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,f=X(this.props,!1),u=X(o,!1),h=lr(lr({},f),{},{fill:"none"},X(s,!1)),d=a.map(function(v,p){var m=n.getTickLineCoord(v),w=n.getTickTextAnchor(v),x=lr(lr(lr({textAnchor:w},f),{},{stroke:"none",fill:c},u),{},{index:p,payload:v,x:m.x2,y:m.y2});return P.createElement(de,fr({className:oe("recharts-polar-angle-axis-tick",cv(o)),key:"tick-".concat(v.coordinate)},mr(n.props,v,p)),s&&P.createElement("line",fr({className:"recharts-polar-angle-axis-tick-line"},h,m)),o&&t.renderTickItem(o,x,l?l(v.value,p):v.value))});return P.createElement(de,{className:"recharts-polar-angle-axis-ticks"},d)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:P.createElement(de,{className:oe("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):te(n)?o=n(i):o=P.createElement(gr,fr({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}]),t}(I.PureComponent);So(Ao,"displayName","PolarAngleAxis");So(Ao,"axisType","angleAxis");So(Ao,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var xE=hd,wE=fd,OE="[object Boolean]";function SE(e){return e===!0||e===!1||wE(e)&&xE(e)==OE}var AE=SE;const jE=Ee(AE);function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ra.apply(this,arguments)}function PE(e,t){return kE(e)||EE(e,t)||_E(e,t)||TE()}function TE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _E(e,t){if(e){if(typeof e=="string")return hh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hh(e,t)}}function hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function EE(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function kE(e){if(Array.isArray(e))return e}function dh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dh(Object(r),!0).forEach(function(n){$E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $E(e,t,r){return t=CE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CE(e){var t=ME(e,"string");return gi(t)=="symbol"?t:String(t)}function ME(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vh=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},IE={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},DE=function(t){var r=ph(ph({},IE),t),n=I.useRef(),i=I.useState(-1),a=PE(i,2),o=a[0],s=a[1];I.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var l=r.x,c=r.y,f=r.upperWidth,u=r.lowerWidth,h=r.height,d=r.className,v=r.animationEasing,p=r.animationDuration,m=r.animationBegin,w=r.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||u!==+u||h!==+h||f===0&&u===0||h===0)return null;var x=oe("recharts-trapezoid",d);return w?P.createElement(kt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:f,lowerWidth:u,height:h,x:l,y:c},duration:p,animationEasing:v,isActive:w},function(O){var g=O.upperWidth,b=O.lowerWidth,S=O.height,A=O.x,j=O.y;return P.createElement(kt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,easing:v},P.createElement("path",Ra({},X(r,!0),{className:x,d:vh(A,j,g,b,S),ref:n})))}):P.createElement("g",null,P.createElement("path",Ra({},X(r,!0),{className:x,d:vh(l,c,f,u,h)})))},NE=["option","shapeType","propTransformer","activeClassName","isActive"];function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function LE(e,t){if(e==null)return{};var r=BE(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BE(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function yh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(r),!0).forEach(function(n){RE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RE(e,t,r){return t=zE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zE(e){var t=WE(e,"string");return bi(t)=="symbol"?t:String(t)}function WE(e,t){if(bi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FE(e,t){return za(za({},t),e)}function UE(e,t){return e==="symbols"}function mh(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return P.createElement(oc,r);case"trapezoid":return P.createElement(DE,r);case"sector":return P.createElement(hv,r);case"symbols":if(UE(t))return P.createElement(Ml,r);break;default:return null}}function qE(e){return I.isValidElement(e)?e.props:e}function jv(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?FE:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=LE(e,NE),c;if(I.isValidElement(t))c=I.cloneElement(t,za(za({},l),qE(t)));else if(te(t))c=t(l);else if(fm(t)&&!jE(t)){var f=i(t,l);c=P.createElement(mh,{shapeType:r,elementProps:f})}else{var u=l;c=P.createElement(mh,{shapeType:r,elementProps:u})}return s?P.createElement(de,{className:o},c):c}function jo(e,t){return t!=null&&"trapezoids"in e.props}function Po(e,t){return t!=null&&"sectors"in e.props}function xi(e,t){return t!=null&&"points"in e.props}function KE(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function VE(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function HE(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function GE(e,t){var r;return jo(e,t)?r=KE:Po(e,t)?r=VE:xi(e,t)&&(r=HE),r}function XE(e,t){var r;return jo(e,t)?r="trapezoids":Po(e,t)?r="sectors":xi(e,t)&&(r="points"),r}function YE(e,t){if(jo(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Po(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return xi(e,t)?t.payload:{}}function ZE(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=XE(r,t),a=YE(r,t),o=n.filter(function(l,c){var f=Ni(a,l),u=r.props[i].filter(function(v){var p=GE(r,t);return p(v,t)}),h=r.props[i].indexOf(u[u.length-1]),d=c===h;return f&&d}),s=n.indexOf(o[o.length-1]);return s}var ia;function Jr(e){"@babel/helpers - typeof";return Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(e)}function Ir(){return Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ir.apply(this,arguments)}function gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gh(Object(r),!0).forEach(function(n){ht(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Tv(n.key),n)}}function QE(e,t,r){return t&&bh(e.prototype,t),r&&bh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ek(e,t,r){return t=Wa(t),tk(e,Pv()?Reflect.construct(t,r||[],Wa(e).constructor):t.apply(e,r))}function tk(e,t){if(t&&(Jr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $r(e)}function Pv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pv=function(){return!!e})()}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wa(e)}function $r(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nl(e,t)}function nl(e,t){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nl(e,t)}function ht(e,t,r){return t=Tv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tv(e){var t=nk(e,"string");return Jr(t)=="symbol"?t:String(t)}function nk(e,t){if(Jr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kt=function(e){rk(t,e);function t(r){var n;return JE(this,t),n=ek(this,t,[r]),ht($r(n),"pieRef",null),ht($r(n),"sectorRefs",[]),ht($r(n),"id",cn("recharts-pie-")),ht($r(n),"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),te(i)&&i()}),ht($r(n),"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),te(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return QE(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,s=a.labelLine,l=a.dataKey,c=a.valueKey,f=X(this.props,!1),u=X(o,!1),h=X(s,!1),d=o&&o.offsetRadius||20,v=n.map(function(p,m){var w=(p.startAngle+p.endAngle)/2,x=we(p.cx,p.cy,p.outerRadius+d,w),O=Se(Se(Se(Se({},f),p),{},{stroke:"none"},u),{},{index:m,textAnchor:t.getTextAnchor(x.x,p.cx)},x),g=Se(Se(Se(Se({},f),p),{},{fill:"none",stroke:p.fill},h),{},{index:m,points:[we(p.cx,p.cy,p.outerRadius,w),x],key:"line"}),b=l;return ie(l)&&ie(c)?b="value":ie(l)&&(b=c),P.createElement(de,{key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(m)},s&&t.renderLabelLineItem(s,g),t.renderLabelItem(o,O,Me(p,b)))});return P.createElement(de,{className:"recharts-pie-labels"},v)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,s=a.blendStroke,l=a.inactiveShape;return n.map(function(c,f){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&n.length!==1)return null;var u=i.isActiveIndex(f),h=l&&i.hasActiveIndex()?l:null,d=u?o:h,v=Se(Se({},c),{},{stroke:s?c.fill:c.stroke,tabIndex:-1});return P.createElement(de,Ir({ref:function(m){m&&!i.sectorRefs.includes(m)&&i.sectorRefs.push(m)},tabIndex:-1,className:"recharts-pie-sector"},mr(i.props,c,f),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(f)}),P.createElement(jv,Ir({option:d,isActive:u,shapeType:"sector"},v)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,c=i.animationEasing,f=i.animationId,u=this.state,h=u.prevSectors,d=u.prevIsAnimationActive;return P.createElement(kt,{begin:s,duration:l,isActive:o,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(v){var p=v.t,m=[],w=a&&a[0],x=w.startAngle;return a.forEach(function(O,g){var b=h&&h[g],S=g>0?it(O,"paddingAngle",0):0;if(b){var A=rt(b.endAngle-b.startAngle,O.endAngle-O.startAngle),j=Se(Se({},O),{},{startAngle:x+S,endAngle:x+A(p)+S});m.push(j),x=j.endAngle}else{var k=O.endAngle,_=O.startAngle,E=rt(0,k-_),T=E(p),C=Se(Se({},O),{},{startAngle:x+S,endAngle:x+T+S});m.push(C),x=C.endAngle}}),P.createElement(de,null,n.renderSectorsStatically(m))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Ni(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,c=i.cx,f=i.cy,u=i.innerRadius,h=i.outerRadius,d=i.isAnimationActive,v=this.state.isAnimationFinished;if(a||!o||!o.length||!z(c)||!z(f)||!z(u)||!z(h))return null;var p=oe("recharts-pie",s);return P.createElement(de,{tabIndex:this.props.rootTabIndex,className:p,ref:function(w){n.pieRef=w}},this.renderSectors(),l&&this.renderLabels(o),Re.renderCallByParent(this.props,null,!1),(!d||v)&&Rt.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i){if(P.isValidElement(n))return P.cloneElement(n,i);if(te(n))return n(i);var a=oe("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return P.createElement(Ca,Ir({},i,{type:"linear",className:a}))}},{key:"renderLabelItem",value:function(n,i,a){if(P.isValidElement(n))return P.cloneElement(n,i);var o=a;if(te(n)&&(o=n(i),P.isValidElement(o)))return o;var s=oe("recharts-pie-label-text",typeof n!="boolean"&&!te(n)?n.className:"");return P.createElement(gr,Ir({},i,{alignmentBaseline:"middle",className:s}),o)}}]),t}(I.PureComponent);ia=Kt;ht(Kt,"displayName","Pie");ht(Kt,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Or.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});ht(Kt,"parseDeltaAngle",function(e,t){var r=Ge(t-e),n=Math.min(Math.abs(t-e),360);return r*n});ht(Kt,"getRealPieData",function(e){var t=e.props,r=t.data,n=t.children,i=X(e.props,!1),a=at(n,Br);return r&&r.length?r.map(function(o,s){return Se(Se(Se({payload:o},i),o),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(o){return Se(Se({},i),o.props)}):[]});ht(Kt,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,o=lv(i,a),s=n+Xe(e.props.cx,i,i/2),l=r+Xe(e.props.cy,a,a/2),c=Xe(e.props.innerRadius,o,0),f=Xe(e.props.outerRadius,o,o*.8),u=e.props.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:s,cy:l,innerRadius:c,outerRadius:f,maxRadius:u}});ht(Kt,"getComposedData",function(e){var t=e.item,r=e.offset,n=ia.getRealPieData(t);if(!n||!n.length)return null;var i=t.props,a=i.cornerRadius,o=i.startAngle,s=i.endAngle,l=i.paddingAngle,c=i.dataKey,f=i.nameKey,u=i.valueKey,h=i.tooltipType,d=Math.abs(t.props.minAngle),v=ia.parseCoordinateOfPie(t,r),p=ia.parseDeltaAngle(o,s),m=Math.abs(p),w=c;ie(c)&&ie(u)?(St(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),w="value"):ie(c)&&(St(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),w=u);var x=n.filter(function(j){return Me(j,w,0)!==0}).length,O=(m>=360?x:x-1)*l,g=m-x*d-O,b=n.reduce(function(j,k){var _=Me(k,w,0);return j+(z(_)?_:0)},0),S;if(b>0){var A;S=n.map(function(j,k){var _=Me(j,w,0),E=Me(j,f,k),T=(z(_)?_:0)/b,C;k?C=A.endAngle+Ge(p)*l*(_!==0?1:0):C=o;var $=C+Ge(p)*((_!==0?d:0)+T*g),N=(C+$)/2,M=(v.innerRadius+v.outerRadius)/2,B=[{name:E,value:_,payload:j,dataKey:w,type:h}],R=we(v.cx,v.cy,M,N);return A=Se(Se(Se({percent:T,cornerRadius:a,name:E,tooltipPayload:B,midAngle:N,middleRadius:M,tooltipPosition:R},j),v),{},{value:Me(j,w),startAngle:C,endAngle:$,payload:j,paddingAngle:Ge(p)*l}),A})}return Se(Se({},v),{},{sectors:S,data:n})});var ik=Math.ceil,ak=Math.max;function ok(e,t,r,n){for(var i=-1,a=ak(ik((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var sk=ok,lk=tp,xh=1/0,ck=17976931348623157e292;function uk(e){if(!e)return e===0?e:0;if(e=lk(e),e===xh||e===-xh){var t=e<0?-1:1;return t*ck}return e===e?e:0}var _v=uk,fk=sk,hk=so,Go=_v;function dk(e){return function(t,r,n){return n&&typeof n!="number"&&hk(t,r,n)&&(r=n=void 0),t=Go(t),r===void 0?(r=t,t=0):r=Go(r),n=n===void 0?t<r?1:-1:Go(n),fk(t,r,n,e)}}var pk=dk,vk=pk,yk=vk(),mk=yk;const Fa=Ee(mk);function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}function wh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(r),!0).forEach(function(n){Ev(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ev(e,t,r){return t=gk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gk(e){var t=bk(e,"string");return wi(t)=="symbol"?t:String(t)}function bk(e,t){if(wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xk=["Webkit","Moz","O","ms"],wk=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=xk.reduce(function(a,o){return Oh(Oh({},a),{},Ev({},o+n,r))},{});return i[t]=r,i};function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(e)}function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ua.apply(this,arguments)}function Sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sh(Object(r),!0).forEach(function(n){et(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ok(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ah(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$v(n.key),n)}}function Sk(e,t,r){return t&&Ah(e.prototype,t),r&&Ah(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ak(e,t,r){return t=qa(t),jk(e,kv()?Reflect.construct(t,r||[],qa(e).constructor):t.apply(e,r))}function jk(e,t){if(t&&(Qr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(e)}function kv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kv=function(){return!!e})()}function qa(e){return qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qa(e)}function jt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&il(e,t)}function il(e,t){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},il(e,t)}function et(e,t,r){return t=$v(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $v(e){var t=Tk(e,"string");return Qr(t)=="symbol"?t:String(t)}function Tk(e,t){if(Qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _k=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,c=Fn().domain(Fa(0,l)).range([a,a+o-s]),f=c.domain().map(function(u){return c(u)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(i),scale:c,scaleValues:f}},jh=function(t){return t.changedTouches&&!!t.changedTouches.length},en=function(e){Pk(t,e);function t(r){var n;return Ok(this,t),n=Ak(this,t,[r]),et(jt(n),"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),et(jt(n),"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),et(jt(n),"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),et(jt(n),"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),et(jt(n),"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),et(jt(n),"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),et(jt(n),"handleSlideDragStart",function(i){var a=jh(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(jt(n),"startX"),endX:n.handleTravellerDragStart.bind(jt(n),"endX")},n.state={},n}return Sk(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,f=c.length-1,u=Math.min(i,a),h=Math.max(i,a),d=t.getIndexInRange(o,u),v=t.getIndexInRange(o,h);return{startIndex:d-d%l,endIndex:v===f?f:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Me(a[n],s,n);return te(o)?o(l,n):l}},{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 i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,f=l.width,u=l.travellerWidth,h=l.startIndex,d=l.endIndex,v=l.onChange,p=n.pageX-a;p>0?p=Math.min(p,c+f-u-s,c+f-u-o):p<0&&(p=Math.max(p,c-o,c-s));var m=this.getIndex({startX:o+p,endX:s+p});(m.startIndex!==h||m.endIndex!==d)&&v&&v(m),this.setState({startX:o+p,endX:s+p,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=jh(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],f=this.props,u=f.x,h=f.width,d=f.travellerWidth,v=f.onChange,p=f.gap,m=f.data,w={startX:this.state.startX,endX:this.state.endX},x=n.pageX-a;x>0?x=Math.min(x,u+h-d-c):x<0&&(x=Math.max(x,u-c)),w[o]=c+x;var O=this.getIndex(w),g=O.startIndex,b=O.endIndex,S=function(){var j=m.length-1;return o==="startX"&&(s>l?g%p===0:b%p===0)||s<l&&b===j||o==="endX"&&(s>l?b%p===0:g%p===0)||s>l&&b===j};this.setState(et(et({},o,c+x),"brushMoveStartX",n.pageX),function(){v&&S()&&v(O)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,f=this.state[i],u=s.indexOf(f);if(u!==-1){var h=u+n;if(!(h===-1||h>=s.length)){var d=s[h];i==="startX"&&d>=c||i==="endX"&&d<=l||this.setState(et({},i,d),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,c=n.stroke;return P.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,c=n.children,f=n.padding,u=I.Children.only(c);return u?P.cloneElement(u,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,c=l.y,f=l.travellerWidth,u=l.height,h=l.traveller,d=l.ariaLabel,v=l.data,p=l.startIndex,m=l.endIndex,w=Math.max(n,this.props.x),x=Xo(Xo({},X(this.props,!1)),{},{x:w,y:c,width:f,height:u}),O=d||"Min value: ".concat((a=v[p])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[m])===null||o===void 0?void 0:o.name);return P.createElement(de,{tabIndex:0,role:"slider","aria-label":O,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(b){["ArrowLeft","ArrowRight"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),s.handleTravellerMoveKeyboard(b.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,f=Math.min(n,i)+c,u=Math.max(Math.abs(i-n)-c,0);return P.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:u,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,c=n.stroke,f=this.state,u=f.startX,h=f.endX,d=5,v={pointerEvents:"none",fill:c};return P.createElement(de,{className:"recharts-brush-texts"},P.createElement(gr,Ua({textAnchor:"end",verticalAnchor:"middle",x:Math.min(u,h)-d,y:o+s/2},v),this.getTextOfTick(i)),P.createElement(gr,Ua({textAnchor:"start",verticalAnchor:"middle",x:Math.max(u,h)+l+d,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,c=n.width,f=n.height,u=n.alwaysShowText,h=this.state,d=h.startX,v=h.endX,p=h.isTextActive,m=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!z(s)||!z(l)||!z(c)||!z(f)||c<=0||f<=0)return null;var O=oe("recharts-brush",a),g=P.Children.count(o)===1,b=wk("userSelect","none");return P.createElement(de,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),g&&this.renderPanorama(),this.renderSlide(d,v),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(v,"endX"),(p||m||w||x||u)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,c=Math.floor(a+s/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),P.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),P.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return P.isValidElement(n)?a=P.cloneElement(n,i):te(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,c=n.updateId,f=n.startIndex,u=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return Xo({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?_k({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:u}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(d){return i.scale(d)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}]),t}(I.PureComponent);et(en,"displayName","Brush");et(en,"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 Ek=vd;function kk(e,t){var r;return Ek(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var $k=kk,Ck=hm,Mk=Ut,Ik=$k,Dk=eo,Nk=so;function Lk(e,t,r){var n=Dk(e)?Ck:Ik;return r&&Nk(e,t,r)&&(t=void 0),n(e,Mk(t))}var Bk=Lk;const Rk=Ee(Bk);var _t=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},zk=pm,Wk=dm,Fk=Ut;function Uk(e,t){var r={};return t=Fk(t),Wk(e,function(n,i,a){zk(r,i,t(n,i,a))}),r}var qk=Uk;const Kk=Ee(qk);function Vk(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Hk=Vk,Gk=vd;function Xk(e,t){var r=!0;return Gk(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var Yk=Xk,Zk=Hk,Jk=Yk,Qk=Ut,e$=eo,t$=so;function r$(e,t,r){var n=e$(e)?Zk:Jk;return r&&t$(e,t,r)&&(t=void 0),n(e,Qk(t))}var n$=r$;const Cv=Ee(n$);var i$=["x","y"];function Oi(e){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oi(e)}function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},al.apply(this,arguments)}function Ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ph(Object(r),!0).forEach(function(n){a$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a$(e,t,r){return t=o$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o$(e){var t=s$(e,"string");return Oi(t)=="symbol"?t:String(t)}function s$(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l$(e,t){if(e==null)return{};var r=c$(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c$(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function u$(e,t){var r=e.x,n=e.y,i=l$(e,i$),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),u="".concat(t.width||i.width),h=parseInt(u,10);return Bn(Bn(Bn(Bn(Bn({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function Th(e){return P.createElement(jv,al({shapeType:"rectangle",propTransformer:u$,activeClassName:"recharts-active-bar"},e))}var f$=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=typeof n=="number";return a?t(n,i):(a||xr(),r)}},h$=["value","background"],Mv;function tn(e){"@babel/helpers - typeof";return tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn(e)}function d$(e,t){if(e==null)return{};var r=p$(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p$(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Ka(){return Ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ka.apply(this,arguments)}function _h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_h(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_h(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dv(n.key),n)}}function y$(e,t,r){return t&&Eh(e.prototype,t),r&&Eh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m$(e,t,r){return t=Va(t),g$(e,Iv()?Reflect.construct(t,r||[],Va(e).constructor):t.apply(e,r))}function g$(e,t){if(t&&(tn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zn(e)}function Iv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Iv=function(){return!!e})()}function Va(e){return Va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Va(e)}function zn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ol(e,t)}function ol(e,t){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ol(e,t)}function Jt(e,t,r){return t=Dv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dv(e){var t=x$(e,"string");return tn(t)=="symbol"?t:String(t)}function x$(e,t){if(tn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var er=function(e){b$(t,e);function t(){var r;v$(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=m$(this,t,[].concat(i)),Jt(zn(r),"state",{isAnimationFinished:!1}),Jt(zn(r),"id",cn("recharts-bar-")),Jt(zn(r),"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Jt(zn(r),"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return y$(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,c=a.activeBar,f=X(this.props,!1);return n&&n.map(function(u,h){var d=h===l,v=d?c:o,p=Ne(Ne(Ne({},f),u),{},{isActive:d,option:v,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return P.createElement(de,Ka({className:"recharts-bar-rectangle"},mr(i.props,u,h),{key:"rectangle-".concat(u==null?void 0:u.x,"-").concat(u==null?void 0:u.y,"-").concat(u==null?void 0:u.value)}),P.createElement(Th,p))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,f=i.animationEasing,u=i.animationId,h=this.state.prevData;return P.createElement(kt,{begin:l,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var v=d.t,p=a.map(function(m,w){var x=h&&h[w];if(x){var O=rt(x.x,m.x),g=rt(x.y,m.y),b=rt(x.width,m.width),S=rt(x.height,m.height);return Ne(Ne({},m),{},{x:O(v),y:g(v),width:b(v),height:S(v)})}if(o==="horizontal"){var A=rt(0,m.height),j=A(v);return Ne(Ne({},m),{},{y:m.y+m.height-j,height:j})}var k=rt(0,m.width),_=k(v);return Ne(Ne({},m),{},{width:_})});return P.createElement(de,null,n.renderRectanglesStatically(p))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Ni(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=X(this.props.background,!1);return a.map(function(c,f){c.value;var u=c.background,h=d$(c,h$);if(!u)return null;var d=Ne(Ne(Ne(Ne(Ne({},h),{},{fill:"#eee"},u),l),mr(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,key:"background-bar-".concat(f),className:"recharts-bar-background-rectangle"});return P.createElement(Th,Ka({option:n.props.background,isActive:f===s},d))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,c=a.layout,f=a.children,u=at(f,Li);if(!u)return null;var h=c==="vertical"?o[0].height/2:o[0].width/2,d=function(m,w){var x=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:x,errorVal:Me(m,w)}},v={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(de,v,u.map(function(p){return P.cloneElement(p,{key:"error-bar-".concat(i,"-").concat(p.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:h,dataPointFormatter:d})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,l=n.yAxis,c=n.left,f=n.top,u=n.width,h=n.height,d=n.isAnimationActive,v=n.background,p=n.id;if(i||!a||!a.length)return null;var m=this.state.isAnimationFinished,w=oe("recharts-bar",o),x=s&&s.allowDataOverflow,O=l&&l.allowDataOverflow,g=x||O,b=ie(p)?this.id:p;return P.createElement(de,{className:w},x||O?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(b)},P.createElement("rect",{x:x?c:c-u/2,y:O?f:f-h/2,width:x?u:u*2,height:O?h:h*2}))):null,P.createElement(de,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(b,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,b),(!d||m)&&Rt.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}]),t}(I.PureComponent);Mv=er;Jt(er,"displayName","Bar");Jt(er,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Or.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Jt(er,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,f=e.dataStartIndex,u=e.displayedData,h=e.offset,d=Ij(n,r);if(!d)return null;var v=t.layout,p=r.props,m=p.dataKey,w=p.children,x=p.minPointSize,O=v==="horizontal"?o:a,g=c?O.scale.domain():null,b=Wj({numericAxis:O}),S=at(w,Br),A=u.map(function(j,k){var _,E,T,C,$,N;c?_=Dj(c[f+k],g):(_=Me(j,m),Array.isArray(_)||(_=[b,_]));var M=f$(x,Mv.defaultProps.minPointSize)(_[1],k);if(v==="horizontal"){var B,R=[o.scale(_[0]),o.scale(_[1])],q=R[0],H=R[1];E=bf({axis:a,ticks:s,bandSize:i,offset:d.offset,entry:j,index:k}),T=(B=H??q)!==null&&B!==void 0?B:void 0,C=d.size;var Z=q-H;if($=Number.isNaN(Z)?0:Z,N={x:E,y:o.y,width:C,height:o.height},Math.abs(M)>0&&Math.abs($)<Math.abs(M)){var V=Ge($||M)*(Math.abs(M)-Math.abs($));T-=V,$+=V}}else{var re=[a.scale(_[0]),a.scale(_[1])],G=re[0],ne=re[1];if(E=G,T=bf({axis:o,ticks:l,bandSize:i,offset:d.offset,entry:j,index:k}),C=ne-G,$=d.size,N={x:a.x,y:T,width:a.width,height:$},Math.abs(M)>0&&Math.abs(C)<Math.abs(M)){var ve=Ge(C||M)*(Math.abs(M)-Math.abs(C));C+=ve}}return Ne(Ne(Ne({},j),{},{x:E,y:T,width:C,height:$,value:c?_:_[1],payload:j,background:N},S&&S[k]&&S[k].props),{},{tooltipPayload:[ov(r,j)],tooltipPosition:{x:E+C/2,y:T+$/2}})});return Ne({data:A,layout:v},h)});function Si(e){"@babel/helpers - typeof";return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Si(e)}function w$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nv(n.key),n)}}function O$(e,t,r){return t&&kh(e.prototype,t),r&&kh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$h(Object(r),!0).forEach(function(n){To(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function To(e,t,r){return t=Nv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nv(e){var t=S$(e,"string");return Si(t)=="symbol"?t:String(t)}function S$(e,t){if(Si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lv=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.layout,c=t.children,f=Object.keys(r),u={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},h=!!tt(c,er);return f.reduce(function(d,v){var p=r[v],m=p.orientation,w=p.domain,x=p.padding,O=x===void 0?{}:x,g=p.mirror,b=p.reversed,S="".concat(m).concat(g?"Mirror":""),A,j,k,_,E;if(p.type==="number"&&(p.padding==="gap"||p.padding==="no-gap")){var T=w[1]-w[0],C=1/0,$=p.categoricalDomain.sort();if($.forEach(function(G,ne){ne>0&&(C=Math.min((G||0)-($[ne-1]||0),C))}),Number.isFinite(C)){var N=C/T,M=p.layout==="vertical"?n.height:n.width;if(p.padding==="gap"&&(A=N*M/2),p.padding==="no-gap"){var B=Xe(t.barCategoryGap,N*M),R=N*M/2;A=R-B-(R-B)/M*B}}}i==="xAxis"?j=[n.left+(O.left||0)+(A||0),n.left+n.width-(O.right||0)-(A||0)]:i==="yAxis"?j=l==="horizontal"?[n.top+n.height-(O.bottom||0),n.top+(O.top||0)]:[n.top+(O.top||0)+(A||0),n.top+n.height-(O.bottom||0)-(A||0)]:j=p.range,b&&(j=[j[1],j[0]]);var q=rv(p,a,h),H=q.scale,Z=q.realScaleType;H.domain(w).range(j),nv(H);var V=iv(H,bt(bt({},p),{},{realScaleType:Z}));i==="xAxis"?(E=m==="top"&&!g||m==="bottom"&&g,k=n.left,_=u[S]-E*p.height):i==="yAxis"&&(E=m==="left"&&!g||m==="right"&&g,k=u[S]-E*p.width,_=n.top);var re=bt(bt(bt({},p),V),{},{realScaleType:Z,x:k,y:_,scale:H,width:i==="xAxis"?n.width:p.width,height:i==="yAxis"?n.height:p.height});return re.bandSize=Ea(re,V),!p.hide&&i==="xAxis"?u[S]+=(E?-1:1)*re.height:p.hide||(u[S]+=(E?-1:1)*re.width),bt(bt({},d),{},To({},v,re))},{})},Bv=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},A$=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return Bv({x:r,y:n},{x:i,y:a})},Rv=function(){function e(t){w$(this,e),this.scale=t}return O$(e,[{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]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){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(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}]),e}();To(Rv,"EPS",1e-4);var sc=function(t){var r=Object.keys(t).reduce(function(n,i){return bt(bt({},n),{},To({},i,Rv.create(t[i])))},{});return bt(bt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return Kk(i,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return Cv(i,function(a,o){return r[o].isInRange(a)})}})};function j$(e){return(e%180+180)%180}var P$=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=j$(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},T$=Ut,_$=pd,E$=vm;function k$(e){return function(t,r,n){var i=Object(t);if(!_$(t)){var a=T$(r);t=E$(t),r=function(s){return a(i[s],s,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var $$=k$,C$=_v;function M$(e){var t=C$(e),r=t%1;return t===t?r?t-r:t:0}var I$=M$,D$=qd,N$=Ut,L$=I$,B$=Math.max;function R$(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:L$(r);return i<0&&(i=B$(n+i,0)),D$(e,N$(t),i)}var z$=R$,W$=$$,F$=z$,U$=W$(F$),q$=U$;const K$=Ee(q$);var V$=ym(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),lc=I.createContext(void 0),cc=I.createContext(void 0),zv=I.createContext(void 0),Wv=I.createContext({}),Fv=I.createContext(void 0),Uv=I.createContext(0),qv=I.createContext(0),Ch=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,f=V$(a);return P.createElement(lc.Provider,{value:n},P.createElement(cc.Provider,{value:i},P.createElement(Wv.Provider,{value:a},P.createElement(zv.Provider,{value:f},P.createElement(Fv.Provider,{value:o},P.createElement(Uv.Provider,{value:c},P.createElement(qv.Provider,{value:l},s)))))))},H$=function(){return I.useContext(Fv)},Kv=function(t){var r=I.useContext(lc);r==null&&xr();var n=r[t];return n==null&&xr(),n},G$=function(){var t=I.useContext(lc);return Yt(t)},X$=function(){var t=I.useContext(cc),r=K$(t,function(n){return Cv(n.domain,Number.isFinite)});return r||Yt(t)},Vv=function(t){var r=I.useContext(cc);r==null&&xr();var n=r[t];return n==null&&xr(),n},Y$=function(){var t=I.useContext(zv);return t},Z$=function(){return I.useContext(Wv)},uc=function(){return I.useContext(qv)},fc=function(){return I.useContext(Uv)};function Ai(e){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ai(e)}function Mh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mh(Object(r),!0).forEach(function(n){J$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J$(e,t,r){return t=Q$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q$(e){var t=eC(e,"string");return Ai(t)=="symbol"?t:String(t)}function eC(e,t){if(Ai(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tC(e,t){return aC(e)||iC(e,t)||nC(e,t)||rC()}function rC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nC(e,t){if(e){if(typeof e=="string")return Dh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dh(e,t)}}function Dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function aC(e){if(Array.isArray(e))return e}function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sl.apply(this,arguments)}var oC=function(t,r){var n;return P.isValidElement(t)?n=P.cloneElement(t,r):te(t)?n=t(r):n=P.createElement("line",sl({},r,{className:"recharts-reference-line-line"})),n},sC=function(t,r,n,i,a,o,s,l,c){var f=a.x,u=a.y,h=a.width,d=a.height;if(n){var v=c.y,p=t.y.apply(v,{position:o});if(_t(c,"discard")&&!t.y.isInRange(p))return null;var m=[{x:f+h,y:p},{x:f,y:p}];return l==="left"?m.reverse():m}if(r){var w=c.x,x=t.x.apply(w,{position:o});if(_t(c,"discard")&&!t.x.isInRange(x))return null;var O=[{x,y:u+d},{x,y:u}];return s==="top"?O.reverse():O}if(i){var g=c.segment,b=g.map(function(S){return t.apply(S,{position:o})});return _t(c,"discard")&&Rk(b,function(S){return!t.isInRange(S)})?null:b}return null};function hc(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=H$(),f=Kv(i),u=Vv(a),h=Y$();if(!c||!h)return null;St(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=sc({x:f.scale,y:u.scale}),v=Ie(t),p=Ie(r),m=n&&n.length===2,w=sC(d,v,p,m,h,e.position,f.orientation,u.orientation,e);if(!w)return null;var x=tC(w,2),O=x[0],g=O.x,b=O.y,S=x[1],A=S.x,j=S.y,k=_t(e,"hidden")?"url(#".concat(c,")"):void 0,_=Ih(Ih({clipPath:k},X(e,!0)),{},{x1:g,y1:b,x2:A,y2:j});return P.createElement(de,{className:oe("recharts-reference-line",s)},oC(o,_),Re.renderCallByParent(e,A$({x1:g,y1:b,x2:A,y2:j})))}hc.displayName="ReferenceLine";hc.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"};function ji(e){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(e)}function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ll.apply(this,arguments)}function Nh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nh(Object(r),!0).forEach(function(n){lC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lC(e,t,r){return t=cC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cC(e){var t=uC(e,"string");return ji(t)=="symbol"?t:String(t)}function uC(e,t){if(ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fC=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=sc({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return _t(t,"discard")&&!o.isInRange(s)?null:s};function Bi(e){var t=e.x,r=e.y,n=e.r,i=e.alwaysShow,a=e.clipPathId,o=Ie(t),s=Ie(r);if(St(i===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!o||!s)return null;var l=fC(e);if(!l)return null;var c=l.x,f=l.y,u=e.shape,h=e.className,d=_t(e,"hidden")?"url(#".concat(a,")"):void 0,v=Lh(Lh({clipPath:d},X(e,!0)),{},{cx:c,cy:f});return P.createElement(de,{className:oe("recharts-reference-dot",h)},Bi.renderDot(u,v),Re.renderCallByParent(e,{x:c-n,y:f-n,width:2*n,height:2*n}))}Bi.displayName="ReferenceDot";Bi.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1};Bi.renderDot=function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):te(e)?r=e(t):r=P.createElement(xo,ll({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r};function Pi(e){"@babel/helpers - typeof";return Pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pi(e)}function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cl.apply(this,arguments)}function Bh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(r),!0).forEach(function(n){hC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hC(e,t,r){return t=dC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dC(e){var t=pC(e,"string");return Pi(t)=="symbol"?t:String(t)}function pC(e,t){if(Pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vC=function(t,r,n,i,a){var o=a.x1,s=a.x2,l=a.y1,c=a.y2,f=a.xAxis,u=a.yAxis;if(!f||!u)return null;var h=sc({x:f.scale,y:u.scale}),d={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},v={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(c,{position:"end"}):h.y.rangeMax};return _t(a,"discard")&&(!h.isInRange(d)||!h.isInRange(v))?null:Bv(d,v)};function Ri(e){var t=e.x1,r=e.x2,n=e.y1,i=e.y2,a=e.className,o=e.alwaysShow,s=e.clipPathId;St(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=Ie(t),c=Ie(r),f=Ie(n),u=Ie(i),h=e.shape;if(!l&&!c&&!f&&!u&&!h)return null;var d=vC(l,c,f,u,e);if(!d&&!h)return null;var v=_t(e,"hidden")?"url(#".concat(s,")"):void 0;return P.createElement(de,{className:oe("recharts-reference-area",a)},Ri.renderRect(h,Rh(Rh({clipPath:v},X(e,!0)),d)),Re.renderCallByParent(e,d))}Ri.displayName="ReferenceArea";Ri.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1};Ri.renderRect=function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):te(e)?r=e(t):r=P.createElement(oc,cl({},t,{className:"recharts-reference-area-rect"})),r};function Hv(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function yC(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return P$(n,r)}function mC(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Ha(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function gC(e,t){return Hv(e,t+1)}function bC(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,c=1,f=o,u=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:Hv(n,c)};var p=l,m,w=function(){return m===void 0&&(m=r(v,p)),m},x=v.coordinate,O=l===0||Ha(e,x,w,f,s);O||(l=0,f=o,c+=1),O&&(f=x+e*(w()/2+i),l+=c)},h;c<=a.length;)if(h=u(),h)return h.v;return[]}function Ti(e){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(e)}function zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zh(Object(r),!0).forEach(function(n){xC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xC(e,t,r){return t=wC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wC(e){var t=OC(e,"string");return Ti(t)=="symbol"?t:String(t)}function OC(e,t){if(Ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SC(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,l=t.end,c=function(h){var d=a[h],v,p=function(){return v===void 0&&(v=r(d,h)),v};if(h===o-1){var m=e*(d.coordinate+e*p()/2-l);a[h]=d=qe(qe({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate})}else a[h]=d=qe(qe({},d),{},{tickCoord:d.coordinate});var w=Ha(e,d.tickCoord,p,s,l);w&&(l=d.tickCoord-e*(p()/2+i),a[h]=qe(qe({},d),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return a}function AC(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,c=t.end;if(a){var f=n[s-1],u=r(f,s-1),h=e*(f.coordinate+e*u/2-c);o[s-1]=f=qe(qe({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var d=Ha(e,f.tickCoord,function(){return u},l,c);d&&(c=f.tickCoord-e*(u/2+i),o[s-1]=qe(qe({},f),{},{isShow:!0}))}for(var v=a?s-1:s,p=function(x){var O=o[x],g,b=function(){return g===void 0&&(g=r(O,x)),g};if(x===0){var S=e*(O.coordinate-e*b()/2-l);o[x]=O=qe(qe({},O),{},{tickCoord:S<0?O.coordinate-S*e:O.coordinate})}else o[x]=O=qe(qe({},O),{},{tickCoord:O.coordinate});var A=Ha(e,O.tickCoord,b,l,c);A&&(l=O.tickCoord+e*(b()/2+i),o[x]=qe(qe({},O),{},{isShow:!0}))},m=0;m<v;m++)p(m);return o}function dc(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,f=e.unit,u=e.angle;if(!i||!i.length||!n)return[];if(z(l)||Or.isSsr)return gC(i,typeof l=="number"&&z(l)?l:0);var h=[],d=s==="top"||s==="bottom"?"width":"height",v=f&&d==="width"?Wn(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},p=function(O,g){var b=te(c)?c(O.value,g):O.value;return d==="width"?yC(Wn(b,{fontSize:t,letterSpacing:r}),v,u):Wn(b,{fontSize:t,letterSpacing:r})[d]},m=i.length>=2?Ge(i[1].coordinate-i[0].coordinate):1,w=mC(a,m,d);return l==="equidistantPreserveStart"?bC(m,w,p,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=AC(m,w,p,i,o,l==="preserveStartEnd"):h=SC(m,w,p,i,o),h.filter(function(x){return x.isShow}))}var jC=["viewBox"],PC=["viewBox"],TC=["ticks"];function rn(e){"@babel/helpers - typeof";return rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(e)}function Dr(){return Dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dr.apply(this,arguments)}function Wh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(r),!0).forEach(function(n){pc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yo(e,t){if(e==null)return{};var r=_C(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _C(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function EC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xv(n.key),n)}}function kC(e,t,r){return t&&Fh(e.prototype,t),r&&Fh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $C(e,t,r){return t=Ga(t),CC(e,Gv()?Reflect.construct(t,r||[],Ga(e).constructor):t.apply(e,r))}function CC(e,t){if(t&&(rn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MC(e)}function MC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gv=function(){return!!e})()}function Ga(e){return Ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ga(e)}function IC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ul(e,t)}function ul(e,t){return ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ul(e,t)}function pc(e,t,r){return t=Xv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xv(e){var t=DC(e,"string");return rn(t)=="symbol"?t:String(t)}function DC(e,t){if(rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dn=function(e){IC(t,e);function t(r){var n;return EC(this,t),n=$C(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return kC(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=Yo(n,jC),s=this.props,l=s.viewBox,c=Yo(s,PC);return!Lr(a,l)||!Lr(o,c)||!Lr(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,c=i.orientation,f=i.tickSize,u=i.mirror,h=i.tickMargin,d,v,p,m,w,x,O=u?-1:1,g=n.tickSize||f,b=z(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":d=v=n.coordinate,m=o+ +!u*l,p=m-O*g,x=p-O*h,w=b;break;case"left":p=m=n.coordinate,v=a+ +!u*s,d=v-O*g,w=d-O*h,x=b;break;case"right":p=m=n.coordinate,v=a+ +u*s,d=v+O*g,w=d+O*h,x=b;break;default:d=v=n.coordinate,m=o+ +u*l,p=m+O*g,x=p+O*h,w=b;break}return{line:{x1:d,y1:p,x2:v,y2:m},tick:{x:w,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.orientation,c=n.mirror,f=n.axisLine,u=He(He(He({},X(this.props,!1)),X(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);u=He(He({},u),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var d=+(l==="left"&&!c||l==="right"&&c);u=He(He({},u),{},{x1:i+d*o,y1:a,x2:i+d*o,y2:a+s})}return P.createElement("line",Dr({},u,{className:oe("recharts-cartesian-axis-line",it(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,l=s.tickLine,c=s.stroke,f=s.tick,u=s.tickFormatter,h=s.unit,d=dc(He(He({},this.props),{},{ticks:n}),i,a),v=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=X(this.props,!1),w=X(f,!1),x=He(He({},m),{},{fill:"none"},X(l,!1)),O=d.map(function(g,b){var S=o.getTickLineCoord(g),A=S.line,j=S.tick,k=He(He(He(He({textAnchor:v,verticalAnchor:p},m),{},{stroke:"none",fill:c},w),j),{},{index:b,payload:g,visibleTicksCount:d.length,tickFormatter:u});return P.createElement(de,Dr({className:"recharts-cartesian-axis-tick",key:"tick-".concat(g.value,"-").concat(g.coordinate,"-").concat(g.tickCoord)},mr(o.props,g,b)),l&&P.createElement("line",Dr({},x,A,{className:oe("recharts-cartesian-axis-tick-line",it(l,"className"))})),f&&t.renderTickItem(f,k,"".concat(te(u)?u(g.value,b):g.value).concat(h||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},O)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,c=i.className,f=i.hide;if(f)return null;var u=this.props,h=u.ticks,d=Yo(u,TC),v=h;return te(l)&&(v=h&&h.length>0?l(this.props):l(d)),o<=0||s<=0||!v||!v.length?null:P.createElement(de,{className:oe("recharts-cartesian-axis",c),ref:function(m){n.layerReference=m}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Re.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):te(n)?o=n(i):o=P.createElement(gr,Dr({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}]),t}(I.Component);pc(dn,"displayName","CartesianAxis");pc(dn,"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 NC=["x1","y1","x2","y2","key"],LC=["offset"];function wr(e){"@babel/helpers - typeof";return wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(e)}function Uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uh(Object(r),!0).forEach(function(n){BC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BC(e,t,r){return t=RC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RC(e){var t=zC(e,"string");return wr(t)=="symbol"?t:String(t)}function zC(e,t){if(wr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pr.apply(this,arguments)}function qh(e,t){if(e==null)return{};var r=WC(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WC(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var FC=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height;return P.createElement("rect",{x:i,y:a,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Yv(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(te(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=qh(t,NC),c=X(l,!1);c.offset;var f=qh(c,LC);r=P.createElement("line",pr({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function UC(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=Ve(Ve({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Yv(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function qC(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=Ve(Ve({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Yv(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function KC(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,d){return h-d});i!==f[0]&&f.unshift(0);var u=f.map(function(h,d){var v=!f[d+1],p=v?i+o-h:f[d+1]-h;if(p<=0)return null;var m=d%t.length;return P.createElement("rect",{key:"react-".concat(d),y:h,x:n,height:p,width:a,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function VC(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var f=c.map(function(h){return Math.round(h+a-a)}).sort(function(h,d){return h-d});a!==f[0]&&f.unshift(0);var u=f.map(function(h,d){var v=!f[d+1],p=v?a+s-h:f[d+1]-h;if(p<=0)return null;var m=d%n.length;return P.createElement("rect",{key:"react-".concat(d),x:h,y:o,width:p,height:l,stroke:"none",fill:n[m],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var HC=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return tv(dc(Ve(Ve(Ve({},dn.defaultProps),n),{},{ticks:Nt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},GC=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return tv(dc(Ve(Ve(Ve({},dn.defaultProps),n),{},{ticks:Nt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Er={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function vc(e){var t,r,n,i,a,o,s=uc(),l=fc(),c=Z$(),f=Ve(Ve({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Er.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Er.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Er.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Er.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Er.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Er.verticalFill,x:z(e.x)?e.x:c.left,y:z(e.y)?e.y:c.top,width:z(e.width)?e.width:c.width,height:z(e.height)?e.height:c.height}),u=f.x,h=f.y,d=f.width,v=f.height,p=f.syncWithTicks,m=f.horizontalValues,w=f.verticalValues,x=G$(),O=X$();if(!z(d)||d<=0||!z(v)||v<=0||!z(u)||u!==+u||!z(h)||h!==+h)return null;var g=f.verticalCoordinatesGenerator||HC,b=f.horizontalCoordinatesGenerator||GC,S=f.horizontalPoints,A=f.verticalPoints;if((!S||!S.length)&&te(b)){var j=m&&m.length,k=b({yAxis:O?Ve(Ve({},O),{},{ticks:j?m:O.ticks}):void 0,width:s,height:l,offset:c},j?!0:p);St(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(wr(k),"]")),Array.isArray(k)&&(S=k)}if((!A||!A.length)&&te(g)){var _=w&&w.length,E=g({xAxis:x?Ve(Ve({},x),{},{ticks:_?w:x.ticks}):void 0,width:s,height:l,offset:c},_?!0:p);St(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(wr(E),"]")),Array.isArray(E)&&(A=E)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(FC,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height}),P.createElement(UC,pr({},f,{offset:c,horizontalPoints:S,xAxis:x,yAxis:O})),P.createElement(qC,pr({},f,{offset:c,verticalPoints:A,xAxis:x,yAxis:O})),P.createElement(KC,pr({},f,{horizontalPoints:S})),P.createElement(VC,pr({},f,{verticalPoints:A})))}vc.displayName="CartesianGrid";var XC=["type","layout","connectNulls","ref"];function nn(e){"@babel/helpers - typeof";return nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nn(e)}function YC(e,t){if(e==null)return{};var r=ZC(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZC(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hn.apply(this,arguments)}function Kh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kh(Object(r),!0).forEach(function(n){xt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kr(e){return tM(e)||eM(e)||QC(e)||JC()}function JC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QC(e,t){if(e){if(typeof e=="string")return fl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fl(e,t)}}function eM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tM(e){if(Array.isArray(e))return fl(e)}function fl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jv(n.key),n)}}function nM(e,t,r){return t&&Vh(e.prototype,t),r&&Vh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function iM(e,t,r){return t=Xa(t),aM(e,Zv()?Reflect.construct(t,r||[],Xa(e).constructor):t.apply(e,r))}function aM(e,t){if(t&&(nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gt(e)}function Zv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zv=function(){return!!e})()}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xa(e)}function Gt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oM(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hl(e,t)}function hl(e,t){return hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},hl(e,t)}function xt(e,t,r){return t=Jv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jv(e){var t=sM(e,"string");return nn(t)=="symbol"?t:String(t)}function sM(e,t){if(nn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zi=function(e){oM(t,e);function t(){var r;rM(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=iM(this,t,[].concat(i)),xt(Gt(r),"state",{isAnimationFinished:!0,totalLength:0}),xt(Gt(r),"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),xt(Gt(r),"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(w,x){return w+x});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/c),u=o%c,h=s-o,d=[],v=0,p=0;v<l.length;p+=l[v],++v)if(p+l[v]>u){d=[].concat(kr(l.slice(0,v)),[u-p]);break}var m=d.length%2===0?[0,h]:[h];return[].concat(kr(t.repeat(l,f)),kr(d),m).map(function(w){return"".concat(w,"px")}).join(", ")}),xt(Gt(r),"id",cn("recharts-line-")),xt(Gt(r),"pathRef",function(o){r.mainCurve=o}),xt(Gt(r),"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),xt(Gt(r),"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return nM(t,[{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,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,c=a.layout,f=a.children,u=at(f,Li);if(!u)return null;var h=function(p,m){return{x:p.x,y:p.y,value:p.value,errorVal:Me(p.payload,m)}},d={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(de,d,u.map(function(v){return P.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,f=s.dataKey,u=X(this.props,!1),h=X(l,!0),d=c.map(function(p,m){var w=Qe(Qe(Qe({key:"dot-".concat(m),r:3},u),h),{},{value:p.value,dataKey:f,cx:p.x,cy:p.y,index:m,payload:p.payload});return t.renderDotItem(l,w)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return P.createElement(de,Hn({className:"recharts-line-dots",key:"dots"},v),d)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var u=YC(s,XC),h=Qe(Qe(Qe({},X(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:c,connectNulls:f});return P.createElement(Ca,Hn({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,c=o.isAnimationActive,f=o.animationBegin,u=o.animationDuration,h=o.animationEasing,d=o.animationId,v=o.animateNewValues,p=o.width,m=o.height,w=this.state,x=w.prevPoints,O=w.totalLength;return P.createElement(kt,{begin:f,duration:u,isActive:c,easing:h,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var b=g.t;if(x){var S=x.length/s.length,A=s.map(function(T,C){var $=Math.floor(C*S);if(x[$]){var N=x[$],M=rt(N.x,T.x),B=rt(N.y,T.y);return Qe(Qe({},T),{},{x:M(b),y:B(b)})}if(v){var R=rt(p*2,T.x),q=rt(m/2,T.y);return Qe(Qe({},T),{},{x:R(b),y:q(b)})}return Qe(Qe({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(A,n,i)}var j=rt(0,O),k=j(b),_;if(l){var E="".concat(l).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});_=a.getStrokeDasharray(k,O,E)}else _=a.generateSimpleStrokeDasharray(O,k);return a.renderCurveStatically(s,n,i,{strokeDasharray:_})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,c=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!c&&f>0||!Ni(c,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,c=i.xAxis,f=i.yAxis,u=i.top,h=i.left,d=i.width,v=i.height,p=i.isAnimationActive,m=i.id;if(a||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,O=oe("recharts-line",l),g=c&&c.allowDataOverflow,b=f&&f.allowDataOverflow,S=g||b,A=ie(m)?this.id:m,j=(n=X(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},k=j.r,_=k===void 0?3:k,E=j.strokeWidth,T=E===void 0?2:E,C=Sg(o)?o:{},$=C.clipDot,N=$===void 0?!0:$,M=_*2+T;return P.createElement(de,{className:O},g||b?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(A)},P.createElement("rect",{x:g?h:h-d/2,y:b?u:u-v/2,width:g?d:d*2,height:b?v:v*2})),!N&&P.createElement("clipPath",{id:"clipPath-dots-".concat(A)},P.createElement("rect",{x:h-M/2,y:u-M/2,width:d+M,height:v+M}))):null,!x&&this.renderCurve(S,A),this.renderErrorBar(S,A),(x||o)&&this.renderDots(S,N,A),(!p||w)&&Rt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(kr(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(kr(o),kr(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(P.isValidElement(n))a=P.cloneElement(n,i);else if(te(n))a=n(i);else{var o=oe("recharts-line-dot",typeof n!="boolean"?n.className:"");a=P.createElement(xo,Hn({},i,{className:o}))}return a}}]),t}(I.PureComponent);xt(zi,"displayName","Line");xt(zi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Or.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});xt(zi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,f=t.layout,u=l.map(function(h,d){var v=Me(h,o);return f==="horizontal"?{x:gf({axis:r,ticks:i,bandSize:s,entry:h,index:d}),y:ie(v)?null:n.scale(v),value:v,payload:h}:{x:ie(v)?null:r.scale(v),y:gf({axis:n,ticks:a,bandSize:s,entry:h,index:d}),value:v,payload:h}});return Qe({points:u,layout:f},c)});function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dl.apply(this,arguments)}var pn=function(t){var r=t.xAxisId,n=uc(),i=fc(),a=Kv(r);return a==null?null:P.createElement(dn,dl({},a,{className:oe("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return Nt(s,!0)}}))};pn.displayName="XAxis";pn.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 pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(this,arguments)}var vn=function(t){var r=t.yAxisId,n=uc(),i=fc(),a=Vv(r);return a==null?null:P.createElement(dn,pl({},a,{className:oe("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return Nt(s,!0)}}))};vn.displayName="YAxis";vn.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 Hh(e){return fM(e)||uM(e)||cM(e)||lM()}function lM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cM(e,t){if(e){if(typeof e=="string")return vl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vl(e,t)}}function uM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fM(e){if(Array.isArray(e))return vl(e)}function vl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var yl=function(t,r,n,i,a){var o=at(t,hc),s=at(t,Bi),l=[].concat(Hh(o),Hh(s)),c=at(t,Ri),f="".concat(i,"Id"),u=i[0],h=r;if(l.length&&(h=l.reduce(function(p,m){if(m.props[f]===n&&_t(m.props,"extendDomain")&&z(m.props[u])){var w=m.props[u];return[Math.min(p[0],w),Math.max(p[1],w)]}return p},h)),c.length){var d="".concat(u,"1"),v="".concat(u,"2");h=c.reduce(function(p,m){if(m.props[f]===n&&_t(m.props,"extendDomain")&&z(m.props[d])&&z(m.props[v])){var w=m.props[d],x=m.props[v];return[Math.min(p[0],w,x),Math.max(p[1],w,x)]}return p},h)}return a&&a.length&&(h=a.reduce(function(p,m){return z(m)?[Math.min(p[0],m),Math.max(p[1],m)]:p},h)),h},Qv={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function a(l,c,f,u,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var d=new i(f,u||l,h),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],d]:l._events[v].push(d):(l._events[v]=d,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,u;if(this._eventsCount===0)return c;for(u in f=this._events)t.call(f,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=r?r+c:c,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var h=0,d=u.length,v=new Array(d);h<d;h++)v[h]=u[h].fn;return v},s.prototype.listenerCount=function(c){var f=r?r+c:c,u=this._events[f];return u?u.fn?1:u.length:0},s.prototype.emit=function(c,f,u,h,d,v){var p=r?r+c:c;if(!this._events[p])return!1;var m=this._events[p],w=arguments.length,x,O;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),w){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,f),!0;case 3:return m.fn.call(m.context,f,u),!0;case 4:return m.fn.call(m.context,f,u,h),!0;case 5:return m.fn.call(m.context,f,u,h,d),!0;case 6:return m.fn.call(m.context,f,u,h,d,v),!0}for(O=1,x=new Array(w-1);O<w;O++)x[O-1]=arguments[O];m.fn.apply(m.context,x)}else{var g=m.length,b;for(O=0;O<g;O++)switch(m[O].once&&this.removeListener(c,m[O].fn,void 0,!0),w){case 1:m[O].fn.call(m[O].context);break;case 2:m[O].fn.call(m[O].context,f);break;case 3:m[O].fn.call(m[O].context,f,u);break;case 4:m[O].fn.call(m[O].context,f,u,h);break;default:if(!x)for(b=1,x=new Array(w-1);b<w;b++)x[b-1]=arguments[b];m[O].fn.apply(m[O].context,x)}}return!0},s.prototype.on=function(c,f,u){return a(this,c,f,u,!1)},s.prototype.once=function(c,f,u){return a(this,c,f,u,!0)},s.prototype.removeListener=function(c,f,u,h){var d=r?r+c:c;if(!this._events[d])return this;if(!f)return o(this,d),this;var v=this._events[d];if(v.fn)v.fn===f&&(!h||v.once)&&(!u||v.context===u)&&o(this,d);else{for(var p=0,m=[],w=v.length;p<w;p++)(v[p].fn!==f||h&&!v[p].once||u&&v[p].context!==u)&&m.push(v[p]);m.length?this._events[d]=m.length===1?m[0]:m:o(this,d)}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,e.exports=s})(Qv);var hM=Qv.exports;const dM=Ee(hM);var Zo=new dM,Jo="recharts.syncMouseEvents";function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}function pM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ey(n.key),n)}}function yM(e,t,r){return t&&vM(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qo(e,t,r){return t=ey(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ey(e){var t=mM(e,"string");return _i(t)=="symbol"?t:String(t)}function mM(e,t){if(_i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gM=function(){function e(){pM(this,e),Qo(this,"activeIndex",0),Qo(this,"coordinateList",[]),Qo(this,"layout","horizontal")}return yM(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,l=r.layout,c=l===void 0?null:l,f=r.offset,u=f===void 0?null:f,h=r.mouseHandlerCallback,d=h===void 0?null:h;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=u??this.offset,this.mouseHandlerCallback=d??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 i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=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,u=a+l+c,h=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:u,pageY:h})}}}]),e}();function bM(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&z(n)&&z(i))return!0}return!1}function xM(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function ty(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=we(t,r,n,i),s=we(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function wM(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,f=t.outerRadius,u=t.angle,h=we(s,l,c,u),d=we(s,l,f,u);n=h.x,i=h.y,a=d.x,o=d.y}else return ty(t);return[{x:n,y:i},{x:a,y:o}]}function Ei(e){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(e)}function Gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gh(Object(r),!0).forEach(function(n){OM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OM(e,t,r){return t=SM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SM(e){var t=AM(e,"string");return Ei(t)=="symbol"?t:String(t)}function AM(e,t){if(Ei(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jM(e){var t=e.element,r=e.tooltipEventType,n=e.isActive,i=e.activeCoordinate,a=e.activePayload,o=e.offset,s=e.activeTooltipIndex,l=e.tooltipAxisBandSize,c=e.layout,f=e.chartName;if(!t||!t.props.cursor||!n||!i||f!=="ScatterChart"&&r!=="axis")return null;var u,h=Ca;if(f==="ScatterChart")u=i,h=U_;else if(f==="BarChart")u=xM(c,i,o,l),h=oc;else if(c==="radial"){var d=ty(i),v=d.cx,p=d.cy,m=d.radius,w=d.startAngle,x=d.endAngle;u={cx:v,cy:p,startAngle:w,endAngle:x,innerRadius:m,outerRadius:m},h=hv}else u={points:wM(c,i,o)},h=Ca;var O=Qi(Qi(Qi(Qi({stroke:"#ccc",pointerEvents:"none"},o),u),X(t.props.cursor,!1)),{},{payload:a,payloadIndex:s,className:oe("recharts-tooltip-cursor",t.props.cursor.className)});return I.isValidElement(t.props.cursor)?I.cloneElement(t.props.cursor,O):I.createElement(h,O)}var PM=["item"],TM=["children","className","width","height","style","compact","title","desc"];function an(e){"@babel/helpers - typeof";return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(e)}function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gn.apply(this,arguments)}function Xh(e,t){return kM(e)||EM(e,t)||ny(e,t)||_M()}function _M(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,i=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function kM(e){if(Array.isArray(e))return e}function Yh(e,t){if(e==null)return{};var r=$M(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $M(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function CM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iy(n.key),n)}}function IM(e,t,r){return t&&MM(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DM(e,t,r){return t=Ya(t),NM(e,ry()?Reflect.construct(t,r||[],Ya(e).constructor):t.apply(e,r))}function NM(e,t){if(t&&(an(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return he(e)}function ry(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ry=function(){return!!e})()}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ya(e)}function he(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LM(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ml(e,t)}function ml(e,t){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ml(e,t)}function on(e){return zM(e)||RM(e)||ny(e)||BM()}function BM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ny(e,t){if(e){if(typeof e=="string")return gl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gl(e,t)}}function RM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zM(e){if(Array.isArray(e))return gl(e)}function gl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zh(Object(r),!0).forEach(function(n){Q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q(e,t,r){return t=iy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iy(e){var t=WM(e,"string");return an(t)=="symbol"?t:String(t)}function WM(e,t){if(an(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(an(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FM={xAxis:["bottom","top"],yAxis:["left","right"]},UM={width:"100%",height:"100%"},ay={x:0,y:0};function ea(e){return e}var qM=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},KM=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return D(D(D({},i),we(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,c=i.angle;return D(D(D({},i),we(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return ay},_o=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(on(s),on(c)):s},[]);return o.length>0?o:t&&t.length&&z(i)&&z(a)?t.slice(i,a+1):[]};function oy(e){return e==="number"?[0,"auto"]:void 0}var bl=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=_o(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,c){var f,u=(f=c.props.data)!==null&&f!==void 0?f:r;u&&t.dataStartIndex+t.dataEndIndex!==0&&(u=u.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var d=u===void 0?s:u;h=la(d,o.dataKey,i)}else h=u&&u[n]||s[n];return h?[].concat(on(l),[ov(c,h)]):l},[])},Jh=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=qM(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=_j(o,s,c,l);if(f>=0&&c){var u=c[f]&&c[f].value,h=bl(t,r,f,u),d=KM(n,s,f,a);return{activeTooltipIndex:f,activeLabel:u,activePayload:h,activeCoordinate:d}}return null},VM=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,u=t.children,h=t.stackOffset,d=ev(f,a);return n.reduce(function(v,p){var m,w=p.props,x=w.type,O=w.dataKey,g=w.allowDataOverflow,b=w.allowDuplicatedCategory,S=w.scale,A=w.ticks,j=w.includeHidden,k=p.props[o];if(v[k])return v;var _=_o(t.data,{graphicalItems:i.filter(function(V){return V.props[o]===k}),dataStartIndex:l,dataEndIndex:c}),E=_.length,T,C,$;bM(p.props.domain,g,x)&&(T=Bs(p.props.domain,null,g),d&&(x==="number"||S!=="auto")&&($=Un(_,O,"category")));var N=oy(x);if(!T||T.length===0){var M,B=(M=p.props.domain)!==null&&M!==void 0?M:N;if(O){if(T=Un(_,O,x),x==="category"&&d){var R=pg(T);b&&R?(C=T,T=Fa(0,E)):b||(T=Of(B,T,p).reduce(function(V,re){return V.indexOf(re)>=0?V:[].concat(on(V),[re])},[]))}else if(x==="category")b?T=T.filter(function(V){return V!==""&&!ie(V)}):T=Of(B,T,p).reduce(function(V,re){return V.indexOf(re)>=0||re===""||ie(re)?V:[].concat(on(V),[re])},[]);else if(x==="number"){var q=Mj(_,i.filter(function(V){return V.props[o]===k&&(j||!V.props.hide)}),O,a,f);q&&(T=q)}d&&(x==="number"||S!=="auto")&&($=Un(_,O,"category"))}else d?T=Fa(0,E):s&&s[k]&&s[k].hasStack&&x==="number"?T=h==="expand"?[0,1]:av(s[k].stackGroups,l,c):T=Qp(_,i.filter(function(V){return V.props[o]===k&&(j||!V.props.hide)}),x,f,!0);if(x==="number")T=yl(u,T,k,a,A),B&&(T=Bs(B,T,g));else if(x==="category"&&B){var H=B,Z=T.every(function(V){return H.indexOf(V)>=0});Z&&(T=H)}}return D(D({},v),{},Q({},k,D(D({},p.props),{},{axisType:a,domain:T,categoricalDomain:$,duplicateDomain:C,originalDomain:(m=p.props.domain)!==null&&m!==void 0?m:N,isCategorical:d,layout:f})))},{})},HM=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,u=t.children,h=_o(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),d=h.length,v=ev(f,a),p=-1;return n.reduce(function(m,w){var x=w.props[o],O=oy("number");if(!m[x]){p++;var g;return v?g=Fa(0,d):s&&s[x]&&s[x].hasStack?(g=av(s[x].stackGroups,l,c),g=yl(u,g,x,a)):(g=Bs(O,Qp(h,n.filter(function(b){return b.props[o]===x&&!b.props.hide}),"number",f),i.defaultProps.allowDataOverflow),g=yl(u,g,x,a)),D(D({},m),{},Q({},x,D(D({axisType:a},i.defaultProps),{},{hide:!0,orientation:it(FM,"".concat(a,".").concat(p%2),null),domain:g,originalDomain:O,isCategorical:v,layout:f})))}return m},{})},GM=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.children,u="".concat(i,"Id"),h=at(f,a),d={};return h&&h.length?d=VM(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:u,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(d=HM(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:u,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),d},XM=function(t){var r=Yt(t),n=Nt(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Dl(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Ea(r,n)}},Qh=function(t){var r=t.children,n=t.defaultShowTooltip,i=tt(r,en),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},YM=function(t){return!t||!t.length?!1:t.some(function(r){var n=Lt(r&&r.type);return n&&n.indexOf("Bar")>=0})},ed=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ZM=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,f=n.height,u=n.children,h=n.margin||{},d=tt(u,en),v=tt(u,Ur),p=Object.keys(l).reduce(function(b,S){var A=l[S],j=A.orientation;return!A.mirror&&!A.hide?D(D({},b),{},Q({},j,b[j]+A.width)):b},{left:h.left||0,right:h.right||0}),m=Object.keys(o).reduce(function(b,S){var A=o[S],j=A.orientation;return!A.mirror&&!A.hide?D(D({},b),{},Q({},j,it(b,"".concat(j))+A.height)):b},{top:h.top||0,bottom:h.bottom||0}),w=D(D({},m),p),x=w.bottom;d&&(w.bottom+=d.props.height||en.defaultProps.height),v&&r&&(w=$j(w,i,n,r));var O=c-w.left-w.right,g=f-w.top-w.bottom;return D(D({brushBottom:x},w),{},{width:Math.max(O,0),height:Math.max(g,0)})},JM=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},yc=function(t){var r,n=t.chartName,i=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,f=t.legendContent,u=t.formatAxisMap,h=t.defaultProps,d=function(m,w){var x=w.graphicalItems,O=w.stackGroups,g=w.offset,b=w.updateId,S=w.dataStartIndex,A=w.dataEndIndex,j=m.barSize,k=m.layout,_=m.barGap,E=m.barCategoryGap,T=m.maxBarSize,C=ed(k),$=C.numericAxisName,N=C.cateAxisName,M=YM(x),B=[];return x.forEach(function(R,q){var H=_o(m.data,{graphicalItems:[R],dataStartIndex:S,dataEndIndex:A}),Z=R.props,V=Z.dataKey,re=Z.maxBarSize,G=R.props["".concat($,"Id")],ne=R.props["".concat(N,"Id")],ve={},ye=c.reduce(function($t,Ct){var yn=w["".concat(Ct.axisType,"Map")],Wi=R.props["".concat(Ct.axisType,"Id")];yn&&yn[Wi]||Ct.axisType==="zAxis"||xr();var Fi=yn[Wi];return D(D({},$t),{},Q(Q({},Ct.axisType,Fi),"".concat(Ct.axisType,"Ticks"),Nt(Fi)))},ve),Ue=ye[N],W=ye["".concat(N,"Ticks")],ee=O&&O[G]&&O[G].hasStack&&Fj(R,O[G].stackGroups),ae=Lt(R.type).indexOf("Bar")>=0,L=Ea(Ue,W),je=[],ue=M&&Ej({barSize:j,stackGroups:O,totalSize:JM(ye,N)});if(ae){var Te,Pe,ke=ie(re)?T:re,yt=(Te=(Pe=Ea(Ue,W,!0))!==null&&Pe!==void 0?Pe:ke)!==null&&Te!==void 0?Te:0;je=kj({barGap:_,barCategoryGap:E,bandSize:yt!==L?yt:L,sizeList:ue[ne],maxBarSize:ke}),yt!==L&&(je=je.map(function($t){return D(D({},$t),{},{position:D(D({},$t.position),{},{offset:$t.position.offset-yt/2})})}))}var ir=R&&R.type&&R.type.getComposedData;ir&&B.push({props:D(D({},ir(D(D({},ye),{},{displayedData:H,props:m,dataKey:V,item:R,bandSize:L,barPosition:je,offset:g,stackedData:ee,layout:k,dataStartIndex:S,dataEndIndex:A}))),{},Q(Q(Q({key:R.key||"item-".concat(q)},$,ye[$]),N,ye[N]),"animationId",b)),childIndex:Pg(R,m.children),item:R})}),B},v=function(m,w){var x=m.props,O=m.dataStartIndex,g=m.dataEndIndex,b=m.updateId;if(!Uc({props:x}))return null;var S=x.children,A=x.layout,j=x.stackOffset,k=x.data,_=x.reverseStackOrder,E=ed(A),T=E.numericAxisName,C=E.cateAxisName,$=at(S,i),N=zj(k,$,"".concat(T,"Id"),"".concat(C,"Id"),j,_),M=c.reduce(function(Z,V){var re="".concat(V.axisType,"Map");return D(D({},Z),{},Q({},re,GM(x,D(D({},V),{},{graphicalItems:$,stackGroups:V.axisType===T&&N,dataStartIndex:O,dataEndIndex:g}))))},{}),B=ZM(D(D({},M),{},{props:x,graphicalItems:$}),w==null?void 0:w.legendBBox);Object.keys(M).forEach(function(Z){M[Z]=u(x,M[Z],B,Z.replace("Map",""),n)});var R=M["".concat(C,"Map")],q=XM(R),H=d(x,D(D({},M),{},{dataStartIndex:O,dataEndIndex:g,updateId:b,graphicalItems:$,stackGroups:N,offset:B}));return D(D({formattedGraphicalItems:H,graphicalItems:$,offset:B,stackGroups:N},q),M)};return r=function(p){LM(m,p);function m(w){var x,O,g;return CM(this,m),g=DM(this,m,[w]),Q(he(g),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Q(he(g),"accessibilityManager",new gM),Q(he(g),"handleLegendBBoxUpdate",function(b){if(b){var S=g.state,A=S.dataStartIndex,j=S.dataEndIndex,k=S.updateId;g.setState(D({legendBBox:b},v({props:g.props,dataStartIndex:A,dataEndIndex:j,updateId:k},D(D({},g.state),{},{legendBBox:b}))))}}),Q(he(g),"handleReceiveSyncEvent",function(b,S,A){if(g.props.syncId===b){if(A===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(S)}}),Q(he(g),"handleBrushChange",function(b){var S=b.startIndex,A=b.endIndex;if(S!==g.state.dataStartIndex||A!==g.state.dataEndIndex){var j=g.state.updateId;g.setState(function(){return D({dataStartIndex:S,dataEndIndex:A},v({props:g.props,dataStartIndex:S,dataEndIndex:A,updateId:j},g.state))}),g.triggerSyncEvent({dataStartIndex:S,dataEndIndex:A})}}),Q(he(g),"handleMouseEnter",function(b){var S=g.getMouseInfo(b);if(S){var A=D(D({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var j=g.props.onMouseEnter;te(j)&&j(A,b)}}),Q(he(g),"triggeredAfterMouseMove",function(b){var S=g.getMouseInfo(b),A=S?D(D({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(A),g.triggerSyncEvent(A);var j=g.props.onMouseMove;te(j)&&j(A,b)}),Q(he(g),"handleItemMouseEnter",function(b){g.setState(function(){return{isTooltipActive:!0,activeItem:b,activePayload:b.tooltipPayload,activeCoordinate:b.tooltipPosition||{x:b.cx,y:b.cy}}})}),Q(he(g),"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),Q(he(g),"handleMouseMove",function(b){b.persist(),g.throttleTriggeredAfterMouseMove(b)}),Q(he(g),"handleMouseLeave",function(b){g.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};g.setState(S),g.triggerSyncEvent(S);var A=g.props.onMouseLeave;te(A)&&A(S,b)}),Q(he(g),"handleOuterEvent",function(b){var S=jg(b),A=it(g.props,"".concat(S));if(S&&te(A)){var j,k;/.*touch.*/i.test(S)?k=g.getMouseInfo(b.changedTouches[0]):k=g.getMouseInfo(b),A((j=k)!==null&&j!==void 0?j:{},b)}}),Q(he(g),"handleClick",function(b){var S=g.getMouseInfo(b);if(S){var A=D(D({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var j=g.props.onClick;te(j)&&j(A,b)}}),Q(he(g),"handleMouseDown",function(b){var S=g.props.onMouseDown;if(te(S)){var A=g.getMouseInfo(b);S(A,b)}}),Q(he(g),"handleMouseUp",function(b){var S=g.props.onMouseUp;if(te(S)){var A=g.getMouseInfo(b);S(A,b)}}),Q(he(g),"handleTouchMove",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(b.changedTouches[0])}),Q(he(g),"handleTouchStart",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&g.handleMouseDown(b.changedTouches[0])}),Q(he(g),"handleTouchEnd",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&g.handleMouseUp(b.changedTouches[0])}),Q(he(g),"triggerSyncEvent",function(b){g.props.syncId!==void 0&&Zo.emit(Jo,g.props.syncId,b,g.eventEmitterSymbol)}),Q(he(g),"applySyncEvent",function(b){var S=g.props,A=S.layout,j=S.syncMethod,k=g.state.updateId,_=b.dataStartIndex,E=b.dataEndIndex;if(b.dataStartIndex!==void 0||b.dataEndIndex!==void 0)g.setState(D({dataStartIndex:_,dataEndIndex:E},v({props:g.props,dataStartIndex:_,dataEndIndex:E,updateId:k},g.state)));else if(b.activeTooltipIndex!==void 0){var T=b.chartX,C=b.chartY,$=b.activeTooltipIndex,N=g.state,M=N.offset,B=N.tooltipTicks;if(!M)return;if(typeof j=="function")$=j(B,b);else if(j==="value"){$=-1;for(var R=0;R<B.length;R++)if(B[R].value===b.activeLabel){$=R;break}}var q=D(D({},M),{},{x:M.left,y:M.top}),H=Math.min(T,q.x+q.width),Z=Math.min(C,q.y+q.height),V=B[$]&&B[$].value,re=bl(g.state,g.props.data,$),G=B[$]?{x:A==="horizontal"?B[$].coordinate:H,y:A==="horizontal"?Z:B[$].coordinate}:ay;g.setState(D(D({},b),{},{activeLabel:V,activeCoordinate:G,activePayload:re,activeTooltipIndex:$}))}else g.setState(b)}),Q(he(g),"renderCursor",function(b){var S,A=g.state,j=A.isTooltipActive,k=A.activeCoordinate,_=A.activePayload,E=A.offset,T=A.activeTooltipIndex,C=A.tooltipAxisBandSize,$=g.getTooltipEventType(),N=(S=b.props.active)!==null&&S!==void 0?S:j,M=g.props.layout,B=b.key||"_recharts-cursor";return P.createElement(jM,{key:B,activeCoordinate:k,activePayload:_,activeTooltipIndex:T,chartName:n,element:b,isActive:N,layout:M,offset:E,tooltipAxisBandSize:C,tooltipEventType:$})}),Q(he(g),"renderPolarAxis",function(b,S,A){var j=it(b,"type.axisType"),k=it(g.state,"".concat(j,"Map")),_=k&&k[b.props["".concat(j,"Id")]];return I.cloneElement(b,D(D({},_),{},{className:oe(j,_.className),key:b.key||"".concat(S,"-").concat(A),ticks:Nt(_,!0)}))}),Q(he(g),"renderPolarGrid",function(b){var S=b.props,A=S.radialLines,j=S.polarAngles,k=S.polarRadius,_=g.state,E=_.radiusAxisMap,T=_.angleAxisMap,C=Yt(E),$=Yt(T),N=$.cx,M=$.cy,B=$.innerRadius,R=$.outerRadius;return I.cloneElement(b,{polarAngles:Array.isArray(j)?j:Nt($,!0).map(function(q){return q.coordinate}),polarRadius:Array.isArray(k)?k:Nt(C,!0).map(function(q){return q.coordinate}),cx:N,cy:M,innerRadius:B,outerRadius:R,key:b.key||"polar-grid",radialLines:A})}),Q(he(g),"renderLegend",function(){var b=g.state.formattedGraphicalItems,S=g.props,A=S.children,j=S.width,k=S.height,_=g.props.margin||{},E=j-(_.left||0)-(_.right||0),T=Zp({children:A,formattedGraphicalItems:b,legendWidth:E,legendContent:f});if(!T)return null;var C=T.item,$=Yh(T,PM);return I.cloneElement(C,D(D({},$),{},{chartWidth:j,chartHeight:k,margin:_,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),Q(he(g),"renderTooltip",function(){var b,S=g.props,A=S.children,j=S.accessibilityLayer,k=tt(A,gt);if(!k)return null;var _=g.state,E=_.isTooltipActive,T=_.activeCoordinate,C=_.activePayload,$=_.activeLabel,N=_.offset,M=(b=k.props.active)!==null&&b!==void 0?b:E;return I.cloneElement(k,{viewBox:D(D({},N),{},{x:N.left,y:N.top}),active:M,label:$,payload:M?C:[],coordinate:T,accessibilityLayer:j})}),Q(he(g),"renderBrush",function(b){var S=g.props,A=S.margin,j=S.data,k=g.state,_=k.offset,E=k.dataStartIndex,T=k.dataEndIndex,C=k.updateId;return I.cloneElement(b,{key:b.key||"_recharts-brush",onChange:Xi(g.handleBrushChange,b.props.onChange),data:j,x:z(b.props.x)?b.props.x:_.left,y:z(b.props.y)?b.props.y:_.top+_.height+_.brushBottom-(A.bottom||0),width:z(b.props.width)?b.props.width:_.width,startIndex:E,endIndex:T,updateId:"brush-".concat(C)})}),Q(he(g),"renderReferenceElement",function(b,S,A){if(!b)return null;var j=he(g),k=j.clipPathId,_=g.state,E=_.xAxisMap,T=_.yAxisMap,C=_.offset,$=b.props,N=$.xAxisId,M=$.yAxisId;return I.cloneElement(b,{key:b.key||"".concat(S,"-").concat(A),xAxis:E[N],yAxis:T[M],viewBox:{x:C.left,y:C.top,width:C.width,height:C.height},clipPathId:k})}),Q(he(g),"renderActivePoints",function(b){var S=b.item,A=b.activePoint,j=b.basePoint,k=b.childIndex,_=b.isRange,E=[],T=S.props.key,C=S.item.props,$=C.activeDot,N=C.dataKey,M=D(D({index:k,dataKey:N,cx:A.x,cy:A.y,r:4,fill:ac(S.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value,key:"".concat(T,"-activePoint-").concat(k)},X($,!1)),ca($));return E.push(m.renderActiveDot($,M)),j?E.push(m.renderActiveDot($,D(D({},M),{},{cx:j.x,cy:j.y,key:"".concat(T,"-basePoint-").concat(k)}))):_&&E.push(null),E}),Q(he(g),"renderGraphicChild",function(b,S,A){var j=g.filterFormatItem(b,S,A);if(!j)return null;var k=g.getTooltipEventType(),_=g.state,E=_.isTooltipActive,T=_.tooltipAxis,C=_.activeTooltipIndex,$=_.activeLabel,N=g.props.children,M=tt(N,gt),B=j.props,R=B.points,q=B.isRange,H=B.baseLine,Z=j.item.props,V=Z.activeDot,re=Z.hide,G=Z.activeBar,ne=Z.activeShape,ve=!!(!re&&E&&M&&(V||G||ne)),ye={};k!=="axis"&&M&&M.props.trigger==="click"?ye={onClick:Xi(g.handleItemMouseEnter,b.props.onClick)}:k!=="axis"&&(ye={onMouseLeave:Xi(g.handleItemMouseLeave,b.props.onMouseLeave),onMouseEnter:Xi(g.handleItemMouseEnter,b.props.onMouseEnter)});var Ue=I.cloneElement(b,D(D({},j.props),ye));function W(Ct){return typeof T.dataKey=="function"?T.dataKey(Ct.payload):null}if(ve)if(C>=0){var ee,ae;if(T.dataKey&&!T.allowDuplicatedCategory){var L=typeof T.dataKey=="function"?W:"payload.".concat(T.dataKey.toString());ee=la(R,L,$),ae=q&&H&&la(H,L,$)}else ee=R==null?void 0:R[C],ae=q&&H&&H[C];if(ne||G){var je=b.props.activeIndex!==void 0?b.props.activeIndex:C;return[I.cloneElement(b,D(D(D({},j.props),ye),{},{activeIndex:je})),null,null]}if(!ie(ee))return[Ue].concat(on(g.renderActivePoints({item:j,activePoint:ee,basePoint:ae,childIndex:C,isRange:q})))}else{var ue,Te=(ue=g.getItemByXY(g.state.activeCoordinate))!==null&&ue!==void 0?ue:{graphicalItem:Ue},Pe=Te.graphicalItem,ke=Pe.item,yt=ke===void 0?b:ke,ir=Pe.childIndex,$t=D(D(D({},j.props),ye),{},{activeIndex:ir});return[I.cloneElement(yt,$t),null,null]}return q?[Ue,null,null]:[Ue,null]}),Q(he(g),"renderCustomized",function(b,S,A){return I.cloneElement(b,D(D({key:"recharts-customized-".concat(A)},g.props),g.state))}),Q(he(g),"renderMap",{CartesianGrid:{handler:ea,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:ea},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:ea},YAxis:{handler:ea},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((x=w.id)!==null&&x!==void 0?x:cn("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=rp(g.triggeredAfterMouseMove,(O=w.throttleDelay)!==null&&O!==void 0?O:1e3/60),g.state={},g}return IM(m,[{key:"componentDidMount",value:function(){var x,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,O=x.children,g=x.data,b=x.height,S=x.layout,A=tt(O,gt);if(A){var j=A.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length)){var k=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,_=bl(this.state,g,j,k),E=this.state.tooltipTicks[j].coordinate,T=(this.state.offset.top+b)/2,C=S==="horizontal",$=C?{x:E,y:T}:{y:E,x:T},N=this.state.formattedGraphicalItems.find(function(B){var R=B.item;return R.type.name==="Scatter"});N&&($=D(D({},$),N.props.points[j].tooltipPosition),_=N.props.points[j].tooltipPayload);var M={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:k,activePayload:_,activeCoordinate:$};this.setState(M),this.renderCursor(A),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var g,b;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0}})}return null}},{key:"componentDidUpdate",value:function(x){os([tt(x.children,gt)],[tt(this.props.children,gt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=tt(this.props.children,gt);if(x&&typeof x.props.shared=="boolean"){var O=x.props.shared?"axis":"item";return l.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var O=this.container,g=O.getBoundingClientRect(),b=zw(g),S={chartX:Math.round(x.pageX-b.left),chartY:Math.round(x.pageY-b.top)},A=g.width/O.offsetWidth||1,j=this.inRange(S.chartX,S.chartY,A);if(!j)return null;var k=this.state,_=k.xAxisMap,E=k.yAxisMap,T=this.getTooltipEventType();if(T!=="axis"&&_&&E){var C=Yt(_).scale,$=Yt(E).scale,N=C&&C.invert?C.invert(S.chartX):null,M=$&&$.invert?$.invert(S.chartY):null;return D(D({},S),{},{xValue:N,yValue:M})}var B=Jh(this.state,this.props.data,this.props.layout,j);return B?D(D({},S),B):null}},{key:"inRange",value:function(x,O){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,b=this.props.layout,S=x/g,A=O/g;if(b==="horizontal"||b==="vertical"){var j=this.state.offset,k=S>=j.left&&S<=j.left+j.width&&A>=j.top&&A<=j.top+j.height;return k?{x:S,y:A}:null}var _=this.state,E=_.angleAxisMap,T=_.radiusAxisMap;if(E&&T){var C=Yt(E);return jf({x:S,y:A},C)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,O=this.getTooltipEventType(),g=tt(x,gt),b={};g&&O==="axis"&&(g.props.trigger==="click"?b={onClick:this.handleClick}:b={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var S=ca(this.props,this.handleOuterEvent);return D(D({},S),b)}},{key:"addListener",value:function(){Zo.on(Jo,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Zo.removeListener(Jo,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,O,g){for(var b=this.state.formattedGraphicalItems,S=0,A=b.length;S<A;S++){var j=b[S];if(j.item===x||j.props.key===x.key||O===Lt(j.item.type)&&g===j.childIndex)return j}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,O=this.state.offset,g=O.left,b=O.top,S=O.height,A=O.width;return P.createElement("defs",null,P.createElement("clipPath",{id:x},P.createElement("rect",{x:g,y:b,height:S,width:A})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(O,g){var b=Xh(g,2),S=b[0],A=b[1];return D(D({},O),{},Q({},S,A.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(O,g){var b=Xh(g,2),S=b[0],A=b[1];return D(D({},O),{},Q({},S,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[x])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(x){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[x])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(x){var O=this.state,g=O.formattedGraphicalItems,b=O.activeItem;if(g&&g.length)for(var S=0,A=g.length;S<A;S++){var j=g[S],k=j.props,_=j.item,E=Lt(_.type);if(E==="Bar"){var T=(k.data||[]).find(function(M){return S_(x,M)});if(T)return{graphicalItem:j,payload:T}}else if(E==="RadialBar"){var C=(k.data||[]).find(function(M){return jf(x,M)});if(C)return{graphicalItem:j,payload:C}}else if(jo(j,b)||Po(j,b)||xi(j,b)){var $=ZE({graphicalItem:j,activeTooltipItem:b,itemData:_.props.data}),N=_.props.activeIndex===void 0?$:_.props.activeIndex;return{graphicalItem:D(D({},j),{},{childIndex:N}),payload:xi(j,b)?_.props.data[$]:j.props.data[$]}}}return null}},{key:"render",value:function(){var x=this;if(!Uc(this))return null;var O=this.props,g=O.children,b=O.className,S=O.width,A=O.height,j=O.style,k=O.compact,_=O.title,E=O.desc,T=Yh(O,TM),C=X(T,!1);if(k)return P.createElement(Ch,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(ls,Gn({},C,{width:S,height:A,title:_,desc:E}),this.renderClipPath(),Kc(g,this.renderMap)));if(this.props.accessibilityLayer){var $,N;C.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,C.role=(N=this.props.role)!==null&&N!==void 0?N:"application",C.onKeyDown=function(B){x.accessibilityManager.keyboardEvent(B)},C.onFocus=function(){x.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return P.createElement(Ch,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",Gn({className:oe("recharts-wrapper",b),style:D({position:"relative",cursor:"default",width:S,height:A},j)},M,{ref:function(R){x.container=R}}),P.createElement(ls,Gn({},C,{width:S,height:A,title:_,desc:E,style:UM}),this.renderClipPath(),Kc(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}]),m}(I.Component),Q(r,"displayName",n),Q(r,"defaultProps",D({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Q(r,"getDerivedStateFromProps",function(p,m){var w=p.dataKey,x=p.data,O=p.children,g=p.width,b=p.height,S=p.layout,A=p.stackOffset,j=p.margin,k=m.dataStartIndex,_=m.dataEndIndex;if(m.updateId===void 0){var E=Qh(p);return D(D(D({},E),{},{updateId:0},v(D(D({props:p},E),{},{updateId:0}),m)),{},{prevDataKey:w,prevData:x,prevWidth:g,prevHeight:b,prevLayout:S,prevStackOffset:A,prevMargin:j,prevChildren:O})}if(w!==m.prevDataKey||x!==m.prevData||g!==m.prevWidth||b!==m.prevHeight||S!==m.prevLayout||A!==m.prevStackOffset||!Lr(j,m.prevMargin)){var T=Qh(p),C={chartX:m.chartX,chartY:m.chartY,isTooltipActive:m.isTooltipActive},$=D(D({},Jh(m,x,S)),{},{updateId:m.updateId+1}),N=D(D(D({},T),C),$);return D(D(D({},N),v(D({props:p},N),m)),{},{prevDataKey:w,prevData:x,prevWidth:g,prevHeight:b,prevLayout:S,prevStackOffset:A,prevMargin:j,prevChildren:O})}if(!os(O,m.prevChildren)){var M,B,R,q,H=tt(O,en),Z=H&&(M=(B=H.props)===null||B===void 0?void 0:B.startIndex)!==null&&M!==void 0?M:k,V=H&&(R=(q=H.props)===null||q===void 0?void 0:q.endIndex)!==null&&R!==void 0?R:_,re=Z!==k||V!==_,G=!ie(x),ne=G&&!re?m.updateId:m.updateId+1;return D(D({updateId:ne},v(D(D({props:p},m),{},{updateId:ne,dataStartIndex:Z,dataEndIndex:V}),m)),{},{prevChildren:O,dataStartIndex:Z,dataEndIndex:V})}return null}),Q(r,"renderActiveDot",function(p,m){var w;return I.isValidElement(p)?w=I.cloneElement(p,m):te(p)?w=p(m):w=P.createElement(xo,m),P.createElement(de,{className:"recharts-active-dot",key:m.key},w)}),r},QM=yc({chartName:"LineChart",GraphicalChild:zi,axisComponents:[{axisType:"xAxis",AxisComp:pn},{axisType:"yAxis",AxisComp:vn}],formatAxisMap:Lv}),eI=yc({chartName:"BarChart",GraphicalChild:er,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:pn},{axisType:"yAxis",AxisComp:vn}],formatAxisMap:Lv}),tI=yc({chartName:"PieChart",GraphicalChild:Kt,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Ao},{axisType:"radiusAxis",AxisComp:Oo}],formatAxisMap:Jj,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const rI=[],nI=["#00C49F","#0088FE","#82ca9d","#113333","#FF3322"],sy=({data:e,flowNames:t,onClick:r})=>y.jsx(Ll,{width:"95%",height:200,children:y.jsxs(QM,{onClick:r,width:500,height:200,data:e||rI,margin:{top:5,right:10,left:40,bottom:20},children:[y.jsx(vc,{strokeDasharray:"3 3"}),y.jsx(pn,{dataKey:"y",label:{value:"Input",position:"insideBottom",offset:0,style:{textAnchor:"middle"}}}),y.jsx(vn,{label:{value:"Latency (ms)",angle:-90,position:"insideLeft",offset:0,style:{textAnchor:"middle"}}}),y.jsx(gt,{}),t.map((n,i)=>y.jsx(zi,{type:"monotone",dataKey:t[i],stroke:nI[i],activeDot:{r:8}},"line"+i))]})});sy.propTypes={data:K.array,flowNames:K.array,onClick:K.func};const es=["#2ecc71","#e74c3c","#f39c12"],td=Math.PI/180,iI=({cx:e,cy:t,midAngle:r,innerRadius:n,outerRadius:i,percent:a})=>{const o=n+(i-n)*.35,s=e+o*Math.cos(-r*td),l=t+o*Math.sin(-r*td);return y.jsx("text",{x:s,y:l,fill:"black",textAnchor:s>e?"start":"end",dominantBaseline:"central",fontSize:"11",children:`${(a*100).toFixed(2)}%`})},ly=({data:e})=>y.jsx(Ll,{width:"100%",height:200,children:y.jsxs(tI,{margin:{top:0,right:0,bottom:0,left:0},children:[y.jsxs(Kt,{cx:"50%",cy:"40%",labelLine:!1,outerRadius:65,dataKey:"value",data:e,label:iI,children:[y.jsx(Br,{fill:es[0]},"cell-0"),y.jsx(Br,{fill:es[1]},"cell-1"),y.jsx(Br,{fill:es[2]},"cell-2")]}),y.jsx(Ur,{verticalAlign:"bottom",height:36})]})});ly.propTypes={data:K.array};const cy=({data:e,flowNames:t})=>y.jsx(Ll,{width:"95%",height:200,children:y.jsxs(eI,{width:500,height:200,data:e,margin:{top:5,right:10,left:20,bottom:20},barCategoryGap:"30%",children:[y.jsx(vc,{strokeDasharray:"3 3"}),y.jsx(pn,{dataKey:"y",label:{value:"Input",position:"insideBottom",offset:0,style:{textAnchor:"middle"}}}),y.jsx(vn,{label:{value:"Tokens",angle:-90,position:"insideLeft",offset:10,style:{textAnchor:"middle"}}}),y.jsx(gt,{}),t.map((r,n)=>y.jsxs(y.Fragment,{children:[y.jsx(er,{dataKey:r+" Prompt",stackId:`${n}_a`,fill:"#2233FF"}),y.jsx(er,{dataKey:r+" Completion",stackId:`${n}_a`,fill:"#82CA9D"})]}))]})});cy.propTypes={data:K.array,flowNames:K.array};const uy=({show:e,dialogProps:t,onClickFunction:r})=>{var s;const n=()=>{},i=xl(l=>l.customization),a=l=>l.type==="text"?'"'+l.value+'"':l.name==="json"?"":l.type==="numeric"?l.value:"",o=l=>{if(l===void 0)return y.jsx(Nr,{size:24});if(t.additionalConfig.chatflowTypes)switch(t.additionalConfig.chatflowTypes[l]){case"Chatflow":return y.jsx(Nr,{size:20});case"Custom Assistant":return y.jsx(od,{size:20});case"Agentflow v2":return y.jsx(ad,{size:20})}return y.jsx(Nr,{})};return y.jsxs(yd,{sx:{zIndex:2e3},anchor:"right",open:e,onClose:()=>r(),onOpen:n,children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid #ccc"},children:[y.jsx(_e,{variant:"overline",sx:{margin:1,fontWeight:"bold"},children:"Evaluation Details"}),y.jsx(ct,{endIcon:y.jsx(Cm,{}),onClick:()=>r()})]}),y.jsxs(We,{sx:{width:600,p:2},role:"presentation",children:[y.jsxs(We,{children:[y.jsx(_e,{variant:"overline",sx:{fontWeight:"bold"},children:"Evaluation Id"}),y.jsx(_e,{variant:"body2",children:t.data.evaluationId})]}),y.jsx("br",{}),y.jsx(Ht,{}),y.jsxs(We,{children:[y.jsx("br",{}),y.jsx(_e,{variant:"overline",sx:{fontWeight:"bold"},children:"Input"}),y.jsx(_e,{variant:"body2",children:t.data.input})]}),y.jsx("br",{}),y.jsx(Ht,{}),y.jsxs(We,{children:[y.jsx("br",{}),y.jsx(_e,{variant:"overline",sx:{fontWeight:"bold"},children:"Expected Output"}),y.jsx(_e,{variant:"body2",children:t.data.expectedOutput})]}),t.data&&((s=t.data.actualOutput)==null?void 0:s.length)>0&&t.data.actualOutput.map((l,c)=>{var f,u,h,d,v,p,m,w,x,O,g,b,S,A,j,k,_,E,T,C,$,N,M,B,R,q,H,Z,V,re,G;return y.jsx(rd,{sx:{mt:2,border:"1px solid #e0e0e0",borderRadius:"15px"},children:y.jsxs(nd,{children:[((f=t.evaluationChatflows)==null?void 0:f.length)>0&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",marginBottom:5},children:[o(c),y.jsx(_e,{variant:"overline",sx:{fontWeight:"bold",fontSize:"1.1rem",marginLeft:1},children:t.evaluationChatflows[c]})]}),y.jsx(Ht,{})]}),y.jsxs(We,{children:[y.jsx("br",{}),y.jsx(_e,{variant:"overline",sx:{fontWeight:"bold"},children:t.data.errors[c]===""?"Actual Output":"Error"}),y.jsx(_e,{variant:"body2",children:t.data.errors[c]===""?t.data.actualOutput[c]:y.jsx(Y,{sx:{height:"auto",backgroundColor:i.isDarkMode?"#4a1c1c":"#ffebee",color:i.isDarkMode?"#ffdbd3":"#d32f2f","& .MuiChip-label":{display:"block",whiteSpace:"normal"},p:1,border:"none"},variant:"outlined",size:"small",label:t.data.errors[c]})})]}),y.jsx("br",{}),y.jsx(Ht,{}),y.jsxs(We,{children:[y.jsx("br",{}),y.jsx(_e,{variant:"overline",style:{fontWeight:"bold"},children:"Latency Metrics"}),y.jsx(_e,{variant:"body2",children:y.jsxs(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:[y.jsx(Y,{variant:"outlined",size:"small",label:(u=t.data.metrics[0])!=null&&u.apiLatency?"API: "+((h=t.data.metrics[c])==null?void 0:h.apiLatency):"API: N/A"}),((d=t.data.metrics[c])==null?void 0:d.chain)&&y.jsx(Y,{variant:"outlined",size:"small",label:"Chain: "+((v=t.data.metrics[c])==null?void 0:v.chain)}),((p=t.data.metrics[c])==null?void 0:p.retriever)&&y.jsx(Y,{variant:"outlined",size:"small",label:"Retriever: "+((m=t.data.metrics[c])==null?void 0:m.retriever)}),((w=t.data.metrics[c])==null?void 0:w.tool)&&y.jsx(Y,{variant:"outlined",size:"small",label:"Retriever: "+((x=t.data.metrics[c])==null?void 0:x.tool)}),y.jsx(Y,{variant:"outlined",size:"small",label:(O=t.data.metrics[c])!=null&&O.llm?"LLM: "+((g=t.data.metrics[c])==null?void 0:g.llm):"LLM: N/A"})]})})]}),y.jsx("br",{}),y.jsx(Ht,{}),y.jsx("br",{}),(b=t.data.metrics[c])!=null&&b.nested_metrics?y.jsxs(We,{children:[y.jsx(_e,{variant:"overline",style:{fontWeight:"bold"},children:"Tokens"}),y.jsxs(aa,{size:"small",style:{border:"1px solid #ccc"},children:[y.jsx(oa,{children:y.jsxs(wt,{children:[y.jsx(J,{align:"left",style:{fontSize:"11px",fontWeight:"bold"},children:"Node"}),y.jsx(J,{align:"left",style:{fontSize:"11px",fontWeight:"bold"},children:"Provider & Model"}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold",width:"15%"},children:"Input"}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold",width:"15%"},children:"Output"}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold",width:"15%"},children:"Total"})]})}),y.jsxs(sa,{style:{fontSize:"8px"},children:[(A=(S=t.data.metrics[c])==null?void 0:S.nested_metrics)==null?void 0:A.map((ne,ve)=>y.jsxs(wt,{children:[y.jsx(J,{component:"th",scope:"row",style:{fontSize:"11px"},children:ne.nodeLabel}),y.jsxs(J,{component:"th",scope:"row",style:{fontSize:"11px"},children:[ne.provider,y.jsx("br",{}),ne.model]}),y.jsx(J,{align:"right",style:{fontSize:"11px"},children:ne.promptTokens}),y.jsx(J,{align:"right",style:{fontSize:"11px"},children:ne.completionTokens}),y.jsx(J,{align:"right",style:{fontSize:"11px"},children:ne.totalTokens})]},ve)),y.jsxs(wt,{children:[y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},component:"th",scope:"row",colspan:2,children:"Total"}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},children:t.data.metrics[c].promptTokens}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},children:t.data.metrics[c].completionTokens}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},children:t.data.metrics[c].totalTokens})]},c)]})]})]}):y.jsxs(We,{children:[y.jsx(_e,{variant:"overline",style:{fontWeight:"bold"},children:"Tokens"}),y.jsx(_e,{variant:"body2",children:y.jsxs(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:[y.jsx(Y,{variant:"outlined",size:"small",label:(j=t.data.metrics[c])!=null&&j.totalTokens?"Total: "+((k=t.data.metrics[c])==null?void 0:k.totalTokens):"Total: N/A"}),y.jsx(Y,{variant:"outlined",size:"small",label:(_=t.data.metrics[c])!=null&&_.promptTokens?"Prompt: "+((E=t.data.metrics[c])==null?void 0:E.promptTokens):"Prompt: N/A"}),y.jsx(Y,{variant:"outlined",size:"small",label:(T=t.data.metrics[c])!=null&&T.completionTokens?"Completion: "+((C=t.data.metrics[c])==null?void 0:C.completionTokens):"Completion: N/A"})]})})]}),y.jsx("br",{}),($=t.data.metrics[c])!=null&&$.nested_metrics?y.jsxs(We,{children:[y.jsx(_e,{variant:"overline",style:{fontWeight:"bold"},children:"Cost"}),y.jsxs(aa,{size:"small",style:{border:"1px solid #ccc"},children:[y.jsx(oa,{children:y.jsxs(wt,{children:[y.jsx(J,{align:"left",style:{fontSize:"11px",fontWeight:"bold"},children:"Node"}),y.jsx(J,{align:"left",style:{fontSize:"11px",fontWeight:"bold"},children:"Provider & Model"}),y.jsx(J,{align:"right",style:{fontSize:"11px",width:"15%",fontWeight:"bold"},children:"Input"}),y.jsx(J,{align:"right",style:{fontSize:"11px",width:"15%",fontWeight:"bold"},children:"Output"}),y.jsx(J,{align:"right",style:{fontSize:"11px",width:"15%",fontWeight:"bold"},children:"Total"})]})}),y.jsxs(sa,{style:{fontSize:"8px"},children:[(M=(N=t.data.metrics[c])==null?void 0:N.nested_metrics)==null?void 0:M.map((ne,ve)=>y.jsxs(wt,{children:[y.jsx(J,{component:"th",scope:"row",style:{fontSize:"11px"},children:ne.nodeLabel}),y.jsxs(J,{component:"th",scope:"row",style:{fontSize:"11px"},children:[ne.provider," ",y.jsx("br",{}),ne.model]}),y.jsx(J,{align:"right",style:{fontSize:"11px"},children:ne.promptCost}),y.jsx(J,{align:"right",style:{fontSize:"11px"},children:ne.completionCost}),y.jsx(J,{align:"right",style:{fontSize:"11px"},children:ne.totalCost})]},ve)),y.jsxs(wt,{children:[y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},component:"th",scope:"row",colspan:2,children:"Total"}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},children:t.data.metrics[c].promptCost}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},children:t.data.metrics[c].completionCost}),y.jsx(J,{align:"right",style:{fontSize:"11px",fontWeight:"bold"},children:t.data.metrics[c].totalCost})]},c)]})]})]}):y.jsxs(We,{children:[y.jsx(_e,{variant:"overline",style:{fontWeight:"bold"},children:"Cost"}),y.jsx(_e,{variant:"body2",children:y.jsxs(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:[y.jsx(Y,{variant:"outlined",size:"small",label:(B=t.data.metrics[c])!=null&&B.totalCost?"Total: "+((R=t.data.metrics[c])==null?void 0:R.totalCost):"Total: N/A"}),y.jsx(Y,{variant:"outlined",size:"small",label:(q=t.data.metrics[c])!=null&&q.promptCost?"Prompt: "+((H=t.data.metrics[c])==null?void 0:H.promptCost):"Completion: N/A"}),y.jsx(Y,{variant:"outlined",size:"small",label:(Z=t.data.metrics[c])!=null&&Z.completionCost?"Completion: "+((V=t.data.metrics[c])==null?void 0:V.completionCost):"Completion: N/A"})]})})]}),y.jsx("br",{}),y.jsx(Ht,{}),y.jsx("br",{}),((re=t.data)==null?void 0:re.customEvals)&&((G=t.data)==null?void 0:G.customEvals[c])&&t.data.customEvals[c].length>0&&y.jsxs(We,{children:[y.jsx(_e,{variant:"overline",style:{fontWeight:"bold"},children:"Custom Evaluators"}),y.jsx(We,{children:t.data.customEvals[c]&&t.data.customEvals[c].map((ne,ve)=>{var ye,Ue;return y.jsxs(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:[y.jsx(Y,{variant:"contained",sx:{width:"max-content",color:"white",backgroundColor:ne.result==="Pass"?"#00c853":"#ff1744"},size:"small",label:ne.result}),y.jsx(Y,{sx:{width:"max-content"},variant:"outlined",size:"small",label:`Evaluator: ${ne.name}`}),y.jsx(Y,{sx:{width:"max-content"},variant:"outlined",size:"small",label:`${((ye=[...Ic,...Dc].find(W=>W.name===ne.measure))==null?void 0:ye.label)||"Actual Output"} ${((Ue=[...Ic,...Dc].find(W=>W.name===ne.operator))==null?void 0:Ue.label.toLowerCase())||"<empty>"} ${a(ne)}`})]},ve)})})]}),(t==null?void 0:t.evaluationType)==="llm"&&y.jsxs(y.Fragment,{children:[y.jsx("br",{}),y.jsx(Ht,{}),y.jsxs(We,{children:[y.jsx("br",{}),y.jsx(_e,{variant:"overline",sx:{fontWeight:"bold"},children:"LLM Graded"}),y.jsx(Be,{flexDirection:"row",gap:1,sx:{alignItems:"center",flexWrap:"wrap"},children:Object.entries(t.data.llmEvaluators[c]).map(([ne,ve],ye)=>y.jsx(Y,{variant:"outlined",size:"small",color:"primary",sx:{height:"auto","& .MuiChip-label":{display:"block",whiteSpace:"normal"},p:.5},label:y.jsxs("span",{children:[y.jsx("b",{children:ne}),": ",ve]})},ye))})]})]})]})},indexedDB)})]})]})};uy.propTypes={show:K.bool,dialogProps:K.object,onClickFunction:K.func};const fy=({show:e,dialogProps:t,onClickFunction:r,onSelectVersion:n})=>{const i=()=>{},[a,o]=I.useState([]),s=ta(ra.getVersions);I.useEffect(()=>{s.request(t.id)},[t]),I.useEffect(()=>{s.data&&o(s.data.versions)},[s.data]);const l=c=>{n(c)};return y.jsxs(yd,{anchor:"right",open:e,onClose:()=>r(),onOpen:i,children:[y.jsx(ct,{startIcon:y.jsx(bm,{}),onClick:()=>r(),children:"Close"}),y.jsx(We,{style:{width:350,margin:10},role:"presentation",onClick:r,children:y.jsx(xm,{sx:{[`& .${Tm.root}`]:{flex:1}},children:a&&a.map((c,f)=>y.jsxs(wm,{children:[y.jsx(Om,{color:"textSecondary",children:Py(c.runDate).format("DD-MMM-YYYY, hh:mm:ss A")}),y.jsxs(Sm,{style:{marginTop:5},children:[y.jsx(Am,{}),f!==a.length-1&&y.jsx(jm,{})]}),y.jsx(Pm,{children:y.jsxs(ct,{onClick:()=>l(`${c.id}`),children:["Version ",c.version]})})]},f))})})]})};fy.propTypes={show:K.bool,dialogProps:K.object,onClickFunction:K.func,onSelectVersion:K.func};const hy=({show:e,dialogProps:t,onCancel:r,openDetailsDrawer:n})=>{var f,u,h;const i=document.getElementById("portal"),a=xl(d=>d.customization),o=sd(),s=(d,v)=>{let p=1;return d&&p++,v&&p++,p},l=d=>{var v,p;if(d===void 0)return"";if((p=(v=t.data)==null?void 0:v.additionalConfig)!=null&&p.chatflowTypes)switch(t.data.additionalConfig.chatflowTypes[d]){case"Chatflow":return"/canvas/"+t.data.evaluation.chatflowId[d];case"Custom Assistant":return"/assistants/custom/"+t.data.evaluation.chatflowId[d];case"Agentflow v2":return"/v2/agentcanvas/"+t.data.evaluation.chatflowId[d]}return"/canvas/"+t.data.evaluation.chatflowId[d]},c=e?y.jsxs(Ty,{fullScreen:!0,open:e,onClose:r,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsx(_y,{id:"alert-dialog-title",children:y.jsxs(Be,{direction:"row",justifyContent:"space-between",children:[t.data&&((f=t.data.evaluation.chatflowName)==null?void 0:f.length)>0&&y.jsxs(Be,{flexDirection:"row",sx:{gap:1,alignItems:"center",flexWrap:"wrap"},children:[y.jsxs("div",{style:{paddingLeft:"15px",paddingRight:"15px",paddingTop:"10px",paddingBottom:"10px",fontSize:"0.9rem",width:"max-content",display:"flex",flexDirection:"row",alignItems:"center"},children:[y.jsx(ld,{style:{marginRight:5},size:17}),"Flows Used:"]}),(t.data.evaluation.chatflowName||[]).map((d,v)=>y.jsx(Y,{clickable:!0,style:{width:"max-content",borderRadius:"25px",boxShadow:a.isDarkMode?"0 2px 14px 0 rgb(255 255 255 / 10%)":"0 2px 14px 0 rgb(32 40 45 / 10%)"},label:d,onClick:()=>window.open(l(v),"_blank")},v))]}),y.jsx(ct,{variant:"outlined",sx:{width:"max-content"},startIcon:y.jsx(Em,{}),onClick:()=>r(),children:"Minimize"})]})}),y.jsx(Ey,{children:y.jsx(cd,{sx:{height:"calc(100vh - 100px)",marginTop:1,border:1,borderColor:o.palette.grey[900]+25,borderRadius:2},component:ud,children:y.jsxs(aa,{sx:{minWidth:650},children:[y.jsxs(oa,{sx:{backgroundColor:a.isDarkMode?o.palette.common.black:o.palette.grey[100],height:16},children:[y.jsxs(wt,{children:[y.jsx(J,{rowSpan:"2",children:" "}),y.jsx(J,{rowSpan:"2",children:"Input"}),y.jsx(J,{rowSpan:"2",children:"Expected Output"}),t.data&&((u=t.data.evaluation.chatflowId)==null?void 0:u.map((d,v)=>{var p;return y.jsx(P.Fragment,{children:y.jsxs(J,{colSpan:s(t.data.customEvalsDefined&&t.data.showCustomEvals,((p=t.data.evaluation)==null?void 0:p.evaluationType)==="llm"),style:{borderLeftStyle:"dashed",borderLeftColor:"lightgrey",borderLeftWidth:1},children:[t.data.evaluation.chatflowName[v],t.data.rows.length>0&&t.data.rows[0].metrics[v].model&&y.jsx(Y,{variant:"outlined",icon:y.jsx(jl,{}),color:"info",size:"small",label:t.data.rows[0].metrics[v].model+(t.data.rows[0].metrics[v].provider?" ["+t.data.rows[0].metrics[v].provider+"]":""),sx:{ml:2}})]})},v)}))]}),y.jsx(wt,{children:t.data&&((h=t.data.evaluation.chatflowId)==null?void 0:h.map((d,v)=>{var p;return y.jsxs(P.Fragment,{children:[y.jsx(J,{style:{borderLeftStyle:"dashed",borderLeftColor:"lightgrey",borderLeftWidth:1},children:"Actual Output"}),t.data.customEvalsDefined&&t.data.showCustomEvals&&y.jsx(J,{children:"Evaluator"}),((p=t.data.evaluation)==null?void 0:p.evaluationType)==="llm"&&y.jsx(J,{children:"LLM Evaluation"})]},v)}))})]}),y.jsx(sa,{children:y.jsx(y.Fragment,{children:t.data&&t.data.rows.length>0&&t.data.rows.map((d,v)=>{var p;return y.jsxs(rs,{onClick:()=>n(d),hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},children:[y.jsx(Ot,{sx:{width:2},children:v+1}),y.jsx(Ot,{sx:{minWidth:"250px"},children:d.input}),y.jsx(Ot,{sx:{minWidth:"250px"},children:d.expectedOutput}),(p=t.data.evaluation.chatflowId)==null?void 0:p.map((m,w)=>{var x,O,g,b,S,A,j,k,_,E,T,C,$,N,M,B,R,q,H,Z,V,re,G,ne;return y.jsxs(P.Fragment,{children:[y.jsx(J,{style:{minWidth:"350px",borderLeftStyle:"dashed",borderLeftColor:"lightgrey",borderLeftWidth:1},children:d.errors[w]===""?y.jsxs(y.Fragment,{children:[y.jsx("div",{style:{padding:2,marginBottom:5},children:d.actualOutput[w]}),y.jsxs(Be,{flexDirection:"row",sx:{mt:2,alignItems:"center",flexWrap:"wrap"},children:[y.jsx(Y,{variant:"outlined",icon:y.jsx(vr,{}),size:"small",label:(x=d.metrics[w])!=null&&x.totalCost?"Total Cost: "+((O=d.metrics[w])==null?void 0:O.totalCost):"Total Cost: N/A",sx:{mr:1,mb:1}}),y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(Zt,{}),label:(g=d.metrics[w])!=null&&g.totalTokens?"Total Tokens: "+((b=d.metrics[w])==null?void 0:b.totalTokens):"Total Tokens: N/A",sx:{mr:1,mb:1}}),t.data.showTokenMetrics&&y.jsxs(y.Fragment,{children:[y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(Zt,{}),label:(S=d.metrics[w])!=null&&S.promptTokens?"Prompt Tokens: "+((A=d.metrics[w])==null?void 0:A.promptTokens):"Prompt Tokens: N/A",sx:{mr:1,mb:1}})," ",y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(Zt,{}),label:(j=d.metrics[w])!=null&&j.completionTokens?"Completion Tokens: "+((k=d.metrics[w])==null?void 0:k.completionTokens):"Completion Tokens: N/A",sx:{mr:1,mb:1}})," "]}),t.data.showCostMetrics&&y.jsxs(y.Fragment,{children:[y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(vr,{}),label:(_=d.metrics[w])!=null&&_.promptCost?"Prompt Cost: "+((E=d.metrics[w])==null?void 0:E.promptCost):"Prompt Cost: N/A",sx:{mr:1,mb:1}})," ",y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(vr,{}),label:(T=d.metrics[w])!=null&&T.completionCost?"Completion Cost: "+((C=d.metrics[w])==null?void 0:C.completionCost):"Completion Cost: N/A",sx:{mr:1,mb:1}})," "]}),y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(ut,{}),label:($=d.metrics[w])!=null&&$.apiLatency?"API Latency: "+((N=d.metrics[w])==null?void 0:N.apiLatency):"API Latency: N/A",sx:{mr:1,mb:1}})," ",t.data.showLatencyMetrics&&y.jsxs(y.Fragment,{children:[((M=d.metrics[w])==null?void 0:M.chain)&&y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(ut,{}),label:(B=d.metrics[w])!=null&&B.chain?"Chain Latency: "+((R=d.metrics[w])==null?void 0:R.chain):"Chain Latency: N/A",sx:{mr:1,mb:1}})," ",((q=d.metrics[w])==null?void 0:q.retriever)&&y.jsx(Y,{variant:"outlined",icon:y.jsx(ut,{}),size:"small",sx:{mr:1,mb:1},label:"Retriever Latency: "+((H=d.metrics[w])==null?void 0:H.retriever)})," ",((Z=d.metrics[w])==null?void 0:Z.tool)&&y.jsx(Y,{variant:"outlined",icon:y.jsx(ut,{}),size:"small",sx:{mr:1,mb:1},label:"Tool Latency: "+((V=d.metrics[w])==null?void 0:V.tool)})," ",y.jsx(Y,{variant:"outlined",icon:y.jsx(ut,{}),size:"small",label:(re=d.metrics[w])!=null&&re.llm?"LLM Latency: "+((G=d.metrics[w])==null?void 0:G.llm):"LLM Latency: N/A",sx:{mr:1,mb:1}})," "]})]})]}):y.jsx(Y,{sx:{height:"auto",backgroundColor:a.isDarkMode?"#4a1c1c":"#ffebee",color:a.isDarkMode?"#ffdbd3":"#d32f2f","& .MuiChip-label":{display:"block",whiteSpace:"normal"},p:1,border:"none"},variant:"outlined",size:"small",label:d.errors[w]})}),t.data.customEvalsDefined&&t.data.showCustomEvals&&y.jsx(Ot,{children:(d.customEvals[w]||[]).map((ve,ye)=>y.jsx(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:y.jsx(Y,{sx:{width:"max-content",color:ve.result==="Error"?"black":"white",backgroundColor:ve.result==="Pass"?"#00c853":ve.result==="Fail"?"#ff1744":"#ffe57f"},variant:"contained",size:"small",label:`${ve.name}`})},ye))}),((ne=t.data.evaluation)==null?void 0:ne.evaluationType)==="llm"&&y.jsx(Ot,{sx:{minWidth:"350px"},children:d.llmEvaluators[w]&&y.jsx(Be,{flexDirection:"row",gap:1,sx:{alignItems:"center",flexWrap:"wrap"},children:Object.entries(d.llmEvaluators[w]).map(([ve,ye],Ue)=>y.jsx(Y,{variant:"outlined",size:"small",color:"primary",sx:{height:"auto","& .MuiChip-label":{display:"block",whiteSpace:"normal"},p:.5},label:y.jsxs("span",{children:[y.jsx("b",{children:ve}),": ",ye]})},Ue))})})]},w)})]},v)})})})]})})})]}):null;return ky.createPortal(c,i)};hy.propTypes={show:K.bool,dialogProps:K.object,onCancel:K.func,openDetailsDrawer:K.func};const cI=()=>{var gc,bc,xc,wc,Oc,Sc,Ac,jc,Pc,Tc;const e=$y(),t=sd(),r=xl(F=>F.customization),{confirm:n}=Cy(),i=My();Iy();const{error:a}=Dy(),o=(...F)=>i(Vy(...F)),s=(...F)=>i(Hy(...F)),[l,c]=I.useState([]),[f,u]=I.useState(""),[h,d]=I.useState({}),[v,p]=I.useState(!1),[m,w]=I.useState(!1),[x,O]=I.useState(!1),[g,b]=I.useState(!1),[S,A]=I.useState(!0),[j,k]=I.useState([]),[_,E]=I.useState([]),[T,C]=I.useState([]),[$,N]=I.useState(),[M,B]=I.useState(!1),[R,q]=I.useState({}),[H,Z]=I.useState(!1),[V,re]=I.useState({}),[G,ne]=I.useState(null),ve=ta(ra.getEvaluation),ye=ta(ra.getIsOutdated),Ue=ta(ra.runAgain),[W,ee]=I.useState(!1),[ae,L]=I.useState(!1),[je,ue]=I.useState({}),[Te,Pe]=I.useState(!1),[ke,yt]=I.useState({}),ir=F=>{q({type:"View",data:F,additionalConfig:ke,evaluationType:h.evaluationType,evaluationChatflows:h.chatflowName}),B(!0)},$t=()=>{B(!1)},Ct=()=>{re({id:h==null?void 0:h.id}),Z(!0)},yn=()=>{Z(!1)},Wi=()=>{A(!S)},Fi=()=>{O(!x)},dy=()=>{w(!m)},py=()=>{b(!g)},vy=()=>{p(!v)},yy=()=>{ue({data:{evaluation:h,rows:l,customEvalsDefined:W,showCustomEvals:g,showTokenMetrics:x,showLatencyMetrics:m,showCostMetrics:v,additionalConfig:ke}}),L(!0)},my=async()=>{const F={title:"Run Again",description:`Initiate Rerun for Evaluation ${h.name}?`,confirmButtonName:"Yes",cancelButtonName:"No"};await n(F)&&(Ue.request(h==null?void 0:h.id),o({message:"Evaluation '"+h.name+"' is running. Redirecting to evaluations page.",options:{key:new Date().getTime()+Math.random(),variant:"success",action:Ze=>y.jsx(ct,{style:{color:"white"},onClick:()=>s(Ze),children:y.jsx(Nc,{})})}}),e("/evaluations"))},Ui=document.location.pathname.toString().split("/"),gy=Ui[Ui.length-1]==="evaluation_rows"?"":Ui[Ui.length-1],by=()=>{e("/evaluations")},xy=(F,me)=>{let Ze=1;return F&&Ze++,me&&Ze++,Ze};I.useEffect(()=>{ve.request(gy)},[]),I.useEffect(()=>{Pe(ve.loading)},[ve.loading]),I.useEffect(()=>{ye.data&&ye.data.isOutdated&&ne(ye.data)},[ye.data]),I.useEffect(()=>{var F,me,Ze,mn,fe,gn,bn,xn,wn,On,Sn;if(ve.data){const se=ve.data;u(se.name),ye.request(se.id),se.additionalConfig&&yt(JSON.parse(se.additionalConfig)),se.chatflowId=typeof se.chatflowId=="object"?se.chatflowId:JSON.parse(se.chatflowId),se.chatflowName=typeof se.chatflowName=="object"?se.chatflowName:JSON.parse(se.chatflowName);const ce=ve.data.rows,An=[],jn=[];let Pn=0;for(let le=0;le<ce.length;le++){ce[le].metrics=typeof ce[le].metrics=="object"?ce[le].metrics:JSON.parse(ce[le].metrics),ce[le].actualOutput=typeof ce[le].actualOutput=="object"?ce[le].actualOutput:JSON.parse(ce[le].actualOutput),ce[le].customEvals=typeof ce[le].evaluators=="object"?ce[le].evaluators:JSON.parse(ce[le].evaluators||[]);const Tn={y:le+1},jr={y:le+1};for(let Je=0;Je<ce[le].metrics.length;Je++)((F=ce[le].metrics[Je])==null?void 0:F.apiLatency)>0&&(Tn[se.chatflowName[Je]]=parseFloat((me=ce[le].metrics[Je])==null?void 0:me.apiLatency,10)),(Ze=ce[le].metrics[Je])!=null&&Ze.totalTokens&&(Pn+=(mn=ce[le].metrics[Je])==null?void 0:mn.totalTokens,jr[se.chatflowName[Je]+" Prompt"]=(fe=ce[le].metrics[Je])==null?void 0:fe.promptTokens,jr[se.chatflowName[Je]+" Completion"]=(gn=ce[le].metrics[Je])==null?void 0:gn.completionTokens);An.push(Tn),jn.push(jr),ce[le].llmEvaluators&&(ce[le].llmEvaluators=typeof ce[le].llmEvaluators=="object"?ce[le].llmEvaluators:JSON.parse(ce[le].llmEvaluators||[])),ce[le].errors&&typeof ce[le].errors=="string"&&ce[le].errors.startsWith("[")&&ce[le].errors.endsWith("]")&&(ce[le].errors=JSON.parse(ce[le].errors)||[])}c(ce),k(An),E(jn);const Vt=se;Vt.average_metrics=typeof Vt.average_metrics=="object"?Vt.average_metrics:JSON.parse(Vt.average_metrics);const ar=[];ee(((bn=se==null?void 0:se.average_metrics)==null?void 0:bn.passPcnt)>=0),b(((xn=se==null?void 0:se.average_metrics)==null?void 0:xn.passPcnt)>=0),((wn=se==null?void 0:se.average_metrics)==null?void 0:wn.passCount)>=0&&ar.push({name:"Pass",value:se.average_metrics.passCount}),((On=se==null?void 0:se.average_metrics)==null?void 0:On.failCount)>=0&&ar.push({name:"Fail",value:se.average_metrics.failCount}),((Sn=se==null?void 0:se.average_metrics)==null?void 0:Sn.errorCount)>=0&&ar.push({name:"Error",value:se.average_metrics.errorCount}),C(ar),N((Pn/ce.length).toFixed(2)),d(Vt)}},[ve.data]);const mc=F=>{var Ze;if(F===void 0)return;const me=h.chatflowId[F];if(!(((Ze=G==null?void 0:G.errors)==null?void 0:Ze.length)>0&&G.errors.find(mn=>mn.id===me))){if(ke.chatflowTypes)switch(ke.chatflowTypes[F]){case"Chatflow":return"/canvas/"+h.chatflowId[F];case"Custom Assistant":return"/assistants/custom/"+h.chatflowId[F];case"Agentflow v2":return"/v2/agentcanvas/"+h.chatflowId[F]}return"/canvas/"+h.chatflowId[F]}},wy=F=>{mc(F)&&window.open(mc(F),"_blank")},Oy=F=>{if(F===void 0)return y.jsx(Nr,{size:17});if(ke.chatflowTypes)switch(ke.chatflowTypes[F]){case"Chatflow":return y.jsx(Nr,{size:17});case"Custom Assistant":return y.jsx(od,{size:17});case"Agentflow v2":return y.jsx(ad,{size:17})}return y.jsx(Nr,{})};return y.jsxs(y.Fragment,{children:[y.jsx(id,{children:a?y.jsx(Ny,{error:a}):y.jsxs(Be,{flexDirection:"column",sx:{gap:3},children:[y.jsxs(Ly,{isBackButton:!0,isEditButton:!1,onBack:by,search:!1,title:"Evaluation: "+f,description:h!=null&&h.runDate?By(h==null?void 0:h.runDate).format("DD-MMM-YYYY, hh:mm:ss A"):"",children:[(h==null?void 0:h.versionCount)>1&&y.jsx(Y,{variant:"outlined",size:"small",label:"Version: "+h.versionNo+"/"+h.versionCount}),(h==null?void 0:h.versionCount)>1&&y.jsx(ct,{sx:{borderRadius:2},startIcon:y.jsx(Ry,{}),variant:"outlined",color:"primary",onClick:Ct,children:"Version history"}),y.jsx(zy,{permissionId:"evaluations:run",sx:{borderRadius:2},startIcon:y.jsx($m,{}),variant:"contained",color:"primary",disabled:((gc=G==null?void 0:G.errors)==null?void 0:gc.length)>0,onClick:my,children:"Re-run Evaluation"})]}),y.jsx(Ht,{}),G&&y.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"row",alignItems:"center",borderRadius:10,background:"rgb(254,252,191)",padding:10,paddingTop:15,marginTop:10,marginBottom:10},children:[y.jsx(We,{sx:{p:2},children:y.jsx(Wy,{size:25,color:"orange"})}),y.jsxs(Be,{flexDirection:"column",children:[y.jsxs("span",{style:{color:"rgb(116,66,16)"},children:[((bc=G==null?void 0:G.errors)==null?void 0:bc.length)>0&&y.jsx("b",{children:"This evaluation cannot be re-run, due to the following errors"}),((xc=G==null?void 0:G.errors)==null?void 0:xc.length)===0&&y.jsx("b",{children:"The following items are outdated, re-run the evaluation for the latest results."})]}),G.dataset&&((wc=G==null?void 0:G.errors)==null?void 0:wc.length)===0&&y.jsxs(y.Fragment,{children:[y.jsx("br",{}),y.jsx("b",{style:{color:"rgb(116,66,16)"},children:"Dataset:"}),y.jsx(Y,{clickable:!0,sx:{color:"rgb(116,66,16)",mt:1,width:"max-content",borderRadius:"25px",boxShadow:r.isDarkMode?"0 2px 14px 0 rgb(255 255 255 / 10%)":"0 2px 14px 0 rgb(32 40 45 / 10%)"},variant:"outlined",label:G.dataset.name,onClick:()=>window.open(`/dataset_rows/${G.dataset.id}`,"_blank")})]}),G.chatflows&&((Oc=G==null?void 0:G.errors)==null?void 0:Oc.length)===0&&G.chatflows.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("br",{}),y.jsx("b",{style:{color:"rgb(116,66,16)"},children:"Flows:"}),y.jsx(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:G.chatflows.map((F,me)=>y.jsx(Y,{clickable:!0,style:{color:"rgb(116,66,16)",mt:1,width:"max-content",borderRadius:"25px",boxShadow:r.isDarkMode?"0 2px 14px 0 rgb(255 255 255 / 10%)":"0 2px 14px 0 rgb(32 40 45 / 10%)"},variant:"outlined",label:F.chatflowName,onClick:()=>window.open(F.chatflowType==="Chatflow"?"/canvas/"+F.chatflowId:F.chatflowType==="Custom Assistant"?"/assistants/custom/"+F.chatflowId:"/v2/agentcanvas/"+F.chatflowId,"_blank")},me))})]}),G.errors.length>0&&G.errors.map((F,me)=>y.jsx(Fy,{children:F.message},me)),y.jsx(Uy,{style:{position:"absolute",top:10,right:10},size:"small",color:"inherit",onClick:()=>ne(null),children:y.jsx(Nc,{color:"rgb(116,66,16)"})})]})]}),y.jsxs(qy,{children:[y.jsx(ct,{variant:"outlined",value:S,title:"Show Charts",onClick:Wi,startIcon:S?y.jsx(_n,{}):y.jsx(En,{}),children:"Charts"}),W&&y.jsx(ct,{variant:"outlined",value:g,disabled:!W,title:"Show Custom Evaluator",onClick:py,startIcon:g?y.jsx(_n,{}):y.jsx(En,{}),children:"Custom Evaluator"}),y.jsx(ct,{variant:"outlined",value:v,title:"Show Cost Metrics",onClick:vy,startIcon:v?y.jsx(_n,{}):y.jsx(En,{}),children:"Cost Metrics"}),y.jsx(ct,{variant:"outlined",value:x,title:"Show Metrics",onClick:Fi,startIcon:x?y.jsx(_n,{}):y.jsx(En,{}),children:"Token Metrics"}),y.jsx(ct,{variant:"outlined",value:g,title:"Show Latency Metrics",onClick:dy,startIcon:m?y.jsx(_n,{}):y.jsx(En,{}),children:"Latency Metrics"})]}),S&&y.jsxs(Ke,{container:!0,spacing:2,children:[W&&y.jsx(Ke,{item:!0,xs:12,sm:12,md:4,lg:4,children:y.jsx(na,{data:{header:"PASS RATE",value:(((Sc=h.average_metrics)==null?void 0:Sc.passPcnt)??"0")+"%",icon:y.jsx(km,{})},component:y.jsx(ly,{data:T,sx:{pt:2}})})}),$!==void 0&&!isNaN($)&&y.jsx(Ke,{item:!0,xs:12,sm:12,md:4,lg:4,children:y.jsx(na,{data:{header:"TOKENS USED",value:$,icon:y.jsx(Zt,{})},component:y.jsx(cy,{data:_,flowNames:h.chatflowName||[],sx:{pt:2}})})}),((Ac=h.average_metrics)==null?void 0:Ac.averageLatency)!==void 0&&y.jsx(Ke,{item:!0,xs:12,sm:12,md:4,lg:4,children:y.jsx(na,{data:{header:"LATENCY (ms)",value:(((jc=h.average_metrics)==null?void 0:jc.averageLatency)??"0")+" ms",icon:y.jsx(ut,{})},component:y.jsx(sy,{data:j,flowNames:h.chatflowName||[],sx:{pt:2}})})})]}),y.jsxs(Be,{direction:"row",justifyContent:"space-between",children:[y.jsxs(Be,{flexDirection:"row",sx:{gap:1,alignItems:"center",flexWrap:"wrap"},children:[y.jsxs("div",{style:{paddingLeft:"15px",paddingRight:"15px",paddingTop:"10px",paddingBottom:"10px",fontSize:"0.9rem",width:"max-content",display:"flex",flexDirection:"row",alignItems:"center"},children:[y.jsx(ld,{style:{marginRight:5},size:17}),"Flows Used:"]}),(h.chatflowName||[]).map((F,me)=>y.jsx(Y,{icon:Oy(me),clickable:!0,style:{width:"max-content",borderRadius:"25px",boxShadow:r.isDarkMode?"0 2px 14px 0 rgb(255 255 255 / 10%)":"0 2px 14px 0 rgb(32 40 45 / 10%)"},label:F,onClick:()=>wy(me)},me))]}),y.jsx(ct,{variant:"outlined",sx:{width:"max-content"},startIcon:y.jsx(_m,{}),onClick:()=>yy(),children:"Expand"})]}),y.jsx(cd,{sx:{border:1,borderColor:t.palette.grey[900]+25,borderRadius:2},component:ud,children:y.jsxs(aa,{sx:{minWidth:650},children:[y.jsxs(oa,{sx:{backgroundColor:r.isDarkMode?t.palette.common.black:t.palette.grey[100]},children:[y.jsxs(wt,{children:[y.jsx(J,{rowSpan:"2",children:" "}),y.jsx(J,{rowSpan:"2",children:"Input"}),y.jsx(J,{rowSpan:"2",children:"Expected Output"}),(Pc=h.chatflowId)==null?void 0:Pc.map((F,me)=>y.jsx(P.Fragment,{children:y.jsxs(J,{colSpan:xy(W&&g,(h==null?void 0:h.evaluationType)==="llm"),style:{borderLeftStyle:"dotted",borderLeftColor:"lightgrey",borderLeftWidth:1},children:[h.chatflowName[me],l.length>0&&l[0].metrics[me].model&&y.jsx(Y,{variant:"outlined",icon:y.jsx(jl,{}),color:"info",size:"small",label:l[0].metrics[me].model+(l[0].metrics[me].provider?" ["+l[0].metrics[me].provider+"]":""),sx:{ml:2}})]})},me))]}),y.jsx(wt,{children:(Tc=h.chatflowId)==null?void 0:Tc.map((F,me)=>y.jsxs(P.Fragment,{children:[y.jsx(J,{style:{borderLeftStyle:"dashed",borderLeftColor:"lightgrey",borderLeftWidth:1},children:"Actual Output"}),W&&g&&y.jsx(J,{children:"Evaluator"}),(h==null?void 0:h.evaluationType)==="llm"&&y.jsx(J,{children:"LLM Evaluation"})]},me))})]}),y.jsx(sa,{children:Te?y.jsxs(y.Fragment,{children:[y.jsxs(rs,{children:[y.jsx(Ot,{sx:{width:2},children:y.jsx(Pt,{variant:"text"})}),y.jsx(Ot,{children:y.jsx(Pt,{variant:"text"})}),y.jsx(Ot,{children:y.jsx(Pt,{variant:"text"})})]}),y.jsxs(rs,{children:[y.jsx(Ot,{sx:{width:2},children:y.jsx(Pt,{variant:"text"})}),y.jsx(Ot,{children:y.jsx(Pt,{variant:"text"})}),y.jsx(Ot,{children:y.jsx(Pt,{variant:"text"})})]})]}):y.jsx(y.Fragment,{children:l.length>0&&l.map((F,me)=>{var Ze;return y.jsxs(wt,{onClick:()=>ir(F),hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},children:[y.jsx(J,{style:{width:2},children:me+1}),y.jsx(J,{style:{minWidth:"250px"},children:F.input}),y.jsx(J,{style:{minWidth:"250px"},children:F.expectedOutput}),(Ze=h.chatflowId)==null?void 0:Ze.map((mn,fe)=>{var gn,bn,xn,wn,On,Sn,se,ce,An,jn,Pn,Vt,ar,le,Tn,jr,Je,_c,Ec,kc,$c,Cc,Mc;return y.jsxs(P.Fragment,{children:[y.jsx(J,{style:{minWidth:"350px",borderLeftStyle:"dashed",borderLeftColor:"lightgrey",borderLeftWidth:1},children:F.errors[fe]===""?y.jsxs(y.Fragment,{children:[y.jsx("div",{style:{padding:2,marginBottom:5},children:F.actualOutput[fe]}),y.jsxs(Be,{flexDirection:"row",sx:{mt:2,alignItems:"center",flexWrap:"wrap"},children:[y.jsx(Y,{variant:"outlined",icon:y.jsx(vr,{}),size:"small",label:(gn=F.metrics[fe])!=null&&gn.totalCost?"Total Cost: "+((bn=F.metrics[fe])==null?void 0:bn.totalCost):"Total Cost: N/A",sx:{mr:1,mb:1}}),y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(Zt,{}),label:(xn=F.metrics[fe])!=null&&xn.totalTokens?"Total Tokens: "+((wn=F.metrics[fe])==null?void 0:wn.totalTokens):"Total Tokens: N/A",sx:{mr:1,mb:1}}),x&&y.jsxs(y.Fragment,{children:[y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(Zt,{}),label:(On=F.metrics[fe])!=null&&On.promptTokens?"Prompt Tokens: "+((Sn=F.metrics[fe])==null?void 0:Sn.promptTokens):"Prompt Tokens: N/A",sx:{mr:1,mb:1}})," ",y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(Zt,{}),label:(se=F.metrics[fe])!=null&&se.completionTokens?"Completion Tokens: "+((ce=F.metrics[fe])==null?void 0:ce.completionTokens):"Completion Tokens: N/A",sx:{mr:1,mb:1}})," "]}),v&&y.jsxs(y.Fragment,{children:[y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(vr,{}),label:(An=F.metrics[fe])!=null&&An.promptCost?"Prompt Cost: "+((jn=F.metrics[fe])==null?void 0:jn.promptCost):"Prompt Cost: N/A",sx:{mr:1,mb:1}})," ",y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(vr,{}),label:(Pn=F.metrics[fe])!=null&&Pn.completionCost?"Completion Cost: "+((Vt=F.metrics[fe])==null?void 0:Vt.completionCost):"Completion Cost: N/A",sx:{mr:1,mb:1}})," "]}),y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(ut,{}),label:(ar=F.metrics[fe])!=null&&ar.apiLatency?"API Latency: "+((le=F.metrics[fe])==null?void 0:le.apiLatency):"API Latency: N/A",sx:{mr:1,mb:1}})," ",m&&y.jsxs(y.Fragment,{children:[((Tn=F.metrics[fe])==null?void 0:Tn.chain)&&y.jsx(Y,{variant:"outlined",size:"small",icon:y.jsx(ut,{}),label:(jr=F.metrics[fe])!=null&&jr.chain?"Chain Latency: "+((Je=F.metrics[fe])==null?void 0:Je.chain):"Chain Latency: N/A",sx:{mr:1,mb:1}})," ",((_c=F.metrics[fe])==null?void 0:_c.retriever)&&y.jsx(Y,{variant:"outlined",icon:y.jsx(ut,{}),size:"small",sx:{mr:1,mb:1},label:"Retriever Latency: "+((Ec=F.metrics[fe])==null?void 0:Ec.retriever)})," ",((kc=F.metrics[fe])==null?void 0:kc.tool)&&y.jsx(Y,{variant:"outlined",icon:y.jsx(ut,{}),size:"small",sx:{mr:1,mb:1},label:"Tool Latency: "+(($c=F.metrics[fe])==null?void 0:$c.tool)})," ",y.jsx(Y,{variant:"outlined",icon:y.jsx(ut,{}),size:"small",label:(Cc=F.metrics[fe])!=null&&Cc.llm?"LLM Latency: "+((Mc=F.metrics[fe])==null?void 0:Mc.llm):"LLM Latency: N/A",sx:{mr:1,mb:1}})," "]})]})]}):y.jsx(Y,{sx:{height:"auto",backgroundColor:r.isDarkMode?"#4a1c1c":"#ffebee",color:r.isDarkMode?"#ffdbd3":"#d32f2f","& .MuiChip-label":{display:"block",whiteSpace:"normal"},p:1,border:"none"},variant:"outlined",size:"small",label:F.errors[fe]})}),W&&g&&y.jsx(J,{children:(F.customEvals[fe]||[]).map((Pr,Eo)=>y.jsx(Be,{sx:{mt:1,alignItems:"center",flexWrap:"wrap"},flexDirection:"row",gap:1,children:y.jsx(Y,{sx:{width:"max-content",color:Pr.result==="Error"?"black":"white",backgroundColor:Pr.result==="Pass"?"#00c853":Pr.result==="Fail"?"#ff1744":"#ffe57f"},variant:"contained",size:"small",label:`${Pr.name}`})},Eo))}),(h==null?void 0:h.evaluationType)==="llm"&&y.jsx(J,{sx:{minWidth:"350px"},children:F.llmEvaluators[fe]&&y.jsx(Be,{flexDirection:"row",gap:1,sx:{alignItems:"center",flexWrap:"wrap"},children:Object.entries(F.llmEvaluators[fe]).map(([Pr,Eo],Sy)=>y.jsx(Y,{variant:"outlined",size:"small",color:"primary",sx:{height:"auto","& .MuiChip-label":{display:"block",whiteSpace:"normal"},p:.5},label:y.jsxs("span",{children:[y.jsx("b",{children:Pr.toUpperCase()}),": ",Eo]})},Sy))})})]},fe)})]},me)})})})]})}),M&&y.jsx(uy,{show:M,dialogProps:R,onClickFunction:$t}),H&&y.jsx(fy,{show:H,dialogProps:V,onClickFunction:yn,onSelectVersion:F=>{Z(!1),e(`/evaluation_results/${F}`),e(0)}})]})}),y.jsx(Ky,{}),y.jsx(hy,{show:ae,dialogProps:je,onCancel:()=>L(!1),openDetailsDrawer:F=>{ir(F)}})]})};export{cI as default};
