import{j as t}from"./ui-vendor-4PEuZeLa.js";import{k as e,d as r,r as n,R as o}from"./react-vendor-SJkaNtXX.js";import{H as i}from"./Header-D47C7pPy.js";import{F as a}from"./Footer-BEJ1nFIc.js";import{S as c}from"./SEOHead--CqRNk7o.js";import{C as u}from"./card-DSv3rDjd.js";import{B as l}from"./badge-DscTnCVl.js";import{E as s,S as f,B as p,e as h}from"./index-BfQ1fOiC.js";import{aU as d,aT as y,R as v,m,k as b,G as g,aC as x,W as w}from"./icons-DwRt140y.js";import"./logo-oficial-BW9aD_Pb.js";import"./supabase-vendor-CdxEYpYJ.js";var O=Array.isArray,j="object"==typeof e&&e&&e.Object===Object&&e,S=j,P="object"==typeof self&&self&&self.Object===Object&&self,A=S||P||Function("return this")(),E=A.Symbol,k=E,M=Object.prototype,_=M.hasOwnProperty,T=M.toString,C=k?k.toStringTag:void 0;var N=function(t){var e=_.call(t,C),r=t[C];try{t[C]=void 0;var n=!0}catch(i){}var o=T.call(t);return n&&(e?t[C]=r:delete t[C]),o},D=Object.prototype.toString;var I=N,B=function(t){return D.call(t)},R=E?E.toStringTag:void 0;var L=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":R&&R in Object(t)?I(t):B(t)};var z=function(t){return null!=t&&"object"==typeof t},$=L,U=z;var F=function(t){return"symbol"==typeof t||U(t)&&"[object Symbol]"==$(t)},q=O,W=F,H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/;var V=function(t,e){if(q(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!W(t))||(X.test(t)||!H.test(t)||null!=e&&t in Object(e))};var G=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const Y=r(G);var K=L,Z=G;var J=function(t){if(!Z(t))return!1;var e=K(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const Q=r(J);var tt,et=A["__core-js_shared__"],rt=(tt=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"";var nt=function(t){return!!rt&&rt in t},ot=Function.prototype.toString;var it=function(t){if(null!=t){try{return ot.call(t)}catch(e){}try{return t+""}catch(e){}}return""},at=J,ct=nt,ut=G,lt=it,st=/^\[object .+?Constructor\]$/,ft=Function.prototype,pt=Object.prototype,ht=ft.toString,dt=pt.hasOwnProperty,yt=RegExp("^"+ht.call(dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var vt=function(t){return!(!ut(t)||ct(t))&&(at(t)?yt:st).test(lt(t))},mt=function(t,e){return null==t?void 0:t[e]};var bt=function(t,e){var r=mt(t,e);return vt(r)?r:void 0},gt=bt(Object,"create"),xt=gt;var wt=function(){this.__data__=xt?xt(null):{},this.size=0};var Ot=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},jt=gt,St=Object.prototype.hasOwnProperty;var Pt=function(t){var e=this.__data__;if(jt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return St.call(e,t)?e[t]:void 0},At=gt,Et=Object.prototype.hasOwnProperty;var kt=gt;var Mt=wt,_t=Ot,Tt=Pt,Ct=function(t){var e=this.__data__;return At?void 0!==e[t]:Et.call(e,t)},Nt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=kt&&void 0===e?"__lodash_hash_undefined__":e,this};function Dt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dt.prototype.clear=Mt,Dt.prototype.delete=_t,Dt.prototype.get=Tt,Dt.prototype.has=Ct,Dt.prototype.set=Nt;var It=Dt;var Bt=function(){this.__data__=[],this.size=0};var Rt=function(t,e){return t===e||t!=t&&e!=e},Lt=Rt;var zt=function(t,e){for(var r=t.length;r--;)if(Lt(t[r][0],e))return r;return-1},$t=zt,Ut=Array.prototype.splice;var Ft=zt;var qt=zt;var Wt=zt;var Ht=Bt,Xt=function(t){var e=this.__data__,r=$t(e,t);return!(r<0)&&(r==e.length-1?e.pop():Ut.call(e,r,1),--this.size,!0)},Vt=function(t){var e=this.__data__,r=Ft(e,t);return r<0?void 0:e[r][1]},Gt=function(t){return qt(this.__data__,t)>-1},Yt=function(t,e){var r=this.__data__,n=Wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Kt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Kt.prototype.clear=Ht,Kt.prototype.delete=Xt,Kt.prototype.get=Vt,Kt.prototype.has=Gt,Kt.prototype.set=Yt;var Zt=Kt,Jt=bt(A,"Map"),Qt=It,te=Zt,ee=Jt;var re=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ne=function(t,e){var r=t.__data__;return re(e)?r["string"==typeof e?"string":"hash"]:r.map},oe=ne;var ie=ne;var ae=ne;var ce=ne;var ue=function(){this.size=0,this.__data__={hash:new Qt,map:new(ee||te),string:new Qt}},le=function(t){var e=oe(this,t).delete(t);return this.size-=e?1:0,e},se=function(t){return ie(this,t).get(t)},fe=function(t){return ae(this,t).has(t)},pe=function(t,e){var r=ce(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function he(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}he.prototype.clear=ue,he.prototype.delete=le,he.prototype.get=se,he.prototype.has=fe,he.prototype.set=pe;var de=he,ye=de;function ve(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(ve.Cache||ye),r}ve.Cache=ye;var me=ve;const be=r(me);var ge=me;var xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,we=/\\(\\)?/g,Oe=function(t){var e=ge(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(xe,function(t,r,n,o){e.push(n?o.replace(we,"$1"):r||t)}),e});var je=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Se=je,Pe=O,Ae=F,Ee=E?E.prototype:void 0,ke=Ee?Ee.toString:void 0;var Me=function t(e){if("string"==typeof e)return e;if(Pe(e))return Se(e,t)+"";if(Ae(e))return ke?ke.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},_e=Me;var Te=function(t){return null==t?"":_e(t)},Ce=O,Ne=V,De=Oe,Ie=Te;var Be=function(t,e){return Ce(t)?t:Ne(t,e)?[t]:De(Ie(t))},Re=F;var Le=function(t){if("string"==typeof t||Re(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},ze=Be,$e=Le;var Ue=function(t,e){for(var r=0,n=(e=ze(e,t)).length;null!=t&&r<n;)t=t[$e(e[r++])];return r&&r==n?t:void 0},Fe=Ue;var qe=function(t,e,r){var n=null==t?void 0:Fe(t,e);return void 0===n?r:n};const We=r(qe);const He=r(function(t){return null==t});var Xe=L,Ve=O,Ge=z;const Ye=r(function(t){return"string"==typeof t||!Ve(t)&&Ge(t)&&"[object String]"==Xe(t)});var Ke,Ze={exports:{}},Je={},Qe=Symbol.for("react.element"),tr=Symbol.for("react.portal"),er=Symbol.for("react.fragment"),rr=Symbol.for("react.strict_mode"),nr=Symbol.for("react.profiler"),or=Symbol.for("react.provider"),ir=Symbol.for("react.context"),ar=Symbol.for("react.server_context"),cr=Symbol.for("react.forward_ref"),ur=Symbol.for("react.suspense"),lr=Symbol.for("react.suspense_list"),sr=Symbol.for("react.memo"),fr=Symbol.for("react.lazy"),pr=Symbol.for("react.offscreen");function hr(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case Qe:switch(t=t.type){case er:case nr:case rr:case ur:case lr:return t;default:switch(t=t&&t.$$typeof){case ar:case ir:case cr:case fr:case sr:case or:return t;default:return e}}case tr:return e}}}Ke=Symbol.for("react.module.reference"),Je.ContextConsumer=ir,Je.ContextProvider=or,Je.Element=Qe,Je.ForwardRef=cr,Je.Fragment=er,Je.Lazy=fr,Je.Memo=sr,Je.Portal=tr,Je.Profiler=nr,Je.StrictMode=rr,Je.Suspense=ur,Je.SuspenseList=lr,Je.isAsyncMode=function(){return!1},Je.isConcurrentMode=function(){return!1},Je.isContextConsumer=function(t){return hr(t)===ir},Je.isContextProvider=function(t){return hr(t)===or},Je.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===Qe},Je.isForwardRef=function(t){return hr(t)===cr},Je.isFragment=function(t){return hr(t)===er},Je.isLazy=function(t){return hr(t)===fr},Je.isMemo=function(t){return hr(t)===sr},Je.isPortal=function(t){return hr(t)===tr},Je.isProfiler=function(t){return hr(t)===nr},Je.isStrictMode=function(t){return hr(t)===rr},Je.isSuspense=function(t){return hr(t)===ur},Je.isSuspenseList=function(t){return hr(t)===lr},Je.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===er||t===nr||t===rr||t===ur||t===lr||t===pr||"object"==typeof t&&null!==t&&(t.$$typeof===fr||t.$$typeof===sr||t.$$typeof===or||t.$$typeof===ir||t.$$typeof===cr||t.$$typeof===Ke||void 0!==t.getModuleId)},Je.typeOf=hr,Ze.exports=Je;var dr=Ze.exports,yr=L,vr=z;var mr=function(t){return"number"==typeof t||vr(t)&&"[object Number]"==yr(t)};const br=r(mr);var gr=mr;const xr=r(function(t){return gr(t)&&t!=+t});var wr=function(t){return 0===t?0:t>0?1:-1},Or=function(t){return Ye(t)&&t.indexOf("%")===t.length-1},jr=function(t){return br(t)&&!xr(t)},Sr=function(t){return jr(t)||Ye(t)},Pr=0,Ar=function(t){var e=++Pr;return"".concat(t||"").concat(e)},Er=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!jr(t)&&!Ye(t))return n;if(Or(t)){var i=t.indexOf("%");r=e*parseFloat(t.slice(0,i))/100}else r=+t;return xr(r)&&(r=n),o&&r>e&&(r=e),r},kr=function(t){if(!t)return null;var e=Object.keys(t);return e&&e.length?t[e[0]]:null},Mr=function(t,e){return jr(t)&&jr(e)?function(r){return t+r*(e-t)}:function(){return e}};function _r(t,e,r){return t&&t.length?t.find(function(t){return t&&("function"==typeof e?e(t):We(t,e))===r}):null}var Tr=function(t,e){return jr(t)&&jr(e)?t-e:Ye(t)&&Ye(e)?t.localeCompare(e):t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e))};function Cr(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function Nr(t){return(Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Dr=["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"],Ir=["points","pathLength"],Br={svg:["viewBox","children"],polygon:Ir,polyline:Ir},Rr=["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"],Lr=function(t,e){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var r=t;if(n.isValidElement(t)&&(r=t.props),!Y(r))return null;var o={};return Object.keys(r).forEach(function(t){Rr.includes(t)&&(o[t]=e||function(e){return r[t](r,e)})}),o},zr=function(t,e,r){if(!Y(t)||"object"!==Nr(t))return null;var n=null;return Object.keys(t).forEach(function(o){var i=t[o];Rr.includes(o)&&"function"==typeof i&&(n||(n={}),n[o]=function(t,e,r){return function(n){return t(e,r,n),null}}(i,e,r))}),n},$r=["children"],Ur=["children"];function Fr(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function qr(t){return(qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Wr={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Hr=function(t){return"string"==typeof t?t:t?t.displayName||t.name||"Component":""},Xr=null,Vr=null,Gr=function t(e){if(e===Xr&&Array.isArray(Vr))return Vr;var r=[];return n.Children.forEach(e,function(e){He(e)||(dr.isFragment(e)?r=r.concat(t(e.props.children)):r.push(e))}),Vr=r,Xr=e,r};function Yr(t,e){var r=[],n=[];return n=Array.isArray(e)?e.map(function(t){return Hr(t)}):[Hr(e)],Gr(t).forEach(function(t){var e=We(t,"type.displayName")||We(t,"type.name");-1!==n.indexOf(e)&&r.push(t)}),r}function Kr(t,e){var r=Yr(t,e);return r&&r[0]}var Zr=function(t){if(!t||!t.props)return!1;var e=t.props,r=e.width,n=e.height;return!(!jr(r)||r<=0||!jr(n)||n<=0)},Jr=["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"],Qr=function(t,e,r){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var o=t;if(n.isValidElement(t)&&(o=t.props),!Y(o))return null;var i={};return Object.keys(o).forEach(function(t){var n;(function(t,e,r,n){var o,i=null!==(o=null==Br?void 0:Br[n])&&void 0!==o?o:[];return e.startsWith("data-")||!Q(t)&&(n&&i.includes(e)||Dr.includes(e))||r&&Rr.includes(e)})(null===(n=o)||void 0===n?void 0:n[t],t,e,r)&&(i[t]=o[t])}),i},tn=function t(e,r){if(e===r)return!0;var o=n.Children.count(e);if(o!==n.Children.count(r))return!1;if(0===o)return!0;if(1===o)return en(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<o;i++){var a=e[i],c=r[i];if(Array.isArray(a)||Array.isArray(c)){if(!t(a,c))return!1}else if(!en(a,c))return!1}return!0},en=function(t,e){if(He(t)&&He(e))return!0;if(!He(t)&&!He(e)){var r=t.props||{},n=r.children,o=Fr(r,$r),i=e.props||{},a=i.children,c=Fr(i,Ur);return n&&a?Cr(o,c)&&tn(n,a):!n&&!a&&Cr(o,c)}return!1},rn=function(t,e){var r=[],n={};return Gr(t).forEach(function(t,o){if(function(t){return t&&t.type&&Ye(t.type)&&Jr.indexOf(t.type)>=0}(t))r.push(t);else if(t){var i=Hr(t.type),a=e[i]||{},c=a.handler,u=a.once;if(c&&(!u||!n[i])){var l=c(t,i,o);r.push(l),n[i]=!0}}}),r},nn=["children","width","height","viewBox","className","style","title","desc"];function on(){return on=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},on.apply(this,arguments)}function an(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function cn(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,c=t.style,u=t.title,l=t.desc,f=an(t,nn),p=i||{width:r,height:n,x:0,y:0},h=s("recharts-surface",a);return o.createElement("svg",on({},Qr(f,!0,"svg"),{className:h,width:r,height:n,style:c,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),o.createElement("title",null,u),o.createElement("desc",null,l),e)}var un=["children","className"];function ln(){return ln=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ln.apply(this,arguments)}function sn(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var fn=o.forwardRef(function(t,e){var r=t.children,n=t.className,i=sn(t,un),a=s("recharts-layer",n);return o.createElement("g",ln({className:a},Qr(i,!0),{ref:e}),r)}),pn=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o]};var hn=function(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i};var dn=function(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:hn(t,e,r)},yn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var vn=function(t){return yn.test(t)};var mn=function(t){return t.split("")},bn="\\ud800-\\udfff",gn="["+bn+"]",xn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",wn="\\ud83c[\\udffb-\\udfff]",On="[^"+bn+"]",jn="(?:\\ud83c[\\udde6-\\uddff]){2}",Sn="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="(?:"+xn+"|"+wn+")"+"?",An="[\\ufe0e\\ufe0f]?",En=An+Pn+("(?:\\u200d(?:"+[On,jn,Sn].join("|")+")"+An+Pn+")*"),kn="(?:"+[On+xn+"?",xn,jn,Sn,gn].join("|")+")",Mn=RegExp(wn+"(?="+wn+")|"+kn+En,"g");var _n=mn,Tn=vn,Cn=function(t){return t.match(Mn)||[]};var Nn=dn,Dn=vn,In=function(t){return Tn(t)?Cn(t):_n(t)},Bn=Te;const Rn=r(function(t){return function(e){e=Bn(e);var r=Dn(e)?In(e):void 0,n=r?r[0]:e.charAt(0),o=r?Nn(r,1).join(""):e.slice(1);return n[t]()+o}}("toUpperCase"));function Ln(t){return function(){return t}}const zn=Math.cos,$n=Math.sin,Un=Math.sqrt,Fn=Math.PI,qn=2*Fn,Wn=Math.PI,Hn=2*Wn,Xn=1e-6,Vn=Hn-Xn;function Gn(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Yn{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Gn:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Gn;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,o,i){this._append`C${+t},${+e},${+r},${+n},${this._x1=+o},${this._y1=+i}`}arcTo(t,e,r,n,o){if(t=+t,e=+e,r=+r,n=+n,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,c=r-t,u=n-e,l=i-t,s=a-e,f=l*l+s*s;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>Xn)if(Math.abs(s*c-u*l)>Xn&&o){let p=r-i,h=n-a,d=c*c+u*u,y=p*p+h*h,v=Math.sqrt(d),m=Math.sqrt(f),b=o*Math.tan((Wn-Math.acos((d+f-y)/(2*v*m)))/2),g=b/m,x=b/v;Math.abs(g-1)>Xn&&this._append`L${t+g*l},${e+g*s}`,this._append`A${o},${o},0,0,${+(s*p>l*h)},${this._x1=t+x*c},${this._y1=e+x*u}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,n,o,i){if(t=+t,e=+e,i=!!i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(n),c=r*Math.sin(n),u=t+a,l=e+c,s=1^i,f=i?n-o:o-n;null===this._x1?this._append`M${u},${l}`:(Math.abs(this._x1-u)>Xn||Math.abs(this._y1-l)>Xn)&&this._append`L${u},${l}`,r&&(f<0&&(f=f%Hn+Hn),f>Vn?this._append`A${r},${r},0,1,${s},${t-a},${e-c}A${r},${r},0,1,${s},${this._x1=u},${this._y1=l}`:f>Xn&&this._append`A${r},${r},0,${+(f>=Wn)},${s},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function Kn(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Yn(e)}function Zn(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Jn(t){this._context=t}function Qn(t){return new Jn(t)}function to(t){return t[0]}function eo(t){return t[1]}function ro(t,e){var r=Ln(!0),n=null,o=Qn,i=null,a=Kn(c);function c(c){var u,l,s,f=(c=Zn(c)).length,p=!1;for(null==n&&(i=o(s=a())),u=0;u<=f;++u)!(u<f&&r(l=c[u],u,c))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+t(l,u,c),+e(l,u,c));if(s)return i=null,s+""||null}return t="function"==typeof t?t:void 0===t?to:Ln(t),e="function"==typeof e?e:void 0===e?eo:Ln(e),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Ln(+e),c):t},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Ln(+t),c):e},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:Ln(!!t),c):r},c.curve=function(t){return arguments.length?(o=t,null!=n&&(i=o(n)),c):o},c.context=function(t){return arguments.length?(null==t?n=i=null:i=o(n=t),c):n},c}function no(t,e,r){var n=null,o=Ln(!0),i=null,a=Qn,c=null,u=Kn(l);function l(l){var s,f,p,h,d,y=(l=Zn(l)).length,v=!1,m=new Array(y),b=new Array(y);for(null==i&&(c=a(d=u())),s=0;s<=y;++s){if(!(s<y&&o(h=l[s],s,l))===v)if(v=!v)f=s,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),p=s-1;p>=f;--p)c.point(m[p],b[p]);c.lineEnd(),c.areaEnd()}v&&(m[s]=+t(h,s,l),b[s]=+e(h,s,l),c.point(n?+n(h,s,l):m[s],r?+r(h,s,l):b[s]))}if(d)return c=null,d+""||null}function s(){return ro().defined(o).curve(a).context(i)}return t="function"==typeof t?t:void 0===t?to:Ln(+t),e="function"==typeof e?e:Ln(void 0===e?0:+e),r="function"==typeof r?r:void 0===r?eo:Ln(+r),l.x=function(e){return arguments.length?(t="function"==typeof e?e:Ln(+e),n=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:Ln(+e),l):t},l.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Ln(+t),l):n},l.y=function(t){return arguments.length?(e="function"==typeof t?t:Ln(+t),r=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:Ln(+t),l):e},l.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ln(+t),l):r},l.lineX0=l.lineY0=function(){return s().x(t).y(e)},l.lineY1=function(){return s().x(t).y(r)},l.lineX1=function(){return s().x(n).y(e)},l.defined=function(t){return arguments.length?(o="function"==typeof t?t:Ln(!!t),l):o},l.curve=function(t){return arguments.length?(a=t,null!=i&&(c=a(i)),l):a},l.context=function(t){return arguments.length?(null==t?i=c=null:c=a(i=t),l):i},l}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};class oo{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}const io={draw(t,e){const r=Un(e/Fn);t.moveTo(r,0),t.arc(0,0,r,0,qn)}},ao={draw(t,e){const r=Un(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},co=Un(1/3),uo=2*co,lo={draw(t,e){const r=Un(e/uo),n=r*co;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},so={draw(t,e){const r=Un(e),n=-r/2;t.rect(n,n,r,r)}},fo=$n(Fn/10)/$n(7*Fn/10),po=$n(qn/10)*fo,ho=-zn(qn/10)*fo,yo={draw(t,e){const r=Un(.8908130915292852*e),n=po*r,o=ho*r;t.moveTo(0,-r),t.lineTo(n,o);for(let i=1;i<5;++i){const e=qn*i/5,a=zn(e),c=$n(e);t.lineTo(c*r,-a*r),t.lineTo(a*n-c*o,c*n+a*o)}t.closePath()}},vo=Un(3),mo={draw(t,e){const r=-Un(e/(3*vo));t.moveTo(0,2*r),t.lineTo(-vo*r,-r),t.lineTo(vo*r,-r),t.closePath()}},bo=-.5,go=Un(3)/2,xo=1/Un(12),wo=3*(xo/2+1),Oo={draw(t,e){const r=Un(e/wo),n=r/2,o=r*xo,i=n,a=r*xo+r,c=-i,u=a;t.moveTo(n,o),t.lineTo(i,a),t.lineTo(c,u),t.lineTo(bo*n-go*o,go*n+bo*o),t.lineTo(bo*i-go*a,go*i+bo*a),t.lineTo(bo*c-go*u,go*c+bo*u),t.lineTo(bo*n+go*o,bo*o-go*n),t.lineTo(bo*i+go*a,bo*a-go*i),t.lineTo(bo*c+go*u,bo*u-go*c),t.closePath()}};function jo(){}function So(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Po(t){this._context=t}function Ao(t){this._context=t}function Eo(t){this._context=t}function ko(t){this._context=t}function Mo(t){return t<0?-1:1}function _o(t,e,r){var n=t._x1-t._x0,o=e-t._x1,i=(t._y1-t._y0)/(n||o<0&&-0),a=(r-t._y1)/(o||n<0&&-0),c=(i*o+a*n)/(n+o);return(Mo(i)+Mo(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(c))||0}function To(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Co(t,e,r){var n=t._x0,o=t._y0,i=t._x1,a=t._y1,c=(i-n)/3;t._context.bezierCurveTo(n+c,o+c*e,i-c,a-c*r,i,a)}function No(t){this._context=t}function Do(t){this._context=new Io(t)}function Io(t){this._context=t}function Bo(t){this._context=t}function Ro(t){var e,r,n=t.length-1,o=new Array(n),i=new Array(n),a=new Array(n);for(o[0]=0,i[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)o[e]=1,i[e]=4,a[e]=4*t[e]+2*t[e+1];for(o[n-1]=2,i[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=o[e]/i[e-1],i[e]-=r,a[e]-=r*a[e-1];for(o[n-1]=a[n-1]/i[n-1],e=n-2;e>=0;--e)o[e]=(a[e]-o[e+1])/i[e];for(i[n-1]=(t[n]+o[n-1])/2,e=0;e<n-1;++e)i[e]=2*t[e+1]-o[e+1];return[o,i]}function Lo(t,e){this._context=t,this._t=e}function zo(t,e){if((o=t.length)>1)for(var r,n,o,i=1,a=t[e[0]],c=a.length;i<o;++i)for(n=a,a=t[e[i]],r=0;r<c;++r)a[r][1]+=a[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function $o(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function Uo(t,e){return t[e]}function Fo(t){const e=[];return e.key=t,e}function qo(t){return(qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Po.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:So(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:So(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ao.prototype={areaStart:jo,areaEnd:jo,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:So(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Eo.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:So(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ko.prototype={areaStart:jo,areaEnd:jo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},No.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:Co(this,this._t0,To(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Co(this,To(this,r=_o(this,t,e)),r);break;default:Co(this,this._t0,r=_o(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Do.prototype=Object.create(No.prototype)).point=function(t,e){No.prototype.point.call(this,e,t)},Io.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,o,i){this._context.bezierCurveTo(e,t,n,r,i,o)}},Bo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=Ro(t),o=Ro(e),i=0,a=1;a<r;++i,++a)this._context.bezierCurveTo(n[0][i],o[0][i],n[1][i],o[1][i],t[a],e[a]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Lo.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}};var Wo=["type","size","sizeType"];function Ho(){return Ho=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ho.apply(this,arguments)}function Xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Vo(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xo(Object(r),!0).forEach(function(e){Go(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xo(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Go(t,e,r){var n;return n=function(t,e){if("object"!=qo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==qo(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yo(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Ko={symbolCircle:io,symbolCross:ao,symbolDiamond:lo,symbolSquare:so,symbolStar:yo,symbolTriangle:mo,symbolWye:Oo},Zo=Math.PI/180,Jo=function(t){var e,r,n=t.type,i=void 0===n?"circle":n,a=t.size,c=void 0===a?64:a,u=t.sizeType,l=void 0===u?"area":u,f=Vo(Vo({},Yo(t,Wo)),{},{type:i,size:c,sizeType:l}),p=f.className,h=f.cx,d=f.cy,y=Qr(f,!0);return h===+h&&d===+d&&c===+c?o.createElement("path",Ho({},y,{className:s("recharts-symbols",p),transform:"translate(".concat(h,", ").concat(d,")"),d:(e=function(t){var e="symbol".concat(Rn(t));return Ko[e]||io}(i),r=function(t,e){let r=null,n=Kn(o);function o(){let o;if(r||(r=o=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),o)return r=null,o+""||null}return t="function"==typeof t?t:Ln(t||io),e="function"==typeof e?e:Ln(void 0===e?64:+e),o.type=function(e){return arguments.length?(t="function"==typeof e?e:Ln(e),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:Ln(+t),o):e},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}().type(e).size(function(t,e,r){if("area"===e)return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return.5*t*t/Math.sqrt(3);case"square":return t*t;case"star":var n=18*Zo;return 1.25*t*t*(Math.tan(n)-Math.tan(2*n)*Math.pow(Math.tan(n),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}}(c,l,i)),r())})):null};function Qo(t){return(Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ti(){return ti=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ti.apply(this,arguments)}function ei(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ri(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ui(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ni(t,e,r){return e=ii(e),function(t,e){if(e&&("object"===Qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,oi()?Reflect.construct(e,r||[],ii(t).constructor):e.apply(t,r))}function oi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oi=function(){return!!t})()}function ii(t){return(ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ai(t,e){return(ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ci(t,e,r){return(e=ui(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ui(t){var e=function(t,e){if("object"!=Qo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==Qo(e)?e:e+""}Jo.registerSymbol=function(t,e){Ko["symbol".concat(Rn(t))]=e};var li=32,si=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ni(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ai(t,e)}(t,n.PureComponent),ri(t,[{key:"renderIcon",value:function(t){var e=this.props.inactiveColor,r=16,n=li/6,i=li/3,a=t.inactive?e:t.color;if("plainline"===t.type)return o.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:r,x2:li,y2:r,className:"recharts-legend-icon"});if("line"===t.type)return o.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(r,"h").concat(i,"\n            A").concat(n,",").concat(n,",0,1,1,").concat(2*i,",").concat(r,"\n            H").concat(li,"M").concat(2*i,",").concat(r,"\n            A").concat(n,",").concat(n,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===t.type)return o.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(4,"h").concat(li,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(o.isValidElement(t.legendIcon)){var c=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ei(Object(r),!0).forEach(function(e){ci(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},t);return delete c.legendIcon,o.cloneElement(t.legendIcon,c)}return o.createElement(Jo,{fill:a,cx:r,cy:r,size:li,sizeType:"diameter",type:t.type})}},{key:"renderItems",value:function(){var t=this,e=this.props,r=e.payload,n=e.iconSize,i=e.layout,a=e.formatter,c=e.inactiveColor,u={x:0,y:0,width:li,height:li},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map(function(e,r){var i=e.formatter||a,p=s(ci(ci({"recharts-legend-item":!0},"legend-item-".concat(r),!0),"inactive",e.inactive));if("none"===e.type)return null;var h=Q(e.value)?null:e.value;pn(!Q(e.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 d=e.inactive?c:e.color;return o.createElement("li",ti({className:p,style:l,key:"legend-item-".concat(r)},zr(t.props,e,r)),o.createElement(cn,{width:n,height:n,viewBox:u,style:f},t.renderIcon(e)),o.createElement("span",{className:"recharts-legend-item-text",style:{color:d}},i?i(h,e,r):h))})}},{key:"render",value:function(){var t=this.props,e=t.payload,r=t.layout,n=t.align;if(!e||!e.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?n:"left"};return o.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}])}();ci(si,"displayName","Legend"),ci(si,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var fi=Zt;var pi=Zt,hi=Jt,di=de;var yi=Zt,vi=function(){this.__data__=new fi,this.size=0},mi=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},bi=function(t){return this.__data__.get(t)},gi=function(t){return this.__data__.has(t)},xi=function(t,e){var r=this.__data__;if(r instanceof pi){var n=r.__data__;if(!hi||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new di(n)}return r.set(t,e),this.size=r.size,this};function wi(t){var e=this.__data__=new yi(t);this.size=e.size}wi.prototype.clear=vi,wi.prototype.delete=mi,wi.prototype.get=bi,wi.prototype.has=gi,wi.prototype.set=xi;var Oi=wi;var ji=de,Si=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Pi=function(t){return this.__data__.has(t)};function Ai(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ji;++e<r;)this.add(t[e])}Ai.prototype.add=Ai.prototype.push=Si,Ai.prototype.has=Pi;var Ei=Ai;var ki=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var Mi=function(t,e){return t.has(e)},_i=Ei,Ti=ki,Ci=Mi;var Ni=function(t,e,r,n,o,i){var a=1&r,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var l=i.get(t),s=i.get(e);if(l&&s)return l==e&&s==t;var f=-1,p=!0,h=2&r?new _i:void 0;for(i.set(t,e),i.set(e,t);++f<c;){var d=t[f],y=e[f];if(n)var v=a?n(y,d,f,e,t,i):n(d,y,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(h){if(!Ti(e,function(t,e){if(!Ci(h,e)&&(d===t||o(d,t,r,n,i)))return h.push(e)})){p=!1;break}}else if(d!==y&&!o(d,y,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p};var Di=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r},Ii=A.Uint8Array,Bi=Rt,Ri=Ni,Li=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r},zi=Di,$i=E?E.prototype:void 0,Ui=$i?$i.valueOf:void 0;var Fi=function(t,e,r,n,o,i,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Ii(t),new Ii(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Bi(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var c=Li;case"[object Set]":var u=1&n;if(c||(c=zi),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;n|=2,a.set(t,e);var s=Ri(c(t),c(e),n,o,i,a);return a.delete(t),s;case"[object Symbol]":if(Ui)return Ui.call(t)==Ui.call(e)}return!1};var qi=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Wi=qi,Hi=O;var Xi=function(t,e,r){var n=e(t);return Hi(t)?n:Wi(n,r(t))};var Vi=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i},Gi=function(){return[]},Yi=Object.prototype.propertyIsEnumerable,Ki=Object.getOwnPropertySymbols,Zi=Ki?function(t){return null==t?[]:(t=Object(t),Vi(Ki(t),function(e){return Yi.call(t,e)}))}:Gi;var Ji=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},Qi=L,ta=z;var ea,ra,na,oa,ia,aa,ca,ua,la=function(t){return ta(t)&&"[object Arguments]"==Qi(t)},sa=z,fa=Object.prototype,pa=fa.hasOwnProperty,ha=fa.propertyIsEnumerable,da=la(function(){return arguments}())?la:function(t){return sa(t)&&pa.call(t,"callee")&&!ha.call(t,"callee")},ya={exports:{}};ea=ya,na=A,oa=function(){return!1},ia=(ra=ya.exports)&&!ra.nodeType&&ra,aa=ia&&ea&&!ea.nodeType&&ea,ca=aa&&aa.exports===ia?na.Buffer:void 0,ua=(ca?ca.isBuffer:void 0)||oa,ea.exports=ua;var va=ya.exports,ma=/^(?:0|[1-9]\d*)$/;var ba=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&ma.test(t))&&t>-1&&t%1==0&&t<e};var ga=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},xa=L,wa=ga,Oa=z,ja={};ja["[object Float32Array]"]=ja["[object Float64Array]"]=ja["[object Int8Array]"]=ja["[object Int16Array]"]=ja["[object Int32Array]"]=ja["[object Uint8Array]"]=ja["[object Uint8ClampedArray]"]=ja["[object Uint16Array]"]=ja["[object Uint32Array]"]=!0,ja["[object Arguments]"]=ja["[object Array]"]=ja["[object ArrayBuffer]"]=ja["[object Boolean]"]=ja["[object DataView]"]=ja["[object Date]"]=ja["[object Error]"]=ja["[object Function]"]=ja["[object Map]"]=ja["[object Number]"]=ja["[object Object]"]=ja["[object RegExp]"]=ja["[object Set]"]=ja["[object String]"]=ja["[object WeakMap]"]=!1;var Sa=function(t){return Oa(t)&&wa(t.length)&&!!ja[xa(t)]};var Pa=function(t){return function(e){return t(e)}},Aa={exports:{}};!function(t,e){var r=j,n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(e){}}();t.exports=a}(Aa,Aa.exports);var Ea=Aa.exports,ka=Sa,Ma=Pa,_a=Ea&&Ea.isTypedArray,Ta=_a?Ma(_a):ka,Ca=Ji,Na=da,Da=O,Ia=va,Ba=ba,Ra=Ta,La=Object.prototype.hasOwnProperty;var za=function(t,e){var r=Da(t),n=!r&&Na(t),o=!r&&!n&&Ia(t),i=!r&&!n&&!o&&Ra(t),a=r||n||o||i,c=a?Ca(t.length,String):[],u=c.length;for(var l in t)!e&&!La.call(t,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ba(l,u))||c.push(l);return c},$a=Object.prototype;var Ua=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||$a)};var Fa=function(t,e){return function(r){return t(e(r))}},qa=Fa(Object.keys,Object),Wa=Ua,Ha=qa,Xa=Object.prototype.hasOwnProperty;var Va=J,Ga=ga;var Ya=function(t){return null!=t&&Ga(t.length)&&!Va(t)},Ka=za,Za=function(t){if(!Wa(t))return Ha(t);var e=[];for(var r in Object(t))Xa.call(t,r)&&"constructor"!=r&&e.push(r);return e},Ja=Ya;var Qa=function(t){return Ja(t)?Ka(t):Za(t)},tc=Xi,ec=Zi,rc=Qa;var nc=function(t){return tc(t,rc,ec)},oc=Object.prototype.hasOwnProperty;var ic=function(t,e,r,n,o,i){var a=1&r,c=nc(t),u=c.length;if(u!=nc(e).length&&!a)return!1;for(var l=u;l--;){var s=c[l];if(!(a?s in e:oc.call(e,s)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var h=!0;i.set(t,e),i.set(e,t);for(var d=a;++l<u;){var y=t[s=c[l]],v=e[s];if(n)var m=a?n(v,y,s,e,t,i):n(y,v,s,t,e,i);if(!(void 0===m?y===v||o(y,v,r,n,i):m)){h=!1;break}d||(d="constructor"==s)}if(h&&!d){var b=t.constructor,g=e.constructor;b==g||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g||(h=!1)}return i.delete(t),i.delete(e),h},ac=bt(A,"DataView"),cc=bt(A,"Promise"),uc=bt(A,"Set"),lc=ac,sc=Jt,fc=cc,pc=uc,hc=bt(A,"WeakMap"),dc=L,yc=it,vc="[object Map]",mc="[object Promise]",bc="[object Set]",gc="[object WeakMap]",xc="[object DataView]",wc=yc(lc),Oc=yc(sc),jc=yc(fc),Sc=yc(pc),Pc=yc(hc),Ac=dc;(lc&&Ac(new lc(new ArrayBuffer(1)))!=xc||sc&&Ac(new sc)!=vc||fc&&Ac(fc.resolve())!=mc||pc&&Ac(new pc)!=bc||hc&&Ac(new hc)!=gc)&&(Ac=function(t){var e=dc(t),r="[object Object]"==e?t.constructor:void 0,n=r?yc(r):"";if(n)switch(n){case wc:return xc;case Oc:return vc;case jc:return mc;case Sc:return bc;case Pc:return gc}return e});var Ec=Oi,kc=Ni,Mc=Fi,_c=ic,Tc=Ac,Cc=O,Nc=va,Dc=Ta,Ic="[object Arguments]",Bc="[object Array]",Rc="[object Object]",Lc=Object.prototype.hasOwnProperty;var zc=function(t,e,r,n,o,i){var a=Cc(t),c=Cc(e),u=a?Bc:Tc(t),l=c?Bc:Tc(e),s=(u=u==Ic?Rc:u)==Rc,f=(l=l==Ic?Rc:l)==Rc,p=u==l;if(p&&Nc(t)){if(!Nc(e))return!1;a=!0,s=!1}if(p&&!s)return i||(i=new Ec),a||Dc(t)?kc(t,e,r,n,o,i):Mc(t,e,u,r,n,o,i);if(!(1&r)){var h=s&&Lc.call(t,"__wrapped__"),d=f&&Lc.call(e,"__wrapped__");if(h||d){var y=h?t.value():t,v=d?e.value():e;return i||(i=new Ec),o(y,v,r,n,i)}}return!!p&&(i||(i=new Ec),_c(t,e,r,n,o,i))},$c=z;var Uc=function t(e,r,n,o,i){return e===r||(null==e||null==r||!$c(e)&&!$c(r)?e!=e&&r!=r:zc(e,r,n,o,t,i))},Fc=Oi,qc=Uc;var Wc=G;var Hc=function(t){return t==t&&!Wc(t)},Xc=Hc,Vc=Qa;var Gc=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}},Yc=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var u=(c=r[o])[0],l=t[u],s=c[1];if(a&&c[2]){if(void 0===l&&!(u in t))return!1}else{var f=new Fc;if(n)var p=n(l,s,u,t,e,f);if(!(void 0===p?qc(s,l,3,n,f):p))return!1}}return!0},Kc=function(t){for(var e=Vc(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Xc(o)]}return e},Zc=Gc;var Jc=Be,Qc=da,tu=O,eu=ba,ru=ga,nu=Le;var ou=function(t,e){return null!=t&&e in Object(t)},iu=function(t,e,r){for(var n=-1,o=(e=Jc(e,t)).length,i=!1;++n<o;){var a=nu(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ru(o)&&eu(a,o)&&(tu(t)||Qc(t))};var au=Uc,cu=qe,uu=function(t,e){return null!=t&&iu(t,e,ou)},lu=V,su=Hc,fu=Gc,pu=Le;var hu=function(t){return t};var du=Ue;var yu=function(t){return function(e){return null==e?void 0:e[t]}},vu=function(t){return function(e){return du(e,t)}},mu=V,bu=Le;var gu=function(t){var e=Kc(t);return 1==e.length&&e[0][2]?Zc(e[0][0],e[0][1]):function(r){return r===t||Yc(r,t,e)}},xu=function(t,e){return lu(t)&&su(e)?fu(pu(t),e):function(r){var n=cu(r,t);return void 0===n&&n===e?uu(r,t):au(e,n,3)}},wu=hu,Ou=O,ju=function(t){return mu(t)?yu(bu(t)):vu(t)};var Su=function(t){return"function"==typeof t?t:null==t?wu:"object"==typeof t?Ou(t)?xu(t[0],t[1]):gu(t):ju(t)};var Pu=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1};var Au=Pu,Eu=function(t){return t!=t},ku=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1};var Mu=function(t,e,r){return e==e?ku(t,e,r):Au(t,Eu,r)};var _u=function(t,e){return!!(null==t?0:t.length)&&Mu(t,e,0)>-1};var Tu=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1};var Cu=uc,Nu=function(){},Du=Cu&&1/Di(new Cu([,-0]))[1]==1/0?function(t){return new Cu(t)}:Nu,Iu=Ei,Bu=_u,Ru=Tu,Lu=Mi,zu=Du,$u=Di;var Uu=Su,Fu=function(t,e,r){var n=-1,o=Bu,i=t.length,a=!0,c=[],u=c;if(r)a=!1,o=Ru;else if(i>=200){var l=e?null:zu(t);if(l)return $u(l);a=!1,o=Lu,u=new Iu}else u=e?[]:c;t:for(;++n<i;){var s=t[n],f=e?e(s):s;if(s=r||0!==s?s:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue t;e&&u.push(f),c.push(s)}else o(u,f,r)||(u!==c&&u.push(f),c.push(s))}return c};const qu=r(function(t,e){return t&&t.length?Fu(t,Uu(e)):[]});function Wu(t,e,r){return!0===e?qu(t,r):Q(e)?qu(t,e):t}function Hu(t){return(Hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xu=["ref"];function Vu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Gu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vu(Object(r),!0).forEach(function(e){tl(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vu(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Yu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,el(n.key),n)}}function Ku(t,e,r){return e=Ju(e),function(t,e){if(e&&("object"===Hu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zu()?Reflect.construct(e,r||[],Ju(t).constructor):e.apply(t,r))}function Zu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zu=function(){return!!t})()}function Ju(t){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Qu(t,e){return(Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tl(t,e,r){return(e=el(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function el(t){var e=function(t,e){if("object"!=Hu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Hu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==Hu(e)?e:e+""}function rl(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function nl(t){return t.value}var ol=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return tl(e=Ku(this,t,[].concat(n)),"lastBoundingBox",{width:-1,height:-1}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qu(t,e)}(t,n.PureComponent),e=t,i=[{key:"getWithHeight",value:function(t,e){var r=Gu(Gu({},this.defaultProps),t.props).layout;return"vertical"===r&&jr(t.props.height)?{height:t.props.height}:"horizontal"===r?{width:t.props.width||e}:null}}],(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();return t.height=this.wrapperNode.offsetHeight,t.width=this.wrapperNode.offsetWidth,t}return null}},{key:"updateBBox",value:function(){var t=this.props.onBBoxUpdate,e=this.getBBox();e?(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height,t&&t(e)):-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,t&&t(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(t){var e,r,n=this.props,o=n.layout,i=n.align,a=n.verticalAlign,c=n.margin,u=n.chartWidth,l=n.chartHeight;return t&&(void 0!==t.left&&null!==t.left||void 0!==t.right&&null!==t.right)||(e="center"===i&&"vertical"===o?{left:((u||0)-this.getBBoxSnapshot().width)/2}:"right"===i?{right:c&&c.right||0}:{left:c&&c.left||0}),t&&(void 0!==t.top&&null!==t.top||void 0!==t.bottom&&null!==t.bottom)||(r="middle"===a?{top:((l||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:c&&c.bottom||0}:{top:c&&c.top||0}),Gu(Gu({},e),r)}},{key:"render",value:function(){var t=this,e=this.props,r=e.content,n=e.width,i=e.height,a=e.wrapperStyle,c=e.payloadUniqBy,u=e.payload,l=Gu(Gu({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(a)),a);return o.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(e){t.wrapperNode=e}},function(t,e){if(o.isValidElement(t))return o.cloneElement(t,e);if("function"==typeof t)return o.createElement(t,e);e.ref;var r=rl(e,Xu);return o.createElement(si,r)}(r,Gu(Gu({},this.props),{},{payload:Wu(u,c,nl)})))}}])&&Yu(e.prototype,r),i&&Yu(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();tl(ol,"displayName","Legend"),tl(ol,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var il=da,al=O,cl=E?E.isConcatSpreadable:void 0;var ul=qi,ll=function(t){return al(t)||il(t)||!!(cl&&t&&t[cl])};var sl=function t(e,r,n,o,i){var a=-1,c=e.length;for(n||(n=ll),i||(i=[]);++a<c;){var u=e[a];r>0&&n(u)?r>1?t(u,r-1,n,o,i):ul(i,u):o||(i[i.length]=u)}return i};var fl=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),c=a.length;c--;){var u=a[t?c:++o];if(!1===r(i[u],u,i))break}return e}}(),pl=Qa;var hl=function(t,e){return t&&fl(t,e,pl)},dl=Ya;var yl=function(t,e){return function(r,n){if(null==r)return r;if(!dl(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(hl),vl=yl,ml=Ya;var bl=function(t,e){var r=-1,n=ml(t)?Array(t.length):[];return vl(t,function(t,o,i){n[++r]=e(t,o,i)}),n};var gl=F;var xl=function(t,e){if(t!==e){var r=void 0!==t,n=null===t,o=t==t,i=gl(t),a=void 0!==e,c=null===e,u=e==e,l=gl(e);if(!c&&!l&&!i&&t>e||i&&a&&u&&!c&&!l||n&&a&&u||!r&&u||!o)return 1;if(!n&&!i&&!l&&t<e||l&&r&&o&&!n&&!i||c&&r&&o||!a&&o||!u)return-1}return 0};var wl=je,Ol=Ue,jl=Su,Sl=bl,Pl=function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t},Al=Pa,El=function(t,e,r){for(var n=-1,o=t.criteria,i=e.criteria,a=o.length,c=r.length;++n<a;){var u=xl(o[n],i[n]);if(u)return n>=c?u:u*("desc"==r[n]?-1:1)}return t.index-e.index},kl=hu,Ml=O;var _l=function(t,e,r){e=e.length?wl(e,function(t){return Ml(t)?function(e){return Ol(e,1===t.length?t[0]:t)}:t}):[kl];var n=-1;e=wl(e,Al(jl));var o=Sl(t,function(t,r,o){return{criteria:wl(e,function(e){return e(t)}),index:++n,value:t}});return Pl(o,function(t,e){return El(t,e,r)})};var Tl=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},Cl=Math.max;var Nl=function(t,e,r){return e=Cl(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=Cl(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=n[o];return c[e]=r(a),Tl(t,this,c)}};var Dl=function(t){return function(){return t}},Il=bt,Bl=function(){try{var t=Il(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Rl=Dl,Ll=Bl,zl=Ll?function(t,e){return Ll(t,"toString",{configurable:!0,enumerable:!1,value:Rl(e),writable:!0})}:hu,$l=Date.now;var Ul=function(t){var e=0,r=0;return function(){var n=$l(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(zl),Fl=hu,ql=Nl,Wl=Ul;var Hl=Rt,Xl=Ya,Vl=ba,Gl=G;var Yl=function(t,e,r){if(!Gl(r))return!1;var n=typeof e;return!!("number"==n?Xl(r)&&Vl(e,r.length):"string"==n&&e in r)&&Hl(r[e],t)},Kl=sl,Zl=_l,Jl=Yl;const Ql=r(function(t,e){return Wl(ql(t,e,Fl),t+"")}(function(t,e){if(null==t)return[];var r=e.length;return r>1&&Jl(t,e[0],e[1])?e=[]:r>2&&Jl(e[0],e[1],e[2])&&(e=[e[0]]),Zl(t,Kl(e,1),[])}));function ts(t){return(ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function es(){return es=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},es.apply(this,arguments)}function rs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ns(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ns(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ns(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function os(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function is(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?os(Object(r),!0).forEach(function(e){as(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):os(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function as(t,e,r){var n;return n=function(t,e){if("object"!=ts(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ts(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cs(t){return Array.isArray(t)&&Sr(t[0])&&Sr(t[1])?t.join(" ~ "):t}var us=function(t){var e=t.separator,r=void 0===e?" : ":e,n=t.contentStyle,i=void 0===n?{}:n,a=t.itemStyle,c=void 0===a?{}:a,u=t.labelStyle,l=void 0===u?{}:u,f=t.payload,p=t.formatter,h=t.itemSorter,d=t.wrapperClassName,y=t.labelClassName,v=t.label,m=t.labelFormatter,b=t.accessibilityLayer,g=void 0!==b&&b,x=is({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),w=is({margin:0},l),O=!He(v),j=O?v:"",S=s("recharts-default-tooltip",d),P=s("recharts-tooltip-label",y);O&&m&&null!=f&&(j=m(v,f));var A=g?{role:"status","aria-live":"assertive"}:{};return o.createElement("div",es({className:S,style:x},A),o.createElement("p",{className:P,style:w},o.isValidElement(j)?j:"".concat(j)),function(){if(f&&f.length){var t=(h?Ql(f,h):f).map(function(t,e){if("none"===t.type)return null;var n=is({display:"block",paddingTop:4,paddingBottom:4,color:t.color||"#000"},c),i=t.formatter||p||cs,a=t.value,u=t.name,l=a,s=u;if(i&&null!=l&&null!=s){var h=i(a,u,t,e,f);if(Array.isArray(h)){var d=rs(h,2);l=d[0],s=d[1]}else l=h}return o.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(e),style:n},Sr(s)?o.createElement("span",{className:"recharts-tooltip-item-name"},s):null,Sr(s)?o.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,o.createElement("span",{className:"recharts-tooltip-item-value"},l),o.createElement("span",{className:"recharts-tooltip-item-unit"},t.unit||""))});return o.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},t)}return null}())};function ls(t){return(ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ss(t,e,r){var n;return n=function(t,e){if("object"!=ls(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=ls(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ls(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var fs="recharts-tooltip-wrapper",ps={visibility:"hidden"};function hs(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return s(fs,ss(ss(ss(ss({},"".concat(fs,"-right"),jr(r)&&e&&jr(e.x)&&r>=e.x),"".concat(fs,"-left"),jr(r)&&e&&jr(e.x)&&r<e.x),"".concat(fs,"-bottom"),jr(n)&&e&&jr(e.y)&&n>=e.y),"".concat(fs,"-top"),jr(n)&&e&&jr(e.y)&&n<e.y))}function ds(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,o=t.offsetTopLeft,i=t.position,a=t.reverseDirection,c=t.tooltipDimension,u=t.viewBox,l=t.viewBoxDimension;if(i&&jr(i[n]))return i[n];var s=r[n]-c-o,f=r[n]+o;return e[n]?a[n]?s:f:a[n]?s<u[n]?Math.max(f,u[n]):Math.max(s,u[n]):f+c>u[n]+l?Math.max(s,u[n]):Math.max(f,u[n])}function ys(t){return(ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ms(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vs(Object(r),!0).forEach(function(e){js(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vs(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function bs(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ss(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function gs(t,e,r){return e=ws(e),function(t,e){if(e&&("object"===ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,r||[],ws(t).constructor):e.apply(t,r))}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xs=function(){return!!t})()}function ws(t){return(ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Os(t,e){return(Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function js(t,e,r){return(e=Ss(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ss(t){var e=function(t,e){if("object"!=ys(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=ys(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==ys(e)?e:e+""}var Ps=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return js(e=gs(this,t,[].concat(n)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),js(e,"handleKeyDown",function(t){var r,n,o,i;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(r=null===(n=e.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==r?r:0,y:null!==(o=null===(i=e.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(t,n.PureComponent),bs(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.state.lastBoundingBox.width)>1||Math.abs(t.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:t.width,height:t.height}})}else-1===this.state.lastBoundingBox.width&&-1===this.state.lastBoundingBox.height||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 t,e;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(t=this.props.coordinate)||void 0===t?void 0:t.x)===this.state.dismissedAtCoordinate.x&&(null===(e=this.props.coordinate)||void 0===e?void 0:e.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var t=this,e=this.props,r=e.active,n=e.allowEscapeViewBox,i=e.animationDuration,a=e.animationEasing,c=e.children,u=e.coordinate,l=e.hasPayload,s=e.isAnimationActive,f=e.offset,p=e.position,h=e.reverseDirection,d=e.useTranslate3d,y=e.viewBox,v=e.wrapperStyle,m=function(t){var e,r,n=t.allowEscapeViewBox,o=t.coordinate,i=t.offsetTopLeft,a=t.position,c=t.reverseDirection,u=t.tooltipBox,l=t.useTranslate3d,s=t.viewBox;return{cssProperties:u.height>0&&u.width>0&&o?function(t){var e=t.translateX,r=t.translateY;return{transform:t.useTranslate3d?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}({translateX:e=ds({allowEscapeViewBox:n,coordinate:o,key:"x",offsetTopLeft:i,position:a,reverseDirection:c,tooltipDimension:u.width,viewBox:s,viewBoxDimension:s.width}),translateY:r=ds({allowEscapeViewBox:n,coordinate:o,key:"y",offsetTopLeft:i,position:a,reverseDirection:c,tooltipDimension:u.height,viewBox:s,viewBoxDimension:s.height}),useTranslate3d:l}):ps,cssClasses:hs({translateX:e,translateY:r,coordinate:o})}}({allowEscapeViewBox:n,coordinate:u,offsetTopLeft:f,position:p,reverseDirection:h,tooltipBox:this.state.lastBoundingBox,useTranslate3d:d,viewBox:y}),b=m.cssClasses,g=m.cssProperties,x=ms(ms({transition:s&&r?"transform ".concat(i,"ms ").concat(a):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&l?"visible":"hidden",position:"absolute",top:0,left:0},v);return o.createElement("div",{tabIndex:-1,className:b,style:x,ref:function(e){t.wrapperNode=e}},c)}}])}(),As=!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout);function Es(t){return(Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ks(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Ms(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ks(Object(r),!0).forEach(function(e){Is(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ks(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _s(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bs(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ts(t,e,r){return e=Ns(e),function(t,e){if(e&&("object"===Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Cs()?Reflect.construct(e,r||[],Ns(t).constructor):e.apply(t,r))}function Cs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cs=function(){return!!t})()}function Ns(t){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ds(t,e){return(Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Is(t,e,r){return(e=Bs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bs(t){var e=function(t,e){if("object"!=Es(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==Es(e)?e:e+""}function Rs(t){return t.dataKey}var Ls=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ts(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ds(t,e)}(t,n.PureComponent),_s(t,[{key:"render",value:function(){var t=this,e=this.props,r=e.active,n=e.allowEscapeViewBox,i=e.animationDuration,a=e.animationEasing,c=e.content,u=e.coordinate,l=e.filterNull,s=e.isAnimationActive,f=e.offset,p=e.payload,h=e.payloadUniqBy,d=e.position,y=e.reverseDirection,v=e.useTranslate3d,m=e.viewBox,b=e.wrapperStyle,g=null!=p?p:[];l&&g.length&&(g=Wu(p.filter(function(e){return null!=e.value&&(!0!==e.hide||t.props.includeHidden)}),h,Rs));var x=g.length>0;return o.createElement(Ps,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:s,active:r,coordinate:u,hasPayload:x,offset:f,position:d,reverseDirection:y,useTranslate3d:v,viewBox:m,wrapperStyle:b},function(t,e){return o.isValidElement(t)?o.cloneElement(t,e):"function"==typeof t?o.createElement(t,e):o.createElement(us,e)}(c,Ms(Ms({},this.props),{},{payload:g})))}}])}();Is(Ls,"displayName","Tooltip"),Is(Ls,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!As,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 zs=A,$s=/\s/;var Us=function(t){for(var e=t.length;e--&&$s.test(t.charAt(e)););return e},Fs=/^\s+/;var qs=function(t){return t?t.slice(0,Us(t)+1).replace(Fs,""):t},Ws=G,Hs=F,Xs=/^[-+]0x[0-9a-f]+$/i,Vs=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,Ys=parseInt;var Ks=function(t){if("number"==typeof t)return t;if(Hs(t))return NaN;if(Ws(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ws(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qs(t);var r=Vs.test(t);return r||Gs.test(t)?Ys(t.slice(2),r?2:8):Xs.test(t)?NaN:+t},Zs=G,Js=function(){return zs.Date.now()},Qs=Ks,tf=Math.max,ef=Math.min;var rf=function(t,e,r){var n,o,i,a,c,u,l=0,s=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var r=n,i=o;return n=o=void 0,l=e,a=t.apply(i,r)}function d(t){var r=t-u;return void 0===u||r>=e||r<0||f&&t-l>=i}function y(){var t=Js();if(d(t))return v(t);c=setTimeout(y,function(t){var r=e-(t-u);return f?ef(r,i-(t-l)):r}(t))}function v(t){return c=void 0,p&&n?h(t):(n=o=void 0,a)}function m(){var t=Js(),r=d(t);if(n=arguments,o=this,u=t,r){if(void 0===c)return function(t){return l=t,c=setTimeout(y,e),s?h(t):a}(u);if(f)return clearTimeout(c),c=setTimeout(y,e),h(u)}return void 0===c&&(c=setTimeout(y,e)),a}return e=Qs(e)||0,Zs(r)&&(s=!!r.leading,i=(f="maxWait"in r)?tf(Qs(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),m.cancel=function(){void 0!==c&&clearTimeout(c),l=0,n=u=o=c=void 0},m.flush=function(){return void 0===c?a:v(Js())},m},nf=G;const of=r(function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return nf(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),rf(t,e,{leading:n,maxWait:e,trailing:o})});function af(t){return(af="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function uf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?cf(Object(r),!0).forEach(function(e){lf(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cf(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function lf(t,e,r){var n;return n=function(t,e){if("object"!=af(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=af(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==af(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ff(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ff(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ff(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var pf=n.forwardRef(function(t,e){var r=t.aspect,i=t.initialDimension,a=void 0===i?{width:-1,height:-1}:i,c=t.width,u=void 0===c?"100%":c,l=t.height,f=void 0===l?"100%":l,p=t.minWidth,h=void 0===p?0:p,d=t.minHeight,y=t.maxHeight,v=t.children,m=t.debounce,b=void 0===m?0:m,g=t.id,x=t.className,w=t.onResize,O=t.style,j=void 0===O?{}:O,S=n.useRef(null),P=n.useRef();P.current=w,n.useImperativeHandle(e,function(){return Object.defineProperty(S.current,"current",{get:function(){return S.current},configurable:!0})});var A=sf(n.useState({containerWidth:a.width,containerHeight:a.height}),2),E=A[0],k=A[1],M=n.useCallback(function(t,e){k(function(r){var n=Math.round(t),o=Math.round(e);return r.containerWidth===n&&r.containerHeight===o?r:{containerWidth:n,containerHeight:o}})},[]);n.useEffect(function(){var t=function(t){var e,r=t[0].contentRect,n=r.width,o=r.height;M(n,o),null===(e=P.current)||void 0===e||e.call(P,n,o)};b>0&&(t=of(t,b,{trailing:!0,leading:!1}));var e=new ResizeObserver(t),r=S.current.getBoundingClientRect(),n=r.width,o=r.height;return M(n,o),e.observe(S.current),function(){e.disconnect()}},[M,b]);var _=n.useMemo(function(){var t=E.containerWidth,e=E.containerHeight;if(t<0||e<0)return null;pn(Or(u)||Or(f),"The width(%s) and height(%s) are both fixed numbers,\n       maybe you don't need to use a ResponsiveContainer.",u,f),pn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var i=Or(u)?t:u,a=Or(f)?e:f;r&&r>0&&(i?a=i/r:a&&(i=a*r),y&&a>y&&(a=y)),pn(i>0||a>0,"The width(%s) and height(%s) of chart should be greater than 0,\n       please check the style of container, or the props width(%s) and height(%s),\n       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n       height and width.",i,a,u,f,h,d,r);var c=!Array.isArray(v)&&Hr(v.type).endsWith("Chart");return o.Children.map(v,function(t){return o.isValidElement(t)?n.cloneElement(t,uf({width:i,height:a},c?{style:uf({height:"100%",width:"100%",maxHeight:a,maxWidth:i},t.props.style)}:{})):t})},[r,v,f,y,d,h,E,u]);return o.createElement("div",{id:g?"".concat(g):void 0,className:s("recharts-responsive-container",x),style:uf(uf({},j),{},{width:u,height:f,minWidth:h,minHeight:d,maxHeight:y}),ref:S},_)}),hf=function(t){return null};function df(t){return(df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function vf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yf(Object(r),!0).forEach(function(e){mf(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yf(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function mf(t,e,r){var n;return n=function(t,e){if("object"!=df(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=df(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==df(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}hf.displayName="Cell";var bf={widthCache:{},cacheCount:0},gf={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},xf="recharts_measurement_span";var wf=function(t){if(null==t||As)return{width:0,height:0};var e,r=(e=vf({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),Object.keys(e).forEach(function(t){e[t]||delete e[t]}),e),n=JSON.stringify({text:t,copyStyle:r});if(bf.widthCache[n])return bf.widthCache[n];try{var o=document.getElementById(xf);o||((o=document.createElement("span")).setAttribute("id",xf),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=vf(vf({},gf),r);Object.assign(o.style,i),o.textContent="".concat(t);var a=o.getBoundingClientRect(),c={width:a.width,height:a.height};return bf.widthCache[n]=c,++bf.cacheCount>2e3&&(bf.cacheCount=0,bf.widthCache={}),c}catch(u){return{width:0,height:0}}};function Of(t){return(Of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Sf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Pf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Af(n.key),n)}}function Af(t){var e=function(t,e){if("object"!=Of(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Of(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==Of(e)?e:e+""}var Ef=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,kf=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mf=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,_f=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Tf={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},Cf=Object.keys(Tf),Nf="NaN";var Df=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),""===r||Mf.test(r)||(this.num=NaN,this.unit=""),Cf.includes(r)&&(this.num=function(t,e){return t*Tf[e]}(e,r),this.unit="px")}return e=t,n=[{key:"parse",value:function(e){var r,n=jf(null!==(r=_f.exec(e))&&void 0!==r?r:[],3),o=n[1],i=n[2];return new t(parseFloat(o),null!=i?i:"")}}],(r=[{key:"add",value:function(e){return this.unit!==e.unit?new t(NaN,""):new t(this.num+e.num,this.unit)}},{key:"subtract",value:function(e){return this.unit!==e.unit?new t(NaN,""):new t(this.num-e.num,this.unit)}},{key:"multiply",value:function(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new t(NaN,""):new t(this.num*e.num,this.unit||e.unit)}},{key:"divide",value:function(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new t(NaN,""):new t(this.num/e.num,this.unit||e.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&Pf(e.prototype,r),n&&Pf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();function If(t){if(t.includes(Nf))return Nf;for(var e=t;e.includes("*")||e.includes("/");){var r,n=jf(null!==(r=Ef.exec(e))&&void 0!==r?r:[],4),o=n[1],i=n[2],a=n[3],c=Df.parse(null!=o?o:""),u=Df.parse(null!=a?a:""),l="*"===i?c.multiply(u):c.divide(u);if(l.isNaN())return Nf;e=e.replace(Ef,l.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var s,f=jf(null!==(s=kf.exec(e))&&void 0!==s?s:[],4),p=f[1],h=f[2],d=f[3],y=Df.parse(null!=p?p:""),v=Df.parse(null!=d?d:""),m="+"===h?y.add(v):y.subtract(v);if(m.isNaN())return Nf;e=e.replace(kf,m.toString())}return e}var Bf=/\(([^()]*)\)/;function Rf(t){var e=t.replace(/\s+/g,"");return e=function(t){for(var e=t;e.includes("(");){var r=jf(Bf.exec(e),2)[1];e=e.replace(Bf,If(r))}return e}(e),e=If(e)}function Lf(t){var e=function(t){try{return Rf(t)}catch(e){return Nf}}(t.slice(5,-1));return e===Nf?"":e}var zf=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],$f=["dx","dy","angle","className","breakAll"];function Uf(){return Uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Uf.apply(this,arguments)}function Ff(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function qf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Wf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Hf=/[ \f\n\r\t\v\u2028\u2029]+/,Xf=function(t){var e=t.children,r=t.breakAll,n=t.style;try{var o=[];return He(e)||(o=r?e.toString().split(""):e.toString().split(Hf)),{wordsWithComputedWidth:o.map(function(t){return{word:t,width:wf(t,n).width}}),spaceWidth:r?0:wf(" ",n).width}}catch(i){return null}},Vf=function(t){return[{words:He(t)?[]:t.toString().split(Hf)}]},Gf=function(t){var e=t.width,r=t.scaleToFit,n=t.children,o=t.style,i=t.breakAll,a=t.maxLines;if((e||r)&&!As){var c=Xf({breakAll:i,children:n,style:o});return c?function(t,e,r,n,o){var i=t.maxLines,a=t.children,c=t.style,u=t.breakAll,l=jr(i),s=a,f=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(t,e){var i=e.word,a=e.width,c=t[t.length-1];if(c&&(null==n||o||c.width+a+r<Number(n)))c.words.push(i),c.width+=a+r;else{var u={words:[i],width:a};t.push(u)}return t},[])},p=f(e);if(!l)return p;for(var h,d=function(t){var e=s.slice(0,t),r=Xf({breakAll:u,style:c,children:e+"…"}).wordsWithComputedWidth,o=f(r),a=o.length>i||function(t){return t.reduce(function(t,e){return t.width>e.width?t:e})}(o).width>Number(n);return[a,o]},y=0,v=s.length-1,m=0;y<=v&&m<=s.length-1;){var b=Math.floor((y+v)/2),g=qf(d(b-1),2),x=g[0],w=g[1],O=qf(d(b),1)[0];if(x||O||(y=b+1),x&&O&&(v=b-1),!x&&O){h=w;break}m++}return h||p}({breakAll:i,children:n,maxLines:a,style:o},c.wordsWithComputedWidth,c.spaceWidth,e,r):Vf(n)}return Vf(n)},Yf="#808080",Kf=function(t){var e=t.x,r=void 0===e?0:e,i=t.y,a=void 0===i?0:i,c=t.lineHeight,u=void 0===c?"1em":c,l=t.capHeight,f=void 0===l?"0.71em":l,p=t.scaleToFit,h=void 0!==p&&p,d=t.textAnchor,y=void 0===d?"start":d,v=t.verticalAnchor,m=void 0===v?"end":v,b=t.fill,g=void 0===b?Yf:b,x=Ff(t,zf),w=n.useMemo(function(){return Gf({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:h,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,h,x.style,x.width]),O=x.dx,j=x.dy,S=x.angle,P=x.className,A=x.breakAll,E=Ff(x,$f);if(!Sr(r)||!Sr(a))return null;var k,M=r+(jr(O)?O:0),_=a+(jr(j)?j:0);switch(m){case"start":k=Lf("calc(".concat(f,")"));break;case"middle":k=Lf("calc(".concat((w.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:k=Lf("calc(".concat(w.length-1," * -").concat(u,")"))}var T=[];if(h){var C=w[0].width,N=x.width;T.push("scale(".concat((jr(N)?N/C:1)/C,")"))}return S&&T.push("rotate(".concat(S,", ").concat(M,", ").concat(_,")")),T.length&&(E.transform=T.join(" ")),o.createElement("text",Uf({},Qr(E,!0),{x:M,y:_,className:s("recharts-text",P),textAnchor:y,fill:g.includes("url")?Yf:g}),w.map(function(t,e){var r=t.words.join(A?"":" ");return o.createElement("tspan",{x:M,dy:0===e?k:u,key:"".concat(r,"-").concat(e)},r)}))};function Zf(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jf(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qf(t){let e,r,n;function o(t,n,o=0,i=t.length){if(o<i){if(0!==e(n,n))return i;do{const e=o+i>>>1;r(t[e],n)<0?o=e+1:i=e}while(o<i)}return o}return 2!==t.length?(e=Zf,r=(e,r)=>Zf(t(e),r),n=(e,r)=>t(e)-r):(e=t===Zf||t===Jf?t:tp,r=t,n=t),{left:o,center:function(t,e,r=0,i=t.length){const a=o(t,e,r,i-1);return a>r&&n(t[a-1],e)>-n(t[a],e)?a-1:a},right:function(t,n,o=0,i=t.length){if(o<i){if(0!==e(n,n))return i;do{const e=o+i>>>1;r(t[e],n)<=0?o=e+1:i=e}while(o<i)}return o}}}function tp(){return 0}function ep(t){return null===t?NaN:+t}const rp=Qf(Zf).right;Qf(ep).center;class np extends Map{constructor(t,e=ip){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,n]of t)this.set(r,n)}get(t){return super.get(op(this,t))}has(t){return super.has(op(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const n=e(r);t.has(n)&&(r=t.get(n),t.delete(n));return r}(this,t))}}function op({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function ip(t){return null!==t&&"object"==typeof t?t.valueOf():t}function ap(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}const cp=Math.sqrt(50),up=Math.sqrt(10),lp=Math.sqrt(2);function sp(t,e,r){const n=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(n)),i=n/Math.pow(10,o),a=i>=cp?10:i>=up?5:i>=lp?2:1;let c,u,l;return o<0?(l=Math.pow(10,-o)/a,c=Math.round(t*l),u=Math.round(e*l),c/l<t&&++c,u/l>e&&--u,l=-l):(l=Math.pow(10,o)*a,c=Math.round(t/l),u=Math.round(e/l),c*l<t&&++c,u*l>e&&--u),u<c&&.5<=r&&r<2?sp(t,e,2*r):[c,u,l]}function fp(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const n=e<t,[o,i,a]=n?sp(e,t,r):sp(t,e,r);if(!(i>=o))return[];const c=i-o+1,u=new Array(c);if(n)if(a<0)for(let l=0;l<c;++l)u[l]=(i-l)/-a;else for(let l=0;l<c;++l)u[l]=(i-l)*a;else if(a<0)for(let l=0;l<c;++l)u[l]=(o+l)/-a;else for(let l=0;l<c;++l)u[l]=(o+l)*a;return u}function pp(t,e,r){return sp(t=+t,e=+e,r=+r)[2]}function hp(t,e,r){r=+r;const n=(e=+e)<(t=+t),o=n?pp(e,t,r):pp(t,e,r);return(n?-1:1)*(o<0?1/-o:o)}function dp(t,e){let r;for(const n of t)null!=n&&(r<n||void 0===r&&n>=n)&&(r=n);return r}function yp(t,e){let r;for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);return r}function vp(t,e,r=0,n=1/0,o){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(o=void 0===o?ap:function(t=Zf){if(t===Zf)return ap;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||0===n?n:(0===t(r,r))-(0===t(e,e))}}(o);n>r;){if(n-r>600){const i=n-r+1,a=e-r+1,c=Math.log(i),u=.5*Math.exp(2*c/3),l=.5*Math.sqrt(c*u*(i-u)/i)*(a-i/2<0?-1:1);vp(t,e,Math.max(r,Math.floor(e-a*u/i+l)),Math.min(n,Math.floor(e+(i-a)*u/i+l)),o)}const i=t[e];let a=r,c=n;for(mp(t,r,e),o(t[n],i)>0&&mp(t,r,n);a<c;){for(mp(t,a,c),++a,--c;o(t[a],i)<0;)++a;for(;o(t[c],i)>0;)--c}0===o(t[r],i)?mp(t,r,c):(++c,mp(t,c,n)),c<=e&&(r=c+1),e<=c&&(n=c-1)}return t}function mp(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function bp(t,e,r=ep){if((n=t.length)&&!isNaN(e=+e)){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,o=(n-1)*e,i=Math.floor(o),a=+r(t[i],i,t);return a+(+r(t[i+1],i+1,t)-a)*(o-i)}}function gp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function xp(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const wp=Symbol("implicit");function Op(){var t=new np,e=[],r=[],n=wp;function o(o){let i=t.get(o);if(void 0===i){if(n!==wp)return n;t.set(o,i=e.push(o)-1)}return r[i%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new np;for(const n of r)t.has(n)||t.set(n,e.push(n)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return Op(e,r).unknown(n)},gp.apply(o,arguments),o}function jp(){var t,e,r=Op().unknown(void 0),n=r.domain,o=r.range,i=0,a=1,c=!1,u=0,l=0,s=.5;function f(){var r=n().length,f=a<i,p=f?a:i,h=f?i:a;t=(h-p)/Math.max(1,r-u+2*l),c&&(t=Math.floor(t)),p+=(h-p-t*(r-u))*s,e=t*(1-u),c&&(p=Math.round(p),e=Math.round(e));var d=function(t,e,r){t=+t,e=+e,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var n=-1,o=0|Math.max(0,Math.ceil((e-t)/r)),i=new Array(o);++n<o;)i[n]=t+n*r;return i}(r).map(function(e){return p+t*e});return o(f?d.reverse():d)}return delete r.unknown,r.domain=function(t){return arguments.length?(n(t),f()):n()},r.range=function(t){return arguments.length?([i,a]=t,i=+i,a=+a,f()):[i,a]},r.rangeRound=function(t){return[i,a]=t,i=+i,a=+a,c=!0,f()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(c=!!t,f()):c},r.padding=function(t){return arguments.length?(u=Math.min(1,l=+t),f()):u},r.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),f()):u},r.paddingOuter=function(t){return arguments.length?(l=+t,f()):l},r.align=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),f()):s},r.copy=function(){return jp(n(),[i,a]).round(c).paddingInner(u).paddingOuter(l).align(s)},gp.apply(f(),arguments)}function Sp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Sp(e())},t}function Pp(){return Sp(jp.apply(null,arguments).paddingInner(1))}function Ap(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Ep(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function kp(){}var Mp=.7,_p=1/Mp,Tp="\\s*([+-]?\\d+)\\s*",Cp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Np="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dp=/^#([0-9a-f]{3,8})$/,Ip=new RegExp(`^rgb\\(${Tp},${Tp},${Tp}\\)$`),Bp=new RegExp(`^rgb\\(${Np},${Np},${Np}\\)$`),Rp=new RegExp(`^rgba\\(${Tp},${Tp},${Tp},${Cp}\\)$`),Lp=new RegExp(`^rgba\\(${Np},${Np},${Np},${Cp}\\)$`),zp=new RegExp(`^hsl\\(${Cp},${Np},${Np}\\)$`),$p=new RegExp(`^hsla\\(${Cp},${Np},${Np},${Cp}\\)$`),Up={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Fp(){return this.rgb().formatHex()}function qp(){return this.rgb().formatRgb()}function Wp(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Dp.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Hp(e):3===r?new Gp(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Xp(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Xp(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ip.exec(t))?new Gp(e[1],e[2],e[3],1):(e=Bp.exec(t))?new Gp(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Rp.exec(t))?Xp(e[1],e[2],e[3],e[4]):(e=Lp.exec(t))?Xp(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=zp.exec(t))?th(e[1],e[2]/100,e[3]/100,1):(e=$p.exec(t))?th(e[1],e[2]/100,e[3]/100,e[4]):Up.hasOwnProperty(t)?Hp(Up[t]):"transparent"===t?new Gp(NaN,NaN,NaN,0):null}function Hp(t){return new Gp(t>>16&255,t>>8&255,255&t,1)}function Xp(t,e,r,n){return n<=0&&(t=e=r=NaN),new Gp(t,e,r,n)}function Vp(t,e,r,n){return 1===arguments.length?((o=t)instanceof kp||(o=Wp(o)),o?new Gp((o=o.rgb()).r,o.g,o.b,o.opacity):new Gp):new Gp(t,e,r,null==n?1:n);var o}function Gp(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Yp(){return`#${Qp(this.r)}${Qp(this.g)}${Qp(this.b)}`}function Kp(){const t=Zp(this.opacity);return`${1===t?"rgb(":"rgba("}${Jp(this.r)}, ${Jp(this.g)}, ${Jp(this.b)}${1===t?")":`, ${t})`}`}function Zp(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Jp(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Qp(t){return((t=Jp(t))<16?"0":"")+t.toString(16)}function th(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new rh(t,e,r,n)}function eh(t){if(t instanceof rh)return new rh(t.h,t.s,t.l,t.opacity);if(t instanceof kp||(t=Wp(t)),!t)return new rh;if(t instanceof rh)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,o=Math.min(e,r,n),i=Math.max(e,r,n),a=NaN,c=i-o,u=(i+o)/2;return c?(a=e===i?(r-n)/c+6*(r<n):r===i?(n-e)/c+2:(e-r)/c+4,c/=u<.5?i+o:2-i-o,a*=60):c=u>0&&u<1?0:a,new rh(a,c,u,t.opacity)}function rh(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function nh(t){return(t=(t||0)%360)<0?t+360:t}function oh(t){return Math.max(0,Math.min(1,t||0))}function ih(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}Ap(kp,Wp,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Fp,formatHex:Fp,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return eh(this).formatHsl()},formatRgb:qp,toString:qp}),Ap(Gp,Vp,Ep(kp,{brighter(t){return t=null==t?_p:Math.pow(_p,t),new Gp(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Mp:Math.pow(Mp,t),new Gp(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Gp(Jp(this.r),Jp(this.g),Jp(this.b),Zp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yp,formatHex:Yp,formatHex8:function(){return`#${Qp(this.r)}${Qp(this.g)}${Qp(this.b)}${Qp(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Kp,toString:Kp})),Ap(rh,function(t,e,r,n){return 1===arguments.length?eh(t):new rh(t,e,r,null==n?1:n)},Ep(kp,{brighter(t){return t=null==t?_p:Math.pow(_p,t),new rh(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Mp:Math.pow(Mp,t),new rh(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,o=2*r-n;return new Gp(ih(t>=240?t-240:t+120,o,n),ih(t,o,n),ih(t<120?t+240:t-120,o,n),this.opacity)},clamp(){return new rh(nh(this.h),oh(this.s),oh(this.l),Zp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Zp(this.opacity);return`${1===t?"hsl(":"hsla("}${nh(this.h)}, ${100*oh(this.s)}%, ${100*oh(this.l)}%${1===t?")":`, ${t})`}`}}));const ah=t=>()=>t;function ch(t){return 1===(t=+t)?uh:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):ah(isNaN(e)?r:e)}}function uh(t,e){var r=e-t;return r?function(t,e){return function(r){return t+r*e}}(t,r):ah(isNaN(t)?e:t)}const lh=function t(e){var r=ch(e);function n(t,e){var n=r((t=Vp(t)).r,(e=Vp(e)).r),o=r(t.g,e.g),i=r(t.b,e.b),a=uh(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return n.gamma=t,n}(1);function sh(t,e){e||(e=[]);var r,n=t?Math.min(e.length,t.length):0,o=e.slice();return function(i){for(r=0;r<n;++r)o[r]=t[r]*(1-i)+e[r]*i;return o}}function fh(t,e){var r,n=e?e.length:0,o=t?Math.min(n,t.length):0,i=new Array(o),a=new Array(n);for(r=0;r<o;++r)i[r]=bh(t[r],e[r]);for(;r<n;++r)a[r]=e[r];return function(t){for(r=0;r<o;++r)a[r]=i[r](t);return a}}function ph(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function hh(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function dh(t,e){var r,n={},o={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?n[r]=bh(t[r],e[r]):o[r]=e[r];return function(t){for(r in n)o[r]=n[r](t);return o}}var yh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vh=new RegExp(yh.source,"g");function mh(t,e){var r,n,o,i=yh.lastIndex=vh.lastIndex=0,a=-1,c=[],u=[];for(t+="",e+="";(r=yh.exec(t))&&(n=vh.exec(e));)(o=n.index)>i&&(o=e.slice(i,o),c[a]?c[a]+=o:c[++a]=o),(r=r[0])===(n=n[0])?c[a]?c[a]+=n:c[++a]=n:(c[++a]=null,u.push({i:a,x:hh(r,n)})),i=vh.lastIndex;return i<e.length&&(o=e.slice(i),c[a]?c[a]+=o:c[++a]=o),c.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var r,n=0;n<e;++n)c[(r=u[n]).i]=r.x(t);return c.join("")})}function bh(t,e){var r,n,o=typeof e;return null==e||"boolean"===o?ah(e):("number"===o?hh:"string"===o?(r=Wp(e))?(e=r,lh):mh:e instanceof Wp?lh:e instanceof Date?ph:(n=e,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(e)?fh:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?dh:hh:sh))(t,e)}function gh(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function xh(t){return+t}var wh=[0,1];function Oh(t){return t}function jh(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function Sh(t,e,r){var n=t[0],o=t[1],i=e[0],a=e[1];return o<n?(n=jh(o,n),i=r(a,i)):(n=jh(n,o),i=r(i,a)),function(t){return i(n(t))}}function Ph(t,e,r){var n=Math.min(t.length,e.length)-1,o=new Array(n),i=new Array(n),a=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<n;)o[a]=jh(t[a],t[a+1]),i[a]=r(e[a],e[a+1]);return function(e){var r=rp(t,e,1,n)-1;return i[r](o[r](e))}}function Ah(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Eh(){var t,e,r,n,o,i,a=wh,c=wh,u=bh,l=Oh;function s(){var t,e,r,u=Math.min(a.length,c.length);return l!==Oh&&(t=a[0],e=a[u-1],t>e&&(r=t,t=e,e=r),l=function(r){return Math.max(t,Math.min(e,r))}),n=u>2?Ph:Sh,o=i=null,f}function f(e){return null==e||isNaN(e=+e)?r:(o||(o=n(a.map(t),c,u)))(t(l(e)))}return f.invert=function(r){return l(e((i||(i=n(c,a.map(t),hh)))(r)))},f.domain=function(t){return arguments.length?(a=Array.from(t,xh),s()):a.slice()},f.range=function(t){return arguments.length?(c=Array.from(t),s()):c.slice()},f.rangeRound=function(t){return c=Array.from(t),u=gh,s()},f.clamp=function(t){return arguments.length?(l=!!t||Oh,s()):l!==Oh},f.interpolate=function(t){return arguments.length?(u=t,s()):u},f.unknown=function(t){return arguments.length?(r=t,f):r},function(r,n){return t=r,e=n,s()}}function kh(){return Eh()(Oh,Oh)}function Mh(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function _h(t){return(t=Mh(Math.abs(t)))?t[1]:NaN}var Th,Ch=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nh(t){if(!(e=Ch.exec(t)))throw new Error("invalid format: "+t);var e;return new Dh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Dh(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ih(t,e){var r=Mh(t,e);if(!r)return t+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}Nh.prototype=Dh.prototype,Dh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Bh={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ih(100*t,e),r:Ih,s:function(t,e){var r=Mh(t,e);if(!r)return t+"";var n=r[0],o=r[1],i=o-(Th=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Mh(t,Math.max(0,e+i-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Rh(t){return t}var Lh,zh,$h,Uh=Array.prototype.map,Fh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qh(t){var e,r,n=void 0===t.grouping||void 0===t.thousands?Rh:(e=Uh.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var o=t.length,i=[],a=0,c=e[0],u=0;o>0&&c>0&&(u+c+1>n&&(c=Math.max(1,n-u)),i.push(t.substring(o-=c,o+c)),!((u+=c+1)>n));)c=e[a=(a+1)%e.length];return i.reverse().join(r)}),o=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",c=void 0===t.numerals?Rh:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Uh.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Nh(t)).fill,r=t.align,f=t.sign,p=t.symbol,h=t.zero,d=t.width,y=t.comma,v=t.precision,m=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Bh[b]||(void 0===v&&(v=12),m=!0,b="g"),(h||"0"===e&&"="===r)&&(h=!0,e="0",r="=");var g="$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===p?i:/[%p]/.test(b)?u:"",w=Bh[b],O=/[defgprs%]/.test(b);function j(t){var o,i,u,p=g,j=x;if("c"===b)j=w(t)+j,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:w(Math.abs(t),v),m&&(t=function(t){t:for(var e,r=t.length,n=1,o=-1;n<r;++n)switch(t[n]){case".":o=e=n;break;case"0":0===o&&(o=n),e=n;break;default:if(!+t[n])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),S&&0===+t&&"+"!==f&&(S=!1),p=(S?"("===f?f:l:"-"===f||"("===f?"":f)+p,j=("s"===b?Fh[8+Th/3]:"")+j+(S&&"("===f?")":""),O)for(o=-1,i=t.length;++o<i;)if(48>(u=t.charCodeAt(o))||u>57){j=(46===u?a+t.slice(o+1):t.slice(o))+j,t=t.slice(0,o);break}}y&&!h&&(t=n(t,1/0));var P=p.length+t.length+j.length,A=P<d?new Array(d-P+1).join(e):"";switch(y&&h&&(t=n(A+t,A.length?d-j.length:1/0),A=""),r){case"<":t=p+t+j+A;break;case"=":t=p+A+t+j;break;case"^":t=A.slice(0,P=A.length>>1)+p+t+j+A.slice(P);break;default:t=A+p+t+j}return c(t)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),j.toString=function(){return t+""},j}return{format:f,formatPrefix:function(t,e){var r=f(((t=Nh(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(_h(e)/3))),o=Math.pow(10,-n),i=Fh[8+n/3];return function(t){return r(o*t)+i}}}}function Wh(t,e,r,n){var o,i=hp(t,e,r);switch((n=Nh(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(o=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_h(e)/3)))-_h(Math.abs(t)))}(i,a))||(n.precision=o),$h(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(o=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,_h(e)-_h(t))+1}(i,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=o-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(o=function(t){return Math.max(0,-_h(Math.abs(t)))}(i))||(n.precision=o-2*("%"===n.type))}return zh(n)}function Hh(t){var e=t.domain;return t.ticks=function(t){var r=e();return fp(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var n=e();return Wh(n[0],n[n.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var n,o,i=e(),a=0,c=i.length-1,u=i[a],l=i[c],s=10;for(l<u&&(o=u,u=l,l=o,o=a,a=c,c=o);s-- >0;){if((o=pp(u,l,r))===n)return i[a]=u,i[c]=l,e(i);if(o>0)u=Math.floor(u/o)*o,l=Math.ceil(l/o)*o;else{if(!(o<0))break;u=Math.ceil(u*o)/o,l=Math.floor(l*o)/o}n=o}return t},t}function Xh(){var t=kh();return t.copy=function(){return Ah(t,Xh())},gp.apply(t,arguments),Hh(t)}function Vh(t,e){var r,n=0,o=(t=t.slice()).length-1,i=t[n],a=t[o];return a<i&&(r=n,n=o,o=r,r=i,i=a,a=r),t[n]=e.floor(i),t[o]=e.ceil(a),t}function Gh(t){return Math.log(t)}function Yh(t){return Math.exp(t)}function Kh(t){return-Math.log(-t)}function Zh(t){return-Math.exp(-t)}function Jh(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Qh(t){return(e,r)=>-t(-e,r)}function td(t){const e=t(Gh,Yh),r=e.domain;let n,o,i=10;function a(){return n=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(i),o=function(t){return 10===t?Jh:t===Math.E?Math.exp:e=>Math.pow(t,e)}(i),r()[0]<0?(n=Qh(n),o=Qh(o),t(Kh,Zh)):t(Gh,Yh),e}return e.base=function(t){return arguments.length?(i=+t,a()):i},e.domain=function(t){return arguments.length?(r(t),a()):r()},e.ticks=t=>{const e=r();let a=e[0],c=e[e.length-1];const u=c<a;u&&([a,c]=[c,a]);let l,s,f=n(a),p=n(c);const h=null==t?10:+t;let d=[];if(!(i%1)&&p-f<h){if(f=Math.floor(f),p=Math.ceil(p),a>0){for(;f<=p;++f)for(l=1;l<i;++l)if(s=f<0?l/o(-f):l*o(f),!(s<a)){if(s>c)break;d.push(s)}}else for(;f<=p;++f)for(l=i-1;l>=1;--l)if(s=f>0?l/o(-f):l*o(f),!(s<a)){if(s>c)break;d.push(s)}2*d.length<h&&(d=fp(a,c,h))}else d=fp(f,p,Math.min(p-f,h)).map(o);return u?d.reverse():d},e.tickFormat=(t,r)=>{if(null==t&&(t=10),null==r&&(r=10===i?"s":","),"function"!=typeof r&&(i%1||null!=(r=Nh(r)).precision||(r.trim=!0),r=zh(r)),t===1/0)return r;const a=Math.max(1,i*t/e.ticks().length);return t=>{let e=t/o(Math.round(n(t)));return e*i<i-.5&&(e*=i),e<=a?r(t):""}},e.nice=()=>r(Vh(r(),{floor:t=>o(Math.floor(n(t))),ceil:t=>o(Math.ceil(n(t)))})),e}function ed(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function rd(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function nd(t){var e=1,r=t(ed(e),rd(e));return r.constant=function(r){return arguments.length?t(ed(e=+r),rd(e)):e},Hh(r)}function od(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function id(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function ad(t){return t<0?-t*t:t*t}function cd(t){var e=t(Oh,Oh),r=1;return e.exponent=function(e){return arguments.length?1===(r=+e)?t(Oh,Oh):.5===r?t(id,ad):t(od(r),od(1/r)):r},Hh(e)}function ud(){var t=cd(Eh());return t.copy=function(){return Ah(t,ud()).exponent(t.exponent())},gp.apply(t,arguments),t}function ld(t){return Math.sign(t)*t*t}Lh=qh({thousands:",",grouping:[3],currency:["$",""]}),zh=Lh.format,$h=Lh.formatPrefix;const sd=new Date,fd=new Date;function pd(t,e,r,n){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,n,i)=>{const a=[];if(r=o.ceil(r),i=null==i?1:Math.floor(i),!(r<n&&i>0))return a;let c;do{a.push(c=new Date(+r)),e(r,i),t(r)}while(c<r&&r<n);return a},o.filter=r=>pd(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,n)=>(sd.setTime(+e),fd.setTime(+n),t(sd),t(fd),Math.floor(r(sd,fd))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(n?e=>n(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const hd=pd(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);hd.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?pd(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):hd:null),hd.range;const dd=1e3,yd=6e4,vd=36e5,md=864e5,bd=6048e5,gd=2592e6,xd=31536e6,wd=pd(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*dd)},(t,e)=>(e-t)/dd,t=>t.getUTCSeconds());wd.range;const Od=pd(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*dd)},(t,e)=>{t.setTime(+t+e*yd)},(t,e)=>(e-t)/yd,t=>t.getMinutes());Od.range;const jd=pd(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*yd)},(t,e)=>(e-t)/yd,t=>t.getUTCMinutes());jd.range;const Sd=pd(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*dd-t.getMinutes()*yd)},(t,e)=>{t.setTime(+t+e*vd)},(t,e)=>(e-t)/vd,t=>t.getHours());Sd.range;const Pd=pd(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*vd)},(t,e)=>(e-t)/vd,t=>t.getUTCHours());Pd.range;const Ad=pd(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yd)/md,t=>t.getDate()-1);Ad.range;const Ed=pd(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/md,t=>t.getUTCDate()-1);Ed.range;const kd=pd(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/md,t=>Math.floor(t/md));function Md(t){return pd(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yd)/bd)}kd.range;const _d=Md(0),Td=Md(1),Cd=Md(2),Nd=Md(3),Dd=Md(4),Id=Md(5),Bd=Md(6);function Rd(t){return pd(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/bd)}_d.range,Td.range,Cd.range,Nd.range,Dd.range,Id.range,Bd.range;const Ld=Rd(0),zd=Rd(1),$d=Rd(2),Ud=Rd(3),Fd=Rd(4),qd=Rd(5),Wd=Rd(6);Ld.range,zd.range,$d.range,Ud.range,Fd.range,qd.range,Wd.range;const Hd=pd(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth());Hd.range;const Xd=pd(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth());Xd.range;const Vd=pd(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Vd.every=t=>isFinite(t=Math.floor(t))&&t>0?pd(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null,Vd.range;const Gd=pd(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());function Yd(t,e,r,n,o,i){const a=[[wd,1,dd],[wd,5,5e3],[wd,15,15e3],[wd,30,3e4],[i,1,yd],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,vd],[o,3,108e5],[o,6,216e5],[o,12,432e5],[n,1,md],[n,2,1728e5],[r,1,bd],[e,1,gd],[e,3,7776e6],[t,1,xd]];function c(e,r,n){const o=Math.abs(r-e)/n,i=Qf(([,,t])=>t).right(a,o);if(i===a.length)return t.every(hp(e/xd,r/xd,n));if(0===i)return hd.every(Math.max(hp(e,r,n),1));const[c,u]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return c.every(u)}return[function(t,e,r){const n=e<t;n&&([t,e]=[e,t]);const o=r&&"function"==typeof r.range?r:c(t,e,r),i=o?o.range(t,+e+1):[];return n?i.reverse():i},c]}Gd.every=t=>isFinite(t=Math.floor(t))&&t>0?pd(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null,Gd.range;const[Kd,Zd]=Yd(Gd,Xd,Ld,kd,Pd,jd),[Jd,Qd]=Yd(Vd,Hd,_d,Ad,Sd,Od);function ty(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ey(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ry(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var ny,oy,iy,ay={"-":"",_:" ",0:"0"},cy=/^\s*\d+/,uy=/^%/,ly=/[\\^$*+?|[\]().{}]/g;function sy(t,e,r){var n=t<0?"-":"",o=(n?-t:t)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(e)+o:o)}function fy(t){return t.replace(ly,"\\$&")}function py(t){return new RegExp("^(?:"+t.map(fy).join("|")+")","i")}function hy(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function dy(t,e,r){var n=cy.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function yy(t,e,r){var n=cy.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function vy(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function my(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function by(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function gy(t,e,r){var n=cy.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function xy(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function wy(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Oy(t,e,r){var n=cy.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function jy(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Sy(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Py(t,e,r){var n=cy.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Ay(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Ey(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function ky(t,e,r){var n=cy.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function My(t,e,r){var n=cy.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function _y(t,e,r){var n=cy.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Ty(t,e,r){var n=uy.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Cy(t,e,r){var n=cy.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Ny(t,e,r){var n=cy.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Dy(t,e){return sy(t.getDate(),e,2)}function Iy(t,e){return sy(t.getHours(),e,2)}function By(t,e){return sy(t.getHours()%12||12,e,2)}function Ry(t,e){return sy(1+Ad.count(Vd(t),t),e,3)}function Ly(t,e){return sy(t.getMilliseconds(),e,3)}function zy(t,e){return Ly(t,e)+"000"}function $y(t,e){return sy(t.getMonth()+1,e,2)}function Uy(t,e){return sy(t.getMinutes(),e,2)}function Fy(t,e){return sy(t.getSeconds(),e,2)}function qy(t){var e=t.getDay();return 0===e?7:e}function Wy(t,e){return sy(_d.count(Vd(t)-1,t),e,2)}function Hy(t){var e=t.getDay();return e>=4||0===e?Dd(t):Dd.ceil(t)}function Xy(t,e){return t=Hy(t),sy(Dd.count(Vd(t),t)+(4===Vd(t).getDay()),e,2)}function Vy(t){return t.getDay()}function Gy(t,e){return sy(Td.count(Vd(t)-1,t),e,2)}function Yy(t,e){return sy(t.getFullYear()%100,e,2)}function Ky(t,e){return sy((t=Hy(t)).getFullYear()%100,e,2)}function Zy(t,e){return sy(t.getFullYear()%1e4,e,4)}function Jy(t,e){var r=t.getDay();return sy((t=r>=4||0===r?Dd(t):Dd.ceil(t)).getFullYear()%1e4,e,4)}function Qy(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+sy(e/60|0,"0",2)+sy(e%60,"0",2)}function tv(t,e){return sy(t.getUTCDate(),e,2)}function ev(t,e){return sy(t.getUTCHours(),e,2)}function rv(t,e){return sy(t.getUTCHours()%12||12,e,2)}function nv(t,e){return sy(1+Ed.count(Gd(t),t),e,3)}function ov(t,e){return sy(t.getUTCMilliseconds(),e,3)}function iv(t,e){return ov(t,e)+"000"}function av(t,e){return sy(t.getUTCMonth()+1,e,2)}function cv(t,e){return sy(t.getUTCMinutes(),e,2)}function uv(t,e){return sy(t.getUTCSeconds(),e,2)}function lv(t){var e=t.getUTCDay();return 0===e?7:e}function sv(t,e){return sy(Ld.count(Gd(t)-1,t),e,2)}function fv(t){var e=t.getUTCDay();return e>=4||0===e?Fd(t):Fd.ceil(t)}function pv(t,e){return t=fv(t),sy(Fd.count(Gd(t),t)+(4===Gd(t).getUTCDay()),e,2)}function hv(t){return t.getUTCDay()}function dv(t,e){return sy(zd.count(Gd(t)-1,t),e,2)}function yv(t,e){return sy(t.getUTCFullYear()%100,e,2)}function vv(t,e){return sy((t=fv(t)).getUTCFullYear()%100,e,2)}function mv(t,e){return sy(t.getUTCFullYear()%1e4,e,4)}function bv(t,e){var r=t.getUTCDay();return sy((t=r>=4||0===r?Fd(t):Fd.ceil(t)).getUTCFullYear()%1e4,e,4)}function gv(){return"+0000"}function xv(){return"%"}function wv(t){return+t}function Ov(t){return Math.floor(+t/1e3)}function jv(t){return new Date(t)}function Sv(t){return t instanceof Date?+t:+new Date(+t)}function Pv(t,e,r,n,o,i,a,c,u,l){var s=kh(),f=s.invert,p=s.domain,h=l(".%L"),d=l(":%S"),y=l("%I:%M"),v=l("%I %p"),m=l("%a %d"),b=l("%b %d"),g=l("%B"),x=l("%Y");function w(t){return(u(t)<t?h:c(t)<t?d:a(t)<t?y:i(t)<t?v:n(t)<t?o(t)<t?m:b:r(t)<t?g:x)(t)}return s.invert=function(t){return new Date(f(t))},s.domain=function(t){return arguments.length?p(Array.from(t,Sv)):p().map(jv)},s.ticks=function(e){var r=p();return t(r[0],r[r.length-1],null==e?10:e)},s.tickFormat=function(t,e){return null==e?w:l(e)},s.nice=function(t){var r=p();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],null==t?10:t)),t?p(Vh(r,t)):s},s.copy=function(){return Ah(s,Pv(t,e,r,n,o,i,a,c,u,l))},s}function Av(){var t,e,r,n,o,i=0,a=1,c=Oh,u=!1;function l(e){return null==e||isNaN(e=+e)?o:c(0===r?.5:(e=(n(e)-t)*r,u?Math.max(0,Math.min(1,e)):e))}function s(t){return function(e){var r,n;return arguments.length?([r,n]=e,c=t(r,n),l):[c(0),c(1)]}}return l.domain=function(o){return arguments.length?([i,a]=o,t=n(i=+i),e=n(a=+a),r=t===e?0:1/(e-t),l):[i,a]},l.clamp=function(t){return arguments.length?(u=!!t,l):u},l.interpolator=function(t){return arguments.length?(c=t,l):c},l.range=s(bh),l.rangeRound=s(gh),l.unknown=function(t){return arguments.length?(o=t,l):o},function(o){return n=o,t=o(i),e=o(a),r=t===e?0:1/(e-t),l}}function Ev(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function kv(){var t=cd(Av());return t.copy=function(){return Ev(t,kv()).exponent(t.exponent())},xp.apply(t,arguments)}function Mv(){var t,e,r,n,o,i,a,c=0,u=.5,l=1,s=1,f=Oh,p=!1;function h(t){return isNaN(t=+t)?a:(t=.5+((t=+i(t))-e)*(s*t<s*e?n:o),f(p?Math.max(0,Math.min(1,t)):t))}function d(t){return function(e){var r,n,o;return arguments.length?([r,n,o]=e,f=function(t,e){void 0===e&&(e=t,t=bh);for(var r=0,n=e.length-1,o=e[0],i=new Array(n<0?0:n);r<n;)i[r]=t(o,o=e[++r]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return i[e](t-e)}}(t,[r,n,o]),h):[f(0),f(.5),f(1)]}}return h.domain=function(a){return arguments.length?([c,u,l]=a,t=i(c=+c),e=i(u=+u),r=i(l=+l),n=t===e?0:.5/(e-t),o=e===r?0:.5/(r-e),s=e<t?-1:1,h):[c,u,l]},h.clamp=function(t){return arguments.length?(p=!!t,h):p},h.interpolator=function(t){return arguments.length?(f=t,h):f},h.range=d(bh),h.rangeRound=d(gh),h.unknown=function(t){return arguments.length?(a=t,h):a},function(a){return i=a,t=a(c),e=a(u),r=a(l),n=t===e?0:.5/(e-t),o=e===r?0:.5/(r-e),s=e<t?-1:1,h}}function _v(){var t=cd(Mv());return t.copy=function(){return Ev(t,_v()).exponent(t.exponent())},xp.apply(t,arguments)}!function(t){ny=function(t){var e=t.dateTime,r=t.date,n=t.time,o=t.periods,i=t.days,a=t.shortDays,c=t.months,u=t.shortMonths,l=py(o),s=hy(o),f=py(i),p=hy(i),h=py(a),d=hy(a),y=py(c),v=hy(c),m=py(u),b=hy(u),g={a:function(t){return a[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return c[t.getMonth()]},c:null,d:Dy,e:Dy,f:zy,g:Ky,G:Jy,H:Iy,I:By,j:Ry,L:Ly,m:$y,M:Uy,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:wv,s:Ov,S:Fy,u:qy,U:Wy,V:Xy,w:Vy,W:Gy,x:null,X:null,y:Yy,Y:Zy,Z:Qy,"%":xv},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return i[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return c[t.getUTCMonth()]},c:null,d:tv,e:tv,f:iv,g:vv,G:bv,H:ev,I:rv,j:nv,L:ov,m:av,M:cv,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:wv,s:Ov,S:uv,u:lv,U:sv,V:pv,w:hv,W:dv,x:null,X:null,y:yv,Y:mv,Z:gv,"%":xv},w={a:function(t,e,r){var n=h.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){var n=f.exec(e.slice(r));return n?(t.w=p.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){var n=m.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,r,n){return S(t,e,r,n)},d:Sy,e:Sy,f:_y,g:xy,G:gy,H:Ay,I:Ay,j:Py,L:My,m:jy,M:Ey,p:function(t,e,r){var n=l.exec(e.slice(r));return n?(t.p=s.get(n[0].toLowerCase()),r+n[0].length):-1},q:Oy,Q:Cy,s:Ny,S:ky,u:yy,U:vy,V:my,w:dy,W:by,x:function(t,e,n){return S(t,r,e,n)},X:function(t,e,r){return S(t,n,e,r)},y:xy,Y:gy,Z:wy,"%":Ty};function O(t,e){return function(r){var n,o,i,a=[],c=-1,u=0,l=t.length;for(r instanceof Date||(r=new Date(+r));++c<l;)37===t.charCodeAt(c)&&(a.push(t.slice(u,c)),null!=(o=ay[n=t.charAt(++c)])?n=t.charAt(++c):o="e"===n?" ":"0",(i=e[n])&&(n=i(r,o)),a.push(n),u=c+1);return a.push(t.slice(u,c)),a.join("")}}function j(t,e){return function(r){var n,o,i=ry(1900,void 0,1);if(S(i,t,r+="",0)!=r.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(e&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(n=ey(ry(i.y,0,1))).getUTCDay(),n=o>4||0===o?zd.ceil(n):zd(n),n=Ed.offset(n,7*(i.V-1)),i.y=n.getUTCFullYear(),i.m=n.getUTCMonth(),i.d=n.getUTCDate()+(i.w+6)%7):(o=(n=ty(ry(i.y,0,1))).getDay(),n=o>4||0===o?Td.ceil(n):Td(n),n=Ad.offset(n,7*(i.V-1)),i.y=n.getFullYear(),i.m=n.getMonth(),i.d=n.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?ey(ry(i.y,0,1)).getUTCDay():ty(ry(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,ey(i)):ty(i)}}function S(t,e,r,n){for(var o,i,a=0,c=e.length,u=r.length;a<c;){if(n>=u)return-1;if(37===(o=e.charCodeAt(a++))){if(o=e.charAt(a++),!(i=w[o in ay?e.charAt(a++):o])||(n=i(t,r,n))<0)return-1}else if(o!=r.charCodeAt(n++))return-1}return n}return g.x=O(r,g),g.X=O(n,g),g.c=O(e,g),x.x=O(r,x),x.X=O(n,x),x.c=O(e,x),{format:function(t){var e=O(t+="",g);return e.toString=function(){return t},e},parse:function(t){var e=j(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=O(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=j(t+="",!0);return e.toString=function(){return t},e}}}(t),oy=ny.format,ny.parse,iy=ny.utcFormat,ny.utcParse}({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"]});const Tv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:jp,scaleDiverging:function t(){var e=Hh(Mv()(Oh));return e.copy=function(){return Ev(e,t())},xp.apply(e,arguments)},scaleDivergingLog:function t(){var e=td(Mv()).domain([.1,1,10]);return e.copy=function(){return Ev(e,t()).base(e.base())},xp.apply(e,arguments)},scaleDivergingPow:_v,scaleDivergingSqrt:function(){return _v.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function t(){var e=nd(Mv());return e.copy=function(){return Ev(e,t()).constant(e.constant())},xp.apply(e,arguments)},scaleIdentity:function t(e){var r;function n(t){return null==t||isNaN(t=+t)?r:t}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,xh),n):e.slice()},n.unknown=function(t){return arguments.length?(r=t,n):r},n.copy=function(){return t(e).unknown(r)},e=arguments.length?Array.from(e,xh):[0,1],Hh(n)},scaleImplicit:wp,scaleLinear:Xh,scaleLog:function t(){const e=td(Eh()).domain([1,10]);return e.copy=()=>Ah(e,t()).base(e.base()),gp.apply(e,arguments),e},scaleOrdinal:Op,scalePoint:Pp,scalePow:ud,scaleQuantile:function t(){var e,r=[],n=[],o=[];function i(){var t=0,e=Math.max(1,n.length);for(o=new Array(e-1);++t<e;)o[t-1]=bp(r,t/e);return a}function a(t){return null==t||isNaN(t=+t)?e:n[rp(o,t)]}return a.invertExtent=function(t){var e=n.indexOf(t);return e<0?[NaN,NaN]:[e>0?o[e-1]:r[0],e<o.length?o[e]:r[r.length-1]]},a.domain=function(t){if(!arguments.length)return r.slice();r=[];for(let e of t)null==e||isNaN(e=+e)||r.push(e);return r.sort(Zf),i()},a.range=function(t){return arguments.length?(n=Array.from(t),i()):n.slice()},a.unknown=function(t){return arguments.length?(e=t,a):e},a.quantiles=function(){return o.slice()},a.copy=function(){return t().domain(r).range(n).unknown(e)},gp.apply(a,arguments)},scaleQuantize:function t(){var e,r=0,n=1,o=1,i=[.5],a=[0,1];function c(t){return null!=t&&t<=t?a[rp(i,t,0,o)]:e}function u(){var t=-1;for(i=new Array(o);++t<o;)i[t]=((t+1)*n-(t-o)*r)/(o+1);return c}return c.domain=function(t){return arguments.length?([r,n]=t,r=+r,n=+n,u()):[r,n]},c.range=function(t){return arguments.length?(o=(a=Array.from(t)).length-1,u()):a.slice()},c.invertExtent=function(t){var e=a.indexOf(t);return e<0?[NaN,NaN]:e<1?[r,i[0]]:e>=o?[i[o-1],n]:[i[e-1],i[e]]},c.unknown=function(t){return arguments.length?(e=t,c):c},c.thresholds=function(){return i.slice()},c.copy=function(){return t().domain([r,n]).range(a).unknown(e)},gp.apply(Hh(c),arguments)},scaleRadial:function t(){var e,r=kh(),n=[0,1],o=!1;function i(t){var n=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(r(t));return isNaN(n)?e:o?Math.round(n):n}return i.invert=function(t){return r.invert(ld(t))},i.domain=function(t){return arguments.length?(r.domain(t),i):r.domain()},i.range=function(t){return arguments.length?(r.range((n=Array.from(t,xh)).map(ld)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(o=!!t,i):o},i.clamp=function(t){return arguments.length?(r.clamp(t),i):r.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return t(r.domain(),n).round(o).clamp(r.clamp()).unknown(e)},gp.apply(i,arguments),Hh(i)},scaleSequential:function t(){var e=Hh(Av()(Oh));return e.copy=function(){return Ev(e,t())},xp.apply(e,arguments)},scaleSequentialLog:function t(){var e=td(Av()).domain([1,10]);return e.copy=function(){return Ev(e,t()).base(e.base())},xp.apply(e,arguments)},scaleSequentialPow:kv,scaleSequentialQuantile:function t(){var e=[],r=Oh;function n(t){if(null!=t&&!isNaN(t=+t))return r((rp(e,t,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let r of t)null==r||isNaN(r=+r)||e.push(r);return e.sort(Zf),n},n.interpolator=function(t){return arguments.length?(r=t,n):r},n.range=function(){return e.map((t,n)=>r(n/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(r,n)=>function(t,e){if((r=(t=Float64Array.from(function*(t){for(let e of t)null!=e&&(e=+e)>=e&&(yield e)}(t))).length)&&!isNaN(e=+e)){if(e<=0||r<2)return yp(t);if(e>=1)return dp(t);var r,n=(r-1)*e,o=Math.floor(n),i=dp(vp(t,o).subarray(0,o+1));return i+(yp(t.subarray(o+1))-i)*(n-o)}}(e,n/t))},n.copy=function(){return t(r).domain(e)},xp.apply(n,arguments)},scaleSequentialSqrt:function(){return kv.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function t(){var e=nd(Av());return e.copy=function(){return Ev(e,t()).constant(e.constant())},xp.apply(e,arguments)},scaleSqrt:function(){return ud.apply(null,arguments).exponent(.5)},scaleSymlog:function t(){var e=nd(Eh());return e.copy=function(){return Ah(e,t()).constant(e.constant())},gp.apply(e,arguments)},scaleThreshold:function t(){var e,r=[.5],n=[0,1],o=1;function i(t){return null!=t&&t<=t?n[rp(r,t,0,o)]:e}return i.domain=function(t){return arguments.length?(r=Array.from(t),o=Math.min(r.length,n.length-1),i):r.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),o=Math.min(r.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var e=n.indexOf(t);return[r[e-1],r[e]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return t().domain(r).range(n).unknown(e)},gp.apply(i,arguments)},scaleTime:function(){return gp.apply(Pv(Jd,Qd,Vd,Hd,_d,Ad,Sd,Od,wd,oy).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return gp.apply(Pv(Kd,Zd,Gd,Xd,Ld,Ed,Pd,jd,wd,iy).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:Wh},Symbol.toStringTag,{value:"Module"}));var Cv=F;var Nv=function(t,e,r){for(var n=-1,o=t.length;++n<o;){var i=t[n],a=e(i);if(null!=a&&(void 0===c?a==a&&!Cv(a):r(a,c)))var c=a,u=i}return u};var Dv=Nv,Iv=function(t,e){return t>e},Bv=hu;const Rv=r(function(t){return t&&t.length?Dv(t,Bv,Iv):void 0});var Lv=Nv,zv=function(t,e){return t<e},$v=hu;const Uv=r(function(t){return t&&t.length?Lv(t,$v,zv):void 0});var Fv=je,qv=Su,Wv=bl,Hv=O;var Xv=sl,Vv=function(t,e){return(Hv(t)?Fv:Wv)(t,qv(e))};const Gv=r(function(t,e){return Xv(Vv(t,e),1)});var Yv=Uc;const Kv=r(function(t,e){return Yv(t,e)});var Zv,Jv=1e9,Qv=!0,tm="[DecimalError] ",em=tm+"Invalid argument: ",rm=tm+"Exponent out of range: ",nm=Math.floor,om=Math.pow,im=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,am=1e7,cm=9007199254740991,um=nm(1286742750677284.5),lm={};function sm(t,e){var r,n,o,i,a,c,u,l,s=t.constructor,f=s.precision;if(!t.s||!e.s)return e.s||(e=new s(t)),Qv?xm(e,f):e;if(u=t.d,l=e.d,a=t.e,o=e.e,u=u.slice(),i=a-o){for(i<0?(n=u,i=-i,c=l.length):(n=l,o=a,c=u.length),i>(c=(a=Math.ceil(f/7))>c?a+1:c+1)&&(i=c,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((c=u.length)-(i=l.length)<0&&(i=c,n=l,l=u,u=n),r=0;i;)r=(u[--i]=u[i]+l[i]+r)/am|0,u[i]%=am;for(r&&(u.unshift(r),++o),c=u.length;0==u[--c];)u.pop();return e.d=u,e.e=o,Qv?xm(e,f):e}function fm(t,e,r){if(t!==~~t||t<e||t>r)throw Error(em+t)}function pm(t){var e,r,n,o=t.length-1,i="",a=t[0];if(o>0){for(i+=a,e=1;e<o;e++)(r=7-(n=t[e]+"").length)&&(i+=mm(r)),i+=n;(r=7-(n=(a=t[e])+"").length)&&(i+=mm(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}lm.absoluteValue=lm.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t},lm.comparedTo=lm.cmp=function(t){var e,r,n,o,i=this;if(t=new i.constructor(t),i.s!==t.s)return i.s||-t.s;if(i.e!==t.e)return i.e>t.e^i.s<0?1:-1;for(e=0,r=(n=i.d.length)<(o=t.d.length)?n:o;e<r;++e)if(i.d[e]!==t.d[e])return i.d[e]>t.d[e]^i.s<0?1:-1;return n===o?0:n>o^i.s<0?1:-1},lm.decimalPlaces=lm.dp=function(){var t=this,e=t.d.length-1,r=7*(e-t.e);if(e=t.d[e])for(;e%10==0;e/=10)r--;return r<0?0:r},lm.dividedBy=lm.div=function(t){return hm(this,new this.constructor(t))},lm.dividedToIntegerBy=lm.idiv=function(t){var e=this.constructor;return xm(hm(this,new e(t),0,1),e.precision)},lm.equals=lm.eq=function(t){return!this.cmp(t)},lm.exponent=function(){return ym(this)},lm.greaterThan=lm.gt=function(t){return this.cmp(t)>0},lm.greaterThanOrEqualTo=lm.gte=function(t){return this.cmp(t)>=0},lm.isInteger=lm.isint=function(){return this.e>this.d.length-2},lm.isNegative=lm.isneg=function(){return this.s<0},lm.isPositive=lm.ispos=function(){return this.s>0},lm.isZero=function(){return 0===this.s},lm.lessThan=lm.lt=function(t){return this.cmp(t)<0},lm.lessThanOrEqualTo=lm.lte=function(t){return this.cmp(t)<1},lm.logarithm=lm.log=function(t){var e,r=this,n=r.constructor,o=n.precision,i=o+5;if(void 0===t)t=new n(10);else if((t=new n(t)).s<1||t.eq(Zv))throw Error(tm+"NaN");if(r.s<1)throw Error(tm+(r.s?"NaN":"-Infinity"));return r.eq(Zv)?new n(0):(Qv=!1,e=hm(bm(r,i),bm(t,i),i),Qv=!0,xm(e,o))},lm.minus=lm.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?wm(e,t):sm(e,(t.s=-t.s,t))},lm.modulo=lm.mod=function(t){var e,r=this,n=r.constructor,o=n.precision;if(!(t=new n(t)).s)throw Error(tm+"NaN");return r.s?(Qv=!1,e=hm(r,t,0,1).times(t),Qv=!0,r.minus(e)):xm(new n(r),o)},lm.naturalExponential=lm.exp=function(){return dm(this)},lm.naturalLogarithm=lm.ln=function(){return bm(this)},lm.negated=lm.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t},lm.plus=lm.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?sm(e,t):wm(e,(t.s=-t.s,t))},lm.precision=lm.sd=function(t){var e,r,n,o=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(em+t);if(e=ym(o)+1,r=7*(n=o.d.length-1)+1,n=o.d[n]){for(;n%10==0;n/=10)r--;for(n=o.d[0];n>=10;n/=10)r++}return t&&e>r?e:r},lm.squareRoot=lm.sqrt=function(){var t,e,r,n,o,i,a,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(tm+"NaN")}for(t=ym(c),Qv=!1,0==(o=Math.sqrt(+c))||o==1/0?(((e=pm(c.d)).length+t)%2==0&&(e+="0"),o=Math.sqrt(e),t=nm((t+1)/2)-(t<0||t%2),n=new u(e=o==1/0?"5e"+t:(e=o.toExponential()).slice(0,e.indexOf("e")+1)+t)):n=new u(o.toString()),o=a=(r=u.precision)+3;;)if(n=(i=n).plus(hm(c,i,a+2)).times(.5),pm(i.d).slice(0,a)===(e=pm(n.d)).slice(0,a)){if(e=e.slice(a-3,a+1),o==a&&"4999"==e){if(xm(i,r+1,0),i.times(i).eq(c)){n=i;break}}else if("9999"!=e)break;a+=4}return Qv=!0,xm(n,r)},lm.times=lm.mul=function(t){var e,r,n,o,i,a,c,u,l,s=this,f=s.constructor,p=s.d,h=(t=new f(t)).d;if(!s.s||!t.s)return new f(0);for(t.s*=s.s,r=s.e+t.e,(u=p.length)<(l=h.length)&&(i=p,p=h,h=i,a=u,u=l,l=a),i=[],n=a=u+l;n--;)i.push(0);for(n=l;--n>=0;){for(e=0,o=u+n;o>n;)c=i[o]+h[n]*p[o-n-1]+e,i[o--]=c%am|0,e=c/am|0;i[o]=(i[o]+e)%am|0}for(;!i[--a];)i.pop();return e?++r:i.shift(),t.d=i,t.e=r,Qv?xm(t,f.precision):t},lm.toDecimalPlaces=lm.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),void 0===t?r:(fm(t,0,Jv),void 0===e?e=n.rounding:fm(e,0,8),xm(r,t+ym(r)+1,e))},lm.toExponential=function(t,e){var r,n=this,o=n.constructor;return void 0===t?r=Om(n,!0):(fm(t,0,Jv),void 0===e?e=o.rounding:fm(e,0,8),r=Om(n=xm(new o(n),t+1,e),!0,t+1)),r},lm.toFixed=function(t,e){var r,n,o=this,i=o.constructor;return void 0===t?Om(o):(fm(t,0,Jv),void 0===e?e=i.rounding:fm(e,0,8),r=Om((n=xm(new i(o),t+ym(o)+1,e)).abs(),!1,t+ym(n)+1),o.isneg()&&!o.isZero()?"-"+r:r)},lm.toInteger=lm.toint=function(){var t=this,e=t.constructor;return xm(new e(t),ym(t)+1,e.rounding)},lm.toNumber=function(){return+this},lm.toPower=lm.pow=function(t){var e,r,n,o,i,a,c=this,u=c.constructor,l=+(t=new u(t));if(!t.s)return new u(Zv);if(!(c=new u(c)).s){if(t.s<1)throw Error(tm+"Infinity");return c}if(c.eq(Zv))return c;if(n=u.precision,t.eq(Zv))return xm(c,n);if(a=(e=t.e)>=(r=t.d.length-1),i=c.s,a){if((r=l<0?-l:l)<=cm){for(o=new u(Zv),e=Math.ceil(n/7+4),Qv=!1;r%2&&jm((o=o.times(c)).d,e),0!==(r=nm(r/2));)jm((c=c.times(c)).d,e);return Qv=!0,t.s<0?new u(Zv).div(o):xm(o,n)}}else if(i<0)throw Error(tm+"NaN");return i=i<0&&1&t.d[Math.max(e,r)]?-1:1,c.s=1,Qv=!1,o=t.times(bm(c,n+12)),Qv=!0,(o=dm(o)).s=i,o},lm.toPrecision=function(t,e){var r,n,o=this,i=o.constructor;return void 0===t?n=Om(o,(r=ym(o))<=i.toExpNeg||r>=i.toExpPos):(fm(t,1,Jv),void 0===e?e=i.rounding:fm(e,0,8),n=Om(o=xm(new i(o),t,e),t<=(r=ym(o))||r<=i.toExpNeg,t)),n},lm.toSignificantDigits=lm.tosd=function(t,e){var r=this.constructor;return void 0===t?(t=r.precision,e=r.rounding):(fm(t,1,Jv),void 0===e?e=r.rounding:fm(e,0,8)),xm(new r(this),t,e)},lm.toString=lm.valueOf=lm.val=lm.toJSON=lm[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=ym(t),r=t.constructor;return Om(t,e<=r.toExpNeg||e>=r.toExpPos)};var hm=function(){function t(t,e){var r,n=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+n,t[o]=r%am|0,n=r/am|0;return n&&t.unshift(n),t}function e(t,e,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(t[o]!=e[o]){i=t[o]>e[o]?1:-1;break}return i}function r(t,e,r){for(var n=0;r--;)t[r]-=n,n=t[r]<e[r]?1:0,t[r]=n*am+t[r]-e[r];for(;!t[0]&&t.length>1;)t.shift()}return function(n,o,i,a){var c,u,l,s,f,p,h,d,y,v,m,b,g,x,w,O,j,S,P=n.constructor,A=n.s==o.s?1:-1,E=n.d,k=o.d;if(!n.s)return new P(n);if(!o.s)throw Error(tm+"Division by zero");for(u=n.e-o.e,j=k.length,w=E.length,d=(h=new P(A)).d=[],l=0;k[l]==(E[l]||0);)++l;if(k[l]>(E[l]||0)&&--u,(b=null==i?i=P.precision:a?i+(ym(n)-ym(o))+1:i)<0)return new P(0);if(b=b/7+2|0,l=0,1==j)for(s=0,k=k[0],b++;(l<w||s)&&b--;l++)g=s*am+(E[l]||0),d[l]=g/k|0,s=g%k|0;else{for((s=am/(k[0]+1)|0)>1&&(k=t(k,s),E=t(E,s),j=k.length,w=E.length),x=j,v=(y=E.slice(0,j)).length;v<j;)y[v++]=0;(S=k.slice()).unshift(0),O=k[0],k[1]>=am/2&&++O;do{s=0,(c=e(k,y,j,v))<0?(m=y[0],j!=v&&(m=m*am+(y[1]||0)),(s=m/O|0)>1?(s>=am&&(s=am-1),1==(c=e(f=t(k,s),y,p=f.length,v=y.length))&&(s--,r(f,j<p?S:k,p))):(0==s&&(c=s=1),f=k.slice()),(p=f.length)<v&&f.unshift(0),r(y,f,v),-1==c&&(c=e(k,y,j,v=y.length))<1&&(s++,r(y,j<v?S:k,v)),v=y.length):0===c&&(s++,y=[0]),d[l++]=s,c&&y[0]?y[v++]=E[x]||0:(y=[E[x]],v=1)}while((x++<w||void 0!==y[0])&&b--)}return d[0]||d.shift(),h.e=u,xm(h,a?i+ym(h)+1:i)}}();function dm(t,e){var r,n,o,i,a,c=0,u=0,l=t.constructor,s=l.precision;if(ym(t)>16)throw Error(rm+ym(t));if(!t.s)return new l(Zv);for(Qv=!1,a=s,i=new l(.03125);t.abs().gte(.1);)t=t.times(i),u+=5;for(a+=Math.log(om(2,u))/Math.LN10*2+5|0,r=n=o=new l(Zv),l.precision=a;;){if(n=xm(n.times(t),a),r=r.times(++c),pm((i=o.plus(hm(n,r,a))).d).slice(0,a)===pm(o.d).slice(0,a)){for(;u--;)o=xm(o.times(o),a);return l.precision=s,null==e?(Qv=!0,xm(o,s)):o}o=i}}function ym(t){for(var e=7*t.e,r=t.d[0];r>=10;r/=10)e++;return e}function vm(t,e,r){if(e>t.LN10.sd())throw Qv=!0,r&&(t.precision=r),Error(tm+"LN10 precision limit exceeded");return xm(new t(t.LN10),e)}function mm(t){for(var e="";t--;)e+="0";return e}function bm(t,e){var r,n,o,i,a,c,u,l,s,f=1,p=t,h=p.d,d=p.constructor,y=d.precision;if(p.s<1)throw Error(tm+(p.s?"NaN":"-Infinity"));if(p.eq(Zv))return new d(0);if(null==e?(Qv=!1,l=y):l=e,p.eq(10))return null==e&&(Qv=!0),vm(d,l);if(l+=10,d.precision=l,n=(r=pm(h)).charAt(0),i=ym(p),!(Math.abs(i)<15e14))return u=vm(d,l+2,y).times(i+""),p=bm(new d(n+"."+r.slice(1)),l-10).plus(u),d.precision=y,null==e?(Qv=!0,xm(p,y)):p;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=pm((p=p.times(t)).d)).charAt(0),f++;for(i=ym(p),n>1?(p=new d("0."+r),i++):p=new d(n+"."+r.slice(1)),c=a=p=hm(p.minus(Zv),p.plus(Zv),l),s=xm(p.times(p),l),o=3;;){if(a=xm(a.times(s),l),pm((u=c.plus(hm(a,new d(o),l))).d).slice(0,l)===pm(c.d).slice(0,l))return c=c.times(2),0!==i&&(c=c.plus(vm(d,l+2,y).times(i+""))),c=hm(c,new d(f),l),d.precision=y,null==e?(Qv=!0,xm(c,y)):c;c=u,o+=2}}function gm(t,e){var r,n,o;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;48===e.charCodeAt(n);)++n;for(o=e.length;48===e.charCodeAt(o-1);)--o;if(e=e.slice(n,o)){if(o-=n,r=r-n-1,t.e=nm(r/7),t.d=[],n=(r+1)%7,r<0&&(n+=7),n<o){for(n&&t.d.push(+e.slice(0,n)),o-=7;n<o;)t.d.push(+e.slice(n,n+=7));n=7-(e=e.slice(n)).length}else n-=o;for(;n--;)e+="0";if(t.d.push(+e),Qv&&(t.e>um||t.e<-um))throw Error(rm+r)}else t.s=0,t.e=0,t.d=[0];return t}function xm(t,e,r){var n,o,i,a,c,u,l,s,f=t.d;for(a=1,i=f[0];i>=10;i/=10)a++;if((n=e-a)<0)n+=7,o=e,l=f[s=0];else{if((s=Math.ceil((n+1)/7))>=(i=f.length))return t;for(l=i=f[s],a=1;i>=10;i/=10)a++;o=(n%=7)-7+a}if(void 0!==r&&(c=l/(i=om(10,a-o-1))%10|0,u=e<0||void 0!==f[s+1]||l%i,u=r<4?(c||u)&&(0==r||r==(t.s<0?3:2)):c>5||5==c&&(4==r||u||6==r&&(n>0?o>0?l/om(10,a-o):0:f[s-1])%10&1||r==(t.s<0?8:7))),e<1||!f[0])return u?(i=ym(t),f.length=1,e=e-i-1,f[0]=om(10,(7-e%7)%7),t.e=nm(-e/7)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(0==n?(f.length=s,i=1,s--):(f.length=s+1,i=om(10,7-n),f[s]=o>0?(l/om(10,a-o)%om(10,o)|0)*i:0),u)for(;;){if(0==s){(f[0]+=i)==am&&(f[0]=1,++t.e);break}if(f[s]+=i,f[s]!=am)break;f[s--]=0,i=1}for(n=f.length;0===f[--n];)f.pop();if(Qv&&(t.e>um||t.e<-um))throw Error(rm+ym(t));return t}function wm(t,e){var r,n,o,i,a,c,u,l,s,f,p=t.constructor,h=p.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new p(t),Qv?xm(e,h):e;if(u=t.d,f=e.d,n=e.e,l=t.e,u=u.slice(),a=l-n){for((s=a<0)?(r=u,a=-a,c=f.length):(r=f,n=l,c=u.length),a>(o=Math.max(Math.ceil(h/7),c)+2)&&(a=o,r.length=1),r.reverse(),o=a;o--;)r.push(0);r.reverse()}else{for((s=(o=u.length)<(c=f.length))&&(c=o),o=0;o<c;o++)if(u[o]!=f[o]){s=u[o]<f[o];break}a=0}for(s&&(r=u,u=f,f=r,e.s=-e.s),c=u.length,o=f.length-c;o>0;--o)u[c++]=0;for(o=f.length;o>a;){if(u[--o]<f[o]){for(i=o;i&&0===u[--i];)u[i]=am-1;--u[i],u[o]+=am}u[o]-=f[o]}for(;0===u[--c];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(e.d=u,e.e=n,Qv?xm(e,h):e):new p(0)}function Om(t,e,r){var n,o=ym(t),i=pm(t.d),a=i.length;return e?(r&&(n=r-a)>0?i=i.charAt(0)+"."+i.slice(1)+mm(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+mm(-o-1)+i,r&&(n=r-a)>0&&(i+=mm(n))):o>=a?(i+=mm(o+1-a),r&&(n=r-o-1)>0&&(i=i+"."+mm(n))):((n=o+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-a)>0&&(o+1===a&&(i+="."),i+=mm(n))),t.s<0?"-"+i:i}function jm(t,e){if(t.length>e)return t.length=e,!0}function Sm(t){if(!t||"object"!=typeof t)throw Error(tm+"Object expected");var e,r,n,o=["precision",1,Jv,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<o.length;e+=3)if(void 0!==(n=t[r=o[e]])){if(!(nm(n)===n&&n>=o[e+1]&&n<=o[e+2]))throw Error(em+r+": "+n);this[r]=n}if(void 0!==(n=t[r="LN10"])){if(n!=Math.LN10)throw Error(em+r+": "+n);this[r]=new this(n)}return this}var Pm=function t(e){var r,n,o;function i(t){var e=this;if(!(e instanceof i))return new i(t);if(e.constructor=i,t instanceof i)return e.s=t.s,e.e=t.e,void(e.d=(t=t.d)?t.slice():t);if("number"==typeof t){if(0*t!=0)throw Error(em+t);if(t>0)e.s=1;else{if(!(t<0))return e.s=0,e.e=0,void(e.d=[0]);t=-t,e.s=-1}return t===~~t&&t<1e7?(e.e=0,void(e.d=[t])):gm(e,t.toString())}if("string"!=typeof t)throw Error(em+t);if(45===t.charCodeAt(0)?(t=t.slice(1),e.s=-1):e.s=1,!im.test(t))throw Error(em+t);gm(e,t)}if(i.prototype=lm,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=t,i.config=i.set=Sm,void 0===e&&(e={}),e)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r<o.length;)e.hasOwnProperty(n=o[r++])||(e[n]=this[n]);return i.config(e),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});Zv=new Pm(1);const Am=Pm;function Em(t){return function(t){if(Array.isArray(t))return km(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return km(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return km(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function km(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Mm=function(t){return t},_m={},Tm=function(t){return t===_m},Cm=function(t){return function e(){return 0===arguments.length||1===arguments.length&&Tm(arguments.length<=0?void 0:arguments[0])?e:t.apply(void 0,arguments)}},Nm=function t(e,r){return 1===e?r:Cm(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var a=o.filter(function(t){return t!==_m}).length;return a>=e?r.apply(void 0,o):t(e-a,Cm(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=o.map(function(t){return Tm(t)?e.shift():t});return r.apply(void 0,Em(i).concat(e))}))})},Dm=function(t){return Nm(t.length,t)},Im=function(t,e){for(var r=[],n=t;n<e;++n)r[n-t]=n;return r},Bm=Dm(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(t){return e[t]}).map(t)}),Rm=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Lm=function(t){var e=null,r=null;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return e&&o.every(function(t,r){return t===e[r]})?r:(e=o,r=t.apply(void 0,o))}};const zm={rangeStep:function(t,e,r){for(var n=new Am(t),o=0,i=[];n.lt(e)&&o<1e5;)i.push(n.toNumber()),n=n.add(r),o++;return i},getDigitCount:function(t){return 0===t?1:Math.floor(new Am(t).abs().log(10).toNumber())+1},interpolateNumber:Dm(function(t,e,r){var n=+t;return n+r*(+e-n)}),uninterpolateNumber:Dm(function(t,e,r){var n=e-+t;return(r-t)/(n=n||1/0)}),uninterpolateTruncation:Dm(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))})};function $m(t){return function(t){if(Array.isArray(t))return qm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Fm(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Um(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(u){o=!0,i=u}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||Fm(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fm(t,e){if(t){if("string"==typeof t)return qm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qm(t,e):void 0}}function qm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wm(t){var e=Um(t,2),r=e[0],n=e[1],o=r,i=n;return r>n&&(o=n,i=r),[o,i]}function Hm(t,e,r){if(t.lte(0))return new Am(0);var n=zm.getDigitCount(t.toNumber()),o=new Am(10).pow(n),i=t.div(o),a=1!==n?.05:.1,c=new Am(Math.ceil(i.div(a).toNumber())).add(r).mul(a).mul(o);return e?c:new Am(Math.ceil(c))}function Xm(t,e,r){var n=1,o=new Am(t);if(!o.isint()&&r){var i=Math.abs(t);i<1?(n=new Am(10).pow(zm.getDigitCount(t)-1),o=new Am(Math.floor(o.div(n).toNumber())).mul(n)):i>1&&(o=new Am(Math.floor(t)))}else 0===t?o=new Am(Math.floor((e-1)/2)):r||(o=new Am(Math.floor(t)));var a=Math.floor((e-1)/2),c=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(!e.length)return Mm;var n=e.reverse(),o=n[0],i=n.slice(1);return function(){return i.reduce(function(t,e){return e(t)},o.apply(void 0,arguments))}}(Bm(function(t){return o.add(new Am(t-a).mul(n)).toNumber()}),Im);return c(0,e)}function Vm(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new Am(0),tickMin:new Am(0),tickMax:new Am(0)};var i,a=Hm(new Am(e).sub(t).div(r-1),n,o);i=t<=0&&e>=0?new Am(0):(i=new Am(t).add(e).div(2)).sub(new Am(i).mod(a));var c=Math.ceil(i.sub(t).div(a).toNumber()),u=Math.ceil(new Am(e).sub(i).div(a).toNumber()),l=c+u+1;return l>r?Vm(t,e,r,n,o+1):(l<r&&(u=e>0?u+(r-l):u,c=e>0?c:c+(r-l)),{step:a,tickMin:i.sub(new Am(c).mul(a)),tickMax:i.add(new Am(u).mul(a))})}var Gm=Lm(function(t){var e=Um(t,2),r=e[0],n=e[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(o,2),c=Um(Wm([r,n]),2),u=c[0],l=c[1];if(u===-1/0||l===1/0){var s=l===1/0?[u].concat($m(Im(0,o-1).map(function(){return 1/0}))):[].concat($m(Im(0,o-1).map(function(){return-1/0})),[l]);return r>n?Rm(s):s}if(u===l)return Xm(u,o,i);var f=Vm(u,l,a,i),p=f.step,h=f.tickMin,d=f.tickMax,y=zm.rangeStep(h,d.add(new Am(.1).mul(p)),p);return r>n?Rm(y):y}),Ym=Lm(function(t,e){var r=Um(t,2),n=r[0],o=r[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Um(Wm([n,o]),2),c=a[0],u=a[1];if(c===-1/0||u===1/0)return[n,o];if(c===u)return[c];var l=Math.max(e,2),s=Hm(new Am(u).sub(c).div(l-1),i,0),f=[].concat($m(zm.rangeStep(new Am(c),new Am(u).sub(new Am(.99).mul(s)),s)),[u]);return n>o?Rm(f):f});function Km(t,e){throw new Error("Invariant failed")}var Zm=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Jm(t){return(Jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qm(){return Qm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qm.apply(this,arguments)}function tb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return eb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eb(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function rb(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function nb(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lb(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ob(t,e,r){return e=ab(e),function(t,e){if(e&&("object"===Jm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ib()?Reflect.construct(e,r||[],ab(t).constructor):e.apply(t,r))}function ib(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ib=function(){return!!t})()}function ab(t){return(ab=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function cb(t,e){return(cb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ub(t,e,r){return(e=lb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lb(t){var e=function(t,e){if("object"!=Jm(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Jm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==Jm(e)?e:e+""}var sb=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ob(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cb(t,e)}(t,o.Component),nb(t,[{key:"render",value:function(){var t=this.props,e=t.offset,r=t.layout,n=t.width,i=t.dataKey,a=t.data,c=t.dataPointFormatter,u=t.xAxis,l=t.yAxis,s=rb(t,Zm),f=Qr(s,!1);"x"===this.props.direction&&"number"!==u.type&&Km();var p=a.map(function(t){var a=c(t,i),s=a.x,p=a.y,h=a.value,d=a.errorVal;if(!d)return null;var y,v,m=[];if(Array.isArray(d)){var b=tb(d,2);y=b[0],v=b[1]}else y=v=d;if("vertical"===r){var g=u.scale,x=p+e,w=x+n,O=x-n,j=g(h-y),S=g(h+v);m.push({x1:S,y1:w,x2:S,y2:O}),m.push({x1:j,y1:x,x2:S,y2:x}),m.push({x1:j,y1:w,x2:j,y2:O})}else if("horizontal"===r){var P=l.scale,A=s+e,E=A-n,k=A+n,M=P(h-y),_=P(h+v);m.push({x1:E,y1:_,x2:k,y2:_}),m.push({x1:A,y1:M,x2:A,y2:_}),m.push({x1:E,y1:M,x2:k,y2:M})}return o.createElement(fn,Qm({className:"recharts-errorBar",key:"bar-".concat(m.map(function(t){return"".concat(t.x1,"-").concat(t.x2,"-").concat(t.y1,"-").concat(t.y2)}))},f),m.map(function(t){return o.createElement("line",Qm({},t,{key:"line-".concat(t.x1,"-").concat(t.x2,"-").concat(t.y1,"-").concat(t.y2)}))}))});return o.createElement(fn,{className:"recharts-errorBars"},p)}}])}();function fb(t){return(fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function hb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pb(Object(r),!0).forEach(function(e){db(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pb(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function db(t,e,r){var n;return n=function(t,e){if("object"!=fb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=fb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==fb(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}ub(sb,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),ub(sb,"displayName","ErrorBar");var yb=function(t){var e=t.children,r=t.formattedGraphicalItems,n=t.legendWidth,o=t.legendContent,i=Kr(e,ol);if(!i)return null;var a,c=ol.defaultProps,u=void 0!==c?hb(hb({},c),i.props):{};return a=i.props&&i.props.payload?i.props&&i.props.payload:"children"===o?(r||[]).reduce(function(t,e){var r=e.item,n=e.props,o=n.sectors||n.data||[];return t.concat(o.map(function(t){return{type:i.props.iconType||r.props.legendType,value:t.name,color:t.fill,payload:t}}))},[]):(r||[]).map(function(t){var e=t.item,r=e.type.defaultProps,n=void 0!==r?hb(hb({},r),e.props):{},o=n.dataKey,i=n.name,a=n.legendType;return{inactive:n.hide,dataKey:o,type:u.iconType||a||"square",color:Sb(e),value:i||o,payload:n}}),hb(hb(hb({},u),ol.getWithHeight(i,n)),{},{payload:a,item:i})};function vb(t){return(vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mb(t){return function(t){if(Array.isArray(t))return bb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bb(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function gb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function xb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gb(Object(r),!0).forEach(function(e){wb(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gb(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function wb(t,e,r){var n;return n=function(t,e){if("object"!=vb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=vb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==vb(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ob(t,e,r){return He(t)||He(e)?r:Sr(e)?We(t,e,r):Q(e)?e(t):r}function jb(t,e,r,n){var o=Gv(t,function(t){return Ob(t,e)});if("number"===r){var i=o.filter(function(t){return jr(t)||parseFloat(t)});return i.length?[Uv(i),Rv(i)]:[1/0,-1/0]}return(n?o.filter(function(t){return!He(t)}):o).map(function(t){return Sr(t)||t instanceof Date?t:""})}var Sb=function(t){var e,r,n=t.type.displayName,o=null!==(e=t.type)&&void 0!==e&&e.defaultProps?xb(xb({},t.type.defaultProps),t.props):t.props,i=o.stroke,a=o.fill;switch(n){case"Line":r=i;break;case"Area":case"Radar":r=i&&"none"!==i?i:a;break;default:r=a}return r},Pb=function(t,e,r,n,o){var i=Yr(e.props.children,sb).filter(function(t){return function(t,e,r){return!!He(e)||("horizontal"===t?"yAxis"===e:"vertical"===t||"x"===r?"xAxis"===e:"y"!==r||"yAxis"===e)}(n,o,t.props.direction)});if(i&&i.length){var a=i.map(function(t){return t.props.dataKey});return t.reduce(function(t,e){var n=Ob(e,r);if(He(n))return t;var o=Array.isArray(n)?[Uv(n),Rv(n)]:[n,n],i=a.reduce(function(t,r){var n=Ob(e,r,0),i=o[0]-Math.abs(Array.isArray(n)?n[0]:n),a=o[1]+Math.abs(Array.isArray(n)?n[1]:n);return[Math.min(i,t[0]),Math.max(a,t[1])]},[1/0,-1/0]);return[Math.min(i[0],t[0]),Math.max(i[1],t[1])]},[1/0,-1/0])}return null},Ab=function(t,e,r,n,o){var i=e.map(function(e){var i=e.props.dataKey;return"number"===r&&i&&Pb(t,e,i,n)||jb(t,i,r,o)});if("number"===r)return i.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0]);var a={};return i.reduce(function(t,e){for(var r=0,n=e.length;r<n;r++)a[e[r]]||(a[e[r]]=!0,t.push(e[r]));return t},[])},Eb=function(t,e){return"horizontal"===t&&"xAxis"===e||"vertical"===t&&"yAxis"===e||"centric"===t&&"angleAxis"===e||"radial"===t&&"radiusAxis"===e},kb=function(t,e,r,n){if(n)return t.map(function(t){return t.coordinate});var o,i,a=t.map(function(t){return t.coordinate===e&&(o=!0),t.coordinate===r&&(i=!0),t.coordinate});return o||a.push(e),i||a.push(r),a},Mb=function(t,e,r){if(!t)return null;var n=t.scale,o=t.duplicateDomain,i=t.type,a=t.range,c="scaleBand"===t.realScaleType?n.bandwidth()/2:2,u=(e||r)&&"category"===i&&n.bandwidth?n.bandwidth()/c:0;return u="angleAxis"===t.axisType&&(null==a?void 0:a.length)>=2?2*wr(a[0]-a[1])*u:u,e&&(t.ticks||t.niceTicks)?(t.ticks||t.niceTicks).map(function(t){var e=o?o.indexOf(t):t;return{coordinate:n(e)+u,value:t,offset:u}}).filter(function(t){return!xr(t.coordinate)}):t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(t,e){return{coordinate:n(t)+u,value:t,index:e,offset:u}}):n.ticks&&!r?n.ticks(t.tickCount).map(function(t){return{coordinate:n(t)+u,value:t,offset:u}}):n.domain().map(function(t,e){return{coordinate:n(t)+u,value:o?o[t]:t,index:e,offset:u}})},_b=new WeakMap,Tb=function(t,e){if("function"!=typeof e)return t;_b.has(t)||_b.set(t,new WeakMap);var r=_b.get(t);if(r.has(e))return r.get(e);var n=function(){t.apply(void 0,arguments),e.apply(void 0,arguments)};return r.set(e,n),n},Cb=1e-4,Nb={sign:function(t){var e=t.length;if(!(e<=0))for(var r=0,n=t[0].length;r<n;++r)for(var o=0,i=0,a=0;a<e;++a){var c=xr(t[a][r][1])?t[a][r][0]:t[a][r][1];c>=0?(t[a][r][0]=o,t[a][r][1]=o+c,o=t[a][r][1]):(t[a][r][0]=i,t[a][r][1]=i+c,i=t[a][r][1])}},expand:function(t,e){if((n=t.length)>0){for(var r,n,o,i=0,a=t[0].length;i<a;++i){for(o=r=0;r<n;++r)o+=t[r][i][1]||0;if(o)for(r=0;r<n;++r)t[r][i][1]/=o}zo(t,e)}},none:zo,silhouette:function(t,e){if((r=t.length)>0){for(var r,n=0,o=t[e[0]],i=o.length;n<i;++n){for(var a=0,c=0;a<r;++a)c+=t[a][n][1]||0;o[n][1]+=o[n][0]=-c/2}zo(t,e)}},wiggle:function(t,e){if((o=t.length)>0&&(n=(r=t[e[0]]).length)>0){for(var r,n,o,i=0,a=1;a<n;++a){for(var c=0,u=0,l=0;c<o;++c){for(var s=t[e[c]],f=s[a][1]||0,p=(f-(s[a-1][1]||0))/2,h=0;h<c;++h){var d=t[e[h]];p+=(d[a][1]||0)-(d[a-1][1]||0)}u+=f,l+=p*f}r[a-1][1]+=r[a-1][0]=i,u&&(i-=l/u)}r[a-1][1]+=r[a-1][0]=i,zo(t,e)}},positive:function(t){var e=t.length;if(!(e<=0))for(var r=0,n=t[0].length;r<n;++r)for(var o=0,i=0;i<e;++i){var a=xr(t[i][r][1])?t[i][r][0]:t[i][r][1];a>=0?(t[i][r][0]=o,t[i][r][1]=o+a,o=t[i][r][1]):(t[i][r][0]=0,t[i][r][1]=0)}}},Db=function(t,e,r){var n=e.map(function(t){return t.props.dataKey}),o=Nb[r],i=function(){var t=Ln([]),e=$o,r=zo,n=Uo;function o(o){var i,a,c=Array.from(t.apply(this,arguments),Fo),u=c.length,l=-1;for(const t of o)for(i=0,++l;i<u;++i)(c[i][l]=[0,+n(t,c[i].key,l,o)]).data=t;for(i=0,a=Zn(e(c));i<u;++i)c[a[i]].index=i;return r(c,a),c}return o.keys=function(e){return arguments.length?(t="function"==typeof e?e:Ln(Array.from(e)),o):t},o.value=function(t){return arguments.length?(n="function"==typeof t?t:Ln(+t),o):n},o.order=function(t){return arguments.length?(e=null==t?$o:"function"==typeof t?t:Ln(Array.from(t)),o):e},o.offset=function(t){return arguments.length?(r=null==t?zo:t,o):r},o}().keys(n).value(function(t,e){return+Ob(t,e,0)}).order($o).offset(o);return i(t)};function Ib(t){var e=t.axis,r=t.ticks,n=t.bandSize,o=t.entry,i=t.index,a=t.dataKey;if("category"===e.type){if(!e.allowDuplicatedCategory&&e.dataKey&&!He(o[e.dataKey])){var c=_r(r,"value",o[e.dataKey]);if(c)return c.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var u=Ob(o,He(a)?e.dataKey:a);return He(u)?null:e.scale(u)}var Bb=function(t){var e=t.axis,r=t.ticks,n=t.offset,o=t.bandSize,i=t.entry,a=t.index;if("category"===e.type)return r[a]?r[a].coordinate+n:null;var c=Ob(i,e.dataKey,e.domain[a]);return He(c)?null:e.scale(c)-o/2+n},Rb=function(t,e,r){return Object.keys(t).reduce(function(n,o){var i=t[o].stackedData.reduce(function(t,n){var o=n.slice(e,r+1).reduce(function(t,e){return[Uv(e.concat([t[0]]).filter(jr)),Rv(e.concat([t[1]]).filter(jr))]},[1/0,-1/0]);return[Math.min(t[0],o[0]),Math.max(t[1],o[1])]},[1/0,-1/0]);return[Math.min(i[0],n[0]),Math.max(i[1],n[1])]},[1/0,-1/0]).map(function(t){return t===1/0||t===-1/0?0:t})},Lb=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zb=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$b=function(t,e,r){if(Q(t))return t(e,r);if(!Array.isArray(t))return e;var n=[];if(jr(t[0]))n[0]=r?t[0]:Math.min(t[0],e[0]);else if(Lb.test(t[0])){var o=+Lb.exec(t[0])[1];n[0]=e[0]-o}else Q(t[0])?n[0]=t[0](e[0]):n[0]=e[0];if(jr(t[1]))n[1]=r?t[1]:Math.max(t[1],e[1]);else if(zb.test(t[1])){var i=+zb.exec(t[1])[1];n[1]=e[1]+i}else Q(t[1])?n[1]=t[1](e[1]):n[1]=e[1];return n},Ub=function(t,e,r){if(t&&t.scale&&t.scale.bandwidth){var n=t.scale.bandwidth();if(!r||n>0)return n}if(t&&e&&e.length>=2){for(var o=Ql(e,function(t){return t.coordinate}),i=1/0,a=1,c=o.length;a<c;a++){var u=o[a],l=o[a-1];i=Math.min((u.coordinate||0)-(l.coordinate||0),i)}return i===1/0?0:i}return r?void 0:0},Fb=function(t,e,r){return t&&t.length?Kv(t,We(r,"type.defaultProps.domain"))?e:t:e},qb=function(t,e){var r=t.type.defaultProps?xb(xb({},t.type.defaultProps),t.props):t.props,n=r.dataKey,o=r.name,i=r.unit,a=r.formatter,c=r.tooltipType,u=r.chartType,l=r.hide;return xb(xb({},Qr(t,!1)),{},{dataKey:n,unit:i,formatter:a,name:o||n,color:Sb(t),value:Ob(e,n),type:c,payload:e,chartType:u,hide:l})};function Wb(t){return(Wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Xb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hb(Object(r),!0).forEach(function(e){Vb(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Vb(t,e,r){var n;return n=function(t,e){if("object"!=Wb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Wb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Wb(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gb=Math.PI/180,Yb=function(t){return 180*t/Math.PI},Kb=function(t,e,r,n){return{x:t+Math.cos(-Gb*n)*r,y:e+Math.sin(-Gb*n)*r}},Zb=function(t,e){var r=t.x,n=t.y,o=e.cx,i=e.cy,a=function(t,e){var r=t.x,n=t.y,o=e.x,i=e.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(n-i,2))}({x:r,y:n},{x:o,y:i});if(a<=0)return{radius:a};var c=(r-o)/a,u=Math.acos(c);return n>i&&(u=2*Math.PI-u),{radius:a,angle:Yb(u),angleInRadian:u}},Jb=function(t,e){var r=e.startAngle,n=e.endAngle,o=Math.floor(r/360),i=Math.floor(n/360);return t+360*Math.min(o,i)},Qb=function(t,e){var r=t.x,n=t.y,o=Zb({x:r,y:n},e),i=o.radius,a=o.angle,c=e.innerRadius,u=e.outerRadius;if(i<c||i>u)return!1;if(0===i)return!0;var l,s=function(t){var e=t.startAngle,r=t.endAngle,n=Math.floor(e/360),o=Math.floor(r/360),i=Math.min(n,o);return{startAngle:e-360*i,endAngle:r-360*i}}(e),f=s.startAngle,p=s.endAngle,h=a;if(f<=p){for(;h>p;)h-=360;for(;h<f;)h+=360;l=h>=f&&h<=p}else{for(;h>f;)h-=360;for(;h<p;)h+=360;l=h>=p&&h<=f}return l?Xb(Xb({},e),{},{radius:i,angle:Jb(h,e)}):null};function tg(t){return(tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var eg=["offset"];function rg(t){return function(t){if(Array.isArray(t))return ng(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ng(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ng(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ng(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function og(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ag(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ig(Object(r),!0).forEach(function(e){cg(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function cg(t,e,r){var n;return n=function(t,e){if("object"!=tg(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=tg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==tg(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ug(){return ug=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ug.apply(this,arguments)}var lg=function(t,e,r){var n,i,a=t.position,c=t.viewBox,u=t.offset,l=t.className,f=c,p=f.cx,h=f.cy,d=f.innerRadius,y=f.outerRadius,v=f.startAngle,m=f.endAngle,b=f.clockWise,g=(d+y)/2,x=function(t,e){return wr(e-t)*Math.min(Math.abs(e-t),360)}(v,m),w=x>=0?1:-1;"insideStart"===a?(n=v+w*u,i=b):"insideEnd"===a?(n=m-w*u,i=!b):"end"===a&&(n=m+w*u,i=b),i=x<=0?i:!i;var O=Kb(p,h,g,n),j=Kb(p,h,g,n+359*(i?1:-1)),S="M".concat(O.x,",").concat(O.y,"\n    A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n    ").concat(j.x,",").concat(j.y),P=He(t.id)?Ar("recharts-radial-line-"):t.id;return o.createElement("text",ug({},r,{dominantBaseline:"central",className:s("recharts-radial-bar-label",l)}),o.createElement("defs",null,o.createElement("path",{id:P,d:S})),o.createElement("textPath",{xlinkHref:"#".concat(P)},e))};function sg(t){var e,r=t.offset,i=ag({offset:void 0===r?5:r},og(t,eg)),a=i.viewBox,c=i.position,u=i.value,l=i.children,f=i.content,p=i.className,h=void 0===p?"":p,d=i.textBreakAll;if(!a||He(u)&&He(l)&&!n.isValidElement(f)&&!Q(f))return null;if(n.isValidElement(f))return n.cloneElement(f,i);if(Q(f)){if(e=n.createElement(f,i),n.isValidElement(e))return e}else e=function(t){var e=t.value,r=t.formatter,n=He(t.children)?e:t.children;return Q(r)?r(n):n}(i);var y=function(t){return"cx"in t&&jr(t.cx)}(a),v=Qr(i,!0);if(y&&("insideStart"===c||"insideEnd"===c||"end"===c))return lg(i,e,v);var m=y?function(t){var e=t.viewBox,r=t.offset,n=t.position,o=e,i=o.cx,a=o.cy,c=o.innerRadius,u=o.outerRadius,l=(o.startAngle+o.endAngle)/2;if("outside"===n){var s=Kb(i,a,u+r,l),f=s.x;return{x:f,y:s.y,textAnchor:f>=i?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=Kb(i,a,(c+u)/2,l);return{x:p.x,y:p.y,textAnchor:"middle",verticalAnchor:"middle"}}(i):function(t){var e=t.viewBox,r=t.parentViewBox,n=t.offset,o=t.position,i=e,a=i.x,c=i.y,u=i.width,l=i.height,s=l>=0?1:-1,f=s*n,p=s>0?"end":"start",h=s>0?"start":"end",d=u>=0?1:-1,y=d*n,v=d>0?"end":"start",m=d>0?"start":"end";if("top"===o)return ag(ag({},{x:a+u/2,y:c-s*n,textAnchor:"middle",verticalAnchor:p}),r?{height:Math.max(c-r.y,0),width:u}:{});if("bottom"===o)return ag(ag({},{x:a+u/2,y:c+l+f,textAnchor:"middle",verticalAnchor:h}),r?{height:Math.max(r.y+r.height-(c+l),0),width:u}:{});if("left"===o){var b={x:a-y,y:c+l/2,textAnchor:v,verticalAnchor:"middle"};return ag(ag({},b),r?{width:Math.max(b.x-r.x,0),height:l}:{})}if("right"===o){var g={x:a+u+y,y:c+l/2,textAnchor:m,verticalAnchor:"middle"};return ag(ag({},g),r?{width:Math.max(r.x+r.width-g.x,0),height:l}:{})}var x=r?{width:u,height:l}:{};return"insideLeft"===o?ag({x:a+y,y:c+l/2,textAnchor:m,verticalAnchor:"middle"},x):"insideRight"===o?ag({x:a+u-y,y:c+l/2,textAnchor:v,verticalAnchor:"middle"},x):"insideTop"===o?ag({x:a+u/2,y:c+f,textAnchor:"middle",verticalAnchor:h},x):"insideBottom"===o?ag({x:a+u/2,y:c+l-f,textAnchor:"middle",verticalAnchor:p},x):"insideTopLeft"===o?ag({x:a+y,y:c+f,textAnchor:m,verticalAnchor:h},x):"insideTopRight"===o?ag({x:a+u-y,y:c+f,textAnchor:v,verticalAnchor:h},x):"insideBottomLeft"===o?ag({x:a+y,y:c+l-f,textAnchor:m,verticalAnchor:p},x):"insideBottomRight"===o?ag({x:a+u-y,y:c+l-f,textAnchor:v,verticalAnchor:p},x):Y(o)&&(jr(o.x)||Or(o.x))&&(jr(o.y)||Or(o.y))?ag({x:a+Er(o.x,u),y:c+Er(o.y,l),textAnchor:"end",verticalAnchor:"end"},x):ag({x:a+u/2,y:c+l/2,textAnchor:"middle",verticalAnchor:"middle"},x)}(i);return o.createElement(Kf,ug({className:s("recharts-label",h)},v,m,{breakAll:d}),e)}sg.displayName="Label";var fg=function(t){var e=t.cx,r=t.cy,n=t.angle,o=t.startAngle,i=t.endAngle,a=t.r,c=t.radius,u=t.innerRadius,l=t.outerRadius,s=t.x,f=t.y,p=t.top,h=t.left,d=t.width,y=t.height,v=t.clockWise,m=t.labelViewBox;if(m)return m;if(jr(d)&&jr(y)){if(jr(s)&&jr(f))return{x:s,y:f,width:d,height:y};if(jr(p)&&jr(h))return{x:p,y:h,width:d,height:y}}return jr(s)&&jr(f)?{x:s,y:f,width:0,height:0}:jr(e)&&jr(r)?{cx:e,cy:r,startAngle:o||n||0,endAngle:i||n||0,innerRadius:u||0,outerRadius:l||c||a||0,clockWise:v}:t.viewBox?t.viewBox:{}};sg.parseViewBox=fg,sg.renderCallByParent=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=fg(t),c=Yr(i,sg).map(function(t,r){return n.cloneElement(t,{viewBox:e||a,key:"label-".concat(r)})});if(!r)return c;var u=function(t,e){return t?!0===t?o.createElement(sg,{key:"label-implicit",viewBox:e}):Sr(t)?o.createElement(sg,{key:"label-implicit",viewBox:e,value:t}):n.isValidElement(t)?t.type===sg?n.cloneElement(t,{key:"label-implicit",viewBox:e}):o.createElement(sg,{key:"label-implicit",content:t,viewBox:e}):Q(t)?o.createElement(sg,{key:"label-implicit",content:t,viewBox:e}):Y(t)?o.createElement(sg,ug({viewBox:e},t,{key:"label-implicit"})):null:null}(t.label,e||a);return[u].concat(rg(c))};const pg=r(function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0});function hg(t){return(hg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dg=["valueAccessor"],yg=["data","dataKey","clockWise","id","textBreakAll"];function vg(t){return function(t){if(Array.isArray(t))return mg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return mg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mg(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bg(){return bg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bg.apply(this,arguments)}function gg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function xg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gg(Object(r),!0).forEach(function(e){wg(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gg(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function wg(t,e,r){var n;return n=function(t,e){if("object"!=hg(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=hg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==hg(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Og(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var jg=function(t){return Array.isArray(t.value)?pg(t.value):t.value};function Sg(t){var e=t.valueAccessor,r=void 0===e?jg:e,n=Og(t,dg),i=n.data,a=n.dataKey,c=n.clockWise,u=n.id,l=n.textBreakAll,s=Og(n,yg);return i&&i.length?o.createElement(fn,{className:"recharts-label-list"},i.map(function(t,e){var n=He(a)?r(t,e):Ob(t&&t.payload,a),i=He(u)?{}:{id:"".concat(u,"-").concat(e)};return o.createElement(sg,bg({},Qr(t,!0),s,i,{parentViewBox:t.parentViewBox,value:n,textBreakAll:l,viewBox:sg.parseViewBox(He(c)?t:xg(xg({},t),{},{clockWise:c})),key:"label-".concat(e),index:e}))})):null}function Pg(t){return(Pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ag(){return Ag=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ag.apply(this,arguments)}function Eg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function kg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Eg(Object(r),!0).forEach(function(e){Mg(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Mg(t,e,r){var n;return n=function(t,e){if("object"!=Pg(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Pg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Pg(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Sg.displayName="LabelList",Sg.renderCallByParent=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||!t.children&&r&&!t.label)return null;var i=Yr(t.children,Sg).map(function(t,r){return n.cloneElement(t,{data:e,key:"labelList-".concat(r)})});return r?[function(t,e){return t?!0===t?o.createElement(Sg,{key:"labelList-implicit",data:e}):o.isValidElement(t)||Q(t)?o.createElement(Sg,{key:"labelList-implicit",data:e,content:t}):Y(t)?o.createElement(Sg,bg({data:e},t,{key:"labelList-implicit"})):null:null}(t.label,e)].concat(vg(i)):i};var _g=function(t){var e=t.cx,r=t.cy,n=t.radius,o=t.angle,i=t.sign,a=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,l=c*(a?1:-1)+n,s=Math.asin(c/l)/Gb,f=u?o:o+i*s,p=u?o-i*s:o;return{center:Kb(e,r,l,f),circleTangency:Kb(e,r,n,f),lineTangency:Kb(e,r,l*Math.cos(s*Gb),p),theta:s}},Tg=function(t){var e=t.cx,r=t.cy,n=t.innerRadius,o=t.outerRadius,i=t.startAngle,a=function(t,e){return wr(e-t)*Math.min(Math.abs(e-t),359.999)}(i,t.endAngle),c=i+a,u=Kb(e,r,o,i),l=Kb(e,r,o,c),s="M ".concat(u.x,",").concat(u.y,"\n    A ").concat(o,",").concat(o,",0,\n    ").concat(+(Math.abs(a)>180),",").concat(+(i>c),",\n    ").concat(l.x,",").concat(l.y,"\n  ");if(n>0){var f=Kb(e,r,n,i),p=Kb(e,r,n,c);s+="L ".concat(p.x,",").concat(p.y,"\n            A ").concat(n,",").concat(n,",0,\n            ").concat(+(Math.abs(a)>180),",").concat(+(i<=c),",\n            ").concat(f.x,",").concat(f.y," Z")}else s+="L ".concat(e,",").concat(r," Z");return s},Cg={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Ng=function(t){var e=kg(kg({},Cg),t),r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,c=e.cornerRadius,u=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,p=e.endAngle,h=e.className;if(a<i||f===p)return null;var d,y=s("recharts-sector",h),v=a-i,m=Er(c,v,0,!0);return d=m>0&&Math.abs(f-p)<360?function(t){var e=t.cx,r=t.cy,n=t.innerRadius,o=t.outerRadius,i=t.cornerRadius,a=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,l=t.endAngle,s=wr(l-u),f=_g({cx:e,cy:r,radius:o,angle:u,sign:s,cornerRadius:i,cornerIsExternal:c}),p=f.circleTangency,h=f.lineTangency,d=f.theta,y=_g({cx:e,cy:r,radius:o,angle:l,sign:-s,cornerRadius:i,cornerIsExternal:c}),v=y.circleTangency,m=y.lineTangency,b=y.theta,g=c?Math.abs(u-l):Math.abs(u-l)-d-b;if(g<0)return a?"M ".concat(h.x,",").concat(h.y,"\n        a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n        a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n      "):Tg({cx:e,cy:r,innerRadius:n,outerRadius:o,startAngle:u,endAngle:l});var x="M ".concat(h.x,",").concat(h.y,"\n    A").concat(i,",").concat(i,",0,0,").concat(+(s<0),",").concat(p.x,",").concat(p.y,"\n    A").concat(o,",").concat(o,",0,").concat(+(g>180),",").concat(+(s<0),",").concat(v.x,",").concat(v.y,"\n    A").concat(i,",").concat(i,",0,0,").concat(+(s<0),",").concat(m.x,",").concat(m.y,"\n  ");if(n>0){var w=_g({cx:e,cy:r,radius:n,angle:u,sign:s,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),O=w.circleTangency,j=w.lineTangency,S=w.theta,P=_g({cx:e,cy:r,radius:n,angle:l,sign:-s,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),A=P.circleTangency,E=P.lineTangency,k=P.theta,M=c?Math.abs(u-l):Math.abs(u-l)-S-k;if(M<0&&0===i)return"".concat(x,"L").concat(e,",").concat(r,"Z");x+="L".concat(E.x,",").concat(E.y,"\n      A").concat(i,",").concat(i,",0,0,").concat(+(s<0),",").concat(A.x,",").concat(A.y,"\n      A").concat(n,",").concat(n,",0,").concat(+(M>180),",").concat(+(s>0),",").concat(O.x,",").concat(O.y,"\n      A").concat(i,",").concat(i,",0,0,").concat(+(s<0),",").concat(j.x,",").concat(j.y,"Z")}else x+="L".concat(e,",").concat(r,"Z");return x}({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,v/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:f,endAngle:p}):Tg({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:p}),o.createElement("path",Ag({},Qr(e,!0),{className:y,d:d,role:"img"}))};function Dg(t){return(Dg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ig(){return Ig=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ig.apply(this,arguments)}function Bg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Rg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bg(Object(r),!0).forEach(function(e){Lg(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bg(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Lg(t,e,r){var n;return n=function(t,e){if("object"!=Dg(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Dg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Dg(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var zg={curveBasisClosed:function(t){return new Ao(t)},curveBasisOpen:function(t){return new Eo(t)},curveBasis:function(t){return new Po(t)},curveBumpX:function(t){return new oo(t,!0)},curveBumpY:function(t){return new oo(t,!1)},curveLinearClosed:function(t){return new ko(t)},curveLinear:Qn,curveMonotoneX:function(t){return new No(t)},curveMonotoneY:function(t){return new Do(t)},curveNatural:function(t){return new Bo(t)},curveStep:function(t){return new Lo(t,.5)},curveStepAfter:function(t){return new Lo(t,1)},curveStepBefore:function(t){return new Lo(t,0)}},$g=function(t){return t.x===+t.x&&t.y===+t.y},Ug=function(t){return t.x},Fg=function(t){return t.y},qg=function(t){var e,r=t.type,n=void 0===r?"linear":r,o=t.points,i=void 0===o?[]:o,a=t.baseLine,c=t.layout,u=t.connectNulls,l=void 0!==u&&u,s=function(t,e){if(Q(t))return t;var r="curve".concat(Rn(t));return"curveMonotone"!==r&&"curveBump"!==r||!e?zg[r]||Qn:zg["".concat(r).concat("vertical"===e?"Y":"X")]}(n,c),f=l?i.filter(function(t){return $g(t)}):i;if(Array.isArray(a)){var p=l?a.filter(function(t){return $g(t)}):a,h=f.map(function(t,e){return Rg(Rg({},t),{},{base:p[e]})});return(e="vertical"===c?no().y(Fg).x1(Ug).x0(function(t){return t.base.x}):no().x(Ug).y1(Fg).y0(function(t){return t.base.y})).defined($g).curve(s),e(h)}return(e="vertical"===c&&jr(a)?no().y(Fg).x1(Ug).x0(a):jr(a)?no().x(Ug).y1(Fg).y0(a):ro().x(Ug).y(Fg)).defined($g).curve(s),e(f)},Wg=function(t){var e=t.className,r=t.points,o=t.path,i=t.pathRef;if(!(r&&r.length||o))return null;var a=r&&r.length?qg(t):o;return n.createElement("path",Ig({},Qr(t,!1),Lr(t),{className:s("recharts-curve",e),d:a,ref:i}))},Hg={exports:{}};function Xg(){}function Vg(){}Vg.resetWarningCache=Xg;Hg.exports=function(){function t(t,e,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Vg,resetWarningCache:Xg};return r.PropTypes=r,r}();const Gg=r(Hg.exports);var Yg=Object.getOwnPropertyNames,Kg=Object.getOwnPropertySymbols,Zg=Object.prototype.hasOwnProperty;function Jg(t,e){return function(r,n,o){return t(r,n,o)&&e(r,n,o)}}function Qg(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);var o=n.cache,i=o.get(e),a=o.get(r);if(i&&a)return i===r&&a===e;o.set(e,r),o.set(r,e);var c=t(e,r,n);return o.delete(e),o.delete(r),c}}function tx(t){return Yg(t).concat(Kg(t))}var ex=Object.hasOwn||function(t,e){return Zg.call(t,e)};function rx(t,e){return t===e||!t&&!e&&t!=t&&e!=e}var nx=Object.getOwnPropertyDescriptor,ox=Object.keys;function ix(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function ax(t,e){return rx(t.getTime(),e.getTime())}function cx(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function ux(t,e){return t===e}function lx(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o,i,a=new Array(n),c=t.entries(),u=0;(o=c.next())&&!o.done;){for(var l=e.entries(),s=!1,f=0;(i=l.next())&&!i.done;)if(a[f])f++;else{var p=o.value,h=i.value;if(r.equals(p[0],h[0],u,f,t,e,r)&&r.equals(p[1],h[1],p[0],h[0],t,e,r)){s=a[f]=!0;break}f++}if(!s)return!1;u++}return!0}var sx=rx;function fx(t,e,r){var n=ox(t),o=n.length;if(ox(e).length!==o)return!1;for(;o-- >0;)if(!bx(t,e,r,n[o]))return!1;return!0}function px(t,e,r){var n,o,i,a=tx(t),c=a.length;if(tx(e).length!==c)return!1;for(;c-- >0;){if(!bx(t,e,r,n=a[c]))return!1;if(o=nx(t,n),i=nx(e,n),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function hx(t,e){return rx(t.valueOf(),e.valueOf())}function dx(t,e){return t.source===e.source&&t.flags===e.flags}function yx(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o,i,a=new Array(n),c=t.values();(o=c.next())&&!o.done;){for(var u=e.values(),l=!1,s=0;(i=u.next())&&!i.done;){if(!a[s]&&r.equals(o.value,i.value,o.value,i.value,t,e,r)){l=a[s]=!0;break}s++}if(!l)return!1}return!0}function vx(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function mx(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function bx(t,e,r,n){return!("_owner"!==n&&"__o"!==n&&"__v"!==n||!t.$$typeof&&!e.$$typeof)||ex(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var gx=Array.isArray,xx="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,wx=Object.assign,Ox=Object.prototype.toString.call.bind(Object.prototype.toString);var jx=Sx();function Sx(t){void 0===t&&(t={});var e,r=t.circular,n=void 0!==r&&r,o=t.createInternalComparator,i=t.createState,a=t.strict,c=void 0!==a&&a,u=function(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,o={areArraysEqual:n?px:ix,areDatesEqual:ax,areErrorsEqual:cx,areFunctionsEqual:ux,areMapsEqual:n?Jg(lx,px):lx,areNumbersEqual:sx,areObjectsEqual:n?px:fx,arePrimitiveWrappersEqual:hx,areRegExpsEqual:dx,areSetsEqual:n?Jg(yx,px):yx,areTypedArraysEqual:n?px:vx,areUrlsEqual:mx};if(r&&(o=wx({},o,r(o))),e){var i=Qg(o.areArraysEqual),a=Qg(o.areMapsEqual),c=Qg(o.areObjectsEqual),u=Qg(o.areSetsEqual);o=wx({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:c,areSetsEqual:u})}return o}(t),l=function(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,o=t.areFunctionsEqual,i=t.areMapsEqual,a=t.areNumbersEqual,c=t.areObjectsEqual,u=t.arePrimitiveWrappersEqual,l=t.areRegExpsEqual,s=t.areSetsEqual,f=t.areTypedArraysEqual,p=t.areUrlsEqual;return function(t,h,d){if(t===h)return!0;if(null==t||null==h)return!1;var y=typeof t;if(y!==typeof h)return!1;if("object"!==y)return"number"===y?a(t,h,d):"function"===y&&o(t,h,d);var v=t.constructor;if(v!==h.constructor)return!1;if(v===Object)return c(t,h,d);if(gx(t))return e(t,h,d);if(null!=xx&&xx(t))return f(t,h,d);if(v===Date)return r(t,h,d);if(v===RegExp)return l(t,h,d);if(v===Map)return i(t,h,d);if(v===Set)return s(t,h,d);var m=Ox(t);return"[object Date]"===m?r(t,h,d):"[object RegExp]"===m?l(t,h,d):"[object Map]"===m?i(t,h,d):"[object Set]"===m?s(t,h,d):"[object Object]"===m?"function"!=typeof t.then&&"function"!=typeof h.then&&c(t,h,d):"[object URL]"===m?p(t,h,d):"[object Error]"===m?n(t,h,d):"[object Arguments]"===m?c(t,h,d):("[object Boolean]"===m||"[object Number]"===m||"[object String]"===m)&&u(t,h,d)}}(u);return function(t){var e=t.circular,r=t.comparator,n=t.createState,o=t.equals,i=t.strict;if(n)return function(t,a){var c=n(),u=c.cache,l=void 0===u?e?new WeakMap:void 0:u,s=c.meta;return r(t,a,{cache:l,equals:o,meta:s,strict:i})};if(e)return function(t,e){return r(t,e,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(t,e){return r(t,e,a)}}({circular:n,comparator:l,createState:i,equals:o?o(l):(e=l,function(t,r,n,o,i,a,c){return e(t,r,c)}),strict:c})}function Px(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1;requestAnimationFrame(function n(o){r<0&&(r=o),o-r>e?(t(o),r=-1):function(t){"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(t)}(n)})}function Ax(t){return(Ax="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ex(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return kx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kx(t,e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Mx(){var t=function(){return null},e=!1,r=function r(n){if(!e){if(Array.isArray(n)){if(!n.length)return;var o=Ex(n),i=o[0],a=o.slice(1);return"number"==typeof i?void Px(r.bind(null,a),i):(r(i),void Px(r.bind(null,a)))}"object"===Ax(n)&&t(n),"function"==typeof n&&n()}};return{stop:function(){e=!0},start:function(t){e=!1,r(t)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}function _x(t){return(_x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Cx(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tx(Object(r),!0).forEach(function(e){Nx(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tx(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Nx(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==_x(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!==_x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===_x(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Sx({strict:!0}),Sx({circular:!0}),Sx({circular:!0,strict:!0}),Sx({createInternalComparator:function(){return rx}}),Sx({strict:!0,createInternalComparator:function(){return rx}}),Sx({circular:!0,createInternalComparator:function(){return rx}}),Sx({circular:!0,createInternalComparator:function(){return rx},strict:!0});var Dx=function(t){return t},Ix=function(t,e){return Object.keys(e).reduce(function(r,n){return Cx(Cx({},r),{},Nx({},n,t(n,e[n])))},{})},Bx=function(t,e,r){return t.map(function(t){return"".concat((n=t,n.replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())}))," ").concat(e,"ms ").concat(r);var n}).join(",")};function Rx(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||zx(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lx(t){return function(t){if(Array.isArray(t))return $x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||zx(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zx(t,e){if(t){if("string"==typeof t)return $x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$x(t,e):void 0}}function $x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ux=1e-4,Fx=function(t,e){return[0,3*t,3*e-6*t,3*t-3*e+1]},qx=function(t,e){return t.map(function(t,r){return t*Math.pow(e,r)}).reduce(function(t,e){return t+e})},Wx=function(t,e){return function(r){var n=Fx(t,e);return qx(n,r)}},Hx=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e[0],o=e[1],i=e[2],a=e[3];if(1===e.length)switch(e[0]){case"linear":n=0,o=0,i=1,a=1;break;case"ease":n=.25,o=.1,i=.25,a=1;break;case"ease-in":n=.42,o=0,i=1,a=1;break;case"ease-out":n=.42,o=0,i=.58,a=1;break;case"ease-in-out":n=0,o=0,i=.58,a=1;break;default:var c=e[0].split("(");if("cubic-bezier"===c[0]&&4===c[1].split(")")[0].split(",").length){var u=Rx(c[1].split(")")[0].split(",").map(function(t){return parseFloat(t)}),4);n=u[0],o=u[1],i=u[2],a=u[3]}}var l,s,f=Wx(n,i),p=Wx(o,a),h=(l=n,s=i,function(t){var e=Fx(l,s),r=[].concat(Lx(e.map(function(t,e){return t*e}).slice(1)),[0]);return qx(r,t)}),d=function(t){return t>1?1:t<0?0:t},y=function(t){for(var e=t>1?1:t,r=e,n=0;n<8;++n){var o=f(r)-e,i=h(r);if(Math.abs(o-e)<Ux||i<Ux)return p(r);r=d(r-o/i)}return p(r)};return y.isStepper=!1,y},Xx=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e[0];if("string"==typeof n)switch(n){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Hx(n);case"spring":return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.stiff,r=void 0===e?100:e,n=t.damping,o=void 0===n?8:n,i=t.dt,a=void 0===i?17:i,c=function(t,e,n){var i=n+(-(t-e)*r-n*o)*a/1e3,c=n*a/1e3+t;return Math.abs(c-e)<Ux&&Math.abs(i)<Ux?[e,0]:[c,i]};return c.isStepper=!0,c.dt=a,c}();default:if("cubic-bezier"===n.split("(")[0])return Hx(n)}return"function"==typeof n?n:null};function Vx(t){return(Vx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gx(t){return function(t){if(Array.isArray(t))return tw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Qx(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Kx(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yx(Object(r),!0).forEach(function(e){Zx(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yx(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Zx(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Vx(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!==Vx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Vx(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jx(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Qx(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qx(t,e){if(t){if("string"==typeof t)return tw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tw(t,e):void 0}}function tw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ew=function(t,e,r){return t+(e-t)*r},rw=function(t){return t.from!==t.to},nw=function t(e,r,n){var o=Ix(function(t,r){if(rw(r)){var n=Jx(e(r.from,r.to,r.velocity),2),o=n[0],i=n[1];return Kx(Kx({},r),{},{from:o,velocity:i})}return r},r);return n<1?Ix(function(t,e){return rw(e)?Kx(Kx({},e),{},{velocity:ew(e.velocity,o[t].velocity,n),from:ew(e.from,o[t].from,n)}):e},r):t(e,o,n-1)};const ow=function(t,e,r,n,o){var i,a,c,u,l=(i=t,a=e,[Object.keys(i),Object.keys(a)].reduce(function(t,e){return t.filter(function(t){return e.includes(t)})})),s=l.reduce(function(r,n){return Kx(Kx({},r),{},Zx({},n,[t[n],e[n]]))},{}),f=l.reduce(function(r,n){return Kx(Kx({},r),{},Zx({},n,{from:t[n],velocity:0,to:e[n]}))},{}),p=-1,h=function(){return null};return h=r.isStepper?function(n){c||(c=n);var i=(n-c)/r.dt;f=nw(r,f,i),o(Kx(Kx(Kx({},t),e),Ix(function(t,e){return e.from},f))),c=n,Object.values(f).filter(rw).length&&(p=requestAnimationFrame(h))}:function(i){u||(u=i);var a=(i-u)/n,c=Ix(function(t,e){return ew.apply(void 0,Gx(e).concat([r(a)]))},s);if(o(Kx(Kx(Kx({},t),e),c)),a<1)p=requestAnimationFrame(h);else{var l=Ix(function(t,e){return ew.apply(void 0,Gx(e).concat([r(1)]))},s);o(Kx(Kx(Kx({},t),e),l))}},function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(p)}}};function iw(t){return(iw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var aw=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function cw(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function uw(t){return function(t){if(Array.isArray(t))return lw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return lw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lw(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function fw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sw(Object(r),!0).forEach(function(e){pw(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sw(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function pw(t,e,r){return(e=dw(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hw(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dw(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function dw(t){var e=function(t,e){if("object"!==iw(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!==iw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===iw(e)?e:String(e)}function yw(t,e){return(yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var r,n=gw(t);if(e){var o=gw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mw(this,r)}}function mw(t,e){if(e&&("object"===iw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return bw(t)}function bw(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gw(t){return(gw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xw=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yw(t,e)}(e,n.PureComponent);var t=vw(e);function e(r,n){var o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=(o=t.call(this,r,n)).props,a=i.isActive,c=i.attributeName,u=i.from,l=i.to,s=i.steps,f=i.children,p=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(bw(o)),o.changeStyle=o.changeStyle.bind(bw(o)),!a||p<=0)return o.state={style:{}},"function"==typeof f&&(o.state={style:l}),mw(o);if(s&&s.length)o.state={style:s[0].style};else if(u){if("function"==typeof f)return o.state={style:u},mw(o);o.state={style:c?pw({},c,u):u}}else o.state={style:{}};return o}return hw(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.isActive,r=t.canBegin;this.mounted=!0,e&&r&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.isActive,n=e.canBegin,o=e.attributeName,i=e.shouldReAnimate,a=e.to,c=e.from,u=this.state.style;if(n)if(r){if(!(jx(t.to,a)&&t.canBegin&&t.isActive)){var l=!t.canBegin||!t.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var s=l||i?c:t.to;if(this.state&&u){var f={style:o?pw({},o,s):s};(o&&u[o]!==s||!o&&u!==s)&&this.setState(f)}this.runAnimation(fw(fw({},this.props),{},{from:s,begin:0}))}}else{var p={style:o?pw({},o,a):a};this.state&&u&&(o&&u[o]!==a||!o&&u!==a)&&this.setState(p)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var t=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),t&&t()}},{key:"handleStyleChange",value:function(t){this.changeStyle(t)}},{key:"changeStyle",value:function(t){this.mounted&&this.setState({style:t})}},{key:"runJSAnimation",value:function(t){var e=this,r=t.from,n=t.to,o=t.duration,i=t.easing,a=t.begin,c=t.onAnimationEnd,u=t.onAnimationStart,l=ow(r,n,Xx(i),o,this.changeStyle);this.manager.start([u,a,function(){e.stopJSAnimation=l()},o,c])}},{key:"runStepAnimation",value:function(t){var e=this,r=t.steps,n=t.begin,o=t.onAnimationStart,i=r[0],a=i.style,c=i.duration,u=void 0===c?0:c;return this.manager.start([o].concat(uw(r.reduce(function(t,n,o){if(0===o)return t;var i=n.duration,a=n.easing,c=void 0===a?"ease":a,u=n.style,l=n.properties,s=n.onAnimationEnd,f=o>0?r[o-1]:n,p=l||Object.keys(u);if("function"==typeof c||"spring"===c)return[].concat(uw(t),[e.runJSAnimation.bind(e,{from:f.style,to:u,duration:i,easing:c}),i]);var h=Bx(p,i,c),d=fw(fw(fw({},f.style),u),{},{transition:h});return[].concat(uw(t),[d,i,s]).filter(Dx)},[a,Math.max(u,n)])),[t.onAnimationEnd]))}},{key:"runAnimation",value:function(t){this.manager||(this.manager=Mx());var e=t.begin,r=t.duration,n=t.attributeName,o=t.to,i=t.easing,a=t.onAnimationStart,c=t.onAnimationEnd,u=t.steps,l=t.children,s=this.manager;if(this.unSubscribe=s.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof l&&"spring"!==i)if(u.length>1)this.runStepAnimation(t);else{var f=n?pw({},n,o):o,p=Bx(Object.keys(f),r,i);s.start([a,e,fw(fw({},f),{},{transition:p}),r,c])}else this.runJSAnimation(t)}},{key:"render",value:function(){var t=this.props,e=t.children;t.begin;var r=t.duration;t.attributeName,t.easing;var i=t.isActive;t.steps,t.from,t.to,t.canBegin,t.onAnimationEnd,t.shouldReAnimate,t.onAnimationReStart;var a=cw(t,aw),c=n.Children.count(e),u=this.state.style;if("function"==typeof e)return e(u);if(!i||0===c||r<=0)return e;var l=function(t){var e=t.props,r=e.style,o=void 0===r?{}:r,i=e.className;return n.cloneElement(t,fw(fw({},a),{},{style:fw(fw({},o),u),className:i}))};return 1===c?l(n.Children.only(e)):o.createElement("div",null,n.Children.map(e,function(t){return l(t)}))}}]),e}();function ww(t){return(ww="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ow(){return Ow=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ow.apply(this,arguments)}function jw(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Sw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sw(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Pw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Aw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pw(Object(r),!0).forEach(function(e){Ew(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pw(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ew(t,e,r){var n;return n=function(t,e){if("object"!=ww(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=ww(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ww(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}xw.displayName="Animate",xw.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},xw.propTypes={from:Gg.oneOfType([Gg.object,Gg.string]),to:Gg.oneOfType([Gg.object,Gg.string]),attributeName:Gg.string,duration:Gg.number,begin:Gg.number,easing:Gg.oneOfType([Gg.string,Gg.func]),steps:Gg.arrayOf(Gg.shape({duration:Gg.number.isRequired,style:Gg.object.isRequired,easing:Gg.oneOfType([Gg.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Gg.func]),properties:Gg.arrayOf("string"),onAnimationEnd:Gg.func})),children:Gg.oneOfType([Gg.node,Gg.func]),isActive:Gg.bool,canBegin:Gg.bool,onAnimationEnd:Gg.func,shouldReAnimate:Gg.bool,onAnimationStart:Gg.func,onAnimationReStart:Gg.func};var kw=function(t,e,r,n,o){var i,a=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,u=r>=0?1:-1,l=n>=0&&r>=0||n<0&&r<0?1:0;if(a>0&&o instanceof Array){for(var s=[0,0,0,0],f=0;f<4;f++)s[f]=o[f]>a?a:o[f];i="M".concat(t,",").concat(e+c*s[0]),s[0]>0&&(i+="A ".concat(s[0],",").concat(s[0],",0,0,").concat(l,",").concat(t+u*s[0],",").concat(e)),i+="L ".concat(t+r-u*s[1],",").concat(e),s[1]>0&&(i+="A ".concat(s[1],",").concat(s[1],",0,0,").concat(l,",\n        ").concat(t+r,",").concat(e+c*s[1])),i+="L ".concat(t+r,",").concat(e+n-c*s[2]),s[2]>0&&(i+="A ".concat(s[2],",").concat(s[2],",0,0,").concat(l,",\n        ").concat(t+r-u*s[2],",").concat(e+n)),i+="L ".concat(t+u*s[3],",").concat(e+n),s[3]>0&&(i+="A ".concat(s[3],",").concat(s[3],",0,0,").concat(l,",\n        ").concat(t,",").concat(e+n-c*s[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var p=Math.min(a,o);i="M ".concat(t,",").concat(e+c*p,"\n            A ").concat(p,",").concat(p,",0,0,").concat(l,",").concat(t+u*p,",").concat(e,"\n            L ").concat(t+r-u*p,",").concat(e,"\n            A ").concat(p,",").concat(p,",0,0,").concat(l,",").concat(t+r,",").concat(e+c*p,"\n            L ").concat(t+r,",").concat(e+n-c*p,"\n            A ").concat(p,",").concat(p,",0,0,").concat(l,",").concat(t+r-u*p,",").concat(e+n,"\n            L ").concat(t+u*p,",").concat(e+n,"\n            A ").concat(p,",").concat(p,",0,0,").concat(l,",").concat(t,",").concat(e+n-c*p," Z")}else i="M ".concat(t,",").concat(e," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return i},Mw=function(t,e){if(!t||!e)return!1;var r=t.x,n=t.y,o=e.x,i=e.y,a=e.width,c=e.height;if(Math.abs(a)>0&&Math.abs(c)>0){var u=Math.min(o,o+a),l=Math.max(o,o+a),s=Math.min(i,i+c),f=Math.max(i,i+c);return r>=u&&r<=l&&n>=s&&n<=f}return!1},_w={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Tw=function(t){var e=Aw(Aw({},_w),t),r=n.useRef(),i=jw(n.useState(-1),2),a=i[0],c=i[1];n.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var t=r.current.getTotalLength();t&&c(t)}catch(e){}},[]);var u=e.x,l=e.y,f=e.width,p=e.height,h=e.radius,d=e.className,y=e.animationEasing,v=e.animationDuration,m=e.animationBegin,b=e.isAnimationActive,g=e.isUpdateAnimationActive;if(u!==+u||l!==+l||f!==+f||p!==+p||0===f||0===p)return null;var x=s("recharts-rectangle",d);return g?o.createElement(xw,{canBegin:a>0,from:{width:f,height:p,x:u,y:l},to:{width:f,height:p,x:u,y:l},duration:v,animationEasing:y,isActive:g},function(t){var n=t.width,i=t.height,c=t.x,u=t.y;return o.createElement(xw,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:v,isActive:b,easing:y},o.createElement("path",Ow({},Qr(e,!0),{className:x,d:kw(c,u,n,i,h),ref:r})))}):o.createElement("path",Ow({},Qr(e,!0),{className:x,d:kw(u,l,f,p,h)}))};function Cw(){return Cw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cw.apply(this,arguments)}var Nw=function(t){var e=t.cx,r=t.cy,o=t.r,i=t.className,a=s("recharts-dot",i);return e===+e&&r===+r&&o===+o?n.createElement("circle",Cw({},Qr(t,!1),Lr(t),{className:a,cx:e,cy:r,r:o})):null};function Dw(t){return(Dw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Iw=["x","y","top","left","width","height","className"];function Bw(){return Bw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Bw.apply(this,arguments)}function Rw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Lw(t,e,r){var n;return n=function(t,e){if("object"!=Dw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Dw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Dw(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zw(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var $w=function(t,e,r,n,o,i){return"M".concat(t,",").concat(o,"v").concat(n,"M").concat(i,",").concat(e,"h").concat(r)},Uw=function(t){var e=t.x,r=void 0===e?0:e,n=t.y,i=void 0===n?0:n,a=t.top,c=void 0===a?0:a,u=t.left,l=void 0===u?0:u,f=t.width,p=void 0===f?0:f,h=t.height,d=void 0===h?0:h,y=t.className,v=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rw(Object(r),!0).forEach(function(e){Lw(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rw(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({x:r,y:i,top:c,left:l,width:p,height:d},zw(t,Iw));return jr(r)&&jr(i)&&jr(p)&&jr(d)&&jr(c)&&jr(l)?o.createElement("path",Bw({},Qr(v,!0),{className:s("recharts-cross",y),d:$w(r,i,p,d,c,l)})):null},Fw=Fa(Object.getPrototypeOf,Object),qw=L,Ww=Fw,Hw=z,Xw=Function.prototype,Vw=Object.prototype,Gw=Xw.toString,Yw=Vw.hasOwnProperty,Kw=Gw.call(Object);const Zw=r(function(t){if(!Hw(t)||"[object Object]"!=qw(t))return!1;var e=Ww(t);if(null===e)return!0;var r=Yw.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Gw.call(r)==Kw});var Jw=L,Qw=z;const tO=r(function(t){return!0===t||!1===t||Qw(t)&&"[object Boolean]"==Jw(t)});function eO(t){return(eO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rO(){return rO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rO.apply(this,arguments)}function nO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return oO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oO(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function aO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?iO(Object(r),!0).forEach(function(e){cO(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iO(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function cO(t,e,r){var n;return n=function(t,e){if("object"!=eO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=eO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==eO(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var uO=function(t,e,r,n,o){var i,a=r-n;return i="M ".concat(t,",").concat(e),i+="L ".concat(t+r,",").concat(e),i+="L ".concat(t+r-a/2,",").concat(e+o),i+="L ".concat(t+r-a/2-n,",").concat(e+o),i+="L ".concat(t,",").concat(e," Z")},lO={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sO=function(t){var e=aO(aO({},lO),t),r=n.useRef(),i=nO(n.useState(-1),2),a=i[0],c=i[1];n.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var t=r.current.getTotalLength();t&&c(t)}catch(e){}},[]);var u=e.x,l=e.y,f=e.upperWidth,p=e.lowerWidth,h=e.height,d=e.className,y=e.animationEasing,v=e.animationDuration,m=e.animationBegin,b=e.isUpdateAnimationActive;if(u!==+u||l!==+l||f!==+f||p!==+p||h!==+h||0===f&&0===p||0===h)return null;var g=s("recharts-trapezoid",d);return b?o.createElement(xw,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:h,x:u,y:l},to:{upperWidth:f,lowerWidth:p,height:h,x:u,y:l},duration:v,animationEasing:y,isActive:b},function(t){var n=t.upperWidth,i=t.lowerWidth,c=t.height,u=t.x,l=t.y;return o.createElement(xw,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:v,easing:y},o.createElement("path",rO({},Qr(e,!0),{className:g,d:uO(u,l,n,i,c),ref:r})))}):o.createElement("g",null,o.createElement("path",rO({},Qr(e,!0),{className:g,d:uO(u,l,f,p,h)})))},fO=["option","shapeType","propTransformer","activeClassName","isActive"];function pO(t){return(pO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hO(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function dO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function yO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dO(Object(r),!0).forEach(function(e){vO(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dO(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function vO(t,e,r){var n;return n=function(t,e){if("object"!=pO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=pO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==pO(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mO(t,e){return yO(yO({},e),t)}function bO(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return o.createElement(Tw,r);case"trapezoid":return o.createElement(sO,r);case"sector":return o.createElement(Ng,r);case"symbols":if(function(t){return"symbols"===t}(e))return o.createElement(Jo,r);break;default:return null}}function gO(t){var e,r=t.option,i=t.shapeType,a=t.propTransformer,c=void 0===a?mO:a,u=t.activeClassName,l=void 0===u?"recharts-active-shape":u,s=t.isActive,f=hO(t,fO);if(n.isValidElement(r))e=n.cloneElement(r,yO(yO({},f),function(t){return n.isValidElement(t)?t.props:t}(r)));else if(Q(r))e=r(f);else if(Zw(r)&&!tO(r)){var p=c(r,f);e=o.createElement(bO,{shapeType:i,elementProps:p})}else{var h=f;e=o.createElement(bO,{shapeType:i,elementProps:h})}return s?o.createElement(fn,{className:l},e):e}function xO(t,e){return null!=e&&"trapezoids"in t.props}function wO(t,e){return null!=e&&"sectors"in t.props}function OO(t,e){return null!=e&&"points"in t.props}function jO(t,e){var r,n,o=t.x===(null==e||null===(r=e.labelViewBox)||void 0===r?void 0:r.x)||t.x===e.x,i=t.y===(null==e||null===(n=e.labelViewBox)||void 0===n?void 0:n.y)||t.y===e.y;return o&&i}function SO(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function PO(t,e){var r=t.x===e.x,n=t.y===e.y,o=t.z===e.z;return r&&n&&o}function AO(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,o=function(t,e){var r;return xO(t,e)?r="trapezoids":wO(t,e)?r="sectors":OO(t,e)&&(r="points"),r}(r,e),i=function(t,e){var r,n;return xO(t,e)?null===(r=e.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:wO(t,e)?null===(n=e.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:OO(t,e)?e.payload:{}}(r,e),a=n.filter(function(t,n){var a=Kv(i,t),c=r.props[o].filter(function(t){var n=function(t,e){var r;return xO(t,e)?r=jO:wO(t,e)?r=SO:OO(t,e)&&(r=PO),r}(r,e);return n(t,e)}),u=r.props[o].indexOf(c[c.length-1]);return a&&n===u});return n.indexOf(a[a.length-1])}var EO=Math.ceil,kO=Math.max;var MO=Ks,_O=1/0;var TO=function(t){return t?(t=MO(t))===_O||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},CO=function(t,e,r,n){for(var o=-1,i=kO(EO((e-t)/(r||1)),0),a=Array(i);i--;)a[n?i:++o]=t,t+=r;return a},NO=Yl,DO=TO;const IO=r(function(t){return function(e,r,n){return n&&"number"!=typeof n&&NO(e,r,n)&&(r=n=void 0),e=DO(e),void 0===r?(r=e,e=0):r=DO(r),n=void 0===n?e<r?1:-1:DO(n),CO(e,r,n,t)}}());function BO(t){return(BO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function RO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function LO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?RO(Object(r),!0).forEach(function(e){zO(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):RO(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function zO(t,e,r){var n;return n=function(t,e){if("object"!=BO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=BO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==BO(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $O=["Webkit","Moz","O","ms"];function UO(t){return(UO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function FO(){return FO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},FO.apply(this,arguments)}function qO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function WO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qO(Object(r),!0).forEach(function(e){KO(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qO(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function HO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ZO(n.key),n)}}function XO(t,e,r){return e=GO(e),function(t,e){if(e&&("object"===UO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,VO()?Reflect.construct(e,r||[],GO(t).constructor):e.apply(t,r))}function VO(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(VO=function(){return!!t})()}function GO(t){return(GO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YO(t,e){return(YO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KO(t,e,r){return(e=ZO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZO(t){var e=function(t,e){if("object"!=UO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=UO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==UO(e)?e:e+""}var JO=function(t){return t.changedTouches&&!!t.changedTouches.length},QO=function(){function t(e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),KO(r=XO(this,t,[e]),"handleDrag",function(t){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(t):r.state.isSlideMoving&&r.handleSlideDrag(t)}),KO(r,"handleTouchMove",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&r.handleDrag(t.changedTouches[0])}),KO(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var t=r.props,e=t.endIndex,n=t.onDragEnd,o=t.startIndex;null==n||n({endIndex:e,startIndex:o})}),r.detachDragEndListener()}),KO(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),KO(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),KO(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),KO(r,"handleSlideDragStart",function(t){var e=JO(t)?t.changedTouches[0]:t;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:e.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&YO(t,e)}(t,n.PureComponent),e=t,i=[{key:"renderDefaultTraveller",value:function(t){var e=t.x,r=t.y,n=t.width,i=t.height,a=t.stroke,c=Math.floor(r+i/2)-1;return o.createElement(o.Fragment,null,o.createElement("rect",{x:e,y:r,width:n,height:i,fill:a,stroke:"none"}),o.createElement("line",{x1:e+1,y1:c,x2:e+n-1,y2:c,fill:"none",stroke:"#fff"}),o.createElement("line",{x1:e+1,y1:c+2,x2:e+n-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,r){return o.isValidElement(e)?o.cloneElement(e,r):Q(e)?e(r):t.renderDefaultTraveller(r)}},{key:"getDerivedStateFromProps",value:function(t,e){var r=t.data,n=t.width,o=t.x,i=t.travellerWidth,a=t.updateId,c=t.startIndex,u=t.endIndex;if(r!==e.prevData||a!==e.prevUpdateId)return WO({prevData:r,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:n},r&&r.length?function(t){var e=t.data,r=t.startIndex,n=t.endIndex,o=t.x,i=t.width,a=t.travellerWidth;if(!e||!e.length)return{};var c=e.length,u=Pp().domain(IO(0,c)).range([o,o+i-a]),l=u.domain().map(function(t){return u(t)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(n),scale:u,scaleValues:l}}({data:r,width:n,x:o,travellerWidth:i,startIndex:c,endIndex:u}):{scale:null,scaleValues:null});if(e.scale&&(n!==e.prevWidth||o!==e.prevX||i!==e.prevTravellerWidth)){e.scale.range([o,o+n-i]);var l=e.scale.domain().map(function(t){return e.scale(t)});return{prevData:r,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:n,startX:e.scale(t.startIndex),endX:e.scale(t.endIndex),scaleValues:l}}return null}},{key:"getIndexInRange",value:function(t,e){for(var r=0,n=t.length-1;n-r>1;){var o=Math.floor((r+n)/2);t[o]>e?n=o:r=o}return e>=t[n]?n:r}}],(r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var r=e.startX,n=e.endX,o=this.state.scaleValues,i=this.props,a=i.gap,c=i.data.length-1,u=Math.min(r,n),l=Math.max(r,n),s=t.getIndexInRange(o,u),f=t.getIndexInRange(o,l);return{startIndex:s-s%a,endIndex:f===c?c:f-f%a}}},{key:"getTextOfTick",value:function(t){var e=this.props,r=e.data,n=e.tickFormatter,o=e.dataKey,i=Ob(r[t],o,t);return Q(n)?n(i,t):i}},{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(t){var e=this.state,r=e.slideMoveStartX,n=e.startX,o=e.endX,i=this.props,a=i.x,c=i.width,u=i.travellerWidth,l=i.startIndex,s=i.endIndex,f=i.onChange,p=t.pageX-r;p>0?p=Math.min(p,a+c-u-o,a+c-u-n):p<0&&(p=Math.max(p,a-n,a-o));var h=this.getIndex({startX:n+p,endX:o+p});h.startIndex===l&&h.endIndex===s||!f||f(h),this.setState({startX:n+p,endX:o+p,slideMoveStartX:t.pageX})}},{key:"handleTravellerDragStart",value:function(t,e){var r=JO(e)?e.changedTouches[0]:e;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:t,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(t){var e=this.state,r=e.brushMoveStartX,n=e.movingTravellerId,o=e.endX,i=e.startX,a=this.state[n],c=this.props,u=c.x,l=c.width,s=c.travellerWidth,f=c.onChange,p=c.gap,h=c.data,d={startX:this.state.startX,endX:this.state.endX},y=t.pageX-r;y>0?y=Math.min(y,u+l-s-a):y<0&&(y=Math.max(y,u-a)),d[n]=a+y;var v=this.getIndex(d),m=v.startIndex,b=v.endIndex;this.setState(KO(KO({},n,a+y),"brushMoveStartX",t.pageX),function(){var t;f&&(t=h.length-1,("startX"===n&&(o>i?m%p===0:b%p===0)||o<i&&b===t||"endX"===n&&(o>i?b%p===0:m%p===0)||o>i&&b===t)&&f(v))})}},{key:"handleTravellerMoveKeyboard",value:function(t,e){var r=this,n=this.state,o=n.scaleValues,i=n.startX,a=n.endX,c=this.state[e],u=o.indexOf(c);if(-1!==u){var l=u+t;if(!(-1===l||l>=o.length)){var s=o[l];"startX"===e&&s>=a||"endX"===e&&s<=i||this.setState(KO({},e,s),function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))})}}}},{key:"renderBackground",value:function(){var t=this.props,e=t.x,r=t.y,n=t.width,i=t.height,a=t.fill,c=t.stroke;return o.createElement("rect",{stroke:c,fill:a,x:e,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var t=this.props,e=t.x,r=t.y,i=t.width,a=t.height,c=t.data,u=t.children,l=t.padding,s=n.Children.only(u);return s?o.cloneElement(s,{x:e,y:r,width:i,height:a,margin:l,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(e,r){var n,i,a=this,c=this.props,u=c.y,l=c.travellerWidth,s=c.height,f=c.traveller,p=c.ariaLabel,h=c.data,d=c.startIndex,y=c.endIndex,v=Math.max(e,this.props.x),m=WO(WO({},Qr(this.props,!1)),{},{x:v,y:u,width:l,height:s}),b=p||"Min value: ".concat(null===(n=h[d])||void 0===n?void 0:n.name,", Max value: ").concat(null===(i=h[y])||void 0===i?void 0:i.name);return o.createElement(fn,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(t){["ArrowLeft","ArrowRight"].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),a.handleTravellerMoveKeyboard("ArrowRight"===t.key?1:-1,r))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,m))}},{key:"renderSlide",value:function(t,e){var r=this.props,n=r.y,i=r.height,a=r.stroke,c=r.travellerWidth,u=Math.min(t,e)+c,l=Math.max(Math.abs(e-t)-c,0);return o.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:u,y:n,width:l,height:i})}},{key:"renderText",value:function(){var t=this.props,e=t.startIndex,r=t.endIndex,n=t.y,i=t.height,a=t.travellerWidth,c=t.stroke,u=this.state,l=u.startX,s=u.endX,f={pointerEvents:"none",fill:c};return o.createElement(fn,{className:"recharts-brush-texts"},o.createElement(Kf,FO({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,s)-5,y:n+i/2},f),this.getTextOfTick(e)),o.createElement(Kf,FO({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,s)+a+5,y:n+i/2},f),this.getTextOfTick(r)))}},{key:"render",value:function(){var t=this.props,e=t.data,r=t.className,n=t.children,i=t.x,a=t.y,c=t.width,u=t.height,l=t.alwaysShowText,f=this.state,p=f.startX,h=f.endX,d=f.isTextActive,y=f.isSlideMoving,v=f.isTravellerMoving,m=f.isTravellerFocused;if(!e||!e.length||!jr(i)||!jr(a)||!jr(c)||!jr(u)||c<=0||u<=0)return null;var b,g,x,w,O=s("recharts-brush",r),j=1===o.Children.count(n),S=(g="none",x=(b="userSelect").replace(/(\w)/,function(t){return t.toUpperCase()}),(w=$O.reduce(function(t,e){return LO(LO({},t),{},zO({},e+x,g))},{}))[b]=g,w);return o.createElement(fn,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(p,h),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(h,"endX"),(d||y||v||m||l)&&this.renderText())}}])&&HO(e.prototype,r),i&&HO(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();KO(QO,"displayName","Brush"),KO(QO,"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 tj=yl;var ej=ki,rj=Su,nj=function(t,e){var r;return tj(t,function(t,n,o){return!(r=e(t,n,o))}),!!r},oj=O,ij=Yl;const aj=r(function(t,e,r){var n=oj(t)?ej:nj;return r&&ij(t,e,r)&&(e=void 0),n(t,rj(e))});var cj=function(t,e){var r=t.alwaysShow,n=t.ifOverflow;return r&&(n="extendDomain"),n===e},uj=Bl;var lj=function(t,e,r){"__proto__"==e&&uj?uj(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},sj=hl,fj=Su;const pj=r(function(t,e){var r={};return e=fj(e),sj(t,function(t,n,o){lj(r,n,e(t,n,o))}),r});var hj=yl;var dj=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0},yj=function(t,e){var r=!0;return hj(t,function(t,n,o){return r=!!e(t,n,o)}),r},vj=Su,mj=O,bj=Yl;const gj=r(function(t,e,r){var n=mj(t)?dj:yj;return r&&bj(t,e,r)&&(e=void 0),n(t,vj(e))});var xj=["x","y"];function wj(t){return(wj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oj(){return Oj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Oj.apply(this,arguments)}function jj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Sj(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jj(Object(r),!0).forEach(function(e){Pj(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jj(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Pj(t,e,r){var n;return n=function(t,e){if("object"!=wj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=wj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==wj(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Aj(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Ej(t,e){var r=t.x,n=t.y,o=Aj(t,xj),i="".concat(r),a=parseInt(i,10),c="".concat(n),u=parseInt(c,10),l="".concat(e.height||o.height),s=parseInt(l,10),f="".concat(e.width||o.width),p=parseInt(f,10);return Sj(Sj(Sj(Sj(Sj({},e),o),a?{x:a}:{}),u?{y:u}:{}),{},{height:s,width:p,name:e.name,radius:e.radius})}function kj(t){return o.createElement(gO,Oj({shapeType:"rectangle",propTransformer:Ej,activeClassName:"recharts-active-bar"},t))}var Mj,_j=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(r,n){if("number"==typeof t)return t;var o=jr(r)||function(t){return He(t)}(r);return o?t(r,n):(o||Km(),e)}},Tj=["value","background"];function Cj(t){return(Cj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nj(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Dj(){return Dj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dj.apply(this,arguments)}function Ij(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Bj(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ij(Object(r),!0).forEach(function(e){Fj(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ij(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Rj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qj(n.key),n)}}function Lj(t,e,r){return e=$j(e),function(t,e){if(e&&("object"===Cj(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zj()?Reflect.construct(e,r||[],$j(t).constructor):e.apply(t,r))}function zj(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zj=function(){return!!t})()}function $j(t){return($j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uj(t,e){return(Uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fj(t,e,r){return(e=qj(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qj(t){var e=function(t,e){if("object"!=Cj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Cj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==Cj(e)?e:e+""}var Wj=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return Fj(e=Lj(this,t,[].concat(n)),"state",{isAnimationFinished:!1}),Fj(e,"id",Ar("recharts-bar-")),Fj(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),Fj(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uj(t,e)}(t,n.PureComponent),e=t,i=[{key:"getDerivedStateFromProps",value:function(t,e){return t.animationId!==e.prevAnimationId?{prevAnimationId:t.animationId,curData:t.data,prevData:e.curData}:t.data!==e.curData?{curData:t.data}:null}}],(r=[{key:"renderRectanglesStatically",value:function(t){var e=this,r=this.props,n=r.shape,i=r.dataKey,a=r.activeIndex,c=r.activeBar,u=Qr(this.props,!1);return t&&t.map(function(t,r){var l=r===a,s=l?c:n,f=Bj(Bj(Bj({},u),t),{},{isActive:l,option:s,index:r,dataKey:i,onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd});return o.createElement(fn,Dj({className:"recharts-bar-rectangle"},zr(e.props,t,r),{key:"rectangle-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.value,"-").concat(r)}),o.createElement(kj,f))})}},{key:"renderRectanglesWithAnimation",value:function(){var t=this,e=this.props,r=e.data,n=e.layout,i=e.isAnimationActive,a=e.animationBegin,c=e.animationDuration,u=e.animationEasing,l=e.animationId,s=this.state.prevData;return o.createElement(xw,{begin:a,duration:c,isActive:i,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(e){var i=e.t,a=r.map(function(t,e){var r=s&&s[e];if(r){var o=Mr(r.x,t.x),a=Mr(r.y,t.y),c=Mr(r.width,t.width),u=Mr(r.height,t.height);return Bj(Bj({},t),{},{x:o(i),y:a(i),width:c(i),height:u(i)})}if("horizontal"===n){var l=Mr(0,t.height)(i);return Bj(Bj({},t),{},{y:t.y+t.height-l,height:l})}var f=Mr(0,t.width)(i);return Bj(Bj({},t),{},{width:f})});return o.createElement(fn,null,t.renderRectanglesStatically(a))})}},{key:"renderRectangles",value:function(){var t=this.props,e=t.data,r=t.isAnimationActive,n=this.state.prevData;return!(r&&e&&e.length)||n&&Kv(n,e)?this.renderRectanglesStatically(e):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var t=this,e=this.props,r=e.data,n=e.dataKey,i=e.activeIndex,a=Qr(this.props.background,!1);return r.map(function(e,r){e.value;var c=e.background,u=Nj(e,Tj);if(!c)return null;var l=Bj(Bj(Bj(Bj(Bj({},u),{},{fill:"#eee"},c),a),zr(t.props,e,r)),{},{onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd,dataKey:n,index:r,className:"recharts-bar-background-rectangle"});return o.createElement(kj,Dj({key:"background-bar-".concat(r),option:t.props.background,isActive:r===i},l))})}},{key:"renderErrorBar",value:function(t,e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.data,i=r.xAxis,a=r.yAxis,c=r.layout,u=Yr(r.children,sb);if(!u)return null;var l="vertical"===c?n[0].height/2:n[0].width/2,s=function(t,e){var r=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:r,errorVal:Ob(t,e)}},f={clipPath:t?"url(#clipPath-".concat(e,")"):null};return o.createElement(fn,f,u.map(function(t){return o.cloneElement(t,{key:"error-bar-".concat(e,"-").concat(t.props.dataKey),data:n,xAxis:i,yAxis:a,layout:c,offset:l,dataPointFormatter:s})}))}},{key:"render",value:function(){var t=this.props,e=t.hide,r=t.data,n=t.className,i=t.xAxis,a=t.yAxis,c=t.left,u=t.top,l=t.width,f=t.height,p=t.isAnimationActive,h=t.background,d=t.id;if(e||!r||!r.length)return null;var y=this.state.isAnimationFinished,v=s("recharts-bar",n),m=i&&i.allowDataOverflow,b=a&&a.allowDataOverflow,g=m||b,x=He(d)?this.id:d;return o.createElement(fn,{className:v},m||b?o.createElement("defs",null,o.createElement("clipPath",{id:"clipPath-".concat(x)},o.createElement("rect",{x:m?c:c-l/2,y:b?u:u-f/2,width:m?l:2*l,height:b?f:2*f}))):null,o.createElement(fn,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(x,")"):null},h?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,x),(!p||y)&&Sg.renderCallByParent(this.props,r))}}])&&Rj(e.prototype,r),i&&Rj(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();function Hj(t){return(Hj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kj(n.key),n)}}function Vj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Gj(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vj(Object(r),!0).forEach(function(e){Yj(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vj(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Yj(t,e,r){return(e=Kj(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kj(t){var e=function(t,e){if("object"!=Hj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=Hj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Hj(e)?e:e+""}Mj=Wj,Fj(Wj,"displayName","Bar"),Fj(Wj,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!As,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Fj(Wj,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,o=t.bandSize,i=t.xAxis,a=t.yAxis,c=t.xAxisTicks,u=t.yAxisTicks,l=t.stackedData,s=t.dataStartIndex,f=t.displayedData,p=t.offset,h=function(t,e){if(!t)return null;for(var r=0,n=t.length;r<n;r++)if(t[r].item===e)return t[r].position;return null}(n,r);if(!h)return null;var d=e.layout,y=r.type.defaultProps,v=void 0!==y?Bj(Bj({},y),r.props):r.props,m=v.dataKey,b=v.children,g=v.minPointSize,x="horizontal"===d?a:i,w=l?x.scale.domain():null,O=function(t){var e=t.numericAxis,r=e.scale.domain();if("number"===e.type){var n=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return n<=0&&o>=0?0:o<0?o:n}return r[0]}({numericAxis:x}),j=Yr(b,hf),S=f.map(function(t,e){var n,f,p,y,v,b;l?n=function(t,e){if(!e||2!==e.length||!jr(e[0])||!jr(e[1]))return t;var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]),o=[t[0],t[1]];return(!jr(t[0])||t[0]<r)&&(o[0]=r),(!jr(t[1])||t[1]>n)&&(o[1]=n),o[0]>n&&(o[0]=n),o[1]<r&&(o[1]=r),o}(l[s+e],w):(n=Ob(t,m),Array.isArray(n)||(n=[O,n]));var x=_j(g,Mj.defaultProps.minPointSize)(n[1],e);if("horizontal"===d){var S,P=[a.scale(n[0]),a.scale(n[1])],A=P[0],E=P[1];f=Bb({axis:i,ticks:c,bandSize:o,offset:h.offset,entry:t,index:e}),p=null!==(S=null!=E?E:A)&&void 0!==S?S:void 0,y=h.size;var k=A-E;if(v=Number.isNaN(k)?0:k,b={x:f,y:a.y,width:y,height:a.height},Math.abs(x)>0&&Math.abs(v)<Math.abs(x)){var M=wr(v||x)*(Math.abs(x)-Math.abs(v));p-=M,v+=M}}else{var _=[i.scale(n[0]),i.scale(n[1])],T=_[0],C=_[1];if(f=T,p=Bb({axis:a,ticks:u,bandSize:o,offset:h.offset,entry:t,index:e}),y=C-T,v=h.size,b={x:i.x,y:p,width:i.width,height:v},Math.abs(x)>0&&Math.abs(y)<Math.abs(x))y+=wr(y||x)*(Math.abs(x)-Math.abs(y))}return Bj(Bj(Bj({},t),{},{x:f,y:p,width:y,height:v,value:l?n:n[1],payload:t,background:b},j&&j[e]&&j[e].props),{},{tooltipPayload:[qb(r,t)],tooltipPosition:{x:f+y/2,y:p+v/2}})});return Bj({data:S,layout:d},p)});var Zj=function(t,e){var r=t.x,n=t.y,o=e.x,i=e.y;return{x:Math.min(r,o),y:Math.min(n,i),width:Math.abs(o-r),height:Math.abs(i-n)}},Jj=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scale=e}return e=t,r=[{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(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.bandAware,n=e.position;if(void 0!==t){if(n)switch(n){case"start":default:return this.scale(t);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(t)+i}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}},{key:"isInRange",value:function(t){var e=this.range(),r=e[0],n=e[e.length-1];return r<=n?t>=r&&t<=n:t>=n&&t<=r}}],n=[{key:"create",value:function(e){return new t(e)}}],r&&Xj(e.prototype,r),n&&Xj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();Yj(Jj,"EPS",1e-4);var Qj=function(t){var e=Object.keys(t).reduce(function(e,r){return Gj(Gj({},e),{},Yj({},r,Jj.create(t[r])))},{});return Gj(Gj({},e),{},{apply:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,o=r.position;return pj(t,function(t,r){return e[r].apply(t,{bandAware:n,position:o})})},isInRange:function(t){return gj(t,function(t,r){return e[r].isInRange(t)})}})};var tS=Su,eS=Ya,rS=Qa;var nS=function(t){return function(e,r,n){var o=Object(e);if(!eS(e)){var i=tS(r);e=rS(e),r=function(t){return i(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[i?e[a]:a]:void 0}},oS=TO;var iS=Pu,aS=Su,cS=function(t){var e=oS(t),r=e%1;return e==e?r?e-r:e:0},uS=Math.max;const lS=r(nS(function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:cS(r);return o<0&&(o=uS(n+o,0)),iS(t,aS(e),o)}));var sS=be(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),fS=n.createContext(void 0),pS=n.createContext(void 0),hS=n.createContext(void 0),dS=n.createContext({}),yS=n.createContext(void 0),vS=n.createContext(0),mS=n.createContext(0),bS=function(t){var e=t.state,r=e.xAxisMap,n=e.yAxisMap,i=e.offset,a=t.clipPathId,c=t.children,u=t.width,l=t.height,s=sS(i);return o.createElement(fS.Provider,{value:r},o.createElement(pS.Provider,{value:n},o.createElement(dS.Provider,{value:i},o.createElement(hS.Provider,{value:s},o.createElement(yS.Provider,{value:a},o.createElement(vS.Provider,{value:l},o.createElement(mS.Provider,{value:u},c)))))))},gS=function(t){var e=n.useContext(fS);null==e&&Km();var r=e[t];return null==r&&Km(),r},xS=function(t){var e=n.useContext(pS);null==e&&Km();var r=e[t];return null==r&&Km(),r},wS=function(){return n.useContext(mS)},OS=function(){return n.useContext(vS)};function jS(t){return(jS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function SS(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,CS(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function PS(t,e,r){return e=ES(e),function(t,e){if(e&&("object"===jS(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,AS()?Reflect.construct(e,r||[],ES(t).constructor):e.apply(t,r))}function AS(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(AS=function(){return!!t})()}function ES(t){return(ES=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function kS(t,e){return(kS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function MS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?MS(Object(r),!0).forEach(function(e){TS(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):MS(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function TS(t,e,r){return(e=CS(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CS(t){var e=function(t,e){if("object"!=jS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=jS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==jS(e)?e:e+""}function NS(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return DS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DS(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DS(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function IS(){return IS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},IS.apply(this,arguments)}function BS(t){var e=t.x,r=t.y,i=t.segment,a=t.xAxisId,c=t.yAxisId,u=t.shape,l=t.className,f=t.alwaysShow,p=n.useContext(yS),h=gS(a),d=xS(c),y=n.useContext(hS);if(!p||!y)return null;pn(void 0===f,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=function(t,e,r,n,o,i,a,c,u){var l=o.x,s=o.y,f=o.width,p=o.height;if(r){var h=u.y,d=t.y.apply(h,{position:i});if(cj(u,"discard")&&!t.y.isInRange(d))return null;var y=[{x:l+f,y:d},{x:l,y:d}];return"left"===c?y.reverse():y}if(e){var v=u.x,m=t.x.apply(v,{position:i});if(cj(u,"discard")&&!t.x.isInRange(m))return null;var b=[{x:m,y:s+p},{x:m,y:s}];return"top"===a?b.reverse():b}if(n){var g=u.segment.map(function(e){return t.apply(e,{position:i})});return cj(u,"discard")&&aj(g,function(e){return!t.isInRange(e)})?null:g}return null}(Qj({x:h.scale,y:d.scale}),Sr(e),Sr(r),i&&2===i.length,y,t.position,h.orientation,d.orientation,t);if(!v)return null;var m=NS(v,2),b=m[0],g=b.x,x=b.y,w=m[1],O=w.x,j=w.y,S=_S(_S({clipPath:cj(t,"hidden")?"url(#".concat(p,")"):void 0},Qr(t,!0)),{},{x1:g,y1:x,x2:O,y2:j});return o.createElement(fn,{className:s("recharts-reference-line",l)},function(t,e){return o.isValidElement(t)?o.cloneElement(t,e):Q(t)?t(e):o.createElement("line",IS({},e,{className:"recharts-reference-line-line"}))}(u,S),sg.renderCallByParent(t,function(t){var e=t.x1,r=t.y1,n=t.x2,o=t.y2;return Zj({x:e,y:r},{x:n,y:o})}({x1:g,y1:x,x2:O,y2:j})))}var RS=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),PS(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kS(t,e)}(t,o.Component),SS(t,[{key:"render",value:function(){return o.createElement(BS,this.props)}}])}();function LS(){return LS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},LS.apply(this,arguments)}function zS(t){return(zS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $S(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function US(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$S(Object(r),!0).forEach(function(e){VS(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$S(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function FS(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,GS(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function qS(t,e,r){return e=HS(e),function(t,e){if(e&&("object"===zS(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,WS()?Reflect.construct(e,r||[],HS(t).constructor):e.apply(t,r))}function WS(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(WS=function(){return!!t})()}function HS(t){return(HS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function XS(t,e){return(XS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function VS(t,e,r){return(e=GS(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GS(t){var e=function(t,e){if("object"!=zS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=zS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==zS(e)?e:e+""}TS(RS,"displayName","ReferenceLine"),TS(RS,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var YS=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qS(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&XS(t,e)}(t,o.Component),FS(t,[{key:"render",value:function(){var e=this.props,r=e.x,n=e.y,i=e.r,a=e.alwaysShow,c=e.clipPathId,u=Sr(r),l=Sr(n);if(pn(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!l)return null;var f=function(t){var e=t.x,r=t.y,n=t.xAxis,o=t.yAxis,i=Qj({x:n.scale,y:o.scale}),a=i.apply({x:e,y:r},{bandAware:!0});return cj(t,"discard")&&!i.isInRange(a)?null:a}(this.props);if(!f)return null;var p=f.x,h=f.y,d=this.props,y=d.shape,v=d.className,m=US(US({clipPath:cj(this.props,"hidden")?"url(#".concat(c,")"):void 0},Qr(this.props,!0)),{},{cx:p,cy:h});return o.createElement(fn,{className:s("recharts-reference-dot",v)},t.renderDot(y,m),sg.renderCallByParent(this.props,{x:p-i,y:h-i,width:2*i,height:2*i}))}}])}();function KS(){return KS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},KS.apply(this,arguments)}function ZS(t){return(ZS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function JS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function QS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?JS(Object(r),!0).forEach(function(e){iP(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function tP(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,aP(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function eP(t,e,r){return e=nP(e),function(t,e){if(e&&("object"===ZS(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rP()?Reflect.construct(e,r||[],nP(t).constructor):e.apply(t,r))}function rP(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rP=function(){return!!t})()}function nP(t){return(nP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oP(t,e){return(oP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iP(t,e,r){return(e=aP(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aP(t){var e=function(t,e){if("object"!=ZS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=ZS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==ZS(e)?e:e+""}VS(YS,"displayName","ReferenceDot"),VS(YS,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),VS(YS,"renderDot",function(t,e){return o.isValidElement(t)?o.cloneElement(t,e):Q(t)?t(e):o.createElement(Nw,LS({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"}))});var cP=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),eP(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oP(t,e)}(t,o.Component),tP(t,[{key:"render",value:function(){var e=this.props,r=e.x1,n=e.x2,i=e.y1,a=e.y2,c=e.className,u=e.alwaysShow,l=e.clipPathId;pn(void 0===u,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Sr(r),p=Sr(n),h=Sr(i),d=Sr(a),y=this.props.shape;if(!(f||p||h||d||y))return null;var v=function(t,e,r,n,o){var i=o.x1,a=o.x2,c=o.y1,u=o.y2,l=o.xAxis,s=o.yAxis;if(!l||!s)return null;var f=Qj({x:l.scale,y:s.scale}),p={x:t?f.x.apply(i,{position:"start"}):f.x.rangeMin,y:r?f.y.apply(c,{position:"start"}):f.y.rangeMin},h={x:e?f.x.apply(a,{position:"end"}):f.x.rangeMax,y:n?f.y.apply(u,{position:"end"}):f.y.rangeMax};return!cj(o,"discard")||f.isInRange(p)&&f.isInRange(h)?Zj(p,h):null}(f,p,h,d,this.props);if(!v&&!y)return null;var m=cj(this.props,"hidden")?"url(#".concat(l,")"):void 0;return o.createElement(fn,{className:s("recharts-reference-area",c)},t.renderRect(y,QS(QS({clipPath:m},Qr(this.props,!0)),v)),sg.renderCallByParent(this.props,v))}}])}();function uP(t,e,r){if(e<1)return[];if(1===e&&void 0===r)return t;for(var n=[],o=0;o<t.length;o+=e)n.push(t[o]);return n}function lP(t,e,r){return function(t){var e=t.width,r=t.height,n=function(t){return(t%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=n*Math.PI/180,i=Math.atan(r/e),a=o>i&&o<Math.PI-i?r/Math.sin(o):e/Math.cos(o);return Math.abs(a)}({width:t.width+e.width,height:t.height+e.height},r)}function sP(t,e,r,n,o){if(t*e<t*n||t*e>t*o)return!1;var i=r();return t*(e-t*i/2-n)>=0&&t*(e+t*i/2-o)<=0}function fP(t){return(fP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function hP(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pP(Object(r),!0).forEach(function(e){dP(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function dP(t,e,r){var n;return n=function(t,e){if("object"!=fP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=fP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==fP(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yP(t,e,r){var n=t.tick,o=t.ticks,i=t.viewBox,a=t.minTickGap,c=t.orientation,u=t.interval,l=t.tickFormatter,s=t.unit,f=t.angle;if(!o||!o.length||!n)return[];if(jr(u)||As)return function(t,e){return uP(t,e+1)}(o,"number"==typeof u&&jr(u)?u:0);var p=[],h="top"===c||"bottom"===c?"width":"height",d=s&&"width"===h?wf(s,{fontSize:e,letterSpacing:r}):{width:0,height:0},y=function(t,n){var o=Q(l)?l(t.value,n):t.value;return"width"===h?lP(wf(o,{fontSize:e,letterSpacing:r}),d,f):wf(o,{fontSize:e,letterSpacing:r})[h]},v=o.length>=2?wr(o[1].coordinate-o[0].coordinate):1,m=function(t,e,r){var n="width"===r,o=t.x,i=t.y,a=t.width,c=t.height;return 1===e?{start:n?o:i,end:n?o+a:i+c}:{start:n?o+a:i+c,end:n?o:i}}(i,v,h);return"equidistantPreserveStart"===u?function(t,e,r,n,o){for(var i,a=(n||[]).slice(),c=e.start,u=e.end,l=0,s=1,f=c,p=function(){var e=null==n?void 0:n[l];if(void 0===e)return{v:uP(n,s)};var i,a=l,p=function(){return void 0===i&&(i=r(e,a)),i},h=e.coordinate,d=0===l||sP(t,h,p,f,u);d||(l=0,f=c,s+=1),d&&(f=h+t*(p()/2+o),l+=s)};s<=a.length;)if(i=p())return i.v;return[]}(v,m,y,o,a):(p="preserveStart"===u||"preserveStartEnd"===u?function(t,e,r,n,o,i){var a=(n||[]).slice(),c=a.length,u=e.start,l=e.end;if(i){var s=n[c-1],f=r(s,c-1),p=t*(s.coordinate+t*f/2-l);a[c-1]=s=hP(hP({},s),{},{tickCoord:p>0?s.coordinate-p*t:s.coordinate}),sP(t,s.tickCoord,function(){return f},u,l)&&(l=s.tickCoord-t*(f/2+o),a[c-1]=hP(hP({},s),{},{isShow:!0}))}for(var h=i?c-1:c,d=function(e){var n,i=a[e],c=function(){return void 0===n&&(n=r(i,e)),n};if(0===e){var s=t*(i.coordinate-t*c()/2-u);a[e]=i=hP(hP({},i),{},{tickCoord:s<0?i.coordinate-s*t:i.coordinate})}else a[e]=i=hP(hP({},i),{},{tickCoord:i.coordinate});sP(t,i.tickCoord,c,u,l)&&(u=i.tickCoord+t*(c()/2+o),a[e]=hP(hP({},i),{},{isShow:!0}))},y=0;y<h;y++)d(y);return a}(v,m,y,o,a,"preserveStartEnd"===u):function(t,e,r,n,o){for(var i=(n||[]).slice(),a=i.length,c=e.start,u=e.end,l=function(e){var n,l=i[e],s=function(){return void 0===n&&(n=r(l,e)),n};if(e===a-1){var f=t*(l.coordinate+t*s()/2-u);i[e]=l=hP(hP({},l),{},{tickCoord:f>0?l.coordinate-f*t:l.coordinate})}else i[e]=l=hP(hP({},l),{},{tickCoord:l.coordinate});sP(t,l.tickCoord,s,c,u)&&(u=l.tickCoord-t*(s()/2+o),i[e]=hP(hP({},l),{},{isShow:!0}))},s=a-1;s>=0;s--)l(s);return i}(v,m,y,o,a),p.filter(function(t){return t.isShow}))}iP(cP,"displayName","ReferenceArea"),iP(cP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),iP(cP,"renderRect",function(t,e){return o.isValidElement(t)?o.cloneElement(t,e):Q(t)?t(e):o.createElement(Tw,KS({},e,{className:"recharts-reference-area-rect"}))});var vP=["viewBox"],mP=["viewBox"],bP=["ticks"];function gP(t){return(gP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xP(){return xP=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xP.apply(this,arguments)}function wP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function OP(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wP(Object(r),!0).forEach(function(e){MP(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jP(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function SP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_P(n.key),n)}}function PP(t,e,r){return e=EP(e),function(t,e){if(e&&("object"===gP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,AP()?Reflect.construct(e,r||[],EP(t).constructor):e.apply(t,r))}function AP(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(AP=function(){return!!t})()}function EP(t){return(EP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function kP(t,e){return(kP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function MP(t,e,r){return(e=_P(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _P(t){var e=function(t,e){if("object"!=gP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=gP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==gP(e)?e:e+""}var TP=function(){function t(e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=PP(this,t,[e])).state={fontSize:"",letterSpacing:""},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kP(t,e)}(t,n.Component),e=t,i=[{key:"renderTickItem",value:function(t,e,r){var n=s(e.className,"recharts-cartesian-axis-tick-value");return o.isValidElement(t)?o.cloneElement(t,OP(OP({},e),{},{className:n})):Q(t)?t(OP(OP({},e),{},{className:n})):o.createElement(Kf,xP({},e,{className:"recharts-cartesian-axis-tick-value"}),r)}}],(r=[{key:"shouldComponentUpdate",value:function(t,e){var r=t.viewBox,n=jP(t,vP),o=this.props,i=o.viewBox,a=jP(o,mP);return!Cr(r,i)||!Cr(n,a)||!Cr(e,this.state)}},{key:"componentDidMount",value:function(){var t=this.layerReference;if(t){var e=t.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];e&&this.setState({fontSize:window.getComputedStyle(e).fontSize,letterSpacing:window.getComputedStyle(e).letterSpacing})}}},{key:"getTickLineCoord",value:function(t){var e,r,n,o,i,a,c=this.props,u=c.x,l=c.y,s=c.width,f=c.height,p=c.orientation,h=c.tickSize,d=c.mirror,y=c.tickMargin,v=d?-1:1,m=t.tickSize||h,b=jr(t.tickCoord)?t.tickCoord:t.coordinate;switch(p){case"top":e=r=t.coordinate,a=(n=(o=l+ +!d*f)-v*m)-v*y,i=b;break;case"left":n=o=t.coordinate,i=(e=(r=u+ +!d*s)-v*m)-v*y,a=b;break;case"right":n=o=t.coordinate,i=(e=(r=u+ +d*s)+v*m)+v*y,a=b;break;default:e=r=t.coordinate,a=(n=(o=l+ +d*f)+v*m)+v*y,i=b}return{line:{x1:e,y1:n,x2:r,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var t,e=this.props,r=e.orientation,n=e.mirror;switch(r){case"left":t=n?"start":"end";break;case"right":t=n?"end":"start";break;default:t="middle"}return t}},{key:"getTickVerticalAnchor",value:function(){var t=this.props,e=t.orientation,r=t.mirror,n="end";switch(e){case"left":case"right":n="middle";break;case"top":n=r?"start":"end";break;default:n=r?"end":"start"}return n}},{key:"renderAxisLine",value:function(){var t=this.props,e=t.x,r=t.y,n=t.width,i=t.height,a=t.orientation,c=t.mirror,u=t.axisLine,l=OP(OP(OP({},Qr(this.props,!1)),Qr(u,!1)),{},{fill:"none"});if("top"===a||"bottom"===a){var f=+("top"===a&&!c||"bottom"===a&&c);l=OP(OP({},l),{},{x1:e,y1:r+f*i,x2:e+n,y2:r+f*i})}else{var p=+("left"===a&&!c||"right"===a&&c);l=OP(OP({},l),{},{x1:e+p*n,y1:r,x2:e+p*n,y2:r+i})}return o.createElement("line",xP({},l,{className:s("recharts-cartesian-axis-line",We(u,"className"))}))}},{key:"renderTicks",value:function(e,r,n){var i=this,a=this.props,c=a.tickLine,u=a.stroke,l=a.tick,f=a.tickFormatter,p=a.unit,h=yP(OP(OP({},this.props),{},{ticks:e}),r,n),d=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=Qr(this.props,!1),m=Qr(l,!1),b=OP(OP({},v),{},{fill:"none"},Qr(c,!1)),g=h.map(function(e,r){var n=i.getTickLineCoord(e),a=n.line,g=n.tick,x=OP(OP(OP(OP({textAnchor:d,verticalAnchor:y},v),{},{stroke:"none",fill:u},m),g),{},{index:r,payload:e,visibleTicksCount:h.length,tickFormatter:f});return o.createElement(fn,xP({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},zr(i.props,e,r)),c&&o.createElement("line",xP({},b,a,{className:s("recharts-cartesian-axis-tick-line",We(c,"className"))})),l&&t.renderTickItem(l,x,"".concat(Q(f)?f(e.value,r):e.value).concat(p||"")))});return o.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var t=this,e=this.props,r=e.axisLine,n=e.width,i=e.height,a=e.ticksGenerator,c=e.className;if(e.hide)return null;var u=this.props,l=u.ticks,f=jP(u,bP),p=l;return Q(a)&&(p=l&&l.length>0?a(this.props):a(f)),n<=0||i<=0||!p||!p.length?null:o.createElement(fn,{className:s("recharts-cartesian-axis",c),ref:function(e){t.layerReference=e}},r&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),sg.renderCallByParent(this.props))}}])&&SP(e.prototype,r),i&&SP(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();MP(TP,"displayName","CartesianAxis"),MP(TP,"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 CP=["x1","y1","x2","y2","key"],NP=["offset"];function DP(t){return(DP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function IP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function BP(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?IP(Object(r),!0).forEach(function(e){RP(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function RP(t,e,r){var n;return n=function(t,e){if("object"!=DP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=DP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==DP(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LP(){return LP=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},LP.apply(this,arguments)}function zP(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var $P=function(t){var e=t.fill;if(!e||"none"===e)return null;var r=t.fillOpacity,n=t.x,i=t.y,a=t.width,c=t.height,u=t.ry;return o.createElement("rect",{x:n,y:i,ry:u,width:a,height:c,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function UP(t,e){var r;if(o.isValidElement(t))r=o.cloneElement(t,e);else if(Q(t))r=t(e);else{var n=e.x1,i=e.y1,a=e.x2,c=e.y2,u=e.key,l=zP(e,CP),s=Qr(l,!1);s.offset;var f=zP(s,NP);r=o.createElement("line",LP({},f,{x1:n,y1:i,x2:a,y2:c,fill:"none",key:u}))}return r}function FP(t){var e=t.x,r=t.width,n=t.horizontal,i=void 0===n||n,a=t.horizontalPoints;if(!i||!a||!a.length)return null;var c=a.map(function(n,o){var a=BP(BP({},t),{},{x1:e,y1:n,x2:e+r,y2:n,key:"line-".concat(o),index:o});return UP(i,a)});return o.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function qP(t){var e=t.y,r=t.height,n=t.vertical,i=void 0===n||n,a=t.verticalPoints;if(!i||!a||!a.length)return null;var c=a.map(function(n,o){var a=BP(BP({},t),{},{x1:n,y1:e,x2:n,y2:e+r,key:"line-".concat(o),index:o});return UP(i,a)});return o.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function WP(t){var e=t.horizontalFill,r=t.fillOpacity,n=t.x,i=t.y,a=t.width,c=t.height,u=t.horizontalPoints,l=t.horizontal;if(!(void 0===l||l)||!e||!e.length)return null;var s=u.map(function(t){return Math.round(t+i-i)}).sort(function(t,e){return t-e});i!==s[0]&&s.unshift(0);var f=s.map(function(t,u){var l=!s[u+1]?i+c-t:s[u+1]-t;if(l<=0)return null;var f=u%e.length;return o.createElement("rect",{key:"react-".concat(u),y:t,x:n,height:l,width:a,stroke:"none",fill:e[f],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return o.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function HP(t){var e=t.vertical,r=void 0===e||e,n=t.verticalFill,i=t.fillOpacity,a=t.x,c=t.y,u=t.width,l=t.height,s=t.verticalPoints;if(!r||!n||!n.length)return null;var f=s.map(function(t){return Math.round(t+a-a)}).sort(function(t,e){return t-e});a!==f[0]&&f.unshift(0);var p=f.map(function(t,e){var r=!f[e+1]?a+u-t:f[e+1]-t;if(r<=0)return null;var s=e%n.length;return o.createElement("rect",{key:"react-".concat(e),x:t,y:c,width:r,height:l,stroke:"none",fill:n[s],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return o.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var XP=function(t,e){var r=t.xAxis,n=t.width,o=t.height,i=t.offset;return kb(yP(BP(BP(BP({},TP.defaultProps),r),{},{ticks:Mb(r,!0),viewBox:{x:0,y:0,width:n,height:o}})),i.left,i.left+i.width,e)},VP=function(t,e){var r=t.yAxis,n=t.width,o=t.height,i=t.offset;return kb(yP(BP(BP(BP({},TP.defaultProps),r),{},{ticks:Mb(r,!0),viewBox:{x:0,y:0,width:n,height:o}})),i.top,i.top+i.height,e)},GP={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function YP(t){var e,r,i,a,c,u,l,s,f=wS(),p=OS(),h=n.useContext(dS),d=BP(BP({},t),{},{stroke:null!==(e=t.stroke)&&void 0!==e?e:GP.stroke,fill:null!==(r=t.fill)&&void 0!==r?r:GP.fill,horizontal:null!==(i=t.horizontal)&&void 0!==i?i:GP.horizontal,horizontalFill:null!==(a=t.horizontalFill)&&void 0!==a?a:GP.horizontalFill,vertical:null!==(c=t.vertical)&&void 0!==c?c:GP.vertical,verticalFill:null!==(u=t.verticalFill)&&void 0!==u?u:GP.verticalFill,x:jr(t.x)?t.x:h.left,y:jr(t.y)?t.y:h.top,width:jr(t.width)?t.width:h.width,height:jr(t.height)?t.height:h.height}),y=d.x,v=d.y,m=d.width,b=d.height,g=d.syncWithTicks,x=d.horizontalValues,w=d.verticalValues,O=(l=n.useContext(fS),kr(l)),j=(s=n.useContext(pS),lS(s,function(t){return gj(t.domain,Number.isFinite)})||kr(s));if(!jr(m)||m<=0||!jr(b)||b<=0||!jr(y)||y!==+y||!jr(v)||v!==+v)return null;var S=d.verticalCoordinatesGenerator||XP,P=d.horizontalCoordinatesGenerator||VP,A=d.horizontalPoints,E=d.verticalPoints;if((!A||!A.length)&&Q(P)){var k=x&&x.length,M=P({yAxis:j?BP(BP({},j),{},{ticks:k?x:j.ticks}):void 0,width:f,height:p,offset:h},!!k||g);pn(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(DP(M),"]")),Array.isArray(M)&&(A=M)}if((!E||!E.length)&&Q(S)){var _=w&&w.length,T=S({xAxis:O?BP(BP({},O),{},{ticks:_?w:O.ticks}):void 0,width:f,height:p,offset:h},!!_||g);pn(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(DP(T),"]")),Array.isArray(T)&&(E=T)}return o.createElement("g",{className:"recharts-cartesian-grid"},o.createElement($P,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),o.createElement(FP,LP({},d,{offset:h,horizontalPoints:A,xAxis:O,yAxis:j})),o.createElement(qP,LP({},d,{offset:h,verticalPoints:E,xAxis:O,yAxis:j})),o.createElement(WP,LP({},d,{horizontalPoints:A})),o.createElement(HP,LP({},d,{verticalPoints:E})))}YP.displayName="CartesianGrid";var KP=["type","layout","connectNulls","ref"],ZP=["key"];function JP(t){return(JP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function QP(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function tA(){return tA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},tA.apply(this,arguments)}function eA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function rA(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?eA(Object(r),!0).forEach(function(e){sA(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eA(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function nA(t){return function(t){if(Array.isArray(t))return oA(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return oA(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oA(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oA(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fA(n.key),n)}}function aA(t,e,r){return e=uA(e),function(t,e){if(e&&("object"===JP(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cA()?Reflect.construct(e,r||[],uA(t).constructor):e.apply(t,r))}function cA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cA=function(){return!!t})()}function uA(t){return(uA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lA(t,e){return(lA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sA(t,e,r){return(e=fA(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fA(t){var e=function(t,e){if("object"!=JP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=JP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==JP(e)?e:e+""}var pA=function(){function t(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return sA(e=aA(this,t,[].concat(n)),"state",{isAnimationFinished:!0,totalLength:0}),sA(e,"generateSimpleStrokeDasharray",function(t,e){return"".concat(e,"px ").concat(t-e,"px")}),sA(e,"getStrokeDasharray",function(r,n,o){var i=o.reduce(function(t,e){return t+e});if(!i)return e.generateSimpleStrokeDasharray(n,r);for(var a=Math.floor(r/i),c=r%i,u=n-r,l=[],s=0,f=0;s<o.length;f+=o[s],++s)if(f+o[s]>c){l=[].concat(nA(o.slice(0,s)),[c-f]);break}var p=l.length%2==0?[0,u]:[u];return[].concat(nA(t.repeat(o,a)),nA(l),p).map(function(t){return"".concat(t,"px")}).join(", ")}),sA(e,"id",Ar("recharts-line-")),sA(e,"pathRef",function(t){e.mainCurve=t}),sA(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),sA(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lA(t,e)}(t,n.PureComponent),e=t,i=[{key:"getDerivedStateFromProps",value:function(t,e){return t.animationId!==e.prevAnimationId?{prevAnimationId:t.animationId,curPoints:t.points,prevPoints:e.curPoints}:t.points!==e.curPoints?{curPoints:t.points}:null}},{key:"repeat",value:function(t,e){for(var r=t.length%2!=0?[].concat(nA(t),[0]):t,n=[],o=0;o<e;++o)n=[].concat(nA(n),nA(r));return n}},{key:"renderDotItem",value:function(t,e){var r;if(o.isValidElement(t))r=o.cloneElement(t,e);else if(Q(t))r=t(e);else{var n=e.key,i=QP(e,ZP),a=s("recharts-line-dot","boolean"!=typeof t?t.className:"");r=o.createElement(Nw,tA({key:n},i,{className:a}))}return r}}],(r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var t=this.getTotalLength();this.setState({totalLength:t})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var t=this.getTotalLength();t!==this.state.totalLength&&this.setState({totalLength:t})}}},{key:"getTotalLength",value:function(){var t=this.mainCurve;try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(t,e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.points,i=r.xAxis,a=r.yAxis,c=r.layout,u=Yr(r.children,sb);if(!u)return null;var l=function(t,e){return{x:t.x,y:t.y,value:t.value,errorVal:Ob(t.payload,e)}},s={clipPath:t?"url(#clipPath-".concat(e,")"):null};return o.createElement(fn,s,u.map(function(t){return o.cloneElement(t,{key:"bar-".concat(t.props.dataKey),data:n,xAxis:i,yAxis:a,layout:c,dataPointFormatter:l})}))}},{key:"renderDots",value:function(e,r,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.dot,c=i.points,u=i.dataKey,l=Qr(this.props,!1),s=Qr(a,!0),f=c.map(function(e,r){var n=rA(rA(rA({key:"dot-".concat(r),r:3},l),s),{},{index:r,cx:e.x,cy:e.y,value:e.value,dataKey:u,payload:e.payload,points:c});return t.renderDotItem(a,n)}),p={clipPath:e?"url(#clipPath-".concat(r?"":"dots-").concat(n,")"):null};return o.createElement(fn,tA({className:"recharts-line-dots",key:"dots"},p),f)}},{key:"renderCurveStatically",value:function(t,e,r,n){var i=this.props,a=i.type,c=i.layout,u=i.connectNulls;i.ref;var l=QP(i,KP),s=rA(rA(rA({},Qr(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:e?"url(#clipPath-".concat(r,")"):null,points:t},n),{},{type:a,layout:c,connectNulls:u});return o.createElement(Wg,tA({},s,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(t,e){var r=this,n=this.props,i=n.points,a=n.strokeDasharray,c=n.isAnimationActive,u=n.animationBegin,l=n.animationDuration,s=n.animationEasing,f=n.animationId,p=n.animateNewValues,h=n.width,d=n.height,y=this.state,v=y.prevPoints,m=y.totalLength;return o.createElement(xw,{begin:u,duration:l,isActive:c,easing:s,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var o=n.t;if(v){var c=v.length/i.length,u=i.map(function(t,e){var r=Math.floor(e*c);if(v[r]){var n=v[r],i=Mr(n.x,t.x),a=Mr(n.y,t.y);return rA(rA({},t),{},{x:i(o),y:a(o)})}if(p){var u=Mr(2*h,t.x),l=Mr(d/2,t.y);return rA(rA({},t),{},{x:u(o),y:l(o)})}return rA(rA({},t),{},{x:t.x,y:t.y})});return r.renderCurveStatically(u,t,e)}var l,s=Mr(0,m)(o);if(a){var f="".concat(a).split(/[,\s]+/gim).map(function(t){return parseFloat(t)});l=r.getStrokeDasharray(s,m,f)}else l=r.generateSimpleStrokeDasharray(m,s);return r.renderCurveStatically(i,t,e,{strokeDasharray:l})})}},{key:"renderCurve",value:function(t,e){var r=this.props,n=r.points,o=r.isAnimationActive,i=this.state,a=i.prevPoints,c=i.totalLength;return o&&n&&n.length&&(!a&&c>0||!Kv(a,n))?this.renderCurveWithAnimation(t,e):this.renderCurveStatically(n,t,e)}},{key:"render",value:function(){var t,e=this.props,r=e.hide,n=e.dot,i=e.points,a=e.className,c=e.xAxis,u=e.yAxis,l=e.top,f=e.left,p=e.width,h=e.height,d=e.isAnimationActive,y=e.id;if(r||!i||!i.length)return null;var v=this.state.isAnimationFinished,m=1===i.length,b=s("recharts-line",a),g=c&&c.allowDataOverflow,x=u&&u.allowDataOverflow,w=g||x,O=He(y)?this.id:y,j=null!==(t=Qr(n,!1))&&void 0!==t?t:{r:3,strokeWidth:2},S=j.r,P=void 0===S?3:S,A=j.strokeWidth,E=void 0===A?2:A,k=(function(t){return t&&"object"===qr(t)&&"clipDot"in t}(n)?n:{}).clipDot,M=void 0===k||k,_=2*P+E;return o.createElement(fn,{className:b},g||x?o.createElement("defs",null,o.createElement("clipPath",{id:"clipPath-".concat(O)},o.createElement("rect",{x:g?f:f-p/2,y:x?l:l-h/2,width:g?p:2*p,height:x?h:2*h})),!M&&o.createElement("clipPath",{id:"clipPath-dots-".concat(O)},o.createElement("rect",{x:f-_/2,y:l-_/2,width:p+_,height:h+_}))):null,!m&&this.renderCurve(w,O),this.renderErrorBar(w,O),(m||n)&&this.renderDots(w,M,O),(!d||v)&&Sg.renderCallByParent(this.props,i))}}])&&iA(e.prototype,r),i&&iA(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();function hA(t){return(hA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dA(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xA(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function yA(t,e,r){return e=mA(e),function(t,e){if(e&&("object"===hA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vA()?Reflect.construct(e,r||[],mA(t).constructor):e.apply(t,r))}function vA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vA=function(){return!!t})()}function mA(t){return(mA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bA(t,e){return(bA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gA(t,e,r){return(e=xA(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xA(t){var e=function(t,e){if("object"!=hA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=hA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==hA(e)?e:e+""}function wA(){return wA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wA.apply(this,arguments)}function OA(t){var e=t.xAxisId,r=wS(),o=OS(),i=gS(e);return null==i?null:n.createElement(TP,wA({},i,{className:s("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(t){return Mb(t,!0)}}))}sA(pA,"displayName","Line"),sA(pA,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!As,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),sA(pA,"getComposedData",function(t){var e=t.props,r=t.xAxis,n=t.yAxis,o=t.xAxisTicks,i=t.yAxisTicks,a=t.dataKey,c=t.bandSize,u=t.displayedData,l=t.offset,s=e.layout;return rA({points:u.map(function(t,e){var u=Ob(t,a);return"horizontal"===s?{x:Ib({axis:r,ticks:o,bandSize:c,entry:t,index:e}),y:He(u)?null:n.scale(u),value:u,payload:t}:{x:He(u)?null:r.scale(u),y:Ib({axis:n,ticks:i,bandSize:c,entry:t,index:e}),value:u,payload:t}}),layout:s},l)});var jA=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),yA(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bA(t,e)}(t,n.Component),dA(t,[{key:"render",value:function(){return n.createElement(OA,this.props)}}])}();function SA(t){return(SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function PA(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TA(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function AA(t,e,r){return e=kA(e),function(t,e){if(e&&("object"===SA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,EA()?Reflect.construct(e,r||[],kA(t).constructor):e.apply(t,r))}function EA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(EA=function(){return!!t})()}function kA(t){return(kA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function MA(t,e){return(MA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _A(t,e,r){return(e=TA(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TA(t){var e=function(t,e){if("object"!=SA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=SA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==SA(e)?e:e+""}function CA(){return CA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},CA.apply(this,arguments)}gA(jA,"displayName","XAxis"),gA(jA,"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});var NA=function(t){var e=t.yAxisId,r=wS(),o=OS(),i=xS(e);return null==i?null:n.createElement(TP,CA({},i,{className:s("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(t){return Mb(t,!0)}}))},DA=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),AA(this,t,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&MA(t,e)}(t,n.Component),PA(t,[{key:"render",value:function(){return n.createElement(NA,this.props)}}])}();function IA(t){return function(t){if(Array.isArray(t))return BA(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return BA(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BA(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BA(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}_A(DA,"displayName","YAxis"),_A(DA,"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});var RA=function(t,e,r,n,o){var i=Yr(t,RS),a=Yr(t,YS),c=[].concat(IA(i),IA(a)),u=Yr(t,cP),l="".concat(n,"Id"),s=n[0],f=e;if(c.length&&(f=c.reduce(function(t,e){if(e.props[l]===r&&cj(e.props,"extendDomain")&&jr(e.props[s])){var n=e.props[s];return[Math.min(t[0],n),Math.max(t[1],n)]}return t},f)),u.length){var p="".concat(s,"1"),h="".concat(s,"2");f=u.reduce(function(t,e){if(e.props[l]===r&&cj(e.props,"extendDomain")&&jr(e.props[p])&&jr(e.props[h])){var n=e.props[p],o=e.props[h];return[Math.min(t[0],n,o),Math.max(t[1],n,o)]}return t},f)}return o&&o.length&&(f=o.reduce(function(t,e){return jr(e)?[Math.min(t[0],e),Math.max(t[1],e)]:t},f)),f},LA={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(t,e,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new o(n,i||t,a),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],c]:t._events[u].push(c):(t._events[u]=c,t._eventsCount++),t}function a(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),c.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)e.call(t,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},c.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},c.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},c.prototype.emit=function(t,e,n,o,i,a){var c=r?r+t:t;if(!this._events[c])return!1;var u,l,s=this._events[c],f=arguments.length;if(s.fn){switch(s.once&&this.removeListener(t,s.fn,void 0,!0),f){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,e),!0;case 3:return s.fn.call(s.context,e,n),!0;case 4:return s.fn.call(s.context,e,n,o),!0;case 5:return s.fn.call(s.context,e,n,o,i),!0;case 6:return s.fn.call(s.context,e,n,o,i,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];s.fn.apply(s.context,u)}else{var p,h=s.length;for(l=0;l<h;l++)switch(s[l].once&&this.removeListener(t,s[l].fn,void 0,!0),f){case 1:s[l].fn.call(s[l].context);break;case 2:s[l].fn.call(s[l].context,e);break;case 3:s[l].fn.call(s[l].context,e,n);break;case 4:s[l].fn.call(s[l].context,e,n,o);break;default:if(!u)for(p=1,u=new Array(f-1);p<f;p++)u[p-1]=arguments[p];s[l].fn.apply(s[l].context,u)}}return!0},c.prototype.on=function(t,e,r){return i(this,t,e,r,!1)},c.prototype.once=function(t,e,r){return i(this,t,e,r,!0)},c.prototype.removeListener=function(t,e,n,o){var i=r?r+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var c=this._events[i];if(c.fn)c.fn!==e||o&&!c.once||n&&c.context!==n||a(this,i);else{for(var u=0,l=[],s=c.length;u<s;u++)(c[u].fn!==e||o&&!c[u].once||n&&c[u].context!==n)&&l.push(c[u]);l.length?this._events[i]=1===l.length?l[0]:l:a(this,i)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&a(this,e)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t.exports=c}(LA);var zA=new(r(LA.exports)),$A="recharts.syncMouseEvents";function UA(t){return(UA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function FA(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,WA(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function qA(t,e,r){return(e=WA(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function WA(t){var e=function(t,e){if("object"!=UA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=UA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==UA(e)?e:e+""}var HA=function(){return FA(function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qA(this,"activeIndex",0),qA(this,"coordinateList",[]),qA(this,"layout","horizontal")},[{key:"setDetails",value:function(t){var e,r=t.coordinateList,n=void 0===r?null:r,o=t.container,i=void 0===o?null:o,a=t.layout,c=void 0===a?null:a,u=t.offset,l=void 0===u?null:u,s=t.mouseHandlerCallback,f=void 0===s?null:s;this.coordinateList=null!==(e=null!=n?n:this.coordinateList)&&void 0!==e?e:[],this.container=null!=i?i:this.container,this.layout=null!=c?c:this.layout,this.offset=null!=l?l:this.offset,this.mouseHandlerCallback=null!=f?f: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(t){if(0!==this.coordinateList.length)switch(t.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(t){this.activeIndex=t}},{key:"spoofMouse",value:function(){var t,e;if("horizontal"===this.layout&&0!==this.coordinateList.length){var r=this.container.getBoundingClientRect(),n=r.x,o=r.y,i=r.height,a=this.coordinateList[this.activeIndex].coordinate,c=(null===(t=window)||void 0===t?void 0:t.scrollX)||0,u=(null===(e=window)||void 0===e?void 0:e.scrollY)||0,l=n+a+c,s=o+this.offset.top+i/2+u;this.mouseHandlerCallback({pageX:l,pageY:s})}}}])}();function XA(t){var e=t.cx,r=t.cy,n=t.radius,o=t.startAngle,i=t.endAngle;return{points:[Kb(e,r,n,o),Kb(e,r,n,i)],cx:e,cy:r,radius:n,startAngle:o,endAngle:i}}function VA(t,e,r){var n,o,i,a;if("horizontal"===t)i=n=e.x,o=r.top,a=r.top+r.height;else if("vertical"===t)a=o=e.y,n=r.left,i=r.left+r.width;else if(null!=e.cx&&null!=e.cy){if("centric"!==t)return XA(e);var c=e.cx,u=e.cy,l=e.innerRadius,s=e.outerRadius,f=e.angle,p=Kb(c,u,l,f),h=Kb(c,u,s,f);n=p.x,o=p.y,i=h.x,a=h.y}return[{x:n,y:o},{x:i,y:a}]}function GA(t){return(GA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function YA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function KA(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?YA(Object(r),!0).forEach(function(e){ZA(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):YA(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function ZA(t,e,r){var n;return n=function(t,e){if("object"!=GA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=GA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==GA(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JA(t){var e,r,o,i=t.element,a=t.tooltipEventType,c=t.isActive,u=t.activeCoordinate,l=t.activePayload,f=t.offset,p=t.activeTooltipIndex,h=t.tooltipAxisBandSize,d=t.layout,y=t.chartName,v=null!==(e=i.props.cursor)&&void 0!==e?e:null===(r=i.type.defaultProps)||void 0===r?void 0:r.cursor;if(!i||!v||!c||!u||"ScatterChart"!==y&&"axis"!==a)return null;var m=Wg;if("ScatterChart"===y)o=u,m=Uw;else if("BarChart"===y)o=function(t,e,r,n){var o=n/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===t?e.x-o:r.left+.5,y:"horizontal"===t?r.top+.5:e.y-o,width:"horizontal"===t?n:r.width-1,height:"horizontal"===t?r.height-1:n}}(d,u,f,h),m=Tw;else if("radial"===d){var b=XA(u),g=b.cx,x=b.cy,w=b.radius;o={cx:g,cy:x,startAngle:b.startAngle,endAngle:b.endAngle,innerRadius:w,outerRadius:w},m=Ng}else o={points:VA(d,u,f)},m=Wg;var O=KA(KA(KA(KA({stroke:"#ccc",pointerEvents:"none"},f),o),Qr(v,!1)),{},{payload:l,payloadIndex:p,className:s("recharts-tooltip-cursor",v.className)});return n.isValidElement(v)?n.cloneElement(v,O):n.createElement(m,O)}var QA=["item"],tE=["children","className","width","height","style","compact","title","desc"];function eE(t){return(eE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rE(){return rE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rE.apply(this,arguments)}function nE(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||fE(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oE(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function iE(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vE(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function aE(t,e,r){return e=uE(e),function(t,e){if(e&&("object"===eE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cE()?Reflect.construct(e,r||[],uE(t).constructor):e.apply(t,r))}function cE(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cE=function(){return!!t})()}function uE(t){return(uE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lE(t,e){return(lE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sE(t){return function(t){if(Array.isArray(t))return pE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fE(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fE(t,e){if(t){if("string"==typeof t)return pE(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pE(t,e):void 0}}function pE(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function hE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function dE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hE(Object(r),!0).forEach(function(e){yE(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hE(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function yE(t,e,r){return(e=vE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vE(t){var e=function(t,e){if("object"!=eE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=eE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eE(e)?e:e+""}var mE={xAxis:["bottom","top"],yAxis:["left","right"]},bE={width:"100%",height:"100%"},gE={x:0,y:0};function xE(t){return t}var wE=function(t,e){var r=e.graphicalItems,n=e.dataStartIndex,o=e.dataEndIndex,i=(null!=r?r:[]).reduce(function(t,e){var r=e.props.data;return r&&r.length?[].concat(sE(t),sE(r)):t},[]);return i.length>0?i:t&&t.length&&jr(n)&&jr(o)?t.slice(n,o+1):[]};function OE(t){return"number"===t?[0,"auto"]:void 0}var jE=function(t,e,r,n){var o=t.graphicalItems,i=t.tooltipAxis,a=wE(e,t);return r<0||!o||!o.length||r>=a.length?null:o.reduce(function(o,c){var u,l,s=null!==(u=c.props.data)&&void 0!==u?u:e;(s&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(s=s.slice(t.dataStartIndex,t.dataEndIndex+1)),i.dataKey&&!i.allowDuplicatedCategory)?l=_r(void 0===s?a:s,i.dataKey,n):l=s&&s[r]||a[r];return l?[].concat(sE(o),[qb(c,l)]):o},[])},SE=function(t,e,r,n){var o=n||{x:t.chartX,y:t.chartY},i=function(t,e){return"horizontal"===e?t.x:"vertical"===e?t.y:"centric"===e?t.angle:t.radius}(o,r),a=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,l=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,a=null!==(e=null==r?void 0:r.length)&&void 0!==e?e:0;if(a<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var c=o.range,u=0;u<a;u++){var l=u>0?n[u-1].coordinate:n[a-1].coordinate,s=n[u].coordinate,f=u>=a-1?n[0].coordinate:n[u+1].coordinate,p=void 0;if(wr(s-l)!==wr(f-s)){var h=[];if(wr(f-s)===wr(c[1]-c[0])){p=f;var d=s+c[1]-c[0];h[0]=Math.min(d,(d+l)/2),h[1]=Math.max(d,(d+l)/2)}else{p=l;var y=f+c[1]-c[0];h[0]=Math.min(s,(y+s)/2),h[1]=Math.max(s,(y+s)/2)}var v=[Math.min(s,(p+s)/2),Math.max(s,(p+s)/2)];if(t>v[0]&&t<=v[1]||t>=h[0]&&t<=h[1]){i=n[u].index;break}}else{var m=Math.min(l,f),b=Math.max(l,f);if(t>(m+s)/2&&t<=(b+s)/2){i=n[u].index;break}}}else for(var g=0;g<a;g++)if(0===g&&t<=(r[g].coordinate+r[g+1].coordinate)/2||g>0&&g<a-1&&t>(r[g].coordinate+r[g-1].coordinate)/2&&t<=(r[g].coordinate+r[g+1].coordinate)/2||g===a-1&&t>(r[g].coordinate+r[g-1].coordinate)/2){i=r[g].index;break}return i}(i,a,u,c);if(l>=0&&u){var s=u[l]&&u[l].value,f=jE(t,e,l,s),p=function(t,e,r,n){var o=e.find(function(t){return t&&t.index===r});if(o){if("horizontal"===t)return{x:o.coordinate,y:n.y};if("vertical"===t)return{x:n.x,y:o.coordinate};if("centric"===t){var i=o.coordinate,a=n.radius;return dE(dE(dE({},n),Kb(n.cx,n.cy,a,i)),{},{angle:i,radius:a})}var c=o.coordinate,u=n.angle;return dE(dE(dE({},n),Kb(n.cx,n.cy,c,u)),{},{angle:u,radius:c})}return gE}(r,a,l,o);return{activeTooltipIndex:l,activeLabel:s,activePayload:f,activeCoordinate:p}}return null},PE=function(t,e){var r=e.axes,n=e.graphicalItems,o=e.axisType,i=e.axisIdKey,a=e.stackGroups,c=e.dataStartIndex,u=e.dataEndIndex,l=t.layout,s=t.children,f=t.stackOffset,p=Eb(l,o);return r.reduce(function(e,r){var h,d=void 0!==r.type.defaultProps?dE(dE({},r.type.defaultProps),r.props):r.props,y=d.type,v=d.dataKey,m=d.allowDataOverflow,b=d.allowDuplicatedCategory,g=d.scale,x=d.ticks,w=d.includeHidden,O=d[i];if(e[O])return e;var j,S,P,A=wE(t.data,{graphicalItems:n.filter(function(t){var e;return(i in t.props?t.props[i]:null===(e=t.type.defaultProps)||void 0===e?void 0:e[i])===O}),dataStartIndex:c,dataEndIndex:u}),E=A.length;(function(t,e,r){if("number"===r&&!0===e&&Array.isArray(t)){var n=null==t?void 0:t[0],o=null==t?void 0:t[1];if(n&&o&&jr(n)&&jr(o))return!0}return!1})(d.domain,m,y)&&(j=$b(d.domain,null,m),!p||"number"!==y&&"auto"===g||(P=jb(A,v,"category")));var k=OE(y);if(!j||0===j.length){var M,_=null!==(M=d.domain)&&void 0!==M?M:k;if(v){if(j=jb(A,v,y),"category"===y&&p){var T=function(t){if(!Array.isArray(t))return!1;for(var e=t.length,r={},n=0;n<e;n++){if(r[t[n]])return!0;r[t[n]]=!0}return!1}(j);b&&T?(S=j,j=IO(0,E)):b||(j=Fb(_,j,r).reduce(function(t,e){return t.indexOf(e)>=0?t:[].concat(sE(t),[e])},[]))}else if("category"===y)j=b?j.filter(function(t){return""!==t&&!He(t)}):Fb(_,j,r).reduce(function(t,e){return t.indexOf(e)>=0||""===e||He(e)?t:[].concat(sE(t),[e])},[]);else if("number"===y){var C=function(t,e,r,n,o){var i=e.map(function(e){return Pb(t,e,r,o,n)}).filter(function(t){return!He(t)});return i&&i.length?i.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0]):null}(A,n.filter(function(t){var e,r,n=i in t.props?t.props[i]:null===(e=t.type.defaultProps)||void 0===e?void 0:e[i],o="hide"in t.props?t.props.hide:null===(r=t.type.defaultProps)||void 0===r?void 0:r.hide;return n===O&&(w||!o)}),v,o,l);C&&(j=C)}!p||"number"!==y&&"auto"===g||(P=jb(A,v,"category"))}else j=p?IO(0,E):a&&a[O]&&a[O].hasStack&&"number"===y?"expand"===f?[0,1]:Rb(a[O].stackGroups,c,u):Ab(A,n.filter(function(t){var e=i in t.props?t.props[i]:t.type.defaultProps[i],r="hide"in t.props?t.props.hide:t.type.defaultProps.hide;return e===O&&(w||!r)}),y,l,!0);if("number"===y)j=RA(s,j,O,o,x),_&&(j=$b(_,j,m));else if("category"===y&&_){var N=_;j.every(function(t){return N.indexOf(t)>=0})&&(j=N)}}return dE(dE({},e),{},yE({},O,dE(dE({},d),{},{axisType:o,domain:j,categoricalDomain:P,duplicateDomain:S,originalDomain:null!==(h=d.domain)&&void 0!==h?h:k,isCategorical:p,layout:l})))},{})},AE=function(t,e){var r=e.axisType,n=void 0===r?"xAxis":r,o=e.AxisComp,i=e.graphicalItems,a=e.stackGroups,c=e.dataStartIndex,u=e.dataEndIndex,l=t.children,s="".concat(n,"Id"),f=Yr(l,o),p={};return f&&f.length?p=PE(t,{axes:f,graphicalItems:i,axisType:n,axisIdKey:s,stackGroups:a,dataStartIndex:c,dataEndIndex:u}):i&&i.length&&(p=function(t,e){var r=e.graphicalItems,n=e.Axis,o=e.axisType,i=e.axisIdKey,a=e.stackGroups,c=e.dataStartIndex,u=e.dataEndIndex,l=t.layout,s=t.children,f=wE(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=f.length,h=Eb(l,o),d=-1;return r.reduce(function(t,e){var y,v=(void 0!==e.type.defaultProps?dE(dE({},e.type.defaultProps),e.props):e.props)[i],m=OE("number");return t[v]?t:(d++,h?y=IO(0,p):a&&a[v]&&a[v].hasStack?(y=Rb(a[v].stackGroups,c,u),y=RA(s,y,v,o)):(y=$b(m,Ab(f,r.filter(function(t){var e,r,n=i in t.props?t.props[i]:null===(e=t.type.defaultProps)||void 0===e?void 0:e[i],o="hide"in t.props?t.props.hide:null===(r=t.type.defaultProps)||void 0===r?void 0:r.hide;return n===v&&!o}),"number",l),n.defaultProps.allowDataOverflow),y=RA(s,y,v,o)),dE(dE({},t),{},yE({},v,dE(dE({axisType:o},n.defaultProps),{},{hide:!0,orientation:We(mE,"".concat(o,".").concat(d%2),null),domain:y,originalDomain:m,isCategorical:h,layout:l}))))},{})}(t,{Axis:o,graphicalItems:i,axisType:n,axisIdKey:s,stackGroups:a,dataStartIndex:c,dataEndIndex:u})),p},EE=function(t){var e=t.children,r=t.defaultShowTooltip,n=Kr(e,QO),o=0,i=0;return t.data&&0!==t.data.length&&(i=t.data.length-1),n&&n.props&&(n.props.startIndex>=0&&(o=n.props.startIndex),n.props.endIndex>=0&&(i=n.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:Boolean(r)}},kE=function(t){return"horizontal"===t?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===t?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===t?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ME=function(t,e){var r=t.props,n=(t.graphicalItems,t.xAxisMap),o=void 0===n?{}:n,i=t.yAxisMap,a=void 0===i?{}:i,c=r.width,u=r.height,l=r.children,s=r.margin||{},f=Kr(l,QO),p=Kr(l,ol),h=Object.keys(a).reduce(function(t,e){var r=a[e],n=r.orientation;return r.mirror||r.hide?t:dE(dE({},t),{},yE({},n,t[n]+r.width))},{left:s.left||0,right:s.right||0}),d=Object.keys(o).reduce(function(t,e){var r=o[e],n=r.orientation;return r.mirror||r.hide?t:dE(dE({},t),{},yE({},n,We(t,"".concat(n))+r.height))},{top:s.top||0,bottom:s.bottom||0}),y=dE(dE({},d),h),v=y.bottom;f&&(y.bottom+=f.props.height||QO.defaultProps.height),p&&e&&(y=function(t,e,r,n){var o=r.children,i=r.width,a=r.margin,c=i-(a.left||0)-(a.right||0),u=yb({children:o,legendWidth:c});if(u){var l=n||{},s=l.width,f=l.height,p=u.align,h=u.verticalAlign,d=u.layout;if(("vertical"===d||"horizontal"===d&&"middle"===h)&&"center"!==p&&jr(t[p]))return xb(xb({},t),{},wb({},p,t[p]+(s||0)));if(("horizontal"===d||"vertical"===d&&"center"===p)&&"middle"!==h&&jr(t[h]))return xb(xb({},t),{},wb({},h,t[h]+(f||0)))}return t}(y,0,r,e));var m=c-y.left-y.right,b=u-y.top-y.bottom;return dE(dE({brushBottom:v},y),{},{width:Math.max(m,0),height:Math.max(b,0)})},_E=function(t,e){return"xAxis"===e?t[e].width:"yAxis"===e?t[e].height:void 0},TE=function(t){var e=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=void 0===i?"axis":i,c=t.validateTooltipEventTypes,u=void 0===c?["axis"]:c,l=t.axisComponents,f=t.legendContent,p=t.formatAxisMap,h=t.defaultProps,d=function(t,e){var r=e.graphicalItems,n=e.stackGroups,o=e.offset,i=e.updateId,a=e.dataStartIndex,c=e.dataEndIndex,u=t.barSize,s=t.layout,f=t.barGap,p=t.barCategoryGap,h=t.maxBarSize,d=kE(s),y=d.numericAxisName,v=d.cateAxisName,m=function(t){return!(!t||!t.length)&&t.some(function(t){var e=Hr(t&&t.type);return e&&e.indexOf("Bar")>=0})}(r),b=[];return r.forEach(function(r,d){var g=wE(t.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:c}),x=void 0!==r.type.defaultProps?dE(dE({},r.type.defaultProps),r.props):r.props,w=x.dataKey,O=x.maxBarSize,j=x["".concat(y,"Id")],S=x["".concat(v,"Id")],P=l.reduce(function(t,r){var n=e["".concat(r.axisType,"Map")],o=x["".concat(r.axisType,"Id")];n&&n[o]||"zAxis"===r.axisType||Km();var i=n[o];return dE(dE({},t),{},yE(yE({},r.axisType,i),"".concat(r.axisType,"Ticks"),Mb(i)))},{}),A=P[v],E=P["".concat(v,"Ticks")],k=n&&n[j]&&n[j].hasStack&&function(t,e){var r,n=(null!==(r=t.type)&&void 0!==r&&r.defaultProps?xb(xb({},t.type.defaultProps),t.props):t.props).stackId;if(Sr(n)){var o=e[n];if(o){var i=o.items.indexOf(t);return i>=0?o.stackedData[i]:null}}return null}(r,n[j].stackGroups),M=Hr(r.type).indexOf("Bar")>=0,_=Ub(A,E),T=[],C=m&&function(t){var e=t.barSize,r=t.totalSize,n=t.stackGroups,o=void 0===n?{}:n;if(!o)return{};for(var i={},a=Object.keys(o),c=0,u=a.length;c<u;c++)for(var l=o[a[c]].stackGroups,s=Object.keys(l),f=0,p=s.length;f<p;f++){var h=l[s[f]],d=h.items,y=h.cateAxisId,v=d.filter(function(t){return Hr(t.type).indexOf("Bar")>=0});if(v&&v.length){var m=v[0].type.defaultProps,b=void 0!==m?xb(xb({},m),v[0].props):v[0].props,g=b.barSize,x=b[y];i[x]||(i[x]=[]);var w=He(g)?e:g;i[x].push({item:v[0],stackList:v.slice(1),barSize:He(w)?void 0:Er(w,r,0)})}}return i}({barSize:u,stackGroups:n,totalSize:_E(P,v)});if(M){var N,D,I=He(O)?h:O,B=null!==(N=null!==(D=Ub(A,E,!0))&&void 0!==D?D:I)&&void 0!==N?N:0;T=function(t){var e=t.barGap,r=t.barCategoryGap,n=t.bandSize,o=t.sizeList,i=void 0===o?[]:o,a=t.maxBarSize,c=i.length;if(c<1)return null;var u,l=Er(e,n,0,!0),s=[];if(i[0].barSize===+i[0].barSize){var f=!1,p=n/c,h=i.reduce(function(t,e){return t+e.barSize||0},0);(h+=(c-1)*l)>=n&&(h-=(c-1)*l,l=0),h>=n&&p>0&&(f=!0,h=c*(p*=.9));var d={offset:((n-h)/2|0)-l,size:0};u=i.reduce(function(t,e){var r={item:e.item,position:{offset:d.offset+d.size+l,size:f?p:e.barSize}},n=[].concat(mb(t),[r]);return d=n[n.length-1].position,e.stackList&&e.stackList.length&&e.stackList.forEach(function(t){n.push({item:t,position:d})}),n},s)}else{var y=Er(r,n,0,!0);n-2*y-(c-1)*l<=0&&(l=0);var v=(n-2*y-(c-1)*l)/c;v>1&&(v>>=0);var m=a===+a?Math.min(v,a):v;u=i.reduce(function(t,e,r){var n=[].concat(mb(t),[{item:e.item,position:{offset:y+(v+l)*r+(v-m)/2,size:m}}]);return e.stackList&&e.stackList.length&&e.stackList.forEach(function(t){n.push({item:t,position:n[n.length-1].position})}),n},s)}return u}({barGap:f,barCategoryGap:p,bandSize:B!==_?B:_,sizeList:C[S],maxBarSize:I}),B!==_&&(T=T.map(function(t){return dE(dE({},t),{},{position:dE(dE({},t.position),{},{offset:t.position.offset-B/2})})}))}var R,L,z=r&&r.type&&r.type.getComposedData;z&&b.push({props:dE(dE({},z(dE(dE({},P),{},{displayedData:g,props:t,dataKey:w,item:r,bandSize:_,barPosition:T,offset:o,stackedData:k,layout:s,dataStartIndex:a,dataEndIndex:c}))),{},yE(yE(yE({key:r.key||"item-".concat(d)},y,P[y]),v,P[v]),"animationId",i)),childIndex:(R=r,L=t.children,Gr(L).indexOf(R)),item:r})}),b},y=function(t,n){var o=t.props,i=t.dataStartIndex,a=t.dataEndIndex,c=t.updateId;if(!Zr({props:o}))return null;var u=o.children,s=o.layout,f=o.stackOffset,h=o.data,y=o.reverseStackOrder,v=kE(s),m=v.numericAxisName,b=v.cateAxisName,g=Yr(u,r),x=function(t,e,r,n,o,i){if(!t)return null;var a=(i?e.reverse():e).reduce(function(t,e){var o,i=null!==(o=e.type)&&void 0!==o&&o.defaultProps?xb(xb({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(i.hide)return t;var c=i[r],u=t[c]||{hasStack:!1,stackGroups:{}};if(Sr(a)){var l=u.stackGroups[a]||{numericAxisId:r,cateAxisId:n,items:[]};l.items.push(e),u.hasStack=!0,u.stackGroups[a]=l}else u.stackGroups[Ar("_stackId_")]={numericAxisId:r,cateAxisId:n,items:[e]};return xb(xb({},t),{},wb({},c,u))},{});return Object.keys(a).reduce(function(e,i){var c=a[i];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce(function(e,i){var a=c.stackGroups[i];return xb(xb({},e),{},wb({},i,{numericAxisId:r,cateAxisId:n,items:a.items,stackedData:Db(t,a.items,o)}))},{})),xb(xb({},e),{},wb({},i,c))},{})}(h,g,"".concat(m,"Id"),"".concat(b,"Id"),f,y),w=l.reduce(function(t,e){var r="".concat(e.axisType,"Map");return dE(dE({},t),{},yE({},r,AE(o,dE(dE({},e),{},{graphicalItems:g,stackGroups:e.axisType===m&&x,dataStartIndex:i,dataEndIndex:a}))))},{}),O=ME(dE(dE({},w),{},{props:o,graphicalItems:g}),null==n?void 0:n.legendBBox);Object.keys(w).forEach(function(t){w[t]=p(o,w[t],O,t.replace("Map",""),e)});var j,S,P=w["".concat(b,"Map")],A=(j=kr(P),{tooltipTicks:S=Mb(j,!1,!0),orderedTooltipTicks:Ql(S,function(t){return t.coordinate}),tooltipAxis:j,tooltipAxisBandSize:Ub(j,S)}),E=d(o,dE(dE({},w),{},{dataStartIndex:i,dataEndIndex:a,updateId:c,graphicalItems:g,stackGroups:x,offset:O}));return dE(dE({formattedGraphicalItems:E,graphicalItems:g,offset:O,stackGroups:x},A),w)},v=function(){function t(r){var i,a,c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),yE(c=aE(this,t,[r]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),yE(c,"accessibilityManager",new HA),yE(c,"handleLegendBBoxUpdate",function(t){if(t){var e=c.state,r=e.dataStartIndex,n=e.dataEndIndex,o=e.updateId;c.setState(dE({legendBBox:t},y({props:c.props,dataStartIndex:r,dataEndIndex:n,updateId:o},dE(dE({},c.state),{},{legendBBox:t}))))}}),yE(c,"handleReceiveSyncEvent",function(t,e,r){if(c.props.syncId===t){if(r===c.eventEmitterSymbol&&"function"!=typeof c.props.syncMethod)return;c.applySyncEvent(e)}}),yE(c,"handleBrushChange",function(t){var e=t.startIndex,r=t.endIndex;if(e!==c.state.dataStartIndex||r!==c.state.dataEndIndex){var n=c.state.updateId;c.setState(function(){return dE({dataStartIndex:e,dataEndIndex:r},y({props:c.props,dataStartIndex:e,dataEndIndex:r,updateId:n},c.state))}),c.triggerSyncEvent({dataStartIndex:e,dataEndIndex:r})}}),yE(c,"handleMouseEnter",function(t){var e=c.getMouseInfo(t);if(e){var r=dE(dE({},e),{},{isTooltipActive:!0});c.setState(r),c.triggerSyncEvent(r);var n=c.props.onMouseEnter;Q(n)&&n(r,t)}}),yE(c,"triggeredAfterMouseMove",function(t){var e=c.getMouseInfo(t),r=e?dE(dE({},e),{},{isTooltipActive:!0}):{isTooltipActive:!1};c.setState(r),c.triggerSyncEvent(r);var n=c.props.onMouseMove;Q(n)&&n(r,t)}),yE(c,"handleItemMouseEnter",function(t){c.setState(function(){return{isTooltipActive:!0,activeItem:t,activePayload:t.tooltipPayload,activeCoordinate:t.tooltipPosition||{x:t.cx,y:t.cy}}})}),yE(c,"handleItemMouseLeave",function(){c.setState(function(){return{isTooltipActive:!1}})}),yE(c,"handleMouseMove",function(t){t.persist(),c.throttleTriggeredAfterMouseMove(t)}),yE(c,"handleMouseLeave",function(t){c.throttleTriggeredAfterMouseMove.cancel();var e={isTooltipActive:!1};c.setState(e),c.triggerSyncEvent(e);var r=c.props.onMouseLeave;Q(r)&&r(e,t)}),yE(c,"handleOuterEvent",function(t){var e,r=function(t){var e=t&&t.type;return e&&Wr[e]?Wr[e]:null}(t),n=We(c.props,"".concat(r));r&&Q(n)&&n(null!==(e=/.*touch.*/i.test(r)?c.getMouseInfo(t.changedTouches[0]):c.getMouseInfo(t))&&void 0!==e?e:{},t)}),yE(c,"handleClick",function(t){var e=c.getMouseInfo(t);if(e){var r=dE(dE({},e),{},{isTooltipActive:!0});c.setState(r),c.triggerSyncEvent(r);var n=c.props.onClick;Q(n)&&n(r,t)}}),yE(c,"handleMouseDown",function(t){var e=c.props.onMouseDown;Q(e)&&e(c.getMouseInfo(t),t)}),yE(c,"handleMouseUp",function(t){var e=c.props.onMouseUp;Q(e)&&e(c.getMouseInfo(t),t)}),yE(c,"handleTouchMove",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&c.throttleTriggeredAfterMouseMove(t.changedTouches[0])}),yE(c,"handleTouchStart",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&c.handleMouseDown(t.changedTouches[0])}),yE(c,"handleTouchEnd",function(t){null!=t.changedTouches&&t.changedTouches.length>0&&c.handleMouseUp(t.changedTouches[0])}),yE(c,"handleDoubleClick",function(t){var e=c.props.onDoubleClick;Q(e)&&e(c.getMouseInfo(t),t)}),yE(c,"handleContextMenu",function(t){var e=c.props.onContextMenu;Q(e)&&e(c.getMouseInfo(t),t)}),yE(c,"triggerSyncEvent",function(t){void 0!==c.props.syncId&&zA.emit($A,c.props.syncId,t,c.eventEmitterSymbol)}),yE(c,"applySyncEvent",function(t){var e=c.props,r=e.layout,n=e.syncMethod,o=c.state.updateId,i=t.dataStartIndex,a=t.dataEndIndex;if(void 0!==t.dataStartIndex||void 0!==t.dataEndIndex)c.setState(dE({dataStartIndex:i,dataEndIndex:a},y({props:c.props,dataStartIndex:i,dataEndIndex:a,updateId:o},c.state)));else if(void 0!==t.activeTooltipIndex){var u=t.chartX,l=t.chartY,s=t.activeTooltipIndex,f=c.state,p=f.offset,h=f.tooltipTicks;if(!p)return;if("function"==typeof n)s=n(h,t);else if("value"===n){s=-1;for(var d=0;d<h.length;d++)if(h[d].value===t.activeLabel){s=d;break}}var v=dE(dE({},p),{},{x:p.left,y:p.top}),m=Math.min(u,v.x+v.width),b=Math.min(l,v.y+v.height),g=h[s]&&h[s].value,x=jE(c.state,c.props.data,s),w=h[s]?{x:"horizontal"===r?h[s].coordinate:m,y:"horizontal"===r?b:h[s].coordinate}:gE;c.setState(dE(dE({},t),{},{activeLabel:g,activeCoordinate:w,activePayload:x,activeTooltipIndex:s}))}else c.setState(t)}),yE(c,"renderCursor",function(t){var r,n=c.state,i=n.isTooltipActive,a=n.activeCoordinate,u=n.activePayload,l=n.offset,s=n.activeTooltipIndex,f=n.tooltipAxisBandSize,p=c.getTooltipEventType(),h=null!==(r=t.props.active)&&void 0!==r?r:i,d=c.props.layout,y=t.key||"_recharts-cursor";return o.createElement(JA,{key:y,activeCoordinate:a,activePayload:u,activeTooltipIndex:s,chartName:e,element:t,isActive:h,layout:d,offset:l,tooltipAxisBandSize:f,tooltipEventType:p})}),yE(c,"renderPolarAxis",function(t,e,r){var o=We(t,"type.axisType"),i=We(c.state,"".concat(o,"Map")),a=t.type.defaultProps,u=void 0!==a?dE(dE({},a),t.props):t.props,l=i&&i[u["".concat(o,"Id")]];return n.cloneElement(t,dE(dE({},l),{},{className:s(o,l.className),key:t.key||"".concat(e,"-").concat(r),ticks:Mb(l,!0)}))}),yE(c,"renderPolarGrid",function(t){var e=t.props,r=e.radialLines,o=e.polarAngles,i=e.polarRadius,a=c.state,u=a.radiusAxisMap,l=a.angleAxisMap,s=kr(u),f=kr(l),p=f.cx,h=f.cy,d=f.innerRadius,y=f.outerRadius;return n.cloneElement(t,{polarAngles:Array.isArray(o)?o:Mb(f,!0).map(function(t){return t.coordinate}),polarRadius:Array.isArray(i)?i:Mb(s,!0).map(function(t){return t.coordinate}),cx:p,cy:h,innerRadius:d,outerRadius:y,key:t.key||"polar-grid",radialLines:r})}),yE(c,"renderLegend",function(){var t=c.state.formattedGraphicalItems,e=c.props,r=e.children,o=e.width,i=e.height,a=c.props.margin||{},u=o-(a.left||0)-(a.right||0),l=yb({children:r,formattedGraphicalItems:t,legendWidth:u,legendContent:f});if(!l)return null;var s=l.item,p=oE(l,QA);return n.cloneElement(s,dE(dE({},p),{},{chartWidth:o,chartHeight:i,margin:a,onBBoxUpdate:c.handleLegendBBoxUpdate}))}),yE(c,"renderTooltip",function(){var t,e=c.props,r=e.children,o=e.accessibilityLayer,i=Kr(r,Ls);if(!i)return null;var a=c.state,u=a.isTooltipActive,l=a.activeCoordinate,s=a.activePayload,f=a.activeLabel,p=a.offset,h=null!==(t=i.props.active)&&void 0!==t?t:u;return n.cloneElement(i,{viewBox:dE(dE({},p),{},{x:p.left,y:p.top}),active:h,label:f,payload:h?s:[],coordinate:l,accessibilityLayer:o})}),yE(c,"renderBrush",function(t){var e=c.props,r=e.margin,o=e.data,i=c.state,a=i.offset,u=i.dataStartIndex,l=i.dataEndIndex,s=i.updateId;return n.cloneElement(t,{key:t.key||"_recharts-brush",onChange:Tb(c.handleBrushChange,t.props.onChange),data:o,x:jr(t.props.x)?t.props.x:a.left,y:jr(t.props.y)?t.props.y:a.top+a.height+a.brushBottom-(r.bottom||0),width:jr(t.props.width)?t.props.width:a.width,startIndex:u,endIndex:l,updateId:"brush-".concat(s)})}),yE(c,"renderReferenceElement",function(t,e,r){if(!t)return null;var o=c.clipPathId,i=c.state,a=i.xAxisMap,u=i.yAxisMap,l=i.offset,s=t.type.defaultProps||{},f=t.props,p=f.xAxisId,h=void 0===p?s.xAxisId:p,d=f.yAxisId,y=void 0===d?s.yAxisId:d;return n.cloneElement(t,{key:t.key||"".concat(e,"-").concat(r),xAxis:a[h],yAxis:u[y],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:o})}),yE(c,"renderActivePoints",function(e){var r=e.item,n=e.activePoint,o=e.basePoint,i=e.childIndex,a=e.isRange,c=[],u=r.props.key,l=void 0!==r.item.type.defaultProps?dE(dE({},r.item.type.defaultProps),r.item.props):r.item.props,s=l.activeDot,f=dE(dE({index:i,dataKey:l.dataKey,cx:n.x,cy:n.y,r:4,fill:Sb(r.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value},Qr(s,!1)),Lr(s));return c.push(t.renderActiveDot(s,f,"".concat(u,"-activePoint-").concat(i))),o?c.push(t.renderActiveDot(s,dE(dE({},f),{},{cx:o.x,cy:o.y}),"".concat(u,"-basePoint-").concat(i))):a&&c.push(null),c}),yE(c,"renderGraphicChild",function(t,e,r){var o=c.filterFormatItem(t,e,r);if(!o)return null;var i=c.getTooltipEventType(),a=c.state,u=a.isTooltipActive,l=a.tooltipAxis,s=a.activeTooltipIndex,f=a.activeLabel,p=Kr(c.props.children,Ls),h=o.props,d=h.points,y=h.isRange,v=h.baseLine,m=void 0!==o.item.type.defaultProps?dE(dE({},o.item.type.defaultProps),o.item.props):o.item.props,b=m.activeDot,g=m.hide,x=m.activeBar,w=m.activeShape,O=Boolean(!g&&u&&p&&(b||x||w)),j={};"axis"!==i&&p&&"click"===p.props.trigger?j={onClick:Tb(c.handleItemMouseEnter,t.props.onClick)}:"axis"!==i&&(j={onMouseLeave:Tb(c.handleItemMouseLeave,t.props.onMouseLeave),onMouseEnter:Tb(c.handleItemMouseEnter,t.props.onMouseEnter)});var S=n.cloneElement(t,dE(dE({},o.props),j));if(O){if(!(s>=0)){var P,A=(null!==(P=c.getItemByXY(c.state.activeCoordinate))&&void 0!==P?P:{graphicalItem:S}).graphicalItem,E=A.item,k=void 0===E?t:E,M=A.childIndex,_=dE(dE(dE({},o.props),j),{},{activeIndex:M});return[n.cloneElement(k,_),null,null]}var T,C;if(l.dataKey&&!l.allowDuplicatedCategory){var N="function"==typeof l.dataKey?function(t){return"function"==typeof l.dataKey?l.dataKey(t.payload):null}:"payload.".concat(l.dataKey.toString());T=_r(d,N,f),C=y&&v&&_r(v,N,f)}else T=null==d?void 0:d[s],C=y&&v&&v[s];if(w||x){var D=void 0!==t.props.activeIndex?t.props.activeIndex:s;return[n.cloneElement(t,dE(dE(dE({},o.props),j),{},{activeIndex:D})),null,null]}if(!He(T))return[S].concat(sE(c.renderActivePoints({item:o,activePoint:T,basePoint:C,childIndex:s,isRange:y})))}return y?[S,null,null]:[S,null]}),yE(c,"renderCustomized",function(t,e,r){return n.cloneElement(t,dE(dE({key:"recharts-customized-".concat(r)},c.props),c.state))}),yE(c,"renderMap",{CartesianGrid:{handler:xE,once:!0},ReferenceArea:{handler:c.renderReferenceElement},ReferenceLine:{handler:xE},ReferenceDot:{handler:c.renderReferenceElement},XAxis:{handler:xE},YAxis:{handler:xE},Brush:{handler:c.renderBrush,once:!0},Bar:{handler:c.renderGraphicChild},Line:{handler:c.renderGraphicChild},Area:{handler:c.renderGraphicChild},Radar:{handler:c.renderGraphicChild},RadialBar:{handler:c.renderGraphicChild},Scatter:{handler:c.renderGraphicChild},Pie:{handler:c.renderGraphicChild},Funnel:{handler:c.renderGraphicChild},Tooltip:{handler:c.renderCursor,once:!0},PolarGrid:{handler:c.renderPolarGrid,once:!0},PolarAngleAxis:{handler:c.renderPolarAxis},PolarRadiusAxis:{handler:c.renderPolarAxis},Customized:{handler:c.renderCustomized}}),c.clipPathId="".concat(null!==(i=r.id)&&void 0!==i?i:Ar("recharts"),"-clip"),c.throttleTriggeredAfterMouseMove=of(c.triggeredAfterMouseMove,null!==(a=r.throttleDelay)&&void 0!==a?a:1e3/60),c.state={},c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lE(t,e)}(t,n.Component),iE(t,[{key:"componentDidMount",value:function(){var t,e;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(t=this.props.margin.left)&&void 0!==t?t:0,top:null!==(e=this.props.margin.top)&&void 0!==e?e:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var t=this.props,e=t.children,r=t.data,n=t.height,o=t.layout,i=Kr(e,Ls);if(i){var a=i.props.defaultIndex;if(!("number"!=typeof a||a<0||a>this.state.tooltipTicks.length-1)){var c=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,u=jE(this.state,r,a,c),l=this.state.tooltipTicks[a].coordinate,s=(this.state.offset.top+n)/2,f="horizontal"===o?{x:l,y:s}:{y:l,x:s},p=this.state.formattedGraphicalItems.find(function(t){return"Scatter"===t.item.type.name});p&&(f=dE(dE({},f),p.props.points[a].tooltipPosition),u=p.props.points[a].tooltipPayload);var h={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:c,activePayload:u,activeCoordinate:f};this.setState(h),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(t,e){if(!this.props.accessibilityLayer)return null;var r,n;(this.state.tooltipTicks!==e.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==t.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==t.margin)&&this.accessibilityManager.setDetails({offset:{left:null!==(r=this.props.margin.left)&&void 0!==r?r:0,top:null!==(n=this.props.margin.top)&&void 0!==n?n:0}});return null}},{key:"componentDidUpdate",value:function(t){tn([Kr(t.children,Ls)],[Kr(this.props.children,Ls)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var t=Kr(this.props.children,Ls);if(t&&"boolean"==typeof t.props.shared){var e=t.props.shared?"axis":"item";return u.indexOf(e)>=0?e:a}return a}},{key:"getMouseInfo",value:function(t){if(!this.container)return null;var e,r=this.container,n=r.getBoundingClientRect(),o={top:(e=n).top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft},i={chartX:Math.round(t.pageX-o.left),chartY:Math.round(t.pageY-o.top)},a=n.width/r.offsetWidth||1,c=this.inRange(i.chartX,i.chartY,a);if(!c)return null;var u=this.state,l=u.xAxisMap,s=u.yAxisMap,f=this.getTooltipEventType(),p=SE(this.state,this.props.data,this.props.layout,c);if("axis"!==f&&l&&s){var h=kr(l).scale,d=kr(s).scale,y=h&&h.invert?h.invert(i.chartX):null,v=d&&d.invert?d.invert(i.chartY):null;return dE(dE({},i),{},{xValue:y,yValue:v},p)}return p?dE(dE({},i),p):null}},{key:"inRange",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,o=t/r,i=e/r;if("horizontal"===n||"vertical"===n){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var c=this.state,u=c.angleAxisMap,l=c.radiusAxisMap;if(u&&l){var s=kr(u);return Qb({x:o,y:i},s)}return null}},{key:"parseEventsOfWrapper",value:function(){var t=this.props.children,e=this.getTooltipEventType(),r=Kr(t,Ls),n={};return r&&"axis"===e&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),dE(dE({},Lr(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){zA.on($A,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){zA.removeListener($A,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(t,e,r){for(var n=this.state.formattedGraphicalItems,o=0,i=n.length;o<i;o++){var a=n[o];if(a.item===t||a.props.key===t.key||e===Hr(a.item.type)&&r===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var t=this.clipPathId,e=this.state.offset,r=e.left,n=e.top,i=e.height,a=e.width;return o.createElement("defs",null,o.createElement("clipPath",{id:t},o.createElement("rect",{x:r,y:n,height:i,width:a})))}},{key:"getXScales",value:function(){var t=this.state.xAxisMap;return t?Object.entries(t).reduce(function(t,e){var r=nE(e,2),n=r[0],o=r[1];return dE(dE({},t),{},yE({},n,o.scale))},{}):null}},{key:"getYScales",value:function(){var t=this.state.yAxisMap;return t?Object.entries(t).reduce(function(t,e){var r=nE(e,2),n=r[0],o=r[1];return dE(dE({},t),{},yE({},n,o.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(t){var e;return null===(e=this.state.xAxisMap)||void 0===e||null===(e=e[t])||void 0===e?void 0:e.scale}},{key:"getYScaleByAxisId",value:function(t){var e;return null===(e=this.state.yAxisMap)||void 0===e||null===(e=e[t])||void 0===e?void 0:e.scale}},{key:"getItemByXY",value:function(t){var e=this.state,r=e.formattedGraphicalItems,n=e.activeItem;if(r&&r.length)for(var o=0,i=r.length;o<i;o++){var a=r[o],c=a.props,u=a.item,l=void 0!==u.type.defaultProps?dE(dE({},u.type.defaultProps),u.props):u.props,s=Hr(u.type);if("Bar"===s){var f=(c.data||[]).find(function(e){return Mw(t,e)});if(f)return{graphicalItem:a,payload:f}}else if("RadialBar"===s){var p=(c.data||[]).find(function(e){return Qb(t,e)});if(p)return{graphicalItem:a,payload:p}}else if(xO(a,n)||wO(a,n)||OO(a,n)){var h=AO({graphicalItem:a,activeTooltipItem:n,itemData:l.data}),d=void 0===l.activeIndex?h:l.activeIndex;return{graphicalItem:dE(dE({},a),{},{childIndex:d}),payload:OO(a,n)?l.data[h]:a.props.data[h]}}}return null}},{key:"render",value:function(){var t=this;if(!Zr(this))return null;var e,r,n=this.props,i=n.children,a=n.className,c=n.width,u=n.height,l=n.style,f=n.compact,p=n.title,h=n.desc,d=oE(n,tE),y=Qr(d,!1);if(f)return o.createElement(bS,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},o.createElement(cn,rE({},y,{width:c,height:u,title:p,desc:h}),this.renderClipPath(),rn(i,this.renderMap)));this.props.accessibilityLayer&&(y.tabIndex=null!==(e=this.props.tabIndex)&&void 0!==e?e:0,y.role=null!==(r=this.props.role)&&void 0!==r?r:"application",y.onKeyDown=function(e){t.accessibilityManager.keyboardEvent(e)},y.onFocus=function(){t.accessibilityManager.focus()});var v=this.parseEventsOfWrapper();return o.createElement(bS,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},o.createElement("div",rE({className:s("recharts-wrapper",a),style:dE({position:"relative",cursor:"default",width:c,height:u},l)},v,{ref:function(e){t.container=e}}),o.createElement(cn,rE({},y,{width:c,height:u,title:p,desc:h,style:bE}),this.renderClipPath(),rn(i,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}();yE(v,"displayName",e),yE(v,"defaultProps",dE({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),yE(v,"getDerivedStateFromProps",function(t,e){var r=t.dataKey,n=t.data,o=t.children,i=t.width,a=t.height,c=t.layout,u=t.stackOffset,l=t.margin,s=e.dataStartIndex,f=e.dataEndIndex;if(void 0===e.updateId){var p=EE(t);return dE(dE(dE({},p),{},{updateId:0},y(dE(dE({props:t},p),{},{updateId:0}),e)),{},{prevDataKey:r,prevData:n,prevWidth:i,prevHeight:a,prevLayout:c,prevStackOffset:u,prevMargin:l,prevChildren:o})}if(r!==e.prevDataKey||n!==e.prevData||i!==e.prevWidth||a!==e.prevHeight||c!==e.prevLayout||u!==e.prevStackOffset||!Cr(l,e.prevMargin)){var h=EE(t),d={chartX:e.chartX,chartY:e.chartY,isTooltipActive:e.isTooltipActive},v=dE(dE({},SE(e,n,c)),{},{updateId:e.updateId+1}),m=dE(dE(dE({},h),d),v);return dE(dE(dE({},m),y(dE({props:t},m),e)),{},{prevDataKey:r,prevData:n,prevWidth:i,prevHeight:a,prevLayout:c,prevStackOffset:u,prevMargin:l,prevChildren:o})}if(!tn(o,e.prevChildren)){var b,g,x,w,O=Kr(o,QO),j=O&&null!==(b=null===(g=O.props)||void 0===g?void 0:g.startIndex)&&void 0!==b?b:s,S=O&&null!==(x=null===(w=O.props)||void 0===w?void 0:w.endIndex)&&void 0!==x?x:f,P=j!==s||S!==f,A=!He(n)&&!P?e.updateId:e.updateId+1;return dE(dE({updateId:A},y(dE(dE({props:t},e),{},{updateId:A,dataStartIndex:j,dataEndIndex:S}),e)),{},{prevChildren:o,dataStartIndex:j,dataEndIndex:S})}return null}),yE(v,"renderActiveDot",function(t,e,r){var i;return i=n.isValidElement(t)?n.cloneElement(t,e):Q(t)?t(e):o.createElement(Nw,e),o.createElement(fn,{className:"recharts-active-dot",key:r},i)});var m=n.forwardRef(function(t,e){return o.createElement(v,rE({},t,{ref:e}))});return m.displayName=v.displayName,m}({chartName:"LineChart",GraphicalChild:pA,axisComponents:[{axisType:"xAxis",AxisComp:jA},{axisType:"yAxis",AxisComp:DA}],formatAxisMap:function(t,e,r,n,o){var i=t.width,a=t.height,c=t.layout,u=t.children,l=Object.keys(e),s={left:r.left,leftMirror:r.left,right:i-r.right,rightMirror:i-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},f=!!Kr(u,Wj);return l.reduce(function(i,a){var u,l,p,h,d,y=e[a],v=y.orientation,m=y.domain,b=y.padding,g=void 0===b?{}:b,x=y.mirror,w=y.reversed,O="".concat(v).concat(x?"Mirror":"");if("number"===y.type&&("gap"===y.padding||"no-gap"===y.padding)){var j=m[1]-m[0],S=1/0,P=y.categoricalDomain.sort(Tr);if(P.forEach(function(t,e){e>0&&(S=Math.min((t||0)-(P[e-1]||0),S))}),Number.isFinite(S)){var A=S/j,E="vertical"===y.layout?r.height:r.width;if("gap"===y.padding&&(u=A*E/2),"no-gap"===y.padding){var k=Er(t.barCategoryGap,A*E),M=A*E/2;u=M-k-(M-k)/E*k}}}l="xAxis"===n?[r.left+(g.left||0)+(u||0),r.left+r.width-(g.right||0)-(u||0)]:"yAxis"===n?"horizontal"===c?[r.top+r.height-(g.bottom||0),r.top+(g.top||0)]:[r.top+(g.top||0)+(u||0),r.top+r.height-(g.bottom||0)-(u||0)]:y.range,w&&(l=[l[1],l[0]]);var _=function(t,e,r){var n=t.scale,o=t.type,i=t.layout,a=t.axisType;if("auto"===n)return"radial"===i&&"radiusAxis"===a?{scale:jp(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:Xh(),realScaleType:"linear"}:"category"===o&&e&&(e.indexOf("LineChart")>=0||e.indexOf("AreaChart")>=0||e.indexOf("ComposedChart")>=0&&!r)?{scale:Pp(),realScaleType:"point"}:"category"===o?{scale:jp(),realScaleType:"band"}:{scale:Xh(),realScaleType:"linear"};if(Ye(n)){var c="scale".concat(Rn(n));return{scale:(Tv[c]||Pp)(),realScaleType:Tv[c]?c:"point"}}return Q(n)?{scale:n}:{scale:Pp(),realScaleType:"point"}}(y,o,f),T=_.scale,C=_.realScaleType;T.domain(m).range(l),function(t){var e=t.domain();if(e&&!(e.length<=2)){var r=e.length,n=t.range(),o=Math.min(n[0],n[1])-Cb,i=Math.max(n[0],n[1])+Cb,a=t(e[0]),c=t(e[r-1]);(a<o||a>i||c<o||c>i)&&t.domain([e[0],e[r-1]])}}(T);var N=function(t,e){var r=e.realScaleType,n=e.type,o=e.tickCount,i=e.originalDomain,a=e.allowDecimals,c=r||e.scale;if("auto"!==c&&"linear"!==c)return null;if(o&&"number"===n&&i&&("auto"===i[0]||"auto"===i[1])){var u=t.domain();if(!u.length)return null;var l=Gm(u,o,a);return t.domain([Uv(l),Rv(l)]),{niceTicks:l}}if(o&&"number"===n){var s=t.domain();return{niceTicks:Ym(s,o,a)}}return null}(T,Gj(Gj({},y),{},{realScaleType:C}));"xAxis"===n?(d="top"===v&&!x||"bottom"===v&&x,p=r.left,h=s[O]-d*y.height):"yAxis"===n&&(d="left"===v&&!x||"right"===v&&x,p=s[O]-d*y.width,h=r.top);var D=Gj(Gj(Gj({},y),N),{},{realScaleType:C,x:p,y:h,scale:T,width:"xAxis"===n?r.width:y.width,height:"yAxis"===n?r.height:y.height});return D.bandSize=Ub(D,N),y.hide||"xAxis"!==n?y.hide||(s[O]+=(d?-1:1)*D.width):s[O]+=(d?-1:1)*D.height,Gj(Gj({},i),{},Yj({},a,D))},{})}});const CE={0:"Fora do ar",1:"Operacional",2:"Pendente",3:"Manutenção"},NE=({status:e,className:r})=>1===e?t.jsx(b,{className:h("text-green-500",r)}):0===e?t.jsx(y,{className:h("text-red-500",r)}):3===e?t.jsx(w,{className:h("text-blue-500",r)}):t.jsx(m,{className:h("text-yellow-500",r)}),DE=t=>{if(!t)return"";const e=new Date(t.replace(" ","T")+"Z"),r=Date.now()-e.getTime(),n=Math.floor(r/6e4);if(n<1)return"agora há pouco";if(n<60)return`há ${n} min`;const o=Math.floor(n/60);if(o<24)return`há ${o} h`;return`há ${Math.floor(o/24)} d`};function IE({monitor:e,isOpen:r,onToggle:n}){const o=e.heartbeats.filter(t=>1===t.status&&t.ping>0).map(t=>t.ping),i=o.length?Math.round(o.reduce((t,e)=>t+e,0)/o.length):null,a=o.length?Math.min(...o):null,c=o.length?Math.max(...o):null,u=e.heartbeats.map(t=>{return{time:(e=t.time,new Date(e.replace(" ","T")+"Z").toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit",timeZone:"America/Sao_Paulo"})),ping:1===t.status?t.ping:null,status:t.status};var e});return t.jsxs("div",{className:"transition-colors",children:[t.jsxs("button",{type:"button",onClick:n,"aria-expanded":r,"aria-label":`${r?"Recolher":"Expandir"} histórico de ${e.name}`,className:"w-full text-left p-4 md:p-5 hover:bg-muted/30 transition-colors focus:outline-none focus-visible:bg-muted/40",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4 mb-3 flex-wrap",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(NE,{status:e.currentStatus,className:"h-5 w-5 flex-shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"font-medium text-foreground truncate",children:e.name}),t.jsx("p",{className:"text-xs text-muted-foreground",children:e.lastTime?`Última verificação ${DE(e.lastTime)}`:""})]})]}),t.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[null!==e.lastPing&&1===e.currentStatus&&t.jsxs("span",{className:"hidden md:inline-flex items-center gap-1 text-sm text-muted-foreground tabular-nums",children:[t.jsx(g,{className:"h-3.5 w-3.5"}),e.lastPing,"ms"]}),t.jsx(l,{variant:1===e.currentStatus?"secondary":0===e.currentStatus?"destructive":"outline",className:"text-xs",children:null!==e.currentStatus?CE[e.currentStatus]:"Sem dados"}),t.jsxs("span",{className:"text-sm text-muted-foreground tabular-nums hidden sm:inline",children:[(s=e.uptime24h,null==s?"—":`${(100*s).toFixed(2)}%`)," ",t.jsx("span",{className:"text-xs",children:"/ 24h"})]}),t.jsx(x,{className:h("h-4 w-4 text-muted-foreground transition-transform",r&&"rotate-180"),"aria-hidden":"true"})]})]}),t.jsx("div",{className:"flex gap-[2px] h-8 items-end","aria-label":`Histórico recente de ${e.name}`,children:Array.from({length:50}).map((r,n)=>{const o=e.heartbeats[e.heartbeats.length-50+n],i=o?1===(a=o.status)?"bg-green-500":0===a?"bg-red-500":3===a?"bg-blue-500":2===a?"bg-yellow-500":"bg-muted":"bg-muted";var a;return t.jsx("div",{className:h("flex-1 rounded-sm transition-all hover:opacity-70",i),style:{height:o?"100%":"60%"},title:o?`${o.time} — ${CE[o.status]??"?"}${o.ping?` · ${o.ping}ms`:""}${o.msg?` (${o.msg})`:""}`:"Sem dados"},n)})}),t.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5",children:[t.jsx("span",{children:"~50 min atrás"}),t.jsx("span",{children:r?"clique para recolher":"clique para ver latência"}),t.jsx("span",{children:"agora"})]})]}),r&&t.jsx("div",{className:"px-4 pb-5 md:px-5 animate-fade-in",children:t.jsxs("div",{className:"bg-muted/30 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3 mb-4",children:[t.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[t.jsx(g,{className:"h-4 w-4"}),"Histórico de latência"]}),t.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground tabular-nums",children:[t.jsxs("span",{children:["Mín: ",t.jsxs("span",{className:"font-medium text-foreground",children:[a??"—","ms"]})]}),t.jsxs("span",{children:["Média: ",t.jsxs("span",{className:"font-medium text-foreground",children:[i??"—","ms"]})]}),t.jsxs("span",{children:["Máx: ",t.jsxs("span",{className:"font-medium text-foreground",children:[c??"—","ms"]})]})]})]}),o.length>1?t.jsx("div",{className:"h-48 w-full",children:t.jsx(pf,{width:"100%",height:"100%",children:t.jsxs(TE,{data:u,margin:{top:5,right:10,left:0,bottom:0},children:[t.jsx(YP,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",opacity:.5}),t.jsx(jA,{dataKey:"time",stroke:"hsl(var(--muted-foreground))",fontSize:10,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),t.jsx(DA,{stroke:"hsl(var(--muted-foreground))",fontSize:10,tickLine:!1,width:40,unit:"ms"}),t.jsx(Ls,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem",fontSize:"12px"},labelStyle:{color:"hsl(var(--foreground))"},formatter:t=>[t?`${t}ms`:"Sem resposta","Latência"]}),t.jsx(pA,{type:"monotone",dataKey:"ping",stroke:"hsl(var(--primary))",strokeWidth:2,dot:!1,activeDot:{r:4},connectNulls:!0})]})})}):t.jsxs("div",{className:"py-8 text-center space-y-1",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:"Este monitor não reporta latência."}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Apenas monitores do tipo HTTP(s), TCP, Ping ou DNS medem tempo de resposta. Tipos como Push ou Group apenas reportam disponibilidade."})]}),t.jsxs("p",{className:"text-[10px] text-muted-foreground mt-3 text-center",children:["Tipo: ",e.type.toUpperCase()," · ",e.heartbeats.length," verificações exibidas"]})]})})]});var s}function BE(){const[e,r]=n.useState(null),[o,l]=n.useState(!0),[s,g]=n.useState(null),[x,w]=n.useState(!1),[O,j]=n.useState({}),S="https://qvpcywkodgmweqaqnjuw.supabase.co/functions/v1/kuma-status",P=n.useCallback(async()=>{try{w(!0);const t=await fetch(S,{headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`HTTP ${t.status}`);const e=await t.json();r(e),g(null)}catch(t){g(t instanceof Error?t.message:"Falha ao carregar status")}finally{l(!1),w(!1)}},[S]);n.useEffect(()=>{P();const t=setInterval(P,6e4);return()=>clearInterval(t)},[P]);const A=(null==e?void 0:e.groups.flatMap(t=>t.monitors))??[],E=A.length,k=A.filter(t=>1===t.currentStatus).length,M=A.filter(t=>0===t.currentStatus).length,_=A.filter(t=>3===t.currentStatus).length;let T="operational",C="Todos os sistemas operando normalmente";M>0?(T=M===E?"outage":"degraded",C=M===E?"Indisponibilidade generalizada":`${M} ${1===M?"serviço":"serviços"} com instabilidade`):_>0&&(T="maintenance",C="Manutenção programada em andamento");const N="operational"===T?"bg-green-500":"degraded"===T?"bg-yellow-500":"outage"===T?"bg-red-500":"bg-blue-500";return t.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[t.jsx(c,{title:"Status dos Serviços",description:"Acompanhe em tempo real o status e o desempenho dos serviços Sempre Comigo.",url:"/status",noIndex:!0}),t.jsx(i,{viewMode:"client",onViewModeChange:()=>{}}),t.jsx("main",{className:"flex-1",children:t.jsxs("section",{className:"container mx-auto px-4 py-12 md:py-16 max-w-5xl",children:[t.jsxs("div",{className:"mb-8 md:mb-12",children:[t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-3",children:[t.jsx(d,{className:"h-4 w-4"}),t.jsx("span",{children:"Status dos Serviços"})]}),t.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-2",children:"Sempre Comigo — Status"}),t.jsx("p",{className:"text-muted-foreground",children:"Monitoramos nossos sistemas em tempo real. Atualizado automaticamente a cada minuto."})]}),o&&!e?t.jsxs("div",{className:"space-y-4",children:[t.jsx(f,{className:"h-28 w-full"}),t.jsx(f,{className:"h-64 w-full"})]}):s&&!e?t.jsx(u,{className:"p-6 border-destructive/30",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx(y,{className:"text-destructive h-6 w-6 flex-shrink-0"}),t.jsxs("div",{children:[t.jsx("p",{className:"font-semibold text-foreground mb-1",children:"Não foi possível carregar o status"}),t.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:s}),t.jsx(p,{size:"sm",onClick:P,children:"Tentar novamente"})]})]})}):e?t.jsxs(t.Fragment,{children:[t.jsx(u,{className:h("p-6 md:p-8 mb-8 border-l-4",{"border-l-green-500":"operational"===T,"border-l-yellow-500":"degraded"===T,"border-l-red-500":"outage"===T,"border-l-blue-500":"maintenance"===T}),children:t.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:h("h-3 w-3 rounded-full animate-pulse",N)}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl md:text-2xl font-semibold text-foreground",children:C}),t.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[k," de ",E," serviços operacionais"]})]})]}),t.jsxs(p,{variant:"outline",size:"sm",onClick:P,disabled:x,"aria-label":"Atualizar status",children:[t.jsx(v,{className:h("h-4 w-4 mr-2",x&&"animate-spin")}),"Atualizar"]})]})}),e.fallback?t.jsx(u,{className:"p-6 mb-8 border-yellow-500/40 bg-yellow-500/5",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx(m,{className:"h-5 w-5 text-yellow-600 flex-shrink-0 mt-0.5"}),t.jsxs("div",{children:[t.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Status temporariamente indisponível"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Não conseguimos consultar o monitor agora. Os serviços continuam operando — apenas a página de status está com instabilidade. Tentaremos novamente em instantes."})]})]})}):e.incident?t.jsx(u,{className:"p-6 mb-8 border-yellow-500/40 bg-yellow-500/5",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx(m,{className:"h-5 w-5 text-yellow-600 flex-shrink-0 mt-0.5"}),t.jsxs("div",{children:[t.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Incidente em andamento"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Estamos investigando. Atualizações serão postadas aqui."})]})]})}):t.jsx(u,{className:"p-4 mb-8 bg-muted/30",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(b,{className:"h-4 w-4 text-green-500"}),t.jsx("span",{children:"Nenhum incidente ativo no momento."})]})}),e.groups.map(e=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h3",{className:"text-lg font-semibold text-foreground mb-4",children:e.name}),t.jsx(u,{className:"divide-y divide-border overflow-hidden",children:e.monitors.map(e=>t.jsx(IE,{monitor:e,isOpen:!!O[e.id],onToggle:()=>j(t=>({...t,[e.id]:!t[e.id]}))},e.id))})]},e.id)),t.jsxs("p",{className:"text-xs text-muted-foreground text-center mt-8",children:["Última atualização: ",new Date(e.fetchedAt).toLocaleString("pt-BR",{timeZone:"America/Sao_Paulo"})," (Brasília)",e.cached?" (cache)":""]})]}):null]})}),t.jsx(a,{})]})}export{BE as default};