agentic-ui-libs 0.2.0-beta.4 → 0.2.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(ie,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(ie=typeof globalThis<"u"?globalThis:ie||self,T(ie.AgenticUILibs={},ie.React,ie.ReactDOM))})(this,function(ie,T,en){"use strict";var BW=Object.defineProperty;var FW=(ie,T,en)=>T in ie?BW(ie,T,{enumerable:!0,configurable:!0,writable:!0,value:en}):ie[T]=en;var Bt=(ie,T,en)=>FW(ie,typeof T!="symbol"?T+"":T,en);function d0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const xt=d0(T);var $i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}},ua={};/**
1
+ (function(ie,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(ie=typeof globalThis<"u"?globalThis:ie||self,T(ie.AgenticUILibs={},ie.React,ie.ReactDOM))})(this,function(ie,T,en){"use strict";var FW=Object.defineProperty;var WW=(ie,T,en)=>T in ie?FW(ie,T,{enumerable:!0,configurable:!0,writable:!0,value:en}):ie[T]=en;var Bt=(ie,T,en)=>WW(ie,typeof T!="symbol"?T+"":T,en);function p0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const xt=p0(T);var $i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}},ca={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var bf;function p0(){if(bf)return ua;bf=1;var e=T,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,h=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:d,ref:h,props:f,_owner:a.current}}return ua.Fragment=r,ua.jsx=o,ua.jsxs=o,ua}var ca={};/**
9
+ */var bf;function h0(){if(bf)return ca;bf=1;var e=T,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,c){var u,f={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(u in l)n.call(l,u)&&!i.hasOwnProperty(u)&&(f[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)f[u]===void 0&&(f[u]=l[u]);return{$$typeof:t,type:s,key:d,ref:h,props:f,_owner:a.current}}return ca.Fragment=r,ca.jsx=o,ca.jsxs=o,ca}var ua={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,30 +14,30 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var xf;function h0(){return xf||(xf=1,process.env.NODE_ENV!=="production"&&function(){var e=T,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,y="@@iterator";function v(N){if(N===null||typeof N!="object")return null;var K=m&&N[m]||N[y];return typeof K=="function"?K:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(N){{for(var K=arguments.length,re=new Array(K>1?K-1:0),ce=1;ce<K;ce++)re[ce-1]=arguments[ce];w("error",N,re)}}function w(N,K,re){{var ce=b.ReactDebugCurrentFrame,Pe=ce.getStackAddendum();Pe!==""&&(K+="%s",re=re.concat([Pe]));var Ce=re.map(function(ge){return String(ge)});Ce.unshift("Warning: "+K),Function.prototype.apply.call(console[N],console,Ce)}}var A=!1,g=!1,O=!1,S=!1,j=!1,E;E=Symbol.for("react.module.reference");function M(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===i||j||N===a||N===u||N===c||S||N===h||A||g||O||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===f||N.$$typeof===o||N.$$typeof===s||N.$$typeof===l||N.$$typeof===E||N.getModuleId!==void 0))}function _(N,K,re){var ce=N.displayName;if(ce)return ce;var Pe=K.displayName||K.name||"";return Pe!==""?re+"("+Pe+")":re}function P(N){return N.displayName||"Context"}function I(N){if(N==null)return null;if(typeof N.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof N=="object")switch(N.$$typeof){case s:var K=N;return P(K)+".Consumer";case o:var re=N;return P(re._context)+".Provider";case l:return _(N,N.render,"ForwardRef");case f:var ce=N.displayName||null;return ce!==null?ce:I(N.type)||"Memo";case d:{var Pe=N,Ce=Pe._payload,ge=Pe._init;try{return I(ge(Ce))}catch{return null}}}return null}var C=Object.assign,D=0,k,B,U,V,$,R,F;function W(){}W.__reactDisabledLog=!0;function G(){{if(D===0){k=console.log,B=console.info,U=console.warn,V=console.error,$=console.group,R=console.groupCollapsed,F=console.groupEnd;var N={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}D++}}function X(){{if(D--,D===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:C({},N,{value:k}),info:C({},N,{value:B}),warn:C({},N,{value:U}),error:C({},N,{value:V}),group:C({},N,{value:$}),groupCollapsed:C({},N,{value:R}),groupEnd:C({},N,{value:F})})}D<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=b.ReactCurrentDispatcher,ae;function te(N,K,re){{if(ae===void 0)try{throw Error()}catch(Pe){var ce=Pe.stack.trim().match(/\n( *(at )?)/);ae=ce&&ce[1]||""}return`
18
- `+ae+N}}var q=!1,Y;{var Z=typeof WeakMap=="function"?WeakMap:Map;Y=new Z}function L(N,K){if(!N||q)return"";{var re=Y.get(N);if(re!==void 0)return re}var ce;q=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=Q.current,Q.current=null,G();try{if(K){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(vt){ce=vt}Reflect.construct(N,[],ge)}else{try{ge.call()}catch(vt){ce=vt}N.call(ge.prototype)}}else{try{throw Error()}catch(vt){ce=vt}N()}}catch(vt){if(vt&&ce&&typeof vt.stack=="string"){for(var ye=vt.stack.split(`
19
- `),ct=ce.stack.split(`
20
- `),qe=ye.length-1,Ye=ct.length-1;qe>=1&&Ye>=0&&ye[qe]!==ct[Ye];)Ye--;for(;qe>=1&&Ye>=0;qe--,Ye--)if(ye[qe]!==ct[Ye]){if(qe!==1||Ye!==1)do if(qe--,Ye--,Ye<0||ye[qe]!==ct[Ye]){var Ct=`
21
- `+ye[qe].replace(" at new "," at ");return N.displayName&&Ct.includes("<anonymous>")&&(Ct=Ct.replace("<anonymous>",N.displayName)),typeof N=="function"&&Y.set(N,Ct),Ct}while(qe>=1&&Ye>=0);break}}}finally{q=!1,Q.current=Ce,X(),Error.prepareStackTrace=Pe}var la=N?N.displayName||N.name:"",Qr=la?te(la):"";return typeof N=="function"&&Y.set(N,Qr),Qr}function oe(N,K,re){return L(N,!1)}function H(N){var K=N.prototype;return!!(K&&K.isReactComponent)}function ue(N,K,re){if(N==null)return"";if(typeof N=="function")return L(N,H(N));if(typeof N=="string")return te(N);switch(N){case u:return te("Suspense");case c:return te("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case l:return oe(N.render);case f:return ue(N.type,K,re);case d:{var ce=N,Pe=ce._payload,Ce=ce._init;try{return ue(Ce(Pe),K,re)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,ve={},Ue=b.ReactDebugCurrentFrame;function Be(N){if(N){var K=N._owner,re=ue(N.type,N._source,K?K.type:null);Ue.setExtraStackFrame(re)}else Ue.setExtraStackFrame(null)}function Fe(N,K,re,ce,Pe){{var Ce=Function.call.bind(ee);for(var ge in N)if(Ce(N,ge)){var ye=void 0;try{if(typeof N[ge]!="function"){var ct=Error((ce||"React class")+": "+re+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ct.name="Invariant Violation",ct}ye=N[ge](K,ge,ce,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(qe){ye=qe}ye&&!(ye instanceof Error)&&(Be(Pe),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ce||"React class",re,ge,typeof ye),Be(null)),ye instanceof Error&&!(ye.message in ve)&&(ve[ye.message]=!0,Be(Pe),x("Failed %s type: %s",re,ye.message),Be(null))}}}var Ge=Array.isArray;function ut(N){return Ge(N)}function ji(N){{var K=typeof Symbol=="function"&&Symbol.toStringTag,re=K&&N[Symbol.toStringTag]||N.constructor.name||"Object";return re}}function _i(N){try{return oa(N),!1}catch{return!0}}function oa(N){return""+N}function Ei(N){if(_i(N))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ji(N)),oa(N)}var Ci=b.ReactCurrentOwner,wW={key:!0,ref:!0,__self:!0,__source:!0},n0,a0;function OW(N){if(ee.call(N,"ref")){var K=Object.getOwnPropertyDescriptor(N,"ref").get;if(K&&K.isReactWarning)return!1}return N.ref!==void 0}function SW(N){if(ee.call(N,"key")){var K=Object.getOwnPropertyDescriptor(N,"key").get;if(K&&K.isReactWarning)return!1}return N.key!==void 0}function TW(N,K){typeof N.ref=="string"&&Ci.current}function AW(N,K){{var re=function(){n0||(n0=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",K))};re.isReactWarning=!0,Object.defineProperty(N,"key",{get:re,configurable:!0})}}function PW(N,K){{var re=function(){a0||(a0=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",K))};re.isReactWarning=!0,Object.defineProperty(N,"ref",{get:re,configurable:!0})}}var jW=function(N,K,re,ce,Pe,Ce,ge){var ye={$$typeof:t,type:N,key:K,ref:re,props:ge,_owner:Ce};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function _W(N,K,re,ce,Pe){{var Ce,ge={},ye=null,ct=null;re!==void 0&&(Ei(re),ye=""+re),SW(K)&&(Ei(K.key),ye=""+K.key),OW(K)&&(ct=K.ref,TW(K,Pe));for(Ce in K)ee.call(K,Ce)&&!wW.hasOwnProperty(Ce)&&(ge[Ce]=K[Ce]);if(N&&N.defaultProps){var qe=N.defaultProps;for(Ce in qe)ge[Ce]===void 0&&(ge[Ce]=qe[Ce])}if(ye||ct){var Ye=typeof N=="function"?N.displayName||N.name||"Unknown":N;ye&&AW(ge,Ye),ct&&PW(ge,Ye)}return jW(N,ye,ct,Pe,ce,Ci.current,ge)}}var vf=b.ReactCurrentOwner,i0=b.ReactDebugCurrentFrame;function sa(N){if(N){var K=N._owner,re=ue(N.type,N._source,K?K.type:null);i0.setExtraStackFrame(re)}else i0.setExtraStackFrame(null)}var mf;mf=!1;function yf(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function o0(){{if(vf.current){var N=I(vf.current.type);if(N)return`
17
+ */var xf;function v0(){return xf||(xf=1,process.env.NODE_ENV!=="production"&&function(){var e=T,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function v(I){if(I===null||typeof I!="object")return null;var H=m&&I[m]||I[g];return typeof H=="function"?H:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(I){{for(var H=arguments.length,re=new Array(H>1?H-1:0),ue=1;ue<H;ue++)re[ue-1]=arguments[ue];w("error",I,re)}}function w(I,H,re){{var ue=x.ReactDebugCurrentFrame,Pe=ue.getStackAddendum();Pe!==""&&(H+="%s",re=re.concat([Pe]));var Ce=re.map(function(ge){return String(ge)});Ce.unshift("Warning: "+H),Function.prototype.apply.call(console[I],console,Ce)}}var A=!1,y=!1,O=!1,S=!1,P=!1,$;$=Symbol.for("react.module.reference");function N(I){return!!(typeof I=="string"||typeof I=="function"||I===n||I===i||P||I===a||I===c||I===u||S||I===h||A||y||O||typeof I=="object"&&I!==null&&(I.$$typeof===d||I.$$typeof===f||I.$$typeof===o||I.$$typeof===s||I.$$typeof===l||I.$$typeof===$||I.getModuleId!==void 0))}function j(I,H,re){var ue=I.displayName;if(ue)return ue;var Pe=H.displayName||H.name||"";return Pe!==""?re+"("+Pe+")":re}function C(I){return I.displayName||"Context"}function k(I){if(I==null)return null;if(typeof I.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof I=="function")return I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof I=="object")switch(I.$$typeof){case s:var H=I;return C(H)+".Consumer";case o:var re=I;return C(re._context)+".Provider";case l:return j(I,I.render,"ForwardRef");case f:var ue=I.displayName||null;return ue!==null?ue:k(I.type)||"Memo";case d:{var Pe=I,Ce=Pe._payload,ge=Pe._init;try{return k(ge(Ce))}catch{return null}}}return null}var _=Object.assign,D=0,M,B,U,V,E,R,F;function W(){}W.__reactDisabledLog=!0;function G(){{if(D===0){M=console.log,B=console.info,U=console.warn,V=console.error,E=console.group,R=console.groupCollapsed,F=console.groupEnd;var I={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:I,log:I,warn:I,error:I,group:I,groupCollapsed:I,groupEnd:I})}D++}}function X(){{if(D--,D===0){var I={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},I,{value:M}),info:_({},I,{value:B}),warn:_({},I,{value:U}),error:_({},I,{value:V}),group:_({},I,{value:E}),groupCollapsed:_({},I,{value:R}),groupEnd:_({},I,{value:F})})}D<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=x.ReactCurrentDispatcher,ae;function te(I,H,re){{if(ae===void 0)try{throw Error()}catch(Pe){var ue=Pe.stack.trim().match(/\n( *(at )?)/);ae=ue&&ue[1]||""}return`
18
+ `+ae+I}}var q=!1,Y;{var Z=typeof WeakMap=="function"?WeakMap:Map;Y=new Z}function L(I,H){if(!I||q)return"";{var re=Y.get(I);if(re!==void 0)return re}var ue;q=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=Q.current,Q.current=null,G();try{if(H){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(vt){ue=vt}Reflect.construct(I,[],ge)}else{try{ge.call()}catch(vt){ue=vt}I.call(ge.prototype)}}else{try{throw Error()}catch(vt){ue=vt}I()}}catch(vt){if(vt&&ue&&typeof vt.stack=="string"){for(var ye=vt.stack.split(`
19
+ `),ut=ue.stack.split(`
20
+ `),qe=ye.length-1,Ye=ut.length-1;qe>=1&&Ye>=0&&ye[qe]!==ut[Ye];)Ye--;for(;qe>=1&&Ye>=0;qe--,Ye--)if(ye[qe]!==ut[Ye]){if(qe!==1||Ye!==1)do if(qe--,Ye--,Ye<0||ye[qe]!==ut[Ye]){var Ct=`
21
+ `+ye[qe].replace(" at new "," at ");return I.displayName&&Ct.includes("<anonymous>")&&(Ct=Ct.replace("<anonymous>",I.displayName)),typeof I=="function"&&Y.set(I,Ct),Ct}while(qe>=1&&Ye>=0);break}}}finally{q=!1,Q.current=Ce,X(),Error.prepareStackTrace=Pe}var la=I?I.displayName||I.name:"",Qr=la?te(la):"";return typeof I=="function"&&Y.set(I,Qr),Qr}function oe(I,H,re){return L(I,!1)}function K(I){var H=I.prototype;return!!(H&&H.isReactComponent)}function ce(I,H,re){if(I==null)return"";if(typeof I=="function")return L(I,K(I));if(typeof I=="string")return te(I);switch(I){case c:return te("Suspense");case u:return te("SuspenseList")}if(typeof I=="object")switch(I.$$typeof){case l:return oe(I.render);case f:return ce(I.type,H,re);case d:{var ue=I,Pe=ue._payload,Ce=ue._init;try{return ce(Ce(Pe),H,re)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,ve={},Ue=x.ReactDebugCurrentFrame;function Be(I){if(I){var H=I._owner,re=ce(I.type,I._source,H?H.type:null);Ue.setExtraStackFrame(re)}else Ue.setExtraStackFrame(null)}function Fe(I,H,re,ue,Pe){{var Ce=Function.call.bind(ee);for(var ge in I)if(Ce(I,ge)){var ye=void 0;try{if(typeof I[ge]!="function"){var ut=Error((ue||"React class")+": "+re+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof I[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}ye=I[ge](H,ge,ue,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(qe){ye=qe}ye&&!(ye instanceof Error)&&(Be(Pe),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ue||"React class",re,ge,typeof ye),Be(null)),ye instanceof Error&&!(ye.message in ve)&&(ve[ye.message]=!0,Be(Pe),b("Failed %s type: %s",re,ye.message),Be(null))}}}var Ge=Array.isArray;function ct(I){return Ge(I)}function ji(I){{var H=typeof Symbol=="function"&&Symbol.toStringTag,re=H&&I[Symbol.toStringTag]||I.constructor.name||"Object";return re}}function _i(I){try{return oa(I),!1}catch{return!0}}function oa(I){return""+I}function Ei(I){if(_i(I))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ji(I)),oa(I)}var Ci=x.ReactCurrentOwner,OW={key:!0,ref:!0,__self:!0,__source:!0},a0,i0;function SW(I){if(ee.call(I,"ref")){var H=Object.getOwnPropertyDescriptor(I,"ref").get;if(H&&H.isReactWarning)return!1}return I.ref!==void 0}function TW(I){if(ee.call(I,"key")){var H=Object.getOwnPropertyDescriptor(I,"key").get;if(H&&H.isReactWarning)return!1}return I.key!==void 0}function AW(I,H){typeof I.ref=="string"&&Ci.current}function PW(I,H){{var re=function(){a0||(a0=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",H))};re.isReactWarning=!0,Object.defineProperty(I,"key",{get:re,configurable:!0})}}function jW(I,H){{var re=function(){i0||(i0=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",H))};re.isReactWarning=!0,Object.defineProperty(I,"ref",{get:re,configurable:!0})}}var _W=function(I,H,re,ue,Pe,Ce,ge){var ye={$$typeof:t,type:I,key:H,ref:re,props:ge,_owner:Ce};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function EW(I,H,re,ue,Pe){{var Ce,ge={},ye=null,ut=null;re!==void 0&&(Ei(re),ye=""+re),TW(H)&&(Ei(H.key),ye=""+H.key),SW(H)&&(ut=H.ref,AW(H,Pe));for(Ce in H)ee.call(H,Ce)&&!OW.hasOwnProperty(Ce)&&(ge[Ce]=H[Ce]);if(I&&I.defaultProps){var qe=I.defaultProps;for(Ce in qe)ge[Ce]===void 0&&(ge[Ce]=qe[Ce])}if(ye||ut){var Ye=typeof I=="function"?I.displayName||I.name||"Unknown":I;ye&&PW(ge,Ye),ut&&jW(ge,Ye)}return _W(I,ye,ut,Pe,ue,Ci.current,ge)}}var vf=x.ReactCurrentOwner,o0=x.ReactDebugCurrentFrame;function sa(I){if(I){var H=I._owner,re=ce(I.type,I._source,H?H.type:null);o0.setExtraStackFrame(re)}else o0.setExtraStackFrame(null)}var mf;mf=!1;function yf(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function s0(){{if(vf.current){var I=k(vf.current.type);if(I)return`
22
22
 
23
- Check the render method of \``+N+"`."}return""}}function EW(N){return""}var s0={};function CW(N){{var K=o0();if(!K){var re=typeof N=="string"?N:N.displayName||N.name;re&&(K=`
23
+ Check the render method of \``+I+"`."}return""}}function CW(I){return""}var l0={};function $W(I){{var H=s0();if(!H){var re=typeof I=="string"?I:I.displayName||I.name;re&&(H=`
24
24
 
25
- Check the top-level render call using <`+re+">.")}return K}}function l0(N,K){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var re=CW(K);if(s0[re])return;s0[re]=!0;var ce="";N&&N._owner&&N._owner!==vf.current&&(ce=" It was passed a child from "+I(N._owner.type)+"."),sa(N),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,ce),sa(null)}}function u0(N,K){{if(typeof N!="object")return;if(ut(N))for(var re=0;re<N.length;re++){var ce=N[re];yf(ce)&&l0(ce,K)}else if(yf(N))N._store&&(N._store.validated=!0);else if(N){var Pe=v(N);if(typeof Pe=="function"&&Pe!==N.entries)for(var Ce=Pe.call(N),ge;!(ge=Ce.next()).done;)yf(ge.value)&&l0(ge.value,K)}}}function $W(N){{var K=N.type;if(K==null||typeof K=="string")return;var re;if(typeof K=="function")re=K.propTypes;else if(typeof K=="object"&&(K.$$typeof===l||K.$$typeof===f))re=K.propTypes;else return;if(re){var ce=I(K);Fe(re,N.props,"prop",ce,N)}else if(K.PropTypes!==void 0&&!mf){mf=!0;var Pe=I(K);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof K.getDefaultProps=="function"&&!K.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kW(N){{for(var K=Object.keys(N.props),re=0;re<K.length;re++){var ce=K[re];if(ce!=="children"&&ce!=="key"){sa(N),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),sa(null);break}}N.ref!==null&&(sa(N),x("Invalid attribute `ref` supplied to `React.Fragment`."),sa(null))}}var c0={};function f0(N,K,re,ce,Pe,Ce){{var ge=M(N);if(!ge){var ye="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ct=EW();ct?ye+=ct:ye+=o0();var qe;N===null?qe="null":ut(N)?qe="array":N!==void 0&&N.$$typeof===t?(qe="<"+(I(N.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):qe=typeof N,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",qe,ye)}var Ye=_W(N,K,re,Pe,Ce);if(Ye==null)return Ye;if(ge){var Ct=K.children;if(Ct!==void 0)if(ce)if(ut(Ct)){for(var la=0;la<Ct.length;la++)u0(Ct[la],N);Object.freeze&&Object.freeze(Ct)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u0(Ct,N)}if(ee.call(K,"key")){var Qr=I(N),vt=Object.keys(K).filter(function(RW){return RW!=="key"}),gf=vt.length>0?"{key: someKey, "+vt.join(": ..., ")+": ...}":"{key: someKey}";if(!c0[Qr+gf]){var LW=vt.length>0?"{"+vt.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+re+">.")}return H}}function c0(I,H){{if(!I._store||I._store.validated||I.key!=null)return;I._store.validated=!0;var re=$W(H);if(l0[re])return;l0[re]=!0;var ue="";I&&I._owner&&I._owner!==vf.current&&(ue=" It was passed a child from "+k(I._owner.type)+"."),sa(I),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,ue),sa(null)}}function u0(I,H){{if(typeof I!="object")return;if(ct(I))for(var re=0;re<I.length;re++){var ue=I[re];yf(ue)&&c0(ue,H)}else if(yf(I))I._store&&(I._store.validated=!0);else if(I){var Pe=v(I);if(typeof Pe=="function"&&Pe!==I.entries)for(var Ce=Pe.call(I),ge;!(ge=Ce.next()).done;)yf(ge.value)&&c0(ge.value,H)}}}function kW(I){{var H=I.type;if(H==null||typeof H=="string")return;var re;if(typeof H=="function")re=H.propTypes;else if(typeof H=="object"&&(H.$$typeof===l||H.$$typeof===f))re=H.propTypes;else return;if(re){var ue=k(H);Fe(re,I.props,"prop",ue,I)}else if(H.PropTypes!==void 0&&!mf){mf=!0;var Pe=k(H);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function MW(I){{for(var H=Object.keys(I.props),re=0;re<H.length;re++){var ue=H[re];if(ue!=="children"&&ue!=="key"){sa(I),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ue),sa(null);break}}I.ref!==null&&(sa(I),b("Invalid attribute `ref` supplied to `React.Fragment`."),sa(null))}}var f0={};function d0(I,H,re,ue,Pe,Ce){{var ge=N(I);if(!ge){var ye="";(I===void 0||typeof I=="object"&&I!==null&&Object.keys(I).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ut=CW();ut?ye+=ut:ye+=s0();var qe;I===null?qe="null":ct(I)?qe="array":I!==void 0&&I.$$typeof===t?(qe="<"+(k(I.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):qe=typeof I,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",qe,ye)}var Ye=EW(I,H,re,Pe,Ce);if(Ye==null)return Ye;if(ge){var Ct=H.children;if(Ct!==void 0)if(ue)if(ct(Ct)){for(var la=0;la<Ct.length;la++)u0(Ct[la],I);Object.freeze&&Object.freeze(Ct)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u0(Ct,I)}if(ee.call(H,"key")){var Qr=k(I),vt=Object.keys(H).filter(function(BW){return BW!=="key"}),gf=vt.length>0?"{key: someKey, "+vt.join(": ..., ")+": ...}":"{key: someKey}";if(!f0[Qr+gf]){var RW=vt.length>0?"{"+vt.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,gf,Qr,LW,Qr),c0[Qr+gf]=!0}}return N===n?kW(Ye):$W(Ye),Ye}}function MW(N,K,re){return f0(N,K,re,!0)}function NW(N,K,re){return f0(N,K,re,!1)}var DW=NW,IW=MW;ca.Fragment=n,ca.jsx=DW,ca.jsxs=IW}()),ca}process.env.NODE_ENV==="production"?zs.exports=p0():zs.exports=h0();var p=zs.exports;/**
30
+ <%s key={someKey} {...props} />`,gf,Qr,RW,Qr),f0[Qr+gf]=!0}}return I===n?MW(Ye):kW(Ye),Ye}}function NW(I,H,re){return d0(I,H,re,!0)}function DW(I,H,re){return d0(I,H,re,!1)}var IW=DW,LW=NW;ua.Fragment=n,ua.jsx=IW,ua.jsxs=LW}()),ua}process.env.NODE_ENV==="production"?zs.exports=h0():zs.exports=v0();var p=zs.exports;/**
31
31
  * @license lucide-react v0.294.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */var v0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
35
+ */var m0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
36
36
  * @license lucide-react v0.294.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const m0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Le=(e,t)=>{const r=T.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...u},c)=>T.createElement("svg",{ref:c,...v0,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${m0(e)}`,s].join(" "),...u},[...t.map(([f,d])=>T.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
40
+ */const y0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Le=(e,t)=>{const r=T.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...c},u)=>T.createElement("svg",{ref:u,...m0,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${y0(e)}`,s].join(" "),...c},[...t.map(([f,d])=>T.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
41
41
  * @license lucide-react v0.294.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
@@ -47,12 +47,12 @@ React keys must be passed directly to JSX without using spread:
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const y0=Le("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
50
+ */const g0=Le("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
51
51
  * @license lucide-react v0.294.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const g0=Le("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
55
+ */const b0=Le("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
56
56
  * @license lucide-react v0.294.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
@@ -62,12 +62,12 @@ React keys must be passed directly to JSX without using spread:
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const cr=Le("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
65
+ */const ur=Le("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
66
66
  * @license lucide-react v0.294.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const b0=Le("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
70
+ */const x0=Le("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
71
71
  * @license lucide-react v0.294.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
@@ -92,7 +92,7 @@ React keys must be passed directly to JSX without using spread:
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const x0=Le("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
95
+ */const w0=Le("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
96
96
  * @license lucide-react v0.294.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
@@ -107,7 +107,7 @@ React keys must be passed directly to JSX without using spread:
107
107
  *
108
108
  * This source code is licensed under the ISC license.
109
109
  * See the LICENSE file in the root directory of this source tree.
110
- */const w0=Le("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
110
+ */const O0=Le("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
111
111
  * @license lucide-react v0.294.0 - ISC
112
112
  *
113
113
  * This source code is licensed under the ISC license.
@@ -122,12 +122,12 @@ React keys must be passed directly to JSX without using spread:
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */const O0=Le("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
125
+ */const S0=Le("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
126
126
  * @license lucide-react v0.294.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const S0=Le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
130
+ */const T0=Le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
131
131
  * @license lucide-react v0.294.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
@@ -137,27 +137,27 @@ React keys must be passed directly to JSX without using spread:
137
137
  *
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
- */const T0=Le("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
140
+ */const A0=Le("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
141
141
  * @license lucide-react v0.294.0 - ISC
142
142
  *
143
143
  * This source code is licensed under the ISC license.
144
144
  * See the LICENSE file in the root directory of this source tree.
145
- */const A0=Le("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
145
+ */const P0=Le("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
146
146
  * @license lucide-react v0.294.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
- */const P0=Le("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
150
+ */const j0=Le("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
151
151
  * @license lucide-react v0.294.0 - ISC
152
152
  *
153
153
  * This source code is licensed under the ISC license.
154
154
  * See the LICENSE file in the root directory of this source tree.
155
- */const j0=Le("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
155
+ */const _0=Le("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
156
156
  * @license lucide-react v0.294.0 - ISC
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
- */const Ef=Le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Cf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Cf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function me(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Cf(e))&&(n&&(n+=" "),n+=t);return n}const Gs="-",_0=e=>{const t=C0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Gs);return s[0]===""&&s.length!==1&&s.shift(),$f(s,t)||E0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},$f=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?$f(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Gs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},kf=/^\[(.+)\]$/,E0=e=>{if(kf.test(e)){const t=kf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},C0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return k0(Object.entries(e.classGroups),r).forEach(([i,o])=>{qs(o,n,i,t)}),n},qs=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Mf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if($0(a)){qs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{qs(o,Mf(t,i),r,n)})})},Mf=(e,t)=>{let r=e;return t.split(Gs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},$0=e=>e.isThemeGetter,k0=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,M0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},Nf="!",N0=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let u=0,c=0,f;for(let v=0;v<s.length;v++){let b=s[v];if(u===0){if(b===a&&(n||s.slice(v,v+i)===t)){l.push(s.slice(c,v)),c=v+i;continue}if(b==="/"){f=v;continue}}b==="["?u++:b==="]"&&u--}const d=l.length===0?s:s.substring(c),h=d.startsWith(Nf),m=h?d.substring(1):d,y=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:y}};return r?s=>r({className:s,parseClassName:o}):o},D0=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},I0=e=>({cache:M0(e.cacheSize),parseClassName:N0(e),..._0(e)}),L0=/\s+/,R0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(L0);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(u);let m=!!h,y=n(m?d.substring(0,h):d);if(!y){if(!m){s=u+(s.length>0?" "+s:s);continue}if(y=n(d),!y){s=u+(s.length>0?" "+s:s);continue}m=!1}const v=D0(c).join(":"),b=f?v+Nf:v,x=b+y;if(i.includes(x))continue;i.push(x);const w=a(y,m);for(let A=0;A<w.length;++A){const g=w[A];i.push(b+g)}s=u+(s.length>0?" "+s:s)}return s};function B0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Df(t))&&(n&&(n+=" "),n+=r);return n}const Df=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Df(e[n]))&&(r&&(r+=" "),r+=t);return r};function F0(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=I0(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=R0(l,r);return a(l,c),c}return function(){return i(B0.apply(null,arguments))}}const Ne=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},If=/^\[(?:([a-z-]+):)?(.+)\]$/i,W0=/^\d+\/\d+$/,U0=new Set(["px","full","screen"]),z0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,G0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,q0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>tn(e)||U0.has(e)||W0.test(e),fr=e=>rn(e,"length",tx),tn=e=>!!e&&!Number.isNaN(Number(e)),Hs=e=>rn(e,"number",tn),da=e=>!!e&&Number.isInteger(Number(e)),K0=e=>e.endsWith("%")&&tn(e.slice(0,-1)),he=e=>If.test(e),dr=e=>z0.test(e),Y0=new Set(["length","size","percentage"]),X0=e=>rn(e,Y0,Lf),J0=e=>rn(e,"position",Lf),Z0=new Set(["image","url"]),Q0=e=>rn(e,Z0,nx),ex=e=>rn(e,"",rx),pa=()=>!0,rn=(e,t,r)=>{const n=If.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},tx=e=>V0.test(e)&&!G0.test(e),Lf=()=>!1,rx=e=>q0.test(e),nx=e=>H0.test(e),ax=F0(()=>{const e=Ne("colors"),t=Ne("spacing"),r=Ne("blur"),n=Ne("brightness"),a=Ne("borderColor"),i=Ne("borderRadius"),o=Ne("borderSpacing"),s=Ne("borderWidth"),l=Ne("contrast"),u=Ne("grayscale"),c=Ne("hueRotate"),f=Ne("invert"),d=Ne("gap"),h=Ne("gradientColorStops"),m=Ne("gradientColorStopPositions"),y=Ne("inset"),v=Ne("margin"),b=Ne("opacity"),x=Ne("padding"),w=Ne("saturate"),A=Ne("scale"),g=Ne("sepia"),O=Ne("skew"),S=Ne("space"),j=Ne("translate"),E=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",he,t],P=()=>[he,t],I=()=>["",Xt,fr],C=()=>["auto",tn,he],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",he],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[tn,he];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Xt,fr],blur:["none","",dr,he],brightness:R(),borderColor:[e],borderRadius:["none","","full",dr,he],borderSpacing:P(),borderWidth:I(),contrast:R(),grayscale:V(),hueRotate:R(),invert:V(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[K0,fr],inset:_(),margin:_(),opacity:R(),padding:P(),saturate:R(),scale:R(),sepia:V(),skew:R(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[dr]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),he]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",da,he]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",da,he]}],"grid-cols":[{"grid-cols":[pa]}],"col-start-end":[{col:["auto",{span:["full",da,he]},he]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,he]},he]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[dr]},dr]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dr,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hs]}],"font-family":[{font:[pa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",tn,Hs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xt,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,fr]}],"underline-offset":[{"underline-offset":["auto",Xt,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),J0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",X0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Q0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:k()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[Xt,he]}],"outline-w":[{outline:[Xt,fr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Xt,fr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dr,ex]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dr,he]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[g]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[da,he]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xt,fr,Hs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function se(...e){return ax(me(e))}const Rf=({data:e,className:t,onClick:r,isFirst:n=!1})=>{const{title:a,value:i,change:o,info:s,highlighted:l}=e,u=d=>typeof d=="number"?d.toLocaleString():d.toString(),c=d=>`${d}%`,f=()=>{r&&r(e)};return p.jsxs("div",{className:se("rounded-lg border py-[16px] px-[24px] transition-all duration-200 bg-white",!l&&"border-gray-200",l&&["!border-blue-600 shadow-[0 1px 4px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08), 0 0 0 4px rgba(41, 112, 255, 0.24)]"],r&&"cursor-pointer",t),onClick:f,children:[p.jsxs("div",{className:"flex items-center gap-2 mb-[6px]",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:a}),s&&p.jsxs("div",{className:"relative group",children:[p.jsx(w0,{className:"h-[16px] w-[16px] text-gray-400 cursor-help"}),p.jsxs("div",{className:se("absolute bottom-full w-[280px] text-xs text-center text-white font-medium mb-[12px] px-[12px] py-[8px] text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 z-10 shadow-lg",n?"left-0":"left-1/2 transform -translate-x-1/2"),children:[s,p.jsx("div",{className:se("absolute top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-gray-900",n?"left-4":"left-1/2 transform -translate-x-1/2")})]})]})]}),p.jsxs("div",{className:"flex items-baseline gap-3",children:[p.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:u(i)}),o&&p.jsxs("div",{className:se("flex items-center gap-[8px] px-[8px] py-[4px] text-xs font-medium",(o.type==="increase","")),style:o.type==="increase"?{color:"rgb(21 128 61 / var(--tw-text-opacity, 1))",border:"1px solid #ABEFC6",borderRadius:"150px",background:"rgba(16, 185, 129, 0.10)"}:{color:"rgb(185 28 28 / var(--tw-text-opacity, 1))",border:"1px solid #FCA5A5",borderRadius:"150px",background:"rgba(239, 68, 68, 0.10)"},children:[o.type==="increase"?p.jsx(j0,{className:"h-3 w-3"}):p.jsx(P0,{className:"h-3 w-3"}),p.jsx("span",{children:c(o.value)})]})]})]})};var ix=Array.isArray,ft=ix,ox=typeof $i=="object"&&$i&&$i.Object===Object&&$i,Bf=ox,sx=Bf,lx=typeof self=="object"&&self&&self.Object===Object&&self,ux=sx||lx||Function("return this")(),Ft=ux,cx=Ft,fx=cx.Symbol,ha=fx,Ff=ha,Wf=Object.prototype,dx=Wf.hasOwnProperty,px=Wf.toString,va=Ff?Ff.toStringTag:void 0;function hx(e){var t=dx.call(e,va),r=e[va];try{e[va]=void 0;var n=!0}catch{}var a=px.call(e);return n&&(t?e[va]=r:delete e[va]),a}var vx=hx,mx=Object.prototype,yx=mx.toString;function gx(e){return yx.call(e)}var bx=gx,Uf=ha,xx=vx,wx=bx,Ox="[object Null]",Sx="[object Undefined]",zf=Uf?Uf.toStringTag:void 0;function Tx(e){return e==null?e===void 0?Sx:Ox:zf&&zf in Object(e)?xx(e):wx(e)}var Jt=Tx;function Ax(e){return e!=null&&typeof e=="object"}var Zt=Ax,Px=Jt,jx=Zt,_x="[object Symbol]";function Ex(e){return typeof e=="symbol"||jx(e)&&Px(e)==_x}var nn=Ex,Cx=ft,$x=nn,kx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mx=/^\w*$/;function Nx(e,t){if(Cx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$x(e)?!0:Mx.test(e)||!kx.test(e)||t!=null&&e in Object(t)}var Ks=Nx;function Dx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pr=Dx;const an=$e(pr);var Ix=Jt,Lx=pr,Rx="[object AsyncFunction]",Bx="[object Function]",Fx="[object GeneratorFunction]",Wx="[object Proxy]";function Ux(e){if(!Lx(e))return!1;var t=Ix(e);return t==Bx||t==Fx||t==Rx||t==Wx}var Ys=Ux;const pe=$e(Ys);var zx=Ft,Vx=zx["__core-js_shared__"],Gx=Vx,Xs=Gx,Vf=function(){var e=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qx(e){return!!Vf&&Vf in e}var Hx=qx,Kx=Function.prototype,Yx=Kx.toString;function Xx(e){if(e!=null){try{return Yx.call(e)}catch{}try{return e+""}catch{}}return""}var Gf=Xx,Jx=Ys,Zx=Hx,Qx=pr,e1=Gf,t1=/[\\^$.*+?()[\]{}|]/g,r1=/^\[object .+?Constructor\]$/,n1=Function.prototype,a1=Object.prototype,i1=n1.toString,o1=a1.hasOwnProperty,s1=RegExp("^"+i1.call(o1).replace(t1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l1(e){if(!Qx(e)||Zx(e))return!1;var t=Jx(e)?s1:r1;return t.test(e1(e))}var u1=l1;function c1(e,t){return e==null?void 0:e[t]}var f1=c1,d1=u1,p1=f1;function h1(e,t){var r=p1(e,t);return d1(r)?r:void 0}var _r=h1,v1=_r,m1=v1(Object,"create"),Mi=m1,qf=Mi;function y1(){this.__data__=qf?qf(null):{},this.size=0}var g1=y1;function b1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var x1=b1,w1=Mi,O1="__lodash_hash_undefined__",S1=Object.prototype,T1=S1.hasOwnProperty;function A1(e){var t=this.__data__;if(w1){var r=t[e];return r===O1?void 0:r}return T1.call(t,e)?t[e]:void 0}var P1=A1,j1=Mi,_1=Object.prototype,E1=_1.hasOwnProperty;function C1(e){var t=this.__data__;return j1?t[e]!==void 0:E1.call(t,e)}var $1=C1,k1=Mi,M1="__lodash_hash_undefined__";function N1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=k1&&t===void 0?M1:t,this}var D1=N1,I1=g1,L1=x1,R1=P1,B1=$1,F1=D1;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}on.prototype.clear=I1,on.prototype.delete=L1,on.prototype.get=R1,on.prototype.has=B1,on.prototype.set=F1;var W1=on;function U1(){this.__data__=[],this.size=0}var z1=U1;function V1(e,t){return e===t||e!==e&&t!==t}var Js=V1,G1=Js;function q1(e,t){for(var r=e.length;r--;)if(G1(e[r][0],t))return r;return-1}var Ni=q1,H1=Ni,K1=Array.prototype,Y1=K1.splice;function X1(e){var t=this.__data__,r=H1(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Y1.call(t,r,1),--this.size,!0}var J1=X1,Z1=Ni;function Q1(e){var t=this.__data__,r=Z1(t,e);return r<0?void 0:t[r][1]}var ew=Q1,tw=Ni;function rw(e){return tw(this.__data__,e)>-1}var nw=rw,aw=Ni;function iw(e,t){var r=this.__data__,n=aw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ow=iw,sw=z1,lw=J1,uw=ew,cw=nw,fw=ow;function sn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}sn.prototype.clear=sw,sn.prototype.delete=lw,sn.prototype.get=uw,sn.prototype.has=cw,sn.prototype.set=fw;var Di=sn,dw=_r,pw=Ft,hw=dw(pw,"Map"),Zs=hw,Hf=W1,vw=Di,mw=Zs;function yw(){this.size=0,this.__data__={hash:new Hf,map:new(mw||vw),string:new Hf}}var gw=yw;function bw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var xw=bw,ww=xw;function Ow(e,t){var r=e.__data__;return ww(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ii=Ow,Sw=Ii;function Tw(e){var t=Sw(this,e).delete(e);return this.size-=t?1:0,t}var Aw=Tw,Pw=Ii;function jw(e){return Pw(this,e).get(e)}var _w=jw,Ew=Ii;function Cw(e){return Ew(this,e).has(e)}var $w=Cw,kw=Ii;function Mw(e,t){var r=kw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Nw=Mw,Dw=gw,Iw=Aw,Lw=_w,Rw=$w,Bw=Nw;function ln(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ln.prototype.clear=Dw,ln.prototype.delete=Iw,ln.prototype.get=Lw,ln.prototype.has=Rw,ln.prototype.set=Bw;var Qs=ln,Kf=Qs,Fw="Expected a function";function el(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Fw);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(el.Cache||Kf),r}el.Cache=Kf;var Yf=el;const Ww=$e(Yf);var Uw=Yf,zw=500;function Vw(e){var t=Uw(e,function(n){return r.size===zw&&r.clear(),n}),r=t.cache;return t}var Gw=Vw,qw=Gw,Hw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kw=/\\(\\)?/g,Yw=qw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Hw,function(r,n,a,i){t.push(a?i.replace(Kw,"$1"):n||r)}),t}),Xw=Yw;function Jw(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var tl=Jw,Xf=ha,Zw=tl,Qw=ft,eO=nn,Jf=Xf?Xf.prototype:void 0,Zf=Jf?Jf.toString:void 0;function Qf(e){if(typeof e=="string")return e;if(Qw(e))return Zw(e,Qf)+"";if(eO(e))return Zf?Zf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var tO=Qf,rO=tO;function nO(e){return e==null?"":rO(e)}var ed=nO,aO=ft,iO=Ks,oO=Xw,sO=ed;function lO(e,t){return aO(e)?e:iO(e,t)?[e]:oO(sO(e))}var td=lO,uO=nn;function cO(e){if(typeof e=="string"||uO(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Li=cO,fO=td,dO=Li;function pO(e,t){t=fO(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[dO(t[r++])];return r&&r==n?e:void 0}var rl=pO,hO=rl;function vO(e,t,r){var n=e==null?void 0:hO(e,t);return n===void 0?r:n}var rd=vO;const wt=$e(rd);function mO(e){return e==null}var yO=mO;const fe=$e(yO);var gO=Jt,bO=ft,xO=Zt,wO="[object String]";function OO(e){return typeof e=="string"||!bO(e)&&xO(e)&&gO(e)==wO}var SO=OO;const Er=$e(SO);var nl={exports:{}},we={};/**
160
+ */const Ef=Le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Cf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Cf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function me(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Cf(e))&&(n&&(n+=" "),n+=t);return n}const Gs="-",E0=e=>{const t=$0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Gs);return s[0]===""&&s.length!==1&&s.shift(),$f(s,t)||C0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},$f=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?$f(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Gs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},kf=/^\[(.+)\]$/,C0=e=>{if(kf.test(e)){const t=kf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},$0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return M0(Object.entries(e.classGroups),r).forEach(([i,o])=>{qs(o,n,i,t)}),n},qs=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Mf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(k0(a)){qs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{qs(o,Mf(t,i),r,n)})})},Mf=(e,t)=>{let r=e;return t.split(Gs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},k0=e=>e.isThemeGetter,M0=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,N0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},Nf="!",D0=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let c=0,u=0,f;for(let v=0;v<s.length;v++){let x=s[v];if(c===0){if(x===a&&(n||s.slice(v,v+i)===t)){l.push(s.slice(u,v)),u=v+i;continue}if(x==="/"){f=v;continue}}x==="["?c++:x==="]"&&c--}const d=l.length===0?s:s.substring(u),h=d.startsWith(Nf),m=h?d.substring(1):d,g=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:o}):o},I0=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},L0=e=>({cache:N0(e.cacheSize),parseClassName:D0(e),...E0(e)}),R0=/\s+/,B0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(R0);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(c);let m=!!h,g=n(m?d.substring(0,h):d);if(!g){if(!m){s=c+(s.length>0?" "+s:s);continue}if(g=n(d),!g){s=c+(s.length>0?" "+s:s);continue}m=!1}const v=I0(u).join(":"),x=f?v+Nf:v,b=x+g;if(i.includes(b))continue;i.push(b);const w=a(g,m);for(let A=0;A<w.length;++A){const y=w[A];i.push(x+y)}s=c+(s.length>0?" "+s:s)}return s};function F0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Df(t))&&(n&&(n+=" "),n+=r);return n}const Df=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Df(e[n]))&&(r&&(r+=" "),r+=t);return r};function W0(e,...t){let r,n,a,i=o;function o(l){const c=t.reduce((u,f)=>f(u),e());return r=L0(c),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const c=n(l);if(c)return c;const u=B0(l,r);return a(l,u),u}return function(){return i(F0.apply(null,arguments))}}const Ne=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},If=/^\[(?:([a-z-]+):)?(.+)\]$/i,U0=/^\d+\/\d+$/,z0=new Set(["px","full","screen"]),V0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,G0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,q0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,K0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>tn(e)||z0.has(e)||U0.test(e),fr=e=>rn(e,"length",rx),tn=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>rn(e,"number",tn),da=e=>!!e&&Number.isInteger(Number(e)),Y0=e=>e.endsWith("%")&&tn(e.slice(0,-1)),he=e=>If.test(e),dr=e=>V0.test(e),X0=new Set(["length","size","percentage"]),J0=e=>rn(e,X0,Lf),Z0=e=>rn(e,"position",Lf),Q0=new Set(["image","url"]),ex=e=>rn(e,Q0,ax),tx=e=>rn(e,"",nx),pa=()=>!0,rn=(e,t,r)=>{const n=If.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},rx=e=>G0.test(e)&&!q0.test(e),Lf=()=>!1,nx=e=>K0.test(e),ax=e=>H0.test(e),ix=W0(()=>{const e=Ne("colors"),t=Ne("spacing"),r=Ne("blur"),n=Ne("brightness"),a=Ne("borderColor"),i=Ne("borderRadius"),o=Ne("borderSpacing"),s=Ne("borderWidth"),l=Ne("contrast"),c=Ne("grayscale"),u=Ne("hueRotate"),f=Ne("invert"),d=Ne("gap"),h=Ne("gradientColorStops"),m=Ne("gradientColorStopPositions"),g=Ne("inset"),v=Ne("margin"),x=Ne("opacity"),b=Ne("padding"),w=Ne("saturate"),A=Ne("scale"),y=Ne("sepia"),O=Ne("skew"),S=Ne("space"),P=Ne("translate"),$=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",he,t],C=()=>[he,t],k=()=>["",Xt,fr],_=()=>["auto",tn,he],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",he],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[tn,he];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Xt,fr],blur:["none","",dr,he],brightness:R(),borderColor:[e],borderRadius:["none","","full",dr,he],borderSpacing:C(),borderWidth:k(),contrast:R(),grayscale:V(),hueRotate:R(),invert:V(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Y0,fr],inset:j(),margin:j(),opacity:R(),padding:C(),saturate:R(),scale:R(),sepia:V(),skew:R(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[dr]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),he]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",da,he]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",da,he]}],"grid-cols":[{"grid-cols":[pa]}],"col-start-end":[{col:["auto",{span:["full",da,he]},he]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,he]},he]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[dr]},dr]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dr,fr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ks]}],"font-family":[{font:[pa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",tn,Ks]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xt,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,fr]}],"underline-offset":[{"underline-offset":["auto",Xt,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Z0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",J0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ex]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:M()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[Xt,he]}],"outline-w":[{outline:[Xt,fr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Xt,fr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dr,tx]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dr,he]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[da,he]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xt,fr,Ks]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function se(...e){return ix(me(e))}const Rf=({data:e,className:t,onClick:r,isFirst:n=!1})=>{const{title:a,value:i,change:o,info:s,highlighted:l}=e,c=d=>typeof d=="number"?d.toLocaleString():d.toString(),u=d=>`${d}%`,f=()=>{r&&r(e)};return p.jsxs("div",{className:se("rounded-lg border py-[16px] px-[24px] transition-all duration-200 bg-white",!l&&"border-gray-200",l&&["!border-blue-600 shadow-[0 1px 4px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08), 0 0 0 4px rgba(41, 112, 255, 0.24)]"],r&&"cursor-pointer",t),onClick:f,children:[p.jsxs("div",{className:"flex items-center gap-2 mb-[6px]",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:a}),s&&p.jsxs("div",{className:"relative group",children:[p.jsx(O0,{className:"h-[16px] w-[16px] text-gray-400 cursor-help"}),p.jsxs("div",{className:se("absolute bottom-full w-[280px] text-xs text-center text-white font-medium mb-[12px] px-[12px] py-[8px] text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 z-10 shadow-lg",n?"left-0":"left-1/2 transform -translate-x-1/2"),children:[s,p.jsx("div",{className:se("absolute top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-gray-900",n?"left-4":"left-1/2 transform -translate-x-1/2")})]})]})]}),p.jsxs("div",{className:"flex items-baseline gap-3",children:[p.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:c(i)}),o&&p.jsxs("div",{className:se("flex items-center gap-[8px] px-[8px] py-[4px] text-xs font-medium",(o.type==="increase","")),style:o.type==="increase"?{color:"rgb(21 128 61 / var(--tw-text-opacity, 1))",border:"1px solid #ABEFC6",borderRadius:"150px",background:"rgba(16, 185, 129, 0.10)"}:{color:"rgb(185 28 28 / var(--tw-text-opacity, 1))",border:"1px solid #FCA5A5",borderRadius:"150px",background:"rgba(239, 68, 68, 0.10)"},children:[o.type==="increase"?p.jsx(_0,{className:"h-3 w-3"}):p.jsx(j0,{className:"h-3 w-3"}),p.jsx("span",{children:u(o.value)})]})]})]})};var ox=Array.isArray,ft=ox,sx=typeof $i=="object"&&$i&&$i.Object===Object&&$i,Bf=sx,lx=Bf,cx=typeof self=="object"&&self&&self.Object===Object&&self,ux=lx||cx||Function("return this")(),Ft=ux,fx=Ft,dx=fx.Symbol,ha=dx,Ff=ha,Wf=Object.prototype,px=Wf.hasOwnProperty,hx=Wf.toString,va=Ff?Ff.toStringTag:void 0;function vx(e){var t=px.call(e,va),r=e[va];try{e[va]=void 0;var n=!0}catch{}var a=hx.call(e);return n&&(t?e[va]=r:delete e[va]),a}var mx=vx,yx=Object.prototype,gx=yx.toString;function bx(e){return gx.call(e)}var xx=bx,Uf=ha,wx=mx,Ox=xx,Sx="[object Null]",Tx="[object Undefined]",zf=Uf?Uf.toStringTag:void 0;function Ax(e){return e==null?e===void 0?Tx:Sx:zf&&zf in Object(e)?wx(e):Ox(e)}var Jt=Ax;function Px(e){return e!=null&&typeof e=="object"}var Zt=Px,jx=Jt,_x=Zt,Ex="[object Symbol]";function Cx(e){return typeof e=="symbol"||_x(e)&&jx(e)==Ex}var nn=Cx,$x=ft,kx=nn,Mx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nx=/^\w*$/;function Dx(e,t){if($x(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||kx(e)?!0:Nx.test(e)||!Mx.test(e)||t!=null&&e in Object(t)}var Hs=Dx;function Ix(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pr=Ix;const an=$e(pr);var Lx=Jt,Rx=pr,Bx="[object AsyncFunction]",Fx="[object Function]",Wx="[object GeneratorFunction]",Ux="[object Proxy]";function zx(e){if(!Rx(e))return!1;var t=Lx(e);return t==Fx||t==Wx||t==Bx||t==Ux}var Ys=zx;const pe=$e(Ys);var Vx=Ft,Gx=Vx["__core-js_shared__"],qx=Gx,Xs=qx,Vf=function(){var e=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Kx(e){return!!Vf&&Vf in e}var Hx=Kx,Yx=Function.prototype,Xx=Yx.toString;function Jx(e){if(e!=null){try{return Xx.call(e)}catch{}try{return e+""}catch{}}return""}var Gf=Jx,Zx=Ys,Qx=Hx,e1=pr,t1=Gf,r1=/[\\^$.*+?()[\]{}|]/g,n1=/^\[object .+?Constructor\]$/,a1=Function.prototype,i1=Object.prototype,o1=a1.toString,s1=i1.hasOwnProperty,l1=RegExp("^"+o1.call(s1).replace(r1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function c1(e){if(!e1(e)||Qx(e))return!1;var t=Zx(e)?l1:n1;return t.test(t1(e))}var u1=c1;function f1(e,t){return e==null?void 0:e[t]}var d1=f1,p1=u1,h1=d1;function v1(e,t){var r=h1(e,t);return p1(r)?r:void 0}var _r=v1,m1=_r,y1=m1(Object,"create"),Mi=y1,qf=Mi;function g1(){this.__data__=qf?qf(null):{},this.size=0}var b1=g1;function x1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var w1=x1,O1=Mi,S1="__lodash_hash_undefined__",T1=Object.prototype,A1=T1.hasOwnProperty;function P1(e){var t=this.__data__;if(O1){var r=t[e];return r===S1?void 0:r}return A1.call(t,e)?t[e]:void 0}var j1=P1,_1=Mi,E1=Object.prototype,C1=E1.hasOwnProperty;function $1(e){var t=this.__data__;return _1?t[e]!==void 0:C1.call(t,e)}var k1=$1,M1=Mi,N1="__lodash_hash_undefined__";function D1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=M1&&t===void 0?N1:t,this}var I1=D1,L1=b1,R1=w1,B1=j1,F1=k1,W1=I1;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}on.prototype.clear=L1,on.prototype.delete=R1,on.prototype.get=B1,on.prototype.has=F1,on.prototype.set=W1;var U1=on;function z1(){this.__data__=[],this.size=0}var V1=z1;function G1(e,t){return e===t||e!==e&&t!==t}var Js=G1,q1=Js;function K1(e,t){for(var r=e.length;r--;)if(q1(e[r][0],t))return r;return-1}var Ni=K1,H1=Ni,Y1=Array.prototype,X1=Y1.splice;function J1(e){var t=this.__data__,r=H1(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():X1.call(t,r,1),--this.size,!0}var Z1=J1,Q1=Ni;function ew(e){var t=this.__data__,r=Q1(t,e);return r<0?void 0:t[r][1]}var tw=ew,rw=Ni;function nw(e){return rw(this.__data__,e)>-1}var aw=nw,iw=Ni;function ow(e,t){var r=this.__data__,n=iw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var sw=ow,lw=V1,cw=Z1,uw=tw,fw=aw,dw=sw;function sn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}sn.prototype.clear=lw,sn.prototype.delete=cw,sn.prototype.get=uw,sn.prototype.has=fw,sn.prototype.set=dw;var Di=sn,pw=_r,hw=Ft,vw=pw(hw,"Map"),Zs=vw,Kf=U1,mw=Di,yw=Zs;function gw(){this.size=0,this.__data__={hash:new Kf,map:new(yw||mw),string:new Kf}}var bw=gw;function xw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ww=xw,Ow=ww;function Sw(e,t){var r=e.__data__;return Ow(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ii=Sw,Tw=Ii;function Aw(e){var t=Tw(this,e).delete(e);return this.size-=t?1:0,t}var Pw=Aw,jw=Ii;function _w(e){return jw(this,e).get(e)}var Ew=_w,Cw=Ii;function $w(e){return Cw(this,e).has(e)}var kw=$w,Mw=Ii;function Nw(e,t){var r=Mw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Dw=Nw,Iw=bw,Lw=Pw,Rw=Ew,Bw=kw,Fw=Dw;function ln(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ln.prototype.clear=Iw,ln.prototype.delete=Lw,ln.prototype.get=Rw,ln.prototype.has=Bw,ln.prototype.set=Fw;var Qs=ln,Hf=Qs,Ww="Expected a function";function el(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ww);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(el.Cache||Hf),r}el.Cache=Hf;var Yf=el;const Uw=$e(Yf);var zw=Yf,Vw=500;function Gw(e){var t=zw(e,function(n){return r.size===Vw&&r.clear(),n}),r=t.cache;return t}var qw=Gw,Kw=qw,Hw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yw=/\\(\\)?/g,Xw=Kw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Hw,function(r,n,a,i){t.push(a?i.replace(Yw,"$1"):n||r)}),t}),Jw=Xw;function Zw(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var tl=Zw,Xf=ha,Qw=tl,eO=ft,tO=nn,Jf=Xf?Xf.prototype:void 0,Zf=Jf?Jf.toString:void 0;function Qf(e){if(typeof e=="string")return e;if(eO(e))return Qw(e,Qf)+"";if(tO(e))return Zf?Zf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var rO=Qf,nO=rO;function aO(e){return e==null?"":nO(e)}var ed=aO,iO=ft,oO=Hs,sO=Jw,lO=ed;function cO(e,t){return iO(e)?e:oO(e,t)?[e]:sO(lO(e))}var td=cO,uO=nn;function fO(e){if(typeof e=="string"||uO(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Li=fO,dO=td,pO=Li;function hO(e,t){t=dO(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pO(t[r++])];return r&&r==n?e:void 0}var rl=hO,vO=rl;function mO(e,t,r){var n=e==null?void 0:vO(e,t);return n===void 0?r:n}var rd=mO;const wt=$e(rd);function yO(e){return e==null}var gO=yO;const fe=$e(gO);var bO=Jt,xO=ft,wO=Zt,OO="[object String]";function SO(e){return typeof e=="string"||!xO(e)&&wO(e)&&bO(e)==OO}var TO=SO;const Er=$e(TO);var nl={exports:{}},we={};/**
161
161
  * @license React
162
162
  * react-is.production.min.js
163
163
  *
@@ -165,7 +165,7 @@ React keys must be passed directly to JSX without using spread:
165
165
  *
166
166
  * This source code is licensed under the MIT license found in the
167
167
  * LICENSE file in the root directory of this source tree.
168
- */var nd;function TO(){if(nd)return we;nd=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var b=v.$$typeof;switch(b){case e:switch(v=v.type,v){case r:case a:case n:case u:case c:return v;default:switch(v=v&&v.$$typeof,v){case s:case o:case l:case d:case f:case i:return v;default:return b}}case t:return b}}}return we.ContextConsumer=o,we.ContextProvider=i,we.Element=e,we.ForwardRef=l,we.Fragment=r,we.Lazy=d,we.Memo=f,we.Portal=t,we.Profiler=a,we.StrictMode=n,we.Suspense=u,we.SuspenseList=c,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(v){return y(v)===o},we.isContextProvider=function(v){return y(v)===i},we.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},we.isForwardRef=function(v){return y(v)===l},we.isFragment=function(v){return y(v)===r},we.isLazy=function(v){return y(v)===d},we.isMemo=function(v){return y(v)===f},we.isPortal=function(v){return y(v)===t},we.isProfiler=function(v){return y(v)===a},we.isStrictMode=function(v){return y(v)===n},we.isSuspense=function(v){return y(v)===u},we.isSuspenseList=function(v){return y(v)===c},we.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===a||v===n||v===u||v===c||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===d||v.$$typeof===f||v.$$typeof===i||v.$$typeof===o||v.$$typeof===l||v.$$typeof===m||v.getModuleId!==void 0)},we.typeOf=y,we}var Oe={};/**
168
+ */var nd;function AO(){if(nd)return we;nd=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function g(v){if(typeof v=="object"&&v!==null){var x=v.$$typeof;switch(x){case e:switch(v=v.type,v){case r:case a:case n:case c:case u:return v;default:switch(v=v&&v.$$typeof,v){case s:case o:case l:case d:case f:case i:return v;default:return x}}case t:return x}}}return we.ContextConsumer=o,we.ContextProvider=i,we.Element=e,we.ForwardRef=l,we.Fragment=r,we.Lazy=d,we.Memo=f,we.Portal=t,we.Profiler=a,we.StrictMode=n,we.Suspense=c,we.SuspenseList=u,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(v){return g(v)===o},we.isContextProvider=function(v){return g(v)===i},we.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},we.isForwardRef=function(v){return g(v)===l},we.isFragment=function(v){return g(v)===r},we.isLazy=function(v){return g(v)===d},we.isMemo=function(v){return g(v)===f},we.isPortal=function(v){return g(v)===t},we.isProfiler=function(v){return g(v)===a},we.isStrictMode=function(v){return g(v)===n},we.isSuspense=function(v){return g(v)===c},we.isSuspenseList=function(v){return g(v)===u},we.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===a||v===n||v===c||v===u||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===d||v.$$typeof===f||v.$$typeof===i||v.$$typeof===o||v.$$typeof===l||v.$$typeof===m||v.getModuleId!==void 0)},we.typeOf=g,we}var Oe={};/**
169
169
  * @license React
170
170
  * react-is.development.js
171
171
  *
@@ -173,86 +173,86 @@ React keys must be passed directly to JSX without using spread:
173
173
  *
174
174
  * This source code is licensed under the MIT license found in the
175
175
  * LICENSE file in the root directory of this source tree.
176
- */var ad;function AO(){return ad||(ad=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=!1,y=!1,v=!1,b=!1,x=!1,w;w=Symbol.for("react.module.reference");function A(H){return!!(typeof H=="string"||typeof H=="function"||H===r||H===a||x||H===n||H===u||H===c||b||H===h||m||y||v||typeof H=="object"&&H!==null&&(H.$$typeof===d||H.$$typeof===f||H.$$typeof===i||H.$$typeof===o||H.$$typeof===l||H.$$typeof===w||H.getModuleId!==void 0))}function g(H){if(typeof H=="object"&&H!==null){var ue=H.$$typeof;switch(ue){case e:var ee=H.type;switch(ee){case r:case a:case n:case u:case c:return ee;default:var ve=ee&&ee.$$typeof;switch(ve){case s:case o:case l:case d:case f:case i:return ve;default:return ue}}case t:return ue}}}var O=o,S=i,j=e,E=l,M=r,_=d,P=f,I=t,C=a,D=n,k=u,B=c,U=!1,V=!1;function $(H){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R(H){return V||(V=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(H){return g(H)===o}function W(H){return g(H)===i}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function X(H){return g(H)===l}function Q(H){return g(H)===r}function ae(H){return g(H)===d}function te(H){return g(H)===f}function q(H){return g(H)===t}function Y(H){return g(H)===a}function Z(H){return g(H)===n}function L(H){return g(H)===u}function oe(H){return g(H)===c}Oe.ContextConsumer=O,Oe.ContextProvider=S,Oe.Element=j,Oe.ForwardRef=E,Oe.Fragment=M,Oe.Lazy=_,Oe.Memo=P,Oe.Portal=I,Oe.Profiler=C,Oe.StrictMode=D,Oe.Suspense=k,Oe.SuspenseList=B,Oe.isAsyncMode=$,Oe.isConcurrentMode=R,Oe.isContextConsumer=F,Oe.isContextProvider=W,Oe.isElement=G,Oe.isForwardRef=X,Oe.isFragment=Q,Oe.isLazy=ae,Oe.isMemo=te,Oe.isPortal=q,Oe.isProfiler=Y,Oe.isStrictMode=Z,Oe.isSuspense=L,Oe.isSuspenseList=oe,Oe.isValidElementType=A,Oe.typeOf=g}()),Oe}process.env.NODE_ENV==="production"?nl.exports=TO():nl.exports=AO();var PO=nl.exports,jO=Jt,_O=Zt,EO="[object Number]";function CO(e){return typeof e=="number"||_O(e)&&jO(e)==EO}var id=CO;const $O=$e(id);var kO=id;function MO(e){return kO(e)&&e!=+e}var NO=MO;const un=$e(NO);var $t=function(t){return t===0?0:t>0?1:-1},Cr=function(t){return Er(t)&&t.indexOf("%")===t.length-1},J=function(t){return $O(t)&&!un(t)},DO=function(t){return fe(t)},Xe=function(t){return J(t)||Er(t)},IO=0,$r=function(t){var r=++IO;return"".concat(t||"").concat(r)},kr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!J(t)&&!Er(t))return n;var i;if(Cr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return un(i)&&(i=n),a&&i>r&&(i=r),i},hr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},LO=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},ze=function(t,r){return J(t)&&J(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ri(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wt(n,t))===r})}var RO=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,o=0,s=1/0,l=-1/0,u=0,c=0,f=0;f<r;f++)u=t[f].cx||0,c=t[f].cy||0,n+=u,a+=c,i+=u*c,o+=u*u,s=Math.min(s,u),l=Math.max(l,u);var d=r*o!==n*n?(r*i-n*a)/(r*o-n*n):0;return{xmin:s,xmax:l,a:d,b:(a-d*n)/r}},BO=function(t,r){return J(t)&&J(r)?t-r:Er(t)&&Er(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function cn(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function al(e){"@babel/helpers - typeof";return al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(e)}var FO=["viewBox","children"],WO=["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"],od=["points","pathLength"],il={svg:FO,polygon:od,polyline:od},ol=["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"],Bi=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(T.isValidElement(t)&&(n=t.props),!an(n))return null;var a={};return Object.keys(n).forEach(function(i){ol.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},UO=function(t,r,n){return function(a){return t(r,n,a),null}},ma=function(t,r,n){if(!an(t)||al(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];ol.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=UO(o,r,n))}),a},zO=["children"],VO=["children"];function sd(e,t){if(e==null)return{};var r=GO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function GO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sl(e){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}var ld={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"},Qt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},ud=null,ll=null,ul=function e(t){if(t===ud&&Array.isArray(ll))return ll;var r=[];return T.Children.forEach(t,function(n){fe(n)||(PO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),ll=r,ud=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Qt(a)}):n=[Qt(t)],ul(e).forEach(function(a){var i=wt(a,"type.displayName")||wt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function mt(e,t){var r=dt(e,t);return r&&r[0]}var cd=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!J(n)||n<=0||!J(a)||a<=0)},qO=["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"],HO=function(t){return t&&t.type&&Er(t.type)&&qO.indexOf(t.type)>=0},fd=function(t){return t&&sl(t)==="object"&&"clipDot"in t},KO=function(t,r,n,a){var i,o=(i=il==null?void 0:il[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!pe(t)&&(a&&o.includes(r)||WO.includes(r))||n&&ol.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(T.isValidElement(t)&&(a=t.props),!an(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;KO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},cl=function e(t,r){if(t===r)return!0;var n=T.Children.count(t);if(n!==T.Children.count(r))return!1;if(n===0)return!0;if(n===1)return dd(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!dd(i,o))return!1}return!0},dd=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=sd(n,zO),o=r.props||{},s=o.children,l=sd(o,VO);return a&&s?cn(i,l)&&cl(a,s):!a&&!s?cn(i,l):!1}return!1},pd=function(t,r){var n=[],a={};return ul(t).forEach(function(i,o){if(HO(i))n.push(i);else if(i){var s=Qt(i.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!a[s])){var f=u(i,s,o);n.push(f),a[s]=!0}}}),n},YO=function(t){var r=t&&t.type;return r&&ld[r]?ld[r]:null},XO=function(t,r){return ul(r).indexOf(t)},JO=["children","width","height","viewBox","className","style","title","desc"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fl.apply(this,arguments)}function ZO(e,t){if(e==null)return{};var r=QO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dl(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,u=ZO(e,JO),c=a||{width:r,height:n,x:0,y:0},f=me("recharts-surface",i);return T.createElement("svg",fl({},de(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),T.createElement("title",null,s),T.createElement("desc",null,l),t)}var eS=["children","className"];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(this,arguments)}function tS(e,t){if(e==null)return{};var r=rS(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rS(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var xe=T.forwardRef(function(e,t){var r=e.children,n=e.className,a=tS(e,eS),i=me("recharts-layer",n);return T.createElement("g",pl({className:i},de(a,!0),{ref:t}),r)}),nS=process.env.NODE_ENV!=="production",er=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(nS&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}};function aS(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var iS=aS,oS=iS;function sS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:oS(e,t,r)}var lS=sS,uS="\\ud800-\\udfff",cS="\\u0300-\\u036f",fS="\\ufe20-\\ufe2f",dS="\\u20d0-\\u20ff",pS=cS+fS+dS,hS="\\ufe0e\\ufe0f",vS="\\u200d",mS=RegExp("["+vS+uS+pS+hS+"]");function yS(e){return mS.test(e)}var hd=yS;function gS(e){return e.split("")}var bS=gS,vd="\\ud800-\\udfff",xS="\\u0300-\\u036f",wS="\\ufe20-\\ufe2f",OS="\\u20d0-\\u20ff",SS=xS+wS+OS,TS="\\ufe0e\\ufe0f",AS="["+vd+"]",hl="["+SS+"]",vl="\\ud83c[\\udffb-\\udfff]",PS="(?:"+hl+"|"+vl+")",md="[^"+vd+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",gd="[\\ud800-\\udbff][\\udc00-\\udfff]",jS="\\u200d",bd=PS+"?",xd="["+TS+"]?",_S="(?:"+jS+"(?:"+[md,yd,gd].join("|")+")"+xd+bd+")*",ES=xd+bd+_S,CS="(?:"+[md+hl+"?",hl,yd,gd,AS].join("|")+")",$S=RegExp(vl+"(?="+vl+")|"+CS+ES,"g");function kS(e){return e.match($S)||[]}var MS=kS,NS=bS,DS=hd,IS=MS;function LS(e){return DS(e)?IS(e):NS(e)}var RS=LS,BS=lS,FS=hd,WS=RS,US=ed;function zS(e){return function(t){t=US(t);var r=FS(t)?WS(t):void 0,n=r?r[0]:t.charAt(0),a=r?BS(r,1).join(""):t.slice(1);return n[e]()+a}}var VS=zS,GS=VS,qS=GS("toUpperCase"),HS=qS;const Fi=$e(HS);function ke(e){return function(){return e}}const wd=Math.cos,Wi=Math.sin,kt=Math.sqrt,Ui=Math.PI,zi=2*Ui,ml=Math.PI,yl=2*ml,Mr=1e-6,KS=yl-Mr;function Od(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function YS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Od;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class XS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Od:YS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,u=a-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Mr)if(!(Math.abs(f*l-u*c)>Mr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=a-s,y=l*l+u*u,v=h*h+m*m,b=Math.sqrt(y),x=Math.sqrt(d),w=i*Math.tan((ml-Math.acos((y+d-v)/(2*b*x)))/2),A=w/x,g=w/b;Math.abs(A-1)>Mr&&this._append`L${t+A*c},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*h>c*m)},${this._x1=t+g*l},${this._y1=r+g*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),u=t+s,c=r+l,f=1^o,d=o?a-i:i-a;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Mr||Math.abs(this._y1-c)>Mr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%yl+yl),d>KS?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>Mr&&this._append`A${n},${n},0,${+(d>=ml)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function gl(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new XS(t)}function bl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Sd(e){this._context=e}Sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new Sd(e)}function Td(e){return e[0]}function Ad(e){return e[1]}function Pd(e,t){var r=ke(!0),n=null,a=Vi,i=null,o=gl(s);e=typeof e=="function"?e:e===void 0?Td:ke(e),t=typeof t=="function"?t:t===void 0?Ad:ke(t);function s(l){var u,c=(l=bl(l)).length,f,d=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(f,u,l),+t(f,u,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ke(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ke(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ke(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function Gi(e,t,r){var n=null,a=ke(!0),i=null,o=Vi,s=null,l=gl(u);e=typeof e=="function"?e:e===void 0?Td:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Ad:ke(+r);function u(f){var d,h,m,y=(f=bl(f)).length,v,b=!1,x,w=new Array(y),A=new Array(y);for(i==null&&(s=o(x=l())),d=0;d<=y;++d){if(!(d<y&&a(v=f[d],d,f))===b)if(b=!b)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(w[m],A[m]);s.lineEnd(),s.areaEnd()}b&&(w[d]=+e(v,d,f),A[d]=+t(v,d,f),s.point(n?+n(v,d,f):w[d],r?+r(v,d,f):A[d]))}if(x)return s=null,x+""||null}function c(){return Pd().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ke(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ke(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:ke(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),u):i},u}class jd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function JS(e){return new jd(e,!0)}function ZS(e){return new jd(e,!1)}const xl={draw(e,t){const r=kt(t/Ui);e.moveTo(r,0),e.arc(0,0,r,0,zi)}},QS={draw(e,t){const r=kt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},_d=kt(1/3),eT=_d*2,tT={draw(e,t){const r=kt(t/eT),n=r*_d;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},rT={draw(e,t){const r=kt(t),n=-r/2;e.rect(n,n,r,r)}},nT=.8908130915292852,Ed=Wi(Ui/10)/Wi(7*Ui/10),aT=Wi(zi/10)*Ed,iT=-wd(zi/10)*Ed,oT={draw(e,t){const r=kt(t*nT),n=aT*r,a=iT*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zi*i/5,s=wd(o),l=Wi(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},wl=kt(3),sT={draw(e,t){const r=-kt(t/(wl*3));e.moveTo(0,r*2),e.lineTo(-wl*r,-r),e.lineTo(wl*r,-r),e.closePath()}},Ot=-.5,St=kt(3)/2,Ol=1/kt(12),lT=(Ol/2+1)*3,uT={draw(e,t){const r=kt(t/lT),n=r/2,a=r*Ol,i=n,o=r*Ol+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Ot*n-St*a,St*n+Ot*a),e.lineTo(Ot*i-St*o,St*i+Ot*o),e.lineTo(Ot*s-St*l,St*s+Ot*l),e.lineTo(Ot*n+St*a,Ot*a-St*n),e.lineTo(Ot*i+St*o,Ot*o-St*i),e.lineTo(Ot*s+St*l,Ot*l-St*s),e.closePath()}};function cT(e,t){let r=null,n=gl(a);e=typeof e=="function"?e:ke(e||xl),t=typeof t=="function"?t:ke(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:ke(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function qi(){}function Hi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Cd(e){this._context=e}Cd.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:Hi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fT(e){return new Cd(e)}function $d(e){this._context=e}$d.prototype={areaStart:qi,areaEnd:qi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dT(e){return new $d(e)}function kd(e){this._context=e}kd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Hi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pT(e){return new kd(e)}function Md(e){this._context=e}Md.prototype={areaStart:qi,areaEnd:qi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function hT(e){return new Md(e)}function Nd(e){return e<0?-1:1}function Dd(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Nd(i)+Nd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Id(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Sl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Ki(e){this._context=e}Ki.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:Sl(this,this._t0,Id(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Sl(this,Id(this,r=Dd(this,e,t)),r);break;default:Sl(this,this._t0,r=Dd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ld(e){this._context=new Rd(e)}(Ld.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function Rd(e){this._context=e}Rd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function vT(e){return new Ki(e)}function mT(e){return new Ld(e)}function Bd(e){this._context=e}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Fd(e),a=Fd(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Fd(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function yT(e){return new Bd(e)}function Yi(e,t){this._context=e,this._t=t}Yi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function gT(e){return new Yi(e,.5)}function bT(e){return new Yi(e,0)}function xT(e){return new Yi(e,1)}function fn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Tl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function wT(e,t){return e[t]}function OT(e){const t=[];return t.key=e,t}function ST(){var e=ke([]),t=Tl,r=fn,n=wT;function a(i){var o=Array.from(e.apply(this,arguments),OT),s,l=o.length,u=-1,c;for(const f of i)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,i)]).data=f;for(s=0,c=bl(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:ke(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Tl:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??fn,a):r},a}function TT(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}fn(e,t)}}function AT(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}fn(e,t)}}function PT(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,m=0;m<s;++m){var y=e[t[m]],v=y[n][1]||0,b=y[n-1][1]||0;h+=v-b}l+=f,u+=h*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,fn(e,t)}}function ya(e){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ya(e)}var jT=["type","size","sizeType"];function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Al.apply(this,arguments)}function Wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ud(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(r),!0).forEach(function(n){_T(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _T(e,t,r){return t=ET(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ET(e){var t=CT(e,"string");return ya(t)=="symbol"?t:t+""}function CT(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $T(e,t){if(e==null)return{};var r=kT(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kT(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var zd={symbolCircle:xl,symbolCross:QS,symbolDiamond:tT,symbolSquare:rT,symbolStar:oT,symbolTriangle:sT,symbolWye:uT},MT=Math.PI/180,NT=function(t){var r="symbol".concat(Fi(t));return zd[r]||xl},DT=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*MT;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},IT=function(t,r){zd["symbol".concat(Fi(t))]=r},Xi=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=$T(t,jT),u=Ud(Ud({},l),{},{type:n,size:i,sizeType:s}),c=function(){var v=NT(n),b=cT().type(v).size(DT(i,s,n));return b()},f=u.className,d=u.cx,h=u.cy,m=de(u,!0);return d===+d&&h===+h&&i===+i?T.createElement("path",Al({},m,{className:me("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};Xi.registerSymbol=IT;function dn(e){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dn(e)}function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pl.apply(this,arguments)}function Vd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vd(Object(r),!0).forEach(function(n){ga(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qd(n.key),n)}}function FT(e,t,r){return t&&BT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WT(e,t,r){return t=Ji(t),UT(e,Gd()?Reflect.construct(t,r||[],Ji(e).constructor):t.apply(e,r))}function UT(e,t){if(t&&(dn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zT(e)}function zT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gd=function(){return!!e})()}function Ji(e){return Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ji(e)}function VT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jl(e,t)}function jl(e,t){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},jl(e,t)}function ga(e,t,r){return t=qd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qd(e){var t=GT(e,"string");return dn(t)=="symbol"?t:t+""}function GT(e,t){if(dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Tt=32,_l=function(e){function t(){return RT(this,t),WT(this,t,arguments)}return VT(t,e),FT(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Tt/2,o=Tt/6,s=Tt/3,l=n.inactive?a:n.color;if(n.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Tt,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
176
+ */var ad;function PO(){return ad||(ad=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=!1,g=!1,v=!1,x=!1,b=!1,w;w=Symbol.for("react.module.reference");function A(K){return!!(typeof K=="string"||typeof K=="function"||K===r||K===a||b||K===n||K===c||K===u||x||K===h||m||g||v||typeof K=="object"&&K!==null&&(K.$$typeof===d||K.$$typeof===f||K.$$typeof===i||K.$$typeof===o||K.$$typeof===l||K.$$typeof===w||K.getModuleId!==void 0))}function y(K){if(typeof K=="object"&&K!==null){var ce=K.$$typeof;switch(ce){case e:var ee=K.type;switch(ee){case r:case a:case n:case c:case u:return ee;default:var ve=ee&&ee.$$typeof;switch(ve){case s:case o:case l:case d:case f:case i:return ve;default:return ce}}case t:return ce}}}var O=o,S=i,P=e,$=l,N=r,j=d,C=f,k=t,_=a,D=n,M=c,B=u,U=!1,V=!1;function E(K){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R(K){return V||(V=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(K){return y(K)===o}function W(K){return y(K)===i}function G(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function X(K){return y(K)===l}function Q(K){return y(K)===r}function ae(K){return y(K)===d}function te(K){return y(K)===f}function q(K){return y(K)===t}function Y(K){return y(K)===a}function Z(K){return y(K)===n}function L(K){return y(K)===c}function oe(K){return y(K)===u}Oe.ContextConsumer=O,Oe.ContextProvider=S,Oe.Element=P,Oe.ForwardRef=$,Oe.Fragment=N,Oe.Lazy=j,Oe.Memo=C,Oe.Portal=k,Oe.Profiler=_,Oe.StrictMode=D,Oe.Suspense=M,Oe.SuspenseList=B,Oe.isAsyncMode=E,Oe.isConcurrentMode=R,Oe.isContextConsumer=F,Oe.isContextProvider=W,Oe.isElement=G,Oe.isForwardRef=X,Oe.isFragment=Q,Oe.isLazy=ae,Oe.isMemo=te,Oe.isPortal=q,Oe.isProfiler=Y,Oe.isStrictMode=Z,Oe.isSuspense=L,Oe.isSuspenseList=oe,Oe.isValidElementType=A,Oe.typeOf=y}()),Oe}process.env.NODE_ENV==="production"?nl.exports=AO():nl.exports=PO();var jO=nl.exports,_O=Jt,EO=Zt,CO="[object Number]";function $O(e){return typeof e=="number"||EO(e)&&_O(e)==CO}var id=$O;const kO=$e(id);var MO=id;function NO(e){return MO(e)&&e!=+e}var DO=NO;const cn=$e(DO);var $t=function(t){return t===0?0:t>0?1:-1},Cr=function(t){return Er(t)&&t.indexOf("%")===t.length-1},J=function(t){return kO(t)&&!cn(t)},IO=function(t){return fe(t)},Xe=function(t){return J(t)||Er(t)},LO=0,$r=function(t){var r=++LO;return"".concat(t||"").concat(r)},kr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!J(t)&&!Er(t))return n;var i;if(Cr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return cn(i)&&(i=n),a&&i>r&&(i=r),i},hr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},RO=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},ze=function(t,r){return J(t)&&J(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ri(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wt(n,t))===r})}var BO=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,o=0,s=1/0,l=-1/0,c=0,u=0,f=0;f<r;f++)c=t[f].cx||0,u=t[f].cy||0,n+=c,a+=u,i+=c*u,o+=c*c,s=Math.min(s,c),l=Math.max(l,c);var d=r*o!==n*n?(r*i-n*a)/(r*o-n*n):0;return{xmin:s,xmax:l,a:d,b:(a-d*n)/r}},FO=function(t,r){return J(t)&&J(r)?t-r:Er(t)&&Er(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function un(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function al(e){"@babel/helpers - typeof";return al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(e)}var WO=["viewBox","children"],UO=["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"],od=["points","pathLength"],il={svg:WO,polygon:od,polyline:od},ol=["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"],Bi=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(T.isValidElement(t)&&(n=t.props),!an(n))return null;var a={};return Object.keys(n).forEach(function(i){ol.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},zO=function(t,r,n){return function(a){return t(r,n,a),null}},ma=function(t,r,n){if(!an(t)||al(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];ol.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=zO(o,r,n))}),a},VO=["children"],GO=["children"];function sd(e,t){if(e==null)return{};var r=qO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sl(e){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}var ld={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"},Qt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},cd=null,ll=null,cl=function e(t){if(t===cd&&Array.isArray(ll))return ll;var r=[];return T.Children.forEach(t,function(n){fe(n)||(jO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),ll=r,cd=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Qt(a)}):n=[Qt(t)],cl(e).forEach(function(a){var i=wt(a,"type.displayName")||wt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function mt(e,t){var r=dt(e,t);return r&&r[0]}var ud=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!J(n)||n<=0||!J(a)||a<=0)},KO=["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"],HO=function(t){return t&&t.type&&Er(t.type)&&KO.indexOf(t.type)>=0},fd=function(t){return t&&sl(t)==="object"&&"clipDot"in t},YO=function(t,r,n,a){var i,o=(i=il==null?void 0:il[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!pe(t)&&(a&&o.includes(r)||UO.includes(r))||n&&ol.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(T.isValidElement(t)&&(a=t.props),!an(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;YO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},ul=function e(t,r){if(t===r)return!0;var n=T.Children.count(t);if(n!==T.Children.count(r))return!1;if(n===0)return!0;if(n===1)return dd(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!dd(i,o))return!1}return!0},dd=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=sd(n,VO),o=r.props||{},s=o.children,l=sd(o,GO);return a&&s?un(i,l)&&ul(a,s):!a&&!s?un(i,l):!1}return!1},pd=function(t,r){var n=[],a={};return cl(t).forEach(function(i,o){if(HO(i))n.push(i);else if(i){var s=Qt(i.type),l=r[s]||{},c=l.handler,u=l.once;if(c&&(!u||!a[s])){var f=c(i,s,o);n.push(f),a[s]=!0}}}),n},XO=function(t){var r=t&&t.type;return r&&ld[r]?ld[r]:null},JO=function(t,r){return cl(r).indexOf(t)},ZO=["children","width","height","viewBox","className","style","title","desc"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fl.apply(this,arguments)}function QO(e,t){if(e==null)return{};var r=eS(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eS(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dl(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,c=QO(e,ZO),u=a||{width:r,height:n,x:0,y:0},f=me("recharts-surface",i);return T.createElement("svg",fl({},de(c,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),T.createElement("title",null,s),T.createElement("desc",null,l),t)}var tS=["children","className"];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(this,arguments)}function rS(e,t){if(e==null)return{};var r=nS(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nS(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var xe=T.forwardRef(function(e,t){var r=e.children,n=e.className,a=rS(e,tS),i=me("recharts-layer",n);return T.createElement("g",pl({className:i},de(a,!0),{ref:t}),r)}),aS=process.env.NODE_ENV!=="production",er=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(aS&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}};function iS(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var oS=iS,sS=oS;function lS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:sS(e,t,r)}var cS=lS,uS="\\ud800-\\udfff",fS="\\u0300-\\u036f",dS="\\ufe20-\\ufe2f",pS="\\u20d0-\\u20ff",hS=fS+dS+pS,vS="\\ufe0e\\ufe0f",mS="\\u200d",yS=RegExp("["+mS+uS+hS+vS+"]");function gS(e){return yS.test(e)}var hd=gS;function bS(e){return e.split("")}var xS=bS,vd="\\ud800-\\udfff",wS="\\u0300-\\u036f",OS="\\ufe20-\\ufe2f",SS="\\u20d0-\\u20ff",TS=wS+OS+SS,AS="\\ufe0e\\ufe0f",PS="["+vd+"]",hl="["+TS+"]",vl="\\ud83c[\\udffb-\\udfff]",jS="(?:"+hl+"|"+vl+")",md="[^"+vd+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",gd="[\\ud800-\\udbff][\\udc00-\\udfff]",_S="\\u200d",bd=jS+"?",xd="["+AS+"]?",ES="(?:"+_S+"(?:"+[md,yd,gd].join("|")+")"+xd+bd+")*",CS=xd+bd+ES,$S="(?:"+[md+hl+"?",hl,yd,gd,PS].join("|")+")",kS=RegExp(vl+"(?="+vl+")|"+$S+CS,"g");function MS(e){return e.match(kS)||[]}var NS=MS,DS=xS,IS=hd,LS=NS;function RS(e){return IS(e)?LS(e):DS(e)}var BS=RS,FS=cS,WS=hd,US=BS,zS=ed;function VS(e){return function(t){t=zS(t);var r=WS(t)?US(t):void 0,n=r?r[0]:t.charAt(0),a=r?FS(r,1).join(""):t.slice(1);return n[e]()+a}}var GS=VS,qS=GS,KS=qS("toUpperCase"),HS=KS;const Fi=$e(HS);function ke(e){return function(){return e}}const wd=Math.cos,Wi=Math.sin,kt=Math.sqrt,Ui=Math.PI,zi=2*Ui,ml=Math.PI,yl=2*ml,Mr=1e-6,YS=yl-Mr;function Od(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function XS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Od;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class JS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Od:XS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,c=a-r,u=o-t,f=s-r,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Mr)if(!(Math.abs(f*l-c*u)>Mr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=a-s,g=l*l+c*c,v=h*h+m*m,x=Math.sqrt(g),b=Math.sqrt(d),w=i*Math.tan((ml-Math.acos((g+d-v)/(2*x*b)))/2),A=w/b,y=w/x;Math.abs(A-1)>Mr&&this._append`L${t+A*u},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*h>u*m)},${this._x1=t+y*l},${this._y1=r+y*c}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),c=t+s,u=r+l,f=1^o,d=o?a-i:i-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Mr||Math.abs(this._y1-u)>Mr)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%yl+yl),d>YS?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=u}`:d>Mr&&this._append`A${n},${n},0,${+(d>=ml)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function gl(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new JS(t)}function bl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Sd(e){this._context=e}Sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new Sd(e)}function Td(e){return e[0]}function Ad(e){return e[1]}function Pd(e,t){var r=ke(!0),n=null,a=Vi,i=null,o=gl(s);e=typeof e=="function"?e:e===void 0?Td:ke(e),t=typeof t=="function"?t:t===void 0?Ad:ke(t);function s(l){var c,u=(l=bl(l)).length,f,d=!1,h;for(n==null&&(i=a(h=o())),c=0;c<=u;++c)!(c<u&&r(f=l[c],c,l))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(f,c,l),+t(f,c,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ke(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ke(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ke(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function Gi(e,t,r){var n=null,a=ke(!0),i=null,o=Vi,s=null,l=gl(c);e=typeof e=="function"?e:e===void 0?Td:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Ad:ke(+r);function c(f){var d,h,m,g=(f=bl(f)).length,v,x=!1,b,w=new Array(g),A=new Array(g);for(i==null&&(s=o(b=l())),d=0;d<=g;++d){if(!(d<g&&a(v=f[d],d,f))===x)if(x=!x)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(w[m],A[m]);s.lineEnd(),s.areaEnd()}x&&(w[d]=+e(v,d,f),A[d]=+t(v,d,f),s.point(n?+n(v,d,f):w[d],r?+r(v,d,f):A[d]))}if(b)return s=null,b+""||null}function u(){return Pd().defined(a).curve(o).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ke(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ke(+f),c):r},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(r)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(f){return arguments.length?(a=typeof f=="function"?f:ke(!!f),c):a},c.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),c):o},c.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),c):i},c}class jd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ZS(e){return new jd(e,!0)}function QS(e){return new jd(e,!1)}const xl={draw(e,t){const r=kt(t/Ui);e.moveTo(r,0),e.arc(0,0,r,0,zi)}},eT={draw(e,t){const r=kt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},_d=kt(1/3),tT=_d*2,rT={draw(e,t){const r=kt(t/tT),n=r*_d;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},nT={draw(e,t){const r=kt(t),n=-r/2;e.rect(n,n,r,r)}},aT=.8908130915292852,Ed=Wi(Ui/10)/Wi(7*Ui/10),iT=Wi(zi/10)*Ed,oT=-wd(zi/10)*Ed,sT={draw(e,t){const r=kt(t*aT),n=iT*r,a=oT*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zi*i/5,s=wd(o),l=Wi(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},wl=kt(3),lT={draw(e,t){const r=-kt(t/(wl*3));e.moveTo(0,r*2),e.lineTo(-wl*r,-r),e.lineTo(wl*r,-r),e.closePath()}},Ot=-.5,St=kt(3)/2,Ol=1/kt(12),cT=(Ol/2+1)*3,uT={draw(e,t){const r=kt(t/cT),n=r/2,a=r*Ol,i=n,o=r*Ol+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Ot*n-St*a,St*n+Ot*a),e.lineTo(Ot*i-St*o,St*i+Ot*o),e.lineTo(Ot*s-St*l,St*s+Ot*l),e.lineTo(Ot*n+St*a,Ot*a-St*n),e.lineTo(Ot*i+St*o,Ot*o-St*i),e.lineTo(Ot*s+St*l,Ot*l-St*s),e.closePath()}};function fT(e,t){let r=null,n=gl(a);e=typeof e=="function"?e:ke(e||xl),t=typeof t=="function"?t:ke(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:ke(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function qi(){}function Ki(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Cd(e){this._context=e}Cd.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:Ki(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ki(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dT(e){return new Cd(e)}function $d(e){this._context=e}$d.prototype={areaStart:qi,areaEnd:qi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ki(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pT(e){return new $d(e)}function kd(e){this._context=e}kd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ki(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hT(e){return new kd(e)}function Md(e){this._context=e}Md.prototype={areaStart:qi,areaEnd:qi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function vT(e){return new Md(e)}function Nd(e){return e<0?-1:1}function Dd(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Nd(i)+Nd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Id(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Sl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Hi(e){this._context=e}Hi.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:Sl(this,this._t0,Id(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Sl(this,Id(this,r=Dd(this,e,t)),r);break;default:Sl(this,this._t0,r=Dd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ld(e){this._context=new Rd(e)}(Ld.prototype=Object.create(Hi.prototype)).point=function(e,t){Hi.prototype.point.call(this,t,e)};function Rd(e){this._context=e}Rd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function mT(e){return new Hi(e)}function yT(e){return new Ld(e)}function Bd(e){this._context=e}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Fd(e),a=Fd(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Fd(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function gT(e){return new Bd(e)}function Yi(e,t){this._context=e,this._t=t}Yi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function bT(e){return new Yi(e,.5)}function xT(e){return new Yi(e,0)}function wT(e){return new Yi(e,1)}function fn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Tl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function OT(e,t){return e[t]}function ST(e){const t=[];return t.key=e,t}function TT(){var e=ke([]),t=Tl,r=fn,n=OT;function a(i){var o=Array.from(e.apply(this,arguments),ST),s,l=o.length,c=-1,u;for(const f of i)for(s=0,++c;s<l;++s)(o[s][c]=[0,+n(f,o[s].key,c,i)]).data=f;for(s=0,u=bl(t(o));s<l;++s)o[u[s]].index=s;return r(o,u),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:ke(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Tl:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??fn,a):r},a}function AT(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}fn(e,t)}}function PT(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}fn(e,t)}}function jT(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],f=u[n][1]||0,d=u[n-1][1]||0,h=(f-d)/2,m=0;m<s;++m){var g=e[t[m]],v=g[n][1]||0,x=g[n-1][1]||0;h+=v-x}l+=f,c+=h*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,fn(e,t)}}function ya(e){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ya(e)}var _T=["type","size","sizeType"];function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Al.apply(this,arguments)}function Wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ud(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(r),!0).forEach(function(n){ET(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ET(e,t,r){return t=CT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CT(e){var t=$T(e,"string");return ya(t)=="symbol"?t:t+""}function $T(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kT(e,t){if(e==null)return{};var r=MT(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MT(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var zd={symbolCircle:xl,symbolCross:eT,symbolDiamond:rT,symbolSquare:nT,symbolStar:sT,symbolTriangle:lT,symbolWye:uT},NT=Math.PI/180,DT=function(t){var r="symbol".concat(Fi(t));return zd[r]||xl},IT=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*NT;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},LT=function(t,r){zd["symbol".concat(Fi(t))]=r},Xi=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=kT(t,_T),c=Ud(Ud({},l),{},{type:n,size:i,sizeType:s}),u=function(){var v=DT(n),x=fT().type(v).size(IT(i,s,n));return x()},f=c.className,d=c.cx,h=c.cy,m=de(c,!0);return d===+d&&h===+h&&i===+i?T.createElement("path",Al({},m,{className:me("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:u()})):null};Xi.registerSymbol=LT;function dn(e){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dn(e)}function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pl.apply(this,arguments)}function Vd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function RT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vd(Object(r),!0).forEach(function(n){ga(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qd(n.key),n)}}function WT(e,t,r){return t&&FT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UT(e,t,r){return t=Ji(t),zT(e,Gd()?Reflect.construct(t,r||[],Ji(e).constructor):t.apply(e,r))}function zT(e,t){if(t&&(dn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VT(e)}function VT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gd=function(){return!!e})()}function Ji(e){return Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ji(e)}function GT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jl(e,t)}function jl(e,t){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},jl(e,t)}function ga(e,t,r){return t=qd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qd(e){var t=qT(e,"string");return dn(t)=="symbol"?t:t+""}function qT(e,t){if(dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Tt=32,_l=function(e){function t(){return BT(this,t),UT(this,t,arguments)}return GT(t,e),WT(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Tt/2,o=Tt/6,s=Tt/3,l=n.inactive?a:n.color;if(n.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Tt,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
177
177
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
178
178
  H`).concat(Tt,"M").concat(2*s,",").concat(i,`
179
- A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return T.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Tt/8,"h").concat(Tt,"v").concat(Tt*3/4,"h").concat(-Tt,"z"),className:"recharts-legend-icon"});if(T.isValidElement(n.legendIcon)){var u=LT({},n);return delete u.legendIcon,T.cloneElement(n.legendIcon,u)}return T.createElement(Xi,{fill:l,cx:i,cy:i,size:Tt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,u=a.inactiveColor,c={x:0,y:0,width:Tt,height:Tt},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,m){var y=h.formatter||l,v=me(ga(ga({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",h.inactive));if(h.type==="none")return null;var b=pe(h.value)?null:h.value;er(!pe(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=h.inactive?u:h.color;return T.createElement("li",Pl({className:v,style:f,key:"legend-item-".concat(m)},ma(n.props,h,m)),T.createElement(dl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},y?y(b,h,m):b))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(T.PureComponent);ga(_l,"displayName","Legend"),ga(_l,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qT=Di;function HT(){this.__data__=new qT,this.size=0}var KT=HT;function YT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var XT=YT;function JT(e){return this.__data__.get(e)}var ZT=JT;function QT(e){return this.__data__.has(e)}var eA=QT,tA=Di,rA=Zs,nA=Qs,aA=200;function iA(e,t){var r=this.__data__;if(r instanceof tA){var n=r.__data__;if(!rA||n.length<aA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new nA(n)}return r.set(e,t),this.size=r.size,this}var oA=iA,sA=Di,lA=KT,uA=XT,cA=ZT,fA=eA,dA=oA;function pn(e){var t=this.__data__=new sA(e);this.size=t.size}pn.prototype.clear=lA,pn.prototype.delete=uA,pn.prototype.get=cA,pn.prototype.has=fA,pn.prototype.set=dA;var Hd=pn,pA="__lodash_hash_undefined__";function hA(e){return this.__data__.set(e,pA),this}var vA=hA;function mA(e){return this.__data__.has(e)}var yA=mA,gA=Qs,bA=vA,xA=yA;function Zi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new gA;++t<r;)this.add(e[t])}Zi.prototype.add=Zi.prototype.push=bA,Zi.prototype.has=xA;var Kd=Zi;function wA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Yd=wA;function OA(e,t){return e.has(t)}var Xd=OA,SA=Kd,TA=Yd,AA=Xd,PA=1,jA=2;function _A(e,t,r,n,a,i){var o=r&PA,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&jA?new SA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var m=e[f],y=t[f];if(n)var v=o?n(y,m,f,t,e,i):n(m,y,f,e,t,i);if(v!==void 0){if(v)continue;d=!1;break}if(h){if(!TA(t,function(b,x){if(!AA(h,x)&&(m===b||a(m,b,r,n,i)))return h.push(x)})){d=!1;break}}else if(!(m===y||a(m,y,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Jd=_A,EA=Ft,CA=EA.Uint8Array,$A=CA;function kA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var MA=kA;function NA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var El=NA,Zd=ha,Qd=$A,DA=Js,IA=Jd,LA=MA,RA=El,BA=1,FA=2,WA="[object Boolean]",UA="[object Date]",zA="[object Error]",VA="[object Map]",GA="[object Number]",qA="[object RegExp]",HA="[object Set]",KA="[object String]",YA="[object Symbol]",XA="[object ArrayBuffer]",JA="[object DataView]",ep=Zd?Zd.prototype:void 0,Cl=ep?ep.valueOf:void 0;function ZA(e,t,r,n,a,i,o){switch(r){case JA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case XA:return!(e.byteLength!=t.byteLength||!i(new Qd(e),new Qd(t)));case WA:case UA:case GA:return DA(+e,+t);case zA:return e.name==t.name&&e.message==t.message;case qA:case KA:return e==t+"";case VA:var s=LA;case HA:var l=n&BA;if(s||(s=RA),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=FA,o.set(e,t);var c=IA(s(e),s(t),n,a,i,o);return o.delete(e),c;case YA:if(Cl)return Cl.call(e)==Cl.call(t)}return!1}var QA=ZA;function e2(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var tp=e2,t2=tp,r2=ft;function n2(e,t,r){var n=t(e);return r2(e)?n:t2(n,r(e))}var a2=n2;function i2(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var o2=i2;function s2(){return[]}var l2=s2,u2=o2,c2=l2,f2=Object.prototype,d2=f2.propertyIsEnumerable,rp=Object.getOwnPropertySymbols,p2=rp?function(e){return e==null?[]:(e=Object(e),u2(rp(e),function(t){return d2.call(e,t)}))}:c2,h2=p2;function v2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var m2=v2,y2=Jt,g2=Zt,b2="[object Arguments]";function x2(e){return g2(e)&&y2(e)==b2}var w2=x2,np=w2,O2=Zt,ap=Object.prototype,S2=ap.hasOwnProperty,T2=ap.propertyIsEnumerable,A2=np(function(){return arguments}())?np:function(e){return O2(e)&&S2.call(e,"callee")&&!T2.call(e,"callee")},$l=A2,Qi={exports:{}};function P2(){return!1}var j2=P2;Qi.exports,function(e,t){var r=Ft,n=j2,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u}(Qi,Qi.exports);var ip=Qi.exports,_2=9007199254740991,E2=/^(?:0|[1-9]\d*)$/;function C2(e,t){var r=typeof e;return t=t??_2,!!t&&(r=="number"||r!="symbol"&&E2.test(e))&&e>-1&&e%1==0&&e<t}var kl=C2,$2=9007199254740991;function k2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$2}var Ml=k2,M2=Jt,N2=Ml,D2=Zt,I2="[object Arguments]",L2="[object Array]",R2="[object Boolean]",B2="[object Date]",F2="[object Error]",W2="[object Function]",U2="[object Map]",z2="[object Number]",V2="[object Object]",G2="[object RegExp]",q2="[object Set]",H2="[object String]",K2="[object WeakMap]",Y2="[object ArrayBuffer]",X2="[object DataView]",J2="[object Float32Array]",Z2="[object Float64Array]",Q2="[object Int8Array]",eP="[object Int16Array]",tP="[object Int32Array]",rP="[object Uint8Array]",nP="[object Uint8ClampedArray]",aP="[object Uint16Array]",iP="[object Uint32Array]",De={};De[J2]=De[Z2]=De[Q2]=De[eP]=De[tP]=De[rP]=De[nP]=De[aP]=De[iP]=!0,De[I2]=De[L2]=De[Y2]=De[R2]=De[X2]=De[B2]=De[F2]=De[W2]=De[U2]=De[z2]=De[V2]=De[G2]=De[q2]=De[H2]=De[K2]=!1;function oP(e){return D2(e)&&N2(e.length)&&!!De[M2(e)]}var sP=oP;function lP(e){return function(t){return e(t)}}var op=lP,eo={exports:{}};eo.exports,function(e,t){var r=Bf,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(eo,eo.exports);var uP=eo.exports,cP=sP,fP=op,sp=uP,lp=sp&&sp.isTypedArray,dP=lp?fP(lp):cP,up=dP,pP=m2,hP=$l,vP=ft,mP=ip,yP=kl,gP=up,bP=Object.prototype,xP=bP.hasOwnProperty;function wP(e,t){var r=vP(e),n=!r&&hP(e),a=!r&&!n&&mP(e),i=!r&&!n&&!a&&gP(e),o=r||n||a||i,s=o?pP(e.length,String):[],l=s.length;for(var u in e)(t||xP.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yP(u,l)))&&s.push(u);return s}var OP=wP,SP=Object.prototype;function TP(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||SP;return e===r}var AP=TP;function PP(e,t){return function(r){return e(t(r))}}var cp=PP,jP=cp,_P=jP(Object.keys,Object),EP=_P,CP=AP,$P=EP,kP=Object.prototype,MP=kP.hasOwnProperty;function NP(e){if(!CP(e))return $P(e);var t=[];for(var r in Object(e))MP.call(e,r)&&r!="constructor"&&t.push(r);return t}var DP=NP,IP=Ys,LP=Ml;function RP(e){return e!=null&&LP(e.length)&&!IP(e)}var ba=RP,BP=OP,FP=DP,WP=ba;function UP(e){return WP(e)?BP(e):FP(e)}var to=UP,zP=a2,VP=h2,GP=to;function qP(e){return zP(e,GP,VP)}var HP=qP,fp=HP,KP=1,YP=Object.prototype,XP=YP.hasOwnProperty;function JP(e,t,r,n,a,i){var o=r&KP,s=fp(e),l=s.length,u=fp(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:XP.call(t,d)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var y=!0;i.set(e,t),i.set(t,e);for(var v=o;++f<l;){d=s[f];var b=e[d],x=t[d];if(n)var w=o?n(x,b,d,t,e,i):n(b,x,d,e,t,i);if(!(w===void 0?b===x||a(b,x,r,n,i):w)){y=!1;break}v||(v=d=="constructor")}if(y&&!v){var A=e.constructor,g=t.constructor;A!=g&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof g=="function"&&g instanceof g)&&(y=!1)}return i.delete(e),i.delete(t),y}var ZP=JP,QP=_r,ej=Ft,tj=QP(ej,"DataView"),rj=tj,nj=_r,aj=Ft,ij=nj(aj,"Promise"),oj=ij,sj=_r,lj=Ft,uj=sj(lj,"Set"),dp=uj,cj=_r,fj=Ft,dj=cj(fj,"WeakMap"),pj=dj,Nl=rj,Dl=Zs,Il=oj,Ll=dp,Rl=pj,pp=Jt,hn=Gf,hp="[object Map]",hj="[object Object]",vp="[object Promise]",mp="[object Set]",yp="[object WeakMap]",gp="[object DataView]",vj=hn(Nl),mj=hn(Dl),yj=hn(Il),gj=hn(Ll),bj=hn(Rl),Nr=pp;(Nl&&Nr(new Nl(new ArrayBuffer(1)))!=gp||Dl&&Nr(new Dl)!=hp||Il&&Nr(Il.resolve())!=vp||Ll&&Nr(new Ll)!=mp||Rl&&Nr(new Rl)!=yp)&&(Nr=function(e){var t=pp(e),r=t==hj?e.constructor:void 0,n=r?hn(r):"";if(n)switch(n){case vj:return gp;case mj:return hp;case yj:return vp;case gj:return mp;case bj:return yp}return t});var xj=Nr,Bl=Hd,wj=Jd,Oj=QA,Sj=ZP,bp=xj,xp=ft,wp=ip,Tj=up,Aj=1,Op="[object Arguments]",Sp="[object Array]",ro="[object Object]",Pj=Object.prototype,Tp=Pj.hasOwnProperty;function jj(e,t,r,n,a,i){var o=xp(e),s=xp(t),l=o?Sp:bp(e),u=s?Sp:bp(t);l=l==Op?ro:l,u=u==Op?ro:u;var c=l==ro,f=u==ro,d=l==u;if(d&&wp(e)){if(!wp(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new Bl),o||Tj(e)?wj(e,t,r,n,a,i):Oj(e,t,l,r,n,a,i);if(!(r&Aj)){var h=c&&Tp.call(e,"__wrapped__"),m=f&&Tp.call(t,"__wrapped__");if(h||m){var y=h?e.value():e,v=m?t.value():t;return i||(i=new Bl),a(y,v,r,n,i)}}return d?(i||(i=new Bl),Sj(e,t,r,n,a,i)):!1}var _j=jj,Ej=_j,Ap=Zt;function Pp(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ap(e)&&!Ap(t)?e!==e&&t!==t:Ej(e,t,r,n,Pp,a)}var Fl=Pp,Cj=Hd,$j=Fl,kj=1,Mj=2;function Nj(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new Cj;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?$j(c,u,kj|Mj,n,f):d))return!1}}return!0}var Dj=Nj,Ij=pr;function Lj(e){return e===e&&!Ij(e)}var jp=Lj,Rj=jp,Bj=to;function Fj(e){for(var t=Bj(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Rj(a)]}return t}var Wj=Fj;function Uj(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var _p=Uj,zj=Dj,Vj=Wj,Gj=_p;function qj(e){var t=Vj(e);return t.length==1&&t[0][2]?Gj(t[0][0],t[0][1]):function(r){return r===e||zj(r,e,t)}}var Hj=qj;function Kj(e,t){return e!=null&&t in Object(e)}var Yj=Kj,Xj=td,Jj=$l,Zj=ft,Qj=kl,e_=Ml,t_=Li;function r_(e,t,r){t=Xj(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=t_(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&e_(a)&&Qj(o,a)&&(Zj(e)||Jj(e)))}var n_=r_,a_=Yj,i_=n_;function o_(e,t){return e!=null&&i_(e,t,a_)}var s_=o_,l_=Fl,u_=rd,c_=s_,f_=Ks,d_=jp,p_=_p,h_=Li,v_=1,m_=2;function y_(e,t){return f_(e)&&d_(t)?p_(h_(e),t):function(r){var n=u_(r,e);return n===void 0&&n===t?c_(r,e):l_(t,n,v_|m_)}}var g_=y_;function b_(e){return e}var vn=b_;function x_(e){return function(t){return t==null?void 0:t[e]}}var w_=x_,O_=rl;function S_(e){return function(t){return O_(t,e)}}var T_=S_,A_=w_,P_=T_,j_=Ks,__=Li;function E_(e){return j_(e)?A_(__(e)):P_(e)}var C_=E_,$_=Hj,k_=g_,M_=vn,N_=ft,D_=C_;function I_(e){return typeof e=="function"?e:e==null?M_:typeof e=="object"?N_(e)?k_(e[0],e[1]):$_(e):D_(e)}var vr=I_;function L_(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var Ep=L_;function R_(e){return e!==e}var B_=R_;function F_(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var W_=F_,U_=Ep,z_=B_,V_=W_;function G_(e,t,r){return t===t?V_(e,t,r):U_(e,z_,r)}var q_=G_,H_=q_;function K_(e,t){var r=e==null?0:e.length;return!!r&&H_(e,t,0)>-1}var Y_=K_;function X_(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var J_=X_;function Z_(){}var Q_=Z_,Wl=dp,eE=Q_,tE=El,rE=1/0,nE=Wl&&1/tE(new Wl([,-0]))[1]==rE?function(e){return new Wl(e)}:eE,aE=nE,iE=Kd,oE=Y_,sE=J_,lE=Xd,uE=aE,cE=El,fE=200;function dE(e,t,r){var n=-1,a=oE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=sE;else if(i>=fE){var u=t?null:uE(e);if(u)return cE(u);o=!1,a=lE,l=new iE}else l=t?[]:s;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(c)}else a(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var pE=dE,hE=vr,vE=pE;function mE(e,t){return e&&e.length?vE(e,hE(t)):[]}var yE=mE;const Cp=$e(yE);function $p(e,t,r){return t===!0?Cp(e,r):pe(t)?Cp(e,t):e}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mn(e)}var gE=["ref"];function kp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kp(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dp(n.key),n)}}function xE(e,t,r){return t&&Mp(e.prototype,t),r&&Mp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wE(e,t,r){return t=no(t),OE(e,Np()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function OE(e,t){if(t&&(mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SE(e)}function SE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Np(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Np=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function TE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ul(e,t)}function Ul(e,t){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ul(e,t)}function ao(e,t,r){return t=Dp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dp(e){var t=AE(e,"string");return mn(t)=="symbol"?t:t+""}function AE(e,t){if(mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function PE(e,t){if(e==null)return{};var r=jE(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jE(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _E(e){return e.value}function EE(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var r=PE(t,gE);return T.createElement(_l,r)}var Ip=1,yn=function(e){function t(){var r;bE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=wE(this,t,[].concat(a)),ao(r,"lastBoundingBox",{width:-1,height:-1}),r}return TE(t,e),xE(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Ip||Math.abs(a.height-this.lastBoundingBox.height)>Ip)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?tr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,u=a.chartWidth,c=a.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();f={left:((u||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();d={top:((c||0)-m.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return tr(tr({},f),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,c=a.payload,f=tr(tr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},EE(i,tr(tr({},this.props),{},{payload:$p(c,u,_E)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&J(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(T.PureComponent);ao(yn,"displayName","Legend"),ao(yn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Lp=ha,CE=$l,$E=ft,Rp=Lp?Lp.isConcatSpreadable:void 0;function kE(e){return $E(e)||CE(e)||!!(Rp&&e&&e[Rp])}var ME=kE,NE=tp,DE=ME;function Bp(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=DE),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Bp(s,t-1,r,n,a):NE(a,s):n||(a[a.length]=s)}return a}var Fp=Bp;function IE(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var LE=IE,RE=LE,BE=RE(),FE=BE,WE=FE,UE=to;function zE(e,t){return e&&WE(e,t,UE)}var Wp=zE,VE=ba;function GE(e,t){return function(r,n){if(r==null)return r;if(!VE(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var qE=GE,HE=Wp,KE=qE,YE=KE(HE),zl=YE,XE=zl,JE=ba;function ZE(e,t){var r=-1,n=JE(e)?Array(e.length):[];return XE(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Up=ZE;function QE(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var eC=QE,zp=nn;function tC(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=zp(e),o=t!==void 0,s=t===null,l=t===t,u=zp(t);if(!s&&!u&&!i&&e>t||i&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var rC=tC,nC=rC;function aC(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=nC(a[n],i[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var iC=aC,Vl=tl,oC=rl,sC=vr,lC=Up,uC=eC,cC=op,fC=iC,dC=vn,pC=ft;function hC(e,t,r){t.length?t=Vl(t,function(i){return pC(i)?function(o){return oC(o,i.length===1?i[0]:i)}:i}):t=[dC];var n=-1;t=Vl(t,cC(sC));var a=lC(e,function(i,o,s){var l=Vl(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return uC(a,function(i,o){return fC(i,o,r)})}var vC=hC;function mC(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var yC=mC,gC=yC,Vp=Math.max;function bC(e,t,r){return t=Vp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Vp(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),gC(e,this,s)}}var xC=bC;function wC(e){return function(){return e}}var OC=wC,SC=_r,TC=function(){try{var e=SC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Gp=TC,AC=OC,qp=Gp,PC=vn,jC=qp?function(e,t){return qp(e,"toString",{configurable:!0,enumerable:!1,value:AC(t),writable:!0})}:PC,_C=jC,EC=800,CC=16,$C=Date.now;function kC(e){var t=0,r=0;return function(){var n=$C(),a=CC-(n-r);if(r=n,a>0){if(++t>=EC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var MC=kC,NC=_C,DC=MC,IC=DC(NC),LC=IC,RC=vn,BC=xC,FC=LC;function WC(e,t){return FC(BC(e,t,RC),e+"")}var UC=WC,zC=Js,VC=ba,GC=kl,qC=pr;function HC(e,t,r){if(!qC(r))return!1;var n=typeof t;return(n=="number"?VC(r)&&GC(t,r.length):n=="string"&&t in r)?zC(r[t],e):!1}var io=HC,KC=Fp,YC=vC,XC=UC,Hp=io,JC=XC(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Hp(e,t[0],t[1])?t=[]:r>2&&Hp(t[0],t[1],t[2])&&(t=[t[0]]),YC(e,KC(t,1),[])}),ZC=JC;const Gl=$e(ZC);function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function ql(){return ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ql.apply(this,arguments)}function QC(e,t){return n$(e)||r$(e,t)||t$(e,t)||e$()}function e$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
180
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t$(e,t){if(e){if(typeof e=="string")return Kp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kp(e,t)}}function Kp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function n$(e){if(Array.isArray(e))return e}function Yp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yp(Object(r),!0).forEach(function(n){a$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a$(e,t,r){return t=i$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i$(e){var t=o$(e,"string");return xa(t)=="symbol"?t:t+""}function o$(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function s$(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var l$=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,d=t.itemSorter,h=t.wrapperClassName,m=t.labelClassName,y=t.label,v=t.labelFormatter,b=t.accessibilityLayer,x=b===void 0?!1:b,w=function(){if(c&&c.length){var P={padding:0,margin:0},I=(d?Gl(c,d):c).map(function(C,D){if(C.type==="none")return null;var k=Hl({display:"block",paddingTop:4,paddingBottom:4,color:C.color||"#000"},s),B=C.formatter||f||s$,U=C.value,V=C.name,$=U,R=V;if(B&&$!=null&&R!=null){var F=B(U,V,C,D,c);if(Array.isArray(F)){var W=QC(F,2);$=W[0],R=W[1]}else $=F}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:k},Xe(R)?T.createElement("span",{className:"recharts-tooltip-item-name"},R):null,Xe(R)?T.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,T.createElement("span",{className:"recharts-tooltip-item-value"},$),T.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:P},I)}return null},A=Hl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=Hl({margin:0},u),O=!fe(y),S=O?y:"",j=me("recharts-default-tooltip",h),E=me("recharts-tooltip-label",m);O&&v&&c!==void 0&&c!==null&&(S=v(y,c));var M=x?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",ql({className:j,style:A},M),T.createElement("p",{className:E,style:g},T.isValidElement(S)?S:"".concat(S)),w())};function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function oo(e,t,r){return t=u$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u$(e){var t=c$(e,"string");return wa(t)=="symbol"?t:t+""}function c$(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oa="recharts-tooltip-wrapper",f$={visibility:"hidden"};function d$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return me(Oa,oo(oo(oo(oo({},"".concat(Oa,"-right"),J(r)&&t&&J(t.x)&&r>=t.x),"".concat(Oa,"-left"),J(r)&&t&&J(t.x)&&r<t.x),"".concat(Oa,"-bottom"),J(n)&&t&&J(t.y)&&n>=t.y),"".concat(Oa,"-top"),J(n)&&t&&J(t.y)&&n<t.y))}function Xp(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(i&&J(i[n]))return i[n];var c=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?c:f;if(o[n]){var d=c,h=l[n];return d<h?Math.max(f,l[n]):Math.max(c,l[n])}var m=f+s,y=l[n]+u;return m>y?Math.max(c,l[n]):Math.max(f,l[n])}function p$(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function h$(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Xp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Xp({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=p$({translateX:c,translateY:f,useTranslate3d:s})):u=f$,{cssProperties:u,cssClasses:d$({translateX:c,translateY:f,coordinate:r})}}function gn(e){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(e)}function Jp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jp(Object(r),!0).forEach(function(n){Yl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eh(n.key),n)}}function y$(e,t,r){return t&&m$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g$(e,t,r){return t=so(t),b$(e,Qp()?Reflect.construct(t,r||[],so(e).constructor):t.apply(e,r))}function b$(e,t){if(t&&(gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x$(e)}function x$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qp=function(){return!!e})()}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}function w$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kl(e,t)}function Kl(e,t){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kl(e,t)}function Yl(e,t,r){return t=eh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eh(e){var t=O$(e,"string");return gn(t)=="symbol"?t:t+""}function O$(e,t){if(gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var th=1,S$=function(e){function t(){var r;v$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=g$(this,t,[].concat(a)),Yl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Yl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return w$(t,e),y$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>th||Math.abs(n.height-this.state.lastBoundingBox.height)>th)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.children,c=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,m=a.position,y=a.reverseDirection,v=a.useTranslate3d,b=a.viewBox,x=a.wrapperStyle,w=h$({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:m,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:b}),A=w.cssClasses,g=w.cssProperties,O=Zp(Zp({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return T.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(j){n.wrapperNode=j}},u)}}])}(T.PureComponent),T$=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},mr={isSsr:T$()};function bn(e){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(e)}function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){Jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ih(n.key),n)}}function j$(e,t,r){return t&&P$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _$(e,t,r){return t=lo(t),E$(e,ah()?Reflect.construct(t,r||[],lo(e).constructor):t.apply(e,r))}function E$(e,t){if(t&&(bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C$(e)}function C$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ah(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ah=function(){return!!e})()}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function $$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xl(e,t)}function Xl(e,t){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xl(e,t)}function Jl(e,t,r){return t=ih(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ih(e){var t=k$(e,"string");return bn(t)=="symbol"?t:t+""}function k$(e,t){if(bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function M$(e){return e.dataKey}function N$(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(l$,t)}var Wt=function(e){function t(){return A$(this,t),_$(this,t,arguments)}return $$(t,e),j$(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.content,c=a.coordinate,f=a.filterNull,d=a.isAnimationActive,h=a.offset,m=a.payload,y=a.payloadUniqBy,v=a.position,b=a.reverseDirection,x=a.useTranslate3d,w=a.viewBox,A=a.wrapperStyle,g=m??[];f&&g.length&&(g=$p(m.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),y,M$));var O=g.length>0;return T.createElement(S$,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:O,offset:h,position:v,reverseDirection:b,useTranslate3d:x,viewBox:w,wrapperStyle:A},N$(u,nh(nh({},this.props),{},{payload:g})))}}])}(T.PureComponent);Jl(Wt,"displayName","Tooltip"),Jl(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!mr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var D$=Ft,I$=function(){return D$.Date.now()},L$=I$,R$=/\s/;function B$(e){for(var t=e.length;t--&&R$.test(e.charAt(t)););return t}var F$=B$,W$=F$,U$=/^\s+/;function z$(e){return e&&e.slice(0,W$(e)+1).replace(U$,"")}var V$=z$,G$=V$,oh=pr,q$=nn,sh=NaN,H$=/^[-+]0x[0-9a-f]+$/i,K$=/^0b[01]+$/i,Y$=/^0o[0-7]+$/i,X$=parseInt;function J$(e){if(typeof e=="number")return e;if(q$(e))return sh;if(oh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=oh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=G$(e);var r=K$.test(e);return r||Y$.test(e)?X$(e.slice(2),r?2:8):H$.test(e)?sh:+e}var lh=J$,Z$=pr,Zl=L$,uh=lh,Q$="Expected a function",ek=Math.max,tk=Math.min;function rk(e,t,r){var n,a,i,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Q$);t=uh(t)||0,Z$(r)&&(c=!!r.leading,f="maxWait"in r,i=f?ek(uh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(O){var S=n,j=a;return n=a=void 0,u=O,o=e.apply(j,S),o}function m(O){return u=O,s=setTimeout(b,t),c?h(O):o}function y(O){var S=O-l,j=O-u,E=t-S;return f?tk(E,i-j):E}function v(O){var S=O-l,j=O-u;return l===void 0||S>=t||S<0||f&&j>=i}function b(){var O=Zl();if(v(O))return x(O);s=setTimeout(b,y(O))}function x(O){return s=void 0,d&&n?h(O):(n=a=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function A(){return s===void 0?o:x(Zl())}function g(){var O=Zl(),S=v(O);if(n=arguments,a=this,l=O,S){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(b,t),h(l)}return s===void 0&&(s=setTimeout(b,t)),o}return g.cancel=w,g.flush=A,g}var nk=rk,ak=nk,ik=pr,ok="Expected a function";function sk(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(ok);return ik(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),ak(e,t,{leading:n,maxWait:t,trailing:a})}var lk=sk;const ch=$e(lk);function Sa(e){"@babel/helpers - typeof";return Sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sa(e)}function fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(n){uk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uk(e,t,r){return t=ck(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ck(e){var t=fk(e,"string");return Sa(t)=="symbol"?t:t+""}function fk(e,t){if(Sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dk(e,t){return mk(e)||vk(e,t)||hk(e,t)||pk()}function pk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hk(e,t){if(e){if(typeof e=="string")return dh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dh(e,t)}}function dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function mk(e){if(Array.isArray(e))return e}var yk=T.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,d=e.maxHeight,h=e.children,m=e.debounce,y=m===void 0?0:m,v=e.id,b=e.className,x=e.onResize,w=e.style,A=w===void 0?{}:w,g=T.useRef(null),O=T.useRef();O.current=x,T.useImperativeHandle(t,function(){return Object.defineProperty(g.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),g.current},configurable:!0})});var S=T.useState({containerWidth:a.width,containerHeight:a.height}),j=dk(S,2),E=j[0],M=j[1],_=T.useCallback(function(I,C){M(function(D){var k=Math.round(I),B=Math.round(C);return D.containerWidth===k&&D.containerHeight===B?D:{containerWidth:k,containerHeight:B}})},[]);T.useEffect(function(){var I=function(V){var $,R=V[0].contentRect,F=R.width,W=R.height;_(F,W),($=O.current)===null||$===void 0||$.call(O,F,W)};y>0&&(I=ch(I,y,{trailing:!0,leading:!1}));var C=new ResizeObserver(I),D=g.current.getBoundingClientRect(),k=D.width,B=D.height;return _(k,B),C.observe(g.current),function(){C.disconnect()}},[_,y]);var P=T.useMemo(function(){var I=E.containerWidth,C=E.containerHeight;if(I<0||C<0)return null;er(Cr(o)||Cr(l),`The width(%s) and height(%s) are both fixed numbers,
182
- maybe you don't need to use a ResponsiveContainer.`,o,l),er(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=Cr(o)?I:o,k=Cr(l)?C:l;r&&r>0&&(D?k=D/r:k&&(D=k*r),d&&k>d&&(k=d)),er(D>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
179
+ A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return T.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Tt/8,"h").concat(Tt,"v").concat(Tt*3/4,"h").concat(-Tt,"z"),className:"recharts-legend-icon"});if(T.isValidElement(n.legendIcon)){var c=RT({},n);return delete c.legendIcon,T.cloneElement(n.legendIcon,c)}return T.createElement(Xi,{fill:l,cx:i,cy:i,size:Tt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,c=a.inactiveColor,u={x:0,y:0,width:Tt,height:Tt},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,m){var g=h.formatter||l,v=me(ga(ga({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",h.inactive));if(h.type==="none")return null;var x=pe(h.value)?null:h.value;er(!pe(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=h.inactive?c:h.color;return T.createElement("li",Pl({className:v,style:f,key:"legend-item-".concat(m)},ma(n.props,h,m)),T.createElement(dl,{width:o,height:o,viewBox:u,style:d},n.renderIcon(h)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},g?g(x,h,m):x))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(T.PureComponent);ga(_l,"displayName","Legend"),ga(_l,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var KT=Di;function HT(){this.__data__=new KT,this.size=0}var YT=HT;function XT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var JT=XT;function ZT(e){return this.__data__.get(e)}var QT=ZT;function eA(e){return this.__data__.has(e)}var tA=eA,rA=Di,nA=Zs,aA=Qs,iA=200;function oA(e,t){var r=this.__data__;if(r instanceof rA){var n=r.__data__;if(!nA||n.length<iA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new aA(n)}return r.set(e,t),this.size=r.size,this}var sA=oA,lA=Di,cA=YT,uA=JT,fA=QT,dA=tA,pA=sA;function pn(e){var t=this.__data__=new lA(e);this.size=t.size}pn.prototype.clear=cA,pn.prototype.delete=uA,pn.prototype.get=fA,pn.prototype.has=dA,pn.prototype.set=pA;var Kd=pn,hA="__lodash_hash_undefined__";function vA(e){return this.__data__.set(e,hA),this}var mA=vA;function yA(e){return this.__data__.has(e)}var gA=yA,bA=Qs,xA=mA,wA=gA;function Zi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new bA;++t<r;)this.add(e[t])}Zi.prototype.add=Zi.prototype.push=xA,Zi.prototype.has=wA;var Hd=Zi;function OA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Yd=OA;function SA(e,t){return e.has(t)}var Xd=SA,TA=Hd,AA=Yd,PA=Xd,jA=1,_A=2;function EA(e,t,r,n,a,i){var o=r&jA,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=r&_A?new TA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var m=e[f],g=t[f];if(n)var v=o?n(g,m,f,t,e,i):n(m,g,f,e,t,i);if(v!==void 0){if(v)continue;d=!1;break}if(h){if(!AA(t,function(x,b){if(!PA(h,b)&&(m===x||a(m,x,r,n,i)))return h.push(b)})){d=!1;break}}else if(!(m===g||a(m,g,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Jd=EA,CA=Ft,$A=CA.Uint8Array,kA=$A;function MA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var NA=MA;function DA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var El=DA,Zd=ha,Qd=kA,IA=Js,LA=Jd,RA=NA,BA=El,FA=1,WA=2,UA="[object Boolean]",zA="[object Date]",VA="[object Error]",GA="[object Map]",qA="[object Number]",KA="[object RegExp]",HA="[object Set]",YA="[object String]",XA="[object Symbol]",JA="[object ArrayBuffer]",ZA="[object DataView]",ep=Zd?Zd.prototype:void 0,Cl=ep?ep.valueOf:void 0;function QA(e,t,r,n,a,i,o){switch(r){case ZA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JA:return!(e.byteLength!=t.byteLength||!i(new Qd(e),new Qd(t)));case UA:case zA:case qA:return IA(+e,+t);case VA:return e.name==t.name&&e.message==t.message;case KA:case YA:return e==t+"";case GA:var s=RA;case HA:var l=n&FA;if(s||(s=BA),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=WA,o.set(e,t);var u=LA(s(e),s(t),n,a,i,o);return o.delete(e),u;case XA:if(Cl)return Cl.call(e)==Cl.call(t)}return!1}var e2=QA;function t2(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var tp=t2,r2=tp,n2=ft;function a2(e,t,r){var n=t(e);return n2(e)?n:r2(n,r(e))}var i2=a2;function o2(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var s2=o2;function l2(){return[]}var c2=l2,u2=s2,f2=c2,d2=Object.prototype,p2=d2.propertyIsEnumerable,rp=Object.getOwnPropertySymbols,h2=rp?function(e){return e==null?[]:(e=Object(e),u2(rp(e),function(t){return p2.call(e,t)}))}:f2,v2=h2;function m2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var y2=m2,g2=Jt,b2=Zt,x2="[object Arguments]";function w2(e){return b2(e)&&g2(e)==x2}var O2=w2,np=O2,S2=Zt,ap=Object.prototype,T2=ap.hasOwnProperty,A2=ap.propertyIsEnumerable,P2=np(function(){return arguments}())?np:function(e){return S2(e)&&T2.call(e,"callee")&&!A2.call(e,"callee")},$l=P2,Qi={exports:{}};function j2(){return!1}var _2=j2;Qi.exports,function(e,t){var r=Ft,n=_2,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c}(Qi,Qi.exports);var ip=Qi.exports,E2=9007199254740991,C2=/^(?:0|[1-9]\d*)$/;function $2(e,t){var r=typeof e;return t=t??E2,!!t&&(r=="number"||r!="symbol"&&C2.test(e))&&e>-1&&e%1==0&&e<t}var kl=$2,k2=9007199254740991;function M2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k2}var Ml=M2,N2=Jt,D2=Ml,I2=Zt,L2="[object Arguments]",R2="[object Array]",B2="[object Boolean]",F2="[object Date]",W2="[object Error]",U2="[object Function]",z2="[object Map]",V2="[object Number]",G2="[object Object]",q2="[object RegExp]",K2="[object Set]",H2="[object String]",Y2="[object WeakMap]",X2="[object ArrayBuffer]",J2="[object DataView]",Z2="[object Float32Array]",Q2="[object Float64Array]",eP="[object Int8Array]",tP="[object Int16Array]",rP="[object Int32Array]",nP="[object Uint8Array]",aP="[object Uint8ClampedArray]",iP="[object Uint16Array]",oP="[object Uint32Array]",De={};De[Z2]=De[Q2]=De[eP]=De[tP]=De[rP]=De[nP]=De[aP]=De[iP]=De[oP]=!0,De[L2]=De[R2]=De[X2]=De[B2]=De[J2]=De[F2]=De[W2]=De[U2]=De[z2]=De[V2]=De[G2]=De[q2]=De[K2]=De[H2]=De[Y2]=!1;function sP(e){return I2(e)&&D2(e.length)&&!!De[N2(e)]}var lP=sP;function cP(e){return function(t){return e(t)}}var op=cP,eo={exports:{}};eo.exports,function(e,t){var r=Bf,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(eo,eo.exports);var uP=eo.exports,fP=lP,dP=op,sp=uP,lp=sp&&sp.isTypedArray,pP=lp?dP(lp):fP,cp=pP,hP=y2,vP=$l,mP=ft,yP=ip,gP=kl,bP=cp,xP=Object.prototype,wP=xP.hasOwnProperty;function OP(e,t){var r=mP(e),n=!r&&vP(e),a=!r&&!n&&yP(e),i=!r&&!n&&!a&&bP(e),o=r||n||a||i,s=o?hP(e.length,String):[],l=s.length;for(var c in e)(t||wP.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gP(c,l)))&&s.push(c);return s}var SP=OP,TP=Object.prototype;function AP(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||TP;return e===r}var PP=AP;function jP(e,t){return function(r){return e(t(r))}}var up=jP,_P=up,EP=_P(Object.keys,Object),CP=EP,$P=PP,kP=CP,MP=Object.prototype,NP=MP.hasOwnProperty;function DP(e){if(!$P(e))return kP(e);var t=[];for(var r in Object(e))NP.call(e,r)&&r!="constructor"&&t.push(r);return t}var IP=DP,LP=Ys,RP=Ml;function BP(e){return e!=null&&RP(e.length)&&!LP(e)}var ba=BP,FP=SP,WP=IP,UP=ba;function zP(e){return UP(e)?FP(e):WP(e)}var to=zP,VP=i2,GP=v2,qP=to;function KP(e){return VP(e,qP,GP)}var HP=KP,fp=HP,YP=1,XP=Object.prototype,JP=XP.hasOwnProperty;function ZP(e,t,r,n,a,i){var o=r&YP,s=fp(e),l=s.length,c=fp(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:JP.call(t,d)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=o;++f<l;){d=s[f];var x=e[d],b=t[d];if(n)var w=o?n(b,x,d,t,e,i):n(x,b,d,e,t,i);if(!(w===void 0?x===b||a(x,b,r,n,i):w)){g=!1;break}v||(v=d=="constructor")}if(g&&!v){var A=e.constructor,y=t.constructor;A!=y&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof y=="function"&&y instanceof y)&&(g=!1)}return i.delete(e),i.delete(t),g}var QP=ZP,ej=_r,tj=Ft,rj=ej(tj,"DataView"),nj=rj,aj=_r,ij=Ft,oj=aj(ij,"Promise"),sj=oj,lj=_r,cj=Ft,uj=lj(cj,"Set"),dp=uj,fj=_r,dj=Ft,pj=fj(dj,"WeakMap"),hj=pj,Nl=nj,Dl=Zs,Il=sj,Ll=dp,Rl=hj,pp=Jt,hn=Gf,hp="[object Map]",vj="[object Object]",vp="[object Promise]",mp="[object Set]",yp="[object WeakMap]",gp="[object DataView]",mj=hn(Nl),yj=hn(Dl),gj=hn(Il),bj=hn(Ll),xj=hn(Rl),Nr=pp;(Nl&&Nr(new Nl(new ArrayBuffer(1)))!=gp||Dl&&Nr(new Dl)!=hp||Il&&Nr(Il.resolve())!=vp||Ll&&Nr(new Ll)!=mp||Rl&&Nr(new Rl)!=yp)&&(Nr=function(e){var t=pp(e),r=t==vj?e.constructor:void 0,n=r?hn(r):"";if(n)switch(n){case mj:return gp;case yj:return hp;case gj:return vp;case bj:return mp;case xj:return yp}return t});var wj=Nr,Bl=Kd,Oj=Jd,Sj=e2,Tj=QP,bp=wj,xp=ft,wp=ip,Aj=cp,Pj=1,Op="[object Arguments]",Sp="[object Array]",ro="[object Object]",jj=Object.prototype,Tp=jj.hasOwnProperty;function _j(e,t,r,n,a,i){var o=xp(e),s=xp(t),l=o?Sp:bp(e),c=s?Sp:bp(t);l=l==Op?ro:l,c=c==Op?ro:c;var u=l==ro,f=c==ro,d=l==c;if(d&&wp(e)){if(!wp(t))return!1;o=!0,u=!1}if(d&&!u)return i||(i=new Bl),o||Aj(e)?Oj(e,t,r,n,a,i):Sj(e,t,l,r,n,a,i);if(!(r&Pj)){var h=u&&Tp.call(e,"__wrapped__"),m=f&&Tp.call(t,"__wrapped__");if(h||m){var g=h?e.value():e,v=m?t.value():t;return i||(i=new Bl),a(g,v,r,n,i)}}return d?(i||(i=new Bl),Tj(e,t,r,n,a,i)):!1}var Ej=_j,Cj=Ej,Ap=Zt;function Pp(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ap(e)&&!Ap(t)?e!==e&&t!==t:Cj(e,t,r,n,Pp,a)}var Fl=Pp,$j=Kd,kj=Fl,Mj=1,Nj=2;function Dj(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],c=e[l],u=s[1];if(o&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new $j;if(n)var d=n(c,u,l,e,t,f);if(!(d===void 0?kj(u,c,Mj|Nj,n,f):d))return!1}}return!0}var Ij=Dj,Lj=pr;function Rj(e){return e===e&&!Lj(e)}var jp=Rj,Bj=jp,Fj=to;function Wj(e){for(var t=Fj(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Bj(a)]}return t}var Uj=Wj;function zj(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var _p=zj,Vj=Ij,Gj=Uj,qj=_p;function Kj(e){var t=Gj(e);return t.length==1&&t[0][2]?qj(t[0][0],t[0][1]):function(r){return r===e||Vj(r,e,t)}}var Hj=Kj;function Yj(e,t){return e!=null&&t in Object(e)}var Xj=Yj,Jj=td,Zj=$l,Qj=ft,e_=kl,t_=Ml,r_=Li;function n_(e,t,r){t=Jj(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=r_(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&t_(a)&&e_(o,a)&&(Qj(e)||Zj(e)))}var a_=n_,i_=Xj,o_=a_;function s_(e,t){return e!=null&&o_(e,t,i_)}var l_=s_,c_=Fl,u_=rd,f_=l_,d_=Hs,p_=jp,h_=_p,v_=Li,m_=1,y_=2;function g_(e,t){return d_(e)&&p_(t)?h_(v_(e),t):function(r){var n=u_(r,e);return n===void 0&&n===t?f_(r,e):c_(t,n,m_|y_)}}var b_=g_;function x_(e){return e}var vn=x_;function w_(e){return function(t){return t==null?void 0:t[e]}}var O_=w_,S_=rl;function T_(e){return function(t){return S_(t,e)}}var A_=T_,P_=O_,j_=A_,__=Hs,E_=Li;function C_(e){return __(e)?P_(E_(e)):j_(e)}var $_=C_,k_=Hj,M_=b_,N_=vn,D_=ft,I_=$_;function L_(e){return typeof e=="function"?e:e==null?N_:typeof e=="object"?D_(e)?M_(e[0],e[1]):k_(e):I_(e)}var vr=L_;function R_(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var Ep=R_;function B_(e){return e!==e}var F_=B_;function W_(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var U_=W_,z_=Ep,V_=F_,G_=U_;function q_(e,t,r){return t===t?G_(e,t,r):z_(e,V_,r)}var K_=q_,H_=K_;function Y_(e,t){var r=e==null?0:e.length;return!!r&&H_(e,t,0)>-1}var X_=Y_;function J_(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var Z_=J_;function Q_(){}var eE=Q_,Wl=dp,tE=eE,rE=El,nE=1/0,aE=Wl&&1/rE(new Wl([,-0]))[1]==nE?function(e){return new Wl(e)}:tE,iE=aE,oE=Hd,sE=X_,lE=Z_,cE=Xd,uE=iE,fE=El,dE=200;function pE(e,t,r){var n=-1,a=sE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=lE;else if(i>=dE){var c=t?null:uE(e);if(c)return fE(c);o=!1,a=cE,l=new oE}else l=t?[]:s;e:for(;++n<i;){var u=e[n],f=t?t(u):u;if(u=r||u!==0?u:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else a(l,f,r)||(l!==s&&l.push(f),s.push(u))}return s}var hE=pE,vE=vr,mE=hE;function yE(e,t){return e&&e.length?mE(e,vE(t)):[]}var gE=yE;const Cp=$e(gE);function $p(e,t,r){return t===!0?Cp(e,r):pe(t)?Cp(e,t):e}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mn(e)}var bE=["ref"];function kp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kp(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dp(n.key),n)}}function wE(e,t,r){return t&&Mp(e.prototype,t),r&&Mp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function OE(e,t,r){return t=no(t),SE(e,Np()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function SE(e,t){if(t&&(mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TE(e)}function TE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Np(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Np=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function AE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ul(e,t)}function Ul(e,t){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ul(e,t)}function ao(e,t,r){return t=Dp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dp(e){var t=PE(e,"string");return mn(t)=="symbol"?t:t+""}function PE(e,t){if(mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function jE(e,t){if(e==null)return{};var r=_E(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _E(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EE(e){return e.value}function CE(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var r=jE(t,bE);return T.createElement(_l,r)}var Ip=1,yn=function(e){function t(){var r;xE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=OE(this,t,[].concat(a)),ao(r,"lastBoundingBox",{width:-1,height:-1}),r}return AE(t,e),wE(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Ip||Math.abs(a.height-this.lastBoundingBox.height)>Ip)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?tr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,c=a.chartWidth,u=a.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();f={left:((c||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();d={top:((u||0)-m.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return tr(tr({},f),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,u=a.payload,f=tr(tr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},CE(i,tr(tr({},this.props),{},{payload:$p(u,c,EE)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&J(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(T.PureComponent);ao(yn,"displayName","Legend"),ao(yn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Lp=ha,$E=$l,kE=ft,Rp=Lp?Lp.isConcatSpreadable:void 0;function ME(e){return kE(e)||$E(e)||!!(Rp&&e&&e[Rp])}var NE=ME,DE=tp,IE=NE;function Bp(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=IE),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Bp(s,t-1,r,n,a):DE(a,s):n||(a[a.length]=s)}return a}var Fp=Bp;function LE(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var RE=LE,BE=RE,FE=BE(),WE=FE,UE=WE,zE=to;function VE(e,t){return e&&UE(e,t,zE)}var Wp=VE,GE=ba;function qE(e,t){return function(r,n){if(r==null)return r;if(!GE(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var KE=qE,HE=Wp,YE=KE,XE=YE(HE),zl=XE,JE=zl,ZE=ba;function QE(e,t){var r=-1,n=ZE(e)?Array(e.length):[];return JE(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Up=QE;function eC(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var tC=eC,zp=nn;function rC(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=zp(e),o=t!==void 0,s=t===null,l=t===t,c=zp(t);if(!s&&!c&&!i&&e>t||i&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!c&&e<t||c&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var nC=rC,aC=nC;function iC(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=aC(a[n],i[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}var oC=iC,Vl=tl,sC=rl,lC=vr,cC=Up,uC=tC,fC=op,dC=oC,pC=vn,hC=ft;function vC(e,t,r){t.length?t=Vl(t,function(i){return hC(i)?function(o){return sC(o,i.length===1?i[0]:i)}:i}):t=[pC];var n=-1;t=Vl(t,fC(lC));var a=cC(e,function(i,o,s){var l=Vl(t,function(c){return c(i)});return{criteria:l,index:++n,value:i}});return uC(a,function(i,o){return dC(i,o,r)})}var mC=vC;function yC(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var gC=yC,bC=gC,Vp=Math.max;function xC(e,t,r){return t=Vp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Vp(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),bC(e,this,s)}}var wC=xC;function OC(e){return function(){return e}}var SC=OC,TC=_r,AC=function(){try{var e=TC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Gp=AC,PC=SC,qp=Gp,jC=vn,_C=qp?function(e,t){return qp(e,"toString",{configurable:!0,enumerable:!1,value:PC(t),writable:!0})}:jC,EC=_C,CC=800,$C=16,kC=Date.now;function MC(e){var t=0,r=0;return function(){var n=kC(),a=$C-(n-r);if(r=n,a>0){if(++t>=CC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var NC=MC,DC=EC,IC=NC,LC=IC(DC),RC=LC,BC=vn,FC=wC,WC=RC;function UC(e,t){return WC(FC(e,t,BC),e+"")}var zC=UC,VC=Js,GC=ba,qC=kl,KC=pr;function HC(e,t,r){if(!KC(r))return!1;var n=typeof t;return(n=="number"?GC(r)&&qC(t,r.length):n=="string"&&t in r)?VC(r[t],e):!1}var io=HC,YC=Fp,XC=mC,JC=zC,Kp=io,ZC=JC(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Kp(e,t[0],t[1])?t=[]:r>2&&Kp(t[0],t[1],t[2])&&(t=[t[0]]),XC(e,YC(t,1),[])}),QC=ZC;const Gl=$e(QC);function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function ql(){return ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ql.apply(this,arguments)}function e$(e,t){return a$(e)||n$(e,t)||r$(e,t)||t$()}function t$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
180
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r$(e,t){if(e){if(typeof e=="string")return Hp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hp(e,t)}}function Hp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function a$(e){if(Array.isArray(e))return e}function Yp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yp(Object(r),!0).forEach(function(n){i$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i$(e,t,r){return t=o$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o$(e){var t=s$(e,"string");return xa(t)=="symbol"?t:t+""}function s$(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l$(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var c$=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,c=l===void 0?{}:l,u=t.payload,f=t.formatter,d=t.itemSorter,h=t.wrapperClassName,m=t.labelClassName,g=t.label,v=t.labelFormatter,x=t.accessibilityLayer,b=x===void 0?!1:x,w=function(){if(u&&u.length){var C={padding:0,margin:0},k=(d?Gl(u,d):u).map(function(_,D){if(_.type==="none")return null;var M=Kl({display:"block",paddingTop:4,paddingBottom:4,color:_.color||"#000"},s),B=_.formatter||f||l$,U=_.value,V=_.name,E=U,R=V;if(B&&E!=null&&R!=null){var F=B(U,V,_,D,u);if(Array.isArray(F)){var W=e$(F,2);E=W[0],R=W[1]}else E=F}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:M},Xe(R)?T.createElement("span",{className:"recharts-tooltip-item-name"},R):null,Xe(R)?T.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,T.createElement("span",{className:"recharts-tooltip-item-value"},E),T.createElement("span",{className:"recharts-tooltip-item-unit"},_.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:C},k)}return null},A=Kl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Kl({margin:0},c),O=!fe(g),S=O?g:"",P=me("recharts-default-tooltip",h),$=me("recharts-tooltip-label",m);O&&v&&u!==void 0&&u!==null&&(S=v(g,u));var N=b?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",ql({className:P,style:A},N),T.createElement("p",{className:$,style:y},T.isValidElement(S)?S:"".concat(S)),w())};function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function oo(e,t,r){return t=u$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u$(e){var t=f$(e,"string");return wa(t)=="symbol"?t:t+""}function f$(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oa="recharts-tooltip-wrapper",d$={visibility:"hidden"};function p$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return me(Oa,oo(oo(oo(oo({},"".concat(Oa,"-right"),J(r)&&t&&J(t.x)&&r>=t.x),"".concat(Oa,"-left"),J(r)&&t&&J(t.x)&&r<t.x),"".concat(Oa,"-bottom"),J(n)&&t&&J(t.y)&&n>=t.y),"".concat(Oa,"-top"),J(n)&&t&&J(t.y)&&n<t.y))}function Xp(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&J(i[n]))return i[n];var u=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?u:f;if(o[n]){var d=u,h=l[n];return d<h?Math.max(f,l[n]):Math.max(u,l[n])}var m=f+s,g=l[n]+c;return m>g?Math.max(u,l[n]):Math.max(f,l[n])}function h$(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function v$(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,f;return o.height>0&&o.width>0&&r?(u=Xp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Xp({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=h$({translateX:u,translateY:f,useTranslate3d:s})):c=d$,{cssProperties:c,cssClasses:p$({translateX:u,translateY:f,coordinate:r})}}function gn(e){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(e)}function Jp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jp(Object(r),!0).forEach(function(n){Yl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eh(n.key),n)}}function g$(e,t,r){return t&&y$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b$(e,t,r){return t=so(t),x$(e,Qp()?Reflect.construct(t,r||[],so(e).constructor):t.apply(e,r))}function x$(e,t){if(t&&(gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w$(e)}function w$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qp=function(){return!!e})()}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}function O$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hl(e,t)}function Hl(e,t){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Hl(e,t)}function Yl(e,t,r){return t=eh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eh(e){var t=S$(e,"string");return gn(t)=="symbol"?t:t+""}function S$(e,t){if(gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var th=1,T$=function(e){function t(){var r;m$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=b$(this,t,[].concat(a)),Yl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Yl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,c,u;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(u=r.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0}})}}),r}return O$(t,e),g$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>th||Math.abs(n.height-this.state.lastBoundingBox.height)>th)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,c=a.children,u=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,m=a.position,g=a.reverseDirection,v=a.useTranslate3d,x=a.viewBox,b=a.wrapperStyle,w=v$({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:h,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:x}),A=w.cssClasses,y=w.cssProperties,O=Zp(Zp({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return T.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(P){n.wrapperNode=P}},c)}}])}(T.PureComponent),A$=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},mr={isSsr:A$()};function bn(e){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(e)}function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){Jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ih(n.key),n)}}function _$(e,t,r){return t&&j$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function E$(e,t,r){return t=lo(t),C$(e,ah()?Reflect.construct(t,r||[],lo(e).constructor):t.apply(e,r))}function C$(e,t){if(t&&(bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $$(e)}function $$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ah(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ah=function(){return!!e})()}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function k$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xl(e,t)}function Xl(e,t){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xl(e,t)}function Jl(e,t,r){return t=ih(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ih(e){var t=M$(e,"string");return bn(t)=="symbol"?t:t+""}function M$(e,t){if(bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function N$(e){return e.dataKey}function D$(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(c$,t)}var Wt=function(e){function t(){return P$(this,t),E$(this,t,arguments)}return k$(t,e),_$(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,c=a.content,u=a.coordinate,f=a.filterNull,d=a.isAnimationActive,h=a.offset,m=a.payload,g=a.payloadUniqBy,v=a.position,x=a.reverseDirection,b=a.useTranslate3d,w=a.viewBox,A=a.wrapperStyle,y=m??[];f&&y.length&&(y=$p(m.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),g,N$));var O=y.length>0;return T.createElement(T$,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:u,hasPayload:O,offset:h,position:v,reverseDirection:x,useTranslate3d:b,viewBox:w,wrapperStyle:A},D$(c,nh(nh({},this.props),{},{payload:y})))}}])}(T.PureComponent);Jl(Wt,"displayName","Tooltip"),Jl(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!mr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var I$=Ft,L$=function(){return I$.Date.now()},R$=L$,B$=/\s/;function F$(e){for(var t=e.length;t--&&B$.test(e.charAt(t)););return t}var W$=F$,U$=W$,z$=/^\s+/;function V$(e){return e&&e.slice(0,U$(e)+1).replace(z$,"")}var G$=V$,q$=G$,oh=pr,K$=nn,sh=NaN,H$=/^[-+]0x[0-9a-f]+$/i,Y$=/^0b[01]+$/i,X$=/^0o[0-7]+$/i,J$=parseInt;function Z$(e){if(typeof e=="number")return e;if(K$(e))return sh;if(oh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=oh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=q$(e);var r=Y$.test(e);return r||X$.test(e)?J$(e.slice(2),r?2:8):H$.test(e)?sh:+e}var lh=Z$,Q$=pr,Zl=R$,ch=lh,ek="Expected a function",tk=Math.max,rk=Math.min;function nk(e,t,r){var n,a,i,o,s,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(ek);t=ch(t)||0,Q$(r)&&(u=!!r.leading,f="maxWait"in r,i=f?tk(ch(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(O){var S=n,P=a;return n=a=void 0,c=O,o=e.apply(P,S),o}function m(O){return c=O,s=setTimeout(x,t),u?h(O):o}function g(O){var S=O-l,P=O-c,$=t-S;return f?rk($,i-P):$}function v(O){var S=O-l,P=O-c;return l===void 0||S>=t||S<0||f&&P>=i}function x(){var O=Zl();if(v(O))return b(O);s=setTimeout(x,g(O))}function b(O){return s=void 0,d&&n?h(O):(n=a=void 0,o)}function w(){s!==void 0&&clearTimeout(s),c=0,n=l=a=s=void 0}function A(){return s===void 0?o:b(Zl())}function y(){var O=Zl(),S=v(O);if(n=arguments,a=this,l=O,S){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(x,t),h(l)}return s===void 0&&(s=setTimeout(x,t)),o}return y.cancel=w,y.flush=A,y}var ak=nk,ik=ak,ok=pr,sk="Expected a function";function lk(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(sk);return ok(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),ik(e,t,{leading:n,maxWait:t,trailing:a})}var ck=lk;const uh=$e(ck);function Sa(e){"@babel/helpers - typeof";return Sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sa(e)}function fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(n){uk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uk(e,t,r){return t=fk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fk(e){var t=dk(e,"string");return Sa(t)=="symbol"?t:t+""}function dk(e,t){if(Sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pk(e,t){return yk(e)||mk(e,t)||vk(e,t)||hk()}function hk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vk(e,t){if(e){if(typeof e=="string")return dh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dh(e,t)}}function dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function yk(e){if(Array.isArray(e))return e}var gk=T.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,u=c===void 0?0:c,f=e.minHeight,d=e.maxHeight,h=e.children,m=e.debounce,g=m===void 0?0:m,v=e.id,x=e.className,b=e.onResize,w=e.style,A=w===void 0?{}:w,y=T.useRef(null),O=T.useRef();O.current=b,T.useImperativeHandle(t,function(){return Object.defineProperty(y.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),y.current},configurable:!0})});var S=T.useState({containerWidth:a.width,containerHeight:a.height}),P=pk(S,2),$=P[0],N=P[1],j=T.useCallback(function(k,_){N(function(D){var M=Math.round(k),B=Math.round(_);return D.containerWidth===M&&D.containerHeight===B?D:{containerWidth:M,containerHeight:B}})},[]);T.useEffect(function(){var k=function(V){var E,R=V[0].contentRect,F=R.width,W=R.height;j(F,W),(E=O.current)===null||E===void 0||E.call(O,F,W)};g>0&&(k=uh(k,g,{trailing:!0,leading:!1}));var _=new ResizeObserver(k),D=y.current.getBoundingClientRect(),M=D.width,B=D.height;return j(M,B),_.observe(y.current),function(){_.disconnect()}},[j,g]);var C=T.useMemo(function(){var k=$.containerWidth,_=$.containerHeight;if(k<0||_<0)return null;er(Cr(o)||Cr(l),`The width(%s) and height(%s) are both fixed numbers,
182
+ maybe you don't need to use a ResponsiveContainer.`,o,l),er(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=Cr(o)?k:o,M=Cr(l)?_:l;r&&r>0&&(D?M=D/r:M&&(D=M*r),d&&M>d&&(M=d)),er(D>0||M>0,`The width(%s) and height(%s) of chart should be greater than 0,
183
183
  please check the style of container, or the props width(%s) and height(%s),
184
184
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
185
- height and width.`,D,k,o,l,c,f,r);var B=!Array.isArray(h)&&Qt(h.type).endsWith("Chart");return T.Children.map(h,function(U){return T.isValidElement(U)?T.cloneElement(U,uo({width:D,height:k},B?{style:uo({height:"100%",width:"100%",maxHeight:k,maxWidth:D},U.props.style)}:{})):U})},[r,h,l,d,f,c,E,o]);return T.createElement("div",{id:v?"".concat(v):void 0,className:me("recharts-responsive-container",b),style:uo(uo({},A),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:g},P)}),Ql=function(t){return null};Ql.displayName="Cell";function Ta(e){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(e)}function ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){gk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gk(e,t,r){return t=bk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bk(e){var t=xk(e,"string");return Ta(t)=="symbol"?t:t+""}function xk(e,t){if(Ta(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ta(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn={widthCache:{},cacheCount:0},wk=2e3,Ok={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},hh="recharts_measurement_span";function Sk(e){var t=eu({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Aa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||mr.isSsr)return{width:0,height:0};var n=Sk(r),a=JSON.stringify({text:t,copyStyle:n});if(xn.widthCache[a])return xn.widthCache[a];try{var i=document.getElementById(hh);i||(i=document.createElement("span"),i.setAttribute("id",hh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=eu(eu({},Ok),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return xn.widthCache[a]=l,++xn.cacheCount>wk&&(xn.cacheCount=0,xn.widthCache={}),l}catch{return{width:0,height:0}}},Tk=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Pa(e){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(e)}function co(e,t){return _k(e)||jk(e,t)||Pk(e,t)||Ak()}function Ak(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
186
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pk(e,t){if(e){if(typeof e=="string")return vh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vh(e,t)}}function vh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function _k(e){if(Array.isArray(e))return e}function Ek(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$k(n.key),n)}}function Ck(e,t,r){return t&&mh(e.prototype,t),r&&mh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $k(e){var t=kk(e,"string");return Pa(t)=="symbol"?t:t+""}function kk(e,t){if(Pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Nk=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Dk=Object.keys(bh),wn="NaN";function Ik(e,t){return e*bh[t]}var fo=function(){function e(t,r){Ek(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Mk.test(r)&&(this.num=NaN,this.unit=""),Dk.includes(r)&&(this.num=Ik(t,r),this.unit="px")}return Ck(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=Nk.exec(r))!==null&&n!==void 0?n:[],i=co(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function xh(e){if(e.includes(wn))return wn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=yh.exec(t))!==null&&r!==void 0?r:[],a=co(n,4),i=a[1],o=a[2],s=a[3],l=fo.parse(i??""),u=fo.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return wn;t=t.replace(yh,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=gh.exec(t))!==null&&f!==void 0?f:[],h=co(d,4),m=h[1],y=h[2],v=h[3],b=fo.parse(m??""),x=fo.parse(v??""),w=y==="+"?b.add(x):b.subtract(x);if(w.isNaN())return wn;t=t.replace(gh,w.toString())}return t}var wh=/\(([^()]*)\)/;function Lk(e){for(var t=e;t.includes("(");){var r=wh.exec(t),n=co(r,2),a=n[1];t=t.replace(wh,xh(a))}return t}function Rk(e){var t=e.replace(/\s+/g,"");return t=Lk(t),t=xh(t),t}function Bk(e){try{return Rk(e)}catch{return wn}}function tu(e){var t=Bk(e.slice(5,-1));return t===wn?"":t}var Fk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Wk=["dx","dy","angle","className","breakAll"];function ru(){return ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ru.apply(this,arguments)}function Oh(e,t){if(e==null)return{};var r=Uk(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sh(e,t){return qk(e)||Gk(e,t)||Vk(e,t)||zk()}function zk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
187
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vk(e,t){if(e){if(typeof e=="string")return Th(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Th(e,t)}}function Th(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function qk(e){if(Array.isArray(e))return e}var Ah=/[ \f\n\r\t\v\u2028\u2029]+/,Ph=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];fe(r)||(n?i=r.toString().split(""):i=r.toString().split(Ah));var o=i.map(function(l){return{word:l,width:Aa(l,a).width}}),s=n?0:Aa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},Hk=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=J(o),f=s,d=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(k,B){var U=B.word,V=B.width,$=k[k.length-1];if($&&(a==null||i||$.width+V+n<Number(a)))$.words.push(U),$.width+=V+n;else{var R={words:[U],width:V};k.push(R)}return k},[])},h=d(r),m=function(D){return D.reduce(function(k,B){return k.width>B.width?k:B})};if(!c)return h;for(var y="…",v=function(D){var k=f.slice(0,D),B=Ph({breakAll:u,style:l,children:k+y}).wordsWithComputedWidth,U=d(B),V=U.length>o||m(U).width>Number(a);return[V,U]},b=0,x=f.length-1,w=0,A;b<=x&&w<=f.length-1;){var g=Math.floor((b+x)/2),O=g-1,S=v(O),j=Sh(S,2),E=j[0],M=j[1],_=v(g),P=Sh(_,1),I=P[0];if(!E&&!I&&(b=g+1),E&&I&&(x=g-1),!E&&I){A=M;break}w++}return A||h},jh=function(t){var r=fe(t)?[]:t.toString().split(Ah);return[{words:r}]},Kk=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!mr.isSsr){var l,u,c=Ph({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return jh(a);return Hk({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return jh(a)},_h="#808080",po=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,h=d===void 0?"start":d,m=t.verticalAnchor,y=m===void 0?"end":m,v=t.fill,b=v===void 0?_h:v,x=Oh(t,Fk),w=T.useMemo(function(){return Kk({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),A=x.dx,g=x.dy,O=x.angle,S=x.className,j=x.breakAll,E=Oh(x,Wk);if(!Xe(n)||!Xe(i))return null;var M=n+(J(A)?A:0),_=i+(J(g)?g:0),P;switch(y){case"start":P=tu("calc(".concat(u,")"));break;case"middle":P=tu("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:P=tu("calc(".concat(w.length-1," * -").concat(s,")"));break}var I=[];if(f){var C=w[0].width,D=x.width;I.push("scale(".concat((J(D)?D/C:1)/C,")"))}return O&&I.push("rotate(".concat(O,", ").concat(M,", ").concat(_,")")),I.length&&(E.transform=I.join(" ")),T.createElement("text",ru({},de(E,!0),{x:M,y:_,className:me("recharts-text",S),textAnchor:h,fill:b.includes("url")?_h:b}),w.map(function(k,B){var U=k.words.join(j?"":" ");return T.createElement("tspan",{x:M,dy:B===0?P:s,key:"".concat(U,"-").concat(B)},U)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Yk(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nu(e){let t,r,n;e.length!==2?(t=yr,r=(s,l)=>yr(e(s),l),n=(s,l)=>e(s)-l):(t=e===yr||e===Yk?e:Xk,r=e,n=e);function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=a(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function Xk(){return 0}function Eh(e){return e===null?NaN:+e}function*Jk(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ja=nu(yr).right;nu(Eh).center;class Ch extends Map{constructor(t,r=eM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get($h(this,t))}has(t){return super.has($h(this,t))}set(t,r){return super.set(Zk(this,t),r)}delete(t){return super.delete(Qk(this,t))}}function $h({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Zk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Qk({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function eM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tM(e=yr){if(e===yr)return kh;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function kh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const rM=Math.sqrt(50),nM=Math.sqrt(10),aM=Math.sqrt(2);function ho(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=rM?10:i>=nM?5:i>=aM?2:1;let s,l,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?ho(e,t,r*2):[s,l,u]}function au(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?ho(t,e,r):ho(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(i-u)/-o;else for(let u=0;u<s;++u)l[u]=(i-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(a+u)/-o;else for(let u=0;u<s;++u)l[u]=(a+u)*o;return l}function iu(e,t,r){return t=+t,e=+e,r=+r,ho(e,t,r)[2]}function ou(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?iu(t,e,r):iu(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Mh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Nh(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Dh(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?kh:tM(a);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/l+d)),m=Math.min(n,Math.floor(t+(l-u)*f/l+d));Dh(e,t,h,m,a)}const i=e[t];let o=r,s=n;for(_a(e,r,t),a(e[n],i)>0&&_a(e,r,n);o<s;){for(_a(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?_a(e,r,s):(++s,_a(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function _a(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function iM(e,t,r){if(e=Float64Array.from(Jk(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Nh(e);if(t>=1)return Mh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Mh(Dh(e,i).subarray(0,i+1)),s=Nh(e.subarray(i+1));return o+(s-o)*(a-i)}}function oM(e,t,r=Eh){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function sM(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function At(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const su=Symbol("implicit");function lu(){var e=new Ch,t=[],r=[],n=su;function a(i){let o=e.get(i);if(o===void 0){if(n!==su)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Ch;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return lu(t,r).unknown(n)},At.apply(a,arguments),a}function Ea(){var e=lu().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var d=t().length,h=a<n,m=h?a:n,y=h?n:a;i=(y-m)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),m+=(y-m-i*(d-l))*c,o=i*(1-l),s&&(m=Math.round(m),o=Math.round(o));var v=sM(d).map(function(b){return m+i*b});return r(h?v.reverse():v)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return Ea(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},At.apply(f(),arguments)}function Ih(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ih(t())},e}function Ca(){return Ih(Ea.apply(null,arguments).paddingInner(1))}function uu(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Lh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function $a(){}var ka=.7,vo=1/ka,On="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lM=/^#([0-9a-f]{3,8})$/,uM=new RegExp(`^rgb\\(${On},${On},${On}\\)$`),cM=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),fM=new RegExp(`^rgba\\(${On},${On},${On},${Ma}\\)$`),dM=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Ma}\\)$`),pM=new RegExp(`^hsl\\(${Ma},${Ut},${Ut}\\)$`),hM=new RegExp(`^hsla\\(${Ma},${Ut},${Ut},${Ma}\\)$`),Rh={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};uu($a,Na,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bh,formatHex:Bh,formatHex8:vM,formatHsl:mM,formatRgb:Fh,toString:Fh});function Bh(){return this.rgb().formatHex()}function vM(){return this.rgb().formatHex8()}function mM(){return Gh(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function Na(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=lM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Wh(t):r===3?new pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uM.exec(e))?new pt(t[1],t[2],t[3],1):(t=cM.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fM.exec(e))?mo(t[1],t[2],t[3],t[4]):(t=dM.exec(e))?mo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=pM.exec(e))?Vh(t[1],t[2]/100,t[3]/100,1):(t=hM.exec(e))?Vh(t[1],t[2]/100,t[3]/100,t[4]):Rh.hasOwnProperty(e)?Wh(Rh[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Wh(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function mo(e,t,r,n){return n<=0&&(e=t=r=NaN),new pt(e,t,r,n)}function yM(e){return e instanceof $a||(e=Na(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function cu(e,t,r,n){return arguments.length===1?yM(e):new pt(e,t,r,n??1)}function pt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}uu(pt,cu,Lh($a,{brighter(e){return e=e==null?vo:Math.pow(vo,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(Dr(this.r),Dr(this.g),Dr(this.b),yo(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:Uh,formatHex:Uh,formatHex8:gM,formatRgb:zh,toString:zh}));function Uh(){return`#${Ir(this.r)}${Ir(this.g)}${Ir(this.b)}`}function gM(){return`#${Ir(this.r)}${Ir(this.g)}${Ir(this.b)}${Ir((isNaN(this.opacity)?1:this.opacity)*255)}`}function zh(){const e=yo(this.opacity);return`${e===1?"rgb(":"rgba("}${Dr(this.r)}, ${Dr(this.g)}, ${Dr(this.b)}${e===1?")":`, ${e})`}`}function yo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ir(e){return e=Dr(e),(e<16?"0":"")+e.toString(16)}function Vh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,r,n)}function Gh(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=Na(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new Mt(o,s,l,e.opacity)}function bM(e,t,r,n){return arguments.length===1?Gh(e):new Mt(e,t,r,n??1)}function Mt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}uu(Mt,bM,Lh($a,{brighter(e){return e=e==null?vo:Math.pow(vo,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new Mt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new pt(fu(e>=240?e-240:e+120,a,n),fu(e,a,n),fu(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mt(qh(this.h),go(this.s),go(this.l),yo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=yo(this.opacity);return`${e===1?"hsl(":"hsla("}${qh(this.h)}, ${go(this.s)*100}%, ${go(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qh(e){return e=(e||0)%360,e<0?e+360:e}function go(e){return Math.max(0,Math.min(1,e||0))}function fu(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const du=e=>()=>e;function xM(e,t){return function(r){return e+r*t}}function wM(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function OM(e){return(e=+e)==1?Hh:function(t,r){return r-t?wM(t,r,e):du(isNaN(t)?r:t)}}function Hh(e,t){var r=t-e;return r?xM(e,r):du(isNaN(e)?t:e)}const Kh=function e(t){var r=OM(t);function n(a,i){var o=r((a=cu(a)).r,(i=cu(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Hh(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n}(1);function SM(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function TM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function AM(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=Sn(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function PM(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function bo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function jM(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Sn(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var pu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hu=new RegExp(pu.source,"g");function _M(e){return function(){return e}}function EM(e){return function(t){return e(t)+""}}function CM(e,t){var r=pu.lastIndex=hu.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=pu.exec(e))&&(a=hu.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:bo(n,a)})),r=hu.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?EM(l[0].x):_M(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function Sn(e,t){var r=typeof t,n;return t==null||r==="boolean"?du(t):(r==="number"?bo:r==="string"?(n=Na(t))?(t=n,Kh):CM:t instanceof Na?Kh:t instanceof Date?PM:TM(t)?SM:Array.isArray(t)?AM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?jM:bo)(e,t)}function vu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function $M(e,t){t===void 0&&(t=e,e=Sn);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function kM(e){return function(){return e}}function xo(e){return+e}var Yh=[0,1];function lt(e){return e}function mu(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:kM(isNaN(t)?NaN:.5)}function MM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function NM(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=mu(a,n),i=r(o,i)):(n=mu(n,a),i=r(i,o)),function(s){return i(n(s))}}function DM(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=mu(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=ja(e,s,1,n)-1;return i[l](a[l](s))}}function Da(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wo(){var e=Yh,t=Yh,r=Sn,n,a,i,o=lt,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==lt&&(o=MM(e[0],e[d-1])),s=d>2?DM:NM,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(a((u||(u=s(t,e.map(n),bo)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,xo),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=vu,c()},f.clamp=function(d){return arguments.length?(o=d?!0:lt,c()):o!==lt},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,a=h,c()}}function yu(){return wo()(lt,lt)}function IM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Oo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Tn(e){return e=Oo(Math.abs(e)),e?e[1]:NaN}function LM(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function RM(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var BM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=BM.exec(e)))throw new Error("invalid format: "+e);var t;return new gu({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ia.prototype=gu.prototype;function gu(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}gu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function FM(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Xh;function WM(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Xh=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Oo(e,Math.max(0,t+i-1))[0]}function Jh(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Zh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:IM,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Jh(e*100,t),r:Jh,s:WM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Qh(e){return e}var ev=Array.prototype.map,tv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function UM(e){var t=e.grouping===void 0||e.thousands===void 0?Qh:LM(ev.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Qh:RM(ev.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Ia(f);var d=f.fill,h=f.align,m=f.sign,y=f.symbol,v=f.zero,b=f.width,x=f.comma,w=f.precision,A=f.trim,g=f.type;g==="n"?(x=!0,g="g"):Zh[g]||(w===void 0&&(w=12),A=!0,g="g"),(v||d==="0"&&h==="=")&&(v=!0,d="0",h="=");var O=y==="$"?r:y==="#"&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",S=y==="$"?n:/[%p]/.test(g)?o:"",j=Zh[g],E=/[defgprs%]/.test(g);w=w===void 0?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(_){var P=O,I=S,C,D,k;if(g==="c")I=j(_)+I,_="";else{_=+_;var B=_<0||1/_<0;if(_=isNaN(_)?l:j(Math.abs(_),w),A&&(_=FM(_)),B&&+_==0&&m!=="+"&&(B=!1),P=(B?m==="("?m:s:m==="-"||m==="("?"":m)+P,I=(g==="s"?tv[8+Xh/3]:"")+I+(B&&m==="("?")":""),E){for(C=-1,D=_.length;++C<D;)if(k=_.charCodeAt(C),48>k||k>57){I=(k===46?a+_.slice(C+1):_.slice(C))+I,_=_.slice(0,C);break}}}x&&!v&&(_=t(_,1/0));var U=P.length+_.length+I.length,V=U<b?new Array(b-U+1).join(d):"";switch(x&&v&&(_=t(V+_,V.length?b-I.length:1/0),V=""),h){case"<":_=P+_+I+V;break;case"=":_=P+V+_+I;break;case"^":_=V.slice(0,U=V.length>>1)+P+_+I+V.slice(U);break;default:_=V+P+_+I;break}return i(_)}return M.toString=function(){return f+""},M}function c(f,d){var h=u((f=Ia(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Tn(d)/3)))*3,y=Math.pow(10,-m),v=tv[8+m/3];return function(b){return h(y*b)+v}}return{format:u,formatPrefix:c}}var So,bu,rv;zM({thousands:",",grouping:[3],currency:["$",""]});function zM(e){return So=UM(e),bu=So.format,rv=So.formatPrefix,So}function VM(e){return Math.max(0,-Tn(Math.abs(e)))}function GM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Tn(t)/3)))*3-Tn(Math.abs(e)))}function qM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function nv(e,t,r,n){var a=ou(e,t,r),i;switch(n=Ia(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=GM(a,o))&&(n.precision=i),rv(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=qM(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=VM(a))&&(n.precision=i-(n.type==="%")*2);break}}return bu(n)}function gr(e){var t=e.domain;return e.ticks=function(r){var n=t();return au(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return nv(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=a,a=i,i=u);c-- >0;){if(u=iu(o,s,r),u===l)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function To(){var e=yu();return e.copy=function(){return Da(e,To())},At.apply(e,arguments),gr(e)}function av(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,xo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return av(e).unknown(t)},e=arguments.length?Array.from(e,xo):[0,1],gr(r)}function iv(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function ov(e){return Math.log(e)}function sv(e){return Math.exp(e)}function HM(e){return-Math.log(-e)}function KM(e){return-Math.exp(-e)}function YM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function XM(e){return e===10?YM:e===Math.E?Math.exp:t=>Math.pow(e,t)}function JM(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function lv(e){return(t,r)=>-e(-t,r)}function xu(e){const t=e(ov,sv),r=t.domain;let n=10,a,i;function o(){return a=JM(n),i=XM(n),r()[0]<0?(a=lv(a),i=lv(i),e(HM,KM)):e(ov,sv),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=a(u),h=a(c),m,y;const v=s==null?10:+s;let b=[];if(!(n%1)&&h-d<v){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(m=1;m<n;++m)if(y=d<0?m/i(-d):m*i(d),!(y<u)){if(y>c)break;b.push(y)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(y=d>0?m/i(-d):m*i(d),!(y<u)){if(y>c)break;b.push(y)}b.length*2<v&&(b=au(u,c,v))}else b=au(d,h,Math.min(h-d,v)).map(i);return f?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ia(l)).precision==null&&(l.trim=!0),l=bu(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(iv(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function uv(){const e=xu(wo()).domain([1,10]);return e.copy=()=>Da(e,uv()).base(e.base()),At.apply(e,arguments),e}function cv(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function fv(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function wu(e){var t=1,r=e(cv(t),fv(t));return r.constant=function(n){return arguments.length?e(cv(t=+n),fv(t)):t},gr(r)}function dv(){var e=wu(wo());return e.copy=function(){return Da(e,dv()).constant(e.constant())},At.apply(e,arguments)}function pv(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ZM(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function QM(e){return e<0?-e*e:e*e}function Ou(e){var t=e(lt,lt),r=1;function n(){return r===1?e(lt,lt):r===.5?e(ZM,QM):e(pv(r),pv(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},gr(t)}function Su(){var e=Ou(wo());return e.copy=function(){return Da(e,Su()).exponent(e.exponent())},At.apply(e,arguments),e}function eN(){return Su.apply(null,arguments).exponent(.5)}function hv(e){return Math.sign(e)*e*e}function tN(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vv(){var e=yu(),t=[0,1],r=!1,n;function a(i){var o=tN(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(hv(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,xo)).map(hv)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return vv(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),gr(a)}function mv(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=oM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[ja(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(yr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return mv().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function yv(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[ja(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return yv().domain([e,t]).range(a).unknown(i)},At.apply(gr(o),arguments)}function gv(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[ja(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return gv().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const Tu=new Date,Au=new Date;function Je(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<o);return l},a.filter=i=>Je(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(Tu.setTime(+i),Au.setTime(+o),e(Tu),e(Au),Math.floor(r(Tu,Au))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const Ao=Je(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ao.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Je(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ao),Ao.range;const nr=1e3,Pt=nr*60,ar=Pt*60,ir=ar*24,Pu=ir*7,bv=ir*30,ju=ir*365,Lr=Je(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Lr.range;const _u=Je(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());_u.range;const Eu=Je(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Eu.range;const Cu=Je(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Cu.range;const $u=Je(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());$u.range;const La=Je(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pt)/ir,e=>e.getDate()-1);La.range;const Po=Je(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);Po.range;const xv=Je(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));xv.range;function Rr(e){return Je(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Pt)/Pu)}const jo=Rr(0),_o=Rr(1),rN=Rr(2),nN=Rr(3),An=Rr(4),aN=Rr(5),iN=Rr(6);jo.range,_o.range,rN.range,nN.range,An.range,aN.range,iN.range;function Br(e){return Je(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Pu)}const Eo=Br(0),Co=Br(1),oN=Br(2),sN=Br(3),Pn=Br(4),lN=Br(5),uN=Br(6);Eo.range,Co.range,oN.range,sN.range,Pn.range,lN.range,uN.range;const ku=Je(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ku.range;const Mu=Je(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Mu.range;const or=Je(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Je(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),or.range;const sr=Je(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Je(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),sr.range;function wv(e,t,r,n,a,i){const o=[[Lr,1,nr],[Lr,5,5*nr],[Lr,15,15*nr],[Lr,30,30*nr],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,ir],[n,2,2*ir],[r,1,Pu],[t,1,bv],[t,3,3*bv],[e,1,ju]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),m=h?h.range(u,+c+1):[];return d?m.reverse():m}function l(u,c,f){const d=Math.abs(c-u)/f,h=nu(([,,v])=>v).right(o,d);if(h===o.length)return e.every(ou(u/ju,c/ju,f));if(h===0)return Ao.every(Math.max(ou(u,c,f),1));const[m,y]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return m.every(y)}return[s,l]}const[cN,fN]=wv(sr,Mu,Eo,xv,$u,Eu),[dN,pN]=wv(or,ku,jo,La,Cu,_u);function Nu(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Du(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ra(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function hN(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Ba(a),c=Fa(a),f=Ba(i),d=Fa(i),h=Ba(o),m=Fa(o),y=Ba(s),v=Fa(s),b=Ba(l),x=Fa(l),w={a:B,A:U,b:V,B:$,c:null,d:jv,e:jv,f:LN,g:HN,G:YN,H:NN,I:DN,j:IN,L:_v,m:RN,M:BN,p:R,q:F,Q:Nv,s:Dv,S:FN,u:WN,U:UN,V:zN,w:VN,W:GN,x:null,X:null,y:qN,Y:KN,Z:XN,"%":Mv},A={a:W,A:G,b:X,B:Q,c:null,d:Cv,e:Cv,f:eD,g:cD,G:dD,H:JN,I:ZN,j:QN,L:$v,m:tD,M:rD,p:ae,q:te,Q:Nv,s:Dv,S:nD,u:aD,U:iD,V:oD,w:sD,W:lD,x:null,X:null,y:uD,Y:fD,Z:pD,"%":Mv},g={a:M,A:_,b:P,B:I,c:C,d:Av,e:Av,f:CN,g:Tv,G:Sv,H:Pv,I:Pv,j:PN,L:EN,m:AN,M:jN,p:E,q:TN,Q:kN,s:MN,S:_N,u:bN,U:xN,V:wN,w:gN,W:ON,x:D,X:k,y:Tv,Y:Sv,Z:SN,"%":$N};w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),A.x=O(r,A),A.X=O(n,A),A.c=O(t,A);function O(q,Y){return function(Z){var L=[],oe=-1,H=0,ue=q.length,ee,ve,Ue;for(Z instanceof Date||(Z=new Date(+Z));++oe<ue;)q.charCodeAt(oe)===37&&(L.push(q.slice(H,oe)),(ve=Ov[ee=q.charAt(++oe)])!=null?ee=q.charAt(++oe):ve=ee==="e"?" ":"0",(Ue=Y[ee])&&(ee=Ue(Z,ve)),L.push(ee),H=oe+1);return L.push(q.slice(H,oe)),L.join("")}}function S(q,Y){return function(Z){var L=Ra(1900,void 0,1),oe=j(L,q,Z+="",0),H,ue;if(oe!=Z.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(Y&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(H=Du(Ra(L.y,0,1)),ue=H.getUTCDay(),H=ue>4||ue===0?Co.ceil(H):Co(H),H=Po.offset(H,(L.V-1)*7),L.y=H.getUTCFullYear(),L.m=H.getUTCMonth(),L.d=H.getUTCDate()+(L.w+6)%7):(H=Nu(Ra(L.y,0,1)),ue=H.getDay(),H=ue>4||ue===0?_o.ceil(H):_o(H),H=La.offset(H,(L.V-1)*7),L.y=H.getFullYear(),L.m=H.getMonth(),L.d=H.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),ue="Z"in L?Du(Ra(L.y,0,1)).getUTCDay():Nu(Ra(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(ue+5)%7:L.w+L.U*7-(ue+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Du(L)):Nu(L)}}function j(q,Y,Z,L){for(var oe=0,H=Y.length,ue=Z.length,ee,ve;oe<H;){if(L>=ue)return-1;if(ee=Y.charCodeAt(oe++),ee===37){if(ee=Y.charAt(oe++),ve=g[ee in Ov?Y.charAt(oe++):ee],!ve||(L=ve(q,Z,L))<0)return-1}else if(ee!=Z.charCodeAt(L++))return-1}return L}function E(q,Y,Z){var L=u.exec(Y.slice(Z));return L?(q.p=c.get(L[0].toLowerCase()),Z+L[0].length):-1}function M(q,Y,Z){var L=h.exec(Y.slice(Z));return L?(q.w=m.get(L[0].toLowerCase()),Z+L[0].length):-1}function _(q,Y,Z){var L=f.exec(Y.slice(Z));return L?(q.w=d.get(L[0].toLowerCase()),Z+L[0].length):-1}function P(q,Y,Z){var L=b.exec(Y.slice(Z));return L?(q.m=x.get(L[0].toLowerCase()),Z+L[0].length):-1}function I(q,Y,Z){var L=y.exec(Y.slice(Z));return L?(q.m=v.get(L[0].toLowerCase()),Z+L[0].length):-1}function C(q,Y,Z){return j(q,t,Y,Z)}function D(q,Y,Z){return j(q,r,Y,Z)}function k(q,Y,Z){return j(q,n,Y,Z)}function B(q){return o[q.getDay()]}function U(q){return i[q.getDay()]}function V(q){return l[q.getMonth()]}function $(q){return s[q.getMonth()]}function R(q){return a[+(q.getHours()>=12)]}function F(q){return 1+~~(q.getMonth()/3)}function W(q){return o[q.getUTCDay()]}function G(q){return i[q.getUTCDay()]}function X(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function ae(q){return a[+(q.getUTCHours()>=12)]}function te(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Y=O(q+="",w);return Y.toString=function(){return q},Y},parse:function(q){var Y=S(q+="",!1);return Y.toString=function(){return q},Y},utcFormat:function(q){var Y=O(q+="",A);return Y.toString=function(){return q},Y},utcParse:function(q){var Y=S(q+="",!0);return Y.toString=function(){return q},Y}}}var Ov={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,vN=/^%/,mN=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function yN(e){return e.replace(mN,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(yN).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function gN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function bN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function xN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function wN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function ON(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Sv(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Tv(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function SN(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function TN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function AN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Av(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function PN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Pv(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function jN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function _N(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function EN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function CN(e,t,r){var n=tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function $N(e,t,r){var n=vN.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function kN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function MN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function jv(e,t){return be(e.getDate(),t,2)}function NN(e,t){return be(e.getHours(),t,2)}function DN(e,t){return be(e.getHours()%12||12,t,2)}function IN(e,t){return be(1+La.count(or(e),e),t,3)}function _v(e,t){return be(e.getMilliseconds(),t,3)}function LN(e,t){return _v(e,t)+"000"}function RN(e,t){return be(e.getMonth()+1,t,2)}function BN(e,t){return be(e.getMinutes(),t,2)}function FN(e,t){return be(e.getSeconds(),t,2)}function WN(e){var t=e.getDay();return t===0?7:t}function UN(e,t){return be(jo.count(or(e)-1,e),t,2)}function Ev(e){var t=e.getDay();return t>=4||t===0?An(e):An.ceil(e)}function zN(e,t){return e=Ev(e),be(An.count(or(e),e)+(or(e).getDay()===4),t,2)}function VN(e){return e.getDay()}function GN(e,t){return be(_o.count(or(e)-1,e),t,2)}function qN(e,t){return be(e.getFullYear()%100,t,2)}function HN(e,t){return e=Ev(e),be(e.getFullYear()%100,t,2)}function KN(e,t){return be(e.getFullYear()%1e4,t,4)}function YN(e,t){var r=e.getDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getFullYear()%1e4,t,4)}function XN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function Cv(e,t){return be(e.getUTCDate(),t,2)}function JN(e,t){return be(e.getUTCHours(),t,2)}function ZN(e,t){return be(e.getUTCHours()%12||12,t,2)}function QN(e,t){return be(1+Po.count(sr(e),e),t,3)}function $v(e,t){return be(e.getUTCMilliseconds(),t,3)}function eD(e,t){return $v(e,t)+"000"}function tD(e,t){return be(e.getUTCMonth()+1,t,2)}function rD(e,t){return be(e.getUTCMinutes(),t,2)}function nD(e,t){return be(e.getUTCSeconds(),t,2)}function aD(e){var t=e.getUTCDay();return t===0?7:t}function iD(e,t){return be(Eo.count(sr(e)-1,e),t,2)}function kv(e){var t=e.getUTCDay();return t>=4||t===0?Pn(e):Pn.ceil(e)}function oD(e,t){return e=kv(e),be(Pn.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function sD(e){return e.getUTCDay()}function lD(e,t){return be(Co.count(sr(e)-1,e),t,2)}function uD(e,t){return be(e.getUTCFullYear()%100,t,2)}function cD(e,t){return e=kv(e),be(e.getUTCFullYear()%100,t,2)}function fD(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function dD(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Pn(e):Pn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function pD(){return"+0000"}function Mv(){return"%"}function Nv(e){return+e}function Dv(e){return Math.floor(+e/1e3)}var jn,Iv,Lv;hD({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hD(e){return jn=hN(e),Iv=jn.format,jn.parse,Lv=jn.utcFormat,jn.utcParse,jn}function vD(e){return new Date(e)}function mD(e){return e instanceof Date?+e:+new Date(+e)}function Iu(e,t,r,n,a,i,o,s,l,u){var c=yu(),f=c.invert,d=c.domain,h=u(".%L"),m=u(":%S"),y=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),x=u("%b %d"),w=u("%B"),A=u("%Y");function g(O){return(l(O)<O?h:s(O)<O?m:o(O)<O?y:i(O)<O?v:n(O)<O?a(O)<O?b:x:r(O)<O?w:A)(O)}return c.invert=function(O){return new Date(f(O))},c.domain=function(O){return arguments.length?d(Array.from(O,mD)):d().map(vD)},c.ticks=function(O){var S=d();return e(S[0],S[S.length-1],O??10)},c.tickFormat=function(O,S){return S==null?g:u(S)},c.nice=function(O){var S=d();return(!O||typeof O.range!="function")&&(O=t(S[0],S[S.length-1],O??10)),O?d(iv(S,O)):c},c.copy=function(){return Da(c,Iu(e,t,r,n,a,i,o,s,l,u))},c}function yD(){return At.apply(Iu(dN,pN,or,ku,jo,La,Cu,_u,Lr,Iv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function gD(){return At.apply(Iu(cN,fN,sr,Mu,Eo,Po,$u,Eu,Lr,Lv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function $o(){var e=0,t=1,r,n,a,i,o=lt,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,m;return arguments.length?([h,m]=d,o=f(h,m),u):[o(0),o(1)]}}return u.range=c(Sn),u.rangeRound=c(vu),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function br(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Rv(){var e=gr($o()(lt));return e.copy=function(){return br(e,Rv())},rr.apply(e,arguments)}function Bv(){var e=xu($o()).domain([1,10]);return e.copy=function(){return br(e,Bv()).base(e.base())},rr.apply(e,arguments)}function Fv(){var e=wu($o());return e.copy=function(){return br(e,Fv()).constant(e.constant())},rr.apply(e,arguments)}function Lu(){var e=Ou($o());return e.copy=function(){return br(e,Lu()).exponent(e.exponent())},rr.apply(e,arguments)}function bD(){return Lu.apply(null,arguments).exponent(.5)}function Wv(){var e=[],t=lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((ja(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(yr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>iM(e,i/n))},r.copy=function(){return Wv(t).domain(e)},rr.apply(r,arguments)}function ko(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=lt,c,f=!1,d;function h(y){return isNaN(y=+y)?d:(y=.5+((y=+c(y))-i)*(n*y<n*i?s:l),u(f?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([e,t,r]=y,a=c(e=+e),i=c(t=+t),o=c(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(y){return arguments.length?(f=!!y,h):f},h.interpolator=function(y){return arguments.length?(u=y,h):u};function m(y){return function(v){var b,x,w;return arguments.length?([b,x,w]=v,u=$M(y,[b,x,w]),h):[u(0),u(.5),u(1)]}}return h.range=m(Sn),h.rangeRound=m(vu),h.unknown=function(y){return arguments.length?(d=y,h):d},function(y){return c=y,a=y(e),i=y(t),o=y(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function Uv(){var e=gr(ko()(lt));return e.copy=function(){return br(e,Uv())},rr.apply(e,arguments)}function zv(){var e=xu(ko()).domain([.1,1,10]);return e.copy=function(){return br(e,zv()).base(e.base())},rr.apply(e,arguments)}function Vv(){var e=wu(ko());return e.copy=function(){return br(e,Vv()).constant(e.constant())},rr.apply(e,arguments)}function Ru(){var e=Ou(ko());return e.copy=function(){return br(e,Ru()).exponent(e.exponent())},rr.apply(e,arguments)}function xD(){return Ru.apply(null,arguments).exponent(.5)}const Gv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ea,scaleDiverging:Uv,scaleDivergingLog:zv,scaleDivergingPow:Ru,scaleDivergingSqrt:xD,scaleDivergingSymlog:Vv,scaleIdentity:av,scaleImplicit:su,scaleLinear:To,scaleLog:uv,scaleOrdinal:lu,scalePoint:Ca,scalePow:Su,scaleQuantile:mv,scaleQuantize:yv,scaleRadial:vv,scaleSequential:Rv,scaleSequentialLog:Bv,scaleSequentialPow:Lu,scaleSequentialQuantile:Wv,scaleSequentialSqrt:bD,scaleSequentialSymlog:Fv,scaleSqrt:eN,scaleSymlog:dv,scaleThreshold:gv,scaleTime:yD,scaleUtc:gD,tickFormat:nv},Symbol.toStringTag,{value:"Module"}));var wD=nn;function OD(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!wD(o):r(o,s)))var s=o,l=i}return l}var qv=OD;function SD(e,t){return e>t}var TD=SD,AD=qv,PD=TD,jD=vn;function _D(e){return e&&e.length?AD(e,jD,PD):void 0}var ED=_D;const xr=$e(ED);function CD(e,t){return e<t}var $D=CD,kD=qv,MD=$D,ND=vn;function DD(e){return e&&e.length?kD(e,ND,MD):void 0}var ID=DD;const Mo=$e(ID);var LD=tl,RD=vr,BD=Up,FD=ft;function WD(e,t){var r=FD(e)?LD:BD;return r(e,RD(t))}var UD=WD,zD=Fp,VD=UD;function GD(e,t){return zD(VD(e,t),1)}var qD=GD;const HD=$e(qD);var KD=Fl;function YD(e,t){return KD(e,t)}var XD=YD;const Fr=$e(XD);var _n=1e9,JD={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wu,Re=!0,jt="[DecimalError] ",Wr=jt+"Invalid argument: ",Bu=jt+"Exponent out of range: ",En=Math.floor,Ur=Math.pow,ZD=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,yt,rt=1e7,Ie=7,Hv=9007199254740991,No=En(Hv/Ie),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ne.comparedTo=ne.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1},ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ie;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ne.dividedBy=ne.div=function(e){return lr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return Ee(lr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return He(this)},ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0},ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0},ne.isInteger=ne.isint=function(){return this.e>this.d.length-2},ne.isNegative=ne.isneg=function(){return this.s<0},ne.isPositive=ne.ispos=function(){return this.s>0},ne.isZero=function(){return this.s===0},ne.lessThan=ne.lt=function(e){return this.cmp(e)<0},ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1},ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(yt))throw Error(jt+"NaN");if(r.s<1)throw Error(jt+(r.s?"NaN":"-Infinity"));return r.eq(yt)?new n(0):(Re=!1,t=lr(Wa(r,i),Wa(e,i),i),Re=!0,Ee(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Jv(t,e):Kv(t,(e.s=-e.s,e))},ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(jt+"NaN");return r.s?(Re=!1,t=lr(r,e,0,1).times(e),Re=!0,r.minus(t)):Ee(new n(r),a)},ne.naturalExponential=ne.exp=function(){return Yv(this)},ne.naturalLogarithm=ne.ln=function(){return Wa(this)},ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Kv(t,e):Jv(t,(e.s=-e.s,e))},ne.precision=ne.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wr+e);if(t=He(a)+1,n=a.d.length-1,r=n*Ie+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ne.squareRoot=ne.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(jt+"NaN")}for(e=He(s),Re=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Vt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=En((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(lr(s,i,o+2)).times(.5),Vt(i.d).slice(0,o)===(t=Vt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Ee(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Re=!0,Ee(n,r)},ne.times=ne.mul=function(e){var t,r,n,a,i,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=h.length,l<u&&(i=d,d=h,h=i,o=l,l=u,u=o),i=[],o=l+u,n=o;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+h[n]*d[a-n-1]+t,i[a--]=s%rt|0,t=s/rt|0;i[a]=(i[a]+t)%rt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Re?Ee(e,f.precision):e},ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zt(e,0,_n),t===void 0?t=n.rounding:zt(t,0,8),Ee(r,e+He(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zr(n,!0):(zt(e,0,_n),t===void 0?t=a.rounding:zt(t,0,8),n=Ee(new a(n),e+1,t),r=zr(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?zr(a):(zt(e,0,_n),t===void 0?t=i.rounding:zt(t,0,8),n=Ee(new i(a),e+He(a)+1,t),r=zr(n.abs(),!1,e+He(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ee(new t(e),He(e)+1,t.rounding)},ne.toNumber=function(){return+this},ne.toPower=ne.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(yt);if(s=new l(s),!s.s){if(e.s<1)throw Error(jt+"Infinity");return s}if(s.eq(yt))return s;if(n=l.precision,e.eq(yt))return Ee(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Hv){for(a=new l(yt),t=Math.ceil(n/Ie+4),Re=!1;r%2&&(a=a.times(s),Zv(a.d,t)),r=En(r/2),r!==0;)s=s.times(s),Zv(s.d,t);return Re=!0,e.s<0?new l(yt).div(a):Ee(a,n)}}else if(i<0)throw Error(jt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Re=!1,a=e.times(Wa(s,n+u)),Re=!0,a=Yv(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=He(a),n=zr(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,_n),t===void 0?t=i.rounding:zt(t,0,8),a=Ee(new i(a),e,t),r=He(a),n=zr(a,e<=r||r<=i.toExpNeg,e)),n},ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zt(e,1,_n),t===void 0?t=n.rounding:zt(t,0,8)),Ee(new n(r),e,t)},ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=He(e),r=e.constructor;return zr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Kv(e,t){var r,n,a,i,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Re?Ee(t,f):t;if(l=e.d,u=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=u.length):(n=u,a=o,s=l.length),o=Math.ceil(f/Ie),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,n=u,u=l,l=n),r=0;i;)r=(l[--i]=l[i]+u[i]+r)/rt|0,l[i]%=rt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Re?Ee(t,f):t}function zt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Wr+e)}function Vt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Ie-n.length,r&&(i+=wr(r)),i+=n;o=e[t],n=o+"",r=Ie-n.length,r&&(i+=wr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var lr=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%rt|0,o=i/rt|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*rt+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,u,c,f,d,h,m,y,v,b,x,w,A,g,O,S,j,E=n.constructor,M=n.s==a.s?1:-1,_=n.d,P=a.d;if(!n.s)return new E(n);if(!a.s)throw Error(jt+"Division by zero");for(l=n.e-a.e,S=P.length,g=_.length,h=new E(M),m=h.d=[],u=0;P[u]==(_[u]||0);)++u;if(P[u]>(_[u]||0)&&--l,i==null?x=i=E.precision:o?x=i+(He(n)-He(a))+1:x=i,x<0)return new E(0);if(x=x/Ie+2|0,u=0,S==1)for(c=0,P=P[0],x++;(u<g||c)&&x--;u++)w=c*rt+(_[u]||0),m[u]=w/P|0,c=w%P|0;else{for(c=rt/(P[0]+1)|0,c>1&&(P=e(P,c),_=e(_,c),S=P.length,g=_.length),A=S,y=_.slice(0,S),v=y.length;v<S;)y[v++]=0;j=P.slice(),j.unshift(0),O=P[0],P[1]>=rt/2&&++O;do c=0,s=t(P,y,S,v),s<0?(b=y[0],S!=v&&(b=b*rt+(y[1]||0)),c=b/O|0,c>1?(c>=rt&&(c=rt-1),f=e(P,c),d=f.length,v=y.length,s=t(f,y,d,v),s==1&&(c--,r(f,S<d?j:P,d))):(c==0&&(s=c=1),f=P.slice()),d=f.length,d<v&&f.unshift(0),r(y,f,v),s==-1&&(v=y.length,s=t(P,y,S,v),s<1&&(c++,r(y,S<v?j:P,v))),v=y.length):s===0&&(c++,y=[0]),m[u++]=c,s&&y[0]?y[v++]=_[A]||0:(y=[_[A]],v=1);while((A++<g||y[0]!==void 0)&&x--)}return m[0]||m.shift(),h.e=l,Ee(h,o?i+He(h)+1:i)}}();function Yv(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(He(e)>16)throw Error(Bu+He(e));if(!e.s)return new c(yt);for(Re=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Ur(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(yt),c.precision=s;;){if(a=Ee(a.times(e),s),r=r.times(++l),o=i.plus(lr(a,r,s)),Vt(o.d).slice(0,s)===Vt(i.d).slice(0,s)){for(;u--;)i=Ee(i.times(i),s);return c.precision=f,t==null?(Re=!0,Ee(i,f)):i}i=o}}function He(e){for(var t=e.e*Ie,r=e.d[0];r>=10;r/=10)t++;return t}function Fu(e,t,r){if(t>e.LN10.sd())throw Re=!0,r&&(e.precision=r),Error(jt+"LN10 precision limit exceeded");return Ee(new e(e.LN10),t)}function wr(e){for(var t="";e--;)t+="0";return t}function Wa(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,h=e,m=h.d,y=h.constructor,v=y.precision;if(h.s<1)throw Error(jt+(h.s?"NaN":"-Infinity"));if(h.eq(yt))return new y(0);if(t==null?(Re=!1,u=v):u=t,h.eq(10))return t==null&&(Re=!0),Fu(y,u);if(u+=d,y.precision=u,r=Vt(m),n=r.charAt(0),i=He(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Vt(h.d),n=r.charAt(0),f++;i=He(h),n>1?(h=new y("0."+r),i++):h=new y(n+"."+r.slice(1))}else return l=Fu(y,u+2,v).times(i+""),h=Wa(new y(n+"."+r.slice(1)),u-d).plus(l),y.precision=v,t==null?(Re=!0,Ee(h,v)):h;for(s=o=h=lr(h.minus(yt),h.plus(yt),u),c=Ee(h.times(h),u),a=3;;){if(o=Ee(o.times(c),u),l=s.plus(lr(o,new y(a),u)),Vt(l.d).slice(0,u)===Vt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Fu(y,u+2,v).times(i+""))),s=lr(s,new y(f),u),y.precision=v,t==null?(Re=!0,Ee(s,v)):s;s=l,a+=2}}function Xv(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=En(r/Ie),e.d=[],n=(r+1)%Ie,r<0&&(n+=Ie),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ie;n<a;)e.d.push(+t.slice(n,n+=Ie));t=t.slice(n),n=Ie-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Re&&(e.e>No||e.e<-No))throw Error(Bu+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ee(e,t,r){var n,a,i,o,s,l,u,c,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Ie,a=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Ie),i=f.length,c>=i)return e;for(u=i=f[c],o=1;i>=10;i/=10)o++;n%=Ie,a=n-Ie+o}if(r!==void 0&&(i=Ur(10,o-a-1),s=u/i%10|0,l=t<0||f[c+1]!==void 0||u%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?u/Ur(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=He(e),f.length=1,t=t-i-1,f[0]=Ur(10,(Ie-t%Ie)%Ie),e.e=En(-t/Ie)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,i=1,c--):(f.length=c+1,i=Ur(10,Ie-n),f[c]=a>0?(u/Ur(10,o-a)%Ur(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==rt&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=rt)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Re&&(e.e>No||e.e<-No))throw Error(Bu+He(e));return e}function Jv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Re?Ee(t,h):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),a=Math.max(Math.ceil(h/Ie),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,c=a<s,c&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){c=l[a]<f[a];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=rt-1;--l[i],l[a]+=rt}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Re?Ee(t,h):t):new d(0)}function zr(e,t,r){var n,a=He(e),i=Vt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+wr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+wr(-a-1)+i,r&&(n=r-o)>0&&(i+=wr(n))):a>=o?(i+=wr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+wr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=wr(n))),e.s<0?"-"+i:i}function Zv(e,t){if(e.length>t)return e.length=t,!0}function Qv(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Wr+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Xv(o,i.toString())}else if(typeof i!="string")throw Error(Wr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,ZD.test(i))Xv(o,i);else throw Error(Wr+i)}if(a.prototype=ne,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Qv,a.config=a.set=QD,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function QD(e){if(!e||typeof e!="object")throw Error(jt+"Object expected");var t,r,n,a=["precision",1,_n,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(En(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Wr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Wr+r+": "+n);return this}var Wu=Qv(JD);yt=new Wu(1);const _e=Wu;function e3(e){return a3(e)||n3(e)||r3(e)||t3()}function t3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
188
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r3(e,t){if(e){if(typeof e=="string")return Uu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uu(e,t)}}function n3(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function a3(e){if(Array.isArray(e))return Uu(e)}function Uu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i3=function(t){return t},em={},tm=function(t){return t===em},rm=function(t){return function r(){return arguments.length===0||arguments.length===1&&tm(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},o3=function e(t,r){return t===1?r:rm(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==em}).length;return o>=t?r.apply(void 0,a):e(t-o,rm(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.map(function(f){return tm(f)?l.shift():f});return r.apply(void 0,e3(c).concat(l))}))})},Do=function(t){return o3(t.length,t)},zu=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},s3=Do(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),l3=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return i3;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Vu=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},nm=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function u3(e){var t;return e===0?t=1:t=Math.floor(new _e(e).abs().log(10).toNumber())+1,t}function c3(e,t,r){for(var n=new _e(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var f3=Do(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),d3=Do(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),p3=Do(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Io={rangeStep:c3,getDigitCount:u3,interpolateNumber:f3,uninterpolateNumber:d3,uninterpolateTruncation:p3};function Gu(e){return m3(e)||v3(e)||am(e)||h3()}function h3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
189
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v3(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function m3(e){if(Array.isArray(e))return qu(e)}function Ua(e,t){return b3(e)||g3(e,t)||am(e,t)||y3()}function y3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
190
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function am(e,t){if(e){if(typeof e=="string")return qu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qu(e,t)}}function qu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g3(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function b3(e){if(Array.isArray(e))return e}function im(e){var t=Ua(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function om(e,t,r){if(e.lte(0))return new _e(0);var n=Io.getDigitCount(e.toNumber()),a=new _e(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new _e(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new _e(Math.ceil(l))}function x3(e,t,r){var n=1,a=new _e(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new _e(10).pow(Io.getDigitCount(e)-1),a=new _e(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new _e(Math.floor(e)))}else e===0?a=new _e(Math.floor((t-1)/2)):r||(a=new _e(Math.floor(e)));var o=Math.floor((t-1)/2),s=l3(s3(function(l){return a.add(new _e(l-o).mul(n)).toNumber()}),zu);return s(0,t)}function sm(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new _e(0),tickMin:new _e(0),tickMax:new _e(0)};var i=om(new _e(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new _e(0):(o=new _e(e).add(t).div(2),o=o.sub(new _e(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new _e(t).sub(o).div(i).toNumber()),u=s+l+1;return u>r?sm(e,t,r,n,a+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:i,tickMin:o.sub(new _e(s).mul(i)),tickMax:o.add(new _e(l).mul(i))})}function w3(e){var t=Ua(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=im([r,n]),l=Ua(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Gu(zu(0,a-1).map(function(){return 1/0}))):[].concat(Gu(zu(0,a-1).map(function(){return-1/0})),[c]);return r>n?Vu(f):f}if(u===c)return x3(u,a,i);var d=sm(u,c,o,i),h=d.step,m=d.tickMin,y=d.tickMax,v=Io.rangeStep(m,y.add(new _e(.1).mul(h)),h);return r>n?Vu(v):v}function O3(e,t){var r=Ua(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=im([n,a]),s=Ua(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var c=Math.max(t,2),f=om(new _e(u).sub(l).div(c-1),i,0),d=[].concat(Gu(Io.rangeStep(new _e(l),new _e(u).sub(new _e(.99).mul(f)),f)),[u]);return n>a?Vu(d):d}var S3=nm(w3),T3=nm(O3),A3=process.env.NODE_ENV==="production",Hu="Invariant failed";function ht(e,t){if(A3)throw new Error(Hu);var r=typeof t=="function"?t():t,n=r?"".concat(Hu,": ").concat(r):Hu;throw new Error(n)}var P3=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Cn(e){"@babel/helpers - typeof";return Cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cn(e)}function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lo.apply(this,arguments)}function j3(e,t){return $3(e)||C3(e,t)||E3(e,t)||_3()}function _3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
191
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E3(e,t){if(e){if(typeof e=="string")return lm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lm(e,t)}}function lm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function $3(e){if(Array.isArray(e))return e}function k3(e,t){if(e==null)return{};var r=M3(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function M3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function N3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D3(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fm(n.key),n)}}function I3(e,t,r){return t&&D3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function L3(e,t,r){return t=Ro(t),R3(e,um()?Reflect.construct(t,r||[],Ro(e).constructor):t.apply(e,r))}function R3(e,t){if(t&&(Cn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B3(e)}function B3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function um(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(um=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}function F3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ku(e,t)}function Ku(e,t){return Ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ku(e,t)}function cm(e,t,r){return t=fm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fm(e){var t=W3(e,"string");return Cn(t)=="symbol"?t:t+""}function W3(e,t){if(Cn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $n=function(e){function t(){return N3(this,t),L3(this,t,arguments)}return F3(t,e),I3(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,d=k3(n,P3),h=de(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?ht(!1,'ErrorBar requires Axis type property to be "number".'):ht());var m=l.map(function(y){var v=u(y,s),b=v.x,x=v.y,w=v.value,A=v.errorVal;if(!A)return null;var g=[],O,S;if(Array.isArray(A)){var j=j3(A,2);O=j[0],S=j[1]}else O=S=A;if(i==="vertical"){var E=c.scale,M=x+a,_=M+o,P=M-o,I=E(w-O),C=E(w+S);g.push({x1:C,y1:_,x2:C,y2:P}),g.push({x1:I,y1:M,x2:C,y2:M}),g.push({x1:I,y1:_,x2:I,y2:P})}else if(i==="horizontal"){var D=f.scale,k=b+a,B=k-o,U=k+o,V=D(w-O),$=D(w+S);g.push({x1:B,y1:$,x2:U,y2:$}),g.push({x1:k,y1:V,x2:k,y2:$}),g.push({x1:B,y1:V,x2:U,y2:V})}return T.createElement(xe,Lo({className:"recharts-errorBar",key:"bar-".concat(g.map(function(R){return"".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))},h),g.map(function(R){return T.createElement("line",Lo({},R,{key:"line-".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))}))});return T.createElement(xe,{className:"recharts-errorBars"},m)}}])}(T.Component);cm($n,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),cm($n,"displayName","ErrorBar");function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dm(Object(r),!0).forEach(function(n){U3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U3(e,t,r){return t=z3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z3(e){var t=V3(e,"string");return za(t)=="symbol"?t:t+""}function V3(e,t){if(za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pm=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=mt(r,yn);if(!o)return null;var s=yn.defaultProps,l=s!==void 0?Vr(Vr({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(n||[]).reduce(function(c,f){var d=f.item,h=f.props,m=h.sectors||h.data||[];return c.concat(m.map(function(y){return{type:o.props.iconType||d.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,h=d!==void 0?Vr(Vr({},d),f.props):{},m=h.dataKey,y=h.name,v=h.legendType,b=h.hide;return{inactive:b,dataKey:m,type:l.iconType||v||"square",color:Xu(f),value:y||m,payload:h}}),Vr(Vr(Vr({},l),yn.getWithHeight(o,a)),{},{payload:u,item:o})};function Va(e){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}function hm(e){return K3(e)||H3(e)||q3(e)||G3()}function G3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q3(e,t){if(e){if(typeof e=="string")return Yu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yu(e,t)}}function H3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K3(e){if(Array.isArray(e))return Yu(e)}function Yu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vm(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(e,t,r){return t=Y3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y3(e){var t=X3(e,"string");return Va(t)=="symbol"?t:t+""}function X3(e,t){if(Va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ze(e,t,r){return fe(e)||fe(t)?r:Xe(t)?wt(e,t,r):pe(t)?t(e):r}function Ga(e,t,r,n){var a=HD(e,function(s){return Ze(s,t)});if(r==="number"){var i=a.filter(function(s){return J(s)||parseFloat(s)});return i.length?[Mo(i),xr(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Xe(s)||s instanceof Date?s:""})}var J3=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u<s;u++){var c=u>0?a[u-1].coordinate:a[s-1].coordinate,f=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,h=void 0;if($t(f-c)!==$t(d-f)){var m=[];if($t(d-f)===$t(l[1]-l[0])){h=d;var y=f+l[1]-l[0];m[0]=Math.min(y,(y+c)/2),m[1]=Math.max(y,(y+c)/2)}else{h=c;var v=d+l[1]-l[0];m[0]=Math.min(f,(v+f)/2),m[1]=Math.max(f,(v+f)/2)}var b=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>b[0]&&t<=b[1]||t>=m[0]&&t<=m[1]){o=a[u].index;break}}else{var x=Math.min(c,d),w=Math.max(c,d);if(t>(x+f)/2&&t<=(w+f)/2){o=a[u].index;break}}}else for(var A=0;A<s;A++)if(A===0&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A===s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2){o=n[A].index;break}return o},Xu=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},Z3=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,u=s.length;l<u;l++)for(var c=i[s[l]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var m=c[f[d]],y=m.items,v=m.cateAxisId,b=y.filter(function(S){return Qt(S.type).indexOf("Bar")>=0});if(b&&b.length){var x=b[0].type.defaultProps,w=x!==void 0?We(We({},x),b[0].props):b[0].props,A=w.barSize,g=w[v];o[g]||(o[g]=[]);var O=fe(A)?r:A;o[g].push({item:b[0],stackList:b.slice(1),barSize:fe(O)?void 0:kr(O,n,0)})}}return o},Q3=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=kr(r,a,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,m=o.reduce(function(A,g){return A+g.barSize||0},0);m+=(l-1)*u,m>=a&&(m-=(l-1)*u,u=0),m>=a&&h>0&&(d=!0,h*=.9,m=l*h);var y=(a-m)/2>>0,v={offset:y-u,size:0};c=o.reduce(function(A,g){var O={item:g.item,position:{offset:v.offset+v.size+u,size:d?h:g.barSize}},S=[].concat(hm(A),[O]);return v=S[S.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(j){S.push({item:j,position:v})}),S},f)}else{var b=kr(n,a,0,!0);a-2*b-(l-1)*u<=0&&(u=0);var x=(a-2*b-(l-1)*u)/l;x>1&&(x>>=0);var w=s===+s?Math.min(x,s):x;c=o.reduce(function(A,g,O){var S=[].concat(hm(A),[{item:g.item,position:{offset:b+(x+u)*O+(x-w)/2,size:w}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(j){S.push({item:j,position:S[S.length-1].position})}),S},f)}return c},eI=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=pm({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,h=u.align,m=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&m==="middle")&&h!=="center"&&J(t[h]))return We(We({},t),{},kn({},h,t[h]+(f||0)));if((y==="horizontal"||y==="vertical"&&h==="center")&&m!=="middle"&&J(t[m]))return We(We({},t),{},kn({},m,t[m]+(d||0)))}return t},tI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},mm=function(t,r,n,a,i){var o=r.props.children,s=dt(o,$n).filter(function(u){return tI(a,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ze(c,n);if(fe(f))return u;var d=Array.isArray(f)?[Mo(f),xr(f)]:[f,f],h=l.reduce(function(m,y){var v=Ze(c,y,0),b=d[0]-Math.abs(Array.isArray(v)?v[0]:v),x=d[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(b,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},rI=function(t,r,n,a,i){var o=r.map(function(s){return mm(t,s,n,i,a)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},ym=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&mm(t,l,u,a)||Ga(t,u,n,i)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},gm=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},bm=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},ur=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?$t(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:a(d)+u,value:f,offset:u}});return c.filter(function(f){return!un(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+u,value:f,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,d){return{coordinate:a(f)+u,value:i?i[f]:f,index:d,offset:u}})},Ju=new WeakMap,Bo=function(t,r){if(typeof r!="function")return t;Ju.has(t)||Ju.set(t,new WeakMap);var n=Ju.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},nI=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Ea(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:To(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ca(),realScaleType:"point"}:i==="category"?{scale:Ea(),realScaleType:"band"}:{scale:To(),realScaleType:"linear"};if(Er(a)){var l="scale".concat(Fi(a));return{scale:(Gv[l]||Ca)(),realScaleType:Gv[l]?l:"point"}}return pe(a)?{scale:a}:{scale:Ca(),realScaleType:"point"}},xm=1e-4,aI=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-xm,o=Math.max(a[0],a[1])+xm,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},iI=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},oI=function(t,r){if(!r||r.length!==2||!J(r[0])||!J(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!J(t[0])||t[0]<n)&&(i[0]=n),(!J(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},sI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=un(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},lI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=un(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},uI={sign:sI,expand:TT,none:fn,silhouette:AT,wiggle:PT,positive:lI},cI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=uI[n],o=ST().keys(a).value(function(s,l){return+Ze(s,l,0)}).order(Tl).offset(i);return o(t)},fI=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var h,m=(h=d.type)!==null&&h!==void 0&&h.defaultProps?We(We({},d.type.defaultProps),d.props):d.props,y=m.stackId,v=m.hide;if(v)return f;var b=m[n],x=f[b]||{hasStack:!1,stackGroups:{}};if(Xe(y)){var w=x.stackGroups[y]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),x.hasStack=!0,x.stackGroups[y]=w}else x.stackGroups[$r("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return We(We({},f),{},kn({},b,x))},l),c={};return Object.keys(u).reduce(function(f,d){var h=u[d];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(y,v){var b=h.stackGroups[v];return We(We({},y),{},kn({},v,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:cI(t,b.items,i)}))},m)}return We(We({},f),{},kn({},d,h))},c)},dI=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=S3(u,i,s);return t.domain([Mo(c),xr(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=T3(f,i,s);return{niceTicks:d}}return null};function Mn(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(a[t.dataKey])){var s=Ri(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Ze(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var wm=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=Ze(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},pI=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},hI=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Xe(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},vI=function(t){return t.reduce(function(r,n){return[Mo(n.concat([r[0]]).filter(J)),xr(n.concat([r[1]]).filter(J))]},[1/0,-1/0])},Om=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(u,c){var f=vI(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},Sm=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Tm=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zu=function(t,r,n){if(pe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(J(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(Sm.test(t[0])){var i=+Sm.exec(t[0])[1];a[0]=r[0]-i}else pe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(J(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Tm.test(t[1])){var o=+Tm.exec(t[1])[1];a[1]=r[1]+o}else pe(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Fo=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Gl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var u=i[s],c=i[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Am=function(t,r,n){return!t||!t.length||Fr(t,wt(n,"type.defaultProps.domain"))?r:t},Pm=function(t,r){var n=t.type.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return We(We({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Xu(t),value:Ze(r,a),type:l,payload:r,chartType:u,hide:c})};function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(n){mI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mI(e,t,r){return t=yI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yI(e){var t=gI(e,"string");return qa(t)=="symbol"?t:t+""}function gI(e,t){if(qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wo=Math.PI/180,bI=function(t){return t*180/Math.PI},nt=function(t,r,n,a){return{x:t+Math.cos(-Wo*a)*n,y:r+Math.sin(-Wo*a)*n}},xI=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},wI=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=xI({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,u=Math.acos(l);return a>o&&(u=2*Math.PI-u),{radius:s,angle:bI(u),angleInRadian:u}},OI=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},SI=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},Em=function(t,r){var n=t.x,a=t.y,i=wI({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=OI(r),f=c.startAngle,d=c.endAngle,h=s,m;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=f}return m?_m(_m({},r),{},{radius:o,angle:SI(h,r)}):null};function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}var TI=["offset"];function AI(e){return EI(e)||_I(e)||jI(e)||PI()}function PI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
193
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jI(e,t){if(e){if(typeof e=="string")return Qu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qu(e,t)}}function _I(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EI(e){if(Array.isArray(e))return Qu(e)}function Qu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CI(e,t){if(e==null)return{};var r=$I(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $I(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cm(Object(r),!0).forEach(function(n){kI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kI(e,t,r){return t=MI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MI(e){var t=NI(e,"string");return Ha(t)=="symbol"?t:t+""}function NI(e,t){if(Ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ka(){return Ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ka.apply(this,arguments)}var DI=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return pe(n)?n(a):a},II=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),360);return n*a},LI=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,u=l.cx,c=l.cy,f=l.innerRadius,d=l.outerRadius,h=l.startAngle,m=l.endAngle,y=l.clockWise,v=(f+d)/2,b=II(h,m),x=b>=0?1:-1,w,A;a==="insideStart"?(w=h+x*o,A=y):a==="insideEnd"?(w=m-x*o,A=!y):a==="end"&&(w=m+x*o,A=y),A=b<=0?A:!A;var g=nt(u,c,v,w),O=nt(u,c,v,w+(A?1:-1)*359),S="M".concat(g.x,",").concat(g.y,`
185
+ height and width.`,D,M,o,l,u,f,r);var B=!Array.isArray(h)&&Qt(h.type).endsWith("Chart");return T.Children.map(h,function(U){return T.isValidElement(U)?T.cloneElement(U,co({width:D,height:M},B?{style:co({height:"100%",width:"100%",maxHeight:M,maxWidth:D},U.props.style)}:{})):U})},[r,h,l,d,f,u,$,o]);return T.createElement("div",{id:v?"".concat(v):void 0,className:me("recharts-responsive-container",x),style:co(co({},A),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:d}),ref:y},C)}),Ql=function(t){return null};Ql.displayName="Cell";function Ta(e){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(e)}function ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){bk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bk(e,t,r){return t=xk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xk(e){var t=wk(e,"string");return Ta(t)=="symbol"?t:t+""}function wk(e,t){if(Ta(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ta(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn={widthCache:{},cacheCount:0},Ok=2e3,Sk={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},hh="recharts_measurement_span";function Tk(e){var t=ec({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Aa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||mr.isSsr)return{width:0,height:0};var n=Tk(r),a=JSON.stringify({text:t,copyStyle:n});if(xn.widthCache[a])return xn.widthCache[a];try{var i=document.getElementById(hh);i||(i=document.createElement("span"),i.setAttribute("id",hh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=ec(ec({},Sk),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return xn.widthCache[a]=l,++xn.cacheCount>Ok&&(xn.cacheCount=0,xn.widthCache={}),l}catch{return{width:0,height:0}}},Ak=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Pa(e){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(e)}function uo(e,t){return Ek(e)||_k(e,t)||jk(e,t)||Pk()}function Pk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
186
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jk(e,t){if(e){if(typeof e=="string")return vh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vh(e,t)}}function vh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _k(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Ek(e){if(Array.isArray(e))return e}function Ck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kk(n.key),n)}}function $k(e,t,r){return t&&mh(e.prototype,t),r&&mh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function kk(e){var t=Mk(e,"string");return Pa(t)=="symbol"?t:t+""}function Mk(e,t){if(Pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Nk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Dk=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Ik=Object.keys(bh),wn="NaN";function Lk(e,t){return e*bh[t]}var fo=function(){function e(t,r){Ck(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Nk.test(r)&&(this.num=NaN,this.unit=""),Ik.includes(r)&&(this.num=Lk(t,r),this.unit="px")}return $k(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=Dk.exec(r))!==null&&n!==void 0?n:[],i=uo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function xh(e){if(e.includes(wn))return wn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=yh.exec(t))!==null&&r!==void 0?r:[],a=uo(n,4),i=a[1],o=a[2],s=a[3],l=fo.parse(i??""),c=fo.parse(s??""),u=o==="*"?l.multiply(c):l.divide(c);if(u.isNaN())return wn;t=t.replace(yh,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=gh.exec(t))!==null&&f!==void 0?f:[],h=uo(d,4),m=h[1],g=h[2],v=h[3],x=fo.parse(m??""),b=fo.parse(v??""),w=g==="+"?x.add(b):x.subtract(b);if(w.isNaN())return wn;t=t.replace(gh,w.toString())}return t}var wh=/\(([^()]*)\)/;function Rk(e){for(var t=e;t.includes("(");){var r=wh.exec(t),n=uo(r,2),a=n[1];t=t.replace(wh,xh(a))}return t}function Bk(e){var t=e.replace(/\s+/g,"");return t=Rk(t),t=xh(t),t}function Fk(e){try{return Bk(e)}catch{return wn}}function tc(e){var t=Fk(e.slice(5,-1));return t===wn?"":t}var Wk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Uk=["dx","dy","angle","className","breakAll"];function rc(){return rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rc.apply(this,arguments)}function Oh(e,t){if(e==null)return{};var r=zk(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sh(e,t){return Kk(e)||qk(e,t)||Gk(e,t)||Vk()}function Vk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
187
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gk(e,t){if(e){if(typeof e=="string")return Th(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Th(e,t)}}function Th(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Kk(e){if(Array.isArray(e))return e}var Ah=/[ \f\n\r\t\v\u2028\u2029]+/,Ph=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];fe(r)||(n?i=r.toString().split(""):i=r.toString().split(Ah));var o=i.map(function(l){return{word:l,width:Aa(l,a).width}}),s=n?0:Aa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},Hk=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=J(o),f=s,d=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(M,B){var U=B.word,V=B.width,E=M[M.length-1];if(E&&(a==null||i||E.width+V+n<Number(a)))E.words.push(U),E.width+=V+n;else{var R={words:[U],width:V};M.push(R)}return M},[])},h=d(r),m=function(D){return D.reduce(function(M,B){return M.width>B.width?M:B})};if(!u)return h;for(var g="…",v=function(D){var M=f.slice(0,D),B=Ph({breakAll:c,style:l,children:M+g}).wordsWithComputedWidth,U=d(B),V=U.length>o||m(U).width>Number(a);return[V,U]},x=0,b=f.length-1,w=0,A;x<=b&&w<=f.length-1;){var y=Math.floor((x+b)/2),O=y-1,S=v(O),P=Sh(S,2),$=P[0],N=P[1],j=v(y),C=Sh(j,1),k=C[0];if(!$&&!k&&(x=y+1),$&&k&&(b=y-1),!$&&k){A=N;break}w++}return A||h},jh=function(t){var r=fe(t)?[]:t.toString().split(Ah);return[{words:r}]},Yk=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!mr.isSsr){var l,c,u=Ph({breakAll:o,children:a,style:i});if(u){var f=u.wordsWithComputedWidth,d=u.spaceWidth;l=f,c=d}else return jh(a);return Hk({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return jh(a)},_h="#808080",po=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,f=u===void 0?!1:u,d=t.textAnchor,h=d===void 0?"start":d,m=t.verticalAnchor,g=m===void 0?"end":m,v=t.fill,x=v===void 0?_h:v,b=Oh(t,Wk),w=T.useMemo(function(){return Yk({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),A=b.dx,y=b.dy,O=b.angle,S=b.className,P=b.breakAll,$=Oh(b,Uk);if(!Xe(n)||!Xe(i))return null;var N=n+(J(A)?A:0),j=i+(J(y)?y:0),C;switch(g){case"start":C=tc("calc(".concat(c,")"));break;case"middle":C=tc("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:C=tc("calc(".concat(w.length-1," * -").concat(s,")"));break}var k=[];if(f){var _=w[0].width,D=b.width;k.push("scale(".concat((J(D)?D/_:1)/_,")"))}return O&&k.push("rotate(".concat(O,", ").concat(N,", ").concat(j,")")),k.length&&($.transform=k.join(" ")),T.createElement("text",rc({},de($,!0),{x:N,y:j,className:me("recharts-text",S),textAnchor:h,fill:x.includes("url")?_h:x}),w.map(function(M,B){var U=M.words.join(P?"":" ");return T.createElement("tspan",{x:N,dy:B===0?C:s,key:"".concat(U,"-").concat(B)},U)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xk(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nc(e){let t,r,n;e.length!==2?(t=yr,r=(s,l)=>yr(e(s),l),n=(s,l)=>e(s)-l):(t=e===yr||e===Xk?e:Jk,r=e,n=e);function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(s,l,c=0,u=s.length){const f=a(s,l,c,u-1);return f>c&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function Jk(){return 0}function Eh(e){return e===null?NaN:+e}function*Zk(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const ja=nc(yr).right;nc(Eh).center;class Ch extends Map{constructor(t,r=tM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get($h(this,t))}has(t){return super.has($h(this,t))}set(t,r){return super.set(Qk(this,t),r)}delete(t){return super.delete(eM(this,t))}}function $h({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Qk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function eM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function tM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function rM(e=yr){if(e===yr)return kh;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function kh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const nM=Math.sqrt(50),aM=Math.sqrt(10),iM=Math.sqrt(2);function ho(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=nM?10:i>=aM?5:i>=iM?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?ho(e,t,r*2):[s,l,c]}function ac(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?ho(t,e,r):ho(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(i-c)/-o;else for(let c=0;c<s;++c)l[c]=(i-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(a+c)/-o;else for(let c=0;c<s;++c)l[c]=(a+c)*o;return l}function ic(e,t,r){return t=+t,e=+e,r=+r,ho(e,t,r)[2]}function oc(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?ic(t,e,r):ic(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Mh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Nh(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Dh(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?kh:rM(a);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),h=Math.max(r,Math.floor(t-c*f/l+d)),m=Math.min(n,Math.floor(t+(l-c)*f/l+d));Dh(e,t,h,m,a)}const i=e[t];let o=r,s=n;for(_a(e,r,t),a(e[n],i)>0&&_a(e,r,n);o<s;){for(_a(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?_a(e,r,s):(++s,_a(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function _a(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function oM(e,t,r){if(e=Float64Array.from(Zk(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Nh(e);if(t>=1)return Mh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Mh(Dh(e,i).subarray(0,i+1)),s=Nh(e.subarray(i+1));return o+(s-o)*(a-i)}}function sM(e,t,r=Eh){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function lM(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function At(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const sc=Symbol("implicit");function lc(){var e=new Ch,t=[],r=[],n=sc;function a(i){let o=e.get(i);if(o===void 0){if(n!==sc)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Ch;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return lc(t,r).unknown(n)},At.apply(a,arguments),a}function Ea(){var e=lc().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,c=0,u=.5;delete e.unknown;function f(){var d=t().length,h=a<n,m=h?a:n,g=h?n:a;i=(g-m)/Math.max(1,d-l+c*2),s&&(i=Math.floor(i)),m+=(g-m-i*(d-l))*u,o=i*(1-l),s&&(m=Math.round(m),o=Math.round(o));var v=lM(d).map(function(x){return m+i*x});return r(h?v.reverse():v)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,c=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(c=+d,f()):c},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return Ea(t(),[n,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},At.apply(f(),arguments)}function Ih(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ih(t())},e}function Ca(){return Ih(Ea.apply(null,arguments).paddingInner(1))}function cc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Lh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function $a(){}var ka=.7,vo=1/ka,On="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cM=/^#([0-9a-f]{3,8})$/,uM=new RegExp(`^rgb\\(${On},${On},${On}\\)$`),fM=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),dM=new RegExp(`^rgba\\(${On},${On},${On},${Ma}\\)$`),pM=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Ma}\\)$`),hM=new RegExp(`^hsl\\(${Ma},${Ut},${Ut}\\)$`),vM=new RegExp(`^hsla\\(${Ma},${Ut},${Ut},${Ma}\\)$`),Rh={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};cc($a,Na,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bh,formatHex:Bh,formatHex8:mM,formatHsl:yM,formatRgb:Fh,toString:Fh});function Bh(){return this.rgb().formatHex()}function mM(){return this.rgb().formatHex8()}function yM(){return Gh(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function Na(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=cM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Wh(t):r===3?new pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uM.exec(e))?new pt(t[1],t[2],t[3],1):(t=fM.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dM.exec(e))?mo(t[1],t[2],t[3],t[4]):(t=pM.exec(e))?mo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hM.exec(e))?Vh(t[1],t[2]/100,t[3]/100,1):(t=vM.exec(e))?Vh(t[1],t[2]/100,t[3]/100,t[4]):Rh.hasOwnProperty(e)?Wh(Rh[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Wh(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function mo(e,t,r,n){return n<=0&&(e=t=r=NaN),new pt(e,t,r,n)}function gM(e){return e instanceof $a||(e=Na(e)),e?(e=e.rgb(),new pt(e.r,e.g,e.b,e.opacity)):new pt}function uc(e,t,r,n){return arguments.length===1?gM(e):new pt(e,t,r,n??1)}function pt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}cc(pt,uc,Lh($a,{brighter(e){return e=e==null?vo:Math.pow(vo,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(Dr(this.r),Dr(this.g),Dr(this.b),yo(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:Uh,formatHex:Uh,formatHex8:bM,formatRgb:zh,toString:zh}));function Uh(){return`#${Ir(this.r)}${Ir(this.g)}${Ir(this.b)}`}function bM(){return`#${Ir(this.r)}${Ir(this.g)}${Ir(this.b)}${Ir((isNaN(this.opacity)?1:this.opacity)*255)}`}function zh(){const e=yo(this.opacity);return`${e===1?"rgb(":"rgba("}${Dr(this.r)}, ${Dr(this.g)}, ${Dr(this.b)}${e===1?")":`, ${e})`}`}function yo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ir(e){return e=Dr(e),(e<16?"0":"")+e.toString(16)}function Vh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,r,n)}function Gh(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=Na(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new Mt(o,s,l,e.opacity)}function xM(e,t,r,n){return arguments.length===1?Gh(e):new Mt(e,t,r,n??1)}function Mt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}cc(Mt,xM,Lh($a,{brighter(e){return e=e==null?vo:Math.pow(vo,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new Mt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new pt(fc(e>=240?e-240:e+120,a,n),fc(e,a,n),fc(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mt(qh(this.h),go(this.s),go(this.l),yo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=yo(this.opacity);return`${e===1?"hsl(":"hsla("}${qh(this.h)}, ${go(this.s)*100}%, ${go(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qh(e){return e=(e||0)%360,e<0?e+360:e}function go(e){return Math.max(0,Math.min(1,e||0))}function fc(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const dc=e=>()=>e;function wM(e,t){return function(r){return e+r*t}}function OM(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function SM(e){return(e=+e)==1?Kh:function(t,r){return r-t?OM(t,r,e):dc(isNaN(t)?r:t)}}function Kh(e,t){var r=t-e;return r?wM(e,r):dc(isNaN(e)?t:e)}const Hh=function e(t){var r=SM(t);function n(a,i){var o=r((a=uc(a)).r,(i=uc(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),c=Kh(a.opacity,i.opacity);return function(u){return a.r=o(u),a.g=s(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function TM(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function AM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function PM(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=Sn(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function jM(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function bo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function _M(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Sn(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var pc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hc=new RegExp(pc.source,"g");function EM(e){return function(){return e}}function CM(e){return function(t){return e(t)+""}}function $M(e,t){var r=pc.lastIndex=hc.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=pc.exec(e))&&(a=hc.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:bo(n,a)})),r=hc.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?CM(l[0].x):EM(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)s[(f=l[u]).i]=f.x(c);return s.join("")})}function Sn(e,t){var r=typeof t,n;return t==null||r==="boolean"?dc(t):(r==="number"?bo:r==="string"?(n=Na(t))?(t=n,Hh):$M:t instanceof Na?Hh:t instanceof Date?jM:AM(t)?TM:Array.isArray(t)?PM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?_M:bo)(e,t)}function vc(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function kM(e,t){t===void 0&&(t=e,e=Sn);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function MM(e){return function(){return e}}function xo(e){return+e}var Yh=[0,1];function lt(e){return e}function mc(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:MM(isNaN(t)?NaN:.5)}function NM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function DM(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=mc(a,n),i=r(o,i)):(n=mc(n,a),i=r(i,o)),function(s){return i(n(s))}}function IM(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=mc(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=ja(e,s,1,n)-1;return i[l](a[l](s))}}function Da(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wo(){var e=Yh,t=Yh,r=Sn,n,a,i,o=lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==lt&&(o=NM(e[0],e[d-1])),s=d>2?IM:DM,l=c=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(a((c||(c=s(t,e.map(n),bo)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,xo),u()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=vc,u()},f.clamp=function(d){return arguments.length?(o=d?!0:lt,u()):o!==lt},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,a=h,u()}}function yc(){return wo()(lt,lt)}function LM(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Oo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Tn(e){return e=Oo(Math.abs(e)),e?e[1]:NaN}function RM(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function BM(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var FM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=FM.exec(e)))throw new Error("invalid format: "+e);var t;return new gc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ia.prototype=gc.prototype;function gc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}gc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function WM(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Xh;function UM(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Xh=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Oo(e,Math.max(0,t+i-1))[0]}function Jh(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Zh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:LM,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Jh(e*100,t),r:Jh,s:UM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Qh(e){return e}var ev=Array.prototype.map,tv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zM(e){var t=e.grouping===void 0||e.thousands===void 0?Qh:RM(ev.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Qh:BM(ev.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Ia(f);var d=f.fill,h=f.align,m=f.sign,g=f.symbol,v=f.zero,x=f.width,b=f.comma,w=f.precision,A=f.trim,y=f.type;y==="n"?(b=!0,y="g"):Zh[y]||(w===void 0&&(w=12),A=!0,y="g"),(v||d==="0"&&h==="=")&&(v=!0,d="0",h="=");var O=g==="$"?r:g==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",S=g==="$"?n:/[%p]/.test(y)?o:"",P=Zh[y],$=/[defgprs%]/.test(y);w=w===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function N(j){var C=O,k=S,_,D,M;if(y==="c")k=P(j)+k,j="";else{j=+j;var B=j<0||1/j<0;if(j=isNaN(j)?l:P(Math.abs(j),w),A&&(j=WM(j)),B&&+j==0&&m!=="+"&&(B=!1),C=(B?m==="("?m:s:m==="-"||m==="("?"":m)+C,k=(y==="s"?tv[8+Xh/3]:"")+k+(B&&m==="("?")":""),$){for(_=-1,D=j.length;++_<D;)if(M=j.charCodeAt(_),48>M||M>57){k=(M===46?a+j.slice(_+1):j.slice(_))+k,j=j.slice(0,_);break}}}b&&!v&&(j=t(j,1/0));var U=C.length+j.length+k.length,V=U<x?new Array(x-U+1).join(d):"";switch(b&&v&&(j=t(V+j,V.length?x-k.length:1/0),V=""),h){case"<":j=C+j+k+V;break;case"=":j=C+V+j+k;break;case"^":j=V.slice(0,U=V.length>>1)+C+j+k+V.slice(U);break;default:j=V+C+j+k;break}return i(j)}return N.toString=function(){return f+""},N}function u(f,d){var h=c((f=Ia(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Tn(d)/3)))*3,g=Math.pow(10,-m),v=tv[8+m/3];return function(x){return h(g*x)+v}}return{format:c,formatPrefix:u}}var So,bc,rv;VM({thousands:",",grouping:[3],currency:["$",""]});function VM(e){return So=zM(e),bc=So.format,rv=So.formatPrefix,So}function GM(e){return Math.max(0,-Tn(Math.abs(e)))}function qM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Tn(t)/3)))*3-Tn(Math.abs(e)))}function KM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function nv(e,t,r,n){var a=oc(e,t,r),i;switch(n=Ia(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=qM(a,o))&&(n.precision=i),rv(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=KM(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=GM(a))&&(n.precision=i-(n.type==="%")*2);break}}return bc(n)}function gr(e){var t=e.domain;return e.ticks=function(r){var n=t();return ac(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return nv(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,c,u=10;for(s<o&&(c=o,o=s,s=c,c=a,a=i,i=c);u-- >0;){if(c=ic(o,s,r),c===l)return n[a]=o,n[i]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function To(){var e=yc();return e.copy=function(){return Da(e,To())},At.apply(e,arguments),gr(e)}function av(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,xo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return av(e).unknown(t)},e=arguments.length?Array.from(e,xo):[0,1],gr(r)}function iv(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function ov(e){return Math.log(e)}function sv(e){return Math.exp(e)}function HM(e){return-Math.log(-e)}function YM(e){return-Math.exp(-e)}function XM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function JM(e){return e===10?XM:e===Math.E?Math.exp:t=>Math.pow(e,t)}function ZM(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function lv(e){return(t,r)=>-e(-t,r)}function xc(e){const t=e(ov,sv),r=t.domain;let n=10,a,i;function o(){return a=ZM(n),i=JM(n),r()[0]<0?(a=lv(a),i=lv(i),e(HM,YM)):e(ov,sv),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let d=a(c),h=a(u),m,g;const v=s==null?10:+s;let x=[];if(!(n%1)&&h-d<v){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(m=1;m<n;++m)if(g=d<0?m/i(-d):m*i(d),!(g<c)){if(g>u)break;x.push(g)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(g=d>0?m/i(-d):m*i(d),!(g<c)){if(g>u)break;x.push(g)}x.length*2<v&&(x=ac(c,u,v))}else x=ac(d,h,Math.min(h-d,v)).map(i);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ia(l)).precision==null&&(l.trim=!0),l=bc(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let f=u/i(Math.round(a(u)));return f*n<n-.5&&(f*=n),f<=c?l(u):""}},t.nice=()=>r(iv(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function cv(){const e=xc(wo()).domain([1,10]);return e.copy=()=>Da(e,cv()).base(e.base()),At.apply(e,arguments),e}function uv(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function fv(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function wc(e){var t=1,r=e(uv(t),fv(t));return r.constant=function(n){return arguments.length?e(uv(t=+n),fv(t)):t},gr(r)}function dv(){var e=wc(wo());return e.copy=function(){return Da(e,dv()).constant(e.constant())},At.apply(e,arguments)}function pv(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function QM(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function eN(e){return e<0?-e*e:e*e}function Oc(e){var t=e(lt,lt),r=1;function n(){return r===1?e(lt,lt):r===.5?e(QM,eN):e(pv(r),pv(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},gr(t)}function Sc(){var e=Oc(wo());return e.copy=function(){return Da(e,Sc()).exponent(e.exponent())},At.apply(e,arguments),e}function tN(){return Sc.apply(null,arguments).exponent(.5)}function hv(e){return Math.sign(e)*e*e}function rN(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vv(){var e=yc(),t=[0,1],r=!1,n;function a(i){var o=rN(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(hv(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,xo)).map(hv)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return vv(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),gr(a)}function mv(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=sM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[ja(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(yr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return mv().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function yv(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[ja(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var c=a.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return yv().domain([e,t]).range(a).unknown(i)},At.apply(gr(o),arguments)}function gv(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[ja(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return gv().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const Tc=new Date,Ac=new Date;function Je(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<o);return l},a.filter=i=>Je(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(Tc.setTime(+i),Ac.setTime(+o),e(Tc),e(Ac),Math.floor(r(Tc,Ac))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const Ao=Je(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ao.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Je(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ao),Ao.range;const nr=1e3,Pt=nr*60,ar=Pt*60,ir=ar*24,Pc=ir*7,bv=ir*30,jc=ir*365,Lr=Je(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Lr.range;const _c=Je(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());_c.range;const Ec=Je(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Ec.range;const Cc=Je(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Cc.range;const $c=Je(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());$c.range;const La=Je(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pt)/ir,e=>e.getDate()-1);La.range;const Po=Je(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);Po.range;const xv=Je(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));xv.range;function Rr(e){return Je(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Pt)/Pc)}const jo=Rr(0),_o=Rr(1),nN=Rr(2),aN=Rr(3),An=Rr(4),iN=Rr(5),oN=Rr(6);jo.range,_o.range,nN.range,aN.range,An.range,iN.range,oN.range;function Br(e){return Je(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Pc)}const Eo=Br(0),Co=Br(1),sN=Br(2),lN=Br(3),Pn=Br(4),cN=Br(5),uN=Br(6);Eo.range,Co.range,sN.range,lN.range,Pn.range,cN.range,uN.range;const kc=Je(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());kc.range;const Mc=Je(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Mc.range;const or=Je(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Je(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),or.range;const sr=Je(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Je(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),sr.range;function wv(e,t,r,n,a,i){const o=[[Lr,1,nr],[Lr,5,5*nr],[Lr,15,15*nr],[Lr,30,30*nr],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,ir],[n,2,2*ir],[r,1,Pc],[t,1,bv],[t,3,3*bv],[e,1,jc]];function s(c,u,f){const d=u<c;d&&([c,u]=[u,c]);const h=f&&typeof f.range=="function"?f:l(c,u,f),m=h?h.range(c,+u+1):[];return d?m.reverse():m}function l(c,u,f){const d=Math.abs(u-c)/f,h=nc(([,,v])=>v).right(o,d);if(h===o.length)return e.every(oc(c/jc,u/jc,f));if(h===0)return Ao.every(Math.max(oc(c,u,f),1));const[m,g]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return m.every(g)}return[s,l]}const[fN,dN]=wv(sr,Mc,Eo,xv,$c,Ec),[pN,hN]=wv(or,kc,jo,La,Cc,_c);function Nc(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Dc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ra(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function vN(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Ba(a),u=Fa(a),f=Ba(i),d=Fa(i),h=Ba(o),m=Fa(o),g=Ba(s),v=Fa(s),x=Ba(l),b=Fa(l),w={a:B,A:U,b:V,B:E,c:null,d:jv,e:jv,f:RN,g:HN,G:XN,H:DN,I:IN,j:LN,L:_v,m:BN,M:FN,p:R,q:F,Q:Nv,s:Dv,S:WN,u:UN,U:zN,V:VN,w:GN,W:qN,x:null,X:null,y:KN,Y:YN,Z:JN,"%":Mv},A={a:W,A:G,b:X,B:Q,c:null,d:Cv,e:Cv,f:tD,g:fD,G:pD,H:ZN,I:QN,j:eD,L:$v,m:rD,M:nD,p:ae,q:te,Q:Nv,s:Dv,S:aD,u:iD,U:oD,V:sD,w:lD,W:cD,x:null,X:null,y:uD,Y:dD,Z:hD,"%":Mv},y={a:N,A:j,b:C,B:k,c:_,d:Av,e:Av,f:$N,g:Tv,G:Sv,H:Pv,I:Pv,j:jN,L:CN,m:PN,M:_N,p:$,q:AN,Q:MN,s:NN,S:EN,u:xN,U:wN,V:ON,w:bN,W:SN,x:D,X:M,y:Tv,Y:Sv,Z:TN,"%":kN};w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),A.x=O(r,A),A.X=O(n,A),A.c=O(t,A);function O(q,Y){return function(Z){var L=[],oe=-1,K=0,ce=q.length,ee,ve,Ue;for(Z instanceof Date||(Z=new Date(+Z));++oe<ce;)q.charCodeAt(oe)===37&&(L.push(q.slice(K,oe)),(ve=Ov[ee=q.charAt(++oe)])!=null?ee=q.charAt(++oe):ve=ee==="e"?" ":"0",(Ue=Y[ee])&&(ee=Ue(Z,ve)),L.push(ee),K=oe+1);return L.push(q.slice(K,oe)),L.join("")}}function S(q,Y){return function(Z){var L=Ra(1900,void 0,1),oe=P(L,q,Z+="",0),K,ce;if(oe!=Z.length)return null;if("Q"in L)return new Date(L.Q);if("s"in L)return new Date(L.s*1e3+("L"in L?L.L:0));if(Y&&!("Z"in L)&&(L.Z=0),"p"in L&&(L.H=L.H%12+L.p*12),L.m===void 0&&(L.m="q"in L?L.q:0),"V"in L){if(L.V<1||L.V>53)return null;"w"in L||(L.w=1),"Z"in L?(K=Dc(Ra(L.y,0,1)),ce=K.getUTCDay(),K=ce>4||ce===0?Co.ceil(K):Co(K),K=Po.offset(K,(L.V-1)*7),L.y=K.getUTCFullYear(),L.m=K.getUTCMonth(),L.d=K.getUTCDate()+(L.w+6)%7):(K=Nc(Ra(L.y,0,1)),ce=K.getDay(),K=ce>4||ce===0?_o.ceil(K):_o(K),K=La.offset(K,(L.V-1)*7),L.y=K.getFullYear(),L.m=K.getMonth(),L.d=K.getDate()+(L.w+6)%7)}else("W"in L||"U"in L)&&("w"in L||(L.w="u"in L?L.u%7:"W"in L?1:0),ce="Z"in L?Dc(Ra(L.y,0,1)).getUTCDay():Nc(Ra(L.y,0,1)).getDay(),L.m=0,L.d="W"in L?(L.w+6)%7+L.W*7-(ce+5)%7:L.w+L.U*7-(ce+6)%7);return"Z"in L?(L.H+=L.Z/100|0,L.M+=L.Z%100,Dc(L)):Nc(L)}}function P(q,Y,Z,L){for(var oe=0,K=Y.length,ce=Z.length,ee,ve;oe<K;){if(L>=ce)return-1;if(ee=Y.charCodeAt(oe++),ee===37){if(ee=Y.charAt(oe++),ve=y[ee in Ov?Y.charAt(oe++):ee],!ve||(L=ve(q,Z,L))<0)return-1}else if(ee!=Z.charCodeAt(L++))return-1}return L}function $(q,Y,Z){var L=c.exec(Y.slice(Z));return L?(q.p=u.get(L[0].toLowerCase()),Z+L[0].length):-1}function N(q,Y,Z){var L=h.exec(Y.slice(Z));return L?(q.w=m.get(L[0].toLowerCase()),Z+L[0].length):-1}function j(q,Y,Z){var L=f.exec(Y.slice(Z));return L?(q.w=d.get(L[0].toLowerCase()),Z+L[0].length):-1}function C(q,Y,Z){var L=x.exec(Y.slice(Z));return L?(q.m=b.get(L[0].toLowerCase()),Z+L[0].length):-1}function k(q,Y,Z){var L=g.exec(Y.slice(Z));return L?(q.m=v.get(L[0].toLowerCase()),Z+L[0].length):-1}function _(q,Y,Z){return P(q,t,Y,Z)}function D(q,Y,Z){return P(q,r,Y,Z)}function M(q,Y,Z){return P(q,n,Y,Z)}function B(q){return o[q.getDay()]}function U(q){return i[q.getDay()]}function V(q){return l[q.getMonth()]}function E(q){return s[q.getMonth()]}function R(q){return a[+(q.getHours()>=12)]}function F(q){return 1+~~(q.getMonth()/3)}function W(q){return o[q.getUTCDay()]}function G(q){return i[q.getUTCDay()]}function X(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function ae(q){return a[+(q.getUTCHours()>=12)]}function te(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Y=O(q+="",w);return Y.toString=function(){return q},Y},parse:function(q){var Y=S(q+="",!1);return Y.toString=function(){return q},Y},utcFormat:function(q){var Y=O(q+="",A);return Y.toString=function(){return q},Y},utcParse:function(q){var Y=S(q+="",!0);return Y.toString=function(){return q},Y}}}var Ov={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,mN=/^%/,yN=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function gN(e){return e.replace(yN,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(gN).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function bN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function xN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function wN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function ON(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function SN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Sv(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Tv(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function TN(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function AN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function PN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Av(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Pv(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function _N(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function EN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function CN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function $N(e,t,r){var n=tt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function kN(e,t,r){var n=mN.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function MN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function NN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function jv(e,t){return be(e.getDate(),t,2)}function DN(e,t){return be(e.getHours(),t,2)}function IN(e,t){return be(e.getHours()%12||12,t,2)}function LN(e,t){return be(1+La.count(or(e),e),t,3)}function _v(e,t){return be(e.getMilliseconds(),t,3)}function RN(e,t){return _v(e,t)+"000"}function BN(e,t){return be(e.getMonth()+1,t,2)}function FN(e,t){return be(e.getMinutes(),t,2)}function WN(e,t){return be(e.getSeconds(),t,2)}function UN(e){var t=e.getDay();return t===0?7:t}function zN(e,t){return be(jo.count(or(e)-1,e),t,2)}function Ev(e){var t=e.getDay();return t>=4||t===0?An(e):An.ceil(e)}function VN(e,t){return e=Ev(e),be(An.count(or(e),e)+(or(e).getDay()===4),t,2)}function GN(e){return e.getDay()}function qN(e,t){return be(_o.count(or(e)-1,e),t,2)}function KN(e,t){return be(e.getFullYear()%100,t,2)}function HN(e,t){return e=Ev(e),be(e.getFullYear()%100,t,2)}function YN(e,t){return be(e.getFullYear()%1e4,t,4)}function XN(e,t){var r=e.getDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getFullYear()%1e4,t,4)}function JN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function Cv(e,t){return be(e.getUTCDate(),t,2)}function ZN(e,t){return be(e.getUTCHours(),t,2)}function QN(e,t){return be(e.getUTCHours()%12||12,t,2)}function eD(e,t){return be(1+Po.count(sr(e),e),t,3)}function $v(e,t){return be(e.getUTCMilliseconds(),t,3)}function tD(e,t){return $v(e,t)+"000"}function rD(e,t){return be(e.getUTCMonth()+1,t,2)}function nD(e,t){return be(e.getUTCMinutes(),t,2)}function aD(e,t){return be(e.getUTCSeconds(),t,2)}function iD(e){var t=e.getUTCDay();return t===0?7:t}function oD(e,t){return be(Eo.count(sr(e)-1,e),t,2)}function kv(e){var t=e.getUTCDay();return t>=4||t===0?Pn(e):Pn.ceil(e)}function sD(e,t){return e=kv(e),be(Pn.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function lD(e){return e.getUTCDay()}function cD(e,t){return be(Co.count(sr(e)-1,e),t,2)}function uD(e,t){return be(e.getUTCFullYear()%100,t,2)}function fD(e,t){return e=kv(e),be(e.getUTCFullYear()%100,t,2)}function dD(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function pD(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Pn(e):Pn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function hD(){return"+0000"}function Mv(){return"%"}function Nv(e){return+e}function Dv(e){return Math.floor(+e/1e3)}var jn,Iv,Lv;vD({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vD(e){return jn=vN(e),Iv=jn.format,jn.parse,Lv=jn.utcFormat,jn.utcParse,jn}function mD(e){return new Date(e)}function yD(e){return e instanceof Date?+e:+new Date(+e)}function Ic(e,t,r,n,a,i,o,s,l,c){var u=yc(),f=u.invert,d=u.domain,h=c(".%L"),m=c(":%S"),g=c("%I:%M"),v=c("%I %p"),x=c("%a %d"),b=c("%b %d"),w=c("%B"),A=c("%Y");function y(O){return(l(O)<O?h:s(O)<O?m:o(O)<O?g:i(O)<O?v:n(O)<O?a(O)<O?x:b:r(O)<O?w:A)(O)}return u.invert=function(O){return new Date(f(O))},u.domain=function(O){return arguments.length?d(Array.from(O,yD)):d().map(mD)},u.ticks=function(O){var S=d();return e(S[0],S[S.length-1],O??10)},u.tickFormat=function(O,S){return S==null?y:c(S)},u.nice=function(O){var S=d();return(!O||typeof O.range!="function")&&(O=t(S[0],S[S.length-1],O??10)),O?d(iv(S,O)):u},u.copy=function(){return Da(u,Ic(e,t,r,n,a,i,o,s,l,c))},u}function gD(){return At.apply(Ic(pN,hN,or,kc,jo,La,Cc,_c,Lr,Iv).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bD(){return At.apply(Ic(fN,dN,sr,Mc,Eo,Po,$c,Ec,Lr,Lv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function $o(){var e=0,t=1,r,n,a,i,o=lt,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(o=f,c):o};function u(f){return function(d){var h,m;return arguments.length?([h,m]=d,o=f(h,m),c):[o(0),o(1)]}}return c.range=u(Sn),c.rangeRound=u(vc),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),c}}function br(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Rv(){var e=gr($o()(lt));return e.copy=function(){return br(e,Rv())},rr.apply(e,arguments)}function Bv(){var e=xc($o()).domain([1,10]);return e.copy=function(){return br(e,Bv()).base(e.base())},rr.apply(e,arguments)}function Fv(){var e=wc($o());return e.copy=function(){return br(e,Fv()).constant(e.constant())},rr.apply(e,arguments)}function Lc(){var e=Oc($o());return e.copy=function(){return br(e,Lc()).exponent(e.exponent())},rr.apply(e,arguments)}function xD(){return Lc.apply(null,arguments).exponent(.5)}function Wv(){var e=[],t=lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((ja(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(yr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>oM(e,i/n))},r.copy=function(){return Wv(t).domain(e)},rr.apply(r,arguments)}function ko(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,c=lt,u,f=!1,d;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+u(g))-i)*(n*g<n*i?s:l),c(f?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t,r]=g,a=u(e=+e),i=u(t=+t),o=u(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(g){return arguments.length?(f=!!g,h):f},h.interpolator=function(g){return arguments.length?(c=g,h):c};function m(g){return function(v){var x,b,w;return arguments.length?([x,b,w]=v,c=kM(g,[x,b,w]),h):[c(0),c(.5),c(1)]}}return h.range=m(Sn),h.rangeRound=m(vc),h.unknown=function(g){return arguments.length?(d=g,h):d},function(g){return u=g,a=g(e),i=g(t),o=g(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function Uv(){var e=gr(ko()(lt));return e.copy=function(){return br(e,Uv())},rr.apply(e,arguments)}function zv(){var e=xc(ko()).domain([.1,1,10]);return e.copy=function(){return br(e,zv()).base(e.base())},rr.apply(e,arguments)}function Vv(){var e=wc(ko());return e.copy=function(){return br(e,Vv()).constant(e.constant())},rr.apply(e,arguments)}function Rc(){var e=Oc(ko());return e.copy=function(){return br(e,Rc()).exponent(e.exponent())},rr.apply(e,arguments)}function wD(){return Rc.apply(null,arguments).exponent(.5)}const Gv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ea,scaleDiverging:Uv,scaleDivergingLog:zv,scaleDivergingPow:Rc,scaleDivergingSqrt:wD,scaleDivergingSymlog:Vv,scaleIdentity:av,scaleImplicit:sc,scaleLinear:To,scaleLog:cv,scaleOrdinal:lc,scalePoint:Ca,scalePow:Sc,scaleQuantile:mv,scaleQuantize:yv,scaleRadial:vv,scaleSequential:Rv,scaleSequentialLog:Bv,scaleSequentialPow:Lc,scaleSequentialQuantile:Wv,scaleSequentialSqrt:xD,scaleSequentialSymlog:Fv,scaleSqrt:tN,scaleSymlog:dv,scaleThreshold:gv,scaleTime:gD,scaleUtc:bD,tickFormat:nv},Symbol.toStringTag,{value:"Module"}));var OD=nn;function SD(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!OD(o):r(o,s)))var s=o,l=i}return l}var qv=SD;function TD(e,t){return e>t}var AD=TD,PD=qv,jD=AD,_D=vn;function ED(e){return e&&e.length?PD(e,_D,jD):void 0}var CD=ED;const xr=$e(CD);function $D(e,t){return e<t}var kD=$D,MD=qv,ND=kD,DD=vn;function ID(e){return e&&e.length?MD(e,DD,ND):void 0}var LD=ID;const Mo=$e(LD);var RD=tl,BD=vr,FD=Up,WD=ft;function UD(e,t){var r=WD(e)?RD:FD;return r(e,BD(t))}var zD=UD,VD=Fp,GD=zD;function qD(e,t){return VD(GD(e,t),1)}var KD=qD;const HD=$e(KD);var YD=Fl;function XD(e,t){return YD(e,t)}var JD=XD;const Fr=$e(JD);var _n=1e9,ZD={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wc,Re=!0,jt="[DecimalError] ",Wr=jt+"Invalid argument: ",Bc=jt+"Exponent out of range: ",En=Math.floor,Ur=Math.pow,QD=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,yt,rt=1e7,Ie=7,Kv=9007199254740991,No=En(Kv/Ie),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ne.comparedTo=ne.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1},ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ie;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ne.dividedBy=ne.div=function(e){return lr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return Ee(lr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return Ke(this)},ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0},ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0},ne.isInteger=ne.isint=function(){return this.e>this.d.length-2},ne.isNegative=ne.isneg=function(){return this.s<0},ne.isPositive=ne.ispos=function(){return this.s>0},ne.isZero=function(){return this.s===0},ne.lessThan=ne.lt=function(e){return this.cmp(e)<0},ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1},ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(yt))throw Error(jt+"NaN");if(r.s<1)throw Error(jt+(r.s?"NaN":"-Infinity"));return r.eq(yt)?new n(0):(Re=!1,t=lr(Wa(r,i),Wa(e,i),i),Re=!0,Ee(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Jv(t,e):Hv(t,(e.s=-e.s,e))},ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(jt+"NaN");return r.s?(Re=!1,t=lr(r,e,0,1).times(e),Re=!0,r.minus(t)):Ee(new n(r),a)},ne.naturalExponential=ne.exp=function(){return Yv(this)},ne.naturalLogarithm=ne.ln=function(){return Wa(this)},ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Hv(t,e):Jv(t,(e.s=-e.s,e))},ne.precision=ne.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wr+e);if(t=Ke(a)+1,n=a.d.length-1,r=n*Ie+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ne.squareRoot=ne.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(jt+"NaN")}for(e=Ke(s),Re=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Vt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=En((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(lr(s,i,o+2)).times(.5),Vt(i.d).slice(0,o)===(t=Vt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Ee(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Re=!0,Ee(n,r)},ne.times=ne.mul=function(e){var t,r,n,a,i,o,s,l,c,u=this,f=u.constructor,d=u.d,h=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,l=d.length,c=h.length,l<c&&(i=d,d=h,h=i,o=l,l=c,c=o),i=[],o=l+c,n=o;n--;)i.push(0);for(n=c;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+h[n]*d[a-n-1]+t,i[a--]=s%rt|0,t=s/rt|0;i[a]=(i[a]+t)%rt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Re?Ee(e,f.precision):e},ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zt(e,0,_n),t===void 0?t=n.rounding:zt(t,0,8),Ee(r,e+Ke(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=zr(n,!0):(zt(e,0,_n),t===void 0?t=a.rounding:zt(t,0,8),n=Ee(new a(n),e+1,t),r=zr(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?zr(a):(zt(e,0,_n),t===void 0?t=i.rounding:zt(t,0,8),n=Ee(new i(a),e+Ke(a)+1,t),r=zr(n.abs(),!1,e+Ke(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Ee(new t(e),Ke(e)+1,t.rounding)},ne.toNumber=function(){return+this},ne.toPower=ne.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(yt);if(s=new l(s),!s.s){if(e.s<1)throw Error(jt+"Infinity");return s}if(s.eq(yt))return s;if(n=l.precision,e.eq(yt))return Ee(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=u<0?-u:u)<=Kv){for(a=new l(yt),t=Math.ceil(n/Ie+4),Re=!1;r%2&&(a=a.times(s),Zv(a.d,t)),r=En(r/2),r!==0;)s=s.times(s),Zv(s.d,t);return Re=!0,e.s<0?new l(yt).div(a):Ee(a,n)}}else if(i<0)throw Error(jt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Re=!1,a=e.times(Wa(s,n+c)),Re=!0,a=Yv(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Ke(a),n=zr(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,_n),t===void 0?t=i.rounding:zt(t,0,8),a=Ee(new i(a),e,t),r=Ke(a),n=zr(a,e<=r||r<=i.toExpNeg,e)),n},ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zt(e,1,_n),t===void 0?t=n.rounding:zt(t,0,8)),Ee(new n(r),e,t)},ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ke(e),r=e.constructor;return zr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Hv(e,t){var r,n,a,i,o,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Re?Ee(t,f):t;if(l=e.d,c=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=c.length):(n=c,a=o,s=l.length),o=Math.ceil(f/Ie),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,n=c,c=l,l=n),r=0;i;)r=(l[--i]=l[i]+c[i]+r)/rt|0,l[i]%=rt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Re?Ee(t,f):t}function zt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Wr+e)}function Vt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Ie-n.length,r&&(i+=wr(r)),i+=n;o=e[t],n=o+"",r=Ie-n.length,r&&(i+=wr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var lr=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%rt|0,o=i/rt|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*rt+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,c,u,f,d,h,m,g,v,x,b,w,A,y,O,S,P,$=n.constructor,N=n.s==a.s?1:-1,j=n.d,C=a.d;if(!n.s)return new $(n);if(!a.s)throw Error(jt+"Division by zero");for(l=n.e-a.e,S=C.length,y=j.length,h=new $(N),m=h.d=[],c=0;C[c]==(j[c]||0);)++c;if(C[c]>(j[c]||0)&&--l,i==null?b=i=$.precision:o?b=i+(Ke(n)-Ke(a))+1:b=i,b<0)return new $(0);if(b=b/Ie+2|0,c=0,S==1)for(u=0,C=C[0],b++;(c<y||u)&&b--;c++)w=u*rt+(j[c]||0),m[c]=w/C|0,u=w%C|0;else{for(u=rt/(C[0]+1)|0,u>1&&(C=e(C,u),j=e(j,u),S=C.length,y=j.length),A=S,g=j.slice(0,S),v=g.length;v<S;)g[v++]=0;P=C.slice(),P.unshift(0),O=C[0],C[1]>=rt/2&&++O;do u=0,s=t(C,g,S,v),s<0?(x=g[0],S!=v&&(x=x*rt+(g[1]||0)),u=x/O|0,u>1?(u>=rt&&(u=rt-1),f=e(C,u),d=f.length,v=g.length,s=t(f,g,d,v),s==1&&(u--,r(f,S<d?P:C,d))):(u==0&&(s=u=1),f=C.slice()),d=f.length,d<v&&f.unshift(0),r(g,f,v),s==-1&&(v=g.length,s=t(C,g,S,v),s<1&&(u++,r(g,S<v?P:C,v))),v=g.length):s===0&&(u++,g=[0]),m[c++]=u,s&&g[0]?g[v++]=j[A]||0:(g=[j[A]],v=1);while((A++<y||g[0]!==void 0)&&b--)}return m[0]||m.shift(),h.e=l,Ee(h,o?i+Ke(h)+1:i)}}();function Yv(e,t){var r,n,a,i,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(Ke(e)>16)throw Error(Bc+Ke(e));if(!e.s)return new u(yt);for(Re=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(Ur(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new u(yt),u.precision=s;;){if(a=Ee(a.times(e),s),r=r.times(++l),o=i.plus(lr(a,r,s)),Vt(o.d).slice(0,s)===Vt(i.d).slice(0,s)){for(;c--;)i=Ee(i.times(i),s);return u.precision=f,t==null?(Re=!0,Ee(i,f)):i}i=o}}function Ke(e){for(var t=e.e*Ie,r=e.d[0];r>=10;r/=10)t++;return t}function Fc(e,t,r){if(t>e.LN10.sd())throw Re=!0,r&&(e.precision=r),Error(jt+"LN10 precision limit exceeded");return Ee(new e(e.LN10),t)}function wr(e){for(var t="";e--;)t+="0";return t}function Wa(e,t){var r,n,a,i,o,s,l,c,u,f=1,d=10,h=e,m=h.d,g=h.constructor,v=g.precision;if(h.s<1)throw Error(jt+(h.s?"NaN":"-Infinity"));if(h.eq(yt))return new g(0);if(t==null?(Re=!1,c=v):c=t,h.eq(10))return t==null&&(Re=!0),Fc(g,c);if(c+=d,g.precision=c,r=Vt(m),n=r.charAt(0),i=Ke(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Vt(h.d),n=r.charAt(0),f++;i=Ke(h),n>1?(h=new g("0."+r),i++):h=new g(n+"."+r.slice(1))}else return l=Fc(g,c+2,v).times(i+""),h=Wa(new g(n+"."+r.slice(1)),c-d).plus(l),g.precision=v,t==null?(Re=!0,Ee(h,v)):h;for(s=o=h=lr(h.minus(yt),h.plus(yt),c),u=Ee(h.times(h),c),a=3;;){if(o=Ee(o.times(u),c),l=s.plus(lr(o,new g(a),c)),Vt(l.d).slice(0,c)===Vt(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Fc(g,c+2,v).times(i+""))),s=lr(s,new g(f),c),g.precision=v,t==null?(Re=!0,Ee(s,v)):s;s=l,a+=2}}function Xv(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=En(r/Ie),e.d=[],n=(r+1)%Ie,r<0&&(n+=Ie),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ie;n<a;)e.d.push(+t.slice(n,n+=Ie));t=t.slice(n),n=Ie-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Re&&(e.e>No||e.e<-No))throw Error(Bc+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ee(e,t,r){var n,a,i,o,s,l,c,u,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Ie,a=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Ie),i=f.length,u>=i)return e;for(c=i=f[u],o=1;i>=10;i/=10)o++;n%=Ie,a=n-Ie+o}if(r!==void 0&&(i=Ur(10,o-a-1),s=c/i%10|0,l=t<0||f[u+1]!==void 0||c%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?c/Ur(10,o-a):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Ke(e),f.length=1,t=t-i-1,f[0]=Ur(10,(Ie-t%Ie)%Ie),e.e=En(-t/Ie)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,i=1,u--):(f.length=u+1,i=Ur(10,Ie-n),f[u]=a>0?(c/Ur(10,o-a)%Ur(10,a)|0)*i:0),l)for(;;)if(u==0){(f[0]+=i)==rt&&(f[0]=1,++e.e);break}else{if(f[u]+=i,f[u]!=rt)break;f[u--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Re&&(e.e>No||e.e<-No))throw Error(Bc+Ke(e));return e}function Jv(e,t){var r,n,a,i,o,s,l,c,u,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Re?Ee(t,h):t;if(l=e.d,f=t.d,n=t.e,c=e.e,l=l.slice(),o=c-n,o){for(u=o<0,u?(r=l,o=-o,s=f.length):(r=f,n=c,s=l.length),a=Math.max(Math.ceil(h/Ie),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,u=a<s,u&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){u=l[a]<f[a];break}o=0}for(u&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=rt-1;--l[i],l[a]+=rt}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Re?Ee(t,h):t):new d(0)}function zr(e,t,r){var n,a=Ke(e),i=Vt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+wr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+wr(-a-1)+i,r&&(n=r-o)>0&&(i+=wr(n))):a>=o?(i+=wr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+wr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=wr(n))),e.s<0?"-"+i:i}function Zv(e,t){if(e.length>t)return e.length=t,!0}function Qv(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Wr+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Xv(o,i.toString())}else if(typeof i!="string")throw Error(Wr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,QD.test(i))Xv(o,i);else throw Error(Wr+i)}if(a.prototype=ne,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Qv,a.config=a.set=e3,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function e3(e){if(!e||typeof e!="object")throw Error(jt+"Object expected");var t,r,n,a=["precision",1,_n,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(En(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Wr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Wr+r+": "+n);return this}var Wc=Qv(ZD);yt=new Wc(1);const _e=Wc;function t3(e){return i3(e)||a3(e)||n3(e)||r3()}function r3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
188
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n3(e,t){if(e){if(typeof e=="string")return Uc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uc(e,t)}}function a3(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function i3(e){if(Array.isArray(e))return Uc(e)}function Uc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var o3=function(t){return t},em={},tm=function(t){return t===em},rm=function(t){return function r(){return arguments.length===0||arguments.length===1&&tm(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},s3=function e(t,r){return t===1?r:rm(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==em}).length;return o>=t?r.apply(void 0,a):e(t-o,rm(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var u=a.map(function(f){return tm(f)?l.shift():f});return r.apply(void 0,t3(u).concat(l))}))})},Do=function(t){return s3(t.length,t)},zc=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},l3=Do(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),c3=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return o3;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Vc=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},nm=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function u3(e){var t;return e===0?t=1:t=Math.floor(new _e(e).abs().log(10).toNumber())+1,t}function f3(e,t,r){for(var n=new _e(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var d3=Do(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),p3=Do(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),h3=Do(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Io={rangeStep:f3,getDigitCount:u3,interpolateNumber:d3,uninterpolateNumber:p3,uninterpolateTruncation:h3};function Gc(e){return y3(e)||m3(e)||am(e)||v3()}function v3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
189
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m3(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function y3(e){if(Array.isArray(e))return qc(e)}function Ua(e,t){return x3(e)||b3(e,t)||am(e,t)||g3()}function g3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
190
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function am(e,t){if(e){if(typeof e=="string")return qc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qc(e,t)}}function qc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b3(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function x3(e){if(Array.isArray(e))return e}function im(e){var t=Ua(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function om(e,t,r){if(e.lte(0))return new _e(0);var n=Io.getDigitCount(e.toNumber()),a=new _e(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new _e(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new _e(Math.ceil(l))}function w3(e,t,r){var n=1,a=new _e(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new _e(10).pow(Io.getDigitCount(e)-1),a=new _e(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new _e(Math.floor(e)))}else e===0?a=new _e(Math.floor((t-1)/2)):r||(a=new _e(Math.floor(e)));var o=Math.floor((t-1)/2),s=c3(l3(function(l){return a.add(new _e(l-o).mul(n)).toNumber()}),zc);return s(0,t)}function sm(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new _e(0),tickMin:new _e(0),tickMax:new _e(0)};var i=om(new _e(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new _e(0):(o=new _e(e).add(t).div(2),o=o.sub(new _e(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new _e(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?sm(e,t,r,n,a+1):(c<r&&(l=t>0?l+(r-c):l,s=t>0?s:s+(r-c)),{step:i,tickMin:o.sub(new _e(s).mul(i)),tickMax:o.add(new _e(l).mul(i))})}function O3(e){var t=Ua(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=im([r,n]),l=Ua(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(Gc(zc(0,a-1).map(function(){return 1/0}))):[].concat(Gc(zc(0,a-1).map(function(){return-1/0})),[u]);return r>n?Vc(f):f}if(c===u)return w3(c,a,i);var d=sm(c,u,o,i),h=d.step,m=d.tickMin,g=d.tickMax,v=Io.rangeStep(m,g.add(new _e(.1).mul(h)),h);return r>n?Vc(v):v}function S3(e,t){var r=Ua(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=im([n,a]),s=Ua(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,a];if(l===c)return[l];var u=Math.max(t,2),f=om(new _e(c).sub(l).div(u-1),i,0),d=[].concat(Gc(Io.rangeStep(new _e(l),new _e(c).sub(new _e(.99).mul(f)),f)),[c]);return n>a?Vc(d):d}var T3=nm(O3),A3=nm(S3),P3=process.env.NODE_ENV==="production",Kc="Invariant failed";function ht(e,t){if(P3)throw new Error(Kc);var r=typeof t=="function"?t():t,n=r?"".concat(Kc,": ").concat(r):Kc;throw new Error(n)}var j3=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Cn(e){"@babel/helpers - typeof";return Cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cn(e)}function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lo.apply(this,arguments)}function _3(e,t){return k3(e)||$3(e,t)||C3(e,t)||E3()}function E3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
191
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C3(e,t){if(e){if(typeof e=="string")return lm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lm(e,t)}}function lm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function k3(e){if(Array.isArray(e))return e}function M3(e,t){if(e==null)return{};var r=N3(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function N3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function D3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I3(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fm(n.key),n)}}function L3(e,t,r){return t&&I3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function R3(e,t,r){return t=Ro(t),B3(e,cm()?Reflect.construct(t,r||[],Ro(e).constructor):t.apply(e,r))}function B3(e,t){if(t&&(Cn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F3(e)}function F3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cm=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}function W3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hc(e,t)}function Hc(e,t){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Hc(e,t)}function um(e,t,r){return t=fm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fm(e){var t=U3(e,"string");return Cn(t)=="symbol"?t:t+""}function U3(e,t){if(Cn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $n=function(e){function t(){return D3(this,t),R3(this,t,arguments)}return W3(t,e),L3(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,c=n.dataPointFormatter,u=n.xAxis,f=n.yAxis,d=M3(n,j3),h=de(d,!1);this.props.direction==="x"&&u.type!=="number"&&(process.env.NODE_ENV!=="production"?ht(!1,'ErrorBar requires Axis type property to be "number".'):ht());var m=l.map(function(g){var v=c(g,s),x=v.x,b=v.y,w=v.value,A=v.errorVal;if(!A)return null;var y=[],O,S;if(Array.isArray(A)){var P=_3(A,2);O=P[0],S=P[1]}else O=S=A;if(i==="vertical"){var $=u.scale,N=b+a,j=N+o,C=N-o,k=$(w-O),_=$(w+S);y.push({x1:_,y1:j,x2:_,y2:C}),y.push({x1:k,y1:N,x2:_,y2:N}),y.push({x1:k,y1:j,x2:k,y2:C})}else if(i==="horizontal"){var D=f.scale,M=x+a,B=M-o,U=M+o,V=D(w-O),E=D(w+S);y.push({x1:B,y1:E,x2:U,y2:E}),y.push({x1:M,y1:V,x2:M,y2:E}),y.push({x1:B,y1:V,x2:U,y2:V})}return T.createElement(xe,Lo({className:"recharts-errorBar",key:"bar-".concat(y.map(function(R){return"".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))},h),y.map(function(R){return T.createElement("line",Lo({},R,{key:"line-".concat(R.x1,"-").concat(R.x2,"-").concat(R.y1,"-").concat(R.y2)}))}))});return T.createElement(xe,{className:"recharts-errorBars"},m)}}])}(T.Component);um($n,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),um($n,"displayName","ErrorBar");function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dm(Object(r),!0).forEach(function(n){z3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z3(e,t,r){return t=V3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V3(e){var t=G3(e,"string");return za(t)=="symbol"?t:t+""}function G3(e,t){if(za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pm=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=mt(r,yn);if(!o)return null;var s=yn.defaultProps,l=s!==void 0?Vr(Vr({},s),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:i==="children"?c=(n||[]).reduce(function(u,f){var d=f.item,h=f.props,m=h.sectors||h.data||[];return u.concat(m.map(function(g){return{type:o.props.iconType||d.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):c=(n||[]).map(function(u){var f=u.item,d=f.type.defaultProps,h=d!==void 0?Vr(Vr({},d),f.props):{},m=h.dataKey,g=h.name,v=h.legendType,x=h.hide;return{inactive:x,dataKey:m,type:l.iconType||v||"square",color:Xc(f),value:g||m,payload:h}}),Vr(Vr(Vr({},l),yn.getWithHeight(o,a)),{},{payload:c,item:o})};function Va(e){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}function hm(e){return Y3(e)||H3(e)||K3(e)||q3()}function q3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K3(e,t){if(e){if(typeof e=="string")return Yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yc(e,t)}}function H3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y3(e){if(Array.isArray(e))return Yc(e)}function Yc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vm(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(e,t,r){return t=X3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X3(e){var t=J3(e,"string");return Va(t)=="symbol"?t:t+""}function J3(e,t){if(Va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ze(e,t,r){return fe(e)||fe(t)?r:Xe(t)?wt(e,t,r):pe(t)?t(e):r}function Ga(e,t,r,n){var a=HD(e,function(s){return Ze(s,t)});if(r==="number"){var i=a.filter(function(s){return J(s)||parseFloat(s)});return i.length?[Mo(i),xr(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Xe(s)||s instanceof Date?s:""})}var Z3=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c<s;c++){var u=c>0?a[c-1].coordinate:a[s-1].coordinate,f=a[c].coordinate,d=c>=s-1?a[0].coordinate:a[c+1].coordinate,h=void 0;if($t(f-u)!==$t(d-f)){var m=[];if($t(d-f)===$t(l[1]-l[0])){h=d;var g=f+l[1]-l[0];m[0]=Math.min(g,(g+u)/2),m[1]=Math.max(g,(g+u)/2)}else{h=u;var v=d+l[1]-l[0];m[0]=Math.min(f,(v+f)/2),m[1]=Math.max(f,(v+f)/2)}var x=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>x[0]&&t<=x[1]||t>=m[0]&&t<=m[1]){o=a[c].index;break}}else{var b=Math.min(u,d),w=Math.max(u,d);if(t>(b+f)/2&&t<=(w+f)/2){o=a[c].index;break}}}else for(var A=0;A<s;A++)if(A===0&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A===s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2){o=n[A].index;break}return o},Xc=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},Q3=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,c=s.length;l<c;l++)for(var u=i[s[l]].stackGroups,f=Object.keys(u),d=0,h=f.length;d<h;d++){var m=u[f[d]],g=m.items,v=m.cateAxisId,x=g.filter(function(S){return Qt(S.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,w=b!==void 0?We(We({},b),x[0].props):x[0].props,A=w.barSize,y=w[v];o[y]||(o[y]=[]);var O=fe(A)?r:A;o[y].push({item:x[0],stackList:x.slice(1),barSize:fe(O)?void 0:kr(O,n,0)})}}return o},eI=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=kr(r,a,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,m=o.reduce(function(A,y){return A+y.barSize||0},0);m+=(l-1)*c,m>=a&&(m-=(l-1)*c,c=0),m>=a&&h>0&&(d=!0,h*=.9,m=l*h);var g=(a-m)/2>>0,v={offset:g-c,size:0};u=o.reduce(function(A,y){var O={item:y.item,position:{offset:v.offset+v.size+c,size:d?h:y.barSize}},S=[].concat(hm(A),[O]);return v=S[S.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(P){S.push({item:P,position:v})}),S},f)}else{var x=kr(n,a,0,!0);a-2*x-(l-1)*c<=0&&(c=0);var b=(a-2*x-(l-1)*c)/l;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;u=o.reduce(function(A,y,O){var S=[].concat(hm(A),[{item:y.item,position:{offset:x+(b+c)*O+(b-w)/2,size:w}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(P){S.push({item:P,position:S[S.length-1].position})}),S},f)}return u},tI=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=pm({children:i,legendWidth:l});if(c){var u=a||{},f=u.width,d=u.height,h=c.align,m=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&h!=="center"&&J(t[h]))return We(We({},t),{},kn({},h,t[h]+(f||0)));if((g==="horizontal"||g==="vertical"&&h==="center")&&m!=="middle"&&J(t[m]))return We(We({},t),{},kn({},m,t[m]+(d||0)))}return t},rI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},mm=function(t,r,n,a,i){var o=r.props.children,s=dt(o,$n).filter(function(c){return rI(a,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var f=Ze(u,n);if(fe(f))return c;var d=Array.isArray(f)?[Mo(f),xr(f)]:[f,f],h=l.reduce(function(m,g){var v=Ze(u,g,0),x=d[0]-Math.abs(Array.isArray(v)?v[0]:v),b=d[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(x,m[0]),Math.max(b,m[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},nI=function(t,r,n,a,i){var o=r.map(function(s){return mm(t,s,n,i,a)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},ym=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&mm(t,l,c,a)||Ga(t,c,n,i)});if(n==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var u=0,f=c.length;u<f;u++)s[c[u]]||(s[c[u]]=!0,l.push(c[u]));return l},[])},gm=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},bm=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},cr=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,c=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?$t(s[0]-s[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:a(d)+c,value:f,offset:c}});return u.filter(function(f){return!cn(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+c,value:f,index:d,offset:c}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+c,value:f,offset:c}}):a.domain().map(function(f,d){return{coordinate:a(f)+c,value:i?i[f]:f,index:d,offset:c}})},Jc=new WeakMap,Bo=function(t,r){if(typeof r!="function")return t;Jc.has(t)||Jc.set(t,new WeakMap);var n=Jc.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},aI=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Ea(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:To(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ca(),realScaleType:"point"}:i==="category"?{scale:Ea(),realScaleType:"band"}:{scale:To(),realScaleType:"linear"};if(Er(a)){var l="scale".concat(Fi(a));return{scale:(Gv[l]||Ca)(),realScaleType:Gv[l]?l:"point"}}return pe(a)?{scale:a}:{scale:Ca(),realScaleType:"point"}},xm=1e-4,iI=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-xm,o=Math.max(a[0],a[1])+xm,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},oI=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},sI=function(t,r){if(!r||r.length!==2||!J(r[0])||!J(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!J(t[0])||t[0]<n)&&(i[0]=n),(!J(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},lI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=cn(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},cI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=cn(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},uI={sign:lI,expand:AT,none:fn,silhouette:PT,wiggle:jT,positive:cI},fI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=uI[n],o=TT().keys(a).value(function(s,l){return+Ze(s,l,0)}).order(Tl).offset(i);return o(t)},dI=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},c=s.reduce(function(f,d){var h,m=(h=d.type)!==null&&h!==void 0&&h.defaultProps?We(We({},d.type.defaultProps),d.props):d.props,g=m.stackId,v=m.hide;if(v)return f;var x=m[n],b=f[x]||{hasStack:!1,stackGroups:{}};if(Xe(g)){var w=b.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),b.hasStack=!0,b.stackGroups[g]=w}else b.stackGroups[$r("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return We(We({},f),{},kn({},x,b))},l),u={};return Object.keys(c).reduce(function(f,d){var h=c[d];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(g,v){var x=h.stackGroups[v];return We(We({},g),{},kn({},v,{numericAxisId:n,cateAxisId:a,items:x.items,stackedData:fI(t,x.items,i)}))},m)}return We(We({},f),{},kn({},d,h))},u)},pI=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=T3(c,i,s);return t.domain([Mo(u),xr(u)]),{niceTicks:u}}if(i&&a==="number"){var f=t.domain(),d=A3(f,i,s);return{niceTicks:d}}return null};function Mn(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(a[t.dataKey])){var s=Ri(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Ze(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var wm=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=Ze(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},hI=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},vI=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Xe(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},mI=function(t){return t.reduce(function(r,n){return[Mo(n.concat([r[0]]).filter(J)),xr(n.concat([r[1]]).filter(J))]},[1/0,-1/0])},Om=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(c,u){var f=mI(u.slice(r,n+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},Sm=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Tm=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zc=function(t,r,n){if(pe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(J(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(Sm.test(t[0])){var i=+Sm.exec(t[0])[1];a[0]=r[0]-i}else pe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(J(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Tm.test(t[1])){var o=+Tm.exec(t[1])[1];a[1]=r[1]+o}else pe(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Fo=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Gl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var c=i[s],u=i[s-1];o=Math.min((c.coordinate||0)-(u.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Am=function(t,r,n){return!t||!t.length||Fr(t,wt(n,"type.defaultProps.domain"))?r:t},Pm=function(t,r){var n=t.type.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,c=n.chartType,u=n.hide;return We(We({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Xc(t),value:Ze(r,a),type:l,payload:r,chartType:c,hide:u})};function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(n){yI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yI(e,t,r){return t=gI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gI(e){var t=bI(e,"string");return qa(t)=="symbol"?t:t+""}function bI(e,t){if(qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wo=Math.PI/180,xI=function(t){return t*180/Math.PI},nt=function(t,r,n,a){return{x:t+Math.cos(-Wo*a)*n,y:r+Math.sin(-Wo*a)*n}},wI=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},OI=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=wI({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,c=Math.acos(l);return a>o&&(c=2*Math.PI-c),{radius:s,angle:xI(c),angleInRadian:c}},SI=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},TI=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},Em=function(t,r){var n=t.x,a=t.y,i=OI({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,c=r.outerRadius;if(o<l||o>c)return!1;if(o===0)return!0;var u=SI(r),f=u.startAngle,d=u.endAngle,h=s,m;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=f}return m?_m(_m({},r),{},{radius:o,angle:TI(h,r)}):null};function Ka(e){"@babel/helpers - typeof";return Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ka(e)}var AI=["offset"];function PI(e){return CI(e)||EI(e)||_I(e)||jI()}function jI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
193
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _I(e,t){if(e){if(typeof e=="string")return Qc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qc(e,t)}}function EI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CI(e){if(Array.isArray(e))return Qc(e)}function Qc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $I(e,t){if(e==null)return{};var r=kI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kI(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cm(Object(r),!0).forEach(function(n){MI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MI(e,t,r){return t=NI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NI(e){var t=DI(e,"string");return Ka(t)=="symbol"?t:t+""}function DI(e,t){if(Ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ha.apply(this,arguments)}var II=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return pe(n)?n(a):a},LI=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),360);return n*a},RI=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,c=l.cx,u=l.cy,f=l.innerRadius,d=l.outerRadius,h=l.startAngle,m=l.endAngle,g=l.clockWise,v=(f+d)/2,x=LI(h,m),b=x>=0?1:-1,w,A;a==="insideStart"?(w=h+b*o,A=g):a==="insideEnd"?(w=m-b*o,A=!g):a==="end"&&(w=m+b*o,A=g),A=x<=0?A:!A;var y=nt(c,u,v,w),O=nt(c,u,v,w+(A?1:-1)*359),S="M".concat(y.x,",").concat(y.y,`
194
194
  A`).concat(v,",").concat(v,",0,1,").concat(A?0:1,`,
195
- `).concat(O.x,",").concat(O.y),j=fe(t.id)?$r("recharts-radial-line-"):t.id;return T.createElement("text",Ka({},n,{dominantBaseline:"central",className:me("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:j,d:S})),T.createElement("textPath",{xlinkHref:"#".concat(j)},r))},RI=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,f=i.endAngle,d=(c+f)/2;if(a==="outside"){var h=nt(o,s,u+n,d),m=h.x,y=h.y;return{x:m,y,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+u)/2,b=nt(o,s,v,d),x=b.x,w=b.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},BI=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*a,h=f>0?"end":"start",m=f>0?"start":"end",y=u>=0?1:-1,v=y*a,b=y>0?"end":"start",x=y>0?"start":"end";if(i==="top"){var w={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},w),n?{height:Math.max(l-n.y,0),width:u}:{})}if(i==="bottom"){var A={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:m};return Qe(Qe({},A),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var g={x:s-v,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return Qe(Qe({},g),n?{width:Math.max(g.x-n.x,0),height:c}:{})}if(i==="right"){var O={x:s+u+v,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return Qe(Qe({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var S=n?{width:u,height:c}:{};return i==="insideLeft"?Qe({x:s+v,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},S):i==="insideRight"?Qe({x:s+u-v,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},S):i==="insideTop"?Qe({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:m},S):i==="insideBottom"?Qe({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:h},S):i==="insideTopLeft"?Qe({x:s+v,y:l+d,textAnchor:x,verticalAnchor:m},S):i==="insideTopRight"?Qe({x:s+u-v,y:l+d,textAnchor:b,verticalAnchor:m},S):i==="insideBottomLeft"?Qe({x:s+v,y:l+c-d,textAnchor:x,verticalAnchor:h},S):i==="insideBottomRight"?Qe({x:s+u-v,y:l+c-d,textAnchor:b,verticalAnchor:h},S):an(i)&&(J(i.x)||Cr(i.x))&&(J(i.y)||Cr(i.y))?Qe({x:s+kr(i.x,u),y:l+kr(i.y,c),textAnchor:"end",verticalAnchor:"end"},S):Qe({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},S)},FI=function(t){return"cx"in t&&J(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=CI(e,TI),a=Qe({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,u=a.content,c=a.className,f=c===void 0?"":c,d=a.textBreakAll;if(!i||fe(s)&&fe(l)&&!T.isValidElement(u)&&!pe(u))return null;if(T.isValidElement(u))return T.cloneElement(u,a);var h;if(pe(u)){if(h=T.createElement(u,a),T.isValidElement(h))return h}else h=DI(a);var m=FI(i),y=de(a,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return LI(a,h,y);var v=m?RI(a):BI(a);return T.createElement(po,Ka({className:me("recharts-label",f)},y,v,{breakAll:d}),h)}it.displayName="Label";var $m=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,h=t.top,m=t.left,y=t.width,v=t.height,b=t.clockWise,x=t.labelViewBox;if(x)return x;if(J(y)&&J(v)){if(J(f)&&J(d))return{x:f,y:d,width:y,height:v};if(J(h)&&J(m))return{x:h,y:m,width:y,height:v}}return J(f)&&J(d)?{x:f,y:d,width:0,height:0}:J(r)&&J(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},WI=function(t,r){return t?t===!0?T.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?T.createElement(it,{key:"label-implicit",viewBox:r,value:t}):T.isValidElement(t)?t.type===it?T.cloneElement(t,{key:"label-implicit",viewBox:r}):T.createElement(it,{key:"label-implicit",content:t,viewBox:r}):pe(t)?T.createElement(it,{key:"label-implicit",content:t,viewBox:r}):an(t)?T.createElement(it,Ka({viewBox:r},t,{key:"label-implicit"})):null:null},UI=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=$m(t),o=dt(a,it).map(function(l,u){return T.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=WI(t.label,r||i);return[s].concat(AI(o))};it.parseViewBox=$m,it.renderCallByParent=UI;function zI(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var VI=zI;const GI=$e(VI);function Ya(e){"@babel/helpers - typeof";return Ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ya(e)}var qI=["valueAccessor"],HI=["data","dataKey","clockWise","id","textBreakAll"];function KI(e){return ZI(e)||JI(e)||XI(e)||YI()}function YI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
196
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XI(e,t){if(e){if(typeof e=="string")return ec(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ec(e,t)}}function JI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZI(e){if(Array.isArray(e))return ec(e)}function ec(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uo.apply(this,arguments)}function km(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?km(Object(r),!0).forEach(function(n){QI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):km(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QI(e,t,r){return t=e5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e5(e){var t=t5(e,"string");return Ya(t)=="symbol"?t:t+""}function t5(e,t){if(Ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nm(e,t){if(e==null)return{};var r=r5(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var n5=function(t){return Array.isArray(t.value)?GI(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?n5:t,n=Nm(e,qI),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=Nm(n,HI);return!a||!a.length?null:T.createElement(xe,{className:"recharts-label-list"},a.map(function(c,f){var d=fe(i)?r(c,f):Ze(c&&c.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return T.createElement(it,Uo({},de(c,!0),u,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(fe(o)?c:Mm(Mm({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function a5(e,t){return e?e===!0?T.createElement(Gt,{key:"labelList-implicit",data:t}):T.isValidElement(e)||pe(e)?T.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):an(e)?T.createElement(Gt,Uo({data:t},e,{key:"labelList-implicit"})):null:null}function i5(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=dt(n,Gt).map(function(o,s){return T.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=a5(e.label,t);return[i].concat(KI(a))}Gt.renderCallByParent=i5;function Xa(e){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tc.apply(this,arguments)}function Dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Im(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dm(Object(r),!0).forEach(function(n){o5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o5(e,t,r){return t=s5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s5(e){var t=l5(e,"string");return Xa(t)=="symbol"?t:t+""}function l5(e,t){if(Xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u5=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},zo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+a,f=Math.asin(l/c)/Wo,d=u?i:i+o*f,h=nt(r,n,c,d),m=nt(r,n,a,d),y=u?i-o*f:i,v=nt(r,n,c*Math.cos(f*Wo),y);return{center:h,circleTangency:m,lineTangency:v,theta:f}},Lm=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=u5(o,s),u=o+l,c=nt(r,n,i,o),f=nt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
195
+ `).concat(O.x,",").concat(O.y),P=fe(t.id)?$r("recharts-radial-line-"):t.id;return T.createElement("text",Ha({},n,{dominantBaseline:"central",className:me("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:P,d:S})),T.createElement("textPath",{xlinkHref:"#".concat(P)},r))},BI=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,f=i.endAngle,d=(u+f)/2;if(a==="outside"){var h=nt(o,s,c+n,d),m=h.x,g=h.y;return{x:m,y:g,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,x=nt(o,s,v,d),b=x.x,w=x.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},FI=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,c=o.width,u=o.height,f=u>=0?1:-1,d=f*a,h=f>0?"end":"start",m=f>0?"start":"end",g=c>=0?1:-1,v=g*a,x=g>0?"end":"start",b=g>0?"start":"end";if(i==="top"){var w={x:s+c/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},w),n?{height:Math.max(l-n.y,0),width:c}:{})}if(i==="bottom"){var A={x:s+c/2,y:l+u+d,textAnchor:"middle",verticalAnchor:m};return Qe(Qe({},A),n?{height:Math.max(n.y+n.height-(l+u),0),width:c}:{})}if(i==="left"){var y={x:s-v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return Qe(Qe({},y),n?{width:Math.max(y.x-n.x,0),height:u}:{})}if(i==="right"){var O={x:s+c+v,y:l+u/2,textAnchor:b,verticalAnchor:"middle"};return Qe(Qe({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:u}:{})}var S=n?{width:c,height:u}:{};return i==="insideLeft"?Qe({x:s+v,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},S):i==="insideRight"?Qe({x:s+c-v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},S):i==="insideTop"?Qe({x:s+c/2,y:l+d,textAnchor:"middle",verticalAnchor:m},S):i==="insideBottom"?Qe({x:s+c/2,y:l+u-d,textAnchor:"middle",verticalAnchor:h},S):i==="insideTopLeft"?Qe({x:s+v,y:l+d,textAnchor:b,verticalAnchor:m},S):i==="insideTopRight"?Qe({x:s+c-v,y:l+d,textAnchor:x,verticalAnchor:m},S):i==="insideBottomLeft"?Qe({x:s+v,y:l+u-d,textAnchor:b,verticalAnchor:h},S):i==="insideBottomRight"?Qe({x:s+c-v,y:l+u-d,textAnchor:x,verticalAnchor:h},S):an(i)&&(J(i.x)||Cr(i.x))&&(J(i.y)||Cr(i.y))?Qe({x:s+kr(i.x,c),y:l+kr(i.y,u),textAnchor:"end",verticalAnchor:"end"},S):Qe({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},S)},WI=function(t){return"cx"in t&&J(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=$I(e,AI),a=Qe({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,c=a.content,u=a.className,f=u===void 0?"":u,d=a.textBreakAll;if(!i||fe(s)&&fe(l)&&!T.isValidElement(c)&&!pe(c))return null;if(T.isValidElement(c))return T.cloneElement(c,a);var h;if(pe(c)){if(h=T.createElement(c,a),T.isValidElement(h))return h}else h=II(a);var m=WI(i),g=de(a,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return RI(a,h,g);var v=m?BI(a):FI(a);return T.createElement(po,Ha({className:me("recharts-label",f)},g,v,{breakAll:d}),h)}it.displayName="Label";var $m=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,f=t.x,d=t.y,h=t.top,m=t.left,g=t.width,v=t.height,x=t.clockWise,b=t.labelViewBox;if(b)return b;if(J(g)&&J(v)){if(J(f)&&J(d))return{x:f,y:d,width:g,height:v};if(J(h)&&J(m))return{x:h,y:m,width:g,height:v}}return J(f)&&J(d)?{x:f,y:d,width:0,height:0}:J(r)&&J(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},UI=function(t,r){return t?t===!0?T.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?T.createElement(it,{key:"label-implicit",viewBox:r,value:t}):T.isValidElement(t)?t.type===it?T.cloneElement(t,{key:"label-implicit",viewBox:r}):T.createElement(it,{key:"label-implicit",content:t,viewBox:r}):pe(t)?T.createElement(it,{key:"label-implicit",content:t,viewBox:r}):an(t)?T.createElement(it,Ha({viewBox:r},t,{key:"label-implicit"})):null:null},zI=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=$m(t),o=dt(a,it).map(function(l,c){return T.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=UI(t.label,r||i);return[s].concat(PI(o))};it.parseViewBox=$m,it.renderCallByParent=zI;function VI(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var GI=VI;const qI=$e(GI);function Ya(e){"@babel/helpers - typeof";return Ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ya(e)}var KI=["valueAccessor"],HI=["data","dataKey","clockWise","id","textBreakAll"];function YI(e){return QI(e)||ZI(e)||JI(e)||XI()}function XI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
196
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JI(e,t){if(e){if(typeof e=="string")return eu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eu(e,t)}}function ZI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QI(e){if(Array.isArray(e))return eu(e)}function eu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uo.apply(this,arguments)}function km(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?km(Object(r),!0).forEach(function(n){e5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):km(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e5(e,t,r){return t=t5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t5(e){var t=r5(e,"string");return Ya(t)=="symbol"?t:t+""}function r5(e,t){if(Ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nm(e,t){if(e==null)return{};var r=n5(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var a5=function(t){return Array.isArray(t.value)?qI(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?a5:t,n=Nm(e,KI),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Nm(n,HI);return!a||!a.length?null:T.createElement(xe,{className:"recharts-label-list"},a.map(function(u,f){var d=fe(i)?r(u,f):Ze(u&&u.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return T.createElement(it,Uo({},de(u,!0),c,h,{parentViewBox:u.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(fe(o)?u:Mm(Mm({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function i5(e,t){return e?e===!0?T.createElement(Gt,{key:"labelList-implicit",data:t}):T.isValidElement(e)||pe(e)?T.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):an(e)?T.createElement(Gt,Uo({data:t},e,{key:"labelList-implicit"})):null:null}function o5(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=dt(n,Gt).map(function(o,s){return T.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=i5(e.label,t);return[i].concat(YI(a))}Gt.renderCallByParent=o5;function Xa(e){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tu.apply(this,arguments)}function Dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Im(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dm(Object(r),!0).forEach(function(n){s5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s5(e,t,r){return t=l5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=c5(e,"string");return Xa(t)=="symbol"?t:t+""}function c5(e,t){if(Xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u5=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},zo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,u=l*(s?1:-1)+a,f=Math.asin(l/u)/Wo,d=c?i:i+o*f,h=nt(r,n,u,d),m=nt(r,n,a,d),g=c?i-o*f:i,v=nt(r,n,u*Math.cos(f*Wo),g);return{center:h,circleTangency:m,lineTangency:v,theta:f}},Lm=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=u5(o,s),c=o+l,u=nt(r,n,i,o),f=nt(r,n,i,c),d="M ".concat(u.x,",").concat(u.y,`
197
197
  A `).concat(i,",").concat(i,`,0,
198
- `).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
198
+ `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
199
199
  `).concat(f.x,",").concat(f.y,`
200
- `);if(a>0){var h=nt(r,n,a,o),m=nt(r,n,a,u);d+="L ".concat(m.x,",").concat(m.y,`
200
+ `);if(a>0){var h=nt(r,n,a,o),m=nt(r,n,a,c);d+="L ".concat(m.x,",").concat(m.y,`
201
201
  A `).concat(a,",").concat(a,`,0,
202
- `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
203
- `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},c5=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=$t(c-u),d=zo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,m=d.lineTangency,y=d.theta,v=zo({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),b=v.circleTangency,x=v.lineTangency,w=v.theta,A=l?Math.abs(u-c):Math.abs(u-c)-y-w;if(A<0)return s?"M ".concat(m.x,",").concat(m.y,`
202
+ `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
203
+ `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},f5=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,f=$t(u-c),d=zo({cx:r,cy:n,radius:i,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,m=d.lineTangency,g=d.theta,v=zo({cx:r,cy:n,radius:i,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=v.circleTangency,b=v.lineTangency,w=v.theta,A=l?Math.abs(c-u):Math.abs(c-u)-g-w;if(A<0)return s?"M ".concat(m.x,",").concat(m.y,`
204
204
  a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
205
205
  a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
206
- `):Lm({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var g="M ".concat(m.x,",").concat(m.y,`
206
+ `):Lm({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:u});var y="M ".concat(m.x,",").concat(m.y,`
207
207
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
208
- A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
209
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
210
- `);if(a>0){var O=zo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),S=O.circleTangency,j=O.lineTangency,E=O.theta,M=zo({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=M.circleTangency,P=M.lineTangency,I=M.theta,C=l?Math.abs(u-c):Math.abs(u-c)-E-I;if(C<0&&o===0)return"".concat(g,"L").concat(r,",").concat(n,"Z");g+="L".concat(P.x,",").concat(P.y,`
211
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
212
- A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(f>0),",").concat(S.x,",").concat(S.y,`
213
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(j.x,",").concat(j.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},f5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Rm=function(t){var r=Im(Im({},f5),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o<i||c===f)return null;var h=me("recharts-sector",d),m=o-i,y=kr(s,m,0,!0),v;return y>0&&Math.abs(c-f)<360?v=c5({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,m/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):v=Lm({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),T.createElement("path",tc({},de(r,!0),{className:h,d:v,role:"img"}))};function Ja(e){"@babel/helpers - typeof";return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ja(e)}function rc(){return rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rc.apply(this,arguments)}function Bm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bm(Object(r),!0).forEach(function(n){d5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d5(e,t,r){return t=p5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p5(e){var t=h5(e,"string");return Ja(t)=="symbol"?t:t+""}function h5(e,t){if(Ja(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ja(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wm={curveBasisClosed:dT,curveBasisOpen:pT,curveBasis:fT,curveBumpX:JS,curveBumpY:ZS,curveLinearClosed:hT,curveLinear:Vi,curveMonotoneX:vT,curveMonotoneY:mT,curveNatural:yT,curveStep:gT,curveStepAfter:xT,curveStepBefore:bT},Vo=function(t){return t.x===+t.x&&t.y===+t.y},Za=function(t){return t.x},Qa=function(t){return t.y},v5=function(t,r){if(pe(t))return t;var n="curve".concat(Fi(t));return(n==="curveMonotone"||n==="curveBump")&&r?Wm["".concat(n).concat(r==="vertical"?"Y":"X")]:Wm[n]||Vi},m5=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=v5(n,s),f=u?i.filter(function(y){return Vo(y)}):i,d;if(Array.isArray(o)){var h=u?o.filter(function(y){return Vo(y)}):o,m=f.map(function(y,v){return Fm(Fm({},y),{},{base:h[v]})});return s==="vertical"?d=Gi().y(Qa).x1(Za).x0(function(y){return y.base.x}):d=Gi().x(Za).y1(Qa).y0(function(y){return y.base.y}),d.defined(Vo).curve(c),d(m)}return s==="vertical"&&J(o)?d=Gi().y(Qa).x1(Za).x0(o):J(o)?d=Gi().x(Za).y1(Qa).y0(o):d=Pd().x(Za).y(Qa),d.defined(Vo).curve(c),d(f)},Gr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?m5(t):a;return xt.createElement("path",rc({},de(t,!1),Bi(t),{className:me("recharts-curve",r),d:o,ref:i}))},nc={exports:{}},Go={exports:{}},Se={};/** @license React v16.13.1
208
+ A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
209
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
210
+ `);if(a>0){var O=zo({cx:r,cy:n,radius:a,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),S=O.circleTangency,P=O.lineTangency,$=O.theta,N=zo({cx:r,cy:n,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=N.circleTangency,C=N.lineTangency,k=N.theta,_=l?Math.abs(c-u):Math.abs(c-u)-$-k;if(_<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(C.x,",").concat(C.y,`
211
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(j.x,",").concat(j.y,`
212
+ A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(f>0),",").concat(S.x,",").concat(S.y,`
213
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},d5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Rm=function(t){var r=Im(Im({},d5),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,u=r.startAngle,f=r.endAngle,d=r.className;if(o<i||u===f)return null;var h=me("recharts-sector",d),m=o-i,g=kr(s,m,0,!0),v;return g>0&&Math.abs(u-f)<360?v=f5({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):v=Lm({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),T.createElement("path",tu({},de(r,!0),{className:h,d:v,role:"img"}))};function Ja(e){"@babel/helpers - typeof";return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ja(e)}function ru(){return ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ru.apply(this,arguments)}function Bm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bm(Object(r),!0).forEach(function(n){p5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p5(e,t,r){return t=h5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h5(e){var t=v5(e,"string");return Ja(t)=="symbol"?t:t+""}function v5(e,t){if(Ja(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ja(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wm={curveBasisClosed:pT,curveBasisOpen:hT,curveBasis:dT,curveBumpX:ZS,curveBumpY:QS,curveLinearClosed:vT,curveLinear:Vi,curveMonotoneX:mT,curveMonotoneY:yT,curveNatural:gT,curveStep:bT,curveStepAfter:wT,curveStepBefore:xT},Vo=function(t){return t.x===+t.x&&t.y===+t.y},Za=function(t){return t.x},Qa=function(t){return t.y},m5=function(t,r){if(pe(t))return t;var n="curve".concat(Fi(t));return(n==="curveMonotone"||n==="curveBump")&&r?Wm["".concat(n).concat(r==="vertical"?"Y":"X")]:Wm[n]||Vi},y5=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,u=m5(n,s),f=c?i.filter(function(g){return Vo(g)}):i,d;if(Array.isArray(o)){var h=c?o.filter(function(g){return Vo(g)}):o,m=f.map(function(g,v){return Fm(Fm({},g),{},{base:h[v]})});return s==="vertical"?d=Gi().y(Qa).x1(Za).x0(function(g){return g.base.x}):d=Gi().x(Za).y1(Qa).y0(function(g){return g.base.y}),d.defined(Vo).curve(u),d(m)}return s==="vertical"&&J(o)?d=Gi().y(Qa).x1(Za).x0(o):J(o)?d=Gi().x(Za).y1(Qa).y0(o):d=Pd().x(Za).y(Qa),d.defined(Vo).curve(u),d(f)},Gr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?y5(t):a;return xt.createElement("path",ru({},de(t,!1),Bi(t),{className:me("recharts-curve",r),d:o,ref:i}))},nu={exports:{}},Go={exports:{}},Se={};/** @license React v16.13.1
214
214
  * react-is.production.min.js
215
215
  *
216
216
  * Copyright (c) Facebook, Inc. and its affiliates.
217
217
  *
218
218
  * This source code is licensed under the MIT license found in the
219
219
  * LICENSE file in the root directory of this source tree.
220
- */var Um;function y5(){if(Um)return Se;Um=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(g){if(typeof g=="object"&&g!==null){var O=g.$$typeof;switch(O){case t:switch(g=g.type,g){case l:case u:case n:case i:case a:case f:return g;default:switch(g=g&&g.$$typeof,g){case s:case c:case m:case h:case o:return g;default:return O}}case r:return O}}}function A(g){return w(g)===u}return Se.AsyncMode=l,Se.ConcurrentMode=u,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=t,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=m,Se.Memo=h,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(g){return A(g)||w(g)===l},Se.isConcurrentMode=A,Se.isContextConsumer=function(g){return w(g)===s},Se.isContextProvider=function(g){return w(g)===o},Se.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Se.isForwardRef=function(g){return w(g)===c},Se.isFragment=function(g){return w(g)===n},Se.isLazy=function(g){return w(g)===m},Se.isMemo=function(g){return w(g)===h},Se.isPortal=function(g){return w(g)===r},Se.isProfiler=function(g){return w(g)===i},Se.isStrictMode=function(g){return w(g)===a},Se.isSuspense=function(g){return w(g)===f},Se.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===u||g===i||g===a||g===f||g===d||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===h||g.$$typeof===o||g.$$typeof===s||g.$$typeof===c||g.$$typeof===v||g.$$typeof===b||g.$$typeof===x||g.$$typeof===y)},Se.typeOf=w,Se}var Te={};/** @license React v16.13.1
220
+ */var Um;function g5(){if(Um)return Se;Um=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var O=y.$$typeof;switch(O){case t:switch(y=y.type,y){case l:case c:case n:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case u:case m:case h:case o:return y;default:return O}}case r:return O}}}function A(y){return w(y)===c}return Se.AsyncMode=l,Se.ConcurrentMode=c,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=t,Se.ForwardRef=u,Se.Fragment=n,Se.Lazy=m,Se.Memo=h,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(y){return A(y)||w(y)===l},Se.isConcurrentMode=A,Se.isContextConsumer=function(y){return w(y)===s},Se.isContextProvider=function(y){return w(y)===o},Se.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Se.isForwardRef=function(y){return w(y)===u},Se.isFragment=function(y){return w(y)===n},Se.isLazy=function(y){return w(y)===m},Se.isMemo=function(y){return w(y)===h},Se.isPortal=function(y){return w(y)===r},Se.isProfiler=function(y){return w(y)===i},Se.isStrictMode=function(y){return w(y)===a},Se.isSuspense=function(y){return w(y)===f},Se.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===c||y===i||y===a||y===f||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===o||y.$$typeof===s||y.$$typeof===u||y.$$typeof===v||y.$$typeof===x||y.$$typeof===b||y.$$typeof===g)},Se.typeOf=w,Se}var Te={};/** @license React v16.13.1
221
221
  * react-is.development.js
222
222
  *
223
223
  * Copyright (c) Facebook, Inc. and its affiliates.
224
224
  *
225
225
  * This source code is licensed under the MIT license found in the
226
226
  * LICENSE file in the root directory of this source tree.
227
- */var zm;function g5(){return zm||(zm=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(L){return typeof L=="string"||typeof L=="function"||L===n||L===u||L===i||L===a||L===f||L===d||typeof L=="object"&&L!==null&&(L.$$typeof===m||L.$$typeof===h||L.$$typeof===o||L.$$typeof===s||L.$$typeof===c||L.$$typeof===v||L.$$typeof===b||L.$$typeof===x||L.$$typeof===y)}function A(L){if(typeof L=="object"&&L!==null){var oe=L.$$typeof;switch(oe){case t:var H=L.type;switch(H){case l:case u:case n:case i:case a:case f:return H;default:var ue=H&&H.$$typeof;switch(ue){case s:case c:case m:case h:case o:return ue;default:return oe}}case r:return oe}}}var g=l,O=u,S=s,j=o,E=t,M=c,_=n,P=m,I=h,C=r,D=i,k=a,B=f,U=!1;function V(L){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(L)||A(L)===l}function $(L){return A(L)===u}function R(L){return A(L)===s}function F(L){return A(L)===o}function W(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function G(L){return A(L)===c}function X(L){return A(L)===n}function Q(L){return A(L)===m}function ae(L){return A(L)===h}function te(L){return A(L)===r}function q(L){return A(L)===i}function Y(L){return A(L)===a}function Z(L){return A(L)===f}Te.AsyncMode=g,Te.ConcurrentMode=O,Te.ContextConsumer=S,Te.ContextProvider=j,Te.Element=E,Te.ForwardRef=M,Te.Fragment=_,Te.Lazy=P,Te.Memo=I,Te.Portal=C,Te.Profiler=D,Te.StrictMode=k,Te.Suspense=B,Te.isAsyncMode=V,Te.isConcurrentMode=$,Te.isContextConsumer=R,Te.isContextProvider=F,Te.isElement=W,Te.isForwardRef=G,Te.isFragment=X,Te.isLazy=Q,Te.isMemo=ae,Te.isPortal=te,Te.isProfiler=q,Te.isStrictMode=Y,Te.isSuspense=Z,Te.isValidElementType=w,Te.typeOf=A}()),Te}var Vm;function Gm(){return Vm||(Vm=1,process.env.NODE_ENV==="production"?Go.exports=y5():Go.exports=g5()),Go.exports}/*
227
+ */var zm;function b5(){return zm||(zm=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(L){return typeof L=="string"||typeof L=="function"||L===n||L===c||L===i||L===a||L===f||L===d||typeof L=="object"&&L!==null&&(L.$$typeof===m||L.$$typeof===h||L.$$typeof===o||L.$$typeof===s||L.$$typeof===u||L.$$typeof===v||L.$$typeof===x||L.$$typeof===b||L.$$typeof===g)}function A(L){if(typeof L=="object"&&L!==null){var oe=L.$$typeof;switch(oe){case t:var K=L.type;switch(K){case l:case c:case n:case i:case a:case f:return K;default:var ce=K&&K.$$typeof;switch(ce){case s:case u:case m:case h:case o:return ce;default:return oe}}case r:return oe}}}var y=l,O=c,S=s,P=o,$=t,N=u,j=n,C=m,k=h,_=r,D=i,M=a,B=f,U=!1;function V(L){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E(L)||A(L)===l}function E(L){return A(L)===c}function R(L){return A(L)===s}function F(L){return A(L)===o}function W(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function G(L){return A(L)===u}function X(L){return A(L)===n}function Q(L){return A(L)===m}function ae(L){return A(L)===h}function te(L){return A(L)===r}function q(L){return A(L)===i}function Y(L){return A(L)===a}function Z(L){return A(L)===f}Te.AsyncMode=y,Te.ConcurrentMode=O,Te.ContextConsumer=S,Te.ContextProvider=P,Te.Element=$,Te.ForwardRef=N,Te.Fragment=j,Te.Lazy=C,Te.Memo=k,Te.Portal=_,Te.Profiler=D,Te.StrictMode=M,Te.Suspense=B,Te.isAsyncMode=V,Te.isConcurrentMode=E,Te.isContextConsumer=R,Te.isContextProvider=F,Te.isElement=W,Te.isForwardRef=G,Te.isFragment=X,Te.isLazy=Q,Te.isMemo=ae,Te.isPortal=te,Te.isProfiler=q,Te.isStrictMode=Y,Te.isSuspense=Z,Te.isValidElementType=w,Te.typeOf=A}()),Te}var Vm;function Gm(){return Vm||(Vm=1,process.env.NODE_ENV==="production"?Go.exports=g5():Go.exports=b5()),Go.exports}/*
228
228
  object-assign
229
229
  (c) Sindre Sorhus
230
230
  @license MIT
231
- */var ac,qm;function b5(){if(qm)return ac;qm=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ac=a()?Object.assign:function(i,o){for(var s,l=n(i),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(l[u[d]]=s[u[d]])}}return l},ac}var ic,Hm;function oc(){if(Hm)return ic;Hm=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ic=e,ic}var sc,Km;function Ym(){return Km||(Km=1,sc=Function.call.bind(Object.prototype.hasOwnProperty)),sc}var lc,Xm;function x5(){if(Xm)return lc;Xm=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=oc(),r={},n=Ym();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var d=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[c](o,c,l,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},lc=a,lc}var uc,Jm;function w5(){if(Jm)return uc;Jm=1;var e=Gm(),t=b5(),r=oc(),n=Ym(),a=x5(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return uc=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f($){var R=$&&(u&&$[u]||$[c]);if(typeof R=="function")return R}var d="<<anonymous>>",h={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:x(),arrayOf:w,element:A(),elementType:g(),instanceOf:O,node:M(),objectOf:j,oneOf:S,oneOfType:E,shape:P,exact:I};function m($,R){return $===R?$!==0||1/$===1/R:$!==$&&R!==R}function y($,R){this.message=$,this.data=R&&typeof R=="object"?R:{},this.stack=""}y.prototype=Error.prototype;function v($){if(process.env.NODE_ENV!=="production")var R={},F=0;function W(X,Q,ae,te,q,Y,Z){if(te=te||d,Y=Y||ae,Z!==r){if(l){var L=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 L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=te+":"+ae;!R[oe]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[oe]=!0,F++)}}return Q[ae]==null?X?Q[ae]===null?new y("The "+q+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new y("The "+q+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:$(Q,ae,te,q,Y)}var G=W.bind(null,!1);return G.isRequired=W.bind(null,!0),G}function b($){function R(F,W,G,X,Q,ae){var te=F[W],q=k(te);if(q!==$){var Y=B(te);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return v(R)}function x(){return v(o)}function w($){function R(F,W,G,X,Q){if(typeof $!="function")return new y("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var ae=F[W];if(!Array.isArray(ae)){var te=k(ae);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an array."))}for(var q=0;q<ae.length;q++){var Y=$(ae,q,G,X,Q+"["+q+"]",r);if(Y instanceof Error)return Y}return null}return v(R)}function A(){function $(R,F,W,G,X){var Q=R[F];if(!s(Q)){var ae=k(Q);return new y("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return v($)}function g(){function $(R,F,W,G,X){var Q=R[F];if(!e.isValidElementType(Q)){var ae=k(Q);return new y("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return v($)}function O($){function R(F,W,G,X,Q){if(!(F[W]instanceof $)){var ae=$.name||d,te=V(F[W]);return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected ")+("instance of `"+ae+"`."))}return null}return v(R)}function S($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function R(F,W,G,X,Q){for(var ae=F[W],te=0;te<$.length;te++)if(m(ae,$[te]))return null;var q=JSON.stringify($,function(Z,L){var oe=B(L);return oe==="symbol"?String(L):L});return new y("Invalid "+X+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+G+"`, expected one of "+q+"."))}return v(R)}function j($){function R(F,W,G,X,Q){if(typeof $!="function")return new y("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var ae=F[W],te=k(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an object."));for(var q in ae)if(n(ae,q)){var Y=$(ae,q,G,X,Q+"."+q,r);if(Y instanceof Error)return Y}return null}return v(R)}function E($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var R=0;R<$.length;R++){var F=$[R];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(F)+" at index "+R+"."),o}function W(G,X,Q,ae,te){for(var q=[],Y=0;Y<$.length;Y++){var Z=$[Y],L=Z(G,X,Q,ae,te,r);if(L==null)return null;L.data&&n(L.data,"expectedType")&&q.push(L.data.expectedType)}var oe=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new y("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+oe+"."))}return v(W)}function M(){function $(R,F,W,G,X){return C(R[F])?null:new y("Invalid "+G+" `"+X+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return v($)}function _($,R,F,W,G){return new y(($||"React class")+": "+R+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function P($){function R(F,W,G,X,Q){var ae=F[W],te=k(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));for(var q in $){var Y=$[q];if(typeof Y!="function")return _(G,X,Q,q,B(Y));var Z=Y(ae,q,G,X,Q+"."+q,r);if(Z)return Z}return null}return v(R)}function I($){function R(F,W,G,X,Q){var ae=F[W],te=k(ae);if(te!=="object")return new y("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));var q=t({},F[W],$);for(var Y in q){var Z=$[Y];if(n($,Y)&&typeof Z!="function")return _(G,X,Q,Y,B(Z));if(!Z)return new y("Invalid "+X+" `"+Q+"` key `"+Y+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
232
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var L=Z(ae,Y,G,X,Q+"."+Y,r);if(L)return L}return null}return v(R)}function C($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(C);if($===null||s($))return!0;var R=f($);if(R){var F=R.call($),W;if(R!==$.entries){for(;!(W=F.next()).done;)if(!C(W.value))return!1}else for(;!(W=F.next()).done;){var G=W.value;if(G&&!C(G[1]))return!1}}else return!1;return!0;default:return!1}}function D($,R){return $==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function k($){var R=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(R,$)?"symbol":R}function B($){if(typeof $>"u"||$===null)return""+$;var R=k($);if(R==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return R}function U($){var R=B($);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function V($){return!$.constructor||!$.constructor.name?d:$.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},uc}var cc,Zm;function O5(){if(Zm)return cc;Zm=1;var e=oc();function t(){}function r(){}return r.resetWarningCache=t,cc=function(){function n(o,s,l,u,c,f){if(f!==e){var d=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 d.name="Invariant Violation",d}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},cc}if(process.env.NODE_ENV!=="production"){var S5=Gm(),T5=!0;nc.exports=w5()(S5.isElement,T5)}else nc.exports=O5()();var A5=nc.exports;const Ae=$e(A5);var P5=Object.getOwnPropertyNames,j5=Object.getOwnPropertySymbols,_5=Object.prototype.hasOwnProperty;function Qm(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function qo(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function ey(e){return P5(e).concat(j5(e))}var E5=Object.hasOwn||function(e,t){return _5.call(e,t)};function qr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var C5="__v",$5="__o",k5="_owner",ty=Object.getOwnPropertyDescriptor,ry=Object.keys;function M5(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function N5(e,t){return qr(e.getTime(),t.getTime())}function D5(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function I5(e,t){return e===t}function ny(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var u=t.entries(),c=!1,f=0;(s=u.next())&&!s.done;){if(a[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var L5=qr;function R5(e,t,r){var n=ry(e),a=n.length;if(ry(t).length!==a)return!1;for(;a-- >0;)if(!iy(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=ey(e),a=n.length;if(ey(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!iy(e,t,r,i)||(o=ty(e,i),s=ty(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function B5(e,t){return qr(e.valueOf(),t.valueOf())}function F5(e,t){return e.source===t.source&&e.flags===t.flags}function ay(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function W5(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function U5(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function iy(e,t,r,n){return(n===k5||n===$5||n===C5)&&(e.$$typeof||t.$$typeof)?!0:E5(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var z5="[object Arguments]",V5="[object Boolean]",G5="[object Date]",q5="[object Error]",H5="[object Map]",K5="[object Number]",Y5="[object Object]",X5="[object RegExp]",J5="[object Set]",Z5="[object String]",Q5="[object URL]",e6=Array.isArray,oy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,sy=Object.assign,t6=Object.prototype.toString.call.bind(Object.prototype.toString);function r6(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,f=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(m,y,v){if(m===y)return!0;if(m==null||y==null)return!1;var b=typeof m;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(m,y,v):b==="function"?a(m,y,v):!1;var x=m.constructor;if(x!==y.constructor)return!1;if(x===Object)return s(m,y,v);if(e6(m))return t(m,y,v);if(oy!=null&&oy(m))return f(m,y,v);if(x===Date)return r(m,y,v);if(x===RegExp)return u(m,y,v);if(x===Map)return i(m,y,v);if(x===Set)return c(m,y,v);var w=t6(m);return w===G5?r(m,y,v):w===X5?u(m,y,v):w===H5?i(m,y,v):w===J5?c(m,y,v):w===Y5?typeof m.then!="function"&&typeof y.then!="function"&&s(m,y,v):w===Q5?d(m,y,v):w===q5?n(m,y,v):w===z5?s(m,y,v):w===V5||w===K5||w===Z5?l(m,y,v):!1}}function n6(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:M5,areDatesEqual:N5,areErrorsEqual:D5,areFunctionsEqual:I5,areMapsEqual:n?Qm(ny,ei):ny,areNumbersEqual:L5,areObjectsEqual:n?ei:R5,arePrimitiveWrappersEqual:B5,areRegExpsEqual:F5,areSetsEqual:n?Qm(ay,ei):ay,areTypedArraysEqual:n?ei:W5,areUrlsEqual:U5};if(r&&(a=sy({},a,r(a))),t){var i=qo(a.areArraysEqual),o=qo(a.areMapsEqual),s=qo(a.areObjectsEqual),l=qo(a.areSetsEqual);a=sy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function a6(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function i6(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,u){var c=n(),f=c.cache,d=f===void 0?t?new WeakMap:void 0:f,h=c.meta;return r(l,u,{cache:d,equals:a,meta:h,strict:i})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,u){return r(l,u,o)}}var o6=Or();Or({strict:!0}),Or({circular:!0}),Or({circular:!0,strict:!0}),Or({createInternalComparator:function(){return qr}}),Or({strict:!0,createInternalComparator:function(){return qr}}),Or({circular:!0,createInternalComparator:function(){return qr}}),Or({circular:!0,createInternalComparator:function(){return qr},strict:!0});function Or(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=n6(e),l=r6(s),u=n?n(l):a6(l);return i6({circular:r,comparator:l,createState:a,equals:u,strict:o})}function s6(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):s6(a)};requestAnimationFrame(n)}function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function l6(e){return d6(e)||f6(e)||c6(e)||u6()}function u6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
233
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c6(e,t){if(e){if(typeof e=="string")return uy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uy(e,t)}}function uy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function d6(e){if(Array.isArray(e))return e}function p6(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=l6(o),l=s[0],u=s.slice(1);if(typeof l=="number"){ly(a.bind(null,u),l);return}a(l),ly(a.bind(null,u));return}fc(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function ti(e){"@babel/helpers - typeof";return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(e)}function cy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cy(Object(r),!0).forEach(function(n){dy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dy(e,t,r){return t=h6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h6(e){var t=v6(e,"string");return ti(t)==="symbol"?t:String(t)}function v6(e,t){if(ti(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ti(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var m6=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},y6=function(t){return t},g6=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ri=function(t,r){return Object.keys(r).reduce(function(n,a){return fy(fy({},n),{},dy({},a,t(a,r[a])))},{})},py=function(t,r,n){return t.map(function(a){return"".concat(g6(a)," ").concat(r,"ms ").concat(n)}).join(",")},b6=process.env.NODE_ENV!=="production",Ho=function(t,r,n,a,i,o,s,l){if(b6&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,i,o,s,l],c=0;console.warn(r.replace(/%s/g,function(){return u[c++]}))}};function x6(e,t){return S6(e)||O6(e,t)||hy(e,t)||w6()}function w6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
234
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function S6(e){if(Array.isArray(e))return e}function T6(e){return j6(e)||P6(e)||hy(e)||A6()}function A6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
235
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hy(e,t){if(e){if(typeof e=="string")return dc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dc(e,t)}}function P6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j6(e){if(Array.isArray(e))return dc(e)}function dc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ko=1e-4,vy=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},my=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},yy=function(t,r){return function(n){var a=vy(t,r);return my(a,n)}},_6=function(t,r){return function(n){var a=vy(t,r),i=[].concat(T6(a.map(function(o,s){return o*s}).slice(1)),[0]);return my(i,n)}},gy=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),c=x6(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else Ho(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}Ho([a,o,i,s].every(function(v){return typeof v=="number"&&v>=0&&v<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=yy(a,o),d=yy(i,s),h=_6(a,o),m=function(b){return b>1?1:b<0?0:b},y=function(b){for(var x=b>1?1:b,w=x,A=0;A<8;++A){var g=f(w)-x,O=h(w);if(Math.abs(g-x)<Ko||O<Ko)return d(w);w=m(w-g/O)}return d(w)};return y.isStepper=!1,y},E6=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var h=-(c-f)*n,m=d*i,y=d+(h-m)*s/1e3,v=d*s/1e3+c;return Math.abs(v-f)<Ko&&Math.abs(y)<Ko?[f,0]:[v,y]};return l.isStepper=!0,l.dt=s,l},C6=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return gy(a);case"spring":return E6();default:if(a.split("(")[0]==="cubic-bezier")return gy(a);Ho(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(Ho(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function ni(e){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(e)}function by(e){return M6(e)||k6(e)||wy(e)||$6()}function $6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
236
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function M6(e){if(Array.isArray(e))return hc(e)}function xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xy(Object(r),!0).forEach(function(n){pc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pc(e,t,r){return t=N6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N6(e){var t=D6(e,"string");return ni(t)==="symbol"?t:String(t)}function D6(e,t){if(ni(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function I6(e,t){return B6(e)||R6(e,t)||wy(e,t)||L6()}function L6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
237
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wy(e,t){if(e){if(typeof e=="string")return hc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hc(e,t)}}function hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function B6(e){if(Array.isArray(e))return e}var Yo=function(t,r,n){return t+(r-t)*n},vc=function(t){var r=t.from,n=t.to;return r!==n},F6=function e(t,r,n){var a=ri(function(i,o){if(vc(o)){var s=t(o.from,o.to,o.velocity),l=I6(s,2),u=l[0],c=l[1];return at(at({},o),{},{from:u,velocity:c})}return o},r);return n<1?ri(function(i,o){return vc(o)?at(at({},o),{},{velocity:Yo(o.velocity,a[i].velocity,n),from:Yo(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const W6=function(e,t,r,n,a){var i=m6(e,t),o=i.reduce(function(v,b){return at(at({},v),{},pc({},b,[e[b],t[b]]))},{}),s=i.reduce(function(v,b){return at(at({},v),{},pc({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return ri(function(b,x){return x.from},s)},h=function(){return!Object.values(s).filter(vc).length},m=function(b){u||(u=b);var x=b-u,w=x/r.dt;s=F6(r,s,w),a(at(at(at({},e),t),d())),u=b,h()||(l=requestAnimationFrame(f))},y=function(b){c||(c=b);var x=(b-c)/n,w=ri(function(g,O){return Yo.apply(void 0,by(O).concat([r(x)]))},o);if(a(at(at(at({},e),t),w)),x<1)l=requestAnimationFrame(f);else{var A=ri(function(g,O){return Yo.apply(void 0,by(O).concat([r(1)]))},o);a(at(at(at({},e),t),A))}};return f=r.isStepper?m:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Nn(e){"@babel/helpers - typeof";return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nn(e)}var U6=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function z6(e,t){if(e==null)return{};var r=V6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function V6(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function mc(e){return K6(e)||H6(e)||q6(e)||G6()}function G6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
238
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q6(e,t){if(e){if(typeof e=="string")return yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yc(e,t)}}function H6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K6(e){if(Array.isArray(e))return yc(e)}function yc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(r),!0).forEach(function(n){ai(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ai(e,t,r){return t=Sy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sy(n.key),n)}}function J6(e,t,r){return t&&X6(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sy(e){var t=Z6(e,"string");return Nn(t)==="symbol"?t:String(t)}function Z6(e,t){if(Nn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gc(e,t)}function gc(e,t){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gc(e,t)}function e4(e){var t=t4();return function(){var n=Xo(e),a;if(t){var i=Xo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return bc(this,a)}}function bc(e,t){if(t&&(Nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xc(e)}function xc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xo(e){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xo(e)}var Dt=function(e){Q6(r,e);var t=e4(r);function r(n,a){var i;Y6(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(xc(i)),i.changeStyle=i.changeStyle.bind(xc(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),bc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},bc(i);i.state={style:l?ai({},l,u):u}}else i.state={style:{}};return i}return J6(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,f=i.from,d=this.state.style;if(s){if(!o){var h={style:l?ai({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(h);return}if(!(o6(a.to,c)&&a.canBegin&&a.isActive)){var m=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=m||u?f:a.to;if(this.state&&d){var v={style:l?ai({},l,y):y};(l&&d[l]!==y||!l&&d!==y)&&this.setState(v)}this.runAnimation(Nt(Nt({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,u=a.easing,c=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=W6(o,s,C6(u),l,this.changeStyle),m=function(){i.stopJSAnimation=h()};this.manager.start([d,c,m,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,h=function(y,v,b){if(b===0)return y;var x=v.duration,w=v.easing,A=w===void 0?"ease":w,g=v.style,O=v.properties,S=v.onAnimationEnd,j=b>0?o[b-1]:v,E=O||Object.keys(g);if(typeof A=="function"||A==="spring")return[].concat(mc(y),[i.runJSAnimation.bind(i,{from:j.style,to:g,duration:x,easing:A}),x]);var M=py(E,x,A),_=Nt(Nt(Nt({},j.style),g),{},{transition:M});return[].concat(mc(y),[_,x,S]).filter(y6)};return this.manager.start([l].concat(mc(o.reduce(h,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=p6());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,u=a.easing,c=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var y=s?ai({},s,l):l,v=py(Object.keys(y),o,u);m.start([c,i,Nt(Nt({},y),{},{transition:v}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=z6(a,U6),u=T.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||o<=0)return i;var f=function(h){var m=h.props,y=m.style,v=y===void 0?{}:y,b=m.className,x=T.cloneElement(h,Nt(Nt({},l),{},{style:Nt(Nt({},v),c),className:b}));return x};return u===1?f(T.Children.only(i)):T.createElement("div",null,T.Children.map(i,function(d){return f(d)}))}}]),r}(T.PureComponent);Dt.displayName="Animate",Dt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Dt.propTypes={from:Ae.oneOfType([Ae.object,Ae.string]),to:Ae.oneOfType([Ae.object,Ae.string]),attributeName:Ae.string,duration:Ae.number,begin:Ae.number,easing:Ae.oneOfType([Ae.string,Ae.func]),steps:Ae.arrayOf(Ae.shape({duration:Ae.number.isRequired,style:Ae.object.isRequired,easing:Ae.oneOfType([Ae.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ae.func]),properties:Ae.arrayOf("string"),onAnimationEnd:Ae.func})),children:Ae.oneOfType([Ae.node,Ae.func]),isActive:Ae.bool,canBegin:Ae.bool,onAnimationEnd:Ae.func,shouldReAnimate:Ae.bool,onAnimationStart:Ae.func,onAnimationReStart:Ae.func};function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jo.apply(this,arguments)}function r4(e,t){return o4(e)||i4(e,t)||a4(e,t)||n4()}function n4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
239
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a4(e,t){if(e){if(typeof e=="string")return Ty(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ty(e,t)}}function Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function o4(e){if(Array.isArray(e))return e}function Ay(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Py(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ay(Object(r),!0).forEach(function(n){s4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ay(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s4(e,t,r){return t=l4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l4(e){var t=u4(e,"string");return ii(t)=="symbol"?t:t+""}function u4(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jy=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=i[d]>o?o:i[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
240
- `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+a-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
241
- `).concat(t+n-l*f[2],",").concat(r+a)),c+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
242
- `).concat(t,",").concat(r+a-s*f[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var m=Math.min(o,i);c="M ".concat(t,",").concat(r+s*m,`
243
- A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+l*m,",").concat(r,`
231
+ */var au,qm;function x5(){if(qm)return au;qm=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return au=a()?Object.assign:function(i,o){for(var s,l=n(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var d=0;d<c.length;d++)r.call(s,c[d])&&(l[c[d]]=s[c[d]])}}return l},au}var iu,Km;function ou(){if(Km)return iu;Km=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return iu=e,iu}var su,Hm;function Ym(){return Hm||(Hm=1,su=Function.call.bind(Object.prototype.hasOwnProperty)),su}var lu,Xm;function w5(){if(Xm)return lu;Xm=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ou(),r={},n=Ym();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(n(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](o,u,l,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=c?c():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},lu=a,lu}var cu,Jm;function O5(){if(Jm)return cu;Jm=1;var e=Gm(),t=x5(),r=ou(),n=Ym(),a=w5(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return cu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(E){var R=E&&(c&&E[c]||E[u]);if(typeof R=="function")return R}var d="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:b(),arrayOf:w,element:A(),elementType:y(),instanceOf:O,node:N(),objectOf:P,oneOf:S,oneOfType:$,shape:C,exact:k};function m(E,R){return E===R?E!==0||1/E===1/R:E!==E&&R!==R}function g(E,R){this.message=E,this.data=R&&typeof R=="object"?R:{},this.stack=""}g.prototype=Error.prototype;function v(E){if(process.env.NODE_ENV!=="production")var R={},F=0;function W(X,Q,ae,te,q,Y,Z){if(te=te||d,Y=Y||ae,Z!==r){if(l){var L=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 L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=te+":"+ae;!R[oe]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[oe]=!0,F++)}}return Q[ae]==null?X?Q[ae]===null?new g("The "+q+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new g("The "+q+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:E(Q,ae,te,q,Y)}var G=W.bind(null,!1);return G.isRequired=W.bind(null,!0),G}function x(E){function R(F,W,G,X,Q,ae){var te=F[W],q=M(te);if(q!==E){var Y=B(te);return new g("Invalid "+X+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return v(R)}function b(){return v(o)}function w(E){function R(F,W,G,X,Q){if(typeof E!="function")return new g("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var ae=F[W];if(!Array.isArray(ae)){var te=M(ae);return new g("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an array."))}for(var q=0;q<ae.length;q++){var Y=E(ae,q,G,X,Q+"["+q+"]",r);if(Y instanceof Error)return Y}return null}return v(R)}function A(){function E(R,F,W,G,X){var Q=R[F];if(!s(Q)){var ae=M(Q);return new g("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return v(E)}function y(){function E(R,F,W,G,X){var Q=R[F];if(!e.isValidElementType(Q)){var ae=M(Q);return new g("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return v(E)}function O(E){function R(F,W,G,X,Q){if(!(F[W]instanceof E)){var ae=E.name||d,te=V(F[W]);return new g("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected ")+("instance of `"+ae+"`."))}return null}return v(R)}function S(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function R(F,W,G,X,Q){for(var ae=F[W],te=0;te<E.length;te++)if(m(ae,E[te]))return null;var q=JSON.stringify(E,function(Z,L){var oe=B(L);return oe==="symbol"?String(L):L});return new g("Invalid "+X+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+G+"`, expected one of "+q+"."))}return v(R)}function P(E){function R(F,W,G,X,Q){if(typeof E!="function")return new g("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var ae=F[W],te=M(ae);if(te!=="object")return new g("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an object."));for(var q in ae)if(n(ae,q)){var Y=E(ae,q,G,X,Q+"."+q,r);if(Y instanceof Error)return Y}return null}return v(R)}function $(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var R=0;R<E.length;R++){var F=E[R];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(F)+" at index "+R+"."),o}function W(G,X,Q,ae,te){for(var q=[],Y=0;Y<E.length;Y++){var Z=E[Y],L=Z(G,X,Q,ae,te,r);if(L==null)return null;L.data&&n(L.data,"expectedType")&&q.push(L.data.expectedType)}var oe=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new g("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+oe+"."))}return v(W)}function N(){function E(R,F,W,G,X){return _(R[F])?null:new g("Invalid "+G+" `"+X+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return v(E)}function j(E,R,F,W,G){return new g((E||"React class")+": "+R+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function C(E){function R(F,W,G,X,Q){var ae=F[W],te=M(ae);if(te!=="object")return new g("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));for(var q in E){var Y=E[q];if(typeof Y!="function")return j(G,X,Q,q,B(Y));var Z=Y(ae,q,G,X,Q+"."+q,r);if(Z)return Z}return null}return v(R)}function k(E){function R(F,W,G,X,Q){var ae=F[W],te=M(ae);if(te!=="object")return new g("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));var q=t({},F[W],E);for(var Y in q){var Z=E[Y];if(n(E,Y)&&typeof Z!="function")return j(G,X,Q,Y,B(Z));if(!Z)return new g("Invalid "+X+" `"+Q+"` key `"+Y+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
232
+ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var L=Z(ae,Y,G,X,Q+"."+Y,r);if(L)return L}return null}return v(R)}function _(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(_);if(E===null||s(E))return!0;var R=f(E);if(R){var F=R.call(E),W;if(R!==E.entries){for(;!(W=F.next()).done;)if(!_(W.value))return!1}else for(;!(W=F.next()).done;){var G=W.value;if(G&&!_(G[1]))return!1}}else return!1;return!0;default:return!1}}function D(E,R){return E==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function M(E){var R=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":D(R,E)?"symbol":R}function B(E){if(typeof E>"u"||E===null)return""+E;var R=M(E);if(R==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return R}function U(E){var R=B(E);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function V(E){return!E.constructor||!E.constructor.name?d:E.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},cu}var uu,Zm;function S5(){if(Zm)return uu;Zm=1;var e=ou();function t(){}function r(){}return r.resetWarningCache=t,uu=function(){function n(o,s,l,c,u,f){if(f!==e){var d=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 d.name="Invariant Violation",d}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},uu}if(process.env.NODE_ENV!=="production"){var T5=Gm(),A5=!0;nu.exports=O5()(T5.isElement,A5)}else nu.exports=S5()();var P5=nu.exports;const Ae=$e(P5);var j5=Object.getOwnPropertyNames,_5=Object.getOwnPropertySymbols,E5=Object.prototype.hasOwnProperty;function Qm(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function qo(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function ey(e){return j5(e).concat(_5(e))}var C5=Object.hasOwn||function(e,t){return E5.call(e,t)};function qr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var $5="__v",k5="__o",M5="_owner",ty=Object.getOwnPropertyDescriptor,ry=Object.keys;function N5(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function D5(e,t){return qr(e.getTime(),t.getTime())}function I5(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function L5(e,t){return e===t}function ny(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var c=t.entries(),u=!1,f=0;(s=c.next())&&!s.done;){if(a[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){u=a[f]=!0;break}f++}if(!u)return!1;l++}return!0}var R5=qr;function B5(e,t,r){var n=ry(e),a=n.length;if(ry(t).length!==a)return!1;for(;a-- >0;)if(!iy(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=ey(e),a=n.length;if(ey(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!iy(e,t,r,i)||(o=ty(e,i),s=ty(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function F5(e,t){return qr(e.valueOf(),t.valueOf())}function W5(e,t){return e.source===t.source&&e.flags===t.flags}function ay(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),c=!1,u=0;(s=l.next())&&!s.done;){if(!a[u]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){c=a[u]=!0;break}u++}if(!c)return!1}return!0}function U5(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function z5(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function iy(e,t,r,n){return(n===M5||n===k5||n===$5)&&(e.$$typeof||t.$$typeof)?!0:C5(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var V5="[object Arguments]",G5="[object Boolean]",q5="[object Date]",K5="[object Error]",H5="[object Map]",Y5="[object Number]",X5="[object Object]",J5="[object RegExp]",Z5="[object Set]",Q5="[object String]",e6="[object URL]",t6=Array.isArray,oy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,sy=Object.assign,r6=Object.prototype.toString.call.bind(Object.prototype.toString);function n6(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,f=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(m,g,v){if(m===g)return!0;if(m==null||g==null)return!1;var x=typeof m;if(x!==typeof g)return!1;if(x!=="object")return x==="number"?o(m,g,v):x==="function"?a(m,g,v):!1;var b=m.constructor;if(b!==g.constructor)return!1;if(b===Object)return s(m,g,v);if(t6(m))return t(m,g,v);if(oy!=null&&oy(m))return f(m,g,v);if(b===Date)return r(m,g,v);if(b===RegExp)return c(m,g,v);if(b===Map)return i(m,g,v);if(b===Set)return u(m,g,v);var w=r6(m);return w===q5?r(m,g,v):w===J5?c(m,g,v):w===H5?i(m,g,v):w===Z5?u(m,g,v):w===X5?typeof m.then!="function"&&typeof g.then!="function"&&s(m,g,v):w===e6?d(m,g,v):w===K5?n(m,g,v):w===V5?s(m,g,v):w===G5||w===Y5||w===Q5?l(m,g,v):!1}}function a6(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:N5,areDatesEqual:D5,areErrorsEqual:I5,areFunctionsEqual:L5,areMapsEqual:n?Qm(ny,ei):ny,areNumbersEqual:R5,areObjectsEqual:n?ei:B5,arePrimitiveWrappersEqual:F5,areRegExpsEqual:W5,areSetsEqual:n?Qm(ay,ei):ay,areTypedArraysEqual:n?ei:U5,areUrlsEqual:z5};if(r&&(a=sy({},a,r(a))),t){var i=qo(a.areArraysEqual),o=qo(a.areMapsEqual),s=qo(a.areObjectsEqual),l=qo(a.areSetsEqual);a=sy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function i6(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function o6(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,c){var u=n(),f=u.cache,d=f===void 0?t?new WeakMap:void 0:f,h=u.meta;return r(l,c,{cache:d,equals:a,meta:h,strict:i})};if(t)return function(l,c){return r(l,c,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,c){return r(l,c,o)}}var s6=Or();Or({strict:!0}),Or({circular:!0}),Or({circular:!0,strict:!0}),Or({createInternalComparator:function(){return qr}}),Or({strict:!0,createInternalComparator:function(){return qr}}),Or({circular:!0,createInternalComparator:function(){return qr}}),Or({circular:!0,createInternalComparator:function(){return qr},strict:!0});function Or(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=a6(e),l=n6(s),c=n?n(l):i6(l);return o6({circular:r,comparator:l,createState:a,equals:c,strict:o})}function l6(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):l6(a)};requestAnimationFrame(n)}function fu(e){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}function c6(e){return p6(e)||d6(e)||f6(e)||u6()}function u6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
233
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f6(e,t){if(e){if(typeof e=="string")return cy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cy(e,t)}}function cy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p6(e){if(Array.isArray(e))return e}function h6(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=c6(o),l=s[0],c=s.slice(1);if(typeof l=="number"){ly(a.bind(null,c),l);return}a(l),ly(a.bind(null,c));return}fu(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function ti(e){"@babel/helpers - typeof";return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(e)}function uy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uy(Object(r),!0).forEach(function(n){dy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dy(e,t,r){return t=v6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v6(e){var t=m6(e,"string");return ti(t)==="symbol"?t:String(t)}function m6(e,t){if(ti(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ti(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y6=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},g6=function(t){return t},b6=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ri=function(t,r){return Object.keys(r).reduce(function(n,a){return fy(fy({},n),{},dy({},a,t(a,r[a])))},{})},py=function(t,r,n){return t.map(function(a){return"".concat(b6(a)," ").concat(r,"ms ").concat(n)}).join(",")},x6=process.env.NODE_ENV!=="production",Ko=function(t,r,n,a,i,o,s,l){if(x6&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,a,i,o,s,l],u=0;console.warn(r.replace(/%s/g,function(){return c[u++]}))}};function w6(e,t){return T6(e)||S6(e,t)||hy(e,t)||O6()}function O6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
234
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function T6(e){if(Array.isArray(e))return e}function A6(e){return _6(e)||j6(e)||hy(e)||P6()}function P6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
235
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hy(e,t){if(e){if(typeof e=="string")return du(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return du(e,t)}}function j6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _6(e){if(Array.isArray(e))return du(e)}function du(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ho=1e-4,vy=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},my=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},yy=function(t,r){return function(n){var a=vy(t,r);return my(a,n)}},E6=function(t,r){return function(n){var a=vy(t,r),i=[].concat(A6(a.map(function(o,s){return o*s}).slice(1)),[0]);return my(i,n)}},gy=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),u=w6(c,4);a=u[0],i=u[1],o=u[2],s=u[3]}else Ko(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}Ko([a,o,i,s].every(function(v){return typeof v=="number"&&v>=0&&v<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=yy(a,o),d=yy(i,s),h=E6(a,o),m=function(x){return x>1?1:x<0?0:x},g=function(x){for(var b=x>1?1:x,w=b,A=0;A<8;++A){var y=f(w)-b,O=h(w);if(Math.abs(y-b)<Ho||O<Ho)return d(w);w=m(w-y/O)}return d(w)};return g.isStepper=!1,g},C6=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(u,f,d){var h=-(u-f)*n,m=d*i,g=d+(h-m)*s/1e3,v=d*s/1e3+u;return Math.abs(v-f)<Ho&&Math.abs(g)<Ho?[f,0]:[v,g]};return l.isStepper=!0,l.dt=s,l},$6=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return gy(a);case"spring":return C6();default:if(a.split("(")[0]==="cubic-bezier")return gy(a);Ko(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(Ko(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function ni(e){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(e)}function by(e){return N6(e)||M6(e)||wy(e)||k6()}function k6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
236
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function N6(e){if(Array.isArray(e))return hu(e)}function xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xy(Object(r),!0).forEach(function(n){pu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pu(e,t,r){return t=D6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D6(e){var t=I6(e,"string");return ni(t)==="symbol"?t:String(t)}function I6(e,t){if(ni(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L6(e,t){return F6(e)||B6(e,t)||wy(e,t)||R6()}function R6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
237
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wy(e,t){if(e){if(typeof e=="string")return hu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hu(e,t)}}function hu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function B6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function F6(e){if(Array.isArray(e))return e}var Yo=function(t,r,n){return t+(r-t)*n},vu=function(t){var r=t.from,n=t.to;return r!==n},W6=function e(t,r,n){var a=ri(function(i,o){if(vu(o)){var s=t(o.from,o.to,o.velocity),l=L6(s,2),c=l[0],u=l[1];return at(at({},o),{},{from:c,velocity:u})}return o},r);return n<1?ri(function(i,o){return vu(o)?at(at({},o),{},{velocity:Yo(o.velocity,a[i].velocity,n),from:Yo(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const U6=function(e,t,r,n,a){var i=y6(e,t),o=i.reduce(function(v,x){return at(at({},v),{},pu({},x,[e[x],t[x]]))},{}),s=i.reduce(function(v,x){return at(at({},v),{},pu({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,c,u,f=function(){return null},d=function(){return ri(function(x,b){return b.from},s)},h=function(){return!Object.values(s).filter(vu).length},m=function(x){c||(c=x);var b=x-c,w=b/r.dt;s=W6(r,s,w),a(at(at(at({},e),t),d())),c=x,h()||(l=requestAnimationFrame(f))},g=function(x){u||(u=x);var b=(x-u)/n,w=ri(function(y,O){return Yo.apply(void 0,by(O).concat([r(b)]))},o);if(a(at(at(at({},e),t),w)),b<1)l=requestAnimationFrame(f);else{var A=ri(function(y,O){return Yo.apply(void 0,by(O).concat([r(1)]))},o);a(at(at(at({},e),t),A))}};return f=r.isStepper?m:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Nn(e){"@babel/helpers - typeof";return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nn(e)}var z6=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function V6(e,t){if(e==null)return{};var r=G6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function G6(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function mu(e){return Y6(e)||H6(e)||K6(e)||q6()}function q6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
238
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K6(e,t){if(e){if(typeof e=="string")return yu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yu(e,t)}}function H6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y6(e){if(Array.isArray(e))return yu(e)}function yu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(r),!0).forEach(function(n){ai(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ai(e,t,r){return t=Sy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sy(n.key),n)}}function Z6(e,t,r){return t&&J6(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sy(e){var t=Q6(e,"string");return Nn(t)==="symbol"?t:String(t)}function Q6(e,t){if(Nn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)}function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gu(e,t)}function t4(e){var t=r4();return function(){var n=Xo(e),a;if(t){var i=Xo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return bu(this,a)}}function bu(e,t){if(t&&(Nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xu(e)}function xu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xo(e){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xo(e)}var Dt=function(e){e4(r,e);var t=t4(r);function r(n,a){var i;X6(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,c=o.from,u=o.to,f=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(xu(i)),i.changeStyle=i.changeStyle.bind(xu(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:u}),bu(i);if(f&&f.length)i.state={style:f[0].style};else if(c){if(typeof d=="function")return i.state={style:c},bu(i);i.state={style:l?ai({},l,c):c}}else i.state={style:{}};return i}return Z6(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,f=i.from,d=this.state.style;if(s){if(!o){var h={style:l?ai({},l,u):u};this.state&&d&&(l&&d[l]!==u||!l&&d!==u)&&this.setState(h);return}if(!(s6(a.to,u)&&a.canBegin&&a.isActive)){var m=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||c?f:a.to;if(this.state&&d){var v={style:l?ai({},l,g):g};(l&&d[l]!==g||!l&&d!==g)&&this.setState(v)}this.runAnimation(Nt(Nt({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,c=a.easing,u=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=U6(o,s,$6(c),l,this.changeStyle),m=function(){i.stopJSAnimation=h()};this.manager.start([d,u,m,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,c=o[0],u=c.style,f=c.duration,d=f===void 0?0:f,h=function(g,v,x){if(x===0)return g;var b=v.duration,w=v.easing,A=w===void 0?"ease":w,y=v.style,O=v.properties,S=v.onAnimationEnd,P=x>0?o[x-1]:v,$=O||Object.keys(y);if(typeof A=="function"||A==="spring")return[].concat(mu(g),[i.runJSAnimation.bind(i,{from:P.style,to:y,duration:b,easing:A}),b]);var N=py($,b,A),j=Nt(Nt(Nt({},P.style),y),{},{transition:N});return[].concat(mu(g),[j,b,S]).filter(g6)};return this.manager.start([l].concat(mu(o.reduce(h,[u,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=h6());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,c=a.easing,u=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var g=s?ai({},s,l):l,v=py(Object.keys(g),o,c);m.start([u,i,Nt(Nt({},g),{},{transition:v}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=V6(a,z6),c=T.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||o<=0)return i;var f=function(h){var m=h.props,g=m.style,v=g===void 0?{}:g,x=m.className,b=T.cloneElement(h,Nt(Nt({},l),{},{style:Nt(Nt({},v),u),className:x}));return b};return c===1?f(T.Children.only(i)):T.createElement("div",null,T.Children.map(i,function(d){return f(d)}))}}]),r}(T.PureComponent);Dt.displayName="Animate",Dt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Dt.propTypes={from:Ae.oneOfType([Ae.object,Ae.string]),to:Ae.oneOfType([Ae.object,Ae.string]),attributeName:Ae.string,duration:Ae.number,begin:Ae.number,easing:Ae.oneOfType([Ae.string,Ae.func]),steps:Ae.arrayOf(Ae.shape({duration:Ae.number.isRequired,style:Ae.object.isRequired,easing:Ae.oneOfType([Ae.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ae.func]),properties:Ae.arrayOf("string"),onAnimationEnd:Ae.func})),children:Ae.oneOfType([Ae.node,Ae.func]),isActive:Ae.bool,canBegin:Ae.bool,onAnimationEnd:Ae.func,shouldReAnimate:Ae.bool,onAnimationStart:Ae.func,onAnimationReStart:Ae.func};function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jo.apply(this,arguments)}function n4(e,t){return s4(e)||o4(e,t)||i4(e,t)||a4()}function a4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
239
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i4(e,t){if(e){if(typeof e=="string")return Ty(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ty(e,t)}}function Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function s4(e){if(Array.isArray(e))return e}function Ay(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Py(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ay(Object(r),!0).forEach(function(n){l4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ay(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l4(e,t,r){return t=c4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c4(e){var t=u4(e,"string");return ii(t)=="symbol"?t:t+""}function u4(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jy=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,c=a>=0&&n>=0||a<0&&n<0?1:0,u;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=i[d]>o?o:i[d];u="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(r)),u+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`,
240
+ `).concat(t+n,",").concat(r+s*f[1])),u+="L ".concat(t+n,",").concat(r+a-s*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`,
241
+ `).concat(t+n-l*f[2],",").concat(r+a)),u+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`,
242
+ `).concat(t,",").concat(r+a-s*f[3])),u+="Z"}else if(o>0&&i===+i&&i>0){var m=Math.min(o,i);u="M ".concat(t,",").concat(r+s*m,`
243
+ A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+l*m,",").concat(r,`
244
244
  L `).concat(t+n-l*m,",").concat(r,`
245
- A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*m,`
245
+ A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*m,`
246
246
  L `).concat(t+n,",").concat(r+a-s*m,`
247
- A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-l*m,",").concat(r+a,`
247
+ A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+n-l*m,",").concat(r+a,`
248
248
  L `).concat(t+l*m,",").concat(r+a,`
249
- A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*m," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return c},c4=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&a>=f&&a<=d}return!1},f4={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},wc=function(t){var r=Py(Py({},f4),t),n=T.useRef(),a=T.useState(-1),i=r4(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&s(A)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,m=r.animationEasing,y=r.animationDuration,v=r.animationBegin,b=r.isAnimationActive,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var w=me("recharts-rectangle",h);return x?T.createElement(Dt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:y,animationEasing:m,isActive:x},function(A){var g=A.width,O=A.height,S=A.x,j=A.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:b,easing:m},T.createElement("path",Jo({},de(r,!0),{className:w,d:jy(S,j,g,O,d),ref:n})))}):T.createElement("path",Jo({},de(r,!0),{className:w,d:jy(l,u,c,f,d)}))};function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oc.apply(this,arguments)}var Zo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=me("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",Oc({},de(t,!1),Bi(t),{className:o,cx:r,cy:n,r:a})):null};function oi(e){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(e)}var d4=["x","y","top","left","width","height","className"];function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sc.apply(this,arguments)}function _y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function p4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(r),!0).forEach(function(n){h4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h4(e,t,r){return t=v4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v4(e){var t=m4(e,"string");return oi(t)=="symbol"?t:t+""}function m4(e,t){if(oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y4(e,t){if(e==null)return{};var r=g4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var b4=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},x4=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,h=d===void 0?0:d,m=t.className,y=y4(t,d4),v=p4({x:n,y:i,top:s,left:u,width:f,height:h},y);return!J(n)||!J(i)||!J(f)||!J(h)||!J(s)||!J(u)?null:T.createElement("path",Sc({},de(v,!0),{className:me("recharts-cross",m),d:b4(n,i,f,h,s,u)}))},w4=cp,O4=w4(Object.getPrototypeOf,Object),S4=O4,T4=Jt,A4=S4,P4=Zt,j4="[object Object]",_4=Function.prototype,E4=Object.prototype,Ey=_4.toString,C4=E4.hasOwnProperty,$4=Ey.call(Object);function k4(e){if(!P4(e)||T4(e)!=j4)return!1;var t=A4(e);if(t===null)return!0;var r=C4.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ey.call(r)==$4}var M4=k4;const N4=$e(M4);var D4=Jt,I4=Zt,L4="[object Boolean]";function R4(e){return e===!0||e===!1||I4(e)&&D4(e)==L4}var B4=R4;const F4=$e(B4);function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qo.apply(this,arguments)}function W4(e,t){return G4(e)||V4(e,t)||z4(e,t)||U4()}function U4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
250
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z4(e,t){if(e){if(typeof e=="string")return Cy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cy(e,t)}}function Cy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function V4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function G4(e){if(Array.isArray(e))return e}function $y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ky(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$y(Object(r),!0).forEach(function(n){q4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q4(e,t,r){return t=H4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H4(e){var t=K4(e,"string");return si(t)=="symbol"?t:t+""}function K4(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var My=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},Y4={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},X4=function(t){var r=ky(ky({},Y4),t),n=T.useRef(),a=T.useState(-1),i=W4(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,m=r.animationEasing,y=r.animationDuration,v=r.animationBegin,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var x=me("recharts-trapezoid",h);return b?T.createElement(Dt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:y,animationEasing:m,isActive:b},function(w){var A=w.upperWidth,g=w.lowerWidth,O=w.height,S=w.x,j=w.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:m},T.createElement("path",Qo({},de(r,!0),{className:x,d:My(S,j,A,g,O),ref:n})))}):T.createElement("g",null,T.createElement("path",Qo({},de(r,!0),{className:x,d:My(l,u,c,f,d)})))},J4=["option","shapeType","propTransformer","activeClassName","isActive"];function li(e){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(e)}function Z4(e,t){if(e==null)return{};var r=Q4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Q4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ny(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ny(Object(r),!0).forEach(function(n){e8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ny(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e8(e,t,r){return t=t8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t8(e){var t=r8(e,"string");return li(t)=="symbol"?t:t+""}function r8(e,t){if(li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function n8(e,t){return es(es({},t),e)}function a8(e,t){return e==="symbols"}function Dy(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return T.createElement(wc,r);case"trapezoid":return T.createElement(X4,r);case"sector":return T.createElement(Rm,r);case"symbols":if(a8(t))return T.createElement(Xi,r);break;default:return null}}function i8(e){return T.isValidElement(e)?e.props:e}function Tc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?n8:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=Z4(e,J4),u;if(T.isValidElement(t))u=T.cloneElement(t,es(es({},l),i8(t)));else if(pe(t))u=t(l);else if(N4(t)&&!F4(t)){var c=a(t,l);u=T.createElement(Dy,{shapeType:r,elementProps:c})}else{var f=l;u=T.createElement(Dy,{shapeType:r,elementProps:f})}return s?T.createElement(xe,{className:o},u):u}function ts(e,t){return t!=null&&"trapezoids"in e.props}function rs(e,t){return t!=null&&"sectors"in e.props}function ui(e,t){return t!=null&&"points"in e.props}function o8(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function s8(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function l8(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function u8(e,t){var r;return ts(e,t)?r=o8:rs(e,t)?r=s8:ui(e,t)&&(r=l8),r}function c8(e,t){var r;return ts(e,t)?r="trapezoids":rs(e,t)?r="sectors":ui(e,t)&&(r="points"),r}function f8(e,t){if(ts(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(rs(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return ui(e,t)?t.payload:{}}function d8(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=c8(r,t),i=f8(r,t),o=n.filter(function(l,u){var c=Fr(i,l),f=r.props[a].filter(function(m){var y=u8(r,t);return y(m,t)}),d=r.props[a].indexOf(f[f.length-1]),h=u===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var p8=Math.ceil,h8=Math.max;function v8(e,t,r,n){for(var a=-1,i=h8(p8((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var m8=v8,y8=lh,Iy=1/0,g8=17976931348623157e292;function b8(e){if(!e)return e===0?e:0;if(e=y8(e),e===Iy||e===-Iy){var t=e<0?-1:1;return t*g8}return e===e?e:0}var Ly=b8,x8=m8,w8=io,Ac=Ly;function O8(e){return function(t,r,n){return n&&typeof n!="number"&&w8(t,r,n)&&(r=n=void 0),t=Ac(t),r===void 0?(r=t,t=0):r=Ac(r),n=n===void 0?t<r?1:-1:Ac(n),x8(t,r,n,e)}}var S8=O8,T8=S8,A8=T8(),P8=A8;const ns=$e(P8);function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function Ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function By(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ry(Object(r),!0).forEach(function(n){Fy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fy(e,t,r){return t=j8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j8(e){var t=_8(e,"string");return ci(t)=="symbol"?t:t+""}function _8(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E8=["Webkit","Moz","O","ms"],C8=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=E8.reduce(function(i,o){return By(By({},i),{},Fy({},o+n,r))},{});return a[t]=r,a};function Dn(e){"@babel/helpers - typeof";return Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}function as(){return as=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},as.apply(this,arguments)}function Wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wy(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vy(n.key),n)}}function k8(e,t,r){return t&&Uy(e.prototype,t),r&&Uy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function M8(e,t,r){return t=is(t),N8(e,zy()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function N8(e,t){if(t&&(Dn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D8(e)}function D8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zy=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function I8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jc(e,t)}function jc(e,t){return jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},jc(e,t)}function gt(e,t,r){return t=Vy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vy(e){var t=L8(e,"string");return Dn(t)=="symbol"?t:t+""}function L8(e,t){if(Dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R8=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Ca().domain(ns(0,l)).range([i,i+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:c}},Gy=function(t){return t.changedTouches&&!!t.changedTouches.length},In=function(e){function t(r){var n;return $8(this,t),n=M8(this,t,[r]),gt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),gt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),gt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),gt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),gt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),gt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),gt(n,"handleSlideDragStart",function(a){var i=Gy(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return I8(t,e),k8(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(o,f),m=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:m===c?c:m-m%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Ze(i[n],s,n);return pe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,m=l.onChange,y=n.pageX-i;y>0?y=Math.min(y,u+c-f-s,u+c-f-o):y<0&&(y=Math.max(y,u-o,u-s));var v=this.getIndex({startX:o+y,endX:s+y});(v.startIndex!==d||v.endIndex!==h)&&m&&m(v),this.setState({startX:o+y,endX:s+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Gy(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,m=c.onChange,y=c.gap,v=c.data,b={startX:this.state.startX,endX:this.state.endX},x=n.pageX-i;x>0?x=Math.min(x,f+d-h-u):x<0&&(x=Math.max(x,f-u)),b[o]=u+x;var w=this.getIndex(b),A=w.startIndex,g=w.endIndex,O=function(){var j=v.length-1;return o==="startX"&&(s>l?A%y===0:g%y===0)||s<l&&g===j||o==="endX"&&(s>l?g%y===0:A%y===0)||s>l&&g===j};this.setState(gt(gt({},o,u+x),"brushMoveStartX",n.pageX),function(){m&&O()&&m(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[a],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=u||a==="endX"&&h<=l||this.setState(gt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return T.createElement("rect",{stroke:u,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=T.Children.only(u);return f?T.cloneElement(f,{x:a,y:i,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,m=l.data,y=l.startIndex,v=l.endIndex,b=Math.max(n,this.props.x),x=Pc(Pc({},de(this.props,!1)),{},{x:b,y:u,width:c,height:f}),w=h||"Min value: ".concat((i=m[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=m[v])===null||o===void 0?void 0:o.name);return T.createElement(xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(g){["ArrowLeft","ArrowRight"].includes(g.key)&&(g.preventDefault(),g.stopPropagation(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,x))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,m={pointerEvents:"none",fill:u};return T.createElement(xe,{className:"recharts-brush-texts"},T.createElement(po,as({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},m),this.getTextOfTick(a)),T.createElement(po,as({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,m=d.endX,y=d.isTextActive,v=d.isSlideMoving,b=d.isTravellerMoving,x=d.isTravellerFocused;if(!a||!a.length||!J(s)||!J(l)||!J(u)||!J(c)||u<=0||c<=0)return null;var w=me("recharts-brush",i),A=T.Children.count(o)===1,g=C8("userSelect","none");return T.createElement(xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(y||v||b||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(i+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return T.isValidElement(n)?i=T.cloneElement(n,a):pe(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return Pc({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?R8({data:i,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(T.PureComponent);gt(In,"displayName","Brush"),gt(In,"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 B8=zl;function F8(e,t){var r;return B8(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var W8=F8,U8=Yd,z8=vr,V8=W8,G8=ft,q8=io;function H8(e,t,r){var n=G8(e)?U8:V8;return r&&q8(e,t,r)&&(t=void 0),n(e,z8(t))}var K8=H8;const Y8=$e(K8);var qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},qy=Gp;function X8(e,t,r){t=="__proto__"&&qy?qy(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var J8=X8,Z8=J8,Q8=Wp,eL=vr;function tL(e,t){var r={};return t=eL(t),Q8(e,function(n,a,i){Z8(r,a,t(n,a,i))}),r}var rL=tL;const nL=$e(rL);function aL(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var iL=aL,oL=zl;function sL(e,t){var r=!0;return oL(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var lL=sL,uL=iL,cL=lL,fL=vr,dL=ft,pL=io;function hL(e,t,r){var n=dL(e)?uL:cL;return r&&pL(e,t,r)&&(t=void 0),n(e,fL(t))}var vL=hL;const Hy=$e(vL);var mL=["x","y"];function Ln(e){"@babel/helpers - typeof";return Ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ln(e)}function _c(){return _c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_c.apply(this,arguments)}function Ky(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ky(Object(r),!0).forEach(function(n){yL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ky(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yL(e,t,r){return t=gL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gL(e){var t=bL(e,"string");return Ln(t)=="symbol"?t:t+""}function bL(e,t){if(Ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xL(e,t){if(e==null)return{};var r=wL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function OL(e,t){var r=e.x,n=e.y,a=xL(e,mL),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||a.height),c=parseInt(u,10),f="".concat(t.width||a.width),d=parseInt(f,10);return fi(fi(fi(fi(fi({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Yy(e){return T.createElement(Tc,_c({shapeType:"rectangle",propTransformer:OL,activeClassName:"recharts-active-bar"},e))}var SL=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=J(n)||DO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(Ln(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},TL=["value","background"],Xy;function Rn(e){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(e)}function AL(e,t){if(e==null)return{};var r=PL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function os(){return os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},os.apply(this,arguments)}function Jy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jy(Object(r),!0).forEach(function(n){Sr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eg(n.key),n)}}function _L(e,t,r){return t&&Zy(e.prototype,t),r&&Zy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function EL(e,t,r){return t=ss(t),CL(e,Qy()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function CL(e,t){if(t&&(Rn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $L(e)}function $L(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qy=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function kL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ec(e,t)}function Ec(e,t){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ec(e,t)}function Sr(e,t,r){return t=eg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eg(e){var t=ML(e,"string");return Rn(t)=="symbol"?t:t+""}function ML(e,t){if(Rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bn=function(e){function t(){var r;jL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=EL(this,t,[].concat(a)),Sr(r,"state",{isAnimationFinished:!1}),Sr(r,"id",$r("recharts-bar-")),Sr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Sr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return kL(t,e),_L(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,u=i.activeBar,c=de(this.props,!1);return n&&n.map(function(f,d){var h=d===l,m=h?u:o,y=Ke(Ke(Ke({},c),f),{},{isActive:h,option:m,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(xe,os({className:"recharts-bar-rectangle"},ma(a.props,f,d),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(d)}),T.createElement(Yy,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,u=a.animationDuration,c=a.animationEasing,f=a.animationId,d=this.state.prevData;return T.createElement(Dt,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,y=i.map(function(v,b){var x=d&&d[b];if(x){var w=ze(x.x,v.x),A=ze(x.y,v.y),g=ze(x.width,v.width),O=ze(x.height,v.height);return Ke(Ke({},v),{},{x:w(m),y:A(m),width:g(m),height:O(m)})}if(o==="horizontal"){var S=ze(0,v.height),j=S(m);return Ke(Ke({},v),{},{y:v.y+v.height-j,height:j})}var E=ze(0,v.width),M=E(m);return Ke(Ke({},v),{},{width:M})});return T.createElement(xe,null,n.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Fr(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=de(this.props.background,!1);return i.map(function(u,c){u.value;var f=u.background,d=AL(u,TL);if(!f)return null;var h=Ke(Ke(Ke(Ke(Ke({},d),{},{fill:"#eee"},f),l),ma(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return T.createElement(Yy,os({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=dt(c,$n);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,h=function(v,b){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:Ze(v,b)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,m,f.map(function(y){return T.cloneElement(y,{key:"error-bar-".concat(a,"-").concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,m=n.background,y=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=me("recharts-bar",o),x=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,A=x||w,g=fe(y)?this.id:y;return T.createElement(xe,{className:b},x||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(g)},T.createElement("rect",{x:x?u:u-f/2,y:w?c:c-d/2,width:x?f:f*2,height:w?d:d*2}))):null,T.createElement(xe,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(g,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,g),(!h||v)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(T.PureComponent);Xy=Bn,Sr(Bn,"displayName","Bar"),Sr(Bn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!mr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Sr(Bn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=iI(n,r);if(!h)return null;var m=t.layout,y=r.type.defaultProps,v=y!==void 0?Ke(Ke({},y),r.props):r.props,b=v.dataKey,x=v.children,w=v.minPointSize,A=m==="horizontal"?o:i,g=u?A.scale.domain():null,O=pI({numericAxis:A}),S=dt(x,Ql),j=f.map(function(E,M){var _,P,I,C,D,k;u?_=oI(u[c+M],g):(_=Ze(E,b),Array.isArray(_)||(_=[O,_]));var B=SL(w,Xy.defaultProps.minPointSize)(_[1],M);if(m==="horizontal"){var U,V=[o.scale(_[0]),o.scale(_[1])],$=V[0],R=V[1];P=wm({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:E,index:M}),I=(U=R??$)!==null&&U!==void 0?U:void 0,C=h.size;var F=$-R;if(D=Number.isNaN(F)?0:F,k={x:P,y:o.y,width:C,height:o.height},Math.abs(B)>0&&Math.abs(D)<Math.abs(B)){var W=$t(D||B)*(Math.abs(B)-Math.abs(D));I-=W,D+=W}}else{var G=[i.scale(_[0]),i.scale(_[1])],X=G[0],Q=G[1];if(P=X,I=wm({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:E,index:M}),C=Q-X,D=h.size,k={x:i.x,y:I,width:i.width,height:D},Math.abs(B)>0&&Math.abs(C)<Math.abs(B)){var ae=$t(C||B)*(Math.abs(B)-Math.abs(C));C+=ae}}return Ke(Ke(Ke({},E),{},{x:P,y:I,width:C,height:D,value:u?_:_[1],payload:E,background:k},S&&S[M]&&S[M].props),{},{tooltipPayload:[Pm(r,E)],tooltipPosition:{x:P+C/2,y:I+D/2}})});return Ke({data:j,layout:m},d)});function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}function NL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ng(n.key),n)}}function DL(e,t,r){return t&&tg(e.prototype,t),r&&tg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ls(e,t,r){return t=ng(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ng(e){var t=IL(e,"string");return di(t)=="symbol"?t:t+""}function IL(e,t){if(di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LL=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!mt(u,Bn);return c.reduce(function(h,m){var y=r[m],v=y.orientation,b=y.domain,x=y.padding,w=x===void 0?{}:x,A=y.mirror,g=y.reversed,O="".concat(v).concat(A?"Mirror":""),S,j,E,M,_;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var P=b[1]-b[0],I=1/0,C=y.categoricalDomain.sort(BO);if(C.forEach(function(G,X){X>0&&(I=Math.min((G||0)-(C[X-1]||0),I))}),Number.isFinite(I)){var D=I/P,k=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(S=D*k/2),y.padding==="no-gap"){var B=kr(t.barCategoryGap,D*k),U=D*k/2;S=U-B-(U-B)/k*B}}}a==="xAxis"?j=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:a==="yAxis"?j=l==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(S||0),n.top+n.height-(w.bottom||0)-(S||0)]:j=y.range,g&&(j=[j[1],j[0]]);var V=nI(y,i,d),$=V.scale,R=V.realScaleType;$.domain(b).range(j),aI($);var F=dI($,It(It({},y),{},{realScaleType:R}));a==="xAxis"?(_=v==="top"&&!A||v==="bottom"&&A,E=n.left,M=f[O]-_*y.height):a==="yAxis"&&(_=v==="left"&&!A||v==="right"&&A,E=f[O]-_*y.width,M=n.top);var W=It(It(It({},y),F),{},{realScaleType:R,x:E,y:M,scale:$,width:a==="xAxis"?n.width:y.width,height:a==="yAxis"?n.height:y.height});return W.bandSize=Fo(W,F),!y.hide&&a==="xAxis"?f[O]+=(_?-1:1)*W.height:y.hide||(f[O]+=(_?-1:1)*W.width),It(It({},h),{},ls({},m,W))},{})},ag=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},RL=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return ag({x:r,y:n},{x:a,y:i})},ig=function(){function e(t){NL(this,e),this.scale=t}return DL(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();ls(ig,"EPS",1e-4);var Cc=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},ls({},a,ig.create(t[a])))},{});return It(It({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return nL(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Hy(a,function(i,o){return r[o].isInRange(i)})}})};function BL(e){return(e%180+180)%180}var FL=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=BL(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},WL=vr,UL=ba,zL=to;function VL(e){return function(t,r,n){var a=Object(t);if(!UL(t)){var i=WL(r);t=zL(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var GL=VL,qL=Ly;function HL(e){var t=qL(e),r=t%1;return t===t?r?t-r:t:0}var KL=HL,YL=Ep,XL=vr,JL=KL,ZL=Math.max;function QL(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:JL(r);return a<0&&(a=ZL(n+a,0)),YL(e,XL(t),a)}var eR=QL,tR=GL,rR=eR,nR=tR(rR),aR=nR;const iR=$e(aR);var oR=Ww(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function us(e){"@babel/helpers - typeof";return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(e)}var $c=T.createContext(void 0),kc=T.createContext(void 0),og=T.createContext(void 0),sg=T.createContext({}),lg=T.createContext(void 0),ug=T.createContext(0),cg=T.createContext(0),fg=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=oR(i);return T.createElement($c.Provider,{value:n},T.createElement(kc.Provider,{value:a},T.createElement(sg.Provider,{value:i},T.createElement(og.Provider,{value:c},T.createElement(lg.Provider,{value:o},T.createElement(ug.Provider,{value:u},T.createElement(cg.Provider,{value:l},s)))))))},sR=function(){return T.useContext(lg)};function dg(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var pg=function(t){var r=T.useContext($c);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(us(t),"]. ").concat(dg(r))):ht()),n},lR=function(){var t=T.useContext($c);return hr(t)},uR=function(){var t=T.useContext(kc),r=iR(t,function(n){return Hy(n.domain,Number.isFinite)});return r||hr(t)},hg=function(t){var r=T.useContext(kc);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(us(t),"]. ").concat(dg(r))):ht()),n},cR=function(){var t=T.useContext(og);return t},fR=function(){return T.useContext(sg)},Mc=function(){return T.useContext(cg)},Nc=function(){return T.useContext(ug)};function Fn(e){"@babel/helpers - typeof";return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function dR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gg(n.key),n)}}function hR(e,t,r){return t&&pR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vR(e,t,r){return t=cs(t),mR(e,vg()?Reflect.construct(t,r||[],cs(e).constructor):t.apply(e,r))}function mR(e,t){if(t&&(Fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yR(e)}function yR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vg=function(){return!!e})()}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cs(e)}function gR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dc(e,t)}function mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mg(Object(r),!0).forEach(function(n){Ic(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ic(e,t,r){return t=gg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gg(e){var t=bR(e,"string");return Fn(t)=="symbol"?t:t+""}function bR(e,t){if(Fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xR(e,t){return TR(e)||SR(e,t)||OR(e,t)||wR()}function wR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
251
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OR(e,t){if(e){if(typeof e=="string")return bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bg(e,t)}}function bg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function TR(e){if(Array.isArray(e))return e}function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lc.apply(this,arguments)}var AR=function(t,r){var n;return T.isValidElement(t)?n=T.cloneElement(t,r):pe(t)?n=t(r):n=T.createElement("line",Lc({},r,{className:"recharts-reference-line-line"})),n},PR=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,h=i.height;if(n){var m=u.y,y=t.y.apply(m,{position:o});if(qt(u,"discard")&&!t.y.isInRange(y))return null;var v=[{x:c+d,y},{x:c,y}];return l==="left"?v.reverse():v}if(r){var b=u.x,x=t.x.apply(b,{position:o});if(qt(u,"discard")&&!t.x.isInRange(x))return null;var w=[{x,y:f+h},{x,y:f}];return s==="top"?w.reverse():w}if(a){var A=u.segment,g=A.map(function(O){return t.apply(O,{position:o})});return qt(u,"discard")&&Y8(g,function(O){return!t.isInRange(O)})?null:g}return null};function jR(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=sR(),c=pg(a),f=hg(i),d=cR();if(!u||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Cc({x:c.scale,y:f.scale}),m=Xe(t),y=Xe(r),v=n&&n.length===2,b=PR(h,m,y,v,d,e.position,c.orientation,f.orientation,e);if(!b)return null;var x=xR(b,2),w=x[0],A=w.x,g=w.y,O=x[1],S=O.x,j=O.y,E=qt(e,"hidden")?"url(#".concat(u,")"):void 0,M=yg(yg({clipPath:E},de(e,!0)),{},{x1:A,y1:g,x2:S,y2:j});return T.createElement(xe,{className:me("recharts-reference-line",s)},AR(o,M),it.renderCallByParent(e,RL({x1:A,y1:g,x2:S,y2:j})))}var Rc=function(e){function t(){return dR(this,t),vR(this,t,arguments)}return gR(t,e),hR(t,[{key:"render",value:function(){return T.createElement(jR,this.props)}}])}(T.Component);Ic(Rc,"displayName","ReferenceLine"),Ic(Rc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bc.apply(this,arguments)}function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sg(n.key),n)}}function CR(e,t,r){return t&&ER(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $R(e,t,r){return t=fs(t),kR(e,Og()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function kR(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MR(e)}function MR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Og(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Og=function(){return!!e})()}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}function NR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)}function Fc(e,t){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fc(e,t)}function ds(e,t,r){return t=Sg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sg(e){var t=DR(e,"string");return Wn(t)=="symbol"?t:t+""}function DR(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var IR=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Cc({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return qt(t,"discard")&&!o.isInRange(s)?null:s},ps=function(e){function t(){return _R(this,t),$R(this,t,arguments)}return NR(t,e),CR(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Xe(a),c=Xe(i);if(er(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=IR(this.props);if(!f)return null;var d=f.x,h=f.y,m=this.props,y=m.shape,v=m.className,b=qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,x=wg(wg({clipPath:b},de(this.props,!0)),{},{cx:d,cy:h});return T.createElement(xe,{className:me("recharts-reference-dot",v)},t.renderDot(y,x),it.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(T.Component);ds(ps,"displayName","ReferenceDot"),ds(ps,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ds(ps,"renderDot",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):pe(e)?r=e(t):r=T.createElement(Zo,Bc({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wc.apply(this,arguments)}function Un(e){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Un(e)}function Tg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(r),!0).forEach(function(n){vs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jg(n.key),n)}}function BR(e,t,r){return t&&RR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FR(e,t,r){return t=hs(t),WR(e,Pg()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function WR(e,t){if(t&&(Un(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UR(e)}function UR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pg=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function zR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uc(e,t)}function Uc(e,t){return Uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Uc(e,t)}function vs(e,t,r){return t=jg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jg(e){var t=VR(e,"string");return Un(t)=="symbol"?t:t+""}function VR(e,t){if(Un(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GR=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,u=i.y2,c=i.xAxis,f=i.yAxis;if(!c||!f)return null;var d=Cc({x:c.scale,y:f.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},m={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return qt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(m))?null:ag(h,m)},ms=function(e){function t(){return LR(this,t),FR(this,t,arguments)}return zR(t,e),BR(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;er(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Xe(a),d=Xe(i),h=Xe(o),m=Xe(s),y=this.props.shape;if(!f&&!d&&!h&&!m&&!y)return null;var v=GR(f,d,h,m,this.props);if(!v&&!y)return null;var b=qt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return T.createElement(xe,{className:me("recharts-reference-area",l)},t.renderRect(y,Ag(Ag({clipPath:b},de(this.props,!0)),v)),it.renderCallByParent(this.props,v))}}])}(T.Component);vs(ms,"displayName","ReferenceArea"),vs(ms,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),vs(ms,"renderRect",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):pe(e)?r=e(t):r=T.createElement(wc,Wc({},t,{className:"recharts-reference-area-rect"})),r});function _g(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function qR(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return FL(n,r)}function HR(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function ys(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function KR(e,t){return _g(e,t+1)}function YR(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var m=n==null?void 0:n[l];if(m===void 0)return{v:_g(n,u)};var y=l,v,b=function(){return v===void 0&&(v=r(m,y)),v},x=m.coordinate,w=l===0||ys(e,x,b,c,s);w||(l=0,c=o,u+=1),w&&(c=x+e*(b()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function Eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eg(Object(r),!0).forEach(function(n){XR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XR(e,t,r){return t=JR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JR(e){var t=ZR(e,"string");return pi(t)=="symbol"?t:t+""}function ZR(e,t){if(pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QR(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var h=i[d],m,y=function(){return m===void 0&&(m=r(h,d)),m};if(d===o-1){var v=e*(h.coordinate+e*y()/2-l);i[d]=h=ot(ot({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate})}else i[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var b=ys(e,h.tickCoord,y,s,l);b&&(l=h.tickCoord-e*(y()/2+a),i[d]=ot(ot({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function e7(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(i){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=ot(ot({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var h=ys(e,c.tickCoord,function(){return f},l,u);h&&(u=c.tickCoord-e*(f/2+a),o[s-1]=ot(ot({},c),{},{isShow:!0}))}for(var m=i?s-1:s,y=function(x){var w=o[x],A,g=function(){return A===void 0&&(A=r(w,x)),A};if(x===0){var O=e*(w.coordinate-e*g()/2-l);o[x]=w=ot(ot({},w),{},{tickCoord:O<0?w.coordinate-O*e:w.coordinate})}else o[x]=w=ot(ot({},w),{},{tickCoord:w.coordinate});var S=ys(e,w.tickCoord,g,l,u);S&&(l=w.tickCoord+e*(g()/2+a),o[x]=ot(ot({},w),{},{isShow:!0}))},v=0;v<m;v++)y(v);return o}function zc(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(J(l)||mr.isSsr)return KR(a,typeof l=="number"&&J(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",m=c&&h==="width"?Aa(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(w,A){var g=pe(u)?u(w.value,A):w.value;return h==="width"?qR(Aa(g,{fontSize:t,letterSpacing:r}),m,f):Aa(g,{fontSize:t,letterSpacing:r})[h]},v=a.length>=2?$t(a[1].coordinate-a[0].coordinate):1,b=HR(i,v,h);return l==="equidistantPreserveStart"?YR(v,b,y,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=e7(v,b,y,a,o,l==="preserveStartEnd"):d=QR(v,b,y,a,o),d.filter(function(x){return x.isShow}))}var t7=["viewBox"],r7=["viewBox"],n7=["ticks"];function zn(e){"@babel/helpers - typeof";return zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zn(e)}function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vn.apply(this,arguments)}function Cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(r),!0).forEach(function(n){qc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vc(e,t){if(e==null)return{};var r=a7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function i7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mg(n.key),n)}}function o7(e,t,r){return t&&$g(e.prototype,t),r&&$g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s7(e,t,r){return t=gs(t),l7(e,kg()?Reflect.construct(t,r||[],gs(e).constructor):t.apply(e,r))}function l7(e,t){if(t&&(zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u7(e)}function u7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kg=function(){return!!e})()}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(e)}function c7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gc(e,t)}function qc(e,t,r){return t=Mg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mg(e){var t=f7(e,"string");return zn(t)=="symbol"?t:t+""}function f7(e,t){if(zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gn=function(e){function t(r){var n;return i7(this,t),n=s7(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return c7(t,e),o7(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Vc(n,t7),s=this.props,l=s.viewBox,u=Vc(s,r7);return!cn(i,l)||!cn(o,u)||!cn(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,u=a.orientation,c=a.tickSize,f=a.mirror,d=a.tickMargin,h,m,y,v,b,x,w=f?-1:1,A=n.tickSize||c,g=J(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=m=n.coordinate,v=o+ +!f*l,y=v-w*A,x=y-w*d,b=g;break;case"left":y=v=n.coordinate,m=i+ +!f*s,h=m-w*A,b=h-w*d,x=g;break;case"right":y=v=n.coordinate,m=i+ +f*s,h=m+w*A,b=h+w*d,x=g;break;default:h=m=n.coordinate,v=o+ +f*l,y=v+w*A,x=y+w*d,b=g;break}return{line:{x1:h,y1:y,x2:m,y2:v},tick:{x:b,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=et(et(et({},de(this.props,!1)),de(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=et(et({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);f=et(et({},f),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return T.createElement("line",Vn({},f,{className:me("recharts-cartesian-axis-line",wt(c,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=zc(et(et({},this.props),{},{ticks:n}),a,i),m=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=de(this.props,!1),b=de(c,!1),x=et(et({},v),{},{fill:"none"},de(l,!1)),w=h.map(function(A,g){var O=o.getTickLineCoord(A),S=O.line,j=O.tick,E=et(et(et(et({textAnchor:m,verticalAnchor:y},v),{},{stroke:"none",fill:u},b),j),{},{index:g,payload:A,visibleTicksCount:h.length,tickFormatter:f});return T.createElement(xe,Vn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ma(o.props,A,g)),l&&T.createElement("line",Vn({},x,S,{className:me("recharts-cartesian-axis-tick-line",wt(l,"className"))})),c&&t.renderTickItem(c,E,"".concat(pe(f)?f(A.value,g):A.value).concat(d||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,u=a.className,c=a.hide;if(c)return null;var f=this.props,d=f.ticks,h=Vc(f,n7),m=d;return pe(l)&&(m=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!m||!m.length?null:T.createElement(xe,{className:me("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),it.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=me(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(n)?o=T.cloneElement(n,et(et({},a),{},{className:s})):pe(n)?o=n(et(et({},a),{},{className:s})):o=T.createElement(po,Vn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(T.Component);qc(Gn,"displayName","CartesianAxis"),qc(Gn,"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 d7=["x1","y1","x2","y2","key"],p7=["offset"];function Hr(e){"@babel/helpers - typeof";return Hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hr(e)}function Ng(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ng(Object(r),!0).forEach(function(n){h7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ng(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h7(e,t,r){return t=v7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v7(e){var t=m7(e,"string");return Hr(t)=="symbol"?t:t+""}function m7(e,t){if(Hr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kr.apply(this,arguments)}function Dg(e,t){if(e==null)return{};var r=y7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function y7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var g7=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return T.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ig(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Dg(t,d7),u=de(l,!1);u.offset;var c=Dg(u,p7);r=T.createElement("line",Kr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function b7(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=st(st({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Ig(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function x7(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=st(st({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Ig(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function w7(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var m=!c[h+1],y=m?a+o-d:c[h+1]-d;if(y<=0)return null;var v=h%t.length;return T.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:y,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function O7(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var m=!c[h+1],y=m?i+s-d:c[h+1]-d;if(y<=0)return null;var v=h%n.length;return T.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:y,height:l,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var S7=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return bm(zc(st(st(st({},Gn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},T7=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return bm(zc(st(st(st({},Gn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},qn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Lg(e){var t,r,n,a,i,o,s=Mc(),l=Nc(),u=fR(),c=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:qn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:qn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:qn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:qn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:qn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:qn.verticalFill,x:J(e.x)?e.x:u.left,y:J(e.y)?e.y:u.top,width:J(e.width)?e.width:u.width,height:J(e.height)?e.height:u.height}),f=c.x,d=c.y,h=c.width,m=c.height,y=c.syncWithTicks,v=c.horizontalValues,b=c.verticalValues,x=lR(),w=uR();if(!J(h)||h<=0||!J(m)||m<=0||!J(f)||f!==+f||!J(d)||d!==+d)return null;var A=c.verticalCoordinatesGenerator||S7,g=c.horizontalCoordinatesGenerator||T7,O=c.horizontalPoints,S=c.verticalPoints;if((!O||!O.length)&&pe(g)){var j=v&&v.length,E=g({yAxis:w?st(st({},w),{},{ticks:j?v:w.ticks}):void 0,width:s,height:l,offset:u},j?!0:y);er(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Hr(E),"]")),Array.isArray(E)&&(O=E)}if((!S||!S.length)&&pe(A)){var M=b&&b.length,_=A({xAxis:x?st(st({},x),{},{ticks:M?b:x.ticks}):void 0,width:s,height:l,offset:u},M?!0:y);er(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Hr(_),"]")),Array.isArray(_)&&(S=_)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(g7,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),T.createElement(b7,Kr({},c,{offset:u,horizontalPoints:O,xAxis:x,yAxis:w})),T.createElement(x7,Kr({},c,{offset:u,verticalPoints:S,xAxis:x,yAxis:w})),T.createElement(w7,Kr({},c,{horizontalPoints:O})),T.createElement(O7,Kr({},c,{verticalPoints:S})))}Lg.displayName="CartesianGrid";var A7=["type","layout","connectNulls","ref"],P7=["key"];function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(e)}function Rg(e,t){if(e==null)return{};var r=j7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function j7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hi.apply(this,arguments)}function Bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bg(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kn(e){return $7(e)||C7(e)||E7(e)||_7()}function _7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
252
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E7(e,t){if(e){if(typeof e=="string")return Hc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hc(e,t)}}function C7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $7(e){if(Array.isArray(e))return Hc(e)}function Hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function k7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ug(n.key),n)}}function M7(e,t,r){return t&&Fg(e.prototype,t),r&&Fg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N7(e,t,r){return t=bs(t),D7(e,Wg()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function D7(e,t){if(t&&(Hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I7(e)}function I7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wg=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function L7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t)}function Kc(e,t){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kc(e,t)}function Lt(e,t,r){return t=Ug(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ug(e){var t=R7(e,"string");return Hn(t)=="symbol"?t:t+""}function R7(e,t){if(Hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vi=function(e){function t(){var r;k7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=N7(this,t,[].concat(a)),Lt(r,"state",{isAnimationFinished:!0,totalLength:0}),Lt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Lt(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(b,x){return b+x});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,h=[],m=0,y=0;m<l.length;y+=l[m],++m)if(y+l[m]>f){h=[].concat(Kn(l.slice(0,m)),[f-y]);break}var v=h.length%2===0?[0,d]:[d];return[].concat(Kn(t.repeat(l,c)),Kn(h),v).map(function(b){return"".concat(b,"px")}).join(", ")}),Lt(r,"id",$r("recharts-line-")),Lt(r,"pathRef",function(o){r.mainCurve=o}),Lt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Lt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return L7(t,e),M7(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=dt(c,$n);if(!f)return null;var d=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:Ze(y.payload,v)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,h,f.map(function(m){return T.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=de(this.props,!1),d=de(l,!0),h=u.map(function(y,v){var b=bt(bt(bt({key:"dot-".concat(v),r:3},f),d),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:c,payload:y.payload,points:u});return t.renderDotItem(l,b)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,hi({className:"recharts-line-dots",key:"dots"},m),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=Rg(s,A7),d=bt(bt(bt({},de(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return T.createElement(Gr,hi({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,m=o.animateNewValues,y=o.width,v=o.height,b=this.state,x=b.prevPoints,w=b.totalLength;return T.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var g=A.t;if(x){var O=x.length/s.length,S=s.map(function(P,I){var C=Math.floor(I*O);if(x[C]){var D=x[C],k=ze(D.x,P.x),B=ze(D.y,P.y);return bt(bt({},P),{},{x:k(g),y:B(g)})}if(m){var U=ze(y*2,P.x),V=ze(v/2,P.y);return bt(bt({},P),{},{x:U(g),y:V(g)})}return bt(bt({},P),{},{x:P.x,y:P.y})});return i.renderCurveStatically(S,n,a)}var j=ze(0,w),E=j(g),M;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(P){return parseFloat(P)});M=i.getStrokeDasharray(E,w,_)}else M=i.generateSimpleStrokeDasharray(w,E);return i.renderCurveStatically(s,n,a,{strokeDasharray:M})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Fr(u,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.xAxis,c=a.yAxis,f=a.top,d=a.left,h=a.width,m=a.height,y=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=s.length===1,w=me("recharts-line",l),A=u&&u.allowDataOverflow,g=c&&c.allowDataOverflow,O=A||g,S=fe(v)?this.id:v,j=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=j.r,M=E===void 0?3:E,_=j.strokeWidth,P=_===void 0?2:_,I=fd(o)?o:{},C=I.clipDot,D=C===void 0?!0:C,k=M*2+P;return T.createElement(xe,{className:w},A||g?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?d:d-h/2,y:g?f:f-m/2,width:A?h:h*2,height:g?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:d-k/2,y:f-k/2,width:h+k,height:m+k}))):null,!x&&this.renderCurve(O,S),this.renderErrorBar(O,S),(x||o)&&this.renderDots(O,D,S),(!y||b)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Kn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Kn(o),Kn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(T.isValidElement(n))i=T.cloneElement(n,a);else if(pe(n))i=n(a);else{var o=a.key,s=Rg(a,P7),l=me("recharts-line-dot",typeof n!="boolean"?n.className:"");i=T.createElement(Zo,hi({key:o},s,{className:l}))}return i}}])}(T.PureComponent);Lt(vi,"displayName","Line"),Lt(vi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!mr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(vi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(d,h){var m=Ze(d,o);return c==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(m)?null:n.scale(m),value:m,payload:d}:{x:fe(m)?null:r.scale(m),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:m,payload:d}});return bt({points:f,layout:c},u)});var B7=["layout","type","stroke","connectNulls","isRange","ref"],F7=["key"],zg;function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function Vg(e,t){if(e==null)return{};var r=W7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yr.apply(this,arguments)}function Gg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gg(Object(r),!0).forEach(function(n){Ht(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kg(n.key),n)}}function z7(e,t,r){return t&&qg(e.prototype,t),r&&qg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V7(e,t,r){return t=xs(t),G7(e,Hg()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function G7(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q7(e)}function q7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hg=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function H7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yc(e,t)}function Ht(e,t,r){return t=Kg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kg(e){var t=K7(e,"string");return Yn(t)=="symbol"?t:t+""}function K7(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ar=function(e){function t(){var r;U7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=V7(this,t,[].concat(a)),Ht(r,"state",{isAnimationFinished:!0}),Ht(r,"id",$r("recharts-area-")),Ht(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(o)&&o()}),Ht(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(o)&&o()}),r}return H7(t,e),z7(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,d=de(this.props,!1),h=de(u,!0),m=c.map(function(v,b){var x=Tr(Tr(Tr({key:"dot-".concat(b),r:3},d),h),{},{index:b,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:c});return t.renderDotItem(u,x)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,Yr({className:"recharts-area-dots"},y),m)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=xr(o.map(function(d){return d.y||0}));return J(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(xr(i.map(function(d){return d.y||0})),f)),J(f)?T.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=xr(o.map(function(d){return d.x||0}));return J(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(xr(i.map(function(d){return d.x||0})),f)),J(f)?T.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=Vg(s,B7);return T.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},T.createElement(Gr,Yr({},de(h,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&T.createElement(Gr,Yr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&T.createElement(Gr,Yr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,m=this.state,y=m.prevPoints,v=m.prevBaseLine;return T.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var x=b.t;if(y){var w=y.length/s.length,A=s.map(function(j,E){var M=Math.floor(E*w);if(y[M]){var _=y[M],P=ze(_.x,j.x),I=ze(_.y,j.y);return Tr(Tr({},j),{},{x:P(x),y:I(x)})}return j}),g;if(J(l)&&typeof l=="number"){var O=ze(v,l);g=O(x)}else if(fe(l)||un(l)){var S=ze(v,0);g=S(x)}else g=l.map(function(j,E){var M=Math.floor(E*w);if(v[M]){var _=v[M],P=ze(_.x,j.x),I=ze(_.y,j.y);return Tr(Tr({},j),{},{x:P(x),y:I(x)})}return j});return i.renderAreaStatically(A,g,n,a)}return T.createElement(xe,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(x))),T.createElement(xe,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,d=u.totalLength;return l&&o&&o.length&&(!c&&d>0||!Fr(c,o)||!Fr(f,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.top,c=a.left,f=a.xAxis,d=a.yAxis,h=a.width,m=a.height,y=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=s.length===1,w=me("recharts-area",l),A=f&&f.allowDataOverflow,g=d&&d.allowDataOverflow,O=A||g,S=fe(v)?this.id:v,j=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=j.r,M=E===void 0?3:E,_=j.strokeWidth,P=_===void 0?2:_,I=fd(o)?o:{},C=I.clipDot,D=C===void 0?!0:C,k=M*2+P;return T.createElement(xe,{className:w},A||g?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?c:c-h/2,y:g?u:u-m/2,width:A?h:h*2,height:g?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:c-k/2,y:u-k/2,width:h+k,height:m+k}))):null,x?null:this.renderArea(O,S),(o||x)&&this.renderDots(O,D,S),(!y||b)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(T.PureComponent);zg=Ar,Ht(Ar,"displayName","Area"),Ht(Ar,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!mr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Ht(Ar,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(J(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]}),Ht(Ar,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=t.layout,m=u&&u.length,y=zg.getBaseValue(t,r,n,a),v=h==="horizontal",b=!1,x=f.map(function(A,g){var O;m?O=u[c+g]:(O=Ze(A,l),Array.isArray(O)?b=!0:O=[y,O]);var S=O[1]==null||m&&Ze(A,l)==null;return v?{x:Mn({axis:n,ticks:i,bandSize:s,entry:A,index:g}),y:S?null:a.scale(O[1]),value:O,payload:A}:{x:S?null:n.scale(O[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:A,index:g}),value:O,payload:A}}),w;return m||b?w=x.map(function(A){var g=Array.isArray(A.value)?A.value[0]:null;return v?{x:A.x,y:g!=null&&A.y!=null?a.scale(g):null}:{x:g!=null?n.scale(g):null,y:A.y}}):w=v?a.scale(y):n.scale(y),Tr({points:x,baseLine:w,layout:h,isRange:b},d)}),Ht(Ar,"renderDotItem",function(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=me("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Vg(t,F7);r=T.createElement(Zo,Yr({},i,{key:a,className:n}))}return r});function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function Y7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jg(n.key),n)}}function J7(e,t,r){return t&&X7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z7(e,t,r){return t=ws(t),Q7(e,Yg()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function Q7(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e9(e)}function e9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yg=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function t9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xc(e,t)}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xc(e,t)}function Xg(e,t,r){return t=Jg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jg(e){var t=r9(e,"string");return Xn(t)=="symbol"?t:t+""}function r9(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Os=function(e){function t(){return Y7(this,t),Z7(this,t,arguments)}return t9(t,e),J7(t,[{key:"render",value:function(){return null}}])}(xt.Component);Xg(Os,"displayName","ZAxis"),Xg(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var n9=["option","isActive"];function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mi.apply(this,arguments)}function a9(e,t){if(e==null)return{};var r=i9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function o9(e){var t=e.option,r=e.isActive,n=a9(e,n9);return typeof t=="string"?xt.createElement(Tc,mi({option:xt.createElement(Xi,mi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(Tc,mi({option:t,isActive:r,shapeType:"symbols"},n))}function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function yi(){return yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yi.apply(this,arguments)}function Zg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zg(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tb(n.key),n)}}function l9(e,t,r){return t&&Qg(e.prototype,t),r&&Qg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u9(e,t,r){return t=Ss(t),c9(e,eb()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function c9(e,t){if(t&&(Jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f9(e)}function f9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eb=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function d9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Jc(e,t)}function Pr(e,t,r){return t=tb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tb(e){var t=p9(e,"string");return Jn(t)=="symbol"?t:t+""}function p9(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts=function(e){function t(){var r;s9(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=u9(this,t,[].concat(a)),Pr(r,"state",{isAnimationFinished:!1}),Pr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Pr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Pr(r,"id",$r("recharts-scatter-")),r}return d9(t,e),l9(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,u=de(this.props,!1);return n.map(function(c,f){var d=l===f,h=d?s:o,m=_t(_t({},u),c);return T.createElement(xe,yi({className:"recharts-scatter-symbol",key:"symbol-".concat(c==null?void 0:c.cx,"-").concat(c==null?void 0:c.cy,"-").concat(c==null?void 0:c.size,"-").concat(f)},ma(a.props,c,f),{role:"img"}),T.createElement(o9,yi({option:h,isActive:d,key:"symbol-".concat(f)},m)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,u=a.animationEasing,c=a.animationId,f=this.state.prevPoints;return T.createElement(Dt,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,m=i.map(function(y,v){var b=f&&f[v];if(b){var x=ze(b.cx,y.cx),w=ze(b.cy,y.cy),A=ze(b.size,y.size);return _t(_t({},y),{},{cx:x(h),cy:w(h),size:A(h)})}var g=ze(0,y.size);return _t(_t({},y),{},{size:g(h)})});return T.createElement(xe,null,n.renderSymbolsStatically(m))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Fr(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,u=dt(l,$n);return u?u.map(function(c,f){var d=c.props,h=d.direction,m=d.dataKey;return T.cloneElement(c,{key:"".concat(h,"-").concat(m,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(v,b){return{x:v.cx,y:v.cy,value:h==="x"?+v.node.x:+v.node.y,errorVal:Ze(v,b)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=de(this.props,!1),u=de(i,!1),c,f;if(o==="joint")c=a.map(function(w){return{x:w.cx,y:w.cy}});else if(o==="fitting"){var d=RO(a),h=d.xmin,m=d.xmax,y=d.a,v=d.b,b=function(A){return y*A+v};c=[{x:h,y:b(h)},{x:m,y:b(m)}]}var x=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return T.isValidElement(i)?f=T.cloneElement(i,x):pe(i)?f=i(x):f=T.createElement(Gr,yi({},x,{type:s})),T.createElement(xe,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,u=n.yAxis,c=n.left,f=n.top,d=n.width,h=n.height,m=n.id,y=n.isAnimationActive;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=me("recharts-scatter",s),x=l&&l.allowDataOverflow,w=u&&u.allowDataOverflow,A=x||w,g=fe(m)?this.id:m;return T.createElement(xe,{className:b,clipPath:A?"url(#clipPath-".concat(g,")"):null},x||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(g)},T.createElement("rect",{x:x?c:c-d/2,y:w?f:f-h/2,width:x?d:d*2,height:w?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),T.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!y||v)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])}(T.PureComponent);Pr(Ts,"displayName","Scatter"),Pr(Ts,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!mr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Pr(Ts,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,u=a.props.tooltipType,c=dt(a.props.children,Ql),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,m=n?n.range:Os.defaultProps.range,y=m&&m[0],v=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,x=i.map(function(w,A){var g=Ze(w,f),O=Ze(w,d),S=!fe(h)&&Ze(w,h)||"-",j=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:g,payload:w,dataKey:f,type:u},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:O,payload:w,dataKey:d,type:u}];S!=="-"&&j.push({name:n.name||n.dataKey,unit:n.unit||"",value:S,payload:w,dataKey:h,type:u});var E=Mn({axis:t,ticks:o,bandSize:v,entry:w,index:A,dataKey:f}),M=Mn({axis:r,ticks:s,bandSize:b,entry:w,index:A,dataKey:d}),_=S!=="-"?n.scale(S):y,P=Math.sqrt(Math.max(_,0)/Math.PI);return _t(_t({},w),{},{cx:E,cy:M,x:E-P,y:M-P,xAxis:t,yAxis:r,zAxis:n,width:2*P,height:2*P,size:_,node:{x:g,y:O,z:S},tooltipPayload:j,tooltipPosition:{x:E,y:M},payload:w},c&&c[A]&&c[A].props)});return _t({points:x},l)});function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function h9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ab(n.key),n)}}function m9(e,t,r){return t&&v9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y9(e,t,r){return t=As(t),g9(e,rb()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function g9(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b9(e)}function b9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rb=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function x9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zc(e,t)}function Zc(e,t){return Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zc(e,t)}function nb(e,t,r){return t=ab(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ab(e){var t=w9(e,"string");return Zn(t)=="symbol"?t:t+""}function w9(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qc.apply(this,arguments)}function O9(e){var t=e.xAxisId,r=Mc(),n=Nc(),a=pg(t);return a==null?null:xt.createElement(Gn,Qc({},a,{className:me("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return ur(o,!0)}}))}var Ps=function(e){function t(){return h9(this,t),y9(this,t,arguments)}return x9(t,e),m9(t,[{key:"render",value:function(){return xt.createElement(O9,this.props)}}])}(xt.Component);nb(Ps,"displayName","XAxis"),nb(Ps,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function S9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sb(n.key),n)}}function A9(e,t,r){return t&&T9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function P9(e,t,r){return t=js(t),j9(e,ib()?Reflect.construct(t,r||[],js(e).constructor):t.apply(e,r))}function j9(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _9(e)}function _9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ib(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ib=function(){return!!e})()}function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},js(e)}function E9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ef(e,t)}function ef(e,t){return ef=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ef(e,t)}function ob(e,t,r){return t=sb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sb(e){var t=C9(e,"string");return Qn(t)=="symbol"?t:t+""}function C9(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tf(){return tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tf.apply(this,arguments)}var $9=function(t){var r=t.yAxisId,n=Mc(),a=Nc(),i=hg(r);return i==null?null:xt.createElement(Gn,tf({},i,{className:me("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return ur(s,!0)}}))},_s=function(e){function t(){return S9(this,t),P9(this,t,arguments)}return E9(t,e),A9(t,[{key:"render",value:function(){return xt.createElement($9,this.props)}}])}(xt.Component);ob(_s,"displayName","YAxis"),ob(_s,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function lb(e){return D9(e)||N9(e)||M9(e)||k9()}function k9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
253
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M9(e,t){if(e){if(typeof e=="string")return rf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rf(e,t)}}function N9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D9(e){if(Array.isArray(e))return rf(e)}function rf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var nf=function(t,r,n,a,i){var o=dt(t,Rc),s=dt(t,ps),l=[].concat(lb(o),lb(s)),u=dt(t,ms),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(y,v){if(v.props[c]===n&&qt(v.props,"extendDomain")&&J(v.props[f])){var b=v.props[f];return[Math.min(y[0],b),Math.max(y[1],b)]}return y},d)),u.length){var h="".concat(f,"1"),m="".concat(f,"2");d=u.reduce(function(y,v){if(v.props[c]===n&&qt(v.props,"extendDomain")&&J(v.props[h])&&J(v.props[m])){var b=v.props[h],x=v.props[m];return[Math.min(y[0],b,x),Math.max(y[1],b,x)]}return y},d)}return i&&i.length&&(d=i.reduce(function(y,v){return J(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},d)),d},ub={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new a(c,f||l,d),m=r?r+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],h]:l._events[m].push(h):(l._events[m]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,m=new Array(h);d<h;d++)m[d]=f[d].fn;return m},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,m){var y=r?r+u:u;if(!this._events[y])return!1;var v=this._events[y],b=arguments.length,x,w;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,c),!0;case 3:return v.fn.call(v.context,c,f),!0;case 4:return v.fn.call(v.context,c,f,d),!0;case 5:return v.fn.call(v.context,c,f,d,h),!0;case 6:return v.fn.call(v.context,c,f,d,h,m),!0}for(w=1,x=new Array(b-1);w<b;w++)x[w-1]=arguments[w];v.fn.apply(v.context,x)}else{var A=v.length,g;for(w=0;w<A;w++)switch(v[w].once&&this.removeListener(u,v[w].fn,void 0,!0),b){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,c);break;case 3:v[w].fn.call(v[w].context,c,f);break;case 4:v[w].fn.call(v[w].context,c,f,d);break;default:if(!x)for(g=1,x=new Array(b-1);g<b;g++)x[g-1]=arguments[g];v[w].fn.apply(v[w].context,x)}}return!0},s.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=r?r+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===c&&(!d||m.once)&&(!f||m.context===f)&&o(this,h);else{for(var y=0,v=[],b=m.length;y<b;y++)(m[y].fn!==c||d&&!m[y].once||f&&m[y].context!==f)&&v.push(m[y]);v.length?this._events[h]=v.length===1?v[0]:v:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(ub);var I9=ub.exports;const L9=$e(I9);var af=new L9,of="recharts.syncMouseEvents";function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function R9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cb(n.key),n)}}function F9(e,t,r){return t&&B9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sf(e,t,r){return t=cb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cb(e){var t=W9(e,"string");return gi(t)=="symbol"?t:t+""}function W9(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var U9=function(){function e(){R9(this,e),sf(this,"activeIndex",0),sf(this,"coordinateList",[]),sf(this,"layout","horizontal")}return F9(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+u,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function z9(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&J(n)&&J(a))return!0}return!1}function V9(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function fb(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=nt(t,r,n,a),s=nt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function G9(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,d=nt(s,l,u,f),h=nt(s,l,c,f);n=d.x,a=d.y,i=h.x,o=h.y}else return fb(t);return[{x:n,y:a},{x:i,y:o}]}function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?db(Object(r),!0).forEach(function(n){q9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q9(e,t,r){return t=H9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H9(e){var t=K9(e,"string");return bi(t)=="symbol"?t:t+""}function K9(e,t){if(bi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y9(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=e.layout,d=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var m,y=Gr;if(d==="ScatterChart")m=o,y=x4;else if(d==="BarChart")m=V9(f,o,l,c),y=wc;else if(f==="radial"){var v=fb(o),b=v.cx,x=v.cy,w=v.radius,A=v.startAngle,g=v.endAngle;m={cx:b,cy:x,startAngle:A,endAngle:g,innerRadius:w,outerRadius:w},y=Rm}else m={points:G9(f,o,l)},y=Gr;var O=Es(Es(Es(Es({stroke:"#ccc",pointerEvents:"none"},l),m),de(h,!1)),{},{payload:s,payloadIndex:u,className:me("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,O):T.createElement(y,O)}var X9=["item"],J9=["children","className","width","height","style","compact","title","desc"];function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ta.apply(this,arguments)}function pb(e,t){return eB(e)||Q9(e,t)||mb(e,t)||Z9()}function Z9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
254
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q9(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function eB(e){if(Array.isArray(e))return e}function hb(e,t){if(e==null)return{};var r=tB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gb(n.key),n)}}function aB(e,t,r){return t&&nB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iB(e,t,r){return t=Cs(t),oB(e,vb()?Reflect.construct(t,r||[],Cs(e).constructor):t.apply(e,r))}function oB(e,t){if(t&&(ea(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sB(e)}function sB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vb=function(){return!!e})()}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}function lB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lf(e,t)}function lf(e,t){return lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},lf(e,t)}function ra(e){return fB(e)||cB(e)||mb(e)||uB()}function uB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
255
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mb(e,t){if(e){if(typeof e=="string")return uf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uf(e,t)}}function cB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fB(e){if(Array.isArray(e))return uf(e)}function uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yb(Object(r),!0).forEach(function(n){le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function le(e,t,r){return t=gb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gb(e){var t=dB(e,"string");return ea(t)=="symbol"?t:t+""}function dB(e,t){if(ea(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ea(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pB={xAxis:["bottom","top"],yAxis:["left","right"]},hB={width:"100%",height:"100%"},bb={x:0,y:0};function $s(e){return e}var vB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},mB=function(t,r,n,a){var i=r.find(function(c){return c&&c.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return z(z(z({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return z(z(z({},a),nt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return bb},ks=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(ra(s),ra(u)):s},[]);return o.length>0?o:t&&t.length&&J(a)&&J(i)?t.slice(a,i+1):[]};function xb(e){return e==="number"?[0,"auto"]:void 0}var cf=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=ks(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=Ri(h,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ra(l),[Pm(u,d)]):l},[])},wb=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=vB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=J3(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=cf(t,r,c,f),h=mB(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},yB=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,h=gm(c,i);return n.reduce(function(m,y){var v,b=y.type.defaultProps!==void 0?z(z({},y.type.defaultProps),y.props):y.props,x=b.type,w=b.dataKey,A=b.allowDataOverflow,g=b.allowDuplicatedCategory,O=b.scale,S=b.ticks,j=b.includeHidden,E=b[o];if(m[E])return m;var M=ks(t.data,{graphicalItems:a.filter(function(F){var W,G=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o];return G===E}),dataStartIndex:l,dataEndIndex:u}),_=M.length,P,I,C;z9(b.domain,A,x)&&(P=Zu(b.domain,null,A),h&&(x==="number"||O!=="auto")&&(C=Ga(M,w,"category")));var D=xb(x);if(!P||P.length===0){var k,B=(k=b.domain)!==null&&k!==void 0?k:D;if(w){if(P=Ga(M,w,x),x==="category"&&h){var U=LO(P);g&&U?(I=P,P=ns(0,_)):g||(P=Am(B,P,y).reduce(function(F,W){return F.indexOf(W)>=0?F:[].concat(ra(F),[W])},[]))}else if(x==="category")g?P=P.filter(function(F){return F!==""&&!fe(F)}):P=Am(B,P,y).reduce(function(F,W){return F.indexOf(W)>=0||W===""||fe(W)?F:[].concat(ra(F),[W])},[]);else if(x==="number"){var V=rI(M,a.filter(function(F){var W,G,X=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o],Q="hide"in F.props?F.props.hide:(G=F.type.defaultProps)===null||G===void 0?void 0:G.hide;return X===E&&(j||!Q)}),w,i,c);V&&(P=V)}h&&(x==="number"||O!=="auto")&&(C=Ga(M,w,"category"))}else h?P=ns(0,_):s&&s[E]&&s[E].hasStack&&x==="number"?P=d==="expand"?[0,1]:Om(s[E].stackGroups,l,u):P=ym(M,a.filter(function(F){var W=o in F.props?F.props[o]:F.type.defaultProps[o],G="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return W===E&&(j||!G)}),x,c,!0);if(x==="number")P=nf(f,P,E,i,S),B&&(P=Zu(B,P,A));else if(x==="category"&&B){var $=B,R=P.every(function(F){return $.indexOf(F)>=0});R&&(P=$)}}return z(z({},m),{},le({},E,z(z({},b),{},{axisType:i,domain:P,categoricalDomain:C,duplicateDomain:I,originalDomain:(v=b.domain)!==null&&v!==void 0?v:D,isCategorical:h,layout:c})))},{})},gB=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=ks(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,m=gm(c,i),y=-1;return n.reduce(function(v,b){var x=b.type.defaultProps!==void 0?z(z({},b.type.defaultProps),b.props):b.props,w=x[o],A=xb("number");if(!v[w]){y++;var g;return m?g=ns(0,h):s&&s[w]&&s[w].hasStack?(g=Om(s[w].stackGroups,l,u),g=nf(f,g,w,i)):(g=Zu(A,ym(d,n.filter(function(O){var S,j,E=o in O.props?O.props[o]:(S=O.type.defaultProps)===null||S===void 0?void 0:S[o],M="hide"in O.props?O.props.hide:(j=O.type.defaultProps)===null||j===void 0?void 0:j.hide;return E===w&&!M}),"number",c),a.defaultProps.allowDataOverflow),g=nf(f,g,w,i)),z(z({},v),{},le({},w,z(z({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(pB,"".concat(i,".").concat(y%2),null),domain:g,originalDomain:A,isCategorical:m,layout:c})))}return v},{})},bB=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(a,"Id"),d=dt(c,i),h={};return d&&d.length?h=yB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=gB(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},xB=function(t){var r=hr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Gl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},Ob=function(t){var r=t.children,n=t.defaultShowTooltip,a=mt(r,In),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},wB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},Sb=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},OB=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},h=mt(f,In),m=mt(f,yn),y=Object.keys(l).reduce(function(g,O){var S=l[O],j=S.orientation;return!S.mirror&&!S.hide?z(z({},g),{},le({},j,g[j]+S.width)):g},{left:d.left||0,right:d.right||0}),v=Object.keys(o).reduce(function(g,O){var S=o[O],j=S.orientation;return!S.mirror&&!S.hide?z(z({},g),{},le({},j,wt(g,"".concat(j))+S.height)):g},{top:d.top||0,bottom:d.bottom||0}),b=z(z({},v),y),x=b.bottom;h&&(b.bottom+=h.props.height||In.defaultProps.height),m&&r&&(b=eI(b,a,n,r));var w=u-b.left-b.right,A=c-b.top-b.bottom;return z(z({brushBottom:x},b),{},{width:Math.max(w,0),height:Math.max(A,0)})},SB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},TB=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(b,x){var w=x.graphicalItems,A=x.stackGroups,g=x.offset,O=x.updateId,S=x.dataStartIndex,j=x.dataEndIndex,E=b.barSize,M=b.layout,_=b.barGap,P=b.barCategoryGap,I=b.maxBarSize,C=Sb(M),D=C.numericAxisName,k=C.cateAxisName,B=wB(w),U=[];return w.forEach(function(V,$){var R=ks(b.data,{graphicalItems:[V],dataStartIndex:S,dataEndIndex:j}),F=V.type.defaultProps!==void 0?z(z({},V.type.defaultProps),V.props):V.props,W=F.dataKey,G=F.maxBarSize,X=F["".concat(D,"Id")],Q=F["".concat(k,"Id")],ae={},te=l.reduce(function(Ge,ut){var ji,_i,oa=x["".concat(ut.axisType,"Map")],Ei=F["".concat(ut.axisType,"Id")];oa&&oa[Ei]||ut.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ht(!1,"Specifying a(n) ".concat(ut.axisType,"Id requires a corresponding ").concat(ut.axisType,"Id on the targeted graphical component ").concat((ji=V==null||(_i=V.type)===null||_i===void 0?void 0:_i.displayName)!==null&&ji!==void 0?ji:"")):ht());var Ci=oa[Ei];return z(z({},Ge),{},le(le({},ut.axisType,Ci),"".concat(ut.axisType,"Ticks"),ur(Ci)))},ae),q=te[k],Y=te["".concat(k,"Ticks")],Z=A&&A[X]&&A[X].hasStack&&hI(V,A[X].stackGroups),L=Qt(V.type).indexOf("Bar")>=0,oe=Fo(q,Y),H=[],ue=B&&Z3({barSize:E,stackGroups:A,totalSize:SB(te,k)});if(L){var ee,ve,Ue=fe(G)?I:G,Be=(ee=(ve=Fo(q,Y,!0))!==null&&ve!==void 0?ve:Ue)!==null&&ee!==void 0?ee:0;H=Q3({barGap:_,barCategoryGap:P,bandSize:Be!==oe?Be:oe,sizeList:ue[Q],maxBarSize:Ue}),Be!==oe&&(H=H.map(function(Ge){return z(z({},Ge),{},{position:z(z({},Ge.position),{},{offset:Ge.position.offset-Be/2})})}))}var Fe=V&&V.type&&V.type.getComposedData;Fe&&U.push({props:z(z({},Fe(z(z({},te),{},{displayedData:R,props:b,dataKey:W,item:V,bandSize:oe,barPosition:H,offset:g,stackedData:Z,layout:M,dataStartIndex:S,dataEndIndex:j}))),{},le(le(le({key:V.key||"item-".concat($)},D,te[D]),k,te[k]),"animationId",O)),childIndex:XO(V,b.children),item:V})}),U},h=function(b,x){var w=b.props,A=b.dataStartIndex,g=b.dataEndIndex,O=b.updateId;if(!cd({props:w}))return null;var S=w.children,j=w.layout,E=w.stackOffset,M=w.data,_=w.reverseStackOrder,P=Sb(j),I=P.numericAxisName,C=P.cateAxisName,D=dt(S,n),k=fI(M,D,"".concat(I,"Id"),"".concat(C,"Id"),E,_),B=l.reduce(function(F,W){var G="".concat(W.axisType,"Map");return z(z({},F),{},le({},G,bB(w,z(z({},W),{},{graphicalItems:D,stackGroups:W.axisType===I&&k,dataStartIndex:A,dataEndIndex:g}))))},{}),U=OB(z(z({},B),{},{props:w,graphicalItems:D}),x==null?void 0:x.legendBBox);Object.keys(B).forEach(function(F){B[F]=c(w,B[F],U,F.replace("Map",""),r)});var V=B["".concat(C,"Map")],$=xB(V),R=d(w,z(z({},B),{},{dataStartIndex:A,dataEndIndex:g,updateId:O,graphicalItems:D,stackGroups:k,offset:U}));return z(z({formattedGraphicalItems:R,graphicalItems:D,offset:U,stackGroups:k},$),B)},m=function(v){function b(x){var w,A,g;return rB(this,b),g=iB(this,b,[x]),le(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),le(g,"accessibilityManager",new U9),le(g,"handleLegendBBoxUpdate",function(O){if(O){var S=g.state,j=S.dataStartIndex,E=S.dataEndIndex,M=S.updateId;g.setState(z({legendBBox:O},h({props:g.props,dataStartIndex:j,dataEndIndex:E,updateId:M},z(z({},g.state),{},{legendBBox:O}))))}}),le(g,"handleReceiveSyncEvent",function(O,S,j){if(g.props.syncId===O){if(j===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(S)}}),le(g,"handleBrushChange",function(O){var S=O.startIndex,j=O.endIndex;if(S!==g.state.dataStartIndex||j!==g.state.dataEndIndex){var E=g.state.updateId;g.setState(function(){return z({dataStartIndex:S,dataEndIndex:j},h({props:g.props,dataStartIndex:S,dataEndIndex:j,updateId:E},g.state))}),g.triggerSyncEvent({dataStartIndex:S,dataEndIndex:j})}}),le(g,"handleMouseEnter",function(O){var S=g.getMouseInfo(O);if(S){var j=z(z({},S),{},{isTooltipActive:!0});g.setState(j),g.triggerSyncEvent(j);var E=g.props.onMouseEnter;pe(E)&&E(j,O)}}),le(g,"triggeredAfterMouseMove",function(O){var S=g.getMouseInfo(O),j=S?z(z({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(j),g.triggerSyncEvent(j);var E=g.props.onMouseMove;pe(E)&&E(j,O)}),le(g,"handleItemMouseEnter",function(O){g.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),le(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),le(g,"handleMouseMove",function(O){O.persist(),g.throttleTriggeredAfterMouseMove(O)}),le(g,"handleMouseLeave",function(O){g.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};g.setState(S),g.triggerSyncEvent(S);var j=g.props.onMouseLeave;pe(j)&&j(S,O)}),le(g,"handleOuterEvent",function(O){var S=YO(O),j=wt(g.props,"".concat(S));if(S&&pe(j)){var E,M;/.*touch.*/i.test(S)?M=g.getMouseInfo(O.changedTouches[0]):M=g.getMouseInfo(O),j((E=M)!==null&&E!==void 0?E:{},O)}}),le(g,"handleClick",function(O){var S=g.getMouseInfo(O);if(S){var j=z(z({},S),{},{isTooltipActive:!0});g.setState(j),g.triggerSyncEvent(j);var E=g.props.onClick;pe(E)&&E(j,O)}}),le(g,"handleMouseDown",function(O){var S=g.props.onMouseDown;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"handleMouseUp",function(O){var S=g.props.onMouseUp;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),le(g,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseDown(O.changedTouches[0])}),le(g,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&g.handleMouseUp(O.changedTouches[0])}),le(g,"handleDoubleClick",function(O){var S=g.props.onDoubleClick;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"handleContextMenu",function(O){var S=g.props.onContextMenu;if(pe(S)){var j=g.getMouseInfo(O);S(j,O)}}),le(g,"triggerSyncEvent",function(O){g.props.syncId!==void 0&&af.emit(of,g.props.syncId,O,g.eventEmitterSymbol)}),le(g,"applySyncEvent",function(O){var S=g.props,j=S.layout,E=S.syncMethod,M=g.state.updateId,_=O.dataStartIndex,P=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)g.setState(z({dataStartIndex:_,dataEndIndex:P},h({props:g.props,dataStartIndex:_,dataEndIndex:P,updateId:M},g.state)));else if(O.activeTooltipIndex!==void 0){var I=O.chartX,C=O.chartY,D=O.activeTooltipIndex,k=g.state,B=k.offset,U=k.tooltipTicks;if(!B)return;if(typeof E=="function")D=E(U,O);else if(E==="value"){D=-1;for(var V=0;V<U.length;V++)if(U[V].value===O.activeLabel){D=V;break}}var $=z(z({},B),{},{x:B.left,y:B.top}),R=Math.min(I,$.x+$.width),F=Math.min(C,$.y+$.height),W=U[D]&&U[D].value,G=cf(g.state,g.props.data,D),X=U[D]?{x:j==="horizontal"?U[D].coordinate:R,y:j==="horizontal"?F:U[D].coordinate}:bb;g.setState(z(z({},O),{},{activeLabel:W,activeCoordinate:X,activePayload:G,activeTooltipIndex:D}))}else g.setState(O)}),le(g,"renderCursor",function(O){var S,j=g.state,E=j.isTooltipActive,M=j.activeCoordinate,_=j.activePayload,P=j.offset,I=j.activeTooltipIndex,C=j.tooltipAxisBandSize,D=g.getTooltipEventType(),k=(S=O.props.active)!==null&&S!==void 0?S:E,B=g.props.layout,U=O.key||"_recharts-cursor";return T.createElement(Y9,{key:U,activeCoordinate:M,activePayload:_,activeTooltipIndex:I,chartName:r,element:O,isActive:k,layout:B,offset:P,tooltipAxisBandSize:C,tooltipEventType:D})}),le(g,"renderPolarAxis",function(O,S,j){var E=wt(O,"type.axisType"),M=wt(g.state,"".concat(E,"Map")),_=O.type.defaultProps,P=_!==void 0?z(z({},_),O.props):O.props,I=M&&M[P["".concat(E,"Id")]];return T.cloneElement(O,z(z({},I),{},{className:me(E,I.className),key:O.key||"".concat(S,"-").concat(j),ticks:ur(I,!0)}))}),le(g,"renderPolarGrid",function(O){var S=O.props,j=S.radialLines,E=S.polarAngles,M=S.polarRadius,_=g.state,P=_.radiusAxisMap,I=_.angleAxisMap,C=hr(P),D=hr(I),k=D.cx,B=D.cy,U=D.innerRadius,V=D.outerRadius;return T.cloneElement(O,{polarAngles:Array.isArray(E)?E:ur(D,!0).map(function($){return $.coordinate}),polarRadius:Array.isArray(M)?M:ur(C,!0).map(function($){return $.coordinate}),cx:k,cy:B,innerRadius:U,outerRadius:V,key:O.key||"polar-grid",radialLines:j})}),le(g,"renderLegend",function(){var O=g.state.formattedGraphicalItems,S=g.props,j=S.children,E=S.width,M=S.height,_=g.props.margin||{},P=E-(_.left||0)-(_.right||0),I=pm({children:j,formattedGraphicalItems:O,legendWidth:P,legendContent:u});if(!I)return null;var C=I.item,D=hb(I,X9);return T.cloneElement(C,z(z({},D),{},{chartWidth:E,chartHeight:M,margin:_,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),le(g,"renderTooltip",function(){var O,S=g.props,j=S.children,E=S.accessibilityLayer,M=mt(j,Wt);if(!M)return null;var _=g.state,P=_.isTooltipActive,I=_.activeCoordinate,C=_.activePayload,D=_.activeLabel,k=_.offset,B=(O=M.props.active)!==null&&O!==void 0?O:P;return T.cloneElement(M,{viewBox:z(z({},k),{},{x:k.left,y:k.top}),active:B,label:D,payload:B?C:[],coordinate:I,accessibilityLayer:E})}),le(g,"renderBrush",function(O){var S=g.props,j=S.margin,E=S.data,M=g.state,_=M.offset,P=M.dataStartIndex,I=M.dataEndIndex,C=M.updateId;return T.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Bo(g.handleBrushChange,O.props.onChange),data:E,x:J(O.props.x)?O.props.x:_.left,y:J(O.props.y)?O.props.y:_.top+_.height+_.brushBottom-(j.bottom||0),width:J(O.props.width)?O.props.width:_.width,startIndex:P,endIndex:I,updateId:"brush-".concat(C)})}),le(g,"renderReferenceElement",function(O,S,j){if(!O)return null;var E=g,M=E.clipPathId,_=g.state,P=_.xAxisMap,I=_.yAxisMap,C=_.offset,D=O.type.defaultProps||{},k=O.props,B=k.xAxisId,U=B===void 0?D.xAxisId:B,V=k.yAxisId,$=V===void 0?D.yAxisId:V;return T.cloneElement(O,{key:O.key||"".concat(S,"-").concat(j),xAxis:P[U],yAxis:I[$],viewBox:{x:C.left,y:C.top,width:C.width,height:C.height},clipPathId:M})}),le(g,"renderActivePoints",function(O){var S=O.item,j=O.activePoint,E=O.basePoint,M=O.childIndex,_=O.isRange,P=[],I=S.props.key,C=S.item.type.defaultProps!==void 0?z(z({},S.item.type.defaultProps),S.item.props):S.item.props,D=C.activeDot,k=C.dataKey,B=z(z({index:M,dataKey:k,cx:j.x,cy:j.y,r:4,fill:Xu(S.item),strokeWidth:2,stroke:"#fff",payload:j.payload,value:j.value},de(D,!1)),Bi(D));return P.push(b.renderActiveDot(D,B,"".concat(I,"-activePoint-").concat(M))),E?P.push(b.renderActiveDot(D,z(z({},B),{},{cx:E.x,cy:E.y}),"".concat(I,"-basePoint-").concat(M))):_&&P.push(null),P}),le(g,"renderGraphicChild",function(O,S,j){var E=g.filterFormatItem(O,S,j);if(!E)return null;var M=g.getTooltipEventType(),_=g.state,P=_.isTooltipActive,I=_.tooltipAxis,C=_.activeTooltipIndex,D=_.activeLabel,k=g.props.children,B=mt(k,Wt),U=E.props,V=U.points,$=U.isRange,R=U.baseLine,F=E.item.type.defaultProps!==void 0?z(z({},E.item.type.defaultProps),E.item.props):E.item.props,W=F.activeDot,G=F.hide,X=F.activeBar,Q=F.activeShape,ae=!!(!G&&P&&B&&(W||X||Q)),te={};M!=="axis"&&B&&B.props.trigger==="click"?te={onClick:Bo(g.handleItemMouseEnter,O.props.onClick)}:M!=="axis"&&(te={onMouseLeave:Bo(g.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Bo(g.handleItemMouseEnter,O.props.onMouseEnter)});var q=T.cloneElement(O,z(z({},E.props),te));function Y(ut){return typeof I.dataKey=="function"?I.dataKey(ut.payload):null}if(ae)if(C>=0){var Z,L;if(I.dataKey&&!I.allowDuplicatedCategory){var oe=typeof I.dataKey=="function"?Y:"payload.".concat(I.dataKey.toString());Z=Ri(V,oe,D),L=$&&R&&Ri(R,oe,D)}else Z=V==null?void 0:V[C],L=$&&R&&R[C];if(Q||X){var H=O.props.activeIndex!==void 0?O.props.activeIndex:C;return[T.cloneElement(O,z(z(z({},E.props),te),{},{activeIndex:H})),null,null]}if(!fe(Z))return[q].concat(ra(g.renderActivePoints({item:E,activePoint:Z,basePoint:L,childIndex:C,isRange:$})))}else{var ue,ee=(ue=g.getItemByXY(g.state.activeCoordinate))!==null&&ue!==void 0?ue:{graphicalItem:q},ve=ee.graphicalItem,Ue=ve.item,Be=Ue===void 0?O:Ue,Fe=ve.childIndex,Ge=z(z(z({},E.props),te),{},{activeIndex:Fe});return[T.cloneElement(Be,Ge),null,null]}return $?[q,null,null]:[q,null]}),le(g,"renderCustomized",function(O,S,j){return T.cloneElement(O,z(z({key:"recharts-customized-".concat(j)},g.props),g.state))}),le(g,"renderMap",{CartesianGrid:{handler:$s,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:$s},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:$s},YAxis:{handler:$s},Brush:{handler:g.renderBrush,once:!0},Bar:{handler:g.renderGraphicChild},Line:{handler:g.renderGraphicChild},Area:{handler:g.renderGraphicChild},Radar:{handler:g.renderGraphicChild},RadialBar:{handler:g.renderGraphicChild},Scatter:{handler:g.renderGraphicChild},Pie:{handler:g.renderGraphicChild},Funnel:{handler:g.renderGraphicChild},Tooltip:{handler:g.renderCursor,once:!0},PolarGrid:{handler:g.renderPolarGrid,once:!0},PolarAngleAxis:{handler:g.renderPolarAxis},PolarRadiusAxis:{handler:g.renderPolarAxis},Customized:{handler:g.renderCustomized}}),g.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:$r("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=ch(g.triggeredAfterMouseMove,(A=x.throttleDelay)!==null&&A!==void 0?A:1e3/60),g.state={},g}return lB(b,v),aB(b,[{key:"componentDidMount",value:function(){var w,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,A=w.children,g=w.data,O=w.height,S=w.layout,j=mt(A,Wt);if(j){var E=j.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,_=cf(this.state,g,E,M),P=this.state.tooltipTicks[E].coordinate,I=(this.state.offset.top+O)/2,C=S==="horizontal",D=C?{x:P,y:I}:{y:P,x:I},k=this.state.formattedGraphicalItems.find(function(U){var V=U.item;return V.type.name==="Scatter"});k&&(D=z(z({},D),k.props.points[E].tooltipPosition),_=k.props.points[E].tooltipPayload);var B={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:M,activePayload:_,activeCoordinate:D};this.setState(B),this.renderCursor(j),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var g,O;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(w){cl([mt(w.children,Wt)],[mt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=mt(this.props.children,Wt);if(w&&typeof w.props.shared=="boolean"){var A=w.props.shared?"axis":"item";return s.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var A=this.container,g=A.getBoundingClientRect(),O=Tk(g),S={chartX:Math.round(w.pageX-O.left),chartY:Math.round(w.pageY-O.top)},j=g.width/A.offsetWidth||1,E=this.inRange(S.chartX,S.chartY,j);if(!E)return null;var M=this.state,_=M.xAxisMap,P=M.yAxisMap,I=this.getTooltipEventType(),C=wb(this.state,this.props.data,this.props.layout,E);if(I!=="axis"&&_&&P){var D=hr(_).scale,k=hr(P).scale,B=D&&D.invert?D.invert(S.chartX):null,U=k&&k.invert?k.invert(S.chartY):null;return z(z({},S),{},{xValue:B,yValue:U},C)}return C?z(z({},S),C):null}},{key:"inRange",value:function(w,A){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,S=w/g,j=A/g;if(O==="horizontal"||O==="vertical"){var E=this.state.offset,M=S>=E.left&&S<=E.left+E.width&&j>=E.top&&j<=E.top+E.height;return M?{x:S,y:j}:null}var _=this.state,P=_.angleAxisMap,I=_.radiusAxisMap;if(P&&I){var C=hr(P);return Em({x:S,y:j},C)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,A=this.getTooltipEventType(),g=mt(w,Wt),O={};g&&A==="axis"&&(g.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Bi(this.props,this.handleOuterEvent);return z(z({},S),O)}},{key:"addListener",value:function(){af.on(of,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){af.removeListener(of,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,A,g){for(var O=this.state.formattedGraphicalItems,S=0,j=O.length;S<j;S++){var E=O[S];if(E.item===w||E.props.key===w.key||A===Qt(E.item.type)&&g===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,A=this.state.offset,g=A.left,O=A.top,S=A.height,j=A.width;return T.createElement("defs",null,T.createElement("clipPath",{id:w},T.createElement("rect",{x:g,y:O,height:S,width:j})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(A,g){var O=pb(g,2),S=O[0],j=O[1];return z(z({},A),{},le({},S,j.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(A,g){var O=pb(g,2),S=O[0],j=O[1];return z(z({},A),{},le({},S,j.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(w){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(w){var A=this.state,g=A.formattedGraphicalItems,O=A.activeItem;if(g&&g.length)for(var S=0,j=g.length;S<j;S++){var E=g[S],M=E.props,_=E.item,P=_.type.defaultProps!==void 0?z(z({},_.type.defaultProps),_.props):_.props,I=Qt(_.type);if(I==="Bar"){var C=(M.data||[]).find(function(U){return c4(w,U)});if(C)return{graphicalItem:E,payload:C}}else if(I==="RadialBar"){var D=(M.data||[]).find(function(U){return Em(w,U)});if(D)return{graphicalItem:E,payload:D}}else if(ts(E,O)||rs(E,O)||ui(E,O)){var k=d8({graphicalItem:E,activeTooltipItem:O,itemData:P.data}),B=P.activeIndex===void 0?k:P.activeIndex;return{graphicalItem:z(z({},E),{},{childIndex:B}),payload:ui(E,O)?P.data[k]:E.props.data[k]}}}return null}},{key:"render",value:function(){var w=this;if(!cd(this))return null;var A=this.props,g=A.children,O=A.className,S=A.width,j=A.height,E=A.style,M=A.compact,_=A.title,P=A.desc,I=hb(A,J9),C=de(I,!1);if(M)return T.createElement(fg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(dl,ta({},C,{width:S,height:j,title:_,desc:P}),this.renderClipPath(),pd(g,this.renderMap)));if(this.props.accessibilityLayer){var D,k;C.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,C.role=(k=this.props.role)!==null&&k!==void 0?k:"application",C.onKeyDown=function(U){w.accessibilityManager.keyboardEvent(U)},C.onFocus=function(){w.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return T.createElement(fg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",ta({className:me("recharts-wrapper",O),style:z({position:"relative",cursor:"default",width:S,height:j},E)},B,{ref:function(V){w.container=V}}),T.createElement(dl,ta({},C,{width:S,height:j,title:_,desc:P,style:hB}),this.renderClipPath(),pd(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);le(m,"displayName",r),le(m,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),le(m,"getDerivedStateFromProps",function(v,b){var x=v.dataKey,w=v.data,A=v.children,g=v.width,O=v.height,S=v.layout,j=v.stackOffset,E=v.margin,M=b.dataStartIndex,_=b.dataEndIndex;if(b.updateId===void 0){var P=Ob(v);return z(z(z({},P),{},{updateId:0},h(z(z({props:v},P),{},{updateId:0}),b)),{},{prevDataKey:x,prevData:w,prevWidth:g,prevHeight:O,prevLayout:S,prevStackOffset:j,prevMargin:E,prevChildren:A})}if(x!==b.prevDataKey||w!==b.prevData||g!==b.prevWidth||O!==b.prevHeight||S!==b.prevLayout||j!==b.prevStackOffset||!cn(E,b.prevMargin)){var I=Ob(v),C={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},D=z(z({},wb(b,w,S)),{},{updateId:b.updateId+1}),k=z(z(z({},I),C),D);return z(z(z({},k),h(z({props:v},k),b)),{},{prevDataKey:x,prevData:w,prevWidth:g,prevHeight:O,prevLayout:S,prevStackOffset:j,prevMargin:E,prevChildren:A})}if(!cl(A,b.prevChildren)){var B,U,V,$,R=mt(A,In),F=R&&(B=(U=R.props)===null||U===void 0?void 0:U.startIndex)!==null&&B!==void 0?B:M,W=R&&(V=($=R.props)===null||$===void 0?void 0:$.endIndex)!==null&&V!==void 0?V:_,G=F!==M||W!==_,X=!fe(w),Q=X&&!G?b.updateId:b.updateId+1;return z(z({updateId:Q},h(z(z({props:v},b),{},{updateId:Q,dataStartIndex:F,dataEndIndex:W}),b)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:W})}return null}),le(m,"renderActiveDot",function(v,b,x){var w;return T.isValidElement(v)?w=T.cloneElement(v,b):pe(v)?w=v(b):w=T.createElement(Zo,b),T.createElement(xe,{className:"recharts-active-dot",key:x},w)});var y=T.forwardRef(function(b,x){return T.createElement(m,ta({},b,{ref:x}))});return y.displayName=m.displayName,y},AB=TB({chartName:"ComposedChart",GraphicalChild:[vi,Ar,Bn,Ts],axisComponents:[{axisType:"xAxis",AxisComp:Ps},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:LL});const na=({className:e,width:t,height:r,rounded:n=!1})=>p.jsx("div",{className:se("animate-pulse bg-gray-200",n?"rounded-full":"rounded",e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r}}),xi=({className:e})=>p.jsxs("div",{className:se("rounded-lg border border-gray-200 bg-white p-[16px]",e),children:[p.jsxs("div",{className:"flex items-center gap-2 mb-[12px]",children:[p.jsx(na,{className:"h-[16px] w-[64px]"}),p.jsx(na,{className:"h-[16px] w-[16px]",rounded:!0})]}),p.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[p.jsx(na,{className:"h-[32px] w-[80px]"}),p.jsx(na,{className:"h-[24px] w-[48px] rounded-md"})]})]}),Tb=({className:e,chartType:t="line",height:r=300})=>{const n=o=>{if(o.length===0)return"";let s=`M ${o[0].x} ${o[0].y}`;for(let l=1;l<o.length;l++){const u=o[l-1],c=o[l],f=u.x+(c.x-u.x)*.4,d=u.y,h=u.x+(c.x-u.x)*.6,m=c.y;s+=` C ${f} ${d} ${h} ${m} ${c.x} ${c.y}`}return s},a=(o=7)=>Array.from({length:o},(c,f)=>({x:f/(o-1)*100,y:80-Math.random()*60})),i=()=>{switch(t){case"bar":return p.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-[16px] pb-[16px]",children:[...Array(7)].map((v,b)=>p.jsx(na,{className:"w-[32px] bg-blue-100",height:`${Math.random()*60+20}%`},b))});case"line":const o=a(12),s=n(o),l=o[o.length-1],u=o[0],c=`${s} L ${l.x} 100 L ${u.x} 100 Z`;return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),p.jsx("path",{d:s,stroke:"url(#skeleton-line-shimmer)",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"area":const f=a(),d=n(f),h=f[f.length-1],m=f[0],y=`${d} L ${h.x} 90 L ${m.x} 90 Z`;return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:y,fill:"url(#skeleton-area-gradient)"}),p.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return p.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-[16px]",children:p.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[p.jsxs("defs",{children:[p.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:p.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:p.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:p.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-4)",strokeWidth:"3",strokeDasharray:"15 85",strokeDashoffset:"110"})]})});default:return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("div",{className:"w-full h-full relative",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:p.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),p.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((v,b)=>p.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${b*.2}s`}},b))})]})})}};return p.jsx("div",{className:se("w-full",e),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative",style:{height:`${r}px`},children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&p.jsxs("div",{className:"ml-[56px] flex justify-between items-center mt-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-[12px] mt-[8px]",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[256px]"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-[8px] h-[8px] bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded flex-1"})]})]})]})})},PB=({active:e,payload:t,label:r,config:n})=>{var o;if(!e||!t||!t.length)return null;const a=t.filter(s=>s.name&&s.name!==""&&s.name!==s.dataKey);if(a.length===0)return null;const i=((o=n.tooltip)==null?void 0:o.style)==="dark";return p.jsxs("div",{className:se("rounded-lg border px-[12px] py-[8px] text-xs shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[p.jsx("div",{className:se("font-medium mb-[8px]",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),p.jsx("div",{className:"space-y-1",children:a.map((s,l)=>p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:s.color}}),p.jsx("span",{className:se("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),p.jsx("span",{className:se("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},Ab=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var g,O;const{data:a,dataKey:i,color:o="#3b82f6",lines:s,dateRange:l,yAxisLabel:u,height:c=300,tooltip:f={show:!0,style:"dark"}}=e,h=(S=>{if(!S||S.length===0)return[];const j=[...S].sort((C,D)=>{const k=new Date(C.date),B=new Date(D.date);return k.getTime()-B.getTime()});let E,M;l!=null&&l.start&&(l!=null&&l.end)?(E=new Date(l.start),M=new Date(l.end)):(E=new Date(j[0].date),M=new Date(j[j.length-1].date));const _=new Map;j.forEach(C=>{_.set(C.date,C)});const P=[],I=new Date(E);for(;I<=M;){const C=I.toISOString().split("T")[0];if(_.has(C))P.push(_.get(C));else{const D={date:C,users:0,sessions:0,messages:0,totalTokens:0,inputTokens:0,outputTokens:0,agentRuns:0,toolRuns:0,modelRuns:0,codeTools:0,workflowTools:0,knowledgeTools:0,mcpTools:0,value:0,count:0};if(j.length>0){const k=j[0];Object.keys(k).forEach(B=>{typeof k[B]=="number"&&!(B in D)&&(D[B]=0)})}P.push(D)}I.setDate(I.getDate()+1)}return P})(a),m=S=>{const j=new Date(S);return isNaN(j.getTime())?S:j.toLocaleDateString("en-US",{month:"short",day:"numeric"})},y=()=>{if(!h||h.length===0)return 0;const S=h.length;return S<=20?0:S<=31?1:S<=61?2:Math.floor(S/7)-1},v=S=>b()&&!Number.isInteger(S)?"":S>=1e3?`${Math.floor(S/1e3)}k`:Math.floor(S).toString(),b=()=>{const S=["users","sessions","messages","runs","agents","tools","models","Number of Users","Number of Sessions","Number of Messages","Number of Agent Runs","Number of Tool Runs","Number of Model Runs","agentRuns","toolRuns","modelRuns"];return!!(u&&S.some(j=>u.toLowerCase().includes(j.toLowerCase()))||i&&S.some(j=>i.toLowerCase().includes(j.toLowerCase()))||e.title&&S.some(j=>e.title.toLowerCase().includes(j.toLowerCase()))||s&&s.some(j=>j.label&&S.some(E=>j.label.toLowerCase().includes(E.toLowerCase()))))},w=s&&s.length>0?s:[{dataKey:i||"value",color:o,label:e.title,strokeWidth:2}];if(r)return console.log("AnalyticsChart: Loading state active"),p.jsx(Tb,{className:t,chartType:e.type,height:c});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),p.jsx("div",{className:se("w-full",t),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative h-[300px] mb-6",children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[p.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:p.jsx("svg",{className:"w-6 h-6 !h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),p.jsxs("div",{className:"text-center max-w-[352px]",children:[p.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),p.jsx("p",{className:"font-normal text-center text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),p.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const A=S=>{var E;if(!n||!S||!S.activePayload)return;const j=(E=S.activePayload[0])==null?void 0:E.payload;j&&j.date&&(console.log("Chart data point clicked:",{date:j.date,data:j}),n(j,j.date))};return console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart original data length:",a==null?void 0:a.length),console.log("AnalyticsChart filled data length:",h.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",h.length>0?{first:(g=h[0])==null?void 0:g.date,last:(O=h[h.length-1])==null?void 0:O.date,totalDays:h.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",w),console.log("Sample filled data points:",h.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),p.jsxs("div",{className:se("w-full",t),children:[p.jsx("div",{className:"relative bg-gray-50/30",children:p.jsx(yk,{width:"100%",height:c,children:p.jsxs(AB,{data:h,onClick:A,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:w.map((S,j)=>p.jsxs("linearGradient",{id:`gradient-${S.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:S.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:S.color,stopOpacity:.01})]},`gradient-${j}`))}),p.jsx(Lg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),p.jsx(Ps,{dataKey:"date",tickFormatter:m,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:y()}),p.jsx(_s,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:v,tickMargin:10,allowDecimals:!b(),domain:b()?["dataMin","dataMax"]:void 0,label:u?{value:u,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),f.show&&p.jsx(Wt,{content:S=>p.jsx(PB,{...S,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),w.map(S=>p.jsx(Ar,{type:"monotone",dataKey:S.dataKey,stroke:"none",fill:`url(#gradient-${S.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${S.dataKey}`)),w.map(S=>p.jsx(vi,{type:"monotone",dataKey:S.dataKey,stroke:S.color,strokeWidth:2.5,strokeDasharray:S.strokeDasharray,dot:!1,activeDot:{r:5,fill:S.color,stroke:S.color,strokeWidth:2},name:S.label},S.dataKey))]})})}),p.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[p.jsx("div",{children:l&&p.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-[4px]",children:[p.jsx("span",{className:"text-gray-500",children:"Showing data from"}),p.jsxs("span",{className:"font-medium text-gray-700",children:[new Date(l.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(l.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})]})}),p.jsx("div",{className:"flex items-center gap-4",children:p.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:w.map(S=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:S.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:S.label})]},S.dataKey))})})]})]})},Pb=({config:e,className:t})=>{const{title:r,data:n,columns:a,pagination:i={enabled:!0,pageSize:10},sorting:o={enabled:!0},filtering:s={enabled:!0,searchable:!0}}=e,[l,u]=T.useState(o.defaultSort||null),[c,f]=T.useState(""),[d,h]=T.useState(1),m=T.useMemo(()=>{let g=[...n];return s.searchable&&c&&(g=g.filter(O=>a.some(S=>{const j=O[S.key];return j==null?void 0:j.toString().toLowerCase().includes(c.toLowerCase())}))),l&&g.sort((O,S)=>{const j=O[l.key],E=S[l.key];if(typeof j=="number"&&typeof E=="number")return l.order==="asc"?j-E:E-j;const M=(j==null?void 0:j.toString())||"",_=(E==null?void 0:E.toString())||"",P=M.localeCompare(_);return l.order==="asc"?P:-P}),g},[n,a,c,l,s.searchable]),y=i.enabled?Math.ceil(m.length/i.pageSize):1,v=i.enabled?m.slice((d-1)*i.pageSize,d*i.pageSize):m,b=g=>{!o.enabled||!g.sortable||u(O=>(O==null?void 0:O.key)===g.key?O.order==="asc"?{key:g.key,order:"desc"}:null:{key:g.key,order:"asc"})},x=g=>{f(g),h(1)},w=(g,O,S)=>O.render?O.render(g,S):O.formatter?O.formatter(g,S):typeof g=="number"?g.toLocaleString():(g==null?void 0:g.toString())||"-",A=g=>!o.enabled||!g.sortable?null:(l==null?void 0:l.key)===g.key?l.order==="asc"?p.jsx(Sf,{className:"w-[16px] h-[16px]"}):p.jsx(cr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(Sf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(cr,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsx("h3",{className:"text-md font-medium text-gray-700",children:r}),s.enabled&&s.searchable&&p.jsxs("div",{className:"relative",children:[p.jsx(_f,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),p.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:g=>x(g.target.value),className:"pl-[36px] pr-[12px] py-[8px] border border-gray-200 rounded-lg text-xs focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),p.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:p.jsxs("table",{className:"w-full",children:[p.jsx("thead",{className:"bg-gray-50",children:p.jsx("tr",{children:a.map(g=>p.jsx("th",{className:se("px-[16px] py-[12px] text-left text-xs font-medium text-gray-500 uppercase tracking-wider",g.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",g.align==="center"&&"text-center",g.align==="right"&&"text-right"),style:{width:g.width},onClick:()=>b(g),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{children:g.title}),A(g)]})},g.key))})}),p.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:v.map((g,O)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(S=>p.jsx("td",{className:se("px-[16px] py-[12px] text-xs text-gray-900",S.align==="center"&&"text-center",S.align==="right"&&"text-right"),children:w(g[S.key],S,g)},S.key))},O))})]})}),i.enabled&&y>1&&p.jsxs("div",{className:"flex items-center justify-between mt-4",children:[p.jsxs("div",{className:"text-xs text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,m.length)," of"," ",m.length," results"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>h(g=>Math.max(1,g-1)),disabled:d===1,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,y)},(g,O)=>{const S=Math.max(1,Math.min(y-4,d-2))+O;return S>y?null:p.jsx("button",{onClick:()=>h(S),className:se("px-[12px] py-[4px] text-xs border rounded",d===S?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:S},S)}),p.jsx("button",{onClick:()=>h(g=>Math.min(y,g+1)),disabled:d===y,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),v.length===0&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:c?"No results found for your search.":"No data available."})]})},jB=(e,t)=>{switch(e){case"human":return t==="agent"?"agent-avatars":"avatars";case"logo":return"profileLogos";case"icon":case"inlineTool":case"toolLibrary":case"KNOWLEDGE":case"MCP":return"profileIcons";case void 0:default:return t==="agent"?"agent-avatars":"avatars"}},_B=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},EB=(e,t)=>{const r=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#84CC16"],n=e.split("").reduce((a,i)=>a+i.charCodeAt(0),0)%r.length;if(t==="workflowtool"){const a=e.toLowerCase();let i="toolLibrary";return a.includes("code")||a.includes("inline")||a.includes("calculate")?i="inlineTool":a.includes("knowledge")||a.includes("document")||a.includes("fetch")?i="KNOWLEDGE":(a.includes("mcp")||a.includes("protocol"))&&(i="MCP"),{name:"fallback",type:i,color:r[n]}}return t==="model"?{name:"fallback",type:"icon",color:r[n]}:{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},CB=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=window.location.origin,n=jB(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},jb=e=>{if(!e)return"assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},$B={xs:"w-6 h-6 text-xs",small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-base",large:"w-12 h-12 text-lg"},Rt={inlineTool:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3533_7514)">
249
+ A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t,",").concat(r+a-s*m," Z")}else u="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return u},f4=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=c&&n<=u&&a>=f&&a<=d}return!1},d4={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},wu=function(t){var r=Py(Py({},d4),t),n=T.useRef(),a=T.useState(-1),i=n4(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&s(A)}catch{}},[]);var l=r.x,c=r.y,u=r.width,f=r.height,d=r.radius,h=r.className,m=r.animationEasing,g=r.animationDuration,v=r.animationBegin,x=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var w=me("recharts-rectangle",h);return b?T.createElement(Dt,{canBegin:o>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:g,animationEasing:m,isActive:b},function(A){var y=A.width,O=A.height,S=A.x,P=A.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:x,easing:m},T.createElement("path",Jo({},de(r,!0),{className:w,d:jy(S,P,y,O,d),ref:n})))}):T.createElement("path",Jo({},de(r,!0),{className:w,d:jy(l,c,u,f,d)}))};function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ou.apply(this,arguments)}var Zo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=me("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",Ou({},de(t,!1),Bi(t),{className:o,cx:r,cy:n,r:a})):null};function oi(e){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(e)}var p4=["x","y","top","left","width","height","className"];function Su(){return Su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Su.apply(this,arguments)}function _y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function h4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(r),!0).forEach(function(n){v4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v4(e,t,r){return t=m4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m4(e){var t=y4(e,"string");return oi(t)=="symbol"?t:t+""}function y4(e,t){if(oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function g4(e,t){if(e==null)return{};var r=b4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var x4=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},w4=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,u=t.width,f=u===void 0?0:u,d=t.height,h=d===void 0?0:d,m=t.className,g=g4(t,p4),v=h4({x:n,y:i,top:s,left:c,width:f,height:h},g);return!J(n)||!J(i)||!J(f)||!J(h)||!J(s)||!J(c)?null:T.createElement("path",Su({},de(v,!0),{className:me("recharts-cross",m),d:x4(n,i,f,h,s,c)}))},O4=up,S4=O4(Object.getPrototypeOf,Object),T4=S4,A4=Jt,P4=T4,j4=Zt,_4="[object Object]",E4=Function.prototype,C4=Object.prototype,Ey=E4.toString,$4=C4.hasOwnProperty,k4=Ey.call(Object);function M4(e){if(!j4(e)||A4(e)!=_4)return!1;var t=P4(e);if(t===null)return!0;var r=$4.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ey.call(r)==k4}var N4=M4;const D4=$e(N4);var I4=Jt,L4=Zt,R4="[object Boolean]";function B4(e){return e===!0||e===!1||L4(e)&&I4(e)==R4}var F4=B4;const W4=$e(F4);function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qo.apply(this,arguments)}function U4(e,t){return q4(e)||G4(e,t)||V4(e,t)||z4()}function z4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
250
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V4(e,t){if(e){if(typeof e=="string")return Cy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cy(e,t)}}function Cy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G4(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function q4(e){if(Array.isArray(e))return e}function $y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ky(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$y(Object(r),!0).forEach(function(n){K4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K4(e,t,r){return t=H4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H4(e){var t=Y4(e,"string");return si(t)=="symbol"?t:t+""}function Y4(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var My=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},X4={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},J4=function(t){var r=ky(ky({},X4),t),n=T.useRef(),a=T.useState(-1),i=U4(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var l=r.x,c=r.y,u=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,m=r.animationEasing,g=r.animationDuration,v=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||d!==+d||u===0&&f===0||d===0)return null;var b=me("recharts-trapezoid",h);return x?T.createElement(Dt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:d,x:l,y:c},duration:g,animationEasing:m,isActive:x},function(w){var A=w.upperWidth,y=w.lowerWidth,O=w.height,S=w.x,P=w.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:m},T.createElement("path",Qo({},de(r,!0),{className:b,d:My(S,P,A,y,O),ref:n})))}):T.createElement("g",null,T.createElement("path",Qo({},de(r,!0),{className:b,d:My(l,c,u,f,d)})))},Z4=["option","shapeType","propTransformer","activeClassName","isActive"];function li(e){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(e)}function Q4(e,t){if(e==null)return{};var r=e8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function e8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ny(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ny(Object(r),!0).forEach(function(n){t8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ny(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t8(e,t,r){return t=r8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r8(e){var t=n8(e,"string");return li(t)=="symbol"?t:t+""}function n8(e,t){if(li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a8(e,t){return es(es({},t),e)}function i8(e,t){return e==="symbols"}function Dy(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return T.createElement(wu,r);case"trapezoid":return T.createElement(J4,r);case"sector":return T.createElement(Rm,r);case"symbols":if(i8(t))return T.createElement(Xi,r);break;default:return null}}function o8(e){return T.isValidElement(e)?e.props:e}function Tu(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?a8:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=Q4(e,Z4),c;if(T.isValidElement(t))c=T.cloneElement(t,es(es({},l),o8(t)));else if(pe(t))c=t(l);else if(D4(t)&&!W4(t)){var u=a(t,l);c=T.createElement(Dy,{shapeType:r,elementProps:u})}else{var f=l;c=T.createElement(Dy,{shapeType:r,elementProps:f})}return s?T.createElement(xe,{className:o},c):c}function ts(e,t){return t!=null&&"trapezoids"in e.props}function rs(e,t){return t!=null&&"sectors"in e.props}function ci(e,t){return t!=null&&"points"in e.props}function s8(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function l8(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function c8(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function u8(e,t){var r;return ts(e,t)?r=s8:rs(e,t)?r=l8:ci(e,t)&&(r=c8),r}function f8(e,t){var r;return ts(e,t)?r="trapezoids":rs(e,t)?r="sectors":ci(e,t)&&(r="points"),r}function d8(e,t){if(ts(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(rs(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return ci(e,t)?t.payload:{}}function p8(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=f8(r,t),i=d8(r,t),o=n.filter(function(l,c){var u=Fr(i,l),f=r.props[a].filter(function(m){var g=u8(r,t);return g(m,t)}),d=r.props[a].indexOf(f[f.length-1]),h=c===d;return u&&h}),s=n.indexOf(o[o.length-1]);return s}var h8=Math.ceil,v8=Math.max;function m8(e,t,r,n){for(var a=-1,i=v8(h8((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var y8=m8,g8=lh,Iy=1/0,b8=17976931348623157e292;function x8(e){if(!e)return e===0?e:0;if(e=g8(e),e===Iy||e===-Iy){var t=e<0?-1:1;return t*b8}return e===e?e:0}var Ly=x8,w8=y8,O8=io,Au=Ly;function S8(e){return function(t,r,n){return n&&typeof n!="number"&&O8(t,r,n)&&(r=n=void 0),t=Au(t),r===void 0?(r=t,t=0):r=Au(r),n=n===void 0?t<r?1:-1:Au(n),w8(t,r,n,e)}}var T8=S8,A8=T8,P8=A8(),j8=P8;const ns=$e(j8);function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function Ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function By(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ry(Object(r),!0).forEach(function(n){Fy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fy(e,t,r){return t=_8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _8(e){var t=E8(e,"string");return ui(t)=="symbol"?t:t+""}function E8(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C8=["Webkit","Moz","O","ms"],$8=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=C8.reduce(function(i,o){return By(By({},i),{},Fy({},o+n,r))},{});return a[t]=r,a};function Dn(e){"@babel/helpers - typeof";return Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}function as(){return as=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},as.apply(this,arguments)}function Wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wy(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vy(n.key),n)}}function M8(e,t,r){return t&&Uy(e.prototype,t),r&&Uy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N8(e,t,r){return t=is(t),D8(e,zy()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function D8(e,t){if(t&&(Dn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I8(e)}function I8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zy=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function L8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ju(e,t)}function ju(e,t){return ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ju(e,t)}function gt(e,t,r){return t=Vy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vy(e){var t=R8(e,"string");return Dn(t)=="symbol"?t:t+""}function R8(e,t){if(Dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B8=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,c=Ca().domain(ns(0,l)).range([i,i+o-s]),u=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(a),scale:c,scaleValues:u}},Gy=function(t){return t.changedTouches&&!!t.changedTouches.length},In=function(e){function t(r){var n;return k8(this,t),n=N8(this,t,[r]),gt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),gt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),gt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),gt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),gt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),gt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),gt(n,"handleSlideDragStart",function(a){var i=Gy(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return L8(t,e),M8(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(o,f),m=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:m===u?u:m-m%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Ze(i[n],s,n);return pe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,m=l.onChange,g=n.pageX-i;g>0?g=Math.min(g,c+u-f-s,c+u-f-o):g<0&&(g=Math.max(g,c-o,c-s));var v=this.getIndex({startX:o+g,endX:s+g});(v.startIndex!==d||v.endIndex!==h)&&m&&m(v),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Gy(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,c=this.state[o],u=this.props,f=u.x,d=u.width,h=u.travellerWidth,m=u.onChange,g=u.gap,v=u.data,x={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,f+d-h-c):b<0&&(b=Math.max(b,f-c)),x[o]=c+b;var w=this.getIndex(x),A=w.startIndex,y=w.endIndex,O=function(){var P=v.length-1;return o==="startX"&&(s>l?A%g===0:y%g===0)||s<l&&y===P||o==="endX"&&(s>l?y%g===0:A%g===0)||s>l&&y===P};this.setState(gt(gt({},o,c+b),"brushMoveStartX",n.pageX),function(){m&&O()&&m(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,u=this.state[a],f=s.indexOf(u);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=c||a==="endX"&&h<=l||this.setState(gt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,c=n.stroke;return T.createElement("rect",{stroke:c,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,c=n.children,u=n.padding,f=T.Children.only(c);return f?T.cloneElement(f,{x:a,y:i,width:o,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,c=l.y,u=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,m=l.data,g=l.startIndex,v=l.endIndex,x=Math.max(n,this.props.x),b=Pu(Pu({},de(this.props,!1)),{},{x,y:c,width:u,height:f}),w=h||"Min value: ".concat((i=m[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=m[v])===null||o===void 0?void 0:o.name);return T.createElement(xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(y){["ArrowLeft","ArrowRight"].includes(y.key)&&(y.preventDefault(),y.stopPropagation(),s.handleTravellerMoveKeyboard(y.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(n,a)+c,f=Math.max(Math.abs(a-n)-c,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,c=n.stroke,u=this.state,f=u.startX,d=u.endX,h=5,m={pointerEvents:"none",fill:c};return T.createElement(xe,{className:"recharts-brush-texts"},T.createElement(po,as({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},m),this.getTextOfTick(a)),T.createElement(po,as({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,c=n.width,u=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,m=d.endX,g=d.isTextActive,v=d.isSlideMoving,x=d.isTravellerMoving,b=d.isTravellerFocused;if(!a||!a.length||!J(s)||!J(l)||!J(c)||!J(u)||c<=0||u<=0)return null;var w=me("recharts-brush",i),A=T.Children.count(o)===1,y=$8("userSelect","none");return T.createElement(xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(g||v||x||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,c=Math.floor(i+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),T.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:c+2,x2:a+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return T.isValidElement(n)?i=T.cloneElement(n,a):pe(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,c=n.updateId,u=n.startIndex,f=n.endIndex;if(i!==a.prevData||c!==a.prevUpdateId)return Pu({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},i&&i.length?B8({data:i,width:o,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(T.PureComponent);gt(In,"displayName","Brush"),gt(In,"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 F8=zl;function W8(e,t){var r;return F8(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var U8=W8,z8=Yd,V8=vr,G8=U8,q8=ft,K8=io;function H8(e,t,r){var n=q8(e)?z8:G8;return r&&K8(e,t,r)&&(t=void 0),n(e,V8(t))}var Y8=H8;const X8=$e(Y8);var qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},qy=Gp;function J8(e,t,r){t=="__proto__"&&qy?qy(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Z8=J8,Q8=Z8,eL=Wp,tL=vr;function rL(e,t){var r={};return t=tL(t),eL(e,function(n,a,i){Q8(r,a,t(n,a,i))}),r}var nL=rL;const aL=$e(nL);function iL(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var oL=iL,sL=zl;function lL(e,t){var r=!0;return sL(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var cL=lL,uL=oL,fL=cL,dL=vr,pL=ft,hL=io;function vL(e,t,r){var n=pL(e)?uL:fL;return r&&hL(e,t,r)&&(t=void 0),n(e,dL(t))}var mL=vL;const Ky=$e(mL);var yL=["x","y"];function Ln(e){"@babel/helpers - typeof";return Ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ln(e)}function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_u.apply(this,arguments)}function Hy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hy(Object(r),!0).forEach(function(n){gL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gL(e,t,r){return t=bL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bL(e){var t=xL(e,"string");return Ln(t)=="symbol"?t:t+""}function xL(e,t){if(Ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wL(e,t){if(e==null)return{};var r=OL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function SL(e,t){var r=e.x,n=e.y,a=wL(e,yL),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||a.height),u=parseInt(c,10),f="".concat(t.width||a.width),d=parseInt(f,10);return fi(fi(fi(fi(fi({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:d,name:t.name,radius:t.radius})}function Yy(e){return T.createElement(Tu,_u({shapeType:"rectangle",propTransformer:SL,activeClassName:"recharts-active-bar"},e))}var TL=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=J(n)||IO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(Ln(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},AL=["value","background"],Xy;function Rn(e){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(e)}function PL(e,t){if(e==null)return{};var r=jL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function os(){return os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},os.apply(this,arguments)}function Jy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jy(Object(r),!0).forEach(function(n){Sr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eg(n.key),n)}}function EL(e,t,r){return t&&Zy(e.prototype,t),r&&Zy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CL(e,t,r){return t=ss(t),$L(e,Qy()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function $L(e,t){if(t&&(Rn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kL(e)}function kL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qy=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function ML(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eu(e,t)}function Eu(e,t){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Eu(e,t)}function Sr(e,t,r){return t=eg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eg(e){var t=NL(e,"string");return Rn(t)=="symbol"?t:t+""}function NL(e,t){if(Rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bn=function(e){function t(){var r;_L(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=CL(this,t,[].concat(a)),Sr(r,"state",{isAnimationFinished:!1}),Sr(r,"id",$r("recharts-bar-")),Sr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Sr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return ML(t,e),EL(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,c=i.activeBar,u=de(this.props,!1);return n&&n.map(function(f,d){var h=d===l,m=h?c:o,g=He(He(He({},u),f),{},{isActive:h,option:m,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(xe,os({className:"recharts-bar-rectangle"},ma(a.props,f,d),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(d)}),T.createElement(Yy,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state.prevData;return T.createElement(Dt,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,g=i.map(function(v,x){var b=d&&d[x];if(b){var w=ze(b.x,v.x),A=ze(b.y,v.y),y=ze(b.width,v.width),O=ze(b.height,v.height);return He(He({},v),{},{x:w(m),y:A(m),width:y(m),height:O(m)})}if(o==="horizontal"){var S=ze(0,v.height),P=S(m);return He(He({},v),{},{y:v.y+v.height-P,height:P})}var $=ze(0,v.width),N=$(m);return He(He({},v),{},{width:N})});return T.createElement(xe,null,n.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Fr(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=de(this.props.background,!1);return i.map(function(c,u){c.value;var f=c.background,d=PL(c,AL);if(!f)return null;var h=He(He(He(He(He({},d),{},{fill:"#eee"},f),l),ma(n.props,c,u)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return T.createElement(Yy,os({key:"background-bar-".concat(u),option:n.props.background,isActive:u===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,f=dt(u,$n);if(!f)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(v,x){var b=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:b,errorVal:Ze(v,x)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,m,f.map(function(g){return T.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,c=n.left,u=n.top,f=n.width,d=n.height,h=n.isAnimationActive,m=n.background,g=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,x=me("recharts-bar",o),b=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,A=b||w,y=fe(g)?this.id:g;return T.createElement(xe,{className:x},b||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(y)},T.createElement("rect",{x:b?c:c-f/2,y:w?u:u-d/2,width:b?f:f*2,height:w?d:d*2}))):null,T.createElement(xe,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(y,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,y),(!h||v)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(T.PureComponent);Xy=Bn,Sr(Bn,"displayName","Bar"),Sr(Bn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!mr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Sr(Bn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,d=e.offset,h=oI(n,r);if(!h)return null;var m=t.layout,g=r.type.defaultProps,v=g!==void 0?He(He({},g),r.props):r.props,x=v.dataKey,b=v.children,w=v.minPointSize,A=m==="horizontal"?o:i,y=c?A.scale.domain():null,O=hI({numericAxis:A}),S=dt(b,Ql),P=f.map(function($,N){var j,C,k,_,D,M;c?j=sI(c[u+N],y):(j=Ze($,x),Array.isArray(j)||(j=[O,j]));var B=TL(w,Xy.defaultProps.minPointSize)(j[1],N);if(m==="horizontal"){var U,V=[o.scale(j[0]),o.scale(j[1])],E=V[0],R=V[1];C=wm({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:$,index:N}),k=(U=R??E)!==null&&U!==void 0?U:void 0,_=h.size;var F=E-R;if(D=Number.isNaN(F)?0:F,M={x:C,y:o.y,width:_,height:o.height},Math.abs(B)>0&&Math.abs(D)<Math.abs(B)){var W=$t(D||B)*(Math.abs(B)-Math.abs(D));k-=W,D+=W}}else{var G=[i.scale(j[0]),i.scale(j[1])],X=G[0],Q=G[1];if(C=X,k=wm({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:$,index:N}),_=Q-X,D=h.size,M={x:i.x,y:k,width:i.width,height:D},Math.abs(B)>0&&Math.abs(_)<Math.abs(B)){var ae=$t(_||B)*(Math.abs(B)-Math.abs(_));_+=ae}}return He(He(He({},$),{},{x:C,y:k,width:_,height:D,value:c?j:j[1],payload:$,background:M},S&&S[N]&&S[N].props),{},{tooltipPayload:[Pm(r,$)],tooltipPosition:{x:C+_/2,y:k+D/2}})});return He({data:P,layout:m},d)});function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}function DL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ng(n.key),n)}}function IL(e,t,r){return t&&tg(e.prototype,t),r&&tg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ls(e,t,r){return t=ng(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ng(e){var t=LL(e,"string");return di(t)=="symbol"?t:t+""}function LL(e,t){if(di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RL=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!mt(c,Bn);return u.reduce(function(h,m){var g=r[m],v=g.orientation,x=g.domain,b=g.padding,w=b===void 0?{}:b,A=g.mirror,y=g.reversed,O="".concat(v).concat(A?"Mirror":""),S,P,$,N,j;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var C=x[1]-x[0],k=1/0,_=g.categoricalDomain.sort(FO);if(_.forEach(function(G,X){X>0&&(k=Math.min((G||0)-(_[X-1]||0),k))}),Number.isFinite(k)){var D=k/C,M=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(S=D*M/2),g.padding==="no-gap"){var B=kr(t.barCategoryGap,D*M),U=D*M/2;S=U-B-(U-B)/M*B}}}a==="xAxis"?P=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:a==="yAxis"?P=l==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(S||0),n.top+n.height-(w.bottom||0)-(S||0)]:P=g.range,y&&(P=[P[1],P[0]]);var V=aI(g,i,d),E=V.scale,R=V.realScaleType;E.domain(x).range(P),iI(E);var F=pI(E,It(It({},g),{},{realScaleType:R}));a==="xAxis"?(j=v==="top"&&!A||v==="bottom"&&A,$=n.left,N=f[O]-j*g.height):a==="yAxis"&&(j=v==="left"&&!A||v==="right"&&A,$=f[O]-j*g.width,N=n.top);var W=It(It(It({},g),F),{},{realScaleType:R,x:$,y:N,scale:E,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return W.bandSize=Fo(W,F),!g.hide&&a==="xAxis"?f[O]+=(j?-1:1)*W.height:g.hide||(f[O]+=(j?-1:1)*W.width),It(It({},h),{},ls({},m,W))},{})},ag=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},BL=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return ag({x:r,y:n},{x:a,y:i})},ig=function(){function e(t){DL(this,e),this.scale=t}return IL(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();ls(ig,"EPS",1e-4);var Cu=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},ls({},a,ig.create(t[a])))},{});return It(It({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return aL(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Ky(a,function(i,o){return r[o].isInRange(i)})}})};function FL(e){return(e%180+180)%180}var WL=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=FL(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},UL=vr,zL=ba,VL=to;function GL(e){return function(t,r,n){var a=Object(t);if(!zL(t)){var i=UL(r);t=VL(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var qL=GL,KL=Ly;function HL(e){var t=KL(e),r=t%1;return t===t?r?t-r:t:0}var YL=HL,XL=Ep,JL=vr,ZL=YL,QL=Math.max;function eR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:ZL(r);return a<0&&(a=QL(n+a,0)),XL(e,JL(t),a)}var tR=eR,rR=qL,nR=tR,aR=rR(nR),iR=aR;const oR=$e(iR);var sR=Uw(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function cs(e){"@babel/helpers - typeof";return cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(e)}var $u=T.createContext(void 0),ku=T.createContext(void 0),og=T.createContext(void 0),sg=T.createContext({}),lg=T.createContext(void 0),cg=T.createContext(0),ug=T.createContext(0),fg=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,u=sR(i);return T.createElement($u.Provider,{value:n},T.createElement(ku.Provider,{value:a},T.createElement(sg.Provider,{value:i},T.createElement(og.Provider,{value:u},T.createElement(lg.Provider,{value:o},T.createElement(cg.Provider,{value:c},T.createElement(ug.Provider,{value:l},s)))))))},lR=function(){return T.useContext(lg)};function dg(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var pg=function(t){var r=T.useContext($u);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(cs(t),"]. ").concat(dg(r))):ht()),n},cR=function(){var t=T.useContext($u);return hr(t)},uR=function(){var t=T.useContext(ku),r=oR(t,function(n){return Ky(n.domain,Number.isFinite)});return r||hr(t)},hg=function(t){var r=T.useContext(ku);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(cs(t),"]. ").concat(dg(r))):ht()),n},fR=function(){var t=T.useContext(og);return t},dR=function(){return T.useContext(sg)},Mu=function(){return T.useContext(ug)},Nu=function(){return T.useContext(cg)};function Fn(e){"@babel/helpers - typeof";return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function pR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gg(n.key),n)}}function vR(e,t,r){return t&&hR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mR(e,t,r){return t=us(t),yR(e,vg()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function yR(e,t){if(t&&(Fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gR(e)}function gR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vg=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function bR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Du(e,t)}function Du(e,t){return Du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Du(e,t)}function mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mg(Object(r),!0).forEach(function(n){Iu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iu(e,t,r){return t=gg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gg(e){var t=xR(e,"string");return Fn(t)=="symbol"?t:t+""}function xR(e,t){if(Fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wR(e,t){return AR(e)||TR(e,t)||SR(e,t)||OR()}function OR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
251
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SR(e,t){if(e){if(typeof e=="string")return bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bg(e,t)}}function bg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function AR(e){if(Array.isArray(e))return e}function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lu.apply(this,arguments)}var PR=function(t,r){var n;return T.isValidElement(t)?n=T.cloneElement(t,r):pe(t)?n=t(r):n=T.createElement("line",Lu({},r,{className:"recharts-reference-line-line"})),n},jR=function(t,r,n,a,i,o,s,l,c){var u=i.x,f=i.y,d=i.width,h=i.height;if(n){var m=c.y,g=t.y.apply(m,{position:o});if(qt(c,"discard")&&!t.y.isInRange(g))return null;var v=[{x:u+d,y:g},{x:u,y:g}];return l==="left"?v.reverse():v}if(r){var x=c.x,b=t.x.apply(x,{position:o});if(qt(c,"discard")&&!t.x.isInRange(b))return null;var w=[{x:b,y:f+h},{x:b,y:f}];return s==="top"?w.reverse():w}if(a){var A=c.segment,y=A.map(function(O){return t.apply(O,{position:o})});return qt(c,"discard")&&X8(y,function(O){return!t.isInRange(O)})?null:y}return null};function _R(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=lR(),u=pg(a),f=hg(i),d=fR();if(!c||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Cu({x:u.scale,y:f.scale}),m=Xe(t),g=Xe(r),v=n&&n.length===2,x=jR(h,m,g,v,d,e.position,u.orientation,f.orientation,e);if(!x)return null;var b=wR(x,2),w=b[0],A=w.x,y=w.y,O=b[1],S=O.x,P=O.y,$=qt(e,"hidden")?"url(#".concat(c,")"):void 0,N=yg(yg({clipPath:$},de(e,!0)),{},{x1:A,y1:y,x2:S,y2:P});return T.createElement(xe,{className:me("recharts-reference-line",s)},PR(o,N),it.renderCallByParent(e,BL({x1:A,y1:y,x2:S,y2:P})))}var Ru=function(e){function t(){return pR(this,t),mR(this,t,arguments)}return bR(t,e),vR(t,[{key:"render",value:function(){return T.createElement(_R,this.props)}}])}(T.Component);Iu(Ru,"displayName","ReferenceLine"),Iu(Ru,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Bu(){return Bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bu.apply(this,arguments)}function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ER(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sg(n.key),n)}}function $R(e,t,r){return t&&CR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kR(e,t,r){return t=fs(t),MR(e,Og()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function MR(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NR(e)}function NR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Og(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Og=function(){return!!e})()}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}function DR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fu(e,t)}function Fu(e,t){return Fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fu(e,t)}function ds(e,t,r){return t=Sg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sg(e){var t=IR(e,"string");return Wn(t)=="symbol"?t:t+""}function IR(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var LR=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Cu({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return qt(t,"discard")&&!o.isInRange(s)?null:s},ps=function(e){function t(){return ER(this,t),kR(this,t,arguments)}return DR(t,e),$R(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,c=Xe(a),u=Xe(i);if(er(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=LR(this.props);if(!f)return null;var d=f.x,h=f.y,m=this.props,g=m.shape,v=m.className,x=qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,b=wg(wg({clipPath:x},de(this.props,!0)),{},{cx:d,cy:h});return T.createElement(xe,{className:me("recharts-reference-dot",v)},t.renderDot(g,b),it.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(T.Component);ds(ps,"displayName","ReferenceDot"),ds(ps,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ds(ps,"renderDot",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):pe(e)?r=e(t):r=T.createElement(Zo,Bu({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Wu(){return Wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wu.apply(this,arguments)}function Un(e){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Un(e)}function Tg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ag(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(r),!0).forEach(function(n){vs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jg(n.key),n)}}function FR(e,t,r){return t&&BR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WR(e,t,r){return t=hs(t),UR(e,Pg()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function UR(e,t){if(t&&(Un(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zR(e)}function zR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pg=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function VR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uu(e,t)}function Uu(e,t){return Uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Uu(e,t)}function vs(e,t,r){return t=jg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jg(e){var t=GR(e,"string");return Un(t)=="symbol"?t:t+""}function GR(e,t){if(Un(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qR=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,c=i.y2,u=i.xAxis,f=i.yAxis;if(!u||!f)return null;var d=Cu({x:u.scale,y:f.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},m={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(c,{position:"end"}):d.y.rangeMax};return qt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(m))?null:ag(h,m)},ms=function(e){function t(){return RR(this,t),WR(this,t,arguments)}return VR(t,e),FR(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,c=n.alwaysShow,u=n.clipPathId;er(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Xe(a),d=Xe(i),h=Xe(o),m=Xe(s),g=this.props.shape;if(!f&&!d&&!h&&!m&&!g)return null;var v=qR(f,d,h,m,this.props);if(!v&&!g)return null;var x=qt(this.props,"hidden")?"url(#".concat(u,")"):void 0;return T.createElement(xe,{className:me("recharts-reference-area",l)},t.renderRect(g,Ag(Ag({clipPath:x},de(this.props,!0)),v)),it.renderCallByParent(this.props,v))}}])}(T.Component);vs(ms,"displayName","ReferenceArea"),vs(ms,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),vs(ms,"renderRect",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):pe(e)?r=e(t):r=T.createElement(wu,Wu({},t,{className:"recharts-reference-area-rect"})),r});function _g(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function KR(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return WL(n,r)}function HR(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function ys(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function YR(e,t){return _g(e,t+1)}function XR(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,c=1,u=o,f=function(){var m=n==null?void 0:n[l];if(m===void 0)return{v:_g(n,c)};var g=l,v,x=function(){return v===void 0&&(v=r(m,g)),v},b=m.coordinate,w=l===0||ys(e,b,x,u,s);w||(l=0,u=o,c+=1),w&&(u=b+e*(x()/2+a),l+=c)},d;c<=i.length;)if(d=f(),d)return d.v;return[]}function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function Eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eg(Object(r),!0).forEach(function(n){JR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JR(e,t,r){return t=ZR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZR(e){var t=QR(e,"string");return pi(t)=="symbol"?t:t+""}function QR(e,t){if(pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e9(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,c=function(d){var h=i[d],m,g=function(){return m===void 0&&(m=r(h,d)),m};if(d===o-1){var v=e*(h.coordinate+e*g()/2-l);i[d]=h=ot(ot({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate})}else i[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var x=ys(e,h.tickCoord,g,s,l);x&&(l=h.tickCoord-e*(g()/2+a),i[d]=ot(ot({},h),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return i}function t9(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,c=t.end;if(i){var u=n[s-1],f=r(u,s-1),d=e*(u.coordinate+e*f/2-c);o[s-1]=u=ot(ot({},u),{},{tickCoord:d>0?u.coordinate-d*e:u.coordinate});var h=ys(e,u.tickCoord,function(){return f},l,c);h&&(c=u.tickCoord-e*(f/2+a),o[s-1]=ot(ot({},u),{},{isShow:!0}))}for(var m=i?s-1:s,g=function(b){var w=o[b],A,y=function(){return A===void 0&&(A=r(w,b)),A};if(b===0){var O=e*(w.coordinate-e*y()/2-l);o[b]=w=ot(ot({},w),{},{tickCoord:O<0?w.coordinate-O*e:w.coordinate})}else o[b]=w=ot(ot({},w),{},{tickCoord:w.coordinate});var S=ys(e,w.tickCoord,y,l,c);S&&(l=w.tickCoord+e*(y()/2+a),o[b]=ot(ot({},w),{},{isShow:!0}))},v=0;v<m;v++)g(v);return o}function zu(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(J(l)||mr.isSsr)return YR(a,typeof l=="number"&&J(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",m=u&&h==="width"?Aa(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(w,A){var y=pe(c)?c(w.value,A):w.value;return h==="width"?KR(Aa(y,{fontSize:t,letterSpacing:r}),m,f):Aa(y,{fontSize:t,letterSpacing:r})[h]},v=a.length>=2?$t(a[1].coordinate-a[0].coordinate):1,x=HR(i,v,h);return l==="equidistantPreserveStart"?XR(v,x,g,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=t9(v,x,g,a,o,l==="preserveStartEnd"):d=e9(v,x,g,a,o),d.filter(function(b){return b.isShow}))}var r9=["viewBox"],n9=["viewBox"],a9=["ticks"];function zn(e){"@babel/helpers - typeof";return zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zn(e)}function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vn.apply(this,arguments)}function Cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(r),!0).forEach(function(n){qu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vu(e,t){if(e==null)return{};var r=i9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function o9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mg(n.key),n)}}function s9(e,t,r){return t&&$g(e.prototype,t),r&&$g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l9(e,t,r){return t=gs(t),c9(e,kg()?Reflect.construct(t,r||[],gs(e).constructor):t.apply(e,r))}function c9(e,t){if(t&&(zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u9(e)}function u9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kg=function(){return!!e})()}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(e)}function f9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gu(e,t)}function Gu(e,t){return Gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gu(e,t)}function qu(e,t,r){return t=Mg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mg(e){var t=d9(e,"string");return zn(t)=="symbol"?t:t+""}function d9(e,t){if(zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gn=function(e){function t(r){var n;return o9(this,t),n=l9(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return f9(t,e),s9(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Vu(n,r9),s=this.props,l=s.viewBox,c=Vu(s,n9);return!un(i,l)||!un(o,c)||!un(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,c=a.orientation,u=a.tickSize,f=a.mirror,d=a.tickMargin,h,m,g,v,x,b,w=f?-1:1,A=n.tickSize||u,y=J(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=m=n.coordinate,v=o+ +!f*l,g=v-w*A,b=g-w*d,x=y;break;case"left":g=v=n.coordinate,m=i+ +!f*s,h=m-w*A,x=h-w*d,b=y;break;case"right":g=v=n.coordinate,m=i+ +f*s,h=m+w*A,x=h+w*d,b=y;break;default:h=m=n.coordinate,v=o+ +f*l,g=v+w*A,b=g+w*d,x=y;break}return{line:{x1:h,y1:g,x2:m,y2:v},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,c=n.mirror,u=n.axisLine,f=et(et(et({},de(this.props,!1)),de(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!c||l==="bottom"&&c);f=et(et({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(l==="left"&&!c||l==="right"&&c);f=et(et({},f),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return T.createElement("line",Vn({},f,{className:me("recharts-cartesian-axis-line",wt(u,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,c=s.stroke,u=s.tick,f=s.tickFormatter,d=s.unit,h=zu(et(et({},this.props),{},{ticks:n}),a,i),m=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),v=de(this.props,!1),x=de(u,!1),b=et(et({},v),{},{fill:"none"},de(l,!1)),w=h.map(function(A,y){var O=o.getTickLineCoord(A),S=O.line,P=O.tick,$=et(et(et(et({textAnchor:m,verticalAnchor:g},v),{},{stroke:"none",fill:c},x),P),{},{index:y,payload:A,visibleTicksCount:h.length,tickFormatter:f});return T.createElement(xe,Vn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ma(o.props,A,y)),l&&T.createElement("line",Vn({},b,S,{className:me("recharts-cartesian-axis-tick-line",wt(l,"className"))})),u&&t.renderTickItem(u,$,"".concat(pe(f)?f(A.value,y):A.value).concat(d||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,c=a.className,u=a.hide;if(u)return null;var f=this.props,d=f.ticks,h=Vu(f,a9),m=d;return pe(l)&&(m=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!m||!m.length?null:T.createElement(xe,{className:me("recharts-cartesian-axis",c),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),it.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=me(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(n)?o=T.cloneElement(n,et(et({},a),{},{className:s})):pe(n)?o=n(et(et({},a),{},{className:s})):o=T.createElement(po,Vn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(T.Component);qu(Gn,"displayName","CartesianAxis"),qu(Gn,"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 p9=["x1","y1","x2","y2","key"],h9=["offset"];function Kr(e){"@babel/helpers - typeof";return Kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(e)}function Ng(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ng(Object(r),!0).forEach(function(n){v9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ng(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v9(e,t,r){return t=m9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m9(e){var t=y9(e,"string");return Kr(t)=="symbol"?t:t+""}function y9(e,t){if(Kr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function Dg(e,t){if(e==null)return{};var r=g9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var b9=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return T.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ig(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Dg(t,p9),c=de(l,!1);c.offset;var u=Dg(c,h9);r=T.createElement("line",Hr({},u,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function x9(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var c=st(st({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Ig(a,c)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function w9(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var c=st(st({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Ig(a,c)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function O9(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==u[0]&&u.unshift(0);var f=u.map(function(d,h){var m=!u[h+1],g=m?a+o-d:u[h+1]-d;if(g<=0)return null;var v=h%t.length;return T.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:g,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function S9(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var u=c.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==u[0]&&u.unshift(0);var f=u.map(function(d,h){var m=!u[h+1],g=m?i+s-d:u[h+1]-d;if(g<=0)return null;var v=h%n.length;return T.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:g,height:l,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var T9=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return bm(zu(st(st(st({},Gn.defaultProps),n),{},{ticks:cr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},A9=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return bm(zu(st(st(st({},Gn.defaultProps),n),{},{ticks:cr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},qn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Lg(e){var t,r,n,a,i,o,s=Mu(),l=Nu(),c=dR(),u=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:qn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:qn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:qn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:qn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:qn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:qn.verticalFill,x:J(e.x)?e.x:c.left,y:J(e.y)?e.y:c.top,width:J(e.width)?e.width:c.width,height:J(e.height)?e.height:c.height}),f=u.x,d=u.y,h=u.width,m=u.height,g=u.syncWithTicks,v=u.horizontalValues,x=u.verticalValues,b=cR(),w=uR();if(!J(h)||h<=0||!J(m)||m<=0||!J(f)||f!==+f||!J(d)||d!==+d)return null;var A=u.verticalCoordinatesGenerator||T9,y=u.horizontalCoordinatesGenerator||A9,O=u.horizontalPoints,S=u.verticalPoints;if((!O||!O.length)&&pe(y)){var P=v&&v.length,$=y({yAxis:w?st(st({},w),{},{ticks:P?v:w.ticks}):void 0,width:s,height:l,offset:c},P?!0:g);er(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Kr($),"]")),Array.isArray($)&&(O=$)}if((!S||!S.length)&&pe(A)){var N=x&&x.length,j=A({xAxis:b?st(st({},b),{},{ticks:N?x:b.ticks}):void 0,width:s,height:l,offset:c},N?!0:g);er(Array.isArray(j),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(j),"]")),Array.isArray(j)&&(S=j)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(b9,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),T.createElement(x9,Hr({},u,{offset:c,horizontalPoints:O,xAxis:b,yAxis:w})),T.createElement(w9,Hr({},u,{offset:c,verticalPoints:S,xAxis:b,yAxis:w})),T.createElement(O9,Hr({},u,{horizontalPoints:O})),T.createElement(S9,Hr({},u,{verticalPoints:S})))}Lg.displayName="CartesianGrid";var P9=["type","layout","connectNulls","ref"],j9=["key"];function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function Rg(e,t){if(e==null)return{};var r=_9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hi.apply(this,arguments)}function Bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bg(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hn(e){return k9(e)||$9(e)||C9(e)||E9()}function E9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
252
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C9(e,t){if(e){if(typeof e=="string")return Ku(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ku(e,t)}}function $9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k9(e){if(Array.isArray(e))return Ku(e)}function Ku(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ug(n.key),n)}}function N9(e,t,r){return t&&Fg(e.prototype,t),r&&Fg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D9(e,t,r){return t=bs(t),I9(e,Wg()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function I9(e,t){if(t&&(Kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return L9(e)}function L9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wg=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function R9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hu(e,t)}function Hu(e,t){return Hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Hu(e,t)}function Lt(e,t,r){return t=Ug(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ug(e){var t=B9(e,"string");return Kn(t)=="symbol"?t:t+""}function B9(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vi=function(e){function t(){var r;M9(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=D9(this,t,[].concat(a)),Lt(r,"state",{isAnimationFinished:!0,totalLength:0}),Lt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Lt(r,"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(x,b){return x+b});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var u=Math.floor(o/c),f=o%c,d=s-o,h=[],m=0,g=0;m<l.length;g+=l[m],++m)if(g+l[m]>f){h=[].concat(Hn(l.slice(0,m)),[f-g]);break}var v=h.length%2===0?[0,d]:[d];return[].concat(Hn(t.repeat(l,u)),Hn(h),v).map(function(x){return"".concat(x,"px")}).join(", ")}),Lt(r,"id",$r("recharts-line-")),Lt(r,"pathRef",function(o){r.mainCurve=o}),Lt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Lt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return R9(t,e),N9(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,f=dt(u,$n);if(!f)return null;var d=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:Ze(g.payload,v)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,h,f.map(function(m){return T.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,f=de(this.props,!1),d=de(l,!0),h=c.map(function(g,v){var x=bt(bt(bt({key:"dot-".concat(v),r:3},f),d),{},{index:v,cx:g.x,cy:g.y,value:g.value,dataKey:u,payload:g.payload,points:c});return t.renderDotItem(l,x)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,hi({className:"recharts-line-dots",key:"dots"},m),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var f=Rg(s,P9),d=bt(bt(bt({},de(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:c,connectNulls:u});return T.createElement(Gr,hi({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,c=o.isAnimationActive,u=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,m=o.animateNewValues,g=o.width,v=o.height,x=this.state,b=x.prevPoints,w=x.totalLength;return T.createElement(Dt,{begin:u,duration:f,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var y=A.t;if(b){var O=b.length/s.length,S=s.map(function(C,k){var _=Math.floor(k*O);if(b[_]){var D=b[_],M=ze(D.x,C.x),B=ze(D.y,C.y);return bt(bt({},C),{},{x:M(y),y:B(y)})}if(m){var U=ze(g*2,C.x),V=ze(v/2,C.y);return bt(bt({},C),{},{x:U(y),y:V(y)})}return bt(bt({},C),{},{x:C.x,y:C.y})});return i.renderCurveStatically(S,n,a)}var P=ze(0,w),$=P(y),N;if(l){var j="".concat(l).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});N=i.getStrokeDasharray($,w,j)}else N=i.generateSimpleStrokeDasharray(w,$);return i.renderCurveStatically(s,n,a,{strokeDasharray:N})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&o&&o.length&&(!c&&u>0||!Fr(c,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,c=a.xAxis,u=a.yAxis,f=a.top,d=a.left,h=a.width,m=a.height,g=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=me("recharts-line",l),A=c&&c.allowDataOverflow,y=u&&u.allowDataOverflow,O=A||y,S=fe(v)?this.id:v,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,N=$===void 0?3:$,j=P.strokeWidth,C=j===void 0?2:j,k=fd(o)?o:{},_=k.clipDot,D=_===void 0?!0:_,M=N*2+C;return T.createElement(xe,{className:w},A||y?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?d:d-h/2,y:y?f:f-m/2,width:A?h:h*2,height:y?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:d-M/2,y:f-M/2,width:h+M,height:m+M}))):null,!b&&this.renderCurve(O,S),this.renderErrorBar(O,S),(b||o)&&this.renderDots(O,D,S),(!g||x)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Hn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Hn(o),Hn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(T.isValidElement(n))i=T.cloneElement(n,a);else if(pe(n))i=n(a);else{var o=a.key,s=Rg(a,j9),l=me("recharts-line-dot",typeof n!="boolean"?n.className:"");i=T.createElement(Zo,hi({key:o},s,{className:l}))}return i}}])}(T.PureComponent);Lt(vi,"displayName","Line"),Lt(vi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!mr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(vi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,f=l.map(function(d,h){var m=Ze(d,o);return u==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(m)?null:n.scale(m),value:m,payload:d}:{x:fe(m)?null:r.scale(m),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:m,payload:d}});return bt({points:f,layout:u},c)});var F9=["layout","type","stroke","connectNulls","isRange","ref"],W9=["key"],zg;function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function Vg(e,t){if(e==null)return{};var r=U9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function U9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yr.apply(this,arguments)}function Gg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gg(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hg(n.key),n)}}function V9(e,t,r){return t&&qg(e.prototype,t),r&&qg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function G9(e,t,r){return t=xs(t),q9(e,Kg()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function q9(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K9(e)}function K9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kg=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function H9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yu(e,t)}function Yu(e,t){return Yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yu(e,t)}function Kt(e,t,r){return t=Hg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hg(e){var t=Y9(e,"string");return Yn(t)=="symbol"?t:t+""}function Y9(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ar=function(e){function t(){var r;z9(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=G9(this,t,[].concat(a)),Kt(r,"state",{isAnimationFinished:!0}),Kt(r,"id",$r("recharts-area-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(o)&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(o)&&o()}),r}return H9(t,e),V9(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,c=l.dot,u=l.points,f=l.dataKey,d=de(this.props,!1),h=de(c,!0),m=u.map(function(v,x){var b=Tr(Tr(Tr({key:"dot-".concat(x),r:3},d),h),{},{index:x,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:u});return t.renderDotItem(c,b)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,Yr({className:"recharts-area-dots"},g),m)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,c=o[o.length-1].x,u=n*Math.abs(l-c),f=xr(o.map(function(d){return d.y||0}));return J(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(xr(i.map(function(d){return d.y||0})),f)),J(f)?T.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,c=o[o.length-1].y,u=n*Math.abs(l-c),f=xr(o.map(function(d){return d.x||0}));return J(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(xr(i.map(function(d){return d.x||0})),f)),J(f)?T.createElement("rect",{x:0,y:l<c?l:l-u,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,c=s.type,u=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=Vg(s,F9);return T.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},T.createElement(Gr,Yr({},de(h,!0),{points:n,connectNulls:f,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&T.createElement(Gr,Yr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:n})),u!=="none"&&d&&T.createElement(Gr,Yr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,c=o.isAnimationActive,u=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,m=this.state,g=m.prevPoints,v=m.prevBaseLine;return T.createElement(Dt,{begin:u,duration:f,isActive:c,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var b=x.t;if(g){var w=g.length/s.length,A=s.map(function(P,$){var N=Math.floor($*w);if(g[N]){var j=g[N],C=ze(j.x,P.x),k=ze(j.y,P.y);return Tr(Tr({},P),{},{x:C(b),y:k(b)})}return P}),y;if(J(l)&&typeof l=="number"){var O=ze(v,l);y=O(b)}else if(fe(l)||cn(l)){var S=ze(v,0);y=S(b)}else y=l.map(function(P,$){var N=Math.floor($*w);if(v[N]){var j=v[N],C=ze(j.x,P.x),k=ze(j.y,P.y);return Tr(Tr({},P),{},{x:C(b),y:k(b)})}return P});return i.renderAreaStatically(A,y,n,a)}return T.createElement(xe,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(b))),T.createElement(xe,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.prevBaseLine,d=c.totalLength;return l&&o&&o.length&&(!u&&d>0||!Fr(u,o)||!Fr(f,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,c=a.top,u=a.left,f=a.xAxis,d=a.yAxis,h=a.width,m=a.height,g=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,w=me("recharts-area",l),A=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,O=A||y,S=fe(v)?this.id:v,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,N=$===void 0?3:$,j=P.strokeWidth,C=j===void 0?2:j,k=fd(o)?o:{},_=k.clipDot,D=_===void 0?!0:_,M=N*2+C;return T.createElement(xe,{className:w},A||y?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?u:u-h/2,y:y?c:c-m/2,width:A?h:h*2,height:y?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:u-M/2,y:c-M/2,width:h+M,height:m+M}))):null,b?null:this.renderArea(O,S),(o||b)&&this.renderDots(O,D,S),(!g||x)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(T.PureComponent);zg=Ar,Kt(Ar,"displayName","Area"),Kt(Ar,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!mr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Kt(Ar,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(J(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return s==="dataMin"?f:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]}),Kt(Ar,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,d=e.offset,h=t.layout,m=c&&c.length,g=zg.getBaseValue(t,r,n,a),v=h==="horizontal",x=!1,b=f.map(function(A,y){var O;m?O=c[u+y]:(O=Ze(A,l),Array.isArray(O)?x=!0:O=[g,O]);var S=O[1]==null||m&&Ze(A,l)==null;return v?{x:Mn({axis:n,ticks:i,bandSize:s,entry:A,index:y}),y:S?null:a.scale(O[1]),value:O,payload:A}:{x:S?null:n.scale(O[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:A,index:y}),value:O,payload:A}}),w;return m||x?w=b.map(function(A){var y=Array.isArray(A.value)?A.value[0]:null;return v?{x:A.x,y:y!=null&&A.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:A.y}}):w=v?a.scale(g):n.scale(g),Tr({points:b,baseLine:w,layout:h,isRange:x},d)}),Kt(Ar,"renderDotItem",function(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=me("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Vg(t,W9);r=T.createElement(Zo,Yr({},i,{key:a,className:n}))}return r});function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function X9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J9(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jg(n.key),n)}}function Z9(e,t,r){return t&&J9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q9(e,t,r){return t=ws(t),e7(e,Yg()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function e7(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t7(e)}function t7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yg=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function r7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xu(e,t)}function Xu(e,t){return Xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xu(e,t)}function Xg(e,t,r){return t=Jg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jg(e){var t=n7(e,"string");return Xn(t)=="symbol"?t:t+""}function n7(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Os=function(e){function t(){return X9(this,t),Q9(this,t,arguments)}return r7(t,e),Z9(t,[{key:"render",value:function(){return null}}])}(xt.Component);Xg(Os,"displayName","ZAxis"),Xg(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var a7=["option","isActive"];function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mi.apply(this,arguments)}function i7(e,t){if(e==null)return{};var r=o7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function o7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function s7(e){var t=e.option,r=e.isActive,n=i7(e,a7);return typeof t=="string"?xt.createElement(Tu,mi({option:xt.createElement(Xi,mi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(Tu,mi({option:t,isActive:r,shapeType:"symbols"},n))}function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function yi(){return yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yi.apply(this,arguments)}function Zg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zg(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tb(n.key),n)}}function c7(e,t,r){return t&&Qg(e.prototype,t),r&&Qg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u7(e,t,r){return t=Ss(t),f7(e,eb()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function f7(e,t){if(t&&(Jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d7(e)}function d7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eb=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function p7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ju(e,t)}function Ju(e,t){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ju(e,t)}function Pr(e,t,r){return t=tb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tb(e){var t=h7(e,"string");return Jn(t)=="symbol"?t:t+""}function h7(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts=function(e){function t(){var r;l7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=u7(this,t,[].concat(a)),Pr(r,"state",{isAnimationFinished:!1}),Pr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Pr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Pr(r,"id",$r("recharts-scatter-")),r}return p7(t,e),c7(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,c=de(this.props,!1);return n.map(function(u,f){var d=l===f,h=d?s:o,m=_t(_t({},c),u);return T.createElement(xe,yi({className:"recharts-scatter-symbol",key:"symbol-".concat(u==null?void 0:u.cx,"-").concat(u==null?void 0:u.cy,"-").concat(u==null?void 0:u.size,"-").concat(f)},ma(a.props,u,f),{role:"img"}),T.createElement(s7,yi({option:h,isActive:d,key:"symbol-".concat(f)},m)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,c=a.animationEasing,u=a.animationId,f=this.state.prevPoints;return T.createElement(Dt,{begin:s,duration:l,isActive:o,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,m=i.map(function(g,v){var x=f&&f[v];if(x){var b=ze(x.cx,g.cx),w=ze(x.cy,g.cy),A=ze(x.size,g.size);return _t(_t({},g),{},{cx:b(h),cy:w(h),size:A(h)})}var y=ze(0,g.size);return _t(_t({},g),{},{size:y(h)})});return T.createElement(xe,null,n.renderSymbolsStatically(m))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Fr(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,c=dt(l,$n);return c?c.map(function(u,f){var d=u.props,h=d.direction,m=d.dataKey;return T.cloneElement(u,{key:"".concat(h,"-").concat(m,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(v,x){return{x:v.cx,y:v.cy,value:h==="x"?+v.node.x:+v.node.y,errorVal:Ze(v,x)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=de(this.props,!1),c=de(i,!1),u,f;if(o==="joint")u=a.map(function(w){return{x:w.cx,y:w.cy}});else if(o==="fitting"){var d=BO(a),h=d.xmin,m=d.xmax,g=d.a,v=d.b,x=function(A){return g*A+v};u=[{x:h,y:x(h)},{x:m,y:x(m)}]}var b=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return T.isValidElement(i)?f=T.cloneElement(i,b):pe(i)?f=i(b):f=T.createElement(Gr,yi({},b,{type:s})),T.createElement(xe,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,c=n.yAxis,u=n.left,f=n.top,d=n.width,h=n.height,m=n.id,g=n.isAnimationActive;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,x=me("recharts-scatter",s),b=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,A=b||w,y=fe(m)?this.id:m;return T.createElement(xe,{className:x,clipPath:A?"url(#clipPath-".concat(y,")"):null},b||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(y)},T.createElement("rect",{x:b?u:u-d/2,y:w?f:f-h/2,width:b?d:d*2,height:w?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),T.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!g||v)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])}(T.PureComponent);Pr(Ts,"displayName","Scatter"),Pr(Ts,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!mr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Pr(Ts,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,c=a.props.tooltipType,u=dt(a.props.children,Ql),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,m=n?n.range:Os.defaultProps.range,g=m&&m[0],v=t.scale.bandwidth?t.scale.bandwidth():0,x=r.scale.bandwidth?r.scale.bandwidth():0,b=i.map(function(w,A){var y=Ze(w,f),O=Ze(w,d),S=!fe(h)&&Ze(w,h)||"-",P=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:w,dataKey:f,type:c},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:O,payload:w,dataKey:d,type:c}];S!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:S,payload:w,dataKey:h,type:c});var $=Mn({axis:t,ticks:o,bandSize:v,entry:w,index:A,dataKey:f}),N=Mn({axis:r,ticks:s,bandSize:x,entry:w,index:A,dataKey:d}),j=S!=="-"?n.scale(S):g,C=Math.sqrt(Math.max(j,0)/Math.PI);return _t(_t({},w),{},{cx:$,cy:N,x:$-C,y:N-C,xAxis:t,yAxis:r,zAxis:n,width:2*C,height:2*C,size:j,node:{x:y,y:O,z:S},tooltipPayload:P,tooltipPosition:{x:$,y:N},payload:w},u&&u[A]&&u[A].props)});return _t({points:b},l)});function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function v7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ab(n.key),n)}}function y7(e,t,r){return t&&m7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g7(e,t,r){return t=As(t),b7(e,rb()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function b7(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x7(e)}function x7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rb=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function w7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zu(e,t)}function Zu(e,t){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zu(e,t)}function nb(e,t,r){return t=ab(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ab(e){var t=O7(e,"string");return Zn(t)=="symbol"?t:t+""}function O7(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Qu(){return Qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qu.apply(this,arguments)}function S7(e){var t=e.xAxisId,r=Mu(),n=Nu(),a=pg(t);return a==null?null:xt.createElement(Gn,Qu({},a,{className:me("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return cr(o,!0)}}))}var Ps=function(e){function t(){return v7(this,t),g7(this,t,arguments)}return w7(t,e),y7(t,[{key:"render",value:function(){return xt.createElement(S7,this.props)}}])}(xt.Component);nb(Ps,"displayName","XAxis"),nb(Ps,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function T7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sb(n.key),n)}}function P7(e,t,r){return t&&A7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j7(e,t,r){return t=js(t),_7(e,ib()?Reflect.construct(t,r||[],js(e).constructor):t.apply(e,r))}function _7(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E7(e)}function E7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ib(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ib=function(){return!!e})()}function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},js(e)}function C7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ef(e,t)}function ef(e,t){return ef=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ef(e,t)}function ob(e,t,r){return t=sb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sb(e){var t=$7(e,"string");return Qn(t)=="symbol"?t:t+""}function $7(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tf(){return tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tf.apply(this,arguments)}var k7=function(t){var r=t.yAxisId,n=Mu(),a=Nu(),i=hg(r);return i==null?null:xt.createElement(Gn,tf({},i,{className:me("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return cr(s,!0)}}))},_s=function(e){function t(){return T7(this,t),j7(this,t,arguments)}return C7(t,e),P7(t,[{key:"render",value:function(){return xt.createElement(k7,this.props)}}])}(xt.Component);ob(_s,"displayName","YAxis"),ob(_s,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function lb(e){return I7(e)||D7(e)||N7(e)||M7()}function M7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
253
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N7(e,t){if(e){if(typeof e=="string")return rf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rf(e,t)}}function D7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I7(e){if(Array.isArray(e))return rf(e)}function rf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var nf=function(t,r,n,a,i){var o=dt(t,Ru),s=dt(t,ps),l=[].concat(lb(o),lb(s)),c=dt(t,ms),u="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(g,v){if(v.props[u]===n&&qt(v.props,"extendDomain")&&J(v.props[f])){var x=v.props[f];return[Math.min(g[0],x),Math.max(g[1],x)]}return g},d)),c.length){var h="".concat(f,"1"),m="".concat(f,"2");d=c.reduce(function(g,v){if(v.props[u]===n&&qt(v.props,"extendDomain")&&J(v.props[h])&&J(v.props[m])){var x=v.props[h],b=v.props[m];return[Math.min(g[0],x,b),Math.max(g[1],x,b)]}return g},d)}return i&&i.length&&(d=i.reduce(function(g,v){return J(v)?[Math.min(g[0],v),Math.max(g[1],v)]:g},d)),d},cb={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new a(u,f||l,d),m=r?r+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],h]:l._events[m].push(h):(l._events[m]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,m=new Array(h);d<h;d++)m[d]=f[d].fn;return m},s.prototype.listenerCount=function(c){var u=r?r+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,d,h,m){var g=r?r+c:c;if(!this._events[g])return!1;var v=this._events[g],x=arguments.length,b,w;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,d),!0;case 5:return v.fn.call(v.context,u,f,d,h),!0;case 6:return v.fn.call(v.context,u,f,d,h,m),!0}for(w=1,b=new Array(x-1);w<x;w++)b[w-1]=arguments[w];v.fn.apply(v.context,b)}else{var A=v.length,y;for(w=0;w<A;w++)switch(v[w].once&&this.removeListener(c,v[w].fn,void 0,!0),x){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,u);break;case 3:v[w].fn.call(v[w].context,u,f);break;case 4:v[w].fn.call(v[w].context,u,f,d);break;default:if(!b)for(y=1,b=new Array(x-1);y<x;y++)b[y-1]=arguments[y];v[w].fn.apply(v[w].context,b)}}return!0},s.prototype.on=function(c,u,f){return i(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return i(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,d){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===u&&(!d||m.once)&&(!f||m.context===f)&&o(this,h);else{for(var g=0,v=[],x=m.length;g<x;g++)(m[g].fn!==u||d&&!m[g].once||f&&m[g].context!==f)&&v.push(m[g]);v.length?this._events[h]=v.length===1?v[0]:v:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(cb);var L7=cb.exports;const R7=$e(L7);var af=new R7,of="recharts.syncMouseEvents";function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function B7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ub(n.key),n)}}function W7(e,t,r){return t&&F7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sf(e,t,r){return t=ub(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ub(e){var t=U7(e,"string");return gi(t)=="symbol"?t:t+""}function U7(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var z7=function(){function e(){B7(this,e),sf(this,"activeIndex",0),sf(this,"coordinateList",[]),sf(this,"layout","horizontal")}return W7(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,c=l===void 0?null:l,u=r.offset,f=u===void 0?null:u,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,u=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+c,d=o+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function V7(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&J(n)&&J(a))return!0}return!1}function G7(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function fb(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=nt(t,r,n,a),s=nt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function q7(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,f=t.angle,d=nt(s,l,c,f),h=nt(s,l,u,f);n=d.x,a=d.y,i=h.x,o=h.y}else return fb(t);return[{x:n,y:a},{x:i,y:o}]}function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function db(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?db(Object(r),!0).forEach(function(n){K7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K7(e,t,r){return t=H7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H7(e){var t=Y7(e,"string");return bi(t)=="symbol"?t:t+""}function Y7(e,t){if(bi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X7(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,f=e.layout,d=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var m,g=Gr;if(d==="ScatterChart")m=o,g=w4;else if(d==="BarChart")m=G7(f,o,l,u),g=wu;else if(f==="radial"){var v=fb(o),x=v.cx,b=v.cy,w=v.radius,A=v.startAngle,y=v.endAngle;m={cx:x,cy:b,startAngle:A,endAngle:y,innerRadius:w,outerRadius:w},g=Rm}else m={points:q7(f,o,l)},g=Gr;var O=Es(Es(Es(Es({stroke:"#ccc",pointerEvents:"none"},l),m),de(h,!1)),{},{payload:s,payloadIndex:c,className:me("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,O):T.createElement(g,O)}var J7=["item"],Z7=["children","className","width","height","style","compact","title","desc"];function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ta.apply(this,arguments)}function pb(e,t){return tB(e)||eB(e,t)||mb(e,t)||Q7()}function Q7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
254
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function tB(e){if(Array.isArray(e))return e}function hb(e,t){if(e==null)return{};var r=rB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function nB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gb(n.key),n)}}function iB(e,t,r){return t&&aB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oB(e,t,r){return t=Cs(t),sB(e,vb()?Reflect.construct(t,r||[],Cs(e).constructor):t.apply(e,r))}function sB(e,t){if(t&&(ea(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lB(e)}function lB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vb=function(){return!!e})()}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}function cB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lf(e,t)}function lf(e,t){return lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},lf(e,t)}function ra(e){return dB(e)||fB(e)||mb(e)||uB()}function uB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
255
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mb(e,t){if(e){if(typeof e=="string")return cf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cf(e,t)}}function fB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dB(e){if(Array.isArray(e))return cf(e)}function cf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yb(Object(r),!0).forEach(function(n){le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function le(e,t,r){return t=gb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gb(e){var t=pB(e,"string");return ea(t)=="symbol"?t:t+""}function pB(e,t){if(ea(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ea(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hB={xAxis:["bottom","top"],yAxis:["left","right"]},vB={width:"100%",height:"100%"},bb={x:0,y:0};function $s(e){return e}var mB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},yB=function(t,r,n,a){var i=r.find(function(u){return u&&u.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return z(z(z({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return z(z(z({},a),nt(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return bb},ks=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(ra(s),ra(c)):s},[]);return o.length>0?o:t&&t.length&&J(a)&&J(i)?t.slice(a,i+1):[]};function xb(e){return e==="number"?[0,"auto"]:void 0}var uf=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=ks(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=Ri(h,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ra(l),[Pm(c,d)]):l},[])},wb=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=mB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=Z3(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,d=uf(t,r,u,f),h=yB(n,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},gB=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,f=t.children,d=t.stackOffset,h=gm(u,i);return n.reduce(function(m,g){var v,x=g.type.defaultProps!==void 0?z(z({},g.type.defaultProps),g.props):g.props,b=x.type,w=x.dataKey,A=x.allowDataOverflow,y=x.allowDuplicatedCategory,O=x.scale,S=x.ticks,P=x.includeHidden,$=x[o];if(m[$])return m;var N=ks(t.data,{graphicalItems:a.filter(function(F){var W,G=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o];return G===$}),dataStartIndex:l,dataEndIndex:c}),j=N.length,C,k,_;V7(x.domain,A,b)&&(C=Zc(x.domain,null,A),h&&(b==="number"||O!=="auto")&&(_=Ga(N,w,"category")));var D=xb(b);if(!C||C.length===0){var M,B=(M=x.domain)!==null&&M!==void 0?M:D;if(w){if(C=Ga(N,w,b),b==="category"&&h){var U=RO(C);y&&U?(k=C,C=ns(0,j)):y||(C=Am(B,C,g).reduce(function(F,W){return F.indexOf(W)>=0?F:[].concat(ra(F),[W])},[]))}else if(b==="category")y?C=C.filter(function(F){return F!==""&&!fe(F)}):C=Am(B,C,g).reduce(function(F,W){return F.indexOf(W)>=0||W===""||fe(W)?F:[].concat(ra(F),[W])},[]);else if(b==="number"){var V=nI(N,a.filter(function(F){var W,G,X=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o],Q="hide"in F.props?F.props.hide:(G=F.type.defaultProps)===null||G===void 0?void 0:G.hide;return X===$&&(P||!Q)}),w,i,u);V&&(C=V)}h&&(b==="number"||O!=="auto")&&(_=Ga(N,w,"category"))}else h?C=ns(0,j):s&&s[$]&&s[$].hasStack&&b==="number"?C=d==="expand"?[0,1]:Om(s[$].stackGroups,l,c):C=ym(N,a.filter(function(F){var W=o in F.props?F.props[o]:F.type.defaultProps[o],G="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return W===$&&(P||!G)}),b,u,!0);if(b==="number")C=nf(f,C,$,i,S),B&&(C=Zc(B,C,A));else if(b==="category"&&B){var E=B,R=C.every(function(F){return E.indexOf(F)>=0});R&&(C=E)}}return z(z({},m),{},le({},$,z(z({},x),{},{axisType:i,domain:C,categoricalDomain:_,duplicateDomain:k,originalDomain:(v=x.domain)!==null&&v!==void 0?v:D,isCategorical:h,layout:u})))},{})},bB=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.layout,f=t.children,d=ks(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),h=d.length,m=gm(u,i),g=-1;return n.reduce(function(v,x){var b=x.type.defaultProps!==void 0?z(z({},x.type.defaultProps),x.props):x.props,w=b[o],A=xb("number");if(!v[w]){g++;var y;return m?y=ns(0,h):s&&s[w]&&s[w].hasStack?(y=Om(s[w].stackGroups,l,c),y=nf(f,y,w,i)):(y=Zc(A,ym(d,n.filter(function(O){var S,P,$=o in O.props?O.props[o]:(S=O.type.defaultProps)===null||S===void 0?void 0:S[o],N="hide"in O.props?O.props.hide:(P=O.type.defaultProps)===null||P===void 0?void 0:P.hide;return $===w&&!N}),"number",u),a.defaultProps.allowDataOverflow),y=nf(f,y,w,i)),z(z({},v),{},le({},w,z(z({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(hB,"".concat(i,".").concat(g%2),null),domain:y,originalDomain:A,isCategorical:m,layout:u})))}return v},{})},xB=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,u=t.children,f="".concat(a,"Id"),d=dt(u,i),h={};return d&&d.length?h=gB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(h=bB(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},wB=function(t){var r=hr(t),n=cr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Gl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},Ob=function(t){var r=t.children,n=t.defaultShowTooltip,a=mt(r,In),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},OB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},Sb=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},SB=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,u=n.height,f=n.children,d=n.margin||{},h=mt(f,In),m=mt(f,yn),g=Object.keys(l).reduce(function(y,O){var S=l[O],P=S.orientation;return!S.mirror&&!S.hide?z(z({},y),{},le({},P,y[P]+S.width)):y},{left:d.left||0,right:d.right||0}),v=Object.keys(o).reduce(function(y,O){var S=o[O],P=S.orientation;return!S.mirror&&!S.hide?z(z({},y),{},le({},P,wt(y,"".concat(P))+S.height)):y},{top:d.top||0,bottom:d.bottom||0}),x=z(z({},v),g),b=x.bottom;h&&(x.bottom+=h.props.height||In.defaultProps.height),m&&r&&(x=tI(x,a,n,r));var w=c-x.left-x.right,A=u-x.top-x.bottom;return z(z({brushBottom:b},x),{},{width:Math.max(w,0),height:Math.max(A,0)})},TB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},AB=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,d=function(x,b){var w=b.graphicalItems,A=b.stackGroups,y=b.offset,O=b.updateId,S=b.dataStartIndex,P=b.dataEndIndex,$=x.barSize,N=x.layout,j=x.barGap,C=x.barCategoryGap,k=x.maxBarSize,_=Sb(N),D=_.numericAxisName,M=_.cateAxisName,B=OB(w),U=[];return w.forEach(function(V,E){var R=ks(x.data,{graphicalItems:[V],dataStartIndex:S,dataEndIndex:P}),F=V.type.defaultProps!==void 0?z(z({},V.type.defaultProps),V.props):V.props,W=F.dataKey,G=F.maxBarSize,X=F["".concat(D,"Id")],Q=F["".concat(M,"Id")],ae={},te=l.reduce(function(Ge,ct){var ji,_i,oa=b["".concat(ct.axisType,"Map")],Ei=F["".concat(ct.axisType,"Id")];oa&&oa[Ei]||ct.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ht(!1,"Specifying a(n) ".concat(ct.axisType,"Id requires a corresponding ").concat(ct.axisType,"Id on the targeted graphical component ").concat((ji=V==null||(_i=V.type)===null||_i===void 0?void 0:_i.displayName)!==null&&ji!==void 0?ji:"")):ht());var Ci=oa[Ei];return z(z({},Ge),{},le(le({},ct.axisType,Ci),"".concat(ct.axisType,"Ticks"),cr(Ci)))},ae),q=te[M],Y=te["".concat(M,"Ticks")],Z=A&&A[X]&&A[X].hasStack&&vI(V,A[X].stackGroups),L=Qt(V.type).indexOf("Bar")>=0,oe=Fo(q,Y),K=[],ce=B&&Q3({barSize:$,stackGroups:A,totalSize:TB(te,M)});if(L){var ee,ve,Ue=fe(G)?k:G,Be=(ee=(ve=Fo(q,Y,!0))!==null&&ve!==void 0?ve:Ue)!==null&&ee!==void 0?ee:0;K=eI({barGap:j,barCategoryGap:C,bandSize:Be!==oe?Be:oe,sizeList:ce[Q],maxBarSize:Ue}),Be!==oe&&(K=K.map(function(Ge){return z(z({},Ge),{},{position:z(z({},Ge.position),{},{offset:Ge.position.offset-Be/2})})}))}var Fe=V&&V.type&&V.type.getComposedData;Fe&&U.push({props:z(z({},Fe(z(z({},te),{},{displayedData:R,props:x,dataKey:W,item:V,bandSize:oe,barPosition:K,offset:y,stackedData:Z,layout:N,dataStartIndex:S,dataEndIndex:P}))),{},le(le(le({key:V.key||"item-".concat(E)},D,te[D]),M,te[M]),"animationId",O)),childIndex:JO(V,x.children),item:V})}),U},h=function(x,b){var w=x.props,A=x.dataStartIndex,y=x.dataEndIndex,O=x.updateId;if(!ud({props:w}))return null;var S=w.children,P=w.layout,$=w.stackOffset,N=w.data,j=w.reverseStackOrder,C=Sb(P),k=C.numericAxisName,_=C.cateAxisName,D=dt(S,n),M=dI(N,D,"".concat(k,"Id"),"".concat(_,"Id"),$,j),B=l.reduce(function(F,W){var G="".concat(W.axisType,"Map");return z(z({},F),{},le({},G,xB(w,z(z({},W),{},{graphicalItems:D,stackGroups:W.axisType===k&&M,dataStartIndex:A,dataEndIndex:y}))))},{}),U=SB(z(z({},B),{},{props:w,graphicalItems:D}),b==null?void 0:b.legendBBox);Object.keys(B).forEach(function(F){B[F]=u(w,B[F],U,F.replace("Map",""),r)});var V=B["".concat(_,"Map")],E=wB(V),R=d(w,z(z({},B),{},{dataStartIndex:A,dataEndIndex:y,updateId:O,graphicalItems:D,stackGroups:M,offset:U}));return z(z({formattedGraphicalItems:R,graphicalItems:D,offset:U,stackGroups:M},E),B)},m=function(v){function x(b){var w,A,y;return nB(this,x),y=oB(this,x,[b]),le(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),le(y,"accessibilityManager",new z7),le(y,"handleLegendBBoxUpdate",function(O){if(O){var S=y.state,P=S.dataStartIndex,$=S.dataEndIndex,N=S.updateId;y.setState(z({legendBBox:O},h({props:y.props,dataStartIndex:P,dataEndIndex:$,updateId:N},z(z({},y.state),{},{legendBBox:O}))))}}),le(y,"handleReceiveSyncEvent",function(O,S,P){if(y.props.syncId===O){if(P===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(S)}}),le(y,"handleBrushChange",function(O){var S=O.startIndex,P=O.endIndex;if(S!==y.state.dataStartIndex||P!==y.state.dataEndIndex){var $=y.state.updateId;y.setState(function(){return z({dataStartIndex:S,dataEndIndex:P},h({props:y.props,dataStartIndex:S,dataEndIndex:P,updateId:$},y.state))}),y.triggerSyncEvent({dataStartIndex:S,dataEndIndex:P})}}),le(y,"handleMouseEnter",function(O){var S=y.getMouseInfo(O);if(S){var P=z(z({},S),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var $=y.props.onMouseEnter;pe($)&&$(P,O)}}),le(y,"triggeredAfterMouseMove",function(O){var S=y.getMouseInfo(O),P=S?z(z({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(P),y.triggerSyncEvent(P);var $=y.props.onMouseMove;pe($)&&$(P,O)}),le(y,"handleItemMouseEnter",function(O){y.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),le(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),le(y,"handleMouseMove",function(O){O.persist(),y.throttleTriggeredAfterMouseMove(O)}),le(y,"handleMouseLeave",function(O){y.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};y.setState(S),y.triggerSyncEvent(S);var P=y.props.onMouseLeave;pe(P)&&P(S,O)}),le(y,"handleOuterEvent",function(O){var S=XO(O),P=wt(y.props,"".concat(S));if(S&&pe(P)){var $,N;/.*touch.*/i.test(S)?N=y.getMouseInfo(O.changedTouches[0]):N=y.getMouseInfo(O),P(($=N)!==null&&$!==void 0?$:{},O)}}),le(y,"handleClick",function(O){var S=y.getMouseInfo(O);if(S){var P=z(z({},S),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var $=y.props.onClick;pe($)&&$(P,O)}}),le(y,"handleMouseDown",function(O){var S=y.props.onMouseDown;if(pe(S)){var P=y.getMouseInfo(O);S(P,O)}}),le(y,"handleMouseUp",function(O){var S=y.props.onMouseUp;if(pe(S)){var P=y.getMouseInfo(O);S(P,O)}}),le(y,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),le(y,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&y.handleMouseDown(O.changedTouches[0])}),le(y,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&y.handleMouseUp(O.changedTouches[0])}),le(y,"handleDoubleClick",function(O){var S=y.props.onDoubleClick;if(pe(S)){var P=y.getMouseInfo(O);S(P,O)}}),le(y,"handleContextMenu",function(O){var S=y.props.onContextMenu;if(pe(S)){var P=y.getMouseInfo(O);S(P,O)}}),le(y,"triggerSyncEvent",function(O){y.props.syncId!==void 0&&af.emit(of,y.props.syncId,O,y.eventEmitterSymbol)}),le(y,"applySyncEvent",function(O){var S=y.props,P=S.layout,$=S.syncMethod,N=y.state.updateId,j=O.dataStartIndex,C=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)y.setState(z({dataStartIndex:j,dataEndIndex:C},h({props:y.props,dataStartIndex:j,dataEndIndex:C,updateId:N},y.state)));else if(O.activeTooltipIndex!==void 0){var k=O.chartX,_=O.chartY,D=O.activeTooltipIndex,M=y.state,B=M.offset,U=M.tooltipTicks;if(!B)return;if(typeof $=="function")D=$(U,O);else if($==="value"){D=-1;for(var V=0;V<U.length;V++)if(U[V].value===O.activeLabel){D=V;break}}var E=z(z({},B),{},{x:B.left,y:B.top}),R=Math.min(k,E.x+E.width),F=Math.min(_,E.y+E.height),W=U[D]&&U[D].value,G=uf(y.state,y.props.data,D),X=U[D]?{x:P==="horizontal"?U[D].coordinate:R,y:P==="horizontal"?F:U[D].coordinate}:bb;y.setState(z(z({},O),{},{activeLabel:W,activeCoordinate:X,activePayload:G,activeTooltipIndex:D}))}else y.setState(O)}),le(y,"renderCursor",function(O){var S,P=y.state,$=P.isTooltipActive,N=P.activeCoordinate,j=P.activePayload,C=P.offset,k=P.activeTooltipIndex,_=P.tooltipAxisBandSize,D=y.getTooltipEventType(),M=(S=O.props.active)!==null&&S!==void 0?S:$,B=y.props.layout,U=O.key||"_recharts-cursor";return T.createElement(X7,{key:U,activeCoordinate:N,activePayload:j,activeTooltipIndex:k,chartName:r,element:O,isActive:M,layout:B,offset:C,tooltipAxisBandSize:_,tooltipEventType:D})}),le(y,"renderPolarAxis",function(O,S,P){var $=wt(O,"type.axisType"),N=wt(y.state,"".concat($,"Map")),j=O.type.defaultProps,C=j!==void 0?z(z({},j),O.props):O.props,k=N&&N[C["".concat($,"Id")]];return T.cloneElement(O,z(z({},k),{},{className:me($,k.className),key:O.key||"".concat(S,"-").concat(P),ticks:cr(k,!0)}))}),le(y,"renderPolarGrid",function(O){var S=O.props,P=S.radialLines,$=S.polarAngles,N=S.polarRadius,j=y.state,C=j.radiusAxisMap,k=j.angleAxisMap,_=hr(C),D=hr(k),M=D.cx,B=D.cy,U=D.innerRadius,V=D.outerRadius;return T.cloneElement(O,{polarAngles:Array.isArray($)?$:cr(D,!0).map(function(E){return E.coordinate}),polarRadius:Array.isArray(N)?N:cr(_,!0).map(function(E){return E.coordinate}),cx:M,cy:B,innerRadius:U,outerRadius:V,key:O.key||"polar-grid",radialLines:P})}),le(y,"renderLegend",function(){var O=y.state.formattedGraphicalItems,S=y.props,P=S.children,$=S.width,N=S.height,j=y.props.margin||{},C=$-(j.left||0)-(j.right||0),k=pm({children:P,formattedGraphicalItems:O,legendWidth:C,legendContent:c});if(!k)return null;var _=k.item,D=hb(k,J7);return T.cloneElement(_,z(z({},D),{},{chartWidth:$,chartHeight:N,margin:j,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),le(y,"renderTooltip",function(){var O,S=y.props,P=S.children,$=S.accessibilityLayer,N=mt(P,Wt);if(!N)return null;var j=y.state,C=j.isTooltipActive,k=j.activeCoordinate,_=j.activePayload,D=j.activeLabel,M=j.offset,B=(O=N.props.active)!==null&&O!==void 0?O:C;return T.cloneElement(N,{viewBox:z(z({},M),{},{x:M.left,y:M.top}),active:B,label:D,payload:B?_:[],coordinate:k,accessibilityLayer:$})}),le(y,"renderBrush",function(O){var S=y.props,P=S.margin,$=S.data,N=y.state,j=N.offset,C=N.dataStartIndex,k=N.dataEndIndex,_=N.updateId;return T.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,O.props.onChange),data:$,x:J(O.props.x)?O.props.x:j.left,y:J(O.props.y)?O.props.y:j.top+j.height+j.brushBottom-(P.bottom||0),width:J(O.props.width)?O.props.width:j.width,startIndex:C,endIndex:k,updateId:"brush-".concat(_)})}),le(y,"renderReferenceElement",function(O,S,P){if(!O)return null;var $=y,N=$.clipPathId,j=y.state,C=j.xAxisMap,k=j.yAxisMap,_=j.offset,D=O.type.defaultProps||{},M=O.props,B=M.xAxisId,U=B===void 0?D.xAxisId:B,V=M.yAxisId,E=V===void 0?D.yAxisId:V;return T.cloneElement(O,{key:O.key||"".concat(S,"-").concat(P),xAxis:C[U],yAxis:k[E],viewBox:{x:_.left,y:_.top,width:_.width,height:_.height},clipPathId:N})}),le(y,"renderActivePoints",function(O){var S=O.item,P=O.activePoint,$=O.basePoint,N=O.childIndex,j=O.isRange,C=[],k=S.props.key,_=S.item.type.defaultProps!==void 0?z(z({},S.item.type.defaultProps),S.item.props):S.item.props,D=_.activeDot,M=_.dataKey,B=z(z({index:N,dataKey:M,cx:P.x,cy:P.y,r:4,fill:Xc(S.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},de(D,!1)),Bi(D));return C.push(x.renderActiveDot(D,B,"".concat(k,"-activePoint-").concat(N))),$?C.push(x.renderActiveDot(D,z(z({},B),{},{cx:$.x,cy:$.y}),"".concat(k,"-basePoint-").concat(N))):j&&C.push(null),C}),le(y,"renderGraphicChild",function(O,S,P){var $=y.filterFormatItem(O,S,P);if(!$)return null;var N=y.getTooltipEventType(),j=y.state,C=j.isTooltipActive,k=j.tooltipAxis,_=j.activeTooltipIndex,D=j.activeLabel,M=y.props.children,B=mt(M,Wt),U=$.props,V=U.points,E=U.isRange,R=U.baseLine,F=$.item.type.defaultProps!==void 0?z(z({},$.item.type.defaultProps),$.item.props):$.item.props,W=F.activeDot,G=F.hide,X=F.activeBar,Q=F.activeShape,ae=!!(!G&&C&&B&&(W||X||Q)),te={};N!=="axis"&&B&&B.props.trigger==="click"?te={onClick:Bo(y.handleItemMouseEnter,O.props.onClick)}:N!=="axis"&&(te={onMouseLeave:Bo(y.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,O.props.onMouseEnter)});var q=T.cloneElement(O,z(z({},$.props),te));function Y(ct){return typeof k.dataKey=="function"?k.dataKey(ct.payload):null}if(ae)if(_>=0){var Z,L;if(k.dataKey&&!k.allowDuplicatedCategory){var oe=typeof k.dataKey=="function"?Y:"payload.".concat(k.dataKey.toString());Z=Ri(V,oe,D),L=E&&R&&Ri(R,oe,D)}else Z=V==null?void 0:V[_],L=E&&R&&R[_];if(Q||X){var K=O.props.activeIndex!==void 0?O.props.activeIndex:_;return[T.cloneElement(O,z(z(z({},$.props),te),{},{activeIndex:K})),null,null]}if(!fe(Z))return[q].concat(ra(y.renderActivePoints({item:$,activePoint:Z,basePoint:L,childIndex:_,isRange:E})))}else{var ce,ee=(ce=y.getItemByXY(y.state.activeCoordinate))!==null&&ce!==void 0?ce:{graphicalItem:q},ve=ee.graphicalItem,Ue=ve.item,Be=Ue===void 0?O:Ue,Fe=ve.childIndex,Ge=z(z(z({},$.props),te),{},{activeIndex:Fe});return[T.cloneElement(Be,Ge),null,null]}return E?[q,null,null]:[q,null]}),le(y,"renderCustomized",function(O,S,P){return T.cloneElement(O,z(z({key:"recharts-customized-".concat(P)},y.props),y.state))}),le(y,"renderMap",{CartesianGrid:{handler:$s,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:$s},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:$s},YAxis:{handler:$s},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:$r("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=uh(y.triggeredAfterMouseMove,(A=b.throttleDelay)!==null&&A!==void 0?A:1e3/60),y.state={},y}return cB(x,v),iB(x,[{key:"componentDidMount",value:function(){var w,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,A=w.children,y=w.data,O=w.height,S=w.layout,P=mt(A,Wt);if(P){var $=P.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var N=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,j=uf(this.state,y,$,N),C=this.state.tooltipTicks[$].coordinate,k=(this.state.offset.top+O)/2,_=S==="horizontal",D=_?{x:C,y:k}:{y:C,x:k},M=this.state.formattedGraphicalItems.find(function(U){var V=U.item;return V.type.name==="Scatter"});M&&(D=z(z({},D),M.props.points[$].tooltipPosition),j=M.props.points[$].tooltipPayload);var B={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:N,activePayload:j,activeCoordinate:D};this.setState(B),this.renderCursor(P),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var y,O;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(w){ul([mt(w.children,Wt)],[mt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=mt(this.props.children,Wt);if(w&&typeof w.props.shared=="boolean"){var A=w.props.shared?"axis":"item";return s.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var A=this.container,y=A.getBoundingClientRect(),O=Ak(y),S={chartX:Math.round(w.pageX-O.left),chartY:Math.round(w.pageY-O.top)},P=y.width/A.offsetWidth||1,$=this.inRange(S.chartX,S.chartY,P);if(!$)return null;var N=this.state,j=N.xAxisMap,C=N.yAxisMap,k=this.getTooltipEventType(),_=wb(this.state,this.props.data,this.props.layout,$);if(k!=="axis"&&j&&C){var D=hr(j).scale,M=hr(C).scale,B=D&&D.invert?D.invert(S.chartX):null,U=M&&M.invert?M.invert(S.chartY):null;return z(z({},S),{},{xValue:B,yValue:U},_)}return _?z(z({},S),_):null}},{key:"inRange",value:function(w,A){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,S=w/y,P=A/y;if(O==="horizontal"||O==="vertical"){var $=this.state.offset,N=S>=$.left&&S<=$.left+$.width&&P>=$.top&&P<=$.top+$.height;return N?{x:S,y:P}:null}var j=this.state,C=j.angleAxisMap,k=j.radiusAxisMap;if(C&&k){var _=hr(C);return Em({x:S,y:P},_)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,A=this.getTooltipEventType(),y=mt(w,Wt),O={};y&&A==="axis"&&(y.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Bi(this.props,this.handleOuterEvent);return z(z({},S),O)}},{key:"addListener",value:function(){af.on(of,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){af.removeListener(of,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,A,y){for(var O=this.state.formattedGraphicalItems,S=0,P=O.length;S<P;S++){var $=O[S];if($.item===w||$.props.key===w.key||A===Qt($.item.type)&&y===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,A=this.state.offset,y=A.left,O=A.top,S=A.height,P=A.width;return T.createElement("defs",null,T.createElement("clipPath",{id:w},T.createElement("rect",{x:y,y:O,height:S,width:P})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(A,y){var O=pb(y,2),S=O[0],P=O[1];return z(z({},A),{},le({},S,P.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(A,y){var O=pb(y,2),S=O[0],P=O[1];return z(z({},A),{},le({},S,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(w){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(w){var A=this.state,y=A.formattedGraphicalItems,O=A.activeItem;if(y&&y.length)for(var S=0,P=y.length;S<P;S++){var $=y[S],N=$.props,j=$.item,C=j.type.defaultProps!==void 0?z(z({},j.type.defaultProps),j.props):j.props,k=Qt(j.type);if(k==="Bar"){var _=(N.data||[]).find(function(U){return f4(w,U)});if(_)return{graphicalItem:$,payload:_}}else if(k==="RadialBar"){var D=(N.data||[]).find(function(U){return Em(w,U)});if(D)return{graphicalItem:$,payload:D}}else if(ts($,O)||rs($,O)||ci($,O)){var M=p8({graphicalItem:$,activeTooltipItem:O,itemData:C.data}),B=C.activeIndex===void 0?M:C.activeIndex;return{graphicalItem:z(z({},$),{},{childIndex:B}),payload:ci($,O)?C.data[M]:$.props.data[M]}}}return null}},{key:"render",value:function(){var w=this;if(!ud(this))return null;var A=this.props,y=A.children,O=A.className,S=A.width,P=A.height,$=A.style,N=A.compact,j=A.title,C=A.desc,k=hb(A,Z7),_=de(k,!1);if(N)return T.createElement(fg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(dl,ta({},_,{width:S,height:P,title:j,desc:C}),this.renderClipPath(),pd(y,this.renderMap)));if(this.props.accessibilityLayer){var D,M;_.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,_.role=(M=this.props.role)!==null&&M!==void 0?M:"application",_.onKeyDown=function(U){w.accessibilityManager.keyboardEvent(U)},_.onFocus=function(){w.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return T.createElement(fg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",ta({className:me("recharts-wrapper",O),style:z({position:"relative",cursor:"default",width:S,height:P},$)},B,{ref:function(V){w.container=V}}),T.createElement(dl,ta({},_,{width:S,height:P,title:j,desc:C,style:vB}),this.renderClipPath(),pd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);le(m,"displayName",r),le(m,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),le(m,"getDerivedStateFromProps",function(v,x){var b=v.dataKey,w=v.data,A=v.children,y=v.width,O=v.height,S=v.layout,P=v.stackOffset,$=v.margin,N=x.dataStartIndex,j=x.dataEndIndex;if(x.updateId===void 0){var C=Ob(v);return z(z(z({},C),{},{updateId:0},h(z(z({props:v},C),{},{updateId:0}),x)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:O,prevLayout:S,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(b!==x.prevDataKey||w!==x.prevData||y!==x.prevWidth||O!==x.prevHeight||S!==x.prevLayout||P!==x.prevStackOffset||!un($,x.prevMargin)){var k=Ob(v),_={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},D=z(z({},wb(x,w,S)),{},{updateId:x.updateId+1}),M=z(z(z({},k),_),D);return z(z(z({},M),h(z({props:v},M),x)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:O,prevLayout:S,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(!ul(A,x.prevChildren)){var B,U,V,E,R=mt(A,In),F=R&&(B=(U=R.props)===null||U===void 0?void 0:U.startIndex)!==null&&B!==void 0?B:N,W=R&&(V=(E=R.props)===null||E===void 0?void 0:E.endIndex)!==null&&V!==void 0?V:j,G=F!==N||W!==j,X=!fe(w),Q=X&&!G?x.updateId:x.updateId+1;return z(z({updateId:Q},h(z(z({props:v},x),{},{updateId:Q,dataStartIndex:F,dataEndIndex:W}),x)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:W})}return null}),le(m,"renderActiveDot",function(v,x,b){var w;return T.isValidElement(v)?w=T.cloneElement(v,x):pe(v)?w=v(x):w=T.createElement(Zo,x),T.createElement(xe,{className:"recharts-active-dot",key:b},w)});var g=T.forwardRef(function(x,b){return T.createElement(m,ta({},x,{ref:b}))});return g.displayName=m.displayName,g},PB=AB({chartName:"ComposedChart",GraphicalChild:[vi,Ar,Bn,Ts],axisComponents:[{axisType:"xAxis",AxisComp:Ps},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:RL});const na=({className:e,width:t,height:r,rounded:n=!1})=>p.jsx("div",{className:se("animate-pulse bg-gray-200",n?"rounded-full":"rounded",e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r}}),xi=({className:e})=>p.jsxs("div",{className:se("rounded-lg border border-gray-200 bg-white p-[16px]",e),children:[p.jsxs("div",{className:"flex items-center gap-2 mb-[12px]",children:[p.jsx(na,{className:"h-[16px] w-[64px]"}),p.jsx(na,{className:"h-[16px] w-[16px]",rounded:!0})]}),p.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[p.jsx(na,{className:"h-[32px] w-[80px]"}),p.jsx(na,{className:"h-[24px] w-[48px] rounded-md"})]})]}),Tb=({className:e,chartType:t="line",height:r=300})=>{const n=o=>{if(o.length===0)return"";let s=`M ${o[0].x} ${o[0].y}`;for(let l=1;l<o.length;l++){const c=o[l-1],u=o[l],f=c.x+(u.x-c.x)*.4,d=c.y,h=c.x+(u.x-c.x)*.6,m=u.y;s+=` C ${f} ${d} ${h} ${m} ${u.x} ${u.y}`}return s},a=(o=7)=>Array.from({length:o},(u,f)=>({x:f/(o-1)*100,y:80-Math.random()*60})),i=()=>{switch(t){case"bar":return p.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-[16px] pb-[16px]",children:[...Array(7)].map((v,x)=>p.jsx(na,{className:"w-[32px] bg-blue-100",height:`${Math.random()*60+20}%`},x))});case"line":const o=a(12),s=n(o),l=o[o.length-1],c=o[0],u=`${s} L ${l.x} 100 L ${c.x} 100 Z`;return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:u,fill:"url(#skeleton-area-fill)"}),p.jsx("path",{d:s,stroke:"url(#skeleton-line-shimmer)",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"area":const f=a(),d=n(f),h=f[f.length-1],m=f[0],g=`${d} L ${h.x} 90 L ${m.x} 90 Z`;return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),p.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),p.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),p.jsx("path",{d:g,fill:"url(#skeleton-area-gradient)"}),p.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return p.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-[16px]",children:p.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[p.jsxs("defs",{children:[p.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:p.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:p.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:p.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),p.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:p.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:p.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),p.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-4)",strokeWidth:"3",strokeDasharray:"15 85",strokeDashoffset:"110"})]})});default:return p.jsx("div",{className:"absolute inset-0 p-[16px]",children:p.jsxs("div",{className:"w-full h-full relative",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:p.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),p.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((v,x)=>p.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${x*.2}s`}},x))})]})})}};return p.jsx("div",{className:se("w-full",e),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative",style:{height:`${r}px`},children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&p.jsxs("div",{className:"ml-[56px] flex justify-between items-center mt-[12px]",children:[p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[16px]"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-[12px] mt-[8px]",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-[16px] rounded w-[256px]"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-[8px] h-[8px] bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-[16px] rounded flex-1"})]})]})]})})},jB=({active:e,payload:t,label:r,config:n})=>{var o;if(!e||!t||!t.length)return null;const a=t.filter(s=>s.name&&s.name!==""&&s.name!==s.dataKey);if(a.length===0)return null;const i=((o=n.tooltip)==null?void 0:o.style)==="dark";return p.jsxs("div",{className:se("rounded-lg border px-[12px] py-[8px] text-xs shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[p.jsx("div",{className:se("font-medium mb-[8px]",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),p.jsx("div",{className:"space-y-1",children:a.map((s,l)=>p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:s.color}}),p.jsx("span",{className:se("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),p.jsx("span",{className:se("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},Ab=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var y,O;const{data:a,dataKey:i,color:o="#3b82f6",lines:s,dateRange:l,yAxisLabel:c,height:u=300,tooltip:f={show:!0,style:"dark"}}=e,h=(S=>{if(!S||S.length===0)return[];const P=[...S].sort((_,D)=>{const M=new Date(_.date),B=new Date(D.date);return M.getTime()-B.getTime()});let $,N;l!=null&&l.start&&(l!=null&&l.end)?($=new Date(l.start),N=new Date(l.end)):($=new Date(P[0].date),N=new Date(P[P.length-1].date));const j=new Map;P.forEach(_=>{j.set(_.date,_)});const C=[],k=new Date($);for(;k<=N;){const _=k.toISOString().split("T")[0];if(j.has(_))C.push(j.get(_));else{const D={date:_,users:0,sessions:0,messages:0,totalTokens:0,inputTokens:0,outputTokens:0,agentRuns:0,toolRuns:0,modelRuns:0,codeTools:0,workflowTools:0,knowledgeTools:0,mcpTools:0,value:0,count:0};if(P.length>0){const M=P[0];Object.keys(M).forEach(B=>{typeof M[B]=="number"&&!(B in D)&&(D[B]=0)})}C.push(D)}k.setDate(k.getDate()+1)}return C})(a),m=S=>{const P=new Date(S);return isNaN(P.getTime())?S:P.toLocaleDateString("en-US",{month:"short",day:"numeric"})},g=()=>{if(!h||h.length===0)return 0;const S=h.length;return S<=20?0:S<=31?1:S<=61?2:Math.floor(S/7)-1},v=S=>x()&&!Number.isInteger(S)?"":S>=1e3?`${Math.floor(S/1e3)}k`:Math.floor(S).toString(),x=()=>{const S=["users","sessions","messages","runs","agents","tools","models","Number of Users","Number of Sessions","Number of Messages","Number of Agent Runs","Number of Tool Runs","Number of Model Runs","agentRuns","toolRuns","modelRuns"];return!!(c&&S.some(P=>c.toLowerCase().includes(P.toLowerCase()))||i&&S.some(P=>i.toLowerCase().includes(P.toLowerCase()))||e.title&&S.some(P=>e.title.toLowerCase().includes(P.toLowerCase()))||s&&s.some(P=>P.label&&S.some($=>P.label.toLowerCase().includes($.toLowerCase()))))},w=s&&s.length>0?s:[{dataKey:i||"value",color:o,label:e.title,strokeWidth:2}];if(r)return console.log("AnalyticsChart: Loading state active"),p.jsx(Tb,{className:t,chartType:e.type,height:u});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),p.jsx("div",{className:se("w-full",t),children:p.jsxs("div",{className:"relative bg-gray-50/30",children:[p.jsxs("div",{className:"relative h-[300px] mb-6",children:[p.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),p.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[p.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:p.jsx("svg",{className:"w-6 h-6 !h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),p.jsxs("div",{className:"text-center max-w-[352px]",children:[p.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),p.jsx("p",{className:"font-normal text-center text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),p.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),p.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[p.jsx("div",{className:"flex-1",children:p.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),p.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[p.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),p.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const A=S=>{var $;if(!n||!S||!S.activePayload)return;const P=($=S.activePayload[0])==null?void 0:$.payload;P&&P.date&&(console.log("Chart data point clicked:",{date:P.date,data:P}),n(P,P.date))};return console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart original data length:",a==null?void 0:a.length),console.log("AnalyticsChart filled data length:",h.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",h.length>0?{first:(y=h[0])==null?void 0:y.date,last:(O=h[h.length-1])==null?void 0:O.date,totalDays:h.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",w),console.log("Sample filled data points:",h.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),p.jsxs("div",{className:se("w-full",t),children:[p.jsx("div",{className:"relative bg-gray-50/30",children:p.jsx(gk,{width:"100%",height:u,children:p.jsxs(PB,{data:h,onClick:A,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:w.map((S,P)=>p.jsxs("linearGradient",{id:`gradient-${S.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:S.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:S.color,stopOpacity:.01})]},`gradient-${P}`))}),p.jsx(Lg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),p.jsx(Ps,{dataKey:"date",tickFormatter:m,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:g()}),p.jsx(_s,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:v,tickMargin:10,allowDecimals:!x(),domain:x()?["dataMin","dataMax"]:void 0,label:c?{value:c,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),f.show&&p.jsx(Wt,{content:S=>p.jsx(jB,{...S,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),w.map(S=>p.jsx(Ar,{type:"monotone",dataKey:S.dataKey,stroke:"none",fill:`url(#gradient-${S.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${S.dataKey}`)),w.map(S=>p.jsx(vi,{type:"monotone",dataKey:S.dataKey,stroke:S.color,strokeWidth:2.5,strokeDasharray:S.strokeDasharray,dot:!1,activeDot:{r:5,fill:S.color,stroke:S.color,strokeWidth:2},name:S.label},S.dataKey))]})})}),p.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[p.jsx("div",{children:l&&p.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-[4px]",children:[p.jsx("span",{className:"text-gray-500",children:"Showing data from"}),p.jsxs("span",{className:"font-medium text-gray-700",children:[new Date(l.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(l.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})]})}),p.jsx("div",{className:"flex items-center gap-4",children:p.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:w.map(S=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:S.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:S.label})]},S.dataKey))})})]})]})},Pb=({config:e,className:t})=>{const{title:r,data:n,columns:a,pagination:i={enabled:!0,pageSize:10},sorting:o={enabled:!0},filtering:s={enabled:!0,searchable:!0}}=e,[l,c]=T.useState(o.defaultSort||null),[u,f]=T.useState(""),[d,h]=T.useState(1),m=T.useMemo(()=>{let y=[...n];return s.searchable&&u&&(y=y.filter(O=>a.some(S=>{const P=O[S.key];return P==null?void 0:P.toString().toLowerCase().includes(u.toLowerCase())}))),l&&y.sort((O,S)=>{const P=O[l.key],$=S[l.key];if(typeof P=="number"&&typeof $=="number")return l.order==="asc"?P-$:$-P;const N=(P==null?void 0:P.toString())||"",j=($==null?void 0:$.toString())||"",C=N.localeCompare(j);return l.order==="asc"?C:-C}),y},[n,a,u,l,s.searchable]),g=i.enabled?Math.ceil(m.length/i.pageSize):1,v=i.enabled?m.slice((d-1)*i.pageSize,d*i.pageSize):m,x=y=>{!o.enabled||!y.sortable||c(O=>(O==null?void 0:O.key)===y.key?O.order==="asc"?{key:y.key,order:"desc"}:null:{key:y.key,order:"asc"})},b=y=>{f(y),h(1)},w=(y,O,S)=>O.render?O.render(y,S):O.formatter?O.formatter(y,S):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",A=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?p.jsx(Sf,{className:"w-[16px] h-[16px]"}):p.jsx(ur,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(Sf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(ur,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsx("h3",{className:"text-md font-medium text-gray-700",children:r}),s.enabled&&s.searchable&&p.jsxs("div",{className:"relative",children:[p.jsx(_f,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),p.jsx("input",{type:"text",placeholder:"Search...",value:u,onChange:y=>b(y.target.value),className:"pl-[36px] pr-[12px] py-[8px] border border-gray-200 rounded-lg text-xs focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),p.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:p.jsxs("table",{className:"w-full",children:[p.jsx("thead",{className:"bg-gray-50",children:p.jsx("tr",{children:a.map(y=>p.jsx("th",{className:se("px-[16px] py-[12px] text-left text-xs font-medium text-gray-500 uppercase tracking-wider",y.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",y.align==="center"&&"text-center",y.align==="right"&&"text-right"),style:{width:y.width},onClick:()=>x(y),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{children:y.title}),A(y)]})},y.key))})}),p.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:v.map((y,O)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(S=>p.jsx("td",{className:se("px-[16px] py-[12px] text-xs text-gray-900",S.align==="center"&&"text-center",S.align==="right"&&"text-right"),children:w(y[S.key],S,y)},S.key))},O))})]})}),i.enabled&&g>1&&p.jsxs("div",{className:"flex items-center justify-between mt-4",children:[p.jsxs("div",{className:"text-xs text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,m.length)," of"," ",m.length," results"]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>h(y=>Math.max(1,y-1)),disabled:d===1,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,g)},(y,O)=>{const S=Math.max(1,Math.min(g-4,d-2))+O;return S>g?null:p.jsx("button",{onClick:()=>h(S),className:se("px-[12px] py-[4px] text-xs border rounded",d===S?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:S},S)}),p.jsx("button",{onClick:()=>h(y=>Math.min(g,y+1)),disabled:d===g,className:"px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),v.length===0&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:u?"No results found for your search.":"No data available."})]})},_B=(e,t)=>{switch(e){case"human":return t==="agent"?"agent-avatars":"avatars";case"logo":return"profileLogos";case"icon":case"inlineTool":case"toolLibrary":case"KNOWLEDGE":case"MCP":return"profileIcons";default:return t==="agent"?"agent-avatars":"avatars"}},EB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},CB=(e,t)=>{const r=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#84CC16"],n=e.split("").reduce((a,i)=>a+i.charCodeAt(0),0)%r.length;if(t==="workflowtool"){const a=e.toLowerCase();let i="toolLibrary";return a.includes("code")||a.includes("inline")||a.includes("calculate")?i="inlineTool":a.includes("knowledge")||a.includes("document")||a.includes("fetch")?i="KNOWLEDGE":(a.includes("mcp")||a.includes("protocol"))&&(i="MCP"),{name:"fallback",type:i,color:r[n]}}return t==="model"?{name:"fallback",type:"icon",color:r[n]}:{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},$B=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=window.location.protocol+"//"+window.location.host,n=_B(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},jb=e=>{if(!e)return"assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},kB={xs:"w-6 h-6 text-xs",small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-base",large:"w-12 h-12 text-lg"},Rt={inlineTool:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3533_7514)">
256
256
  <path d="M8.5 8.5L11 6L8.5 3.5M3.5 3.5L1 6L3.5 8.5M7 1.5L5 10.5" stroke="#EF6820" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/></g>
257
257
  <defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
258
258
  </svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -261,8 +261,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
261
261
  <path d="M6 5.5H3M4 7.5H3M7 3.5H3M9 3.4V8.6C9 9.44008 9 9.86012 8.83651 10.181C8.6927 10.4632 8.46323 10.6927 8.18099 10.8365C7.86012 11 7.44008 11 6.6 11H3.4C2.55992 11 2.13988 11 1.81901 10.8365C1.53677 10.6927 1.3073 10.4632 1.16349 10.181C1 9.86012 1 9.44008 1 8.6V3.4C1 2.55992 1 2.13988 1.16349 1.81901C1.3073 1.53677 1.53677 1.3073 1.81901 1.16349C2.13988 1 2.55992 1 3.4 1H6.6C7.44008 1 7.86012 1 8.18099 1.16349C8.46323 1.3073 8.6927 1.53677 8.83651 1.81901C9 2.13988 9 2.55992 9 3.4Z" stroke="#7A5AF8" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
262
262
  </svg>`,MCP:`<svg width="14" height="14" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
263
263
  <path d="M1.8125 10.7455L10.647 1.91124C11.8411 0.717087 13.7773 0.717087 14.9714 1.91124C16.1655 3.10539 16.1655 5.0415 14.9714 6.23565M14.9714 6.23565L8.29911 12.9077M14.9714 6.23565C16.1655 5.0415 18.1018 5.0415 19.2958 6.23565C20.4899 7.4298 20.4899 9.36593 19.2958 10.56L11.7665 18.0893C11.3443 18.5115 11.3443 19.1961 11.7665 19.6182L13.164 21.0158M16.9479 8.58236L10.2756 15.2547C9.08153 16.4488 7.1453 16.4488 5.95123 15.2547C4.75716 14.0605 4.75716 12.1244 5.95123 10.9303L12.6234 4.25814" stroke="#101828" stroke-width="2.00016" stroke-linecap="round" stroke-linejoin="round"/>
264
- </svg>`},kB=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Rt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Rt.toolLibrary;if(r.includes("knowledge"))return Rt.KNOWLEDGE;if(r.includes("mcp"))return Rt.MCP;if(Rt[e])return Rt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Rt.inlineTool:n.includes("library")||n.includes("workflow")?Rt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Rt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Rt.MCP:Rt.toolLibrary},wi=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,u]=T.useState(!1),[c,f]=T.useState(!1),[d,h]=T.useState(!1),m=_B(e),y=$B[r];if(t==="model"){const x=jb(o),w=()=>{h(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${y} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-white text-xs font-bold",children:A})})}return p.jsx("img",{src:x,alt:s||a,className:`${y} rounded ${n}`,onError:w})}if(m!=null&&m.name&&m.name!=="fallback"&&!l){const x=CB(m,t),w=()=>{u(!0)};return p.jsx("img",{src:x,alt:a,className:`${y} rounded-full object-cover ${n}`,onError:w})}if(l&&!c&&t==="agent"){const x=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,w=()=>{f(!0)};return p.jsx("img",{src:x,alt:a,className:`${y} rounded-full object-cover ${n}`,onError:w})}if(t==="model"){const x=jb(o),w=()=>{h(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${y} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-white text-xs font-bold",children:A})})}return p.jsx("img",{src:x,alt:s||a,className:`${y} rounded ${n}`,onError:w})}const v=m||EB(a,t);if(t==="workflowtool"){const x=i||v.type||"toolLibrary",w=kB(x,a);return p.jsx("div",{className:`${y} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:p.jsx("div",{dangerouslySetInnerHTML:{__html:w}})})}const b=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`;return p.jsx("img",{src:b,alt:a,className:`${y} rounded-full object-cover ${n}`})},_b=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[p.jsx("div",{className:"text-left",children:"Name"}),p.jsx("div",{className:"text-center",children:"Runs"}),p.jsx("div",{className:"text-center",children:"Response Time"}),p.jsx("div",{className:"text-center",children:"Tokens"})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-[8px]",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(wi,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),p.jsx("div",{className:"min-w-0 flex-1 w-full",children:p.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Agent"})})]}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})};function MB(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","inlineTool","code tool","code","tool","event","EVENT"].includes(e)||["inlinetool","inlineTool","code tool","code","tool","event"].includes(t)?"bg-orange-100 text-orange-800 border-orange-200":["toollibrary","toolLibrary","workflow tool"].includes(e)||["toollibrary","toollibrary","workflow tool"].includes(t)?"bg-blue-100 text-blue-800 border-blue-200":["mcp","MCP","mcpTool","mcpTool"].includes(e)||["mcp","mcptool"].includes(t)?"bg-green-100 text-green-800 border-green-200":["knowledge","KNOWLEDGE","knowledge tool"].includes(e)||["knowledge","knowledge tool"].includes(t)?"bg-purple-100 text-purple-800 border-purple-200":"bg-gray-100 text-gray-800 border-gray-200"}function NB(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","code tool","code","tool","event","inlineTool"].includes(t)?"Code Tool":["toollibrary","workflow tool"].includes(t)?"Workflow Tool":["mcp","mcptool"].includes(t)?"MCP Tool":["knowledge","knowledge tool","knowledge"].includes(t)||e==="KNOWLEDGE"?"Knowledge":e==="inlineTool"?"Code Tool":e==="toolLibrary"?"Workflow Tool":e==="KNOWLEDGE"?"Knowledge":e==="MCP"||e==="mcpTool"?"MCP Tool":"Code Tool"}const Eb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[p.jsx("div",{className:"text-left",children:"Name"}),p.jsx("div",{className:"text-center",children:"Type"}),p.jsx("div",{className:"text-center",children:"Runs"}),p.jsx("div",{className:"text-center",children:"Response Time"})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-[8px]",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(wi,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.toolType||o.type})}),p.jsx("div",{className:"min-w-0 flex-1 w-full",children:p.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Tool"})})]}),p.jsx("div",{className:"flex items-center justify-center",children:p.jsx("span",{className:se("inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",MB(o.toolType||o.type||"Default")),children:NB(o.toolType||o.type||"Default")})}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},DB=e=>{if(!e)return"/assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},IB=e=>{if(!e)return"";const t=e.toLowerCase(),r={openai:"OpenAI","open ai":"OpenAI",chatopenai:"OpenAI",gpt:"OpenAI",anthropic:"Anthropic",claude:"Anthropic",google:"Google",gemini:"Google Gemini",chatgooglegenerativeai:"Google Gemini",googlegenerativeai:"Google Gemini",palm:"Google PaLM",azurechatopenai:"Azure OpenAI","azure open ai":"Azure OpenAI",azureopenai:"Azure OpenAI","azure openai":"Azure OpenAI",azure:"Azure OpenAI",aws:"AWS Bedrock",bedrock:"AWS Bedrock","aws bedrock":"AWS Bedrock",awsbedrock:"AWS Bedrock",amazon:"AWS Bedrock",cohere:"Cohere",meta:"Meta",llama:"Meta LLaMA",mistral:"Mistral",huggingface:"Hugging Face",together:"Together AI",replicate:"Replicate"};if(r[t])return r[t];for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return a;return e.charAt(0).toUpperCase()+e.slice(1)},LB=({provider:e})=>{const[t,r]=T.useState(!1),n=DB(e),a=()=>{r(!0)};if(t){const i=e?e.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:p.jsx("span",{className:"text-white text-xs font-bold",children:i})})}return p.jsx("img",{src:n,alt:e||"Model",className:"w-6 h-6 rounded",onError:a})},Cb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[p.jsx("div",{className:"text-left",children:"Model Name"}),p.jsx("div",{className:"text-center",children:"Runs"}),p.jsx("div",{className:"text-center",children:"Tokens"}),p.jsx("div",{className:"text-center",children:"Response Time"})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-[8px]",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(LB,{provider:o.provider})}),p.jsxs("div",{className:"min-w-0 flex-1 w-full",children:[p.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||o.modelName||"Unknown Model"}),o.provider&&p.jsx("div",{className:"text-xs text-gray-500 truncate",children:IB(o.provider)})]})]}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.runs||0)}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.tokens||o.totalTokens||0)}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||(o.avgResponseTime?`${o.avgResponseTime}ms`:"N/A")})]},o.id||s))}),r<e.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},RB=e=>{switch(e){case"agentRuns":return{title:"Agent Runs",entityName:"Agents"};case"toolRuns":return{title:"Tool Runs",entityName:"Tools"};case"modelRuns":return{title:"Model Runs",entityName:"Models"};default:return{title:"Runs",entityName:"Items"}}},BB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),$b=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var O;const s=RB(n),[l,u]=T.useState(10),[c,f]=T.useState("all"),[d,h]=T.useState(!1),m=[{label:`All ${s.entityName}`,value:"all"},...a.map(S=>({label:S.name,value:S.id}))],y=c==="all"?a:a.filter(S=>S.id===c),v=()=>{f("all"),h(!1),u(10),t()};T.useEffect(()=>{const S=E=>{E.key==="Escape"&&v()},j=E=>{d&&(E.target.closest(".filter-dropdown")||h(!1))};return e&&(document.addEventListener("keydown",S),document.addEventListener("mousedown",j),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",S),document.removeEventListener("mousedown",j),document.body.style.overflow="unset"}},[e,d,v]),T.useEffect(()=>{e&&(f("all"),h(!1),u(10))},[e]);const b=S=>new Date(S).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),x=()=>{u(S=>Math.min(S+10,y.length))},w=S=>{f(S),h(!1),u(10)};if(!e)return null;const A=y.slice(0,l),g=((O=m.find(S=>S.value===c))==null?void 0:O.label)||`All ${s.entityName}`;return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",onClick:v}),p.jsxs("div",{className:se("fixed right-0 top-0 h-full w-[600px] bg-white shadow-[0px_20px_24px_-4px_rgba(16,24,40,0.08),0px_8px_8px_-4px_rgba(16,24,40,0.03)] z-50 transform transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full",o),children:[p.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]",children:[p.jsx("h2",{className:"text-lg font-semibold text-[#101828]",children:s.title}),p.jsx("button",{onClick:v,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:p.jsx(Ef,{className:"h-5 w-5 text-[#101828]"})})]}),p.jsxs("div",{className:"flex flex-col h-[calc(100%-64px)] p-6 gap-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"text-sm font-medium text-[#344054]",children:[s.title," (",b(r),")"]}),p.jsxs("div",{className:"w-[210px] relative filter-dropdown",children:[p.jsxs("button",{onClick:()=>h(!d),className:"w-full bg-white border border-[#d0d5dd] rounded-lg px-3.5 py-2.5 flex items-center justify-between text-sm text-[#101828] hover:bg-gray-50 transition-colors",children:[p.jsx("span",{children:g}),p.jsx(cr,{className:"h-4 w-4 text-[#101828]"})]}),d&&p.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto",children:m.map(S=>p.jsx("button",{onClick:()=>w(S.value),className:se("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",c===S.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:S.label},S.value))})]})]}),p.jsxs("div",{className:"flex-1 overflow-hidden",children:[p.jsx("div",{className:"bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2",children:p.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center",children:[p.jsx("div",{className:"col-span-2 px-0 py-2",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Name"})}),p.jsx("div",{className:"flex justify-center px-0 py-2",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Runs"})}),p.jsx("div",{className:"flex justify-center px-0 py-2",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Response Time"})})]})}),p.jsx("div",{className:"overflow-y-auto max-h-[calc(100%-40px)]",children:A.length===0?p.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[p.jsxs("h3",{className:"text-md font-medium text-gray-900 mb-[8px]",children:["No ",s.title.toLowerCase()," for this date"]}),p.jsxs("p",{className:"text-xs text-gray-500",children:["There were no ",s.title.toLowerCase()," recorded on ",b(r),"."]})]}):p.jsxs(p.Fragment,{children:[A.map((S,j)=>p.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",children:[p.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(wi,{icon:S.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"model",size:"small",name:S.name,toolType:S.toolType||S.type,provider:S.provider,modelName:S.modelName})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:S.name}),n==="modelRuns"&&S.provider&&p.jsx("div",{className:"text-xs text-[#475467] truncate",children:S.provider})]})]}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:BB(S.runs)})}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:S.responseTime})})]},S.id||j)),l<y.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:x,className:"bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",children:"Load 10 more"})})]})})]})]})]})]})};class kb{constructor(t=""){Bt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Bt(this,"baseUrl","");Bt(this,"endpoints",{});this.baseUrl=t,this.initializeEndpoints()}setBaseUrl(t){this.baseUrl=t,this.initializeEndpoints()}getEndpoint(t){return this.endpoints[t]||{endpoint:"",method:"GET"}}getBaseUrl(){return this.baseUrl}initializeEndpoints(){const t=`${this.baseUrl}${this.API_PATH}`;this.endpoints["usage-analytics.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.sessions.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.messages.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.users.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.tokens.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.agent-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.model-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.tool-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH}}getAvailableEndpoints(){return Object.keys(this.endpoints)}hasEndpoint(t){return t in this.endpoints}}class Mb{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new kb(t.baseUrl),this.defaultHeaders={"Content-Type":"application/json",...t.defaultHeaders},this.timeout=t.timeout||3e4}updateConfig(t){t.baseUrl&&this.endpointsService.setBaseUrl(t.baseUrl),t.defaultHeaders&&(this.defaultHeaders={...this.defaultHeaders,...t.defaultHeaders}),t.timeout&&(this.timeout=t.timeout)}async invoke(t,r,n,a){const i=this.endpointsService.getEndpoint(t);if(!i.endpoint)throw new Error(`Endpoint not found for service: ${t}`);const o=this.prepareRequest(i,r,n);try{const s=new AbortController,l=setTimeout(()=>s.abort(),(a==null?void 0:a.timeout)||this.timeout),u=await fetch(o.url,{method:o.method,headers:o.headers,body:o.body,signal:(a==null?void 0:a.signal)||s.signal});if(clearTimeout(l),!u.ok)throw new Error(`HTTP Error: ${u.status} ${u.statusText}`);return await u.json()}catch(s){throw s instanceof Error?s.name==="AbortError"?new Error("Request timeout"):s:new Error("Unknown error occurred during API call")}}prepareRequest(t,r,n){const a={...this.defaultHeaders,...n},i={};Object.entries(a).forEach(([l,u])=>{u!==void 0&&(i[l]=u)});let o=t.endpoint,s;if(t.method==="GET"&&r){const l=this.buildQueryParams(r);o+=`?${l}`}else r&&(s=JSON.stringify(r));return{url:o,method:t.method,headers:i,body:s}}buildQueryParams(t){const r={json:t},n=new URLSearchParams;return n.append("input",JSON.stringify(r)),n.append("rnd",Math.random().toString(36).substring(7)),n.toString()}getBaseUrl(){return this.endpointsService.getBaseUrl()}hasEndpoint(t){return this.endpointsService.hasEndpoint(t)}getAvailableEndpoints(){return this.endpointsService.getAvailableEndpoints()}}class Kt{constructor(t){Bt(this,"apiInvoker");Bt(this,"projectId");Bt(this,"environment");Bt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new Mb(r),this.projectId=t.projectId,this.environment=t.environment,this.defaultTimeRange=t.defaultTimeRange}updateConfig(t){(t.baseUrl||t.headers)&&this.apiInvoker.updateConfig({baseUrl:t.baseUrl,defaultHeaders:t.headers}),t.projectId&&(this.projectId=t.projectId),t.environment&&(this.environment=t.environment),t.defaultTimeRange&&(this.defaultTimeRange=t.defaultTimeRange,console.log("🔄 API Service: Updated defaultTimeRange:",this.defaultTimeRange))}getDefaultTimeRange(){return this.defaultTimeRange||Kt.getDateRange(7)}async fetchEnvironments(){try{const r=`${this.apiInvoker.getBaseUrl()}/aaa/api/v1/apps/${this.projectId}/environments?rnd=${Math.random().toString(36).substring(2,8)}`;console.log("🌍 Fetching environments for project:",this.projectId),console.log("🔗 Environment API URL:",r);const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...this.apiInvoker.defaultHeaders}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();return console.log("✅ Environments fetched successfully:",a.map(i=>({name:i.envName,enabled:i.isEnabled,status:i.status}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||Kt.getTimeDimension(t,r);console.log("📊 Fetching usage analytics cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"usage-analytics",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("usage-analytics.cards",o)).result.data.json}async fetchRunsCards(t,r,n,a=[]){const i=n||Kt.getTimeDimension(t,r);console.log("📊 Fetching runs cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"runs",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("runs.cards",o)).result.data.json}async fetchTimeSeriesData(t,r,n,a,i,o=[]){const s=i||Kt.getTimeDimension(n,a);console.log("📊 Fetching time series data:",{metric:t,category:r,dateRange:{fromTimestamp:n,toTimestamp:a},providedTimeDimension:i,resolvedTimeDimension:s});const l=`${r}.${t}.timeseries`,u={projectId:this.projectId,type:"time-series",category:r,envId:this.environment,fromTimestamp:n,toTimestamp:a,filter:o,metric:t,timeDimension:s};return(await this.apiInvoker.invoke(l,u)).result.data.json}transformUsageAnalyticsCards(t){const r=t.data.trends;console.log("Transforming usage analytics cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",info:"Number of unique users who interacted with the app",highlighted:!0,change:r!=null&&r.users?{value:Math.abs(r.users.changePercent),type:n(r.users.changePercent)}:void 0},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",info:"Number of conversations initiated with the app",highlighted:!1,change:r!=null&&r.sessions?{value:Math.abs(r.sessions.changePercent),type:n(r.sessions.changePercent)}:void 0},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Total messages exchanged between users and the app",highlighted:!1,change:r!=null&&r.messages?{value:Math.abs(r.messages.changePercent.total),type:n(r.messages.changePercent.total)}:void 0},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Total input and output tokens processed by the app for all interactions",highlighted:!1,change:r!=null&&r.tokens?{value:Math.abs(r.tokens.changePercent.total),type:n(r.tokens.changePercent.total)}:void 0}]}transformRunsCards(t){const r=t.data.trends;console.log("Transforming runs cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",info:"Number of times the AI agents were executed to handle user requests",highlighted:!0,change:r!=null&&r.agentRuns?{value:Math.abs(r.agentRuns.changePercent),type:n(r.agentRuns.changePercent)}:void 0},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of times various tools were triggered by the AI agents to complete tasks",highlighted:!1,change:r!=null&&r.toolRuns?{value:Math.abs(r.toolRuns.changePercent.total),type:n(r.toolRuns.changePercent.total)}:void 0},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",info:"Number of times the AI agents called various language models to generate responses",highlighted:!1,change:r!=null&&r.modelRuns?{value:Math.abs(r.modelRuns.changePercent),type:n(r.modelRuns.changePercent)}:void 0}]}transformTimeSeriesDataForMetric(t,r){var a;if(console.log("=== METRIC-SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse:",JSON.stringify(t,null,2)),console.log("Metric type:",r),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const n=t.data.map((i,o)=>{console.log(`Processing point ${o}:`,i);const s=new Date(i.timestamp),l=s.toISOString().split("T")[0],u=s.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c={date:l,timestamp:u,formattedDate:u,count:i.count||0,value:i.count||0,input_tokens:i.input_tokens||0,output_tokens:i.output_tokens||0,total_tokens:(i.input_tokens||0)+(i.output_tokens||0),inputTokens:i.input_tokens||0,outputTokens:i.output_tokens||0,totalTokens:(i.input_tokens||0)+(i.output_tokens||0),listView:i.listView||[],index:o};switch(r){case"users":c.users=i.count||0;break;case"sessions":c.sessions=i.count||0;break;case"messages":c.messages=i.count||0;break;case"tokens":c.tokens=i.count||0,i.input_tokens||i.output_tokens?c.totalTokens=(i.input_tokens||0)+(i.output_tokens||0):c.totalTokens=i.count||0;break;case"agentRuns":c.agentRuns=i.count||0;break;case"toolRuns":c.toolRuns=i.count||0;break;case"modelRuns":c.modelRuns=i.count||0;break;default:c.users=i.count||0,c.sessions=i.count||0,c.messages=i.count||0,c.tokens=i.count||0,c.agentRuns=i.count||0,c.toolRuns=i.count||0,c.modelRuns=i.count||0}return console.log(`Transformed point ${o} for metric ${r}:`,c),c});return console.log("Final transformed data array:",JSON.stringify(n,null,2)),console.log("Sample transformed point for chart:",n[0]),console.log("Populated metric property:",r,"=",(a=n[0])==null?void 0:a[r||"count"]),console.log("=== END METRIC-SPECIFIC TRANSFORM DEBUG ==="),n}transformTimeSeriesData(t){return this.transformTimeSeriesDataForMetric(t)}transformAgentsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>{var o,s;let a="",i=null;if(r.icon)try{if(i=typeof r.icon=="string"?JSON.parse(r.icon):r.icon,i.name){const l=((o=r.agentName)==null?void 0:o.replace(/\s+/g,""))||`agent${n}`,u=((s=i.color)==null?void 0:s.replace("#",""))||"b6e3f4";a=`https://api.dicebear.com/7.x/avataaars/svg?seed=${l}&backgroundColor=${u}&backgroundType=solid`}}catch{console.warn("Failed to parse icon data:",r.icon)}return{id:`agent-${n+1}`,name:r.agentName||`Agent ${n+1}`,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*150),successRate:r.successRate?`${Math.round(r.successRate)}%`:"95%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:a||`https://api.dicebear.com/7.x/avataaars/svg?seed=agent${n}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:r.icon||void 0}}):(console.warn("Invalid listView data for agents:",t),[])}transformToolsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`tool-${n+1}`,name:r.toolName||r.tool_name||`Tool ${n+1}`,type:r.type||r.toolType||r.tool_type||"Code Tool",runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*50),successRate:r.successRate?`${Math.round(r.successRate)}%`:"92%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon||r.tool_icon||void 0})):(console.warn("Invalid listView data for tools:",t),[])}transformModelsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`model-${n+1}`,name:r.modelName||`Model ${n+1}`,modelName:r.modelName,provider:r.provider,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",avgResponseTime:r.avgResponseTime,tokens:r.tokens||r.totalTokens||Math.floor((r.count||0)*300),totalTokens:r.totalTokens||r.tokens,successRate:r.successRate?`${Math.round(r.successRate)}%`:"98%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon})):(console.warn("Invalid listView data for models:",t),[])}extractAgentControlOptions(t){if(!Array.isArray(t))return[{label:"All Agents",value:"all"}];const r=[{label:"All Agents",value:"all"}];return t.forEach(n=>{var a;if(n.agentName){let i="";try{if(n.icon){const o=typeof n.icon=="string"?JSON.parse(n.icon):n.icon;if(o.name){const s=n.agentName.replace(/\s+/g,""),l=((a=o.color)==null?void 0:a.replace("#",""))||"b6e3f4";i=`https://api.dicebear.com/7.x/avataaars/svg?seed=${s}&backgroundColor=${l}&backgroundType=solid`}}}catch{console.warn("Failed to parse icon data for control:",n.icon)}r.push({label:n.agentName,value:n.agentName.replace(/\s+/g,"").toLowerCase(),avatar:i||`https://api.dicebear.com/7.x/avataaars/svg?seed=${n.agentName.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}}),r}extractToolControlOptions(t){if(!Array.isArray(t))return[{label:"All Tools",value:"all"}];const r=[{label:"All Tools",value:"all"}];return t.forEach(n=>{const a=n.toolName||n.tool_name;if(a){let i=function(o){if(!o)return"Code Tool";const s=o.toLowerCase();return["inlinetool","code tool","code","event"].includes(s)?"Code Tool":["toollibrary","workflow tool"].includes(s)?"Workflow Tool":["mcp","mcptool"].includes(s)?"MCP Tool":["knowledge","knowledge tool"].includes(s)||o==="KNOWLEDGE"?"Knowledge":o==="inlineTool"?"Code Tool":o==="toolLibrary"?"Workflow Tool":o==="MCP"||o==="mcpTool"?"MCP Tool":"Code Tool"};r.push({label:a,value:a.replace(/[-]/g,""),icon:n.icon||n.tool_icon||void 0,type:n.type||i(n.toolType||n.tool_type)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}];return t.forEach(n=>{n.modelName&&r.push({label:n.modelName,value:n.modelName.replace(/[-\.]/g,""),icon:n.icon,type:n.provider})}),r}async fetchTimeSeriesDataWithTableData(t,r,n,a,i,o=[]){const s=await this.fetchTimeSeriesData(t,r,n,a,i,o);let l=[];s.data.forEach(d=>{d.listView&&Array.isArray(d.listView)&&(l=[...l,...d.listView])});const u=this.aggregateListViewItems(l);let c=[],f=[];return t==="agent-runs"?(c=this.transformAgentsListViewToTable(u),f=this.extractAgentControlOptions(u)):t==="tool-runs"?(c=this.transformToolsListViewToTable(u),f=this.extractToolControlOptions(u)):t==="model-runs"&&(c=this.transformModelsListViewToTable(u),f=this.extractModelControlOptions(u)),{chartData:this.transformTimeSeriesDataForMetric(s,t.replace("-","")),tableData:c,controlOptions:f}}aggregateListViewItems(t){const r=new Map;return t.forEach(n=>{const a=n.agentName||n.toolName||n.modelName||"unknown";if(r.has(a)){const i=r.get(a);i.count=(i.count||0)+(n.count||0),i.avgResponseTime=i.avgResponseTime&&n.avgResponseTime?(i.avgResponseTime+n.avgResponseTime)/2:i.avgResponseTime||n.avgResponseTime,i.tokens=(i.tokens||0)+(n.tokens||0)}else r.set(a,{...n})}),Array.from(r.values())}async fetchEnhancedMetricsData(t,r,n,a=[]){try{const[i,o,s]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("model-runs","runs",t,r,n,a)]);return{agents:i,tools:o,models:s}}catch(i){throw console.error("Error fetching enhanced metrics data:",i),i}}async transformRunsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=h=>h>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("model-runs","runs",r,n,a,i),this.fetchTimeSeriesData("tool-runs","runs",r,n,a,i)]),d=this.transformTimeSeriesDataForToolRuns(f);return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,info:"Number of times the AI agents were executed to handle user requests",change:o!=null&&o.agentRuns?{value:Math.abs(o.agentRuns.changePercent),type:s(o.agentRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:l.chartData,dataKey:"agentRuns",color:"#0BA5EC",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Agent Runs",data:l.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:l.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of times various tools were triggered by the AI agents to complete tasks",highlighted:!1,change:o!=null&&o.toolRuns?{value:Math.abs(o.toolRuns.changePercent.total),type:s(o.toolRuns.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:d,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#667085",label:"Tool Runs"},{dataKey:"codeTools",color:"#F38744",label:"Code Tools"},{dataKey:"workflowTools",color:"#2970FF",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#7A5AF8",label:"Knowledge"},{dataKey:"mcpTools",color:"#47CD89",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Tool Runs",data:u.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:u.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,info:"Number of times the AI agents called various language models to generate responses",change:o!=null&&o.modelRuns?{value:Math.abs(o.modelRuns.changePercent),type:s(o.modelRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Model Runs",data:c.chartData,dataKey:"modelRuns",color:"#47CD89",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Model Runs",data:c.tableData,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:c.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}]}async transformUsageAnalyticsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=d=>d>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesData("users","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("sessions","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("messages","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("tokens","usage-analytics",r,n,a,i)]);return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,info:"Number of unique users who interacted with the app",change:o!=null&&o.users?{value:Math.abs(o.users.changePercent),type:s(o.users.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Users",data:this.transformTimeSeriesDataForMetric(l,"users"),dataKey:"users",color:"#4E5BA6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,info:"Number of conversations initiated with the app",change:o!=null&&o.sessions?{value:Math.abs(o.sessions.changePercent),type:s(o.sessions.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:this.transformTimeSeriesDataForMetric(u,"sessions"),dataKey:"sessions",color:"#0BA5EC",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Total messages exchanged between users and the app",highlighted:!1,change:o!=null&&o.messages?{value:Math.abs(o.messages.changePercent.total),type:s(o.messages.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Messages",data:this.transformTimeSeriesDataForMetric(c,"messages"),dataKey:"messages",color:"#E478FA",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Total input and output tokens processed by the app for all interactions",highlighted:!1,change:o!=null&&o.tokens?{value:Math.abs(o.tokens.changePercent.total),type:s(o.tokens.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:this.transformTimeSeriesDataForMetric(f,"tokens"),yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#FF692E",label:"Total Tokens"},{dataKey:"inputTokens",color:"#5925DC",label:"Input Tokens"},{dataKey:"outputTokens",color:"#E478FA",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}}]}transformTimeSeriesDataForToolRuns(t){if(console.log("=== TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse for tool runs:",JSON.stringify(t,null,2)),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const r=t.data.map((n,a)=>{console.log(`Processing point ${a}:`,n);const i=new Date(n.timestamp),o=i.toISOString().split("T")[0],s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=n.count||0;let u=0,c=0,f=0,d=0;if(n.listView&&Array.isArray(n.listView)){n.listView.forEach(y=>{const v=y.count||0,b=(y.toolType||y.tool_type||"").toLowerCase(),x=(y.toolName||y.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:x,count:v});const w=b.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(b)||["inlinetool","tool","code","codetool","event"].includes(w)?u+=v:["toollibrary","toolLibrary","workflow","workflowtool"].includes(b)||["toollibrary","workflow","workflowtool"].includes(w)?c+=v:["knowledge","KNOWLEDGE","knowledgetool"].includes(b)||["knowledge","knowledgetool"].includes(w)?f+=v:["mcp","MCP","mcptool","mcpTool"].includes(b)||["mcp","mcptool"].includes(w)?d+=v:(console.log(`Unknown tool type '${b}' for tool '${x}', defaulting to code tools`),u+=v)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,total:u+c+f+d,expectedTotal:l});const m=u+c+f+d;if(Math.abs(m-l)>1){console.warn(`Breakdown total (${m}) doesn't match expected total (${l}) for point ${a}`);const y=l-m;u+=y,console.log(`Adjusted codeTools by ${y} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const h={date:o,timestamp:s,formattedDate:s,toolRuns:l,value:l,count:l,codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,input_tokens:n.input_tokens||0,output_tokens:n.output_tokens||0,total_tokens:(n.input_tokens||0)+(n.output_tokens||0),inputTokens:n.input_tokens||0,outputTokens:n.output_tokens||0,totalTokens:(n.input_tokens||0)+(n.output_tokens||0),listView:n.listView||[],index:a};return console.log(`Transformed tool runs point ${a}:`,h),h});return console.log("Final tool runs transformed data:",JSON.stringify(r,null,2)),console.log("=== END TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),r}async fetchAllCardsData(t,r,n=[]){try{const[a,i]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,void 0,n),this.fetchRunsCards(t,r,void 0,n)]);return{usageAnalytics:this.transformUsageAnalyticsCards(a),runs:this.transformRunsCards(i)}}catch(a){throw console.error("Error fetching cards data:",a),a}}async fetchAllCardsDataWithEnhancedViews(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,n,a),this.fetchRunsCards(t,r,n,a)]),[s,l]=await Promise.all([this.transformUsageAnalyticsCardsWithEnhancedData(i,t,r,n,a),this.transformRunsCardsWithEnhancedData(o,t,r,n,a)]);return{usageAnalytics:s,runs:l}}catch(i){throw console.error("Error fetching enhanced cards data:",i),i}}async fetchDefaultTimeSeriesData(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchTimeSeriesData("sessions","usage-analytics",t,r,n,a),this.fetchTimeSeriesData("agent-runs","runs",t,r,n,a)]);return{sessions:this.transformTimeSeriesData(i),agentRuns:this.transformTimeSeriesData(o)}}catch(i){throw console.error("Error fetching default time series data:",i),i}}transformListViewForSlider(t,r){return Array.isArray(t)?t.map((n,a)=>{const i={id:`${r}-${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?n.avgResponseTime<1e3?`${Math.round(n.avgResponseTime)}ms`:`${(n.avgResponseTime/1e3).toFixed(2)}s`:"0ms",successRate:n.successRate?`${Math.round(n.successRate)}%`:void 0,tokens:n.totalTokens||n.tokens||0,icon:n.icon||n.tool_icon||void 0,aiModel:"gpt-4o"};switch(r){case"agentRuns":return{...i,name:n.agentName||`Agent ${a+1}`,type:"Agent",aiModel:this.extractAIModel(n)||"gpt-4o"};case"toolRuns":return{...i,name:n.toolName||n.tool_name||`Tool ${a+1}`,type:n.type||n.toolType||n.tool_type||"Code Tool",toolType:n.toolType||n.tool_type,aiModel:this.extractAIModel(n)||"gpt-4o"};case"modelRuns":return{...i,name:n.modelName||`Model ${a+1}`,modelName:n.modelName,provider:n.provider,type:n.provider||"Model",aiModel:n.modelName||n.model||"gpt-4o"};default:return{...i,name:`Item ${a+1}`,type:"Unknown",aiModel:"gpt-4o"}}}):(console.warn("Invalid listView data for slider:",t),[])}extractAIModel(t){if(t.modelName)return t.modelName;if(t.model)return t.model;if(t.llmModel)return t.llmModel;if(t.aiModel)return t.aiModel;const r=["gpt-4o","gpt-4o-mini","claude-3-5-haiku"];return r[Math.floor(Math.random()*r.length)]}static getDateRange(t=7){const r=new Date,n=new Date;return n.setDate(r.getDate()-t),{fromTimestamp:n.toISOString(),toTimestamp:r.toISOString()}}static getTimeDimension(t,r){const n=new Date(t),a=new Date(r),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=o.getTime()-i.getTime(),l=s/(1e3*60*60*24),u=i.toISOString().split("T")[0],c=o.toISOString().split("T")[0],f=u===c,d=new Date(n.getFullYear(),n.getMonth(),n.getDate()),h=f&&Math.abs(n.getTime()-d.getTime())<1e3,m=Math.abs(a.getTime()-n.getTime()),y=m<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:m,isVeryClose:y,fromStartOfDay:d.toISOString(),recommended:f||h||y||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||y||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const Nb=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,u]=T.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),c=(y,v)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:y,date:v,context:n});const b=n==null?void 0:n.metricType;if(!b||!["agentRuns","toolRuns","modelRuns"].includes(b)){console.log("Slider not applicable for metric type:",b);return}const x=y.listView||[];console.log("ListView data for clicked date:",x);const A=new Kt({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(x,b),g=y[b]||y.count||0;console.log("Opening slider with data:",{date:v,metricType:b,sliderData:A,totalRuns:g}),u({isOpen:!0,date:v,metricType:b,data:A,totalRuns:g})},f=()=>{u(y=>({...y,isOpen:!1}))},d=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),p.jsx("div",{className:"flex-1",children:p.jsx(Ab,{config:i,isLoading:r,onDataPointClick:c})})):null,h=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(_b,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(Eb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(Cb,{data:o.data})}):p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(Pb,{config:o})}):null,m=()=>{switch(a){case"chart":return d();case"table":return h();case"mixed":return p.jsxs("div",{className:se("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[d(),h()]});default:return p.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:se("w-full",t),children:m()}),p.jsx($b,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},Ms=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=T.useState(!1),[l,u]=T.useState(t||""),c=T.useRef(null),f=e.find(m=>m.value===l);T.useEffect(()=>{const m=y=>{c.current&&!c.current.contains(y.target)&&s(!1)};return o&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[o]);const d=m=>{i||(u(m),s(!1),n==null||n(m))},h=()=>{i||s(!o)};return p.jsxs("div",{ref:c,className:se("relative",a),children:[p.jsxs("button",{type:"button",className:se("flex h-[40px] text-left w-full items-center rounded-lg border border-gray-300 bg-white px-[14px] py-[10px] medium shadow-none outline-none focus-visible:border-ring focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-gray-25 transition-colors",a),onClick:h,disabled:i,children:[p.jsxs("div",{className:"flex items-center gap-[8px] w-full",children:[p.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:"ENV"}),p.jsx("span",{className:se("truncate w-full",!f&&"text-gray-700 font-medium text-sm"),children:f?f.label:r})]}),p.jsx(cr,{className:se("h-[16px] w-[16px] text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&p.jsx("div",{className:"absolute p-[4px] w-full top-full left-0 z-50 mt-1 bg-popover max-h-[300px] overflow-y-auto text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border shadow-md",children:e.map(m=>{const y=l===m.value;return p.jsxs("div",{role:"option",className:"relative group",children:[p.jsx("button",{className:se("focus:bg-gray-50 rounded-[4px] hover:bg-gray-50 focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center px-[14px] py-[10px] text-sm text-left outline-none transition-colors",m.disabled?"opacity-50 cursor-not-allowed text-gray-400":y?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-50"),onClick:()=>!m.disabled&&d(m.value),disabled:m.disabled,children:p.jsx("span",{className:"block whitespace-nowrap w-full",children:m.label})}),m.label.length>25&&p.jsx("div",{className:"absolute left-full top-0 ml-2 z-[60] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:p.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[m.label,p.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},m.value)})})]})},Db=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,maxItems:l=100,maxLabelLength:u=30})=>{const[c,f]=T.useState(!1),[d,h]=T.useState(""),[m,y]=T.useState(()=>{const M=t||r;return a?Array.isArray(M)?M:M?[M]:[]:M?[Array.isArray(M)?M[0]:M]:[]}),v=T.useRef(null);T.useEffect(()=>{const M=_=>{v.current&&!v.current.contains(_.target)&&f(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const b=(M,_=u)=>M.length<=_?M:M.substring(0,_)+"...",x=i?e.filter(M=>M.label.toLowerCase().includes(d.toLowerCase())):e,w=x.slice(0,l),A=x.length>l,g=M=>{let _;if(a){if(M==="all"){S();return}if(m.includes(M))_=m.filter(I=>I!==M),_=_.filter(I=>I!=="all");else{_=m.filter(D=>D!=="all"),_=[..._,M];const I=x.filter(D=>D.value!=="all").map(D=>D.value),C=_.filter(D=>D!=="all");C.length===I.length&&(_=["all",...C])}}else _=[M],f(!1);y(_);const P=a?_:_[0]||"";o==null||o(P)},O=()=>{if(!a)return{checked:!1,indeterminate:!1};const M=x.filter(P=>P.value!=="all").map(P=>P.value),_=m.filter(P=>P!=="all"&&M.includes(P));return m.includes("all")&&_.length===0?{checked:!1,indeterminate:!1}:_.length===0?{checked:!1,indeterminate:!1}:_.length===M.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},S=()=>{if(!a)return;const M=O(),_=x.filter(P=>P.value!=="all").map(P=>P.value);if(M.checked)y(["all"]),o==null||o(["all"]);else{const P=["all",..._];y(P),o==null||o(P)}},j=()=>{y(["all"]),o==null||o(a?["all"]:"all")},E=()=>{if(!a){if(m.length===0)return n;const I=e.find(C=>C.value===m[0]);return(I==null?void 0:I.label)||n}const M=m.filter(I=>I!=="all"),_=m.includes("all");if(M.length===0)return n;if(M.length===1){const I=e.find(C=>C.value===M[0]);return(I==null?void 0:I.label)||n}const P=e.filter(I=>I.value!=="all").length;return M.length===P?"All selected":`${M.length} selected`};return p.jsxs("div",{className:se("relative",s),ref:v,children:[p.jsxs("button",{type:"button",onClick:()=>f(!c),className:se("w-full flex items-center justify-between px-[12px] py-[8px] text-left text-xs","border border-gray-300 rounded-md bg-white hover:bg-gray-50","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500","transition-colors duration-150"),children:[p.jsx("span",{className:se("truncate",m.length===0&&"text-gray-500"),children:E()}),p.jsx(cr,{className:se("w-[16px] h-[16px] text-gray-400 transition-transform duration-150",c&&"transform rotate-180")})]}),c&&p.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-[4px] bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&p.jsx("div",{className:"p-[12px] border-b border-gray-100",children:p.jsxs("div",{className:"relative",children:[p.jsx(_f,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),p.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:d,onChange:M=>h(M.target.value),className:"w-full pl-[36px] pr-[12px] py-[8px] text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&p.jsxs("div",{className:"flex items-center justify-between px-[12px] py-[8px] border-b border-gray-100 bg-gray-50",children:[p.jsxs("button",{type:"button",onClick:S,className:"flex items-center text-xs font-medium text-gray-700 hover:text-gray-900",children:[p.jsx("div",{className:se("flex items-center justify-center w-[16px] h-[16px] mr-[8px] border transition-colors duration-150",(()=>{const M=O();return M.indeterminate||M.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const M=O();return M.indeterminate?p.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):M.checked?p.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})()}),"Select all"]}),p.jsx("button",{type:"button",onClick:j,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),p.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[w.length===0?p.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):w.map(M=>{let _;return M.value==="all"?null:(_=m.includes(M.value),p.jsxs("div",{className:"relative group",children:[p.jsxs("div",{onClick:()=>g(M.value),className:se("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",_&&"bg-gray-50"),children:[a?p.jsx("div",{className:se("flex items-center justify-center w-[16px] h-[16px] mr-[12px] border","transition-colors duration-150",_?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:_&&p.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):p.jsx("div",{className:se("w-[16px] h-[16px] mr-[12px] rounded-full border-2 transition-colors duration-150",_?"border-blue-600 bg-blue-600":"border-gray-300"),children:_&&p.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),p.jsx("span",{className:se("flex-1 text-xs whitespace-nowrap truncate",_?"font-medium text-gray-700":"text-gray-500"),children:b(M.label)})]}),M.label.length>u&&p.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:p.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-[12px] py-[8px] shadow-lg max-w-xs break-words whitespace-normal",children:[M.label,p.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},M.value))}),A&&p.jsxs("div",{className:"px-[12px] py-[8px] text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[p.jsxs("div",{className:"text-center font-medium",children:["+",x.length-l," more items"]}),i&&p.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},Ib=({config:e,className:t})=>{var s;const{dropdown:r,buttons:n,toggle:a}=e,i=l=>{const u=l.toLowerCase();return u.includes("agent")?"agent":u.includes("tool")?"workflowtool":"app"},o=l=>{const u=l.toLowerCase();return u.includes("agent")?{maxItems:50,maxLabelLength:25}:u.includes("tool")?{maxItems:30,maxLabelLength:20}:{maxItems:40,maxLabelLength:25}};return p.jsxs("div",{className:se("flex items-center gap-3",t),children:[r&&p.jsx(p.Fragment,{children:r.multiSelect?p.jsx(Db,{options:r.options,value:r.defaultValue,placeholder:r.label,multiSelect:r.multiSelect,searchable:r.searchable,onChange:r.onChange,className:"w-48",iconSource:i(r.label),maxItems:o(r.label).maxItems,maxLabelLength:o(r.label).maxLabelLength}):p.jsx(Ms,{options:r.options,value:Array.isArray(r.defaultValue)?r.defaultValue[0]:r.defaultValue||((s=r.options[0])==null?void 0:s.value),placeholder:r.label,onChange:l=>{var u;return(u=r.onChange)==null?void 0:u.call(r,l)},className:"w-48"})}),n&&n.length>0&&p.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,u)=>p.jsx("button",{onClick:()=>{var c;return(c=l.onClick)==null?void 0:c.call(l,l.value)},className:se("px-[12px] py-[8px] text-xs font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-white text-gray-900 shadow-[0 1px 3px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08)]":"text-gray-500 bg-white",u>0&&"border-l border-gray-200"),children:l.icon&&p.jsx("span",{className:"mr-[8px]",children:l.icon})},l.value))}),a&&p.jsxs("div",{className:"flex items-center gap-[4px] border border-gray-200 bg-gray-50 overflow-hidden p-[2px] rounded-[6px]",children:[p.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:se("px-[12px] py-[8px] rounded-[4px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.chartView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:p.jsx(y0,{className:"w-[16px] h-[16px]"})}),p.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:se("px-[12px] rounded-[4px] py-[8px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.tableView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:p.jsx(A0,{className:"w-[16px] h-[16px]"})})]})]})},Lb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var V;const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,h]=T.useState(u.type),[m,y]=T.useState("chart"),v=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,x]=T.useState(v()),[w,A]=T.useState("all"),g=$=>{var F,W,G,X,Q;const R=j();(F=R==null?void 0:R.controls)!=null&&F.toggle?(y($),(G=(W=R.controls.toggle).onToggle)==null||G.call(W,$)):(h($),(Q=(X=c==null?void 0:c.toggle)==null?void 0:X.onToggle)==null||Q.call(X,$))},O=$=>{var W,G;const R=$.metricType||$.title.toLowerCase();x(R);const F=l.find(X=>(X.metricType||X.title.toLowerCase())===R);(G=(W=F==null?void 0:F.controls)==null?void 0:W.dropdown)!=null&&G.multiSelect?A(["all"]):A("all"),a==null||a($)},S=$=>{var F,W,G;A($);const R=l.find(X=>(X.metricType||X.title.toLowerCase())===b);(G=(W=(F=R==null?void 0:R.controls)==null?void 0:F.dropdown)==null?void 0:W.onChange)==null||G.call(W,$)},j=()=>l.find($=>($.metricType||$.title.toLowerCase())===b)||null,E=$=>Array.isArray($)?$.filter(F=>F!=="all").length>0:$!=="all",M=$=>Array.isArray($)?$.filter(R=>R!=="all"):$!=="all"?[$]:[],_=$=>{var G,X,Q,ae,te,q,Y,Z,L;const R=((X=(G=$.view)==null?void 0:G.chart)==null?void 0:X.data)||((Q=u.chart)==null?void 0:Q.data)||[];if(!E(w))return R;const F=$.metricType,W=M(w);if(W.length===1){const oe=W[0],H=j(),ue=(q=(te=(ae=H==null?void 0:H.controls)==null?void 0:ae.dropdown)==null?void 0:te.options)==null?void 0:q.find(ve=>ve.value===oe),ee=ue==null?void 0:ue.label;return console.log("🔍 Filtering chart data:",{metricType:F,singleFilter:oe,selectedLabel:ee,baseDataSample:R[0]}),R.map(ve=>{let Ue=0;return ve.listView&&Array.isArray(ve.listView)&&(Ue=ve.listView.filter(Ge=>F==="agentRuns"&&Ge.agentName?Ge.agentName===ee||Ge.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="toolRuns"&&Ge.toolName?Ge.toolName===ee||Ge.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="modelRuns"&&Ge.modelName?Ge.modelName===ee||Ge.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((Ge,ut)=>Ge+(ut.count||0),0)),console.log("📊 Filtered value for",ee,":",Ue),{...ve,[F]:Ue}})}if(W.length>1){const oe=j(),ue=(((L=(Z=(Y=oe==null?void 0:oe.controls)==null?void 0:Y.dropdown)==null?void 0:Z.options)==null?void 0:L.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return R.map(ee=>{let ve=0;return ee.listView&&Array.isArray(ee.listView)&&(ve=ee.listView.filter(Be=>F==="agentRuns"&&Be.agentName?ue.some(Fe=>Be.agentName===Fe||Be.agentName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):F==="toolRuns"&&Be.toolName?ue.some(Fe=>Be.toolName===Fe||Be.toolName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):F==="modelRuns"&&Be.modelName?ue.some(Fe=>Be.modelName===Fe||Be.modelName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):!1).reduce((Be,Fe)=>Be+(Fe.count||0),0)),{...ee,[F]:ve}})}return R},P=$=>{var G;if(!((G=$.view)!=null&&G.chart))return null;const R=_($),F=()=>{var Q,ae,te,q,Y,Z;if(!E(w)||!((Q=$.controls)!=null&&Q.dropdown))return((te=(ae=$.view)==null?void 0:ae.chart)==null?void 0:te.title)||$.title;const X=M(w);if(X.length===1){const L=(q=$.controls.dropdown.options)==null?void 0:q.find(oe=>oe.value===X[0]);return L?`${L.label}`:((Z=(Y=$.view)==null?void 0:Y.chart)==null?void 0:Z.title)||$.title}return`${X.length} selected`},W=M(w);return $.metricType==="toolRuns"&&W.length===1?{...$.view.chart,data:R,title:F(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:$.metricType==="modelRuns"&&W.length===1?{...$.view.chart,data:R,title:F(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...$.view.chart,data:R,title:F()}},I=($,R)=>{if(!E(w))return $;const F=M(w);if(F.length===1){const W=F[0];if(i==="runs"&&R==="agentRuns")return $.map(G=>({...G,agentRuns:G[W]||0}));if(i==="runs"&&R==="toolRuns")return $.map(G=>({...G,toolRuns:G[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&R==="modelRuns")return $.map(G=>({...G,modelRuns:G[W.replace(/[-\.]/g,"")]||0}))}return $},C=$=>{var G;const R=((G=u.chart)==null?void 0:G.data)||[],F=I(R,$),W=X=>{var ae,te;if(!E(w))return X;const Q=M(w);if(Q.length===1){const q=(te=(ae=c==null?void 0:c.dropdown)==null?void 0:ae.options)==null?void 0:te.find(Y=>Y.value===Q[0]);return q?`${q.label}`:X}return`${Q.length} selected`};switch($){case"users":return{type:"line",title:"Total Users",data:R,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"sessions":return{type:"line",title:"Total Sessions",data:R,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"messages":return{type:"line",title:"Total Messages",data:R,dataKey:"messages",color:"#ec4899",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"tokens":return{type:"line",title:"Token Usage Breakdown",data:R,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f59e0b",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#ec4899",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"agentRuns":return{type:"line",title:W("Agent Runs"),data:F,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"toolRuns":return M(w).length===1?{type:"line",title:W("Tool Runs"),data:I(R,"toolRuns"),dataKey:"toolRuns",color:"#f97316",yAxisLabel:"Number of Tool Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:"Tool Runs",data:F,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"modelRuns":return M(w).length===1?{type:"line",title:W("Model Runs"),data:I(R,"modelRuns"),dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:W("Model Runs"),data:F,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};default:return null}},D=(()=>{const $=j();return $!=null&&$.controls?{...$.controls,dropdown:$.controls.dropdown?{...$.controls.dropdown,onChange:S}:void 0,toggle:$.controls.toggle?{...$.controls.toggle,chartView:m==="chart",tableView:m==="table",onToggle:g}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:S}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:g}:void 0}:void 0})(),B=(()=>{var F,W,G,X,Q,ae,te,q,Y,Z;const $=j();if($!=null&&$.view){if((F=$.controls)!=null&&F.toggle){if(m==="table"&&$.view.table){let oe=$.view.table.data;if($.metricType==="agentRuns"&&E(w)){const H=M(w);if(H.length>0){const ue=((X=(G=(W=$.controls)==null?void 0:W.dropdown)==null?void 0:G.options)==null?void 0:X.filter(ee=>H.includes(ee.value)))||[];ue.length>0&&(oe=oe.filter(ee=>ue.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if($.metricType==="toolRuns"&&E(w)){const H=M(w);if(H.length>0){const ue=((te=(ae=(Q=$.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.filter(ee=>H.includes(ee.value)))||[];ue.length>0&&(oe=oe.filter(ee=>ue.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if($.metricType==="modelRuns"&&E(w)){const H=M(w);if(H.length>0){const ue=((Z=(Y=(q=$.controls)==null?void 0:q.dropdown)==null?void 0:Y.options)==null?void 0:Z.filter(ee=>H.includes(ee.value)))||[];ue.length>0&&(oe=oe.filter(ee=>ue.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}return{type:"table",table:{...$.view.table,data:oe}}}else if(m==="chart"&&$.view.chart)return{type:"chart",chart:P($)||$.view.chart}}const L=P($);return L?{...$.view,chart:L}:$.view}const R=C(b);return R?{type:"chart",chart:R}:{...u,type:d}})(),U=()=>l.map($=>{const R=$.metricType||$.title.toLowerCase();return{...$,highlighted:$.highlighted||R===b}});return p.jsxs("div",{className:se("bg-white flex flex-col gap-[16px] rounded-lg border border-gray-200 py-[16px] px-[24px]",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[o&&p.jsxs("div",{className:"w-full",children:[p.jsx("h1",{className:"text-md font-medium text-gray-700",children:o}),s&&p.jsx("p",{className:"text-xs text-gray-500",children:s})]}),p.jsx("div",{className:"flex flex-col sm:flex-row gap-[16px]",children:r?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})})]}):U().map(($,R)=>p.jsx("div",{className:"flex-1",children:p.jsx(Rf,{data:$,onClick:O,isFirst:R===0})},`${i}-metric-${R}`))}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:j()&&p.jsx("h3",{className:"text-md font-medium text-gray-700",children:(V=j())==null?void 0:V.title})}),D&&p.jsx(Ib,{config:D})]}),p.jsx(Nb,{config:B,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},ff=T.forwardRef(({className:e,variant:t="default",size:r="md",children:n,...a},i)=>{const o="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={default:"bg-blue-600 hover:bg-blue-700 focus:bg-blue-700 focus:shadow-sm text-white py-2 px-3",outline:"border-gray-300 border bg-white text-gray-700 hover:text-gray-800 hover:bg-gray-50 focus:bg-gray-50 focus:shadow-sm",ghost:"border border-error-600 bg-error-500 text-white hover:border-error-600 hover:bg-error-600"},l={sm:"h-[32px] rounded-md gap-1.5 px-[14px] py-[10px]",md:"h-[40px] rounded-md px-[14px] py-[10px]",lg:"h-[48px] rounded-md px-[16px] py-[12px]"};return p.jsx("button",{className:se(o,s[t],l[r],e),ref:i,...a,children:n})});ff.displayName="Button";function Ns(e){"@babel/helpers - typeof";return Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(e)}function Et(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Me(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ve(e){Me(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ns(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function FB(e,t){Me(2,arguments);var r=Ve(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function df(e,t){Me(2,arguments);var r=Ve(e),n=Et(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function WB(e,t){Me(2,arguments);var r=Ve(e).getTime(),n=Et(t);return new Date(r+n)}var UB={};function Oi(){return UB}function zB(e,t){var r,n,a,i,o,s;Me(1,arguments);var l=Oi(),u=Et((r=(n=(a=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Ve(e),f=c.getDay(),d=(f<u?7:0)+f-u;return c.setDate(c.getDate()-d),c.setHours(0,0,0,0),c}function VB(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function aa(e){Me(1,arguments);var t=Ve(e);return t.setHours(0,0,0,0),t}function Si(e,t){Me(2,arguments);var r=aa(e),n=aa(t);return r.getTime()===n.getTime()}function GB(e){return Me(1,arguments),e instanceof Date||Ns(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qB(e){if(Me(1,arguments),!GB(e)&&typeof e!="number")return!1;var t=Ve(e);return!isNaN(Number(t))}function HB(e){Me(1,arguments);var t=Ve(e);return t.setHours(23,59,59,999),t}function KB(e){Me(1,arguments);var t=Ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function YB(e,t){Me(2,arguments);var r=Et(t);return WB(e,-r)}var XB=864e5;function JB(e){Me(1,arguments);var t=Ve(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/XB)+1}function Ds(e){Me(1,arguments);var t=1,r=Ve(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function Rb(e){Me(1,arguments);var t=Ve(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Ds(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Ds(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function ZB(e){Me(1,arguments);var t=Rb(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ds(r);return n}var QB=6048e5;function eF(e){Me(1,arguments);var t=Ve(e),r=Ds(t).getTime()-ZB(t).getTime();return Math.round(r/QB)+1}function Is(e,t){var r,n,a,i,o,s,l,u;Me(1,arguments);var c=Oi(),f=Et((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Ve(e),h=d.getUTCDay(),m=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function Bb(e,t){var r,n,a,i,o,s,l,u;Me(1,arguments);var c=Ve(e),f=c.getUTCFullYear(),d=Oi(),h=Et((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(f+1,0,h),m.setUTCHours(0,0,0,0);var y=Is(m,t),v=new Date(0);v.setUTCFullYear(f,0,h),v.setUTCHours(0,0,0,0);var b=Is(v,t);return c.getTime()>=y.getTime()?f+1:c.getTime()>=b.getTime()?f:f-1}function tF(e,t){var r,n,a,i,o,s,l,u;Me(1,arguments);var c=Oi(),f=Et((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=Bb(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var m=Is(h,t);return m}var rF=6048e5;function nF(e,t){Me(1,arguments);var r=Ve(e),n=Is(r,t).getTime()-tF(r,t).getTime();return Math.round(n/rF)+1}function je(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var jr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return je(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):je(n+1,2)},d:function(t,r){return je(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return je(t.getUTCHours()%12||12,r.length)},H:function(t,r){return je(t.getUTCHours(),r.length)},m:function(t,r){return je(t.getUTCMinutes(),r.length)},s:function(t,r){return je(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return je(i,r.length)}},ia={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},aF={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return jr.y(t,r)},Y:function(t,r,n,a){var i=Bb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return je(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):je(o,r.length)},R:function(t,r){var n=Rb(t);return je(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return je(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return je(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return je(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return jr.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return je(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=nF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):je(i,r.length)},I:function(t,r,n){var a=eF(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):je(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):jr.d(t,r)},D:function(t,r,n){var a=JB(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):je(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return je(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return je(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return je(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=ia.noon:a===0?i=ia.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=ia.evening:a>=12?i=ia.afternoon:a>=4?i=ia.morning:i=ia.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return jr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):jr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):je(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):je(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):jr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):jr.s(t,r)},S:function(t,r){return jr.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Wb(o);case"XXXX":case"XX":return Xr(o);case"XXXXX":case"XXX":default:return Xr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return Wb(o);case"xxxx":case"xx":return Xr(o);case"xxxxx":case"xxx":default:return Xr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Fb(o,":");case"OOOO":default:return"GMT"+Xr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Fb(o,":");case"zzzz":default:return"GMT"+Xr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return je(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return je(o,r.length)}};function Fb(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+je(i,2)}function Wb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+je(Math.abs(e)/60,2)}return Xr(e,t)}function Xr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=je(Math.floor(a/60),2),o=je(a%60,2);return n+i+r+o}var Ub=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},zb=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},iF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Ub(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",Ub(a,r)).replace("{{time}}",zb(i,r))},oF={p:zb,P:iF},sF=["D","DD"],lF=["YY","YYYY"];function uF(e){return sF.indexOf(e)!==-1}function cF(e){return lF.indexOf(e)!==-1}function Vb(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var fF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dF=function(t,r,n){var a,i=fF[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function pf(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var pF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mF={date:pf({formats:pF,defaultWidth:"full"}),time:pf({formats:hF,defaultWidth:"full"}),dateTime:pf({formats:vF,defaultWidth:"full"})},yF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gF=function(t,r,n,a){return yF[t]};function Ti(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var bF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},SF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},TF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},AF=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},PF={ordinalNumber:AF,era:Ti({values:bF,defaultWidth:"wide"}),quarter:Ti({values:xF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ti({values:wF,defaultWidth:"wide"}),day:Ti({values:OF,defaultWidth:"wide"}),dayPeriod:Ti({values:SF,defaultWidth:"wide",formattingValues:TF,defaultFormattingWidth:"wide"})};function Ai(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?_F(s,function(f){return f.test(o)}):jF(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function jF(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function _F(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function EF(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var CF=/^(\d+)(th|st|nd|rd)?/i,$F=/\d+/i,kF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},MF={any:[/^b/i,/^(a|c)/i]},NF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},DF={any:[/1/i,/2/i,/3/i,/4/i]},IF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},LF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},RF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},BF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},FF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},WF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},UF={ordinalNumber:EF({matchPattern:CF,parsePattern:$F,valueCallback:function(t){return parseInt(t,10)}}),era:Ai({matchPatterns:kF,defaultMatchWidth:"wide",parsePatterns:MF,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:NF,defaultMatchWidth:"wide",parsePatterns:DF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ai({matchPatterns:IF,defaultMatchWidth:"wide",parsePatterns:LF,defaultParseWidth:"any"}),day:Ai({matchPatterns:RF,defaultMatchWidth:"wide",parsePatterns:BF,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:FF,defaultMatchWidth:"any",parsePatterns:WF,defaultParseWidth:"any"})},zF={code:"en-US",formatDistance:dF,formatLong:mF,formatRelative:gF,localize:PF,match:UF,options:{weekStartsOn:0,firstWeekContainsDate:1}},VF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qF=/^'([^]*?)'?$/,HF=/''/g,KF=/[a-zA-Z]/;function Ls(e,t,r){var n,a,i,o,s,l,u,c,f,d,h,m,y,v;Me(2,arguments);var b=String(t),x=Oi(),w=(n=(a=void 0)!==null&&a!==void 0?a:x.locale)!==null&&n!==void 0?n:zF,A=Et((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:x.firstWeekContainsDate)!==null&&o!==void 0?o:(u=x.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=Et((f=(d=(h=(m=void 0)!==null&&m!==void 0?m:void 0)!==null&&h!==void 0?h:x.weekStartsOn)!==null&&d!==void 0?d:(y=x.locale)===null||y===void 0||(v=y.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&f!==void 0?f:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var O=Ve(e);if(!qB(O))throw new RangeError("Invalid time value");var S=VB(O),j=YB(O,S),E={firstWeekContainsDate:A,weekStartsOn:g,locale:w,_originalDate:O},M=b.match(GF).map(function(_){var P=_[0];if(P==="p"||P==="P"){var I=oF[P];return I(_,w.formatLong)}return _}).join("").match(VF).map(function(_){if(_==="''")return"'";var P=_[0];if(P==="'")return YF(_);var I=aF[P];if(I)return cF(_)&&Vb(_,t,String(e)),uF(_)&&Vb(_,t,String(e)),I(j,_,w.localize,E);if(P.match(KF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return _}).join("");return M}function YF(e){var t=e.match(qF);return t?t[1].replace(HF,"'"):e}function Gb(e,t){Me(2,arguments);var r=Ve(e),n=Ve(t);return r.getTime()<n.getTime()}function XF(e,t){Me(2,arguments);var r=Ve(e).getTime(),n=Ve(t.start).getTime(),a=Ve(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Rs(e,t){Me(2,arguments);var r=Et(t);return FB(e,-r)}function JF(e,t){Me(2,arguments);var r=Et(t);return df(e,-r)}const hf=({children:e})=>{const[t,r]=T.useState(!1);return T.useEffect(()=>(r(!0),()=>r(!1)),[]),t?en.createPortal(e,document.body):null};function qb({className:e,defaultValue:t,onDateRangeChange:r}){console.log("🗓️ DateRangePicker component rendered with props:",{className:e,defaultValue:t,hasCallback:!!r});const n=[{label:"Today",value:"today",dateRange:{from:aa(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:aa(Rs(new Date,1)),to:HB(Rs(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:zB(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:aa(Rs(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:KB(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:aa(Rs(new Date,29)),to:new Date}}],a=t?n.find(k=>k.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(k=>k.value),foundPreset:!!a});const[i,o]=T.useState(a==null?void 0:a.dateRange),[s,l]=T.useState(a==null?void 0:a.dateRange),[u,c]=T.useState(!1),[f,d]=T.useState((a==null?void 0:a.label)||null),[h,m]=T.useState((a==null?void 0:a.label)||null),[y,v]=T.useState(new Date),[b,x]=T.useState(null),[w,A]=T.useState({top:0,left:0}),g=T.useRef(null),O=T.useRef(null);T.useEffect(()=>{var k,B;console.log("📅 DateRangePicker useEffect running:",{hasDefaultPreset:!!a,hasOnDateRangeChange:!!r,currentDate:i,currentLabel:f,defaultValue:t,defaultPresetLabel:a==null?void 0:a.label,defaultPresetValue:a==null?void 0:a.value}),a!=null&&a.dateRange&&r?(console.log("📅 DateRangePicker: Setting initial default value:",{label:a.label,dateRange:a.dateRange,from:(k=a.dateRange.from)==null?void 0:k.toLocaleDateString(),to:(B=a.dateRange.to)==null?void 0:B.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(U=>`${U.value}:${U.label}`)})},[]),T.useEffect(()=>{t&&(a!=null&&a.dateRange)&&(console.log("📅 DateRangePicker: DefaultValue changed, updating state:",{defaultValue:t,label:a.label}),o(a.dateRange),d(a.label),l(a.dateRange),m(a.label))},[t]);const S=()=>{if(!O.current)return;const k=O.current.getBoundingClientRect(),B=window.scrollY,U=window.scrollX,V=window.innerWidth,$=window.innerHeight,R=720,F=450;let W=k.bottom+B+8,G=k.left+U;G+R>V&&(G=k.right+U-R),G+R>V&&(G=V-R-20),W+F>$&&(W=k.top+B-F-8),G<20&&(G=20),W<20&&(W=20),A({top:W,left:G})};T.useEffect(()=>{const k=()=>{u&&S()};return u&&(window.addEventListener("resize",k),window.addEventListener("scroll",k)),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k)}},[u]);const j=(k,B)=>{if(l(k),m(B),x(null),k.from){const U=new Date(k.from.getFullYear(),k.from.getMonth(),1);v(U)}},E=k=>{if(!b)x(k),l({from:k,to:k}),m(null);else{const B=Gb(k,b)?k:b,U=Gb(k,b)?b:k;l({from:B,to:U}),x(null),m(null)}},M=()=>{o(s),d(h),r==null||r(s),c(!1),x(null)},_=()=>{l(void 0),m(null),o(void 0),d(null),r==null||r(void 0),c(!1),x(null)},P=k=>{k?(l(i),m(f),x(null),setTimeout(S,0)):(l(i),m(f),x(null)),c(k)},I=(k,B)=>(console.log("📅 formatDateRange called with:",{presetLabel:B,hasDateRange:!!(k!=null&&k.from)}),B||(k!=null&&k.from?!k.to||Si(k.from,k.to)?Ls(k.from,"MMM dd, yyyy"):`${Ls(k.from,"MMM dd, yyyy")} - ${Ls(k.to,"MMM dd, yyyy")}`:"Pick a date range")),C=(k=0)=>{const B=df(y,k),U=B.getFullYear(),V=B.getMonth(),$=new Date(U,V,1),F=new Date(U,V+1,0).getDate(),W=$.getDay(),G=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(U,V-1,0).getDate();for(let Z=W-1;Z>=0;Z--){const L=te-Z,oe=new Date(U,V-1,L);Q.push(p.jsx("button",{onClick:()=>E(oe),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:L},`prev-${L}`))}for(let Z=1;Z<=F;Z++){const L=new Date(U,V,Z),oe=Si(L,new Date),H=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&XF(L,{start:s.from,end:s.to}),ue=(s==null?void 0:s.from)&&Si(L,s.from),ee=(s==null?void 0:s.to)&&Si(L,s.to),ve=b&&Si(L,b);let Ue="h-[32px] w-[32px] text-xs hover:bg-gray-100 hover:text-gray-900 hover:font-medium rounded-full flex items-center justify-center transition-colors text-gray-700 ";oe&&(Ue+="font-semibold "),ve||ue||ee?Ue+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":H&&(Ue+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),Q.push(p.jsx("button",{onClick:()=>E(L),className:Ue,children:Z},`current-${Z}`))}const Y=Math.ceil((W+F)/7)*7-W-F;for(let Z=1;Z<=Y;Z++){const L=new Date(U,V+1,Z);Q.push(p.jsx("button",{onClick:()=>E(L),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:Z},`next-${Z}`))}return p.jsxs("div",{className:"p-[12px]",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[k===0&&p.jsx("button",{onClick:()=>v(JF(y,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(b0,{className:"h-[16px] w-[16px]"})}),p.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[G[V]," ",U]}),k===1&&p.jsx("button",{onClick:()=>v(df(y,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(ki,{className:"h-[16px] w-[16px]"})})]}),p.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map(Z=>p.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:Z},Z))}),p.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},D=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return p.jsxs("div",{className:`relative ${e}`,children:[p.jsxs("button",{ref:O,onClick:()=>P(!u),className:`min-w-[200px] px-[12px] py-[8px] text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[p.jsx(Of,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const k=I(i,f);return console.log("📅 Button display text:",{displayText:k,date:i,selectedPresetLabel:f}),k})()]}),u&&p.jsxs(hf,{children:[p.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>P(!1)}),p.jsxs("div",{ref:g,className:D(),style:{top:w.top,left:w.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:k=>k.stopPropagation(),children:[p.jsxs("div",{className:"flex",children:[p.jsxs("div",{className:"flex flex-col gap-1 p-[12px] border-r border-gray-200 w-[160px] flex-shrink-0",children:[p.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Quick Filters"}),n.map(k=>p.jsx("button",{onClick:()=>j(k.dateRange,k.label),className:`text-left px-[12px] py-[8px] text-sm text-gray-900 rounded hover:bg-gray-100 transition-colors ${h===k.label?"bg-gray-100 medium":""}`,children:k.label},k.label))]}),p.jsxs("div",{className:"flex flex-1",children:[C(0),C(1)]})]}),p.jsxs("div",{className:"border-t border-gray-200 bg-gray-50 p-[12px] flex justify-end gap-2",children:[p.jsx("button",{onClick:_,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),p.jsx("button",{onClick:M,disabled:!(s!=null&&s.from),className:"px-[12px] py-[8px] text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}const ZF=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var I;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=T.useState(!1),[h,m]=T.useState({}),[y,v]=T.useState(l),[b,x]=T.useState([]),[w,A]=T.useState(!1),g=T.useRef(null);T.useEffect(()=>{if(t)try{g.current=new Kt(t),O(),S()}catch(C){console.error("Failed to initialize API service:",C)}},[t]);const O=async()=>{if(!(!g.current||!t)){A(!0);try{const C=await g.current.fetchEnvironments();x(C),console.log("🌍 Environments loaded:",C.map(D=>D.envName))}catch(C){console.error("Error loading environments:",C)}finally{A(!1)}}},S=async()=>{if(!(!g.current||!t)){d(!0);try{const C=g.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:C.fromTimestamp,toTimestamp:C.toTimestamp,fromDate:new Date(C.fromTimestamp).toLocaleDateString(),toDate:new Date(C.toTimestamp).toLocaleDateString()});const D=await g.current.fetchAllCardsDataWithEnhancedViews(C.fromTimestamp,C.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date(C.fromTimestamp).toLocaleDateString(),to:new Date(C.toTimestamp).toLocaleDateString()});const k=l.map(B=>B.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...B,metrics:D.usageAnalytics}):B.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...B,metrics:D.runs}):B);v(k)}catch(C){console.error("Error loading initial data:",C),v(l)}finally{d(!1)}}},j=async(C,D)=>{if(!(!g.current||!t||!D.metricType)){v(k=>k.map(B=>B.id===C?{...B,metrics:B.metrics.map(U=>({...U,highlighted:U.metricType===D.metricType}))}:B)),m(k=>({...k,[C]:!0}));try{const k=t.defaultTimeRange||Kt.getDateRange(7);let B,U;if(["users","sessions","messages","tokens"].includes(D.metricType))B="usage-analytics",U=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))B="runs",U=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const V=await g.current.fetchTimeSeriesData(U,B,k.fromTimestamp,k.toTimestamp),$=g.current.transformTimeSeriesDataForMetric(V,D.metricType);console.log("Time series response for",D.title,":",V),console.log("Transformed data for",D.title,":",$),console.log("Metric type used for transformation:",D.metricType);const F=(W=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[W]||"count")(D.metricType||"count");console.log("Using dataKey for metric",D.metricType,":",F),v(W=>W.map(G=>{if(G.id===C){const X={...G,view:{...G.view,chart:G.view.chart?{...G.view.chart,data:$,dataKey:F,lines:[{dataKey:F,color:G.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:$,dataKey:F,lines:[{dataKey:F,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",C,":",X),console.log("Chart config set:",X.view.chart),X}return G}))}catch(k){console.error("Error loading metric data:",k)}finally{m(k=>({...k,[C]:!1}))}}},E=C=>{var D,k;if((k=(D=u==null?void 0:u.draft)==null?void 0:D.onChange)==null||k.call(D,C),a==null||a(C),t&&g.current){const B={...t,environment:C};g.current.updateConfig(B),S()}},M=C=>{var D,k;if(console.log("🗓️ Time range change requested:",C),typeof C=="string"&&((k=(D=u==null?void 0:u.timeRange)==null?void 0:D.onChange)==null||k.call(D,C)),i==null||i(C),t&&g.current){let B=null;if(typeof C=="object"&&C.from&&C.to)B={fromTimestamp:C.from.toISOString(),toTimestamp:C.to.toISOString()},console.log("📅 Converting DateRange to API format:",B);else if(typeof C=="string"){const V={"24h":1,"7d":7,"30d":30,"90d":90}[C];V&&(B=Kt.getDateRange(V),console.log(`📅 Converting preset "${C}" (${V} days) to API format:`,B))}if(B){const U={...t,defaultTimeRange:B};console.log("🔄 Updating API configuration with new date range:",U.defaultTimeRange),g.current.updateConfig(U),console.log("🚀 Reloading dashboard data with new date range..."),S()}else console.warn("⚠️ Unable to convert time range value to API format:",C)}},_=(C="csv")=>{var D,k;(k=(D=u==null?void 0:u.export)==null?void 0:D.onExport)==null||k.call(D,C),n==null||n()},P=Object.values(h).some(C=>C);return p.jsxs("div",{className:se("w-full h-full flex flex-col overflow-hidden",r),children:[p.jsxs("div",{className:"flex flex-col gap-2 w-full p-[24px] pb-[12px]",children:[p.jsx("h1",{className:"text-lg font-bold text-gray-900 w-full",children:o}),p.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s&&p.jsx("p",{className:"text-gray-500 text-xs w-full",children:s}),p.jsxs("div",{className:"flex items-center gap-2 justify-end flex-shrink-0",children:[(f||P)&&p.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[p.jsx(S0,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),u&&p.jsxs(p.Fragment,{children:[u.draft&&p.jsx(Ms,{options:b.length>0?b.map(C=>({label:C.envName.charAt(0).toUpperCase()+C.envName.slice(1),value:C.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:w?"Loading environments...":u.draft.label,onChange:E,className:"min-w-[200px]",disabled:f||P||w}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),p.jsx(qb,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:C=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",C),C&&M(C)}})):p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Of,{className:"h-4 w-4 text-gray-500"}),p.jsx(Ms,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:M,className:"min-w-[200px]",disabled:f||P})]})),((I=u.export)==null?void 0:I.enabled)&&p.jsxs(ff,{variant:"outline",onClick:()=>_(),className:"gap-2",disabled:f||P,children:[p.jsx(x0,{className:"h-4 w-4"}),"Export"]})]})]})]})]}),p.jsx("div",{className:se("grid gap-6 p-[24px] pt-[8px] overflow-y-auto",c.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:c.responsive?void 0:`repeat(${c.columns}, minmax(0, 1fr))`,gap:c.gap?`${c.gap}px`:void 0},children:y.map(C=>{var D,k,B,U;return p.jsx(Lb,{section:C,isLoading:f,isChartLoading:h[C.id]||!1,onMetricClick:V=>j(C.id,V),className:se(c.responsive&&((D=C.layout)==null?void 0:D.span)===12&&"lg:col-span-12",c.responsive&&((k=C.layout)==null?void 0:k.span)===6&&"lg:col-span-6",c.responsive&&((B=C.layout)==null?void 0:B.span)===4&&"lg:col-span-4",c.responsive&&((U=C.layout)==null?void 0:U.span)===3&&"lg:col-span-3")},C.id)})})]})};class Hb{static buildSessionTree(t,r){var i;const n=this.groupEventsByRun(t),a=[];for(const[o,s]of n.entries()){const l=this.buildRunTree(o,s);a.push(l)}return a.sort((o,s)=>new Date(o.startTime).getTime()-new Date(s.startTime).getTime()),{sessionId:r||((i=t[0])==null?void 0:i.sessionId)||"unknown",runs:a}}static groupEventsByRun(t){const r=new Map;return t.forEach(n=>{const a=n.runId;r.has(a)||r.set(a,[]),r.get(a).push(n)}),r}static buildRunTree(t,r){var y;const n=new Map;r.forEach(v=>{const b=`${v.data.id}|${v.data.name}`;n.has(b)||n.set(b,{});const x=n.get(b);v.type==="node_started"?x.started=v:v.type==="node_completed"&&(x.completed=v)});const a=[];for(const[,v]of n.entries()){const b=v.started,x=v.completed;if(!b)continue;const w=this.createTreeNodeFromEvents(b,x,t);a.push(w)}const i=this.buildNodeHierarchy(a),o=r.filter(v=>v.runId===t),s=Math.min(...o.map(v=>new Date(v.data.timestamp).getTime())),l=o.filter(v=>v.type==="node_completed"),u=l.length>0?Math.max(...l.map(v=>new Date(v.data.timestamp).getTime())):void 0,c=this.calculateRunStatus(o),f=u&&s?u-s:void 0,d=this.calculateRunTokens(o),h=this.extractUserInput(o),m=this.extractFinalOutput(o);return{runId:t,startTime:new Date(s).toISOString(),endTime:u?new Date(u).toISOString():void 0,status:c,rootNodes:i,duration:f,totalTokens:d>0?d:void 0,sessionId:((y=o[0])==null?void 0:y.sessionId)||"unknown",userInput:h,finalOutput:m}}static createTreeNodeFromEvents(t,r,n){const a=t.data.timestamp,i=r==null?void 0:r.data.timestamp,o=i&&a?new Date(i).getTime()-new Date(a).getTime():void 0,s=r||t,l=s.data.type==="llm"||s.data.type==="tool",u=l?t.data.input:void 0,c=l?r==null?void 0:r.data.output:void 0,f=this.extractLLMUsage(c),{toolInvocations:d,isResponse:h}=this.extractToolInvocations(c),m=s.data.type==="llm"?this.extractProvider(s.data.name):void 0;return{id:s.data.id,parentId:s.data.parentId,runId:n||"unknown",name:s.data.name,type:s.data.type,status:(r==null?void 0:r.data.status)||t.data.status,startTime:a,endTime:i,duration:o,icon:s.data.icon,input:u,output:c,children:[],level:0,isExpanded:!1,llmUsage:f,toolInvocations:d,isResponse:h,metadata:{...s.data.metadata,provider:m}}}static buildNodeHierarchy(t){const r=new Map;t.forEach(a=>r.set(a.id,a));const n=[];return t.forEach(a=>{if(a.parentId&&r.has(a.parentId)){const i=r.get(a.parentId);i.children.push(a),a.level=i.level+1}else n.push(a),a.level=0}),n.sort((a,i)=>new Date(a.startTime).getTime()-new Date(i.startTime).getTime()),n.forEach(a=>this.sortChildren(a)),n}static extractLLMUsage(t){var r;if(!(!t||typeof t!="object")&&(r=t.additional_kwargs)!=null&&r.llmUsageMetadata)return t.additional_kwargs.llmUsageMetadata}static extractToolInvocations(t){if(!t||typeof t!="object")return{};if(t.name&&t.tool_call_id){const r=t.name==="route_to_user";return{toolInvocations:[t],isResponse:r}}if(Array.isArray(t)){const r=t.filter(n=>n&&typeof n=="object"&&n.name&&n.tool_call_id);if(r.length>0){const n=r.some(a=>a.name==="route_to_user");return{toolInvocations:r,isResponse:n}}}return{}}static extractProvider(t){if(!t)return;const r=t.toLowerCase();if(r.includes("gemini"))return"google";if(r.includes("gpt")||r.includes("openai"))return"openai";if(r.includes("claude")||r.includes("anthropic"))return"anthropic";if(r.includes("azure"))return"azure";if(r.includes("cohere"))return"cohere";const n=t.split("-");if(n.length>0){const a=n[0].toLowerCase();if(["gemini","gpt","claude","cohere"].includes(a))return a==="gemini"?"google":a==="gpt"?"openai":a==="claude"?"anthropic":a}return"custom"}static sortChildren(t){t&&(t.children.sort((r,n)=>new Date(r.startTime).getTime()-new Date(n.startTime).getTime()),t.children.forEach(r=>this.sortChildren(r)))}static calculateRunStatus(t){const r=t.some(a=>a.data.status==="running"),n=t.some(a=>a.data.status==="failed");return r?"running":n?"failed":"completed"}static extractUserInput(t){const r=t.filter(n=>n.type==="node_started"&&n.data.type==="llm").sort((n,a)=>new Date(n.data.timestamp).getTime()-new Date(a.data.timestamp).getTime());if(r.length>0){const n=r[0];if(n.data.input){if(typeof n.data.input=="string")return n.data.input;if(typeof n.data.input=="object")return JSON.stringify(n.data.input)}}}static extractFinalOutput(t){var n,a,i,o,s;const r=t.filter(l=>l.type==="node_completed"&&l.data.type==="tool"&&l.data.name==="route_to_user");if(r.length>0){const u=r[r.length-1].data.output;if(u){if((n=u.output)!=null&&n.message)return u.output.message;if((a=u.input)!=null&&a.message)return u.input.message;if(u.message)return u.message;if((i=u.args)!=null&&i.message)return u.args.message;if((s=(o=u.input)==null?void 0:o.args)!=null&&s.message)return u.input.args.message}}}static calculateRunTokens(t){let r=0;return t.forEach(n=>{const a=this.extractLLMUsage(n.data.output);a!=null&&a.total_tokens&&(r+=a.total_tokens)}),r}static updateTree(t,r,n){return this.buildSessionTree(n,t.sessionId)}static mergeEvents(t,r){return[...t,...r].sort((a,i)=>new Date(a.timestamp).getTime()-new Date(i.timestamp).getTime())}}const QF=({isOpen:e,onClose:t,title:r,data:n,initialViewMode:a="interactive",modalHeight:i="50vh"})=>{const[o,s]=T.useState(a),l=T.useMemo(()=>{if(n==null)return!1;if(typeof n=="string")try{return JSON.parse(n),!0}catch{return!1}return typeof n=="object"},[n]),u=c=>{c.target===c.currentTarget&&t()};return e?p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",onClick:u,children:p.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full flex flex-col",style:{height:i},children:[p.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Vs,{className:"w-5 h-5 text-gray-400"}),p.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:r})]}),l&&p.jsxs("div",{className:"flex items-center gap-1 ml-4 pl-4 border-l border-gray-200",children:[p.jsx("button",{onClick:()=>s("interactive"),className:`p-1.5 hover:bg-gray-200 rounded transition-colors ${o==="interactive"?"bg-gray-200":""}`,title:"Interactive JSON view (fold/unfold)",children:p.jsx(Pf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>s("plain"),className:`p-1.5 hover:bg-gray-200 rounded transition-colors ${o==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(wf,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>navigator.clipboard.writeText(typeof n=="string"?n:JSON.stringify(n,null,2)),className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",title:"Copy content",children:p.jsx(fa,{className:"w-4 h-4 text-gray-500"})}),p.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",title:"Close",children:p.jsx(Ef,{className:"w-4 h-4 text-gray-500"})})]})]}),p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(Jr,{data:n,showHeader:!1,className:"h-full border-0",defaultExpanded:!0,viewMode:o,onViewModeChange:s})})]})}):null},eW=({data:e,level:t=0,expandedKeys:r=new Set,onToggleKey:n,keyPath:a=""})=>{const i=t*16,o=(s,l,u)=>{const c=u?`${u}.${l}`:l||"";if(s===null)return p.jsx("span",{className:"text-gray-400 italic",children:"null"});if(s===void 0)return p.jsx("span",{className:"text-gray-400 italic",children:"undefined"});if(typeof s=="boolean")return p.jsx("span",{className:"text-purple-600 font-medium",children:String(s)});if(typeof s=="number")return p.jsx("span",{className:"text-blue-600 font-medium",children:s});if(typeof s=="string"){const f=s.length>100,d=f&&!r.has(`${c}._string`)?`${s.substring(0,100)}...`:s;return p.jsxs("div",{className:"inline",children:[p.jsxs("span",{className:"text-green-600",children:['"',d,'"']}),f&&p.jsx("button",{onClick:()=>n==null?void 0:n(`${c}._string`),className:"ml-2 text-xs text-blue-500 hover:text-blue-700 underline",children:r.has(`${c}._string`)?"Show less":"Show more"})]})}if(Array.isArray(s)){const f=r.has(c);return s.length===0?p.jsx("span",{className:"text-gray-500",children:"[]"}):p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center",children:[p.jsxs("button",{onClick:()=>n==null?void 0:n(c),className:"flex items-center gap-1 hover:bg-gray-100 p-1 rounded transition-colors",children:[f?p.jsx(cr,{className:"w-3 h-3 text-gray-400"}):p.jsx(ki,{className:"w-3 h-3 text-gray-400"}),p.jsxs("span",{className:"text-gray-600 text-xs",children:["Array[",s.length,"]"]})]}),!f&&p.jsx("span",{className:"text-gray-400 ml-2",children:"[...]"})]}),f&&p.jsx("div",{className:"ml-4 mt-1",children:s.map((h,m)=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${i}px`},children:[p.jsxs("span",{className:"text-gray-400 text-xs mt-0.5 min-w-[20px]",children:[m,":"]}),p.jsx("div",{className:"flex-1",children:o(h,String(m),`${c}[${m}]`)})]},m))})]})}if(typeof s=="object"){const f=Object.keys(s),d=r.has(c);return f.length===0?p.jsx("span",{className:"text-gray-500",children:"{}"}):p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center",children:[p.jsxs("button",{onClick:()=>n==null?void 0:n(c),className:"flex items-center gap-1 hover:bg-gray-100 p-1 rounded transition-colors",children:[d?p.jsx(cr,{className:"w-3 h-3 text-gray-400"}):p.jsx(ki,{className:"w-3 h-3 text-gray-400"}),p.jsxs("span",{className:"text-gray-600 text-xs",children:["Object ","{",f.length," ",f.length===1?"key":"keys","}"]})]}),!d&&p.jsx("span",{className:"text-gray-400 ml-2",children:"{ ... }"})]}),d&&p.jsx("div",{className:"ml-4 mt-1",children:f.map(m=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${i}px`},children:[p.jsxs("span",{className:"text-blue-700 text-xs mt-0.5 font-medium min-w-fit",children:['"',m,'":']}),p.jsx("div",{className:"flex-1",children:o(s[m],m,c)})]},m))})]})}return p.jsx("span",{className:"text-gray-600",children:String(s)})};return p.jsx("div",{className:"font-mono text-xs",children:o(e,"",a)})},Jr=({data:e,title:t="Data",className:r="",maxHeight:n="300px",showHeader:a=!0,defaultExpanded:i=!1,defaultViewMode:o="interactive",viewMode:s,onViewModeChange:l,modalHeight:u="50vh"})=>{const[c,f]=T.useState(!1),[d,h]=T.useState(o),[m,y]=T.useState(i?new Set([""]):new Set),v=s!==void 0,b=v?s:d,x=E=>{v?l==null||l(E):h(E)},{isValidJson:w,displayContent:A}=T.useMemo(()=>{if(e==null)return{isValidJson:!1,displayContent:e===null?"null":"undefined"};if(typeof e=="string")try{return{isValidJson:!0,displayContent:JSON.parse(e)}}catch{return{isValidJson:!1,displayContent:e}}return typeof e=="object"?{isValidJson:!0,displayContent:e}:{isValidJson:!1,displayContent:String(e)}},[e]),g=T.useCallback(E=>{y(M=>{const _=new Set(M);return _.has(E)?_.delete(E):_.add(E),_})},[]),O=T.useCallback(()=>{const E=w?JSON.stringify(A,null,2):A;navigator.clipboard.writeText(E)},[w,A]),S=T.useCallback(()=>{f(!0)},[]),j=T.useCallback(()=>{f(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`bg-white border border-gray-200 rounded-md overflow-hidden ${r}`,children:[a&&p.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between",children:[w&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>x("interactive"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${b==="interactive"?"bg-gray-200":""}`,title:"Interactive JSON view (fold/unfold)",children:p.jsx(Pf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>x("plain"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${b==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(wf,{className:"w-4 h-4 text-gray-400"})})]}),p.jsx("div",{className:"flex-1"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:S,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Expand to full screen",children:p.jsx(jf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:O,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Copy content",children:p.jsx(fa,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs("div",{className:"p-3 overflow-auto bg-white",style:{maxHeight:n},children:[w?b==="interactive"?p.jsx(eW,{data:A,expandedKeys:m,onToggleKey:g,keyPath:""}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre",children:JSON.stringify(A,null,2)}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre-wrap",children:A}),!A&&A!==0&&A!==!1&&p.jsx("div",{className:"text-center text-gray-400 text-sm py-8",children:"No data available"})]})]}),p.jsx(QF,{isOpen:c,onClose:j,title:t,data:A,initialViewMode:b,modalHeight:u})]})};function Kb({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a}){const i=T.useMemo(()=>{var w,A;return((w=e.name)==null?void 0:w.toLowerCase().includes("guardrail"))||((A=e.metadata)==null?void 0:A.type)==="guardrail"?["summary","request"]:e.type==="llm"?["summary","request","response"]:e.type==="tool"?["request","response","logs"]:[]},[e.type,e.name,e.metadata]),[o,s]=T.useState(i[0]),l=a?a.has(e.id):!1,u=e.children&&e.children.length>0;T.useEffect(()=>{i.includes(o)||s(i[0])},[i,o]);const c=x=>{x.stopPropagation(),t&&t(e.id)},f=()=>{i.length===0&&u&&t?t(e.id):n&&n(e)},d=()=>{switch(e.status){case"completed":return p.jsx("svg",{className:"flex-shrink-0",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 0.5C2.96243 0.5 0.5 2.96243 0.5 6C0.5 9.03757 2.96243 11.5 6 11.5C9.03757 11.5 11.5 9.03757 11.5 6C11.5 2.96243 9.03757 0.5 6 0.5ZM8.60355 4.85355C8.79882 4.65829 8.79882 4.34171 8.60355 4.14645C8.40829 3.95118 8.09171 3.95118 7.89645 4.14645L5.25 6.79289L4.10355 5.64645C3.90829 5.45118 3.59171 5.45118 3.39645 5.64645C3.20118 5.84171 3.20118 6.15829 3.39645 6.35355L4.89645 7.85355C5.09171 8.04882 5.40829 8.04882 5.60355 7.85355L8.60355 4.85355Z",fill:"#17B26A"})});case"failed":return p.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-red-500"});case"running":return p.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-yellow-500 animate-pulse"});default:return p.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-gray-400"})}},h=()=>{var w,A;let x="agent";switch(e.type){case"Agent":x="agent";break;case"llm":x="model";break;case"tool":x="workflowtool";break;default:x="agent"}return p.jsx(wi,{icon:e.icon,iconSource:x,size:"small",name:e.name,className:"w-[24px] h-[24px]",toolType:e.type==="tool"?(w=e.metadata)==null?void 0:w.type:void 0,provider:e.type==="llm"?(A=e.metadata)==null?void 0:A.provider:void 0,modelName:e.type==="llm"?e.name:void 0})},m=x=>x?x<1e3?`${x}ms`:`${(x/1e3).toFixed(2)}s`:"",y=()=>i,v=()=>{var A,g,O;const x=e.toolInvocations&&e.toolInvocations.length>0||e.children&&e.children.length>0,w=e.isResponse;return x?p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.jsx("span",{className:"text-xs text-gray-600",children:w?"Responded":"Invoked"}),e.toolInvocations&&e.toolInvocations.length>0&&e.toolInvocations.map((S,j)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[p.jsx(Vs,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:S.name||"Tool"})]},S.tool_call_id||j)),(!e.toolInvocations||e.toolInvocations.length===0)&&e.children&&e.children.length>0&&e.children.map((S,j)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[S.type==="tool"?p.jsx(Vs,{className:"w-[12px] h-[12px] text-green-500 flex-shrink-0"}):p.jsx(g0,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:S.name||"Unknown"})]},S.id||j))]}),((O=(g=(A=e.toolInvocations)==null?void 0:A[0])==null?void 0:g.args)==null?void 0:O.reason)&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Reason"}),p.jsx("div",{className:"text-xs text-gray-600",children:e.toolInvocations[0].args.reason})]})]}):e.output&&!x?p.jsx("div",{className:"space-y-2",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-gray-600",children:"Generated"}),p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[4px] border border-gray-200 rounded text-xs",children:[p.jsx(T0,{className:"w-[12px] h-[12px] text-purple-500"}),p.jsx("span",{className:"text-gray-600",children:"Response"})]})]})}):p.jsx("div",{className:"text-xs text-gray-500 italic",children:"No actions taken"})},b=()=>{switch(o){case"summary":return p.jsxs("div",{className:"space-y-2",children:[e.input&&p.jsxs("div",{className:"border-b border-gray-100 pb-[8px]",children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Input"}),p.jsx(Jr,{data:e.input,title:"",showHeader:!1,maxHeight:"250px",defaultExpanded:!0,className:"border-0"})]}),p.jsxs("div",{className:"border-b border-gray-100 pb-2",children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Action"}),v()]}),e.output&&p.jsxs("div",{className:"border-b border-gray-100 pb-[8px]",children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Output"}),p.jsx(Jr,{data:e.output,title:"",showHeader:!1,maxHeight:"250px",defaultExpanded:!0,className:"border-0"})]}),e.llmUsage&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Usage"}),p.jsxs("div",{className:"text-xs text-gray-600",children:["Input: ",e.llmUsage.input_tokens," tokens, Output: ",e.llmUsage.output_tokens," tokens, Total: ",e.llmUsage.total_tokens," tokens"]})]})]});case"request":return p.jsx(Jr,{data:e.input,title:"Request Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"response":return p.jsx(Jr,{data:e.output,title:"Response Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"logs":const x={executionLog:[e.startTime&&{timestamp:new Date(e.startTime).toISOString(),level:"INFO",message:`${e.type==="tool"?"Tool":"Node"} execution started`,context:{nodeId:e.id,name:e.name,type:e.type}},e.status==="completed"&&{timestamp:new Date(e.endTime||e.startTime).toISOString(),level:"INFO",message:"Response received",context:{status:e.status,duration:e.duration,llmUsage:e.llmUsage}},e.endTime&&{timestamp:new Date(e.endTime).toISOString(),level:"SUCCESS",message:`${e.type==="tool"?"Tool":"Node"} execution completed`,context:{endTime:e.endTime,totalDuration:e.duration?`${e.duration}ms`:"unknown"}}].filter(Boolean),metadata:{totalLogs:0,startTime:e.startTime,endTime:e.endTime,duration:e.duration,status:e.status}};return x.metadata.totalLogs=x.executionLog.length,p.jsx(Jr,{data:x,title:"Execution Logs",maxHeight:"400px",defaultExpanded:!0,defaultViewMode:"plain"});default:return null}};return p.jsxs("div",{className:"bg-white w-full border-t border-gray-200",children:[p.jsx("div",{className:`flex items-center py-[8px] px-[8px] relative transition-colors cursor-pointer w-full
265
- `,onClick:f,children:p.jsxs("div",{className:"flex items-center gap-[6px] w-full",children:[p.jsx("div",{className:"p-[2px] rounded hover:bg-gray-200 cursor-pointer flex-shrink-0 bg-white z-[2]",onClick:x=>{x.stopPropagation(),u?c(x):n&&n(e)},title:u?r?"Collapse":"Expand":"Show details",children:p.jsx(ki,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${u&&r||l&&i.length>0?"rotate-90":""}`})}),p.jsx("div",{className:"flex-shrink-0",children:h()}),p.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",children:e.name}),p.jsxs("div",{className:"flex items-center gap-[12px] text-[10px] text-gray-500",children:[e.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Tf,{className:"w-[12px] h-[12px]"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:m(e.duration)})]}),e.llmUsage&&p.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:[e.llmUsage.total_tokens," Tokens"]})]}),p.jsx("div",{className:"flex-shrink-0",children:d()})]})}),l&&i.length>0&&p.jsxs("div",{className:"w-full pl-[32px] relative",children:[p.jsx("div",{className:"absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]"}),p.jsxs("div",{className:"px-[4px] py-[8px] w-full border-t border-gray-200",children:[p.jsx("div",{className:"bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200",children:y().map(x=>p.jsx("button",{onClick:()=>s(x),className:`px-[8px] py-[4px] text-xs font-medium rounded-[4px] text-gray-500 hover:text-gray-700 hover:shadow-tab hover:bg-white transition-colors ${o===x?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:x.charAt(0).toUpperCase()+x.slice(1)},x))}),p.jsx("div",{className:"px-[4px]",children:b()})]})]}),r&&u&&p.jsxs("div",{className:"w-full pl-[32px] relative",children:[p.jsx("div",{className:"absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]"}),e.children.map(x=>p.jsx(Kb,{node:x,onToggle:t,isExpanded:x.isExpanded,onNodeClick:n,selectedNodeIds:a},x.id))]})]})}const Yb=T.forwardRef(({executionEvents:e,sessionId:t,onNodeExpand:r,onNodeCollapse:n,className:a=""},i)=>{const[o,s]=T.useState(new Set),[l,u]=T.useState(new Set),[c,f]=T.useState(new Set),[d,h]=T.useState(e),m=T.useRef(0),y=T.useRef(null),v=T.useRef(!1);T.useImperativeHandle(i,()=>({addEvent:P=>{h(I=>[...I,P]),v.current=!0},addEvents:P=>{h(I=>[...I,...P]),v.current=!0},clearEvents:()=>{h([]),s(new Set),u(new Set),f(new Set),v.current=!1}}),[]);const b=T.useMemo(()=>{const P=Hb.buildSessionTree(d,t);return y.current=P,P},[d,t]),x=T.useRef(null);T.useEffect(()=>{d.length>m.current&&x.current&&setTimeout(()=>{x.current&&x.current.scrollTo({top:x.current.scrollHeight,behavior:"smooth"})},100),m.current=d.length},[d.length]),T.useEffect(()=>{if(d.length>0&&b.runs.length>0){if(v.current){const I=_(b);s(new Set(I)),v.current=!1}f(I=>{const C=new Set(I);return b.runs.forEach(D=>{C.has(D.runId)||C.add(D.runId)}),C});const P=b.runs[b.runs.length-1];if(P.rootNodes.length>0){const I=P.rootNodes[P.rootNodes.length-1],C=M(I);C&&u(D=>{const k=new Set(D);return k.add(C.id),k})}}},[b]);const w=T.useCallback(P=>{s(I=>{const C=new Set(I);return C.has(P)?(C.delete(P),n==null||n(P)):(C.add(P),r==null||r(P)),C})},[r,n]),A=T.useCallback(P=>{u(I=>{const C=new Set(I);return C.has(P.id)?C.delete(P.id):C.add(P.id),C})},[]),g=T.useCallback(P=>{f(I=>{const C=new Set(I);return C.has(P)?C.delete(P):C.add(P),C})},[]),O=T.useCallback(P=>({...P,isExpanded:o.has(P.id),children:P.children.map(C=>O(C))}),[o]),S=P=>P?P<1e3?`${P}ms`:`${(P/1e3).toFixed(2)}s`:"",j=P=>P?P>=1e6?`${(P/1e6).toFixed(1)}M tokens`:P>=1e3?`${(P/1e3).toFixed(1)}K tokens`:`${P} tokens`:"",E=P=>{navigator.clipboard.writeText(P)},M=P=>P.children.length===0?P:M(P.children[P.children.length-1]),_=P=>{const I=[],C=D=>{I.push(D.id),D.children.forEach(k=>C(k))};return P.runs.forEach(D=>{D.rootNodes.forEach(k=>C(k))}),I};return b.runs.length?p.jsx("div",{className:`flex flex-col h-full bg-white ${a}`,children:p.jsxs("div",{className:"flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden",ref:x,children:[p.jsxs("div",{className:"flex items-center w-full gap-[16px]",children:[p.jsx("div",{className:"text-xs text-gray-400 whitespace-nowrap flex-shrink-0",children:"Session initiated"}),p.jsx("div",{className:"flex-1 h-[1px] border-t border-dashed border-gray-300 w-full"}),p.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400 flex-shrink-0",children:[p.jsx("span",{children:b.sessionId}),p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",onClick:()=>E(b.sessionId),title:"Copy session ID",children:p.jsx(fa,{className:"w-[12px] h-[12px]"})}),p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",title:"Open in external viewer",children:p.jsx(Af,{className:"w-[12px] h-[12px]"})})]})]}),b.runs.map(P=>p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("div",{className:"rounded-[8px] border border-gray-300 bg-white overflow-hidden",children:[p.jsx("div",{className:"flex flex-col w-full",children:p.jsxs("div",{className:"flex items-center gap-2 p-[8px] bg-gray-50 cursor-pointer select-none",onClick:()=>g(P.runId),title:c.has(P.runId)?"Collapse run":"Expand run",children:[p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM10.4715 4.52924C10.2112 4.2689 9.78906 4.26889 9.52872 4.52924L6.66681 7.39114V5.6673C6.6668 5.29912 6.36834 5.00064 6.00015 5.00064C5.63197 5.00064 5.33351 5.29912 5.3335 5.6673V9.00064C5.3335 9.17745 5.40373 9.34702 5.52875 9.47205C5.65377 9.59707 5.82334 9.6673 6.00015 9.6673H9.3335L9.35068 9.66708C9.71092 9.65796 10.0002 9.36308 10.0002 9.00064C10.0001 8.63821 9.71092 8.34332 9.35068 8.3342L9.3335 8.33398H7.60962L10.4715 5.47205C10.7319 5.2117 10.7319 4.78958 10.4715 4.52924Z",fill:"#079455"})}),p.jsx("span",{className:"flex-1 text-xs text-gray-900 truncate",children:P.userInput||`Run ${P.runId}`}),p.jsx(cr,{className:`w-[16px] h-[16px] text-gray-400 flex-shrink-0 transition-transform ${c.has(P.runId)?"rotate-180":""}`})]})}),c.has(P.runId)&&p.jsx("div",{className:"bg-white w-full flex flex-col",children:P.rootNodes&&P.rootNodes.map(I=>p.jsx("div",{className:"w-full",children:p.jsx(Kb,{node:O(I),onToggle:w,isExpanded:o.has(I.id),onNodeClick:A,selectedNodeIds:l})},I.id))}),P.finalOutput&&p.jsxs("div",{className:"p-[8px] bg-gray-50 flex items-center gap-[8px] w-full border-t border-gray-200",children:[p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM6.66653 4.33398C6.29835 4.334 5.99988 4.63246 5.99988 5.00064C5.99988 5.36882 6.29835 5.66729 6.66653 5.6673H8.39041L5.52847 8.52924C5.26813 8.78958 5.26813 9.2117 5.52847 9.47205C5.78882 9.73239 6.21093 9.73239 6.47128 9.47205L9.33322 6.61011V8.33398C9.33323 8.70217 9.6317 9.00064 9.99988 9.00064C10.3681 9.00064 10.6665 8.70217 10.6665 8.33398V5.00064C10.6665 4.63821 10.3773 4.34333 10.0171 4.3342L9.99988 4.33398H6.66653Z",fill:"#155EEF"})}),p.jsx("span",{className:"flex-1 text-xs text-gray-900 truncate",title:P.finalOutput,children:P.finalOutput}),p.jsxs("div",{className:"flex items-center gap-[8px] flex-shrink-0",children:[P.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Tf,{className:"w-[12px] h-[12px] text-gray-400"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:S(P.duration)})]}),P.totalTokens&&p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:j(P.totalTokens)}),P.status==="running"&&p.jsx("span",{className:"text-[10px] text-gray-500",children:"In progress"})]})]})]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[p.jsx("span",{className:"text-xs text-gray-400",children:P.runId}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",onClick:()=>E(P.runId),title:"Copy run ID",children:p.jsx(fa,{className:"w-3 h-3 text-gray-400"})}),p.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",title:"Open run in external viewer",children:p.jsx(Af,{className:"w-3 h-3 text-gray-400"})})]})]})]},P.runId))]})}):p.jsx("div",{className:`flex flex-col h-full ${a}`,children:p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx("p",{className:"text-gray-500 text-sm",children:"No execution events to display"})})})});Yb.displayName="DebugPanel";const Xb=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=T.useState(e),[u,c]=T.useState(!1),[f,d]=T.useState(!1),h=T.useRef(null);T.useEffect(()=>{l(e)},[e]);function m(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function y(w){const A=w.target.value;l(A),t==null||t(A)}const v=()=>p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-gray-100",children:[p.jsx("span",{className:"text-xs font-mono uppercase text-gray-500",children:r}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{type:"button",className:"p-1 rounded hover:bg-gray-200",onClick:m,title:f?"Copied!":"Copy",children:p.jsx(fa,{size:16,className:f?"text-green-500":""})}),p.jsx("button",{type:"button",className:"p-1 rounded hover:bg-gray-200",onClick:()=>c(!u),title:u?"Minimize":"Maximize",children:u?p.jsx(O0,{size:16}):p.jsx(jf,{size:16})})]})]}),b=()=>p.jsx("textarea",{ref:h,spellCheck:!1,readOnly:n,placeholder:a,autoFocus:o,className:"flex-1 w-full h-full resize-none p-3 font-mono text-sm outline-none bg-transparent",value:s,onChange:y}),x=p.jsxs("div",{className:se("flex flex-col h-full w-full border rounded-md bg-background",i),style:{minHeight:"200px"},children:[p.jsx(v,{}),p.jsx(b,{})]});return u?p.jsx(hf,{children:p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:p.jsx("div",{className:"w-full h-full max-h-[calc(100vh-2rem)]",children:x})})}):x};Xb.displayName="CodeEditor";const Jb=T.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:se("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Jb.displayName="Avatar";const Zb=T.forwardRef(({className:e,...t},r)=>p.jsx("img",{ref:r,className:se("aspect-square h-full w-full",e),...t}));Zb.displayName="AvatarImage";const Qb=T.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Qb.displayName="AvatarFallback";const e0=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r,children:t}));e0.displayName="Card";const tW=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("flex flex-col space-y-1.5 p-6",e),...r,children:t}));tW.displayName="CardHeader";const rW=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...r,children:t}));rW.displayName="CardTitle";const nW=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("p-6 pt-0",e),...r,children:t}));nW.displayName="CardContent";const Bs=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],Fs=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Ws=["gpt-4o","gpt-4o-mini","gpt-3.5-turbo","claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus","gemini-1.5-pro","gemini-1.5-flash","llama-3.1-405b","llama-3.1-70b"],aW=(e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300),y=Math.floor(h*.3+Math.random()*100),v=Math.floor(h*.25+Math.random()*80),b=Math.floor(h*.2+Math.random()*60),x=Math.floor(h*.15+Math.random()*50),w={};Bs.forEach(O=>{const S=O.replace(/\s+/g,"").toLowerCase(),j=Math.floor(d/Bs.length);w[S]=Math.floor(j+Math.random()*(j*.5))});const A={};Fs.forEach(O=>{const S=O.replace(/[-]/g,""),j=Math.floor(h/Fs.length);A[S]=Math.floor(j+Math.random()*(j*.8))});const g={};Ws.forEach(O=>{const S=O.replace(/[-\.]/g,""),j=Math.floor(m/Ws.length);g[S]=Math.floor(j+Math.random()*(j*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:m,codeTools:y,workflowTools:v,knowledgeTools:b,mcpTools:x,...w,...A,...g,value:o})}return t},iW=()=>{const e=[],t=['{"name":"avatar14","color":"#F6D0FE","type":"human"}','{"name":"avatar2","color":"#3B82F6","type":"human"}','{"name":"avatar7","color":"#EF4444","type":"human"}','{"name":"avatar12","color":"#10B981","type":"human"}','{"name":"avatar8","color":"#F59E0B","type":"human"}'];return Bs.forEach((r,n)=>{e.push({id:`agent-${n+1}`,name:r,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*4e5)+1e5,successRate:`${Math.floor(Math.random()*20)+80}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${r.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:t[n]||t[0]})}),e},oW=()=>{const e=r=>r.includes("calculate-creditscore")?"Code Tool":r.includes("calculate-risk")?"Workflow Tool":r.includes("calculate-mortgage")?"MCP Tool":r.includes("analyse-expenses")?"Workflow Tool":r.includes("fetch-statement")?"Knowledge":"Code Tool",t=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'];return Fs.map((r,n)=>({id:`tool-${n+1}`,name:r,type:e(r),runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*90)+15}s`,tokens:Math.floor(Math.random()*2e4)+5e3,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:t[n]||t[0]}))},sW=()=>Ws.map((e,t)=>({id:`model-${t+1}`,name:e,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*5e5)+1e5,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()})),Zr=aW(),lW=iW(),uW=oW(),cW=sW(),fW={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"},{label:"All Drafts",value:"all"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"This month",value:"month"},{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"},{label:"Last 90 days",value:"90days"}],defaultValue:"month"},export:{enabled:!0,formats:["csv","json","pdf"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"sessions",title:"Sessions",description:"User engagement and session analytics",metrics:[{title:"Users",value:3384,change:{value:6,type:"increase"},info:"Total number of unique users",metricType:"users",view:{type:"chart",chart:{type:"line",title:"Total Users",data:Zr,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Sessions",value:11847,change:{value:18,type:"increase"},info:"Total number of user sessions",metricType:"sessions",view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:Zr,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Messages",value:34563,change:{value:5,type:"increase"},info:"Total messages exchanged",metricType:"messages",view:{type:"chart",chart:{type:"line",title:"Total Messages",data:Zr,dataKey:"messages",color:"#e879f9",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Tokens",value:32044,change:{value:44,type:"increase"},info:"Total tokens processed",metricType:"tokens",view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:Zr,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f97316",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#e879f9",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}}],view:{type:"chart"},layout:{span:12,order:1}},{id:"runs",title:"Runs",description:"Agent, tool, and model execution analytics",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Number of agent executions",metricType:"agentRuns",view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:Zr,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Agent Runs",data:lW,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:[{label:"All Agents",value:"all"},...Bs.map(e=>({label:e,value:e.replace(/\s+/g,"").toLowerCase(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${e.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}))],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:34563,change:{value:5,type:"increase"},info:"Number of tool executions",metricType:"toolRuns",view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:Zr,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Tool Runs",data:uW,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:[{label:"All Tools",value:"all"},...Fs.map((e,t)=>{const r=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'],n=a=>a.includes("calculate-creditscore")?"Code Tool":a.includes("calculate-risk")?"Workflow Tool":a.includes("calculate-mortgage")?"MCP Tool":a.includes("analyse-expenses")?"Workflow Tool":a.includes("fetch-statement")?"Knowledge":"Code Tool";return{label:e,value:e.replace(/[-]/g,""),icon:r[t]||r[0],type:n(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:32044,change:{value:44,type:"increase"},info:"Number of model inferences",metricType:"modelRuns",view:{type:"chart",chart:{type:"line",title:"Model Runs",data:Zr,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Model Runs",data:cW,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:[{label:"All Models",value:"all"},...Ws.map(e=>{const t=r=>{const n=r.toLowerCase();return n.includes("gpt")||n.includes("openai")?"⚡":n.includes("claude")||n.includes("anthropic")?"A":n.includes("gemini")||n.includes("google")?"G":n.includes("llama")||n.includes("meta")?"M":"🤖"};return{label:e,value:e.replace(/[-\.]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}],view:{type:"chart"},layout:{span:12,order:2}}]},Yt={primary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],secondary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],accent:["#6366f1","#8b5cf6","#d946ef","#06b6d4","#84cc16","#eab308"],semantic:{success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},gradients:{purple:["#8b5cf6","#a78bfa"],cyan:["#06b6d4","#22d3ee"],orange:["#f97316","#fb923c"],green:["#10b981","#34d399"],sunset:["#f97316","#ec4899"],ocean:["#06b6d4","#3b82f6"],forest:["#10b981","#84cc16"]}},dW={primary:["#7c3aed","#0891b2","#ea580c","#059669","#db2777","#d97706","#2563eb","#dc2626"],secondary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],accent:["#4f46e5","#7c3aed","#c026d3","#0891b2","#65a30d","#ca8a04"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},pW={primary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],secondary:["#c4b5fd","#67e8f9","#fdba74","#6ee7b7","#f9a8d4","#fcd34d","#93c5fd","#fca5a5"],accent:["#818cf8","#a78bfa","#e879f9","#22d3ee","#a3e635","#facc15"],semantic:{success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#60a5fa"}},hW={primary:["#1f2937","#374151","#6b7280","#9ca3af","#3b82f6","#1d4ed8","#10b981","#f59e0b"],secondary:["#4b5563","#6b7280","#9ca3af","#d1d5db","#60a5fa","#3b82f6","#34d399","#fbbf24"],accent:["#2563eb","#1d4ed8","#059669","#0891b2","#d97706","#b45309"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#1d4ed8"}},t0=(e,t)=>e.primary[t%e.primary.length],Pi=(e,t)=>e.semantic[t],vW=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},r0=(e,t=Yt)=>e.map((r,n)=>({...r,color:t0(t,n)})),Us=((e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300);t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:m,value:o})}return t})(),mW={id:"enhanced-dashboard",title:"Enhanced Color Configuration Dashboard",subtitle:"Demonstrating all color configuration options",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"}],defaultValue:"30days"},export:{enabled:!0,formats:["csv","json"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"manual-colors",title:"Manual Color Assignment",description:"Each line has manually assigned colors",metrics:[{title:"Total Users",value:3384,change:{value:6,type:"increase"},info:"Manually colored chart"}],view:{type:"chart",chart:{type:"line",title:"Manual Color Configuration",data:Us,lines:[{dataKey:"users",color:"#8b5cf6",label:"Users",strokeWidth:3},{dataKey:"sessions",color:"#06b6d4",label:"Sessions",strokeWidth:2},{dataKey:"messages",color:"#f97316",label:"Messages",strokeWidth:2,strokeDasharray:"5 5"}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:1}},{id:"auto-colors",title:"Auto-Assigned Colors",description:"Colors automatically assigned from palette",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Auto-colored from palette"}],view:{type:"chart",chart:{type:"line",title:"Auto Color Assignment",data:Us,lines:r0([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Yt),dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:2}},{id:"semantic-colors",title:"Semantic Colors",description:"Using semantic colors for different data types",metrics:[{title:"Success Rate",value:"94.2%",change:{value:2,type:"increase"},info:"Using semantic success color"},{title:"Error Rate",value:"5.8%",change:{value:1,type:"decrease"},info:"Using semantic error color"}],view:{type:"chart",chart:{type:"line",title:"Semantic Color Usage",data:Us,lines:[{dataKey:"users",color:Pi(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:Pi(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:Pi(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:Pi(Yt,"info"),label:"Info Events",strokeWidth:2}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:12,order:3}},{id:"single-custom",title:"Single Line Custom Color",description:"Single line chart with custom color and styling",metrics:[{title:"Total Messages",value:34563,change:{value:5,type:"increase"},info:"Custom styled single line"}],view:{type:"chart",chart:{type:"line",title:"Custom Single Line",data:Us,dataKey:"messages",color:"#ec4899",dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:250,showGrid:!0,curve:"monotone"}},layout:{span:12,order:4}}]},yW={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},gW={baseUrl:window.location.protocol+"//"+window.location.hostname,dashboardType:"agenticDashboard",projectId:"aa-bdbfa4eb-c7c4-4350-be96-d778188c2c4b",environment:"draft",headers:{authorization:"Bearer 2amvsUbh87obVLVYjbNnXCbXnOr-plekM7-qjKt2EJIZnZuAV2KT9WSTG0L4U33X",accountId:"6290f982fb880154e99bbede","Content-Type":"application/json"},defaultTimeRange:{fromTimestamp:new Date(Date.now()-7*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},bW={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app",sections:[{id:"usage-analytics",title:"Session Analytics",metrics:[{title:"Users",value:0,metricType:"users",highlighted:!0},{title:"Sessions",value:0,metricType:"sessions",highlighted:!1},{title:"Messages",value:0,metricType:"messages",highlighted:!1},{title:"Tokens",value:0,metricType:"tokens",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Usage Over Time",data:[],lines:[{dataKey:"count",color:"#3B82F6",label:"Count",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}},{id:"runs",title:"Execution Analytics",metrics:[{title:"Agent Runs",value:0,metricType:"agentRuns",highlighted:!0},{title:"Tool Runs",value:0,metricType:"toolRuns",highlighted:!1},{title:"Model Runs",value:0,metricType:"modelRuns",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Execution Runs Over Time",data:[],lines:[{dataKey:"count",color:"#10B981",label:"Runs",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}}],globalControls:{draft:{label:"Environment",options:[{label:"Draft",value:"draft"},{label:"Production",value:"production"},{label:"Staging",value:"staging"}],defaultValue:"draft"},timeRange:{label:"Time Range",useDatePicker:!0,options:[{label:"Last 7 days",value:"7d"},{label:"Last 30 days",value:"30d"}],defaultValue:"7d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},xW=`
264
+ </svg>`},MB=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Rt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Rt.toolLibrary;if(r.includes("knowledge"))return Rt.KNOWLEDGE;if(r.includes("mcp"))return Rt.MCP;if(Rt[e])return Rt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Rt.inlineTool:n.includes("library")||n.includes("workflow")?Rt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Rt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Rt.MCP:Rt.toolLibrary},wi=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,c]=T.useState(!1),[u,f]=T.useState(!1),[d,h]=T.useState(!1),m=EB(e),g=kB[r];if(t==="model"){const b=jb(o),w=()=>{h(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${g} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-white text-xs font-bold",children:A})})}return p.jsx("img",{src:b,alt:s||a,className:`${g} rounded ${n}`,onError:w})}if(m!=null&&m.name&&m.name!=="fallback"&&!l){const b=$B(m,t),w=()=>{c(!0)};return p.jsx("img",{src:b,alt:a,className:`${g} rounded-full object-cover ${n}`,onError:w})}if(l&&!u&&t==="agent"){const b=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,w=()=>{f(!0)};return p.jsx("img",{src:b,alt:a,className:`${g} rounded-full object-cover ${n}`,onError:w})}if(t==="model"){const b=jb(o),w=()=>{h(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${g} rounded-full bg-gray-500 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-white text-xs font-bold",children:A})})}return p.jsx("img",{src:b,alt:s||a,className:`${g} rounded ${n}`,onError:w})}const v=m||CB(a,t);if(t==="workflowtool"){const b=i||v.type||"toolLibrary",w=MB(b,a);return p.jsx("div",{className:`${g} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:p.jsx("div",{dangerouslySetInnerHTML:{__html:w}})})}const x=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`;return p.jsx("img",{src:x,alt:a,className:`${g} rounded-full object-cover ${n}`})},_b=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[p.jsx("div",{className:"text-left",children:"Name"}),p.jsx("div",{className:"text-center",children:"Runs"}),p.jsx("div",{className:"text-center",children:"Response Time"}),p.jsx("div",{className:"text-center",children:"Tokens"})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-[8px]",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(wi,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),p.jsx("div",{className:"min-w-0 flex-1 w-full",children:p.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Agent"})})]}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})};function NB(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","inlineTool","code tool","code","tool","event","EVENT"].includes(e)||["inlinetool","inlineTool","code tool","code","tool","event"].includes(t)?"bg-orange-100 text-orange-800 border-orange-200":["toollibrary","toolLibrary","workflow tool"].includes(e)||["toollibrary","toollibrary","workflow tool"].includes(t)?"bg-blue-100 text-blue-800 border-blue-200":["mcp","MCP","mcpTool","mcpTool"].includes(e)||["mcp","mcptool"].includes(t)?"bg-green-100 text-green-800 border-green-200":["knowledge","KNOWLEDGE","knowledge tool"].includes(e)||["knowledge","knowledge tool"].includes(t)?"bg-purple-100 text-purple-800 border-purple-200":"bg-gray-100 text-gray-800 border-gray-200"}function DB(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","code tool","code","tool","event","inlineTool"].includes(t)?"Code Tool":["toollibrary","workflow tool"].includes(t)?"Workflow Tool":["mcp","mcptool"].includes(t)?"MCP Tool":["knowledge","knowledge tool","knowledge"].includes(t)||e==="KNOWLEDGE"?"Knowledge":e==="inlineTool"?"Code Tool":e==="toolLibrary"?"Workflow Tool":e==="KNOWLEDGE"?"Knowledge":e==="MCP"||e==="mcpTool"?"MCP Tool":"Code Tool"}const Eb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[p.jsx("div",{className:"text-left",children:"Name"}),p.jsx("div",{className:"text-center",children:"Type"}),p.jsx("div",{className:"text-center",children:"Runs"}),p.jsx("div",{className:"text-center",children:"Response Time"})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-[8px]",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(wi,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.toolType||o.type})}),p.jsx("div",{className:"min-w-0 flex-1 w-full",children:p.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||"Unknown Tool"})})]}),p.jsx("div",{className:"flex items-center justify-center",children:p.jsx("span",{className:se("inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",NB(o.toolType||o.type||"Default")),children:DB(o.toolType||o.type||"Default")})}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.runs?i(o.runs):"-"}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},IB=e=>{if(!e)return"/assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},LB=e=>{if(!e)return"";const t=e.toLowerCase(),r={openai:"OpenAI","open ai":"OpenAI",chatopenai:"OpenAI",gpt:"OpenAI",anthropic:"Anthropic",claude:"Anthropic",google:"Google",gemini:"Google Gemini",chatgooglegenerativeai:"Google Gemini",googlegenerativeai:"Google Gemini",palm:"Google PaLM",azurechatopenai:"Azure OpenAI","azure open ai":"Azure OpenAI",azureopenai:"Azure OpenAI","azure openai":"Azure OpenAI",azure:"Azure OpenAI",aws:"AWS Bedrock",bedrock:"AWS Bedrock","aws bedrock":"AWS Bedrock",awsbedrock:"AWS Bedrock",amazon:"AWS Bedrock",cohere:"Cohere",meta:"Meta",llama:"Meta LLaMA",mistral:"Mistral",huggingface:"Hugging Face",together:"Together AI",replicate:"Replicate"};if(r[t])return r[t];for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return a;return e.charAt(0).toUpperCase()+e.slice(1)},RB=({provider:e})=>{const[t,r]=T.useState(!1),n=IB(e),a=()=>{r(!0)};if(t){const i=e?e.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:p.jsx("span",{className:"text-white text-xs font-bold",children:i})})}return p.jsx("img",{src:n,alt:e||"Model",className:"w-6 h-6 rounded",onError:a})},Cb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return p.jsxs("div",{className:se("w-full",t),children:[p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600",children:[p.jsx("div",{className:"text-left",children:"Model Name"}),p.jsx("div",{className:"text-center",children:"Runs"}),p.jsx("div",{className:"text-center",children:"Tokens"}),p.jsx("div",{className:"text-center",children:"Response Time"})]}),p.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>p.jsxs("div",{className:"grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-[8px]",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(RB,{provider:o.provider})}),p.jsxs("div",{className:"min-w-0 flex-1 w-full",children:[p.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:o.name||o.modelName||"Unknown Model"}),o.provider&&p.jsx("div",{className:"text-xs text-gray-500 truncate",children:LB(o.provider)})]})]}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.runs||0)}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:i(o.tokens||o.totalTokens||0)}),p.jsx("div",{className:"text-center font-medium text-xs text-gray-700",children:o.responseTime||(o.avgResponseTime?`${o.avgResponseTime}ms`:"N/A")})]},o.id||s))}),r<e.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:a,className:"px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",children:"Load 10 more"})})]})},BB=e=>{switch(e){case"agentRuns":return{title:"Agent Runs",entityName:"Agents"};case"toolRuns":return{title:"Tool Runs",entityName:"Tools"};case"modelRuns":return{title:"Model Runs",entityName:"Models"};default:return{title:"Runs",entityName:"Items"}}},FB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),$b=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var O;const s=BB(n),[l,c]=T.useState(10),[u,f]=T.useState("all"),[d,h]=T.useState(!1),m=[{label:`All ${s.entityName}`,value:"all"},...a.map(S=>({label:S.name,value:S.id}))],g=u==="all"?a:a.filter(S=>S.id===u),v=()=>{f("all"),h(!1),c(10),t()};T.useEffect(()=>{const S=$=>{$.key==="Escape"&&v()},P=$=>{d&&($.target.closest(".filter-dropdown")||h(!1))};return e&&(document.addEventListener("keydown",S),document.addEventListener("mousedown",P),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",S),document.removeEventListener("mousedown",P),document.body.style.overflow="unset"}},[e,d,v]),T.useEffect(()=>{e&&(f("all"),h(!1),c(10))},[e]);const x=S=>new Date(S).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),b=()=>{c(S=>Math.min(S+10,g.length))},w=S=>{f(S),h(!1),c(10)};if(!e)return null;const A=g.slice(0,l),y=((O=m.find(S=>S.value===u))==null?void 0:O.label)||`All ${s.entityName}`;return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",onClick:v}),p.jsxs("div",{className:se("fixed right-0 top-0 h-full w-[600px] bg-white shadow-[0px_20px_24px_-4px_rgba(16,24,40,0.08),0px_8px_8px_-4px_rgba(16,24,40,0.03)] z-50 transform transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full",o),children:[p.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]",children:[p.jsx("h2",{className:"text-lg font-semibold text-[#101828]",children:s.title}),p.jsx("button",{onClick:v,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:p.jsx(Ef,{className:"h-5 w-5 text-[#101828]"})})]}),p.jsxs("div",{className:"flex flex-col h-[calc(100%-64px)] p-6 gap-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"text-sm font-medium text-[#344054]",children:[s.title," (",x(r),")"]}),p.jsxs("div",{className:"w-[210px] relative filter-dropdown",children:[p.jsxs("button",{onClick:()=>h(!d),className:"w-full bg-white border border-[#d0d5dd] rounded-lg px-3.5 py-2.5 flex items-center justify-between text-sm text-[#101828] hover:bg-gray-50 transition-colors",children:[p.jsx("span",{children:y}),p.jsx(ur,{className:"h-4 w-4 text-[#101828]"})]}),d&&p.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto",children:m.map(S=>p.jsx("button",{onClick:()=>w(S.value),className:se("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",u===S.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:S.label},S.value))})]})]}),p.jsxs("div",{className:"flex-1 overflow-hidden",children:[p.jsx("div",{className:"bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2",children:p.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center",children:[p.jsx("div",{className:"col-span-2 px-0 py-2",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Name"})}),p.jsx("div",{className:"flex justify-center px-0 py-2",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Runs"})}),p.jsx("div",{className:"flex justify-center px-0 py-2",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Response Time"})})]})}),p.jsx("div",{className:"overflow-y-auto max-h-[calc(100%-40px)]",children:A.length===0?p.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[p.jsxs("h3",{className:"text-md font-medium text-gray-900 mb-[8px]",children:["No ",s.title.toLowerCase()," for this date"]}),p.jsxs("p",{className:"text-xs text-gray-500",children:["There were no ",s.title.toLowerCase()," recorded on ",x(r),"."]})]}):p.jsxs(p.Fragment,{children:[A.map((S,P)=>p.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",children:[p.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(wi,{icon:S.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"model",size:"small",name:S.name,toolType:S.toolType||S.type,provider:S.provider,modelName:S.modelName})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:S.name}),n==="modelRuns"&&S.provider&&p.jsx("div",{className:"text-xs text-[#475467] truncate",children:S.provider})]})]}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:FB(S.runs)})}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:S.responseTime})})]},S.id||P)),l<g.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:b,className:"bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",children:"Load 10 more"})})]})})]})]})]})]})};class kb{constructor(t=""){Bt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Bt(this,"baseUrl","");Bt(this,"endpoints",{});this.baseUrl=t,this.initializeEndpoints()}setBaseUrl(t){this.baseUrl=t,this.initializeEndpoints()}getEndpoint(t){return this.endpoints[t]||{endpoint:"",method:"GET"}}getBaseUrl(){return this.baseUrl}initializeEndpoints(){const t=`${this.baseUrl}${this.API_PATH}`;this.endpoints["usage-analytics.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.sessions.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.messages.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.users.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.tokens.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.agent-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.model-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.tool-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH}}getAvailableEndpoints(){return Object.keys(this.endpoints)}hasEndpoint(t){return t in this.endpoints}}class Mb{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new kb(t.baseUrl),this.defaultHeaders={"Content-Type":"application/json",...t.defaultHeaders},this.timeout=t.timeout||3e4}updateConfig(t){t.baseUrl&&this.endpointsService.setBaseUrl(t.baseUrl),t.defaultHeaders&&(this.defaultHeaders={...this.defaultHeaders,...t.defaultHeaders}),t.timeout&&(this.timeout=t.timeout)}async invoke(t,r,n,a){const i=this.endpointsService.getEndpoint(t);if(!i.endpoint)throw new Error(`Endpoint not found for service: ${t}`);const o=this.prepareRequest(i,r,n);try{const s=new AbortController,l=setTimeout(()=>s.abort(),(a==null?void 0:a.timeout)||this.timeout),c=await fetch(o.url,{method:o.method,headers:o.headers,body:o.body,signal:(a==null?void 0:a.signal)||s.signal});if(clearTimeout(l),!c.ok)throw new Error(`HTTP Error: ${c.status} ${c.statusText}`);return await c.json()}catch(s){throw s instanceof Error?s.name==="AbortError"?new Error("Request timeout"):s:new Error("Unknown error occurred during API call")}}prepareRequest(t,r,n){const a={...this.defaultHeaders,...n},i={};Object.entries(a).forEach(([l,c])=>{c!==void 0&&(i[l]=c)});let o=t.endpoint,s;if(t.method==="GET"&&r){const l=this.buildQueryParams(r);o+=`?${l}`}else r&&(s=JSON.stringify(r));return{url:o,method:t.method,headers:i,body:s}}buildQueryParams(t){const r={json:t},n=new URLSearchParams;return n.append("input",JSON.stringify(r)),n.append("rnd",Math.random().toString(36).substring(7)),n.toString()}getBaseUrl(){return this.endpointsService.getBaseUrl()}hasEndpoint(t){return this.endpointsService.hasEndpoint(t)}getAvailableEndpoints(){return this.endpointsService.getAvailableEndpoints()}}class Ht{constructor(t){Bt(this,"apiInvoker");Bt(this,"projectId");Bt(this,"environment");Bt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new Mb(r),this.projectId=t.projectId,this.environment=t.environment,this.defaultTimeRange=t.defaultTimeRange}updateConfig(t){(t.baseUrl||t.headers)&&this.apiInvoker.updateConfig({baseUrl:t.baseUrl,defaultHeaders:t.headers}),t.projectId&&(this.projectId=t.projectId),t.environment&&(this.environment=t.environment),t.defaultTimeRange&&(this.defaultTimeRange=t.defaultTimeRange,console.log("🔄 API Service: Updated defaultTimeRange:",this.defaultTimeRange))}getDefaultTimeRange(){return this.defaultTimeRange||Ht.getDateRange(7)}async fetchEnvironments(){try{const r=`${this.apiInvoker.getBaseUrl()}/aaa/api/v1/apps/${this.projectId}/environments?rnd=${Math.random().toString(36).substring(2,8)}`;console.log("🌍 Fetching environments for project:",this.projectId),console.log("🔗 Environment API URL:",r);const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...this.apiInvoker.defaultHeaders}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();return console.log("✅ Environments fetched successfully:",a.map(i=>({name:i.envName,enabled:i.isEnabled,status:i.status}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||Ht.getTimeDimension(t,r);console.log("📊 Fetching usage analytics cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"usage-analytics",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("usage-analytics.cards",o)).result.data.json}async fetchRunsCards(t,r,n,a=[]){const i=n||Ht.getTimeDimension(t,r);console.log("📊 Fetching runs cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"runs",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("runs.cards",o)).result.data.json}async fetchTimeSeriesData(t,r,n,a,i,o=[]){const s=i||Ht.getTimeDimension(n,a);console.log("📊 Fetching time series data:",{metric:t,category:r,dateRange:{fromTimestamp:n,toTimestamp:a},providedTimeDimension:i,resolvedTimeDimension:s});const l=`${r}.${t}.timeseries`,c={projectId:this.projectId,type:"time-series",category:r,envId:this.environment,fromTimestamp:n,toTimestamp:a,filter:o,metric:t,timeDimension:s};return(await this.apiInvoker.invoke(l,c)).result.data.json}transformUsageAnalyticsCards(t){const r=t.data.trends;console.log("Transforming usage analytics cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",info:"Number of unique users who interacted with the app",highlighted:!0,change:r!=null&&r.users?{value:Math.abs(r.users.changePercent),type:n(r.users.changePercent)}:void 0},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",info:"Number of conversations initiated with the app",highlighted:!1,change:r!=null&&r.sessions?{value:Math.abs(r.sessions.changePercent),type:n(r.sessions.changePercent)}:void 0},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Total messages exchanged between users and the app",highlighted:!1,change:r!=null&&r.messages?{value:Math.abs(r.messages.changePercent.total),type:n(r.messages.changePercent.total)}:void 0},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Total input and output tokens processed by the app for all interactions",highlighted:!1,change:r!=null&&r.tokens?{value:Math.abs(r.tokens.changePercent.total),type:n(r.tokens.changePercent.total)}:void 0}]}transformRunsCards(t){const r=t.data.trends;console.log("Transforming runs cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",info:"Number of times the AI agents were executed to handle user requests",highlighted:!0,change:r!=null&&r.agentRuns?{value:Math.abs(r.agentRuns.changePercent),type:n(r.agentRuns.changePercent)}:void 0},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of times various tools were triggered by the AI agents to complete tasks",highlighted:!1,change:r!=null&&r.toolRuns?{value:Math.abs(r.toolRuns.changePercent.total),type:n(r.toolRuns.changePercent.total)}:void 0},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",info:"Number of times the AI agents called various language models to generate responses",highlighted:!1,change:r!=null&&r.modelRuns?{value:Math.abs(r.modelRuns.changePercent),type:n(r.modelRuns.changePercent)}:void 0}]}transformTimeSeriesDataForMetric(t,r){var a;if(console.log("=== METRIC-SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse:",JSON.stringify(t,null,2)),console.log("Metric type:",r),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const n=t.data.map((i,o)=>{console.log(`Processing point ${o}:`,i);const s=new Date(i.timestamp),l=s.toISOString().split("T")[0],c=s.toLocaleDateString("en-US",{month:"short",day:"numeric"}),u={date:l,timestamp:c,formattedDate:c,count:i.count||0,value:i.count||0,input_tokens:i.input_tokens||0,output_tokens:i.output_tokens||0,total_tokens:(i.input_tokens||0)+(i.output_tokens||0),inputTokens:i.input_tokens||0,outputTokens:i.output_tokens||0,totalTokens:(i.input_tokens||0)+(i.output_tokens||0),listView:i.listView||[],index:o};switch(r){case"users":u.users=i.count||0;break;case"sessions":u.sessions=i.count||0;break;case"messages":u.messages=i.count||0;break;case"tokens":u.tokens=i.count||0,i.input_tokens||i.output_tokens?u.totalTokens=(i.input_tokens||0)+(i.output_tokens||0):u.totalTokens=i.count||0;break;case"agentRuns":u.agentRuns=i.count||0;break;case"toolRuns":u.toolRuns=i.count||0;break;case"modelRuns":u.modelRuns=i.count||0;break;default:u.users=i.count||0,u.sessions=i.count||0,u.messages=i.count||0,u.tokens=i.count||0,u.agentRuns=i.count||0,u.toolRuns=i.count||0,u.modelRuns=i.count||0}return console.log(`Transformed point ${o} for metric ${r}:`,u),u});return console.log("Final transformed data array:",JSON.stringify(n,null,2)),console.log("Sample transformed point for chart:",n[0]),console.log("Populated metric property:",r,"=",(a=n[0])==null?void 0:a[r||"count"]),console.log("=== END METRIC-SPECIFIC TRANSFORM DEBUG ==="),n}transformTimeSeriesData(t){return this.transformTimeSeriesDataForMetric(t)}transformAgentsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>{var o,s;let a="",i=null;if(r.icon)try{if(i=typeof r.icon=="string"?JSON.parse(r.icon):r.icon,i.name){const l=((o=r.agentName)==null?void 0:o.replace(/\s+/g,""))||`agent${n}`,c=((s=i.color)==null?void 0:s.replace("#",""))||"b6e3f4";a=`https://api.dicebear.com/7.x/avataaars/svg?seed=${l}&backgroundColor=${c}&backgroundType=solid`}}catch{console.warn("Failed to parse icon data:",r.icon)}return{id:`agent-${n+1}`,name:r.agentName||`Agent ${n+1}`,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*150),successRate:r.successRate?`${Math.round(r.successRate)}%`:"95%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:a||`https://api.dicebear.com/7.x/avataaars/svg?seed=agent${n}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:r.icon||void 0}}):(console.warn("Invalid listView data for agents:",t),[])}transformToolsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`tool-${n+1}`,name:r.toolName||r.tool_name||`Tool ${n+1}`,type:r.type||r.toolType||r.tool_type||"Code Tool",runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*50),successRate:r.successRate?`${Math.round(r.successRate)}%`:"92%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon||r.tool_icon||void 0})):(console.warn("Invalid listView data for tools:",t),[])}transformModelsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`model-${n+1}`,name:r.modelName||`Model ${n+1}`,modelName:r.modelName,provider:r.provider,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",avgResponseTime:r.avgResponseTime,tokens:r.tokens||r.totalTokens||Math.floor((r.count||0)*300),totalTokens:r.totalTokens||r.tokens,successRate:r.successRate?`${Math.round(r.successRate)}%`:"98%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon})):(console.warn("Invalid listView data for models:",t),[])}extractAgentControlOptions(t){if(!Array.isArray(t))return[{label:"All Agents",value:"all"}];const r=[{label:"All Agents",value:"all"}];return t.forEach(n=>{var a;if(n.agentName){let i="";try{if(n.icon){const o=typeof n.icon=="string"?JSON.parse(n.icon):n.icon;if(o.name){const s=n.agentName.replace(/\s+/g,""),l=((a=o.color)==null?void 0:a.replace("#",""))||"b6e3f4";i=`https://api.dicebear.com/7.x/avataaars/svg?seed=${s}&backgroundColor=${l}&backgroundType=solid`}}}catch{console.warn("Failed to parse icon data for control:",n.icon)}r.push({label:n.agentName,value:n.agentName.replace(/\s+/g,"").toLowerCase(),avatar:i||`https://api.dicebear.com/7.x/avataaars/svg?seed=${n.agentName.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}}),r}extractToolControlOptions(t){if(!Array.isArray(t))return[{label:"All Tools",value:"all"}];const r=[{label:"All Tools",value:"all"}];return t.forEach(n=>{const a=n.toolName||n.tool_name;if(a){let i=function(o){if(!o)return"Code Tool";const s=o.toLowerCase();return["inlinetool","code tool","code","event"].includes(s)?"Code Tool":["toollibrary","workflow tool"].includes(s)?"Workflow Tool":["mcp","mcptool"].includes(s)?"MCP Tool":["knowledge","knowledge tool"].includes(s)||o==="KNOWLEDGE"?"Knowledge":o==="inlineTool"?"Code Tool":o==="toolLibrary"?"Workflow Tool":o==="MCP"||o==="mcpTool"?"MCP Tool":"Code Tool"};r.push({label:a,value:a.replace(/[-]/g,""),icon:n.icon||n.tool_icon||void 0,type:n.type||i(n.toolType||n.tool_type)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}];return t.forEach(n=>{n.modelName&&r.push({label:n.modelName,value:n.modelName.replace(/[-\.]/g,""),icon:n.icon,type:n.provider})}),r}async fetchTimeSeriesDataWithTableData(t,r,n,a,i,o=[]){const s=await this.fetchTimeSeriesData(t,r,n,a,i,o);let l=[];s.data.forEach(d=>{d.listView&&Array.isArray(d.listView)&&(l=[...l,...d.listView])});const c=this.aggregateListViewItems(l);let u=[],f=[];return t==="agent-runs"?(u=this.transformAgentsListViewToTable(c),f=this.extractAgentControlOptions(c)):t==="tool-runs"?(u=this.transformToolsListViewToTable(c),f=this.extractToolControlOptions(c)):t==="model-runs"&&(u=this.transformModelsListViewToTable(c),f=this.extractModelControlOptions(c)),{chartData:this.transformTimeSeriesDataForMetric(s,t.replace("-","")),tableData:u,controlOptions:f}}aggregateListViewItems(t){const r=new Map;return t.forEach(n=>{const a=n.agentName||n.toolName||n.modelName||"unknown";if(r.has(a)){const i=r.get(a);i.count=(i.count||0)+(n.count||0),i.avgResponseTime=i.avgResponseTime&&n.avgResponseTime?(i.avgResponseTime+n.avgResponseTime)/2:i.avgResponseTime||n.avgResponseTime,i.tokens=(i.tokens||0)+(n.tokens||0)}else r.set(a,{...n})}),Array.from(r.values())}async fetchEnhancedMetricsData(t,r,n,a=[]){try{const[i,o,s]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("model-runs","runs",t,r,n,a)]);return{agents:i,tools:o,models:s}}catch(i){throw console.error("Error fetching enhanced metrics data:",i),i}}async transformRunsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=h=>h>0?"increase":"decrease",[l,c,u,f]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("model-runs","runs",r,n,a,i),this.fetchTimeSeriesData("tool-runs","runs",r,n,a,i)]),d=this.transformTimeSeriesDataForToolRuns(f);return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,info:"Number of times the AI agents were executed to handle user requests",change:o!=null&&o.agentRuns?{value:Math.abs(o.agentRuns.changePercent),type:s(o.agentRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:l.chartData,dataKey:"agentRuns",color:"#0BA5EC",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Agent Runs",data:l.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:l.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of times various tools were triggered by the AI agents to complete tasks",highlighted:!1,change:o!=null&&o.toolRuns?{value:Math.abs(o.toolRuns.changePercent.total),type:s(o.toolRuns.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:d,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#667085",label:"Tool Runs"},{dataKey:"codeTools",color:"#F38744",label:"Code Tools"},{dataKey:"workflowTools",color:"#2970FF",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#7A5AF8",label:"Knowledge"},{dataKey:"mcpTools",color:"#47CD89",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Tool Runs",data:c.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:c.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,info:"Number of times the AI agents called various language models to generate responses",change:o!=null&&o.modelRuns?{value:Math.abs(o.modelRuns.changePercent),type:s(o.modelRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Model Runs",data:u.chartData,dataKey:"modelRuns",color:"#47CD89",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Model Runs",data:u.tableData,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:u.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}]}async transformUsageAnalyticsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=d=>d>0?"increase":"decrease",[l,c,u,f]=await Promise.all([this.fetchTimeSeriesData("users","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("sessions","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("messages","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("tokens","usage-analytics",r,n,a,i)]);return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,info:"Number of unique users who interacted with the app",change:o!=null&&o.users?{value:Math.abs(o.users.changePercent),type:s(o.users.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Users",data:this.transformTimeSeriesDataForMetric(l,"users"),dataKey:"users",color:"#4E5BA6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,info:"Number of conversations initiated with the app",change:o!=null&&o.sessions?{value:Math.abs(o.sessions.changePercent),type:s(o.sessions.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:this.transformTimeSeriesDataForMetric(c,"sessions"),dataKey:"sessions",color:"#0BA5EC",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Total messages exchanged between users and the app",highlighted:!1,change:o!=null&&o.messages?{value:Math.abs(o.messages.changePercent.total),type:s(o.messages.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Messages",data:this.transformTimeSeriesDataForMetric(u,"messages"),dataKey:"messages",color:"#E478FA",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Total input and output tokens processed by the app for all interactions",highlighted:!1,change:o!=null&&o.tokens?{value:Math.abs(o.tokens.changePercent.total),type:s(o.tokens.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:this.transformTimeSeriesDataForMetric(f,"tokens"),yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#FF692E",label:"Total Tokens"},{dataKey:"inputTokens",color:"#5925DC",label:"Input Tokens"},{dataKey:"outputTokens",color:"#E478FA",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}}]}transformTimeSeriesDataForToolRuns(t){if(console.log("=== TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse for tool runs:",JSON.stringify(t,null,2)),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const r=t.data.map((n,a)=>{console.log(`Processing point ${a}:`,n);const i=new Date(n.timestamp),o=i.toISOString().split("T")[0],s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=n.count||0;let c=0,u=0,f=0,d=0;if(n.listView&&Array.isArray(n.listView)){n.listView.forEach(g=>{const v=g.count||0,x=(g.toolType||g.tool_type||"").toLowerCase(),b=(g.toolName||g.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:x,toolName:b,count:v});const w=x.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(x)||["inlinetool","tool","code","codetool","event"].includes(w)?c+=v:["toollibrary","toolLibrary","workflow","workflowtool"].includes(x)||["toollibrary","workflow","workflowtool"].includes(w)?u+=v:["knowledge","KNOWLEDGE","knowledgetool"].includes(x)||["knowledge","knowledgetool"].includes(w)?f+=v:["mcp","MCP","mcptool","mcpTool"].includes(x)||["mcp","mcptool"].includes(w)?d+=v:(console.log(`Unknown tool type '${x}' for tool '${b}', defaulting to code tools`),c+=v)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:c,workflowTools:u,knowledgeTools:f,mcpTools:d,total:c+u+f+d,expectedTotal:l});const m=c+u+f+d;if(Math.abs(m-l)>1){console.warn(`Breakdown total (${m}) doesn't match expected total (${l}) for point ${a}`);const g=l-m;c+=g,console.log(`Adjusted codeTools by ${g} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),c=l;const h={date:o,timestamp:s,formattedDate:s,toolRuns:l,value:l,count:l,codeTools:c,workflowTools:u,knowledgeTools:f,mcpTools:d,input_tokens:n.input_tokens||0,output_tokens:n.output_tokens||0,total_tokens:(n.input_tokens||0)+(n.output_tokens||0),inputTokens:n.input_tokens||0,outputTokens:n.output_tokens||0,totalTokens:(n.input_tokens||0)+(n.output_tokens||0),listView:n.listView||[],index:a};return console.log(`Transformed tool runs point ${a}:`,h),h});return console.log("Final tool runs transformed data:",JSON.stringify(r,null,2)),console.log("=== END TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),r}async fetchAllCardsData(t,r,n=[]){try{const[a,i]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,void 0,n),this.fetchRunsCards(t,r,void 0,n)]);return{usageAnalytics:this.transformUsageAnalyticsCards(a),runs:this.transformRunsCards(i)}}catch(a){throw console.error("Error fetching cards data:",a),a}}async fetchAllCardsDataWithEnhancedViews(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,n,a),this.fetchRunsCards(t,r,n,a)]),[s,l]=await Promise.all([this.transformUsageAnalyticsCardsWithEnhancedData(i,t,r,n,a),this.transformRunsCardsWithEnhancedData(o,t,r,n,a)]);return{usageAnalytics:s,runs:l}}catch(i){throw console.error("Error fetching enhanced cards data:",i),i}}async fetchDefaultTimeSeriesData(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchTimeSeriesData("sessions","usage-analytics",t,r,n,a),this.fetchTimeSeriesData("agent-runs","runs",t,r,n,a)]);return{sessions:this.transformTimeSeriesData(i),agentRuns:this.transformTimeSeriesData(o)}}catch(i){throw console.error("Error fetching default time series data:",i),i}}transformListViewForSlider(t,r){return Array.isArray(t)?t.map((n,a)=>{const i={id:`${r}-${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?n.avgResponseTime<1e3?`${Math.round(n.avgResponseTime)}ms`:`${(n.avgResponseTime/1e3).toFixed(2)}s`:"0ms",successRate:n.successRate?`${Math.round(n.successRate)}%`:void 0,tokens:n.totalTokens||n.tokens||0,icon:n.icon||n.tool_icon||void 0,aiModel:"gpt-4o"};switch(r){case"agentRuns":return{...i,name:n.agentName||`Agent ${a+1}`,type:"Agent",aiModel:this.extractAIModel(n)||"gpt-4o"};case"toolRuns":return{...i,name:n.toolName||n.tool_name||`Tool ${a+1}`,type:n.type||n.toolType||n.tool_type||"Code Tool",toolType:n.toolType||n.tool_type,aiModel:this.extractAIModel(n)||"gpt-4o"};case"modelRuns":return{...i,name:n.modelName||`Model ${a+1}`,modelName:n.modelName,provider:n.provider,type:n.provider||"Model",aiModel:n.modelName||n.model||"gpt-4o"};default:return{...i,name:`Item ${a+1}`,type:"Unknown",aiModel:"gpt-4o"}}}):(console.warn("Invalid listView data for slider:",t),[])}extractAIModel(t){if(t.modelName)return t.modelName;if(t.model)return t.model;if(t.llmModel)return t.llmModel;if(t.aiModel)return t.aiModel;const r=["gpt-4o","gpt-4o-mini","claude-3-5-haiku"];return r[Math.floor(Math.random()*r.length)]}static getDateRange(t=7){const r=new Date,n=new Date;return n.setDate(r.getDate()-t),{fromTimestamp:n.toISOString(),toTimestamp:r.toISOString()}}static getTimeDimension(t,r){const n=new Date(t),a=new Date(r),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=o.getTime()-i.getTime(),l=s/(1e3*60*60*24),c=i.toISOString().split("T")[0],u=o.toISOString().split("T")[0],f=c===u,d=new Date(n.getFullYear(),n.getMonth(),n.getDate()),h=f&&Math.abs(n.getTime()-d.getTime())<1e3,m=Math.abs(a.getTime()-n.getTime()),g=m<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:c,toDateStr:u,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:m,isVeryClose:g,fromStartOfDay:d.toISOString(),recommended:f||h||g||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||g||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const Nb=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,c]=T.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),u=(g,v)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:g,date:v,context:n});const x=n==null?void 0:n.metricType;if(!x||!["agentRuns","toolRuns","modelRuns"].includes(x)){console.log("Slider not applicable for metric type:",x);return}const b=g.listView||[];console.log("ListView data for clicked date:",b);const A=new Ht({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(b,x),y=g[x]||g.count||0;console.log("Opening slider with data:",{date:v,metricType:x,sliderData:A,totalRuns:y}),c({isOpen:!0,date:v,metricType:x,data:A,totalRuns:y})},f=()=>{c(g=>({...g,isOpen:!1}))},d=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),p.jsx("div",{className:"flex-1",children:p.jsx(Ab,{config:i,isLoading:r,onDataPointClick:u})})):null,h=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(_b,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(Eb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(Cb,{data:o.data})}):p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(Pb,{config:o})}):null,m=()=>{switch(a){case"chart":return d();case"table":return h();case"mixed":return p.jsxs("div",{className:se("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[d(),h()]});default:return p.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:se("w-full",t),children:m()}),p.jsx($b,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},Ms=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=T.useState(!1),[l,c]=T.useState(t||""),u=T.useRef(null),f=e.find(m=>m.value===l);T.useEffect(()=>{const m=g=>{u.current&&!u.current.contains(g.target)&&s(!1)};return o&&document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[o]);const d=m=>{i||(c(m),s(!1),n==null||n(m))},h=()=>{i||s(!o)};return p.jsxs("div",{ref:u,className:se("relative",a),children:[p.jsxs("button",{type:"button",className:se("flex h-[40px] text-left w-full items-center rounded-lg border border-gray-300 bg-white px-[14px] py-[10px] medium shadow-none outline-none focus-visible:border-ring focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-gray-25 transition-colors",a),onClick:h,disabled:i,children:[p.jsxs("div",{className:"flex items-center gap-[8px] w-full",children:[p.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase",children:"ENV"}),p.jsx("span",{className:se("truncate w-full",!f&&"text-gray-700 font-medium text-sm"),children:f?f.label:r})]}),p.jsx(ur,{className:se("h-[16px] w-[16px] text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&p.jsx("div",{className:"absolute p-[4px] w-full top-full left-0 z-50 mt-1 bg-popover max-h-[300px] overflow-y-auto text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border shadow-md",children:e.map(m=>{const g=l===m.value;return p.jsxs("div",{role:"option",className:"relative group",children:[p.jsx("button",{className:se("focus:bg-gray-50 rounded-[4px] hover:bg-gray-50 focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center px-[14px] py-[10px] text-sm text-left outline-none transition-colors",m.disabled?"opacity-50 cursor-not-allowed text-gray-400":g?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-50"),onClick:()=>!m.disabled&&d(m.value),disabled:m.disabled,children:p.jsx("span",{className:"block whitespace-nowrap w-full",children:m.label})}),m.label.length>25&&p.jsx("div",{className:"absolute left-full top-0 ml-2 z-[60] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:p.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[m.label,p.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},m.value)})})]})},Db=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,maxItems:l=100,maxLabelLength:c=30})=>{const[u,f]=T.useState(!1),[d,h]=T.useState(""),[m,g]=T.useState(()=>{const N=t||r;return a?Array.isArray(N)?N:N?[N]:[]:N?[Array.isArray(N)?N[0]:N]:[]}),v=T.useRef(null);T.useEffect(()=>{const N=j=>{v.current&&!v.current.contains(j.target)&&f(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const x=(N,j=c)=>N.length<=j?N:N.substring(0,j)+"...",b=i?e.filter(N=>N.label.toLowerCase().includes(d.toLowerCase())):e,w=b.slice(0,l),A=b.length>l,y=N=>{let j;if(a){if(N==="all"){S();return}if(m.includes(N))j=m.filter(k=>k!==N),j=j.filter(k=>k!=="all");else{j=m.filter(D=>D!=="all"),j=[...j,N];const k=b.filter(D=>D.value!=="all").map(D=>D.value),_=j.filter(D=>D!=="all");_.length===k.length&&(j=["all",..._])}}else j=[N],f(!1);g(j);const C=a?j:j[0]||"";o==null||o(C)},O=()=>{if(!a)return{checked:!1,indeterminate:!1};const N=b.filter(C=>C.value!=="all").map(C=>C.value),j=m.filter(C=>C!=="all"&&N.includes(C));return m.includes("all")&&j.length===0?{checked:!1,indeterminate:!1}:j.length===0?{checked:!1,indeterminate:!1}:j.length===N.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},S=()=>{if(!a)return;const N=O(),j=b.filter(C=>C.value!=="all").map(C=>C.value);if(N.checked)g(["all"]),o==null||o(["all"]);else{const C=["all",...j];g(C),o==null||o(C)}},P=()=>{g(["all"]),o==null||o(a?["all"]:"all")},$=()=>{if(!a){if(m.length===0)return n;const k=e.find(_=>_.value===m[0]);return(k==null?void 0:k.label)||n}const N=m.filter(k=>k!=="all"),j=m.includes("all");if(N.length===0)return n;if(N.length===1){const k=e.find(_=>_.value===N[0]);return(k==null?void 0:k.label)||n}const C=e.filter(k=>k.value!=="all").length;return N.length===C?"All selected":`${N.length} selected`};return p.jsxs("div",{className:se("relative",s),ref:v,children:[p.jsxs("button",{type:"button",onClick:()=>f(!u),className:se("w-full flex items-center justify-between px-[12px] py-[8px] text-left text-xs","border border-gray-300 rounded-md bg-white hover:bg-gray-50","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500","transition-colors duration-150"),children:[p.jsx("span",{className:se("truncate",m.length===0&&"text-gray-500"),children:$()}),p.jsx(ur,{className:se("w-[16px] h-[16px] text-gray-400 transition-transform duration-150",u&&"transform rotate-180")})]}),u&&p.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-[4px] bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&p.jsx("div",{className:"p-[12px] border-b border-gray-100",children:p.jsxs("div",{className:"relative",children:[p.jsx(_f,{className:"absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400"}),p.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:d,onChange:N=>h(N.target.value),className:"w-full pl-[36px] pr-[12px] py-[8px] text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&p.jsxs("div",{className:"flex items-center justify-between px-[12px] py-[8px] border-b border-gray-100 bg-gray-50",children:[p.jsxs("button",{type:"button",onClick:S,className:"flex items-center text-xs font-medium text-gray-700 hover:text-gray-900",children:[p.jsx("div",{className:se("flex items-center justify-center w-[16px] h-[16px] mr-[8px] border transition-colors duration-150",(()=>{const N=O();return N.indeterminate||N.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const N=O();return N.indeterminate?p.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):N.checked?p.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})()}),"Select all"]}),p.jsx("button",{type:"button",onClick:P,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),p.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[w.length===0?p.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):w.map(N=>{let j;return N.value==="all"?null:(j=m.includes(N.value),p.jsxs("div",{className:"relative group",children:[p.jsxs("div",{onClick:()=>y(N.value),className:se("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",j&&"bg-gray-50"),children:[a?p.jsx("div",{className:se("flex items-center justify-center w-[16px] h-[16px] mr-[12px] border","transition-colors duration-150",j?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:j&&p.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):p.jsx("div",{className:se("w-[16px] h-[16px] mr-[12px] rounded-full border-2 transition-colors duration-150",j?"border-blue-600 bg-blue-600":"border-gray-300"),children:j&&p.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),p.jsx("span",{className:se("flex-1 text-xs whitespace-nowrap truncate",j?"font-medium text-gray-700":"text-gray-500"),children:x(N.label)})]}),N.label.length>c&&p.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:p.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-[12px] py-[8px] shadow-lg max-w-xs break-words whitespace-normal",children:[N.label,p.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},N.value))}),A&&p.jsxs("div",{className:"px-[12px] py-[8px] text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[p.jsxs("div",{className:"text-center font-medium",children:["+",b.length-l," more items"]}),i&&p.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},Ib=({config:e,className:t})=>{var s;const{dropdown:r,buttons:n,toggle:a}=e,i=l=>{const c=l.toLowerCase();return c.includes("agent")?"agent":c.includes("tool")?"workflowtool":"app"},o=l=>{const c=l.toLowerCase();return c.includes("agent")?{maxItems:50,maxLabelLength:25}:c.includes("tool")?{maxItems:30,maxLabelLength:20}:{maxItems:40,maxLabelLength:25}};return p.jsxs("div",{className:se("flex items-center gap-3",t),children:[r&&p.jsx(p.Fragment,{children:r.multiSelect?p.jsx(Db,{options:r.options,value:r.defaultValue,placeholder:r.label,multiSelect:r.multiSelect,searchable:r.searchable,onChange:r.onChange,className:"w-48",iconSource:i(r.label),maxItems:o(r.label).maxItems,maxLabelLength:o(r.label).maxLabelLength}):p.jsx(Ms,{options:r.options,value:Array.isArray(r.defaultValue)?r.defaultValue[0]:r.defaultValue||((s=r.options[0])==null?void 0:s.value),placeholder:r.label,onChange:l=>{var c;return(c=r.onChange)==null?void 0:c.call(r,l)},className:"w-48"})}),n&&n.length>0&&p.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,c)=>p.jsx("button",{onClick:()=>{var u;return(u=l.onClick)==null?void 0:u.call(l,l.value)},className:se("px-[12px] py-[8px] text-xs font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-white text-gray-900 shadow-[0 1px 3px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08)]":"text-gray-500 bg-white",c>0&&"border-l border-gray-200"),children:l.icon&&p.jsx("span",{className:"mr-[8px]",children:l.icon})},l.value))}),a&&p.jsxs("div",{className:"flex items-center gap-[4px] border border-gray-200 bg-gray-50 overflow-hidden p-[2px] rounded-[6px]",children:[p.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:se("px-[12px] py-[8px] rounded-[4px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.chartView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:p.jsx(g0,{className:"w-[16px] h-[16px]"})}),p.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:se("px-[12px] rounded-[4px] py-[8px] text-xs font-medium transition-colors flex items-center gap-2","hover:bg-white ",a.tableView?"bg-white text-gray-900 shadow-md":"text-gray-500 bg-white"),children:p.jsx(P0,{className:"w-[16px] h-[16px]"})})]})]})},Lb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var V;const{id:i,title:o,description:s,metrics:l,view:c,controls:u,layout:f}=e,[d,h]=T.useState(c.type),[m,g]=T.useState("chart"),v=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[x,b]=T.useState(v()),[w,A]=T.useState("all"),y=E=>{var F,W,G,X,Q;const R=P();(F=R==null?void 0:R.controls)!=null&&F.toggle?(g(E),(G=(W=R.controls.toggle).onToggle)==null||G.call(W,E)):(h(E),(Q=(X=u==null?void 0:u.toggle)==null?void 0:X.onToggle)==null||Q.call(X,E))},O=E=>{var W,G;const R=E.metricType||E.title.toLowerCase();b(R);const F=l.find(X=>(X.metricType||X.title.toLowerCase())===R);(G=(W=F==null?void 0:F.controls)==null?void 0:W.dropdown)!=null&&G.multiSelect?A(["all"]):A("all"),a==null||a(E)},S=E=>{var F,W,G;A(E);const R=l.find(X=>(X.metricType||X.title.toLowerCase())===x);(G=(W=(F=R==null?void 0:R.controls)==null?void 0:F.dropdown)==null?void 0:W.onChange)==null||G.call(W,E)},P=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===x)||null,$=E=>Array.isArray(E)?E.filter(F=>F!=="all").length>0:E!=="all",N=E=>Array.isArray(E)?E.filter(R=>R!=="all"):E!=="all"?[E]:[],j=E=>{var G,X,Q,ae,te,q,Y,Z,L;const R=((X=(G=E.view)==null?void 0:G.chart)==null?void 0:X.data)||((Q=c.chart)==null?void 0:Q.data)||[];if(!$(w))return R;const F=E.metricType,W=N(w);if(W.length===1){const oe=W[0],K=P(),ce=(q=(te=(ae=K==null?void 0:K.controls)==null?void 0:ae.dropdown)==null?void 0:te.options)==null?void 0:q.find(ve=>ve.value===oe),ee=ce==null?void 0:ce.label;return console.log("🔍 Filtering chart data:",{metricType:F,singleFilter:oe,selectedLabel:ee,baseDataSample:R[0]}),R.map(ve=>{let Ue=0;return ve.listView&&Array.isArray(ve.listView)&&(Ue=ve.listView.filter(Ge=>F==="agentRuns"&&Ge.agentName?Ge.agentName===ee||Ge.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="toolRuns"&&Ge.toolName?Ge.toolName===ee||Ge.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="modelRuns"&&Ge.modelName?Ge.modelName===ee||Ge.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((Ge,ct)=>Ge+(ct.count||0),0)),console.log("📊 Filtered value for",ee,":",Ue),{...ve,[F]:Ue}})}if(W.length>1){const oe=P(),ce=(((L=(Z=(Y=oe==null?void 0:oe.controls)==null?void 0:Y.dropdown)==null?void 0:Z.options)==null?void 0:L.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return R.map(ee=>{let ve=0;return ee.listView&&Array.isArray(ee.listView)&&(ve=ee.listView.filter(Be=>F==="agentRuns"&&Be.agentName?ce.some(Fe=>Be.agentName===Fe||Be.agentName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):F==="toolRuns"&&Be.toolName?ce.some(Fe=>Be.toolName===Fe||Be.toolName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):F==="modelRuns"&&Be.modelName?ce.some(Fe=>Be.modelName===Fe||Be.modelName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):!1).reduce((Be,Fe)=>Be+(Fe.count||0),0)),{...ee,[F]:ve}})}return R},C=E=>{var G;if(!((G=E.view)!=null&&G.chart))return null;const R=j(E),F=()=>{var Q,ae,te,q,Y,Z;if(!$(w)||!((Q=E.controls)!=null&&Q.dropdown))return((te=(ae=E.view)==null?void 0:ae.chart)==null?void 0:te.title)||E.title;const X=N(w);if(X.length===1){const L=(q=E.controls.dropdown.options)==null?void 0:q.find(oe=>oe.value===X[0]);return L?`${L.label}`:((Z=(Y=E.view)==null?void 0:Y.chart)==null?void 0:Z.title)||E.title}return`${X.length} selected`},W=N(w);return E.metricType==="toolRuns"&&W.length===1?{...E.view.chart,data:R,title:F(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&W.length===1?{...E.view.chart,data:R,title:F(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:R,title:F()}},k=(E,R)=>{if(!$(w))return E;const F=N(w);if(F.length===1){const W=F[0];if(i==="runs"&&R==="agentRuns")return E.map(G=>({...G,agentRuns:G[W]||0}));if(i==="runs"&&R==="toolRuns")return E.map(G=>({...G,toolRuns:G[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&R==="modelRuns")return E.map(G=>({...G,modelRuns:G[W.replace(/[-\.]/g,"")]||0}))}return E},_=E=>{var G;const R=((G=c.chart)==null?void 0:G.data)||[],F=k(R,E),W=X=>{var ae,te;if(!$(w))return X;const Q=N(w);if(Q.length===1){const q=(te=(ae=u==null?void 0:u.dropdown)==null?void 0:ae.options)==null?void 0:te.find(Y=>Y.value===Q[0]);return q?`${q.label}`:X}return`${Q.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:R,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"sessions":return{type:"line",title:"Total Sessions",data:R,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"messages":return{type:"line",title:"Total Messages",data:R,dataKey:"messages",color:"#ec4899",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"tokens":return{type:"line",title:"Token Usage Breakdown",data:R,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f59e0b",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#ec4899",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"agentRuns":return{type:"line",title:W("Agent Runs"),data:F,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"toolRuns":return N(w).length===1?{type:"line",title:W("Tool Runs"),data:k(R,"toolRuns"),dataKey:"toolRuns",color:"#f97316",yAxisLabel:"Number of Tool Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:"Tool Runs",data:F,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"modelRuns":return N(w).length===1?{type:"line",title:W("Model Runs"),data:k(R,"modelRuns"),dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:W("Model Runs"),data:F,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};default:return null}},D=(()=>{const E=P();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:S}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:m==="chart",tableView:m==="table",onToggle:y}:void 0}:u?{...u,dropdown:u.dropdown?{...u.dropdown,onChange:S}:void 0,toggle:u.toggle?{...u.toggle,chartView:d==="chart",tableView:d==="table",onToggle:y}:void 0}:void 0})(),B=(()=>{var F,W,G,X,Q,ae,te,q,Y,Z;const E=P();if(E!=null&&E.view){if((F=E.controls)!=null&&F.toggle){if(m==="table"&&E.view.table){let oe=E.view.table.data;if(E.metricType==="agentRuns"&&$(w)){const K=N(w);if(K.length>0){const ce=((X=(G=(W=E.controls)==null?void 0:W.dropdown)==null?void 0:G.options)==null?void 0:X.filter(ee=>K.includes(ee.value)))||[];ce.length>0&&(oe=oe.filter(ee=>ce.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&$(w)){const K=N(w);if(K.length>0){const ce=((te=(ae=(Q=E.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.filter(ee=>K.includes(ee.value)))||[];ce.length>0&&(oe=oe.filter(ee=>ce.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&$(w)){const K=N(w);if(K.length>0){const ce=((Z=(Y=(q=E.controls)==null?void 0:q.dropdown)==null?void 0:Y.options)==null?void 0:Z.filter(ee=>K.includes(ee.value)))||[];ce.length>0&&(oe=oe.filter(ee=>ce.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:oe}}}else if(m==="chart"&&E.view.chart)return{type:"chart",chart:C(E)||E.view.chart}}const L=C(E);return L?{...E.view,chart:L}:E.view}const R=_(x);return R?{type:"chart",chart:R}:{...c,type:d}})(),U=()=>l.map(E=>{const R=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||R===x}});return p.jsxs("div",{className:se("bg-white flex flex-col gap-[16px] rounded-lg border border-gray-200 py-[16px] px-[24px]",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[o&&p.jsxs("div",{className:"w-full",children:[p.jsx("h1",{className:"text-md font-medium text-gray-700",children:o}),s&&p.jsx("p",{className:"text-xs text-gray-500",children:s})]}),p.jsx("div",{className:"flex flex-col sm:flex-row gap-[16px]",children:r?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(xi,{})})]}):U().map((E,R)=>p.jsx("div",{className:"flex-1",children:p.jsx(Rf,{data:E,onClick:O,isFirst:R===0})},`${i}-metric-${R}`))}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:P()&&p.jsx("h3",{className:"text-md font-medium text-gray-700",children:(V=P())==null?void 0:V.title})}),D&&p.jsx(Ib,{config:D})]}),p.jsx(Nb,{config:B,isLoading:r||n,context:{sectionId:i,metricType:x}})]})},ff=T.forwardRef(({className:e,variant:t="default",size:r="md",children:n,...a},i)=>{const o="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={default:"bg-blue-600 hover:bg-blue-700 focus:bg-blue-700 focus:shadow-sm text-white py-2 px-3",outline:"border-gray-300 border bg-white text-gray-700 hover:text-gray-800 hover:bg-gray-50 focus:bg-gray-50 focus:shadow-sm",ghost:"border border-error-600 bg-error-500 text-white hover:border-error-600 hover:bg-error-600"},l={sm:"h-[32px] rounded-md gap-1.5 px-[14px] py-[10px]",md:"h-[40px] rounded-md px-[14px] py-[10px]",lg:"h-[48px] rounded-md px-[16px] py-[12px]"};return p.jsx("button",{className:se(o,s[t],l[r],e),ref:i,...a,children:n})});ff.displayName="Button";function Ns(e){"@babel/helpers - typeof";return Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(e)}function Et(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Me(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ve(e){Me(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ns(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function WB(e,t){Me(2,arguments);var r=Ve(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function df(e,t){Me(2,arguments);var r=Ve(e),n=Et(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function UB(e,t){Me(2,arguments);var r=Ve(e).getTime(),n=Et(t);return new Date(r+n)}var zB={};function Oi(){return zB}function VB(e,t){var r,n,a,i,o,s;Me(1,arguments);var l=Oi(),c=Et((r=(n=(a=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Ve(e),f=u.getDay(),d=(f<c?7:0)+f-c;return u.setDate(u.getDate()-d),u.setHours(0,0,0,0),u}function GB(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function aa(e){Me(1,arguments);var t=Ve(e);return t.setHours(0,0,0,0),t}function Si(e,t){Me(2,arguments);var r=aa(e),n=aa(t);return r.getTime()===n.getTime()}function qB(e){return Me(1,arguments),e instanceof Date||Ns(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function KB(e){if(Me(1,arguments),!qB(e)&&typeof e!="number")return!1;var t=Ve(e);return!isNaN(Number(t))}function HB(e){Me(1,arguments);var t=Ve(e);return t.setHours(23,59,59,999),t}function YB(e){Me(1,arguments);var t=Ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function XB(e,t){Me(2,arguments);var r=Et(t);return UB(e,-r)}var JB=864e5;function ZB(e){Me(1,arguments);var t=Ve(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/JB)+1}function Ds(e){Me(1,arguments);var t=1,r=Ve(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function Rb(e){Me(1,arguments);var t=Ve(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Ds(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Ds(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function QB(e){Me(1,arguments);var t=Rb(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ds(r);return n}var eF=6048e5;function tF(e){Me(1,arguments);var t=Ve(e),r=Ds(t).getTime()-QB(t).getTime();return Math.round(r/eF)+1}function Is(e,t){var r,n,a,i,o,s,l,c;Me(1,arguments);var u=Oi(),f=Et((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&n!==void 0?n:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Ve(e),h=d.getUTCDay(),m=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function Bb(e,t){var r,n,a,i,o,s,l,c;Me(1,arguments);var u=Ve(e),f=u.getUTCFullYear(),d=Oi(),h=Et((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(f+1,0,h),m.setUTCHours(0,0,0,0);var g=Is(m,t),v=new Date(0);v.setUTCFullYear(f,0,h),v.setUTCHours(0,0,0,0);var x=Is(v,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=x.getTime()?f:f-1}function rF(e,t){var r,n,a,i,o,s,l,c;Me(1,arguments);var u=Oi(),f=Et((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:u.firstWeekContainsDate)!==null&&n!==void 0?n:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=Bb(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var m=Is(h,t);return m}var nF=6048e5;function aF(e,t){Me(1,arguments);var r=Ve(e),n=Is(r,t).getTime()-rF(r,t).getTime();return Math.round(n/nF)+1}function je(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var jr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return je(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):je(n+1,2)},d:function(t,r){return je(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return je(t.getUTCHours()%12||12,r.length)},H:function(t,r){return je(t.getUTCHours(),r.length)},m:function(t,r){return je(t.getUTCMinutes(),r.length)},s:function(t,r){return je(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return je(i,r.length)}},ia={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},iF={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return jr.y(t,r)},Y:function(t,r,n,a){var i=Bb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return je(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):je(o,r.length)},R:function(t,r){var n=Rb(t);return je(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return je(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return je(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return je(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return jr.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return je(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=aF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):je(i,r.length)},I:function(t,r,n){var a=tF(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):je(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):jr.d(t,r)},D:function(t,r,n){var a=ZB(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):je(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return je(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return je(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return je(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=ia.noon:a===0?i=ia.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=ia.evening:a>=12?i=ia.afternoon:a>=4?i=ia.morning:i=ia.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return jr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):jr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):je(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):je(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):jr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):jr.s(t,r)},S:function(t,r){return jr.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Wb(o);case"XXXX":case"XX":return Xr(o);case"XXXXX":case"XXX":default:return Xr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return Wb(o);case"xxxx":case"xx":return Xr(o);case"xxxxx":case"xxx":default:return Xr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Fb(o,":");case"OOOO":default:return"GMT"+Xr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Fb(o,":");case"zzzz":default:return"GMT"+Xr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return je(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return je(o,r.length)}};function Fb(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+je(i,2)}function Wb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+je(Math.abs(e)/60,2)}return Xr(e,t)}function Xr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=je(Math.floor(a/60),2),o=je(a%60,2);return n+i+r+o}var Ub=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},zb=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},oF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Ub(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",Ub(a,r)).replace("{{time}}",zb(i,r))},sF={p:zb,P:oF},lF=["D","DD"],cF=["YY","YYYY"];function uF(e){return lF.indexOf(e)!==-1}function fF(e){return cF.indexOf(e)!==-1}function Vb(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var dF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pF=function(t,r,n){var a,i=dF[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function pf(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var hF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yF={date:pf({formats:hF,defaultWidth:"full"}),time:pf({formats:vF,defaultWidth:"full"}),dateTime:pf({formats:mF,defaultWidth:"full"})},gF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bF=function(t,r,n,a){return gF[t]};function Ti(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return a[c]}}var xF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},SF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},AF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},PF=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},jF={ordinalNumber:PF,era:Ti({values:xF,defaultWidth:"wide"}),quarter:Ti({values:wF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ti({values:OF,defaultWidth:"wide"}),day:Ti({values:SF,defaultWidth:"wide"}),dayPeriod:Ti({values:TF,defaultWidth:"wide",formattingValues:AF,defaultFormattingWidth:"wide"})};function Ai(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?EF(s,function(f){return f.test(o)}):_F(s,function(f){return f.test(o)}),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;var u=t.slice(o.length);return{value:c,rest:u}}}function _F(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function EF(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function CF(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var $F=/^(\d+)(th|st|nd|rd)?/i,kF=/\d+/i,MF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},NF={any:[/^b/i,/^(a|c)/i]},DF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IF={any:[/1/i,/2/i,/3/i,/4/i]},LF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},RF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},BF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},FF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},WF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},UF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},zF={ordinalNumber:CF({matchPattern:$F,parsePattern:kF,valueCallback:function(t){return parseInt(t,10)}}),era:Ai({matchPatterns:MF,defaultMatchWidth:"wide",parsePatterns:NF,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:DF,defaultMatchWidth:"wide",parsePatterns:IF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ai({matchPatterns:LF,defaultMatchWidth:"wide",parsePatterns:RF,defaultParseWidth:"any"}),day:Ai({matchPatterns:BF,defaultMatchWidth:"wide",parsePatterns:FF,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:WF,defaultMatchWidth:"any",parsePatterns:UF,defaultParseWidth:"any"})},VF={code:"en-US",formatDistance:pF,formatLong:yF,formatRelative:bF,localize:jF,match:zF,options:{weekStartsOn:0,firstWeekContainsDate:1}},GF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KF=/^'([^]*?)'?$/,HF=/''/g,YF=/[a-zA-Z]/;function Ls(e,t,r){var n,a,i,o,s,l,c,u,f,d,h,m,g,v;Me(2,arguments);var x=String(t),b=Oi(),w=(n=(a=void 0)!==null&&a!==void 0?a:b.locale)!==null&&n!==void 0?n:VF,A=Et((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:b.firstWeekContainsDate)!==null&&o!==void 0?o:(c=b.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=Et((f=(d=(h=(m=void 0)!==null&&m!==void 0?m:void 0)!==null&&h!==void 0?h:b.weekStartsOn)!==null&&d!==void 0?d:(g=b.locale)===null||g===void 0||(v=g.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&f!==void 0?f:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var O=Ve(e);if(!KB(O))throw new RangeError("Invalid time value");var S=GB(O),P=XB(O,S),$={firstWeekContainsDate:A,weekStartsOn:y,locale:w,_originalDate:O},N=x.match(qF).map(function(j){var C=j[0];if(C==="p"||C==="P"){var k=sF[C];return k(j,w.formatLong)}return j}).join("").match(GF).map(function(j){if(j==="''")return"'";var C=j[0];if(C==="'")return XF(j);var k=iF[C];if(k)return fF(j)&&Vb(j,t,String(e)),uF(j)&&Vb(j,t,String(e)),k(P,j,w.localize,$);if(C.match(YF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return j}).join("");return N}function XF(e){var t=e.match(KF);return t?t[1].replace(HF,"'"):e}function Gb(e,t){Me(2,arguments);var r=Ve(e),n=Ve(t);return r.getTime()<n.getTime()}function JF(e,t){Me(2,arguments);var r=Ve(e).getTime(),n=Ve(t.start).getTime(),a=Ve(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Rs(e,t){Me(2,arguments);var r=Et(t);return WB(e,-r)}function ZF(e,t){Me(2,arguments);var r=Et(t);return df(e,-r)}const hf=({children:e})=>{const[t,r]=T.useState(!1);return T.useEffect(()=>(r(!0),()=>r(!1)),[]),t?en.createPortal(e,document.body):null};function qb({className:e,defaultValue:t,onDateRangeChange:r}){console.log("🗓️ DateRangePicker component rendered with props:",{className:e,defaultValue:t,hasCallback:!!r});const n=[{label:"Today",value:"today",dateRange:{from:aa(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:aa(Rs(new Date,1)),to:HB(Rs(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:VB(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:aa(Rs(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:YB(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:aa(Rs(new Date,29)),to:new Date}}],a=t?n.find(M=>M.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(M=>M.value),foundPreset:!!a});const[i,o]=T.useState(a==null?void 0:a.dateRange),[s,l]=T.useState(a==null?void 0:a.dateRange),[c,u]=T.useState(!1),[f,d]=T.useState((a==null?void 0:a.label)||null),[h,m]=T.useState((a==null?void 0:a.label)||null),[g,v]=T.useState(new Date),[x,b]=T.useState(null),[w,A]=T.useState({top:0,left:0}),y=T.useRef(null),O=T.useRef(null);T.useEffect(()=>{var M,B;console.log("📅 DateRangePicker useEffect running:",{hasDefaultPreset:!!a,hasOnDateRangeChange:!!r,currentDate:i,currentLabel:f,defaultValue:t,defaultPresetLabel:a==null?void 0:a.label,defaultPresetValue:a==null?void 0:a.value}),a!=null&&a.dateRange&&r?(console.log("📅 DateRangePicker: Setting initial default value:",{label:a.label,dateRange:a.dateRange,from:(M=a.dateRange.from)==null?void 0:M.toLocaleDateString(),to:(B=a.dateRange.to)==null?void 0:B.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(U=>`${U.value}:${U.label}`)})},[]),T.useEffect(()=>{t&&(a!=null&&a.dateRange)&&(console.log("📅 DateRangePicker: DefaultValue changed, updating state:",{defaultValue:t,label:a.label}),o(a.dateRange),d(a.label),l(a.dateRange),m(a.label))},[t]);const S=()=>{if(!O.current)return;const M=O.current.getBoundingClientRect(),B=window.scrollY,U=window.scrollX,V=window.innerWidth,E=window.innerHeight,R=720,F=450;let W=M.bottom+B+8,G=M.left+U;G+R>V&&(G=M.right+U-R),G+R>V&&(G=V-R-20),W+F>E&&(W=M.top+B-F-8),G<20&&(G=20),W<20&&(W=20),A({top:W,left:G})};T.useEffect(()=>{const M=()=>{c&&S()};return c&&(window.addEventListener("resize",M),window.addEventListener("scroll",M)),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M)}},[c]);const P=(M,B)=>{if(l(M),m(B),b(null),M.from){const U=new Date(M.from.getFullYear(),M.from.getMonth(),1);v(U)}},$=M=>{if(!x)b(M),l({from:M,to:M}),m(null);else{const B=Gb(M,x)?M:x,U=Gb(M,x)?x:M;l({from:B,to:U}),b(null),m(null)}},N=()=>{o(s),d(h),r==null||r(s),u(!1),b(null)},j=()=>{l(void 0),m(null),o(void 0),d(null),r==null||r(void 0),u(!1),b(null)},C=M=>{M?(l(i),m(f),b(null),setTimeout(S,0)):(l(i),m(f),b(null)),u(M)},k=(M,B)=>(console.log("📅 formatDateRange called with:",{presetLabel:B,hasDateRange:!!(M!=null&&M.from)}),B||(M!=null&&M.from?!M.to||Si(M.from,M.to)?Ls(M.from,"MMM dd, yyyy"):`${Ls(M.from,"MMM dd, yyyy")} - ${Ls(M.to,"MMM dd, yyyy")}`:"Pick a date range")),_=(M=0)=>{const B=df(g,M),U=B.getFullYear(),V=B.getMonth(),E=new Date(U,V,1),F=new Date(U,V+1,0).getDate(),W=E.getDay(),G=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(U,V-1,0).getDate();for(let Z=W-1;Z>=0;Z--){const L=te-Z,oe=new Date(U,V-1,L);Q.push(p.jsx("button",{onClick:()=>$(oe),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:L},`prev-${L}`))}for(let Z=1;Z<=F;Z++){const L=new Date(U,V,Z),oe=Si(L,new Date),K=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&JF(L,{start:s.from,end:s.to}),ce=(s==null?void 0:s.from)&&Si(L,s.from),ee=(s==null?void 0:s.to)&&Si(L,s.to),ve=x&&Si(L,x);let Ue="h-[32px] w-[32px] text-xs hover:bg-gray-100 hover:text-gray-900 hover:font-medium rounded-full flex items-center justify-center transition-colors text-gray-700 ";oe&&(Ue+="font-semibold "),ve||ce||ee?Ue+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":K&&(Ue+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),Q.push(p.jsx("button",{onClick:()=>$(L),className:Ue,children:Z},`current-${Z}`))}const Y=Math.ceil((W+F)/7)*7-W-F;for(let Z=1;Z<=Y;Z++){const L=new Date(U,V+1,Z);Q.push(p.jsx("button",{onClick:()=>$(L),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:Z},`next-${Z}`))}return p.jsxs("div",{className:"p-[12px]",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[M===0&&p.jsx("button",{onClick:()=>v(ZF(g,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(x0,{className:"h-[16px] w-[16px]"})}),p.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[G[V]," ",U]}),M===1&&p.jsx("button",{onClick:()=>v(df(g,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(ki,{className:"h-[16px] w-[16px]"})})]}),p.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map(Z=>p.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:Z},Z))}),p.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},D=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return p.jsxs("div",{className:`relative ${e}`,children:[p.jsxs("button",{ref:O,onClick:()=>C(!c),className:`min-w-[200px] px-[12px] py-[8px] text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[p.jsx(Of,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const M=k(i,f);return console.log("📅 Button display text:",{displayText:M,date:i,selectedPresetLabel:f}),M})()]}),c&&p.jsxs(hf,{children:[p.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>C(!1)}),p.jsxs("div",{ref:y,className:D(),style:{top:w.top,left:w.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:M=>M.stopPropagation(),children:[p.jsxs("div",{className:"flex",children:[p.jsxs("div",{className:"flex flex-col gap-1 p-[12px] border-r border-gray-200 w-[160px] flex-shrink-0",children:[p.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Quick Filters"}),n.map(M=>p.jsx("button",{onClick:()=>P(M.dateRange,M.label),className:`text-left px-[12px] py-[8px] text-sm text-gray-900 rounded hover:bg-gray-100 transition-colors ${h===M.label?"bg-gray-100 medium":""}`,children:M.label},M.label))]}),p.jsxs("div",{className:"flex flex-1",children:[_(0),_(1)]})]}),p.jsxs("div",{className:"border-t border-gray-200 bg-gray-50 p-[12px] flex justify-end gap-2",children:[p.jsx("button",{onClick:j,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),p.jsx("button",{onClick:N,disabled:!(s!=null&&s.from),className:"px-[12px] py-[8px] text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}const QF=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var k;const{title:o,subtitle:s,sections:l,globalControls:c,layout:u={columns:12,gap:24,responsive:!0}}=e,[f,d]=T.useState(!1),[h,m]=T.useState({}),[g,v]=T.useState(l),[x,b]=T.useState([]),[w,A]=T.useState(!1),y=T.useRef(null);T.useEffect(()=>{if(t)try{y.current=new Ht(t),O(),S()}catch(_){console.error("Failed to initialize API service:",_)}},[t]);const O=async()=>{if(!(!y.current||!t)){A(!0);try{const _=await y.current.fetchEnvironments();b(_),console.log("🌍 Environments loaded:",_.map(D=>D.envName))}catch(_){console.error("Error loading environments:",_)}finally{A(!1)}}},S=async()=>{if(!(!y.current||!t)){d(!0);try{const _=y.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:_.fromTimestamp,toTimestamp:_.toTimestamp,fromDate:new Date(_.fromTimestamp).toLocaleDateString(),toDate:new Date(_.toTimestamp).toLocaleDateString()});const D=await y.current.fetchAllCardsDataWithEnhancedViews(_.fromTimestamp,_.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date(_.fromTimestamp).toLocaleDateString(),to:new Date(_.toTimestamp).toLocaleDateString()});const M=l.map(B=>B.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...B,metrics:D.usageAnalytics}):B.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...B,metrics:D.runs}):B);v(M)}catch(_){console.error("Error loading initial data:",_),v(l)}finally{d(!1)}}},P=async(_,D)=>{if(!(!y.current||!t||!D.metricType)){v(M=>M.map(B=>B.id===_?{...B,metrics:B.metrics.map(U=>({...U,highlighted:U.metricType===D.metricType}))}:B)),m(M=>({...M,[_]:!0}));try{const M=t.defaultTimeRange||Ht.getDateRange(7);let B,U;if(["users","sessions","messages","tokens"].includes(D.metricType))B="usage-analytics",U=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))B="runs",U=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const V=await y.current.fetchTimeSeriesData(U,B,M.fromTimestamp,M.toTimestamp),E=y.current.transformTimeSeriesDataForMetric(V,D.metricType);console.log("Time series response for",D.title,":",V),console.log("Transformed data for",D.title,":",E),console.log("Metric type used for transformation:",D.metricType);const F=(W=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[W]||"count")(D.metricType||"count");console.log("Using dataKey for metric",D.metricType,":",F),v(W=>W.map(G=>{if(G.id===_){const X={...G,view:{...G.view,chart:G.view.chart?{...G.view.chart,data:E,dataKey:F,lines:[{dataKey:F,color:G.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:E,dataKey:F,lines:[{dataKey:F,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",_,":",X),console.log("Chart config set:",X.view.chart),X}return G}))}catch(M){console.error("Error loading metric data:",M)}finally{m(M=>({...M,[_]:!1}))}}},$=_=>{var D,M;if((M=(D=c==null?void 0:c.draft)==null?void 0:D.onChange)==null||M.call(D,_),a==null||a(_),t&&y.current){const B={...t,environment:_};y.current.updateConfig(B),S()}},N=_=>{var D,M;if(console.log("🗓️ Time range change requested:",_),typeof _=="string"&&((M=(D=c==null?void 0:c.timeRange)==null?void 0:D.onChange)==null||M.call(D,_)),i==null||i(_),t&&y.current){let B=null;if(typeof _=="object"&&_.from&&_.to)B={fromTimestamp:_.from.toISOString(),toTimestamp:_.to.toISOString()},console.log("📅 Converting DateRange to API format:",B);else if(typeof _=="string"){const V={"24h":1,"7d":7,"30d":30,"90d":90}[_];V&&(B=Ht.getDateRange(V),console.log(`📅 Converting preset "${_}" (${V} days) to API format:`,B))}if(B){const U={...t,defaultTimeRange:B};console.log("🔄 Updating API configuration with new date range:",U.defaultTimeRange),y.current.updateConfig(U),console.log("🚀 Reloading dashboard data with new date range..."),S()}else console.warn("⚠️ Unable to convert time range value to API format:",_)}},j=(_="csv")=>{var D,M;(M=(D=c==null?void 0:c.export)==null?void 0:D.onExport)==null||M.call(D,_),n==null||n()},C=Object.values(h).some(_=>_);return p.jsxs("div",{className:se("w-full h-full flex flex-col overflow-hidden",r),children:[p.jsxs("div",{className:"flex flex-col gap-2 w-full p-[24px] pb-[12px]",children:[p.jsx("h1",{className:"text-lg font-bold text-gray-900 w-full",children:o}),p.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s&&p.jsx("p",{className:"text-gray-500 text-xs w-full",children:s}),p.jsxs("div",{className:"flex items-center gap-2 justify-end flex-shrink-0",children:[(f||C)&&p.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[p.jsx(T0,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),c&&p.jsxs(p.Fragment,{children:[c.draft&&p.jsx(Ms,{options:x.length>0?x.map(_=>({label:_.envName.charAt(0).toUpperCase()+_.envName.slice(1),value:_.envName})):c.draft.options,value:c.draft.defaultValue,placeholder:w?"Loading environments...":c.draft.label,onChange:$,className:"min-w-[200px]",disabled:f||C||w}),c.timeRange&&(c.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",c.timeRange.defaultValue),p.jsx(qb,{defaultValue:c.timeRange.defaultValue,onDateRangeChange:_=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",_),_&&N(_)}})):p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Of,{className:"h-4 w-4 text-gray-500"}),p.jsx(Ms,{options:c.timeRange.options||[],value:c.timeRange.defaultValue,placeholder:c.timeRange.label,onChange:N,className:"min-w-[200px]",disabled:f||C})]})),((k=c.export)==null?void 0:k.enabled)&&p.jsxs(ff,{variant:"outline",onClick:()=>j(),className:"gap-2",disabled:f||C,children:[p.jsx(w0,{className:"h-4 w-4"}),"Export"]})]})]})]})]}),p.jsx("div",{className:se("grid gap-6 p-[24px] pt-[8px] overflow-y-auto",u.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:u.responsive?void 0:`repeat(${u.columns}, minmax(0, 1fr))`,gap:u.gap?`${u.gap}px`:void 0},children:g.map(_=>{var D,M,B,U;return p.jsx(Lb,{section:_,isLoading:f,isChartLoading:h[_.id]||!1,onMetricClick:V=>P(_.id,V),className:se(u.responsive&&((D=_.layout)==null?void 0:D.span)===12&&"lg:col-span-12",u.responsive&&((M=_.layout)==null?void 0:M.span)===6&&"lg:col-span-6",u.responsive&&((B=_.layout)==null?void 0:B.span)===4&&"lg:col-span-4",u.responsive&&((U=_.layout)==null?void 0:U.span)===3&&"lg:col-span-3")},_.id)})})]})};class Kb{static buildSessionTree(t,r){var i;const n=this.groupEventsByRun(t),a=[];for(const[o,s]of n.entries()){const l=this.buildRunTree(o,s);a.push(l)}return a.sort((o,s)=>new Date(o.startTime).getTime()-new Date(s.startTime).getTime()),{sessionId:r||((i=t[0])==null?void 0:i.sessionId)||"unknown",runs:a}}static groupEventsByRun(t){const r=new Map;return t.forEach(n=>{const a=n.runId;r.has(a)||r.set(a,[]),r.get(a).push(n)}),r}static buildRunTree(t,r){var g;const n=new Map;r.forEach(v=>{const x=`${v.data.id}|${v.data.name}`;n.has(x)||n.set(x,{});const b=n.get(x);v.type==="node_started"?b.started=v:v.type==="node_completed"&&(b.completed=v)});const a=[];for(const[,v]of n.entries()){const x=v.started,b=v.completed;if(!x)continue;const w=this.createTreeNodeFromEvents(x,b,t);a.push(w)}const i=this.buildNodeHierarchy(a),o=r.filter(v=>v.runId===t),s=Math.min(...o.map(v=>new Date(v.data.timestamp).getTime())),l=o.filter(v=>v.type==="node_completed"),c=l.length>0?Math.max(...l.map(v=>new Date(v.data.timestamp).getTime())):void 0,u=this.calculateRunStatus(o),f=c&&s?c-s:void 0,d=this.calculateRunTokens(o),h=this.extractUserInput(o),m=this.extractFinalOutput(o);return{runId:t,startTime:new Date(s).toISOString(),endTime:c?new Date(c).toISOString():void 0,status:u,rootNodes:i,duration:f,totalTokens:d>0?d:void 0,sessionId:((g=o[0])==null?void 0:g.sessionId)||"unknown",userInput:h,finalOutput:m}}static createTreeNodeFromEvents(t,r,n){const a=t.data.timestamp,i=r==null?void 0:r.data.timestamp,o=i&&a?new Date(i).getTime()-new Date(a).getTime():void 0,s=r||t,l=s.data.type==="llm"||s.data.type==="tool",c=l?t.data.input:void 0,u=l?r==null?void 0:r.data.output:void 0,f=this.extractLLMUsage(u),{toolInvocations:d,isResponse:h}=this.extractToolInvocations(u),m=s.data.type==="llm"?this.extractProvider(s.data.name):void 0;return{id:s.data.id,parentId:s.data.parentId,runId:n||"unknown",name:s.data.name,type:s.data.type,status:(r==null?void 0:r.data.status)||t.data.status,startTime:a,endTime:i,duration:o,icon:s.data.icon,input:c,output:u,children:[],level:0,isExpanded:!1,llmUsage:f,toolInvocations:d,isResponse:h,metadata:{...s.data.metadata,provider:m}}}static buildNodeHierarchy(t){const r=new Map;t.forEach(a=>r.set(a.id,a));const n=[];return t.forEach(a=>{if(a.parentId&&r.has(a.parentId)){const i=r.get(a.parentId);i.children.push(a),a.level=i.level+1}else n.push(a),a.level=0}),n.sort((a,i)=>new Date(a.startTime).getTime()-new Date(i.startTime).getTime()),n.forEach(a=>this.sortChildren(a)),n}static extractLLMUsage(t){var r;if(!(!t||typeof t!="object")&&(r=t.additional_kwargs)!=null&&r.llmUsageMetadata)return t.additional_kwargs.llmUsageMetadata}static extractToolInvocations(t){if(!t||typeof t!="object")return{};if(t.name&&t.tool_call_id){const r=t.name==="route_to_user";return{toolInvocations:[t],isResponse:r}}if(Array.isArray(t)){const r=t.filter(n=>n&&typeof n=="object"&&n.name&&n.tool_call_id);if(r.length>0){const n=r.some(a=>a.name==="route_to_user");return{toolInvocations:r,isResponse:n}}}return{}}static extractProvider(t){if(!t)return;const r=t.toLowerCase();if(r.includes("gemini"))return"google";if(r.includes("gpt")||r.includes("openai"))return"openai";if(r.includes("claude")||r.includes("anthropic"))return"anthropic";if(r.includes("azure"))return"azure";if(r.includes("cohere"))return"cohere";const n=t.split("-");if(n.length>0){const a=n[0].toLowerCase();if(["gemini","gpt","claude","cohere"].includes(a))return a==="gemini"?"google":a==="gpt"?"openai":a==="claude"?"anthropic":a}return"custom"}static sortChildren(t){t&&(t.children.sort((r,n)=>new Date(r.startTime).getTime()-new Date(n.startTime).getTime()),t.children.forEach(r=>this.sortChildren(r)))}static calculateRunStatus(t){const r=t.some(a=>a.data.status==="running"),n=t.some(a=>a.data.status==="failed");return r?"running":n?"failed":"completed"}static extractUserInput(t){const r=t.filter(n=>n.type==="node_started"&&n.data.type==="llm").sort((n,a)=>new Date(n.data.timestamp).getTime()-new Date(a.data.timestamp).getTime());if(r.length>0){const n=r[0];if(n.data.input){if(typeof n.data.input=="string")return n.data.input;if(typeof n.data.input=="object")return JSON.stringify(n.data.input)}}}static extractFinalOutput(t){var n,a,i,o,s;const r=t.filter(l=>l.type==="node_completed"&&l.data.type==="tool"&&l.data.name==="route_to_user");if(r.length>0){const c=r[r.length-1].data.output;if(c){if((n=c.output)!=null&&n.message)return c.output.message;if((a=c.input)!=null&&a.message)return c.input.message;if(c.message)return c.message;if((i=c.args)!=null&&i.message)return c.args.message;if((s=(o=c.input)==null?void 0:o.args)!=null&&s.message)return c.input.args.message}}}static calculateRunTokens(t){let r=0;return t.forEach(n=>{const a=this.extractLLMUsage(n.data.output);a!=null&&a.total_tokens&&(r+=a.total_tokens)}),r}static updateTree(t,r,n){return this.buildSessionTree(n,t.sessionId)}static mergeEvents(t,r){return[...t,...r].sort((a,i)=>new Date(a.timestamp).getTime()-new Date(i.timestamp).getTime())}}const eW=({isOpen:e,onClose:t,title:r,data:n,initialViewMode:a="interactive",modalHeight:i="50vh"})=>{const[o,s]=T.useState(a),l=T.useMemo(()=>{if(n==null)return!1;if(typeof n=="string")try{return JSON.parse(n),!0}catch{return!1}return typeof n=="object"},[n]),c=u=>{u.target===u.currentTarget&&t()};return e?p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",onClick:c,children:p.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full flex flex-col",style:{height:i},children:[p.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Vs,{className:"w-5 h-5 text-gray-400"}),p.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:r})]}),l&&p.jsxs("div",{className:"flex items-center gap-1 ml-4 pl-4 border-l border-gray-200",children:[p.jsx("button",{onClick:()=>s("interactive"),className:`p-1.5 hover:bg-gray-200 rounded transition-colors ${o==="interactive"?"bg-gray-200":""}`,title:"Interactive JSON view (fold/unfold)",children:p.jsx(Pf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>s("plain"),className:`p-1.5 hover:bg-gray-200 rounded transition-colors ${o==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(wf,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:async()=>{const u=typeof n=="string"?n:JSON.stringify(n,null,2);try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(u);return}const f=document.createElement("textarea");f.value=u,f.style.position="fixed",f.style.left="-999999px",f.style.top="-999999px",document.body.appendChild(f),f.focus(),f.select();try{document.execCommand("copy")}catch(d){console.warn("Copy to clipboard failed:",d)}finally{document.body.removeChild(f)}}catch(f){console.warn("Copy to clipboard failed:",f)}},className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",title:"Copy content",children:p.jsx(fa,{className:"w-4 h-4 text-gray-500"})}),p.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",title:"Close",children:p.jsx(Ef,{className:"w-4 h-4 text-gray-500"})})]})]}),p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(Jr,{data:n,showHeader:!1,className:"h-full border-0",defaultExpanded:!0,viewMode:o,onViewModeChange:s})})]})}):null},tW=({data:e,level:t=0,expandedKeys:r=new Set,onToggleKey:n,keyPath:a=""})=>{const i=t*16,o=(s,l,c)=>{const u=c?`${c}.${l}`:l||"";if(s===null)return p.jsx("span",{className:"text-gray-400 italic",children:"null"});if(s===void 0)return p.jsx("span",{className:"text-gray-400 italic",children:"undefined"});if(typeof s=="boolean")return p.jsx("span",{className:"text-purple-600 font-medium",children:String(s)});if(typeof s=="number")return p.jsx("span",{className:"text-blue-600 font-medium",children:s});if(typeof s=="string"){const f=s.length>100,d=f&&!r.has(`${u}._string`)?`${s.substring(0,100)}...`:s;return p.jsxs("div",{className:"inline",children:[p.jsxs("span",{className:"text-green-600",children:['"',d,'"']}),f&&p.jsx("button",{onClick:()=>n==null?void 0:n(`${u}._string`),className:"ml-2 text-xs text-blue-500 hover:text-blue-700 underline",children:r.has(`${u}._string`)?"Show less":"Show more"})]})}if(Array.isArray(s)){const f=r.has(u);return s.length===0?p.jsx("span",{className:"text-gray-500",children:"[]"}):p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center",children:[p.jsxs("button",{onClick:()=>n==null?void 0:n(u),className:"flex items-center gap-1 hover:bg-gray-100 p-1 rounded transition-colors",children:[f?p.jsx(ur,{className:"w-3 h-3 text-gray-400"}):p.jsx(ki,{className:"w-3 h-3 text-gray-400"}),p.jsxs("span",{className:"text-gray-600 text-xs",children:["Array[",s.length,"]"]})]}),!f&&p.jsx("span",{className:"text-gray-400 ml-2",children:"[...]"})]}),f&&p.jsx("div",{className:"ml-4 mt-1",children:s.map((h,m)=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${i}px`},children:[p.jsxs("span",{className:"text-gray-400 text-xs mt-0.5 min-w-[20px]",children:[m,":"]}),p.jsx("div",{className:"flex-1",children:o(h,String(m),`${u}[${m}]`)})]},m))})]})}if(typeof s=="object"){const f=Object.keys(s),d=r.has(u);return f.length===0?p.jsx("span",{className:"text-gray-500",children:"{}"}):p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center",children:[p.jsxs("button",{onClick:()=>n==null?void 0:n(u),className:"flex items-center gap-1 hover:bg-gray-100 p-1 rounded transition-colors",children:[d?p.jsx(ur,{className:"w-3 h-3 text-gray-400"}):p.jsx(ki,{className:"w-3 h-3 text-gray-400"}),p.jsxs("span",{className:"text-gray-600 text-xs",children:["Object ","{",f.length," ",f.length===1?"key":"keys","}"]})]}),!d&&p.jsx("span",{className:"text-gray-400 ml-2",children:"{ ... }"})]}),d&&p.jsx("div",{className:"ml-4 mt-1",children:f.map(m=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${i}px`},children:[p.jsxs("span",{className:"text-blue-700 text-xs mt-0.5 font-medium min-w-fit",children:['"',m,'":']}),p.jsx("div",{className:"flex-1",children:o(s[m],m,u)})]},m))})]})}return p.jsx("span",{className:"text-gray-600",children:String(s)})};return p.jsx("div",{className:"font-mono text-xs",children:o(e,"",a)})},Hb=e=>{const t=[];if(t.push(""),e==null)return t;let r=e;if(typeof e=="string")try{r=JSON.parse(e)}catch{return t}return typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).forEach(n=>{t.push(n)}),Array.isArray(r)&&r.forEach((n,a)=>{t.push(`[${a}]`)}),t},Jr=({data:e,title:t="Data",className:r="",maxHeight:n="300px",showHeader:a=!0,defaultExpanded:i=!1,defaultViewMode:o="interactive",viewMode:s,onViewModeChange:l,modalHeight:c="50vh"})=>{const[u,f]=T.useState(!1),[d,h]=T.useState(o),m=T.useMemo(()=>i?new Set([""]):new Set(Hb(e)),[e,i]),[g,v]=T.useState(m);T.useEffect(()=>{i||v(new Set(Hb(e)))},[e,i]);const x=s!==void 0,b=x?s:d,w=N=>{x?l==null||l(N):h(N)},{isValidJson:A,displayContent:y}=T.useMemo(()=>{if(e==null)return{isValidJson:!1,displayContent:e===null?"null":"undefined"};if(typeof e=="string")try{return{isValidJson:!0,displayContent:JSON.parse(e)}}catch{return{isValidJson:!1,displayContent:e}}return typeof e=="object"?{isValidJson:!0,displayContent:e}:{isValidJson:!1,displayContent:String(e)}},[e]),O=T.useCallback(N=>{v(j=>{const C=new Set(j);return C.has(N)?C.delete(N):C.add(N),C})},[]),S=T.useCallback(async()=>{const N=A?JSON.stringify(y,null,2):y;try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(N);return}const j=document.createElement("textarea");j.value=N,j.style.position="fixed",j.style.left="-999999px",j.style.top="-999999px",document.body.appendChild(j),j.focus(),j.select();try{document.execCommand("copy")}catch(C){console.warn("Copy to clipboard failed:",C)}finally{document.body.removeChild(j)}}catch(j){console.warn("Copy to clipboard failed:",j)}},[A,y]),P=T.useCallback(()=>{f(!0)},[]),$=T.useCallback(()=>{f(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`bg-white border border-gray-200 rounded-md overflow-hidden ${r}`,children:[a&&p.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between",children:[A&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>w("interactive"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${b==="interactive"?"bg-gray-200":""}`,title:"Interactive JSON view (fold/unfold)",children:p.jsx(Pf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>w("plain"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${b==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(wf,{className:"w-4 h-4 text-gray-400"})})]}),p.jsx("div",{className:"flex-1"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:P,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Expand to full screen",children:p.jsx(jf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:S,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Copy content",children:p.jsx(fa,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs("div",{className:"p-3 overflow-auto bg-white",style:{maxHeight:n},children:[A?b==="interactive"?p.jsx(tW,{data:y,expandedKeys:g,onToggleKey:O,keyPath:""}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre",children:JSON.stringify(y,null,2)}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre-wrap",children:y}),!y&&y!==0&&y!==!1&&p.jsx("div",{className:"text-center text-gray-400 text-sm py-8",children:"No data available"})]})]}),p.jsx(eW,{isOpen:u,onClose:$,title:t,data:y,initialViewMode:b,modalHeight:c})]})};function Yb({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a}){const i=T.useMemo(()=>{var w,A;return((w=e.name)==null?void 0:w.toLowerCase().includes("guardrail"))||((A=e.metadata)==null?void 0:A.type)==="guardrail"?["summary","request"]:e.type==="llm"?["summary","request","response"]:e.type==="tool"?["request","response","logs"]:[]},[e.type,e.name,e.metadata]),[o,s]=T.useState(i[0]),l=a?a.has(e.id):!1,c=e.children&&e.children.length>0;T.useEffect(()=>{i.includes(o)||s(i[0])},[i,o]);const u=b=>{b.stopPropagation(),t&&t(e.id)},f=()=>{i.length===0&&c&&t?t(e.id):n&&n(e)},d=()=>{switch(e.status){case"completed":return p.jsx("svg",{className:"flex-shrink-0",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:p.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 0.5C2.96243 0.5 0.5 2.96243 0.5 6C0.5 9.03757 2.96243 11.5 6 11.5C9.03757 11.5 11.5 9.03757 11.5 6C11.5 2.96243 9.03757 0.5 6 0.5ZM8.60355 4.85355C8.79882 4.65829 8.79882 4.34171 8.60355 4.14645C8.40829 3.95118 8.09171 3.95118 7.89645 4.14645L5.25 6.79289L4.10355 5.64645C3.90829 5.45118 3.59171 5.45118 3.39645 5.64645C3.20118 5.84171 3.20118 6.15829 3.39645 6.35355L4.89645 7.85355C5.09171 8.04882 5.40829 8.04882 5.60355 7.85355L8.60355 4.85355Z",fill:"#17B26A"})});case"failed":return p.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-red-500"});case"running":return p.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-yellow-500 animate-pulse"});default:return p.jsx("div",{className:"w-[12px] h-[12px] rounded-full bg-gray-400"})}},h=()=>{var w,A;let b="agent";switch(e.type){case"Agent":b="agent";break;case"llm":b="model";break;case"tool":b="workflowtool";break;default:b="agent"}return p.jsx(wi,{icon:e.icon,iconSource:b,size:"small",name:e.name,className:"w-[24px] h-[24px]",toolType:e.type==="tool"?(w=e.metadata)==null?void 0:w.type:void 0,provider:e.type==="llm"?(A=e.metadata)==null?void 0:A.provider:void 0,modelName:e.type==="llm"?e.name:void 0})},m=b=>b?b<1e3?`${b}ms`:`${(b/1e3).toFixed(2)}s`:"",g=()=>i,v=()=>{var A,y,O;const b=e.toolInvocations&&e.toolInvocations.length>0||e.children&&e.children.length>0,w=e.isResponse;return b?p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.jsx("span",{className:"text-xs text-gray-600",children:w?"Responded":"Invoked"}),e.toolInvocations&&e.toolInvocations.length>0&&e.toolInvocations.map((S,P)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[p.jsx(Vs,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:S.name||"Tool"})]},S.tool_call_id||P)),(!e.toolInvocations||e.toolInvocations.length===0)&&e.children&&e.children.length>0&&e.children.map((S,P)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[S.type==="tool"?p.jsx(Vs,{className:"w-[12px] h-[12px] text-green-500 flex-shrink-0"}):p.jsx(b0,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:S.name||"Unknown"})]},S.id||P))]}),((O=(y=(A=e.toolInvocations)==null?void 0:A[0])==null?void 0:y.args)==null?void 0:O.reason)&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Reason"}),p.jsx("div",{className:"text-xs text-gray-600",children:e.toolInvocations[0].args.reason})]})]}):e.output&&!b?p.jsx("div",{className:"space-y-2",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-gray-600",children:"Generated"}),p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[4px] border border-gray-200 rounded text-xs",children:[p.jsx(A0,{className:"w-[12px] h-[12px] text-purple-500"}),p.jsx("span",{className:"text-gray-600",children:"Response"})]})]})}):p.jsx("div",{className:"text-xs text-gray-500 italic",children:"No actions taken"})},x=()=>{switch(o){case"summary":return p.jsxs("div",{className:"space-y-2",children:[e.input&&p.jsxs("div",{className:"border-b border-gray-100 pb-[8px]",children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Input"}),p.jsx(Jr,{data:e.input,title:"",showHeader:!1,maxHeight:"250px",defaultExpanded:!0,className:"border-0"})]}),p.jsxs("div",{className:"border-b border-gray-100 pb-2",children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Action"}),v()]}),e.output&&p.jsxs("div",{className:"border-b border-gray-100 pb-[8px]",children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Output"}),p.jsx(Jr,{data:e.output,title:"",showHeader:!1,maxHeight:"250px",defaultExpanded:!0,className:"border-0"})]}),e.llmUsage&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[4px]",children:"Usage"}),p.jsxs("div",{className:"text-xs text-gray-600",children:["Input: ",e.llmUsage.input_tokens," tokens, Output: ",e.llmUsage.output_tokens," tokens, Total: ",e.llmUsage.total_tokens," tokens"]})]})]});case"request":return p.jsx(Jr,{data:e.input,title:"Request Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"response":return p.jsx(Jr,{data:e.output,title:"Response Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"logs":const b={executionLog:[e.startTime&&{timestamp:new Date(e.startTime).toISOString(),level:"INFO",message:`${e.type==="tool"?"Tool":"Node"} execution started`,context:{nodeId:e.id,name:e.name,type:e.type}},e.status==="completed"&&{timestamp:new Date(e.endTime||e.startTime).toISOString(),level:"INFO",message:"Response received",context:{status:e.status,duration:e.duration,llmUsage:e.llmUsage}},e.endTime&&{timestamp:new Date(e.endTime).toISOString(),level:"SUCCESS",message:`${e.type==="tool"?"Tool":"Node"} execution completed`,context:{endTime:e.endTime,totalDuration:e.duration?`${e.duration}ms`:"unknown"}}].filter(Boolean),metadata:{totalLogs:0,startTime:e.startTime,endTime:e.endTime,duration:e.duration,status:e.status}};return b.metadata.totalLogs=b.executionLog.length,p.jsx(Jr,{data:b,title:"Execution Logs",maxHeight:"400px",defaultExpanded:!0,defaultViewMode:"plain"});default:return null}};return p.jsxs("div",{className:"bg-white w-full border-t border-gray-200",children:[p.jsx("div",{className:`flex items-center py-[8px] px-[8px] relative transition-colors cursor-pointer w-full
265
+ `,onClick:f,children:p.jsxs("div",{className:"flex items-center gap-[6px] w-full",children:[p.jsx("div",{className:"p-[2px] rounded hover:bg-gray-200 cursor-pointer flex-shrink-0 bg-white z-[2]",onClick:b=>{b.stopPropagation(),c?u(b):n&&n(e)},title:c?r?"Collapse":"Expand":"Show details",children:p.jsx(ki,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${c&&r||l&&i.length>0?"rotate-90":""}`})}),p.jsx("div",{className:"flex-shrink-0",children:h()}),p.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",children:e.name}),p.jsxs("div",{className:"flex items-center gap-[12px] text-[10px] text-gray-500",children:[e.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Tf,{className:"w-[12px] h-[12px]"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:m(e.duration)})]}),e.llmUsage&&p.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:[e.llmUsage.total_tokens," Tokens"]})]}),p.jsx("div",{className:"flex-shrink-0",children:d()})]})}),l&&i.length>0&&p.jsxs("div",{className:"w-full pl-[32px] relative",children:[p.jsx("div",{className:"absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]"}),p.jsxs("div",{className:"px-[4px] py-[8px] w-full border-t border-gray-200",children:[p.jsx("div",{className:"bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200",children:g().map(b=>p.jsx("button",{onClick:()=>s(b),className:`px-[8px] py-[4px] text-xs font-medium rounded-[4px] text-gray-500 hover:text-gray-700 hover:shadow-tab hover:bg-white transition-colors ${o===b?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:b.charAt(0).toUpperCase()+b.slice(1)},b))}),p.jsx("div",{className:"px-[4px]",children:x()})]})]}),r&&c&&p.jsxs("div",{className:"w-full pl-[32px] relative",children:[p.jsx("div",{className:"absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]"}),e.children.map(b=>p.jsx(Yb,{node:b,onToggle:t,isExpanded:b.isExpanded,onNodeClick:n,selectedNodeIds:a},b.id))]})]})}const Xb=T.forwardRef(({executionEvents:e,sessionId:t,onNodeExpand:r,onNodeCollapse:n,className:a=""},i)=>{const[o,s]=T.useState(new Set),[l,c]=T.useState(new Set),[u,f]=T.useState(new Set),[d,h]=T.useState(e),m=T.useRef(e.length);T.useEffect(()=>{h(e),e.length===0?(s(new Set),c(new Set),f(new Set),x.current=!1,m.current=0):(e.length>m.current&&(x.current=!0),m.current=e.length)},[e]);const g=T.useRef(0),v=T.useRef(null),x=T.useRef(!1);T.useImperativeHandle(i,()=>({addEvent:k=>{h(_=>[..._,k]),x.current=!0},addEvents:k=>{h(_=>[..._,...k]),x.current=!0},clearEvents:()=>{h([]),s(new Set),c(new Set),f(new Set),x.current=!1}}),[]);const b=T.useMemo(()=>{const k=Kb.buildSessionTree(d,t);return v.current=k,k},[d,t]),w=T.useRef(null);T.useEffect(()=>{d.length>g.current&&w.current&&setTimeout(()=>{w.current&&w.current.scrollTo({top:w.current.scrollHeight,behavior:"smooth"})},100),g.current=d.length},[d.length]),T.useEffect(()=>{if(d.length>0&&b.runs.length>0){if(x.current){const _=C(b);s(new Set(_)),x.current=!1}f(_=>{const D=new Set(_);return b.runs.forEach(M=>{D.has(M.runId)||D.add(M.runId)}),D});const k=b.runs[b.runs.length-1];if(k.rootNodes.length>0){const _=k.rootNodes[k.rootNodes.length-1],D=j(_);D&&c(M=>{const B=new Set(M);return B.add(D.id),B})}}},[b]);const A=T.useCallback(k=>{s(_=>{const D=new Set(_);return D.has(k)?(D.delete(k),n==null||n(k)):(D.add(k),r==null||r(k)),D})},[r,n]),y=T.useCallback(k=>{c(_=>{const D=new Set(_);return D.has(k.id)?D.delete(k.id):D.add(k.id),D})},[]),O=T.useCallback(k=>{f(_=>{const D=new Set(_);return D.has(k)?D.delete(k):D.add(k),D})},[]),S=T.useCallback(k=>({...k,isExpanded:o.has(k.id),children:k.children.map(D=>S(D))}),[o]),P=k=>k?k<1e3?`${k}ms`:`${(k/1e3).toFixed(2)}s`:"",$=k=>k?k>=1e6?`${(k/1e6).toFixed(1)}M tokens`:k>=1e3?`${(k/1e3).toFixed(1)}K tokens`:`${k} tokens`:"",N=async k=>{try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(k);return}const _=document.createElement("textarea");_.value=k,_.style.position="fixed",_.style.left="-999999px",_.style.top="-999999px",document.body.appendChild(_),_.focus(),_.select();try{document.execCommand("copy")}catch(D){console.warn("Copy to clipboard failed:",D)}finally{document.body.removeChild(_)}}catch(_){console.warn("Copy to clipboard failed:",_)}},j=k=>k.children.length===0?k:j(k.children[k.children.length-1]),C=k=>{const _=[],D=M=>{_.push(M.id),M.children.forEach(B=>D(B))};return k.runs.forEach(M=>{M.rootNodes.forEach(B=>D(B))}),_};return b.runs.length?p.jsx("div",{className:`flex flex-col h-full bg-white ${a}`,children:p.jsxs("div",{className:"flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden",ref:w,children:[p.jsxs("div",{className:"flex items-center w-full gap-[16px]",children:[p.jsx("div",{className:"text-xs text-gray-400 whitespace-nowrap flex-shrink-0",children:"Session initiated"}),p.jsx("div",{className:"flex-1 h-[1px] border-t border-dashed border-gray-300 w-full"}),p.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400 flex-shrink-0",children:[p.jsx("span",{children:b.sessionId}),p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",onClick:()=>N(b.sessionId),title:"Copy session ID",children:p.jsx(fa,{className:"w-[12px] h-[12px]"})}),p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",title:"Open in external viewer",children:p.jsx(Af,{className:"w-[12px] h-[12px]"})})]})]}),b.runs.map(k=>p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("div",{className:"rounded-[8px] border border-gray-300 bg-white overflow-hidden",children:[p.jsx("div",{className:"flex flex-col w-full",children:p.jsxs("div",{className:"flex items-center gap-2 p-[8px] bg-gray-50 cursor-pointer select-none",onClick:()=>O(k.runId),title:u.has(k.runId)?"Collapse run":"Expand run",children:[p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:p.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM10.4715 4.52924C10.2112 4.2689 9.78906 4.26889 9.52872 4.52924L6.66681 7.39114V5.6673C6.6668 5.29912 6.36834 5.00064 6.00015 5.00064C5.63197 5.00064 5.33351 5.29912 5.3335 5.6673V9.00064C5.3335 9.17745 5.40373 9.34702 5.52875 9.47205C5.65377 9.59707 5.82334 9.6673 6.00015 9.6673H9.3335L9.35068 9.66708C9.71092 9.65796 10.0002 9.36308 10.0002 9.00064C10.0001 8.63821 9.71092 8.34332 9.35068 8.3342L9.3335 8.33398H7.60962L10.4715 5.47205C10.7319 5.2117 10.7319 4.78958 10.4715 4.52924Z",fill:"#079455"})}),p.jsx("span",{className:"flex-1 text-xs text-gray-900 truncate",children:k.userInput||`Run ${k.runId}`}),p.jsx(ur,{className:`w-[16px] h-[16px] text-gray-400 flex-shrink-0 transition-transform ${u.has(k.runId)?"rotate-180":""}`})]})}),u.has(k.runId)&&p.jsx("div",{className:"bg-white w-full flex flex-col",children:k.rootNodes&&k.rootNodes.map(_=>p.jsx("div",{className:"w-full",children:p.jsx(Yb,{node:S(_),onToggle:A,isExpanded:o.has(_.id),onNodeClick:y,selectedNodeIds:l})},_.id))}),k.finalOutput&&p.jsxs("div",{className:"p-[8px] bg-gray-50 flex items-center gap-[8px] w-full border-t border-gray-200",children:[p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"flex-shrink-0",children:p.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM6.66653 4.33398C6.29835 4.334 5.99988 4.63246 5.99988 5.00064C5.99988 5.36882 6.29835 5.66729 6.66653 5.6673H8.39041L5.52847 8.52924C5.26813 8.78958 5.26813 9.2117 5.52847 9.47205C5.78882 9.73239 6.21093 9.73239 6.47128 9.47205L9.33322 6.61011V8.33398C9.33323 8.70217 9.6317 9.00064 9.99988 9.00064C10.3681 9.00064 10.6665 8.70217 10.6665 8.33398V5.00064C10.6665 4.63821 10.3773 4.34333 10.0171 4.3342L9.99988 4.33398H6.66653Z",fill:"#155EEF"})}),p.jsx("span",{className:"flex-1 text-xs text-gray-900 truncate",title:k.finalOutput,children:k.finalOutput}),p.jsxs("div",{className:"flex items-center gap-[8px] flex-shrink-0",children:[k.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Tf,{className:"w-[12px] h-[12px] text-gray-400"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:P(k.duration)})]}),k.totalTokens&&p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:$(k.totalTokens)}),k.status==="running"&&p.jsx("span",{className:"text-[10px] text-gray-500",children:"In progress"})]})]})]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[p.jsx("span",{className:"text-xs text-gray-400",children:k.runId}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",onClick:()=>N(k.runId),title:"Copy run ID",children:p.jsx(fa,{className:"w-3 h-3 text-gray-400"})}),p.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",title:"Open run in external viewer",children:p.jsx(Af,{className:"w-3 h-3 text-gray-400"})})]})]})]},k.runId))]})}):p.jsx("div",{className:`flex flex-col h-full ${a}`,children:p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx("p",{className:"text-gray-500 text-sm",children:"No execution events to display"})})})});Xb.displayName="DebugPanel";const Jb=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=T.useState(e),[c,u]=T.useState(!1),[f,d]=T.useState(!1),h=T.useRef(null);T.useEffect(()=>{l(e)},[e]);function m(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function g(w){const A=w.target.value;l(A),t==null||t(A)}const v=()=>p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-gray-100",children:[p.jsx("span",{className:"text-xs font-mono uppercase text-gray-500",children:r}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{type:"button",className:"p-1 rounded hover:bg-gray-200",onClick:m,title:f?"Copied!":"Copy",children:p.jsx(fa,{size:16,className:f?"text-green-500":""})}),p.jsx("button",{type:"button",className:"p-1 rounded hover:bg-gray-200",onClick:()=>u(!c),title:c?"Minimize":"Maximize",children:c?p.jsx(S0,{size:16}):p.jsx(jf,{size:16})})]})]}),x=()=>p.jsx("textarea",{ref:h,spellCheck:!1,readOnly:n,placeholder:a,autoFocus:o,className:"flex-1 w-full h-full resize-none p-3 font-mono text-sm outline-none bg-transparent",value:s,onChange:g}),b=p.jsxs("div",{className:se("flex flex-col h-full w-full border rounded-md bg-background",i),style:{minHeight:"200px"},children:[p.jsx(v,{}),p.jsx(x,{})]});return c?p.jsx(hf,{children:p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:p.jsx("div",{className:"w-full h-full max-h-[calc(100vh-2rem)]",children:b})})}):b};Jb.displayName="CodeEditor";const Zb=T.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:se("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Zb.displayName="Avatar";const Qb=T.forwardRef(({className:e,...t},r)=>p.jsx("img",{ref:r,className:se("aspect-square h-full w-full",e),...t}));Qb.displayName="AvatarImage";const e0=T.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));e0.displayName="AvatarFallback";const t0=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r,children:t}));t0.displayName="Card";const rW=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("flex flex-col space-y-1.5 p-6",e),...r,children:t}));rW.displayName="CardHeader";const nW=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...r,children:t}));nW.displayName="CardTitle";const aW=T.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("p-6 pt-0",e),...r,children:t}));aW.displayName="CardContent";const Bs=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],Fs=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Ws=["gpt-4o","gpt-4o-mini","gpt-3.5-turbo","claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus","gemini-1.5-pro","gemini-1.5-flash","llama-3.1-405b","llama-3.1-70b"],iW=(e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),c=Math.floor(l*.9+Math.random()*300),u=Math.floor(c*.6),f=c-u,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300),g=Math.floor(h*.3+Math.random()*100),v=Math.floor(h*.25+Math.random()*80),x=Math.floor(h*.2+Math.random()*60),b=Math.floor(h*.15+Math.random()*50),w={};Bs.forEach(O=>{const S=O.replace(/\s+/g,"").toLowerCase(),P=Math.floor(d/Bs.length);w[S]=Math.floor(P+Math.random()*(P*.5))});const A={};Fs.forEach(O=>{const S=O.replace(/[-]/g,""),P=Math.floor(h/Fs.length);A[S]=Math.floor(P+Math.random()*(P*.8))});const y={};Ws.forEach(O=>{const S=O.replace(/[-\.]/g,""),P=Math.floor(m/Ws.length);y[S]=Math.floor(P+Math.random()*(P*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:c,inputTokens:u,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:m,codeTools:g,workflowTools:v,knowledgeTools:x,mcpTools:b,...w,...A,...y,value:o})}return t},oW=()=>{const e=[],t=['{"name":"avatar14","color":"#F6D0FE","type":"human"}','{"name":"avatar2","color":"#3B82F6","type":"human"}','{"name":"avatar7","color":"#EF4444","type":"human"}','{"name":"avatar12","color":"#10B981","type":"human"}','{"name":"avatar8","color":"#F59E0B","type":"human"}'];return Bs.forEach((r,n)=>{e.push({id:`agent-${n+1}`,name:r,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*4e5)+1e5,successRate:`${Math.floor(Math.random()*20)+80}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${r.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:t[n]||t[0]})}),e},sW=()=>{const e=r=>r.includes("calculate-creditscore")?"Code Tool":r.includes("calculate-risk")?"Workflow Tool":r.includes("calculate-mortgage")?"MCP Tool":r.includes("analyse-expenses")?"Workflow Tool":r.includes("fetch-statement")?"Knowledge":"Code Tool",t=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'];return Fs.map((r,n)=>({id:`tool-${n+1}`,name:r,type:e(r),runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*90)+15}s`,tokens:Math.floor(Math.random()*2e4)+5e3,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:t[n]||t[0]}))},lW=()=>Ws.map((e,t)=>({id:`model-${t+1}`,name:e,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*5e5)+1e5,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()})),Zr=iW(),cW=oW(),uW=sW(),fW=lW(),dW={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"},{label:"All Drafts",value:"all"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"This month",value:"month"},{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"},{label:"Last 90 days",value:"90days"}],defaultValue:"month"},export:{enabled:!0,formats:["csv","json","pdf"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"sessions",title:"Sessions",description:"User engagement and session analytics",metrics:[{title:"Users",value:3384,change:{value:6,type:"increase"},info:"Total number of unique users",metricType:"users",view:{type:"chart",chart:{type:"line",title:"Total Users",data:Zr,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Sessions",value:11847,change:{value:18,type:"increase"},info:"Total number of user sessions",metricType:"sessions",view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:Zr,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Messages",value:34563,change:{value:5,type:"increase"},info:"Total messages exchanged",metricType:"messages",view:{type:"chart",chart:{type:"line",title:"Total Messages",data:Zr,dataKey:"messages",color:"#e879f9",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Tokens",value:32044,change:{value:44,type:"increase"},info:"Total tokens processed",metricType:"tokens",view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:Zr,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f97316",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#e879f9",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}}],view:{type:"chart"},layout:{span:12,order:1}},{id:"runs",title:"Runs",description:"Agent, tool, and model execution analytics",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Number of agent executions",metricType:"agentRuns",view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:Zr,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Agent Runs",data:cW,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:[{label:"All Agents",value:"all"},...Bs.map(e=>({label:e,value:e.replace(/\s+/g,"").toLowerCase(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${e.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}))],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:34563,change:{value:5,type:"increase"},info:"Number of tool executions",metricType:"toolRuns",view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:Zr,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Tool Runs",data:uW,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:[{label:"All Tools",value:"all"},...Fs.map((e,t)=>{const r=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'],n=a=>a.includes("calculate-creditscore")?"Code Tool":a.includes("calculate-risk")?"Workflow Tool":a.includes("calculate-mortgage")?"MCP Tool":a.includes("analyse-expenses")?"Workflow Tool":a.includes("fetch-statement")?"Knowledge":"Code Tool";return{label:e,value:e.replace(/[-]/g,""),icon:r[t]||r[0],type:n(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:32044,change:{value:44,type:"increase"},info:"Number of model inferences",metricType:"modelRuns",view:{type:"chart",chart:{type:"line",title:"Model Runs",data:Zr,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Model Runs",data:fW,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:[{label:"All Models",value:"all"},...Ws.map(e=>{const t=r=>{const n=r.toLowerCase();return n.includes("gpt")||n.includes("openai")?"⚡":n.includes("claude")||n.includes("anthropic")?"A":n.includes("gemini")||n.includes("google")?"G":n.includes("llama")||n.includes("meta")?"M":"🤖"};return{label:e,value:e.replace(/[-\.]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}],view:{type:"chart"},layout:{span:12,order:2}}]},Yt={primary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],secondary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],accent:["#6366f1","#8b5cf6","#d946ef","#06b6d4","#84cc16","#eab308"],semantic:{success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},gradients:{purple:["#8b5cf6","#a78bfa"],cyan:["#06b6d4","#22d3ee"],orange:["#f97316","#fb923c"],green:["#10b981","#34d399"],sunset:["#f97316","#ec4899"],ocean:["#06b6d4","#3b82f6"],forest:["#10b981","#84cc16"]}},pW={primary:["#7c3aed","#0891b2","#ea580c","#059669","#db2777","#d97706","#2563eb","#dc2626"],secondary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],accent:["#4f46e5","#7c3aed","#c026d3","#0891b2","#65a30d","#ca8a04"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},hW={primary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],secondary:["#c4b5fd","#67e8f9","#fdba74","#6ee7b7","#f9a8d4","#fcd34d","#93c5fd","#fca5a5"],accent:["#818cf8","#a78bfa","#e879f9","#22d3ee","#a3e635","#facc15"],semantic:{success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#60a5fa"}},vW={primary:["#1f2937","#374151","#6b7280","#9ca3af","#3b82f6","#1d4ed8","#10b981","#f59e0b"],secondary:["#4b5563","#6b7280","#9ca3af","#d1d5db","#60a5fa","#3b82f6","#34d399","#fbbf24"],accent:["#2563eb","#1d4ed8","#059669","#0891b2","#d97706","#b45309"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#1d4ed8"}},r0=(e,t)=>e.primary[t%e.primary.length],Pi=(e,t)=>e.semantic[t],mW=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},n0=(e,t=Yt)=>e.map((r,n)=>({...r,color:r0(t,n)})),Us=((e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),c=Math.floor(l*.9+Math.random()*300),u=Math.floor(c*.6),f=c-u,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),m=Math.floor(d*8+Math.random()*300);t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:c,inputTokens:u,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:m,value:o})}return t})(),yW={id:"enhanced-dashboard",title:"Enhanced Color Configuration Dashboard",subtitle:"Demonstrating all color configuration options",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"}],defaultValue:"30days"},export:{enabled:!0,formats:["csv","json"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"manual-colors",title:"Manual Color Assignment",description:"Each line has manually assigned colors",metrics:[{title:"Total Users",value:3384,change:{value:6,type:"increase"},info:"Manually colored chart"}],view:{type:"chart",chart:{type:"line",title:"Manual Color Configuration",data:Us,lines:[{dataKey:"users",color:"#8b5cf6",label:"Users",strokeWidth:3},{dataKey:"sessions",color:"#06b6d4",label:"Sessions",strokeWidth:2},{dataKey:"messages",color:"#f97316",label:"Messages",strokeWidth:2,strokeDasharray:"5 5"}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:1}},{id:"auto-colors",title:"Auto-Assigned Colors",description:"Colors automatically assigned from palette",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Auto-colored from palette"}],view:{type:"chart",chart:{type:"line",title:"Auto Color Assignment",data:Us,lines:n0([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Yt),dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:2}},{id:"semantic-colors",title:"Semantic Colors",description:"Using semantic colors for different data types",metrics:[{title:"Success Rate",value:"94.2%",change:{value:2,type:"increase"},info:"Using semantic success color"},{title:"Error Rate",value:"5.8%",change:{value:1,type:"decrease"},info:"Using semantic error color"}],view:{type:"chart",chart:{type:"line",title:"Semantic Color Usage",data:Us,lines:[{dataKey:"users",color:Pi(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:Pi(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:Pi(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:Pi(Yt,"info"),label:"Info Events",strokeWidth:2}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:12,order:3}},{id:"single-custom",title:"Single Line Custom Color",description:"Single line chart with custom color and styling",metrics:[{title:"Total Messages",value:34563,change:{value:5,type:"increase"},info:"Custom styled single line"}],view:{type:"chart",chart:{type:"line",title:"Custom Single Line",data:Us,dataKey:"messages",color:"#ec4899",dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:250,showGrid:!0,curve:"monotone"}},layout:{span:12,order:4}}]},gW={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},bW={baseUrl:window.location.protocol+"//"+window.location.hostname,dashboardType:"agenticDashboard",projectId:"aa-bdbfa4eb-c7c4-4350-be96-d778188c2c4b",environment:"draft",headers:{authorization:"Bearer 2amvsUbh87obVLVYjbNnXCbXnOr-plekM7-qjKt2EJIZnZuAV2KT9WSTG0L4U33X",accountId:"6290f982fb880154e99bbede","Content-Type":"application/json"},defaultTimeRange:{fromTimestamp:new Date(Date.now()-7*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},xW={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app",sections:[{id:"usage-analytics",title:"Session Analytics",metrics:[{title:"Users",value:0,metricType:"users",highlighted:!0},{title:"Sessions",value:0,metricType:"sessions",highlighted:!1},{title:"Messages",value:0,metricType:"messages",highlighted:!1},{title:"Tokens",value:0,metricType:"tokens",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Usage Over Time",data:[],lines:[{dataKey:"count",color:"#3B82F6",label:"Count",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}},{id:"runs",title:"Execution Analytics",metrics:[{title:"Agent Runs",value:0,metricType:"agentRuns",highlighted:!0},{title:"Tool Runs",value:0,metricType:"toolRuns",highlighted:!1},{title:"Model Runs",value:0,metricType:"modelRuns",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Execution Runs Over Time",data:[],lines:[{dataKey:"count",color:"#10B981",label:"Runs",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}}],globalControls:{draft:{label:"Environment",options:[{label:"Draft",value:"draft"},{label:"Production",value:"production"},{label:"Staging",value:"staging"}],defaultValue:"draft"},timeRange:{label:"Time Range",useDatePicker:!0,options:[{label:"Last 7 days",value:"7d"},{label:"Last 30 days",value:"30d"}],defaultValue:"7d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},wW=`
266
266
  // In your Angular component (usage-analytics.component.ts)
267
267
  import { Dashboard, apiEnabledDashboardConfig, agenticAppConfig } from '@agentic/ui-libs';
268
268
 
@@ -321,4 +321,4 @@ export class AnalyticsDashboardComponent implements OnInit, AfterViewInit, OnDes
321
321
  }
322
322
  }
323
323
  }
324
- `;ie.AgentListView=_b,ie.AnalyticsChart=Ab,ie.AnalyticsTable=Pb,ie.ApiInvokerService=Mb,ie.Avatar=Jb,ie.AvatarFallback=Qb,ie.AvatarImage=Zb,ie.Button=ff,ie.Card=e0,ie.ChartSkeleton=Tb,ie.CodeEditor=Xb,ie.Dashboard=ZF,ie.DashboardApiService=Kt,ie.DashboardSection=Lb,ie.DataViewer=Jr,ie.DateRangePicker=qb,ie.DebugPanel=Yb,ie.EndpointsConfigService=kb,ie.IconPreview=wi,ie.MetricCard=Rf,ie.MetricCardSkeleton=xi,ie.ModelListView=Cb,ie.MultiSelect=Db,ie.Portal=hf,ie.RunsSlider=$b,ie.SectionControls=Ib,ie.Select=Ms,ie.Skeleton=na,ie.ToolListView=Eb,ie.TreeBuilder=Hb,ie.ViewRenderer=Nb,ie.agenticAppConfig=gW,ie.angularIntegrationExample=xW,ie.apiEnabledDashboardConfig=bW,ie.autoAssignColors=r0,ie.businessPalette=hW,ie.cn=se,ie.colorExamples=yW,ie.darkPalette=dW,ie.defaultPalette=Yt,ie.enhancedDashboardConfig=mW,ie.getColorFromPalette=t0,ie.getGradientColors=vW,ie.getSemanticColor=Pi,ie.lightPalette=pW,ie.sampleDashboardConfig=fW,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
324
+ `;ie.AgentListView=_b,ie.AnalyticsChart=Ab,ie.AnalyticsTable=Pb,ie.ApiInvokerService=Mb,ie.Avatar=Zb,ie.AvatarFallback=e0,ie.AvatarImage=Qb,ie.Button=ff,ie.Card=t0,ie.ChartSkeleton=Tb,ie.CodeEditor=Jb,ie.Dashboard=QF,ie.DashboardApiService=Ht,ie.DashboardSection=Lb,ie.DataViewer=Jr,ie.DateRangePicker=qb,ie.DebugPanel=Xb,ie.EndpointsConfigService=kb,ie.IconPreview=wi,ie.MetricCard=Rf,ie.MetricCardSkeleton=xi,ie.ModelListView=Cb,ie.MultiSelect=Db,ie.Portal=hf,ie.RunsSlider=$b,ie.SectionControls=Ib,ie.Select=Ms,ie.Skeleton=na,ie.ToolListView=Eb,ie.TreeBuilder=Kb,ie.ViewRenderer=Nb,ie.agenticAppConfig=bW,ie.angularIntegrationExample=wW,ie.apiEnabledDashboardConfig=xW,ie.autoAssignColors=n0,ie.businessPalette=vW,ie.cn=se,ie.colorExamples=gW,ie.darkPalette=pW,ie.defaultPalette=Yt,ie.enhancedDashboardConfig=yW,ie.getColorFromPalette=r0,ie.getGradientColors=mW,ie.getSemanticColor=Pi,ie.lightPalette=hW,ie.sampleDashboardConfig=dW,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});