agentic-ui-libs 0.2.0-beta.13 → 0.2.0-beta.14

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,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(ie=typeof globalThis<"u"?globalThis:ie||self,S(ie.AgenticUILibs={},ie.React,ie.ReactDOM))})(this,function(ie,S,en){"use strict";var GU=Object.defineProperty;var HU=(ie,S,en)=>S in ie?GU(ie,S,{enumerable:!0,configurable:!0,writable:!0,value:en}):ie[S]=en;var Bt=(ie,S,en)=>HU(ie,typeof S!="symbol"?S+"":S,en);function hb(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=hb(S);var $i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}},ca={};/**
1
+ (function(ie,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(ie=typeof globalThis<"u"?globalThis:ie||self,S(ie.AgenticUILibs={},ie.React,ie.ReactDOM))})(this,function(ie,S,en){"use strict";var qU=Object.defineProperty;var KU=(ie,S,en)=>S in ie?qU(ie,S,{enumerable:!0,configurable:!0,writable:!0,value:en}):ie[S]=en;var $t=(ie,S,en)=>KU(ie,typeof S!="symbol"?S+"":S,en);function gb(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=gb(S);var $i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(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 xf;function mb(){if(xf)return ca;xf=1;var e=S,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={};/**
9
+ */var xf;function vb(){if(xf)return ca;xf=1;var e=S,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,175 +14,180 @@
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 wf;function vb(){return wf||(wf=1,process.env.NODE_ENV!=="production"&&function(){var e=S,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"),v=Symbol.iterator,g="@@iterator";function m(N){if(N===null||typeof N!="object")return null;var J=v&&N[v]||N[g];return typeof J=="function"?J:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(N){{for(var J=arguments.length,ne=new Array(J>1?J-1:0),ue=1;ue<J;ue++)ne[ue-1]=arguments[ue];x("error",N,ne)}}function x(N,J,ne){{var ue=b.ReactDebugCurrentFrame,je=ue.getStackAddendum();je!==""&&(J+="%s",ne=ne.concat([je]));var $e=ne.map(function(ye){return String(ye)});$e.unshift("Warning: "+J),Function.prototype.apply.call(console[N],console,$e)}}var j=!1,y=!1,w=!1,T=!1,A=!1,_;_=Symbol.for("react.module.reference");function C(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===i||A||N===a||N===c||N===u||T||N===h||j||y||w||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===f||N.$$typeof===o||N.$$typeof===s||N.$$typeof===l||N.$$typeof===_||N.getModuleId!==void 0))}function P(N,J,ne){var ue=N.displayName;if(ue)return ue;var je=J.displayName||J.name||"";return je!==""?ne+"("+je+")":ne}function E(N){return N.displayName||"Context"}function I(N){if(N==null)return null;if(typeof N.tag=="number"&&O("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 c:return"Suspense";case u:return"SuspenseList"}if(typeof N=="object")switch(N.$$typeof){case s:var J=N;return E(J)+".Consumer";case o:var ne=N;return E(ne._context)+".Provider";case l:return P(N,N.render,"ForwardRef");case f:var ue=N.displayName||null;return ue!==null?ue:I(N.type)||"Memo";case d:{var je=N,$e=je._payload,ye=je._init;try{return I(ye($e))}catch{return null}}}return null}var k=Object.assign,D=0,M,F,z,q,$,B,U;function W(){}W.__reactDisabledLog=!0;function K(){{if(D===0){M=console.log,F=console.info,z=console.warn,q=console.error,$=console.group,B=console.groupCollapsed,U=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 R(){{if(D--,D===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},N,{value:M}),info:k({},N,{value:F}),warn:k({},N,{value:z}),error:k({},N,{value:q}),group:k({},N,{value:$}),groupCollapsed:k({},N,{value:B}),groupEnd:k({},N,{value:U})})}D<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=b.ReactCurrentDispatcher,Y;function te(N,J,ne){{if(Y===void 0)try{throw Error()}catch(je){var ue=je.stack.trim().match(/\n( *(at )?)/);Y=ue&&ue[1]||""}return`
18
- `+Y+N}}var V=!1,Z;{var ee=typeof WeakMap=="function"?WeakMap:Map;Z=new ee}function L(N,J){if(!N||V)return"";{var ne=Z.get(N);if(ne!==void 0)return ne}var ue;V=!0;var je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $e;$e=G.current,G.current=null,K();try{if(J){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(mt){ue=mt}Reflect.construct(N,[],ye)}else{try{ye.call()}catch(mt){ue=mt}N.call(ye.prototype)}}else{try{throw Error()}catch(mt){ue=mt}N()}}catch(mt){if(mt&&ue&&typeof mt.stack=="string"){for(var ge=mt.stack.split(`
17
+ */var wf;function yb(){return wf||(wf=1,process.env.NODE_ENV!=="production"&&function(){var e=S,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"),g=Symbol.iterator,v="@@iterator";function m(D){if(D===null||typeof D!="object")return null;var J=g&&D[g]||D[v];return typeof J=="function"?J:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(D){{for(var J=arguments.length,ne=new Array(J>1?J-1:0),ue=1;ue<J;ue++)ne[ue-1]=arguments[ue];x("error",D,ne)}}function x(D,J,ne){{var ue=b.ReactDebugCurrentFrame,Pe=ue.getStackAddendum();Pe!==""&&(J+="%s",ne=ne.concat([Pe]));var $e=ne.map(function(ye){return String(ye)});$e.unshift("Warning: "+J),Function.prototype.apply.call(console[D],console,$e)}}var A=!1,y=!1,O=!1,T=!1,j=!1,C;C=Symbol.for("react.module.reference");function k(D){return!!(typeof D=="string"||typeof D=="function"||D===n||D===i||j||D===a||D===c||D===u||T||D===h||A||y||O||typeof D=="object"&&D!==null&&(D.$$typeof===d||D.$$typeof===f||D.$$typeof===o||D.$$typeof===s||D.$$typeof===l||D.$$typeof===C||D.getModuleId!==void 0))}function P(D,J,ne){var ue=D.displayName;if(ue)return ue;var Pe=J.displayName||J.name||"";return Pe!==""?ne+"("+Pe+")":ne}function E(D){return D.displayName||"Context"}function F(D){if(D==null)return null;if(typeof D.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof D=="function")return D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){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 D=="object")switch(D.$$typeof){case s:var J=D;return E(J)+".Consumer";case o:var ne=D;return E(ne._context)+".Provider";case l:return P(D,D.render,"ForwardRef");case f:var ue=D.displayName||null;return ue!==null?ue:F(D.type)||"Memo";case d:{var Pe=D,$e=Pe._payload,ye=Pe._init;try{return F(ye($e))}catch{return null}}}return null}var N=Object.assign,L=0,M,W,H,Y,$,B,_;function U(){}U.__reactDisabledLog=!0;function V(){{if(L===0){M=console.log,W=console.info,H=console.warn,Y=console.error,$=console.group,B=console.groupCollapsed,_=console.groupEnd;var D={configurable:!0,enumerable:!0,value:U,writable:!0};Object.defineProperties(console,{info:D,log:D,warn:D,error:D,group:D,groupCollapsed:D,groupEnd:D})}L++}}function I(){{if(L--,L===0){var D={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},D,{value:M}),info:N({},D,{value:W}),warn:N({},D,{value:H}),error:N({},D,{value:Y}),group:N({},D,{value:$}),groupCollapsed:N({},D,{value:B}),groupEnd:N({},D,{value:_})})}L<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=b.ReactCurrentDispatcher,q;function Q(D,J,ne){{if(q===void 0)try{throw Error()}catch(Pe){var ue=Pe.stack.trim().match(/\n( *(at )?)/);q=ue&&ue[1]||""}return`
18
+ `+q+D}}var G=!1,Z;{var ee=typeof WeakMap=="function"?WeakMap:Map;Z=new ee}function R(D,J){if(!D||G)return"";{var ne=Z.get(D);if(ne!==void 0)return ne}var ue;G=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $e;$e=z.current,z.current=null,V();try{if(J){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(mt){ue=mt}Reflect.construct(D,[],ye)}else{try{ye.call()}catch(mt){ue=mt}D.call(ye.prototype)}}else{try{throw Error()}catch(mt){ue=mt}D()}}catch(mt){if(mt&&ue&&typeof mt.stack=="string"){for(var ve=mt.stack.split(`
19
19
  `),ut=ue.stack.split(`
20
- `),He=ge.length-1,Ye=ut.length-1;He>=1&&Ye>=0&&ge[He]!==ut[Ye];)Ye--;for(;He>=1&&Ye>=0;He--,Ye--)if(ge[He]!==ut[Ye]){if(He!==1||Ye!==1)do if(He--,Ye--,Ye<0||ge[He]!==ut[Ye]){var Ct=`
21
- `+ge[He].replace(" at new "," at ");return N.displayName&&Ct.includes("<anonymous>")&&(Ct=Ct.replace("<anonymous>",N.displayName)),typeof N=="function"&&Z.set(N,Ct),Ct}while(He>=1&&Ye>=0);break}}}finally{V=!1,G.current=$e,R(),Error.prepareStackTrace=je}var la=N?N.displayName||N.name:"",Qr=la?te(la):"";return typeof N=="function"&&Z.set(N,Qr),Qr}function oe(N,J,ne){return L(N,!1)}function X(N){var J=N.prototype;return!!(J&&J.isReactComponent)}function ce(N,J,ne){if(N==null)return"";if(typeof N=="function")return L(N,X(N));if(typeof N=="string")return te(N);switch(N){case c:return te("Suspense");case u:return te("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case l:return oe(N.render);case f:return ce(N.type,J,ne);case d:{var ue=N,je=ue._payload,$e=ue._init;try{return ce($e(je),J,ne)}catch{}}}return""}var re=Object.prototype.hasOwnProperty,me={},We=b.ReactDebugCurrentFrame;function Be(N){if(N){var J=N._owner,ne=ce(N.type,N._source,J?J.type:null);We.setExtraStackFrame(ne)}else We.setExtraStackFrame(null)}function Fe(N,J,ne,ue,je){{var $e=Function.call.bind(re);for(var ye in N)if($e(N,ye)){var ge=void 0;try{if(typeof N[ye]!="function"){var ut=Error((ue||"React class")+": "+ne+" type `"+ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}ge=N[ye](J,ye,ue,ne,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(He){ge=He}ge&&!(ge instanceof Error)&&(Be(je),O("%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",ne,ye,typeof ge),Be(null)),ge instanceof Error&&!(ge.message in me)&&(me[ge.message]=!0,Be(je),O("Failed %s type: %s",ne,ge.message),Be(null))}}}var Ge=Array.isArray;function ct(N){return Ge(N)}function Pi(N){{var J=typeof Symbol=="function"&&Symbol.toStringTag,ne=J&&N[Symbol.toStringTag]||N.constructor.name||"Object";return ne}}function _i(N){try{return oa(N),!1}catch{return!0}}function oa(N){return""+N}function Ei(N){if(_i(N))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pi(N)),oa(N)}var Ci=b.ReactCurrentOwner,PU={key:!0,ref:!0,__self:!0,__source:!0},ib,ob;function _U(N){if(re.call(N,"ref")){var J=Object.getOwnPropertyDescriptor(N,"ref").get;if(J&&J.isReactWarning)return!1}return N.ref!==void 0}function EU(N){if(re.call(N,"key")){var J=Object.getOwnPropertyDescriptor(N,"key").get;if(J&&J.isReactWarning)return!1}return N.key!==void 0}function CU(N,J){typeof N.ref=="string"&&Ci.current}function $U(N,J){{var ne=function(){ib||(ib=!0,O("%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)",J))};ne.isReactWarning=!0,Object.defineProperty(N,"key",{get:ne,configurable:!0})}}function kU(N,J){{var ne=function(){ob||(ob=!0,O("%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)",J))};ne.isReactWarning=!0,Object.defineProperty(N,"ref",{get:ne,configurable:!0})}}var MU=function(N,J,ne,ue,je,$e,ye){var ge={$$typeof:t,type:N,key:J,ref:ne,props:ye,_owner:$e};return ge._store={},Object.defineProperty(ge._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ge,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.defineProperty(ge,"_source",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.freeze&&(Object.freeze(ge.props),Object.freeze(ge)),ge};function NU(N,J,ne,ue,je){{var $e,ye={},ge=null,ut=null;ne!==void 0&&(Ei(ne),ge=""+ne),EU(J)&&(Ei(J.key),ge=""+J.key),_U(J)&&(ut=J.ref,CU(J,je));for($e in J)re.call(J,$e)&&!PU.hasOwnProperty($e)&&(ye[$e]=J[$e]);if(N&&N.defaultProps){var He=N.defaultProps;for($e in He)ye[$e]===void 0&&(ye[$e]=He[$e])}if(ge||ut){var Ye=typeof N=="function"?N.displayName||N.name||"Unknown":N;ge&&$U(ye,Ye),ut&&kU(ye,Ye)}return MU(N,ge,ut,je,ue,Ci.current,ye)}}var vf=b.ReactCurrentOwner,sb=b.ReactDebugCurrentFrame;function sa(N){if(N){var J=N._owner,ne=ce(N.type,N._source,J?J.type:null);sb.setExtraStackFrame(ne)}else sb.setExtraStackFrame(null)}var gf;gf=!1;function yf(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function lb(){{if(vf.current){var N=I(vf.current.type);if(N)return`
20
+ `),He=ve.length-1,Ye=ut.length-1;He>=1&&Ye>=0&&ve[He]!==ut[Ye];)Ye--;for(;He>=1&&Ye>=0;He--,Ye--)if(ve[He]!==ut[Ye]){if(He!==1||Ye!==1)do if(He--,Ye--,Ye<0||ve[He]!==ut[Ye]){var Ct=`
21
+ `+ve[He].replace(" at new "," at ");return D.displayName&&Ct.includes("<anonymous>")&&(Ct=Ct.replace("<anonymous>",D.displayName)),typeof D=="function"&&Z.set(D,Ct),Ct}while(He>=1&&Ye>=0);break}}}finally{G=!1,z.current=$e,I(),Error.prepareStackTrace=Pe}var la=D?D.displayName||D.name:"",Qr=la?Q(la):"";return typeof D=="function"&&Z.set(D,Qr),Qr}function oe(D,J,ne){return R(D,!1)}function X(D){var J=D.prototype;return!!(J&&J.isReactComponent)}function ce(D,J,ne){if(D==null)return"";if(typeof D=="function")return R(D,X(D));if(typeof D=="string")return Q(D);switch(D){case c:return Q("Suspense");case u:return Q("SuspenseList")}if(typeof D=="object")switch(D.$$typeof){case l:return oe(D.render);case f:return ce(D.type,J,ne);case d:{var ue=D,Pe=ue._payload,$e=ue._init;try{return ce($e(Pe),J,ne)}catch{}}}return""}var re=Object.prototype.hasOwnProperty,me={},We=b.ReactDebugCurrentFrame;function Be(D){if(D){var J=D._owner,ne=ce(D.type,D._source,J?J.type:null);We.setExtraStackFrame(ne)}else We.setExtraStackFrame(null)}function Fe(D,J,ne,ue,Pe){{var $e=Function.call.bind(re);for(var ye in D)if($e(D,ye)){var ve=void 0;try{if(typeof D[ye]!="function"){var ut=Error((ue||"React class")+": "+ne+" type `"+ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof D[ye]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}ve=D[ye](J,ye,ue,ne,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(He){ve=He}ve&&!(ve instanceof Error)&&(Be(Pe),w("%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",ne,ye,typeof ve),Be(null)),ve instanceof Error&&!(ve.message in me)&&(me[ve.message]=!0,Be(Pe),w("Failed %s type: %s",ne,ve.message),Be(null))}}}var Ge=Array.isArray;function ct(D){return Ge(D)}function Pi(D){{var J=typeof Symbol=="function"&&Symbol.toStringTag,ne=J&&D[Symbol.toStringTag]||D.constructor.name||"Object";return ne}}function _i(D){try{return oa(D),!1}catch{return!0}}function oa(D){return""+D}function Ei(D){if(_i(D))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pi(D)),oa(D)}var Ci=b.ReactCurrentOwner,EU={key:!0,ref:!0,__self:!0,__source:!0},sb,lb;function CU(D){if(re.call(D,"ref")){var J=Object.getOwnPropertyDescriptor(D,"ref").get;if(J&&J.isReactWarning)return!1}return D.ref!==void 0}function $U(D){if(re.call(D,"key")){var J=Object.getOwnPropertyDescriptor(D,"key").get;if(J&&J.isReactWarning)return!1}return D.key!==void 0}function kU(D,J){typeof D.ref=="string"&&Ci.current}function MU(D,J){{var ne=function(){sb||(sb=!0,w("%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)",J))};ne.isReactWarning=!0,Object.defineProperty(D,"key",{get:ne,configurable:!0})}}function NU(D,J){{var ne=function(){lb||(lb=!0,w("%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)",J))};ne.isReactWarning=!0,Object.defineProperty(D,"ref",{get:ne,configurable:!0})}}var DU=function(D,J,ne,ue,Pe,$e,ye){var ve={$$typeof:t,type:D,key:J,ref:ne,props:ye,_owner:$e};return ve._store={},Object.defineProperty(ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.defineProperty(ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(ve.props),Object.freeze(ve)),ve};function IU(D,J,ne,ue,Pe){{var $e,ye={},ve=null,ut=null;ne!==void 0&&(Ei(ne),ve=""+ne),$U(J)&&(Ei(J.key),ve=""+J.key),CU(J)&&(ut=J.ref,kU(J,Pe));for($e in J)re.call(J,$e)&&!EU.hasOwnProperty($e)&&(ye[$e]=J[$e]);if(D&&D.defaultProps){var He=D.defaultProps;for($e in He)ye[$e]===void 0&&(ye[$e]=He[$e])}if(ve||ut){var Ye=typeof D=="function"?D.displayName||D.name||"Unknown":D;ve&&MU(ye,Ye),ut&&NU(ye,Ye)}return DU(D,ve,ut,Pe,ue,Ci.current,ye)}}var gf=b.ReactCurrentOwner,cb=b.ReactDebugCurrentFrame;function sa(D){if(D){var J=D._owner,ne=ce(D.type,D._source,J?J.type:null);cb.setExtraStackFrame(ne)}else cb.setExtraStackFrame(null)}var vf;vf=!1;function yf(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function ub(){{if(gf.current){var D=F(gf.current.type);if(D)return`
22
22
 
23
- Check the render method of \``+N+"`."}return""}}function DU(N){return""}var cb={};function IU(N){{var J=lb();if(!J){var ne=typeof N=="string"?N:N.displayName||N.name;ne&&(J=`
23
+ Check the render method of \``+D+"`."}return""}}function LU(D){return""}var fb={};function RU(D){{var J=ub();if(!J){var ne=typeof D=="string"?D:D.displayName||D.name;ne&&(J=`
24
24
 
25
- Check the top-level render call using <`+ne+">.")}return J}}function ub(N,J){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var ne=IU(J);if(cb[ne])return;cb[ne]=!0;var ue="";N&&N._owner&&N._owner!==vf.current&&(ue=" It was passed a child from "+I(N._owner.type)+"."),sa(N),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ne,ue),sa(null)}}function fb(N,J){{if(typeof N!="object")return;if(ct(N))for(var ne=0;ne<N.length;ne++){var ue=N[ne];yf(ue)&&ub(ue,J)}else if(yf(N))N._store&&(N._store.validated=!0);else if(N){var je=m(N);if(typeof je=="function"&&je!==N.entries)for(var $e=je.call(N),ye;!(ye=$e.next()).done;)yf(ye.value)&&ub(ye.value,J)}}}function LU(N){{var J=N.type;if(J==null||typeof J=="string")return;var ne;if(typeof J=="function")ne=J.propTypes;else if(typeof J=="object"&&(J.$$typeof===l||J.$$typeof===f))ne=J.propTypes;else return;if(ne){var ue=I(J);Fe(ne,N.props,"prop",ue,N)}else if(J.PropTypes!==void 0&&!gf){gf=!0;var je=I(J);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",je||"Unknown")}typeof J.getDefaultProps=="function"&&!J.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function RU(N){{for(var J=Object.keys(N.props),ne=0;ne<J.length;ne++){var ue=J[ne];if(ue!=="children"&&ue!=="key"){sa(N),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ue),sa(null);break}}N.ref!==null&&(sa(N),O("Invalid attribute `ref` supplied to `React.Fragment`."),sa(null))}}var db={};function pb(N,J,ne,ue,je,$e){{var ye=C(N);if(!ye){var ge="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(ge+=" 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=DU();ut?ge+=ut:ge+=lb();var He;N===null?He="null":ct(N)?He="array":N!==void 0&&N.$$typeof===t?(He="<"+(I(N.type)||"Unknown")+" />",ge=" Did you accidentally export a JSX literal instead of a component?"):He=typeof N,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",He,ge)}var Ye=NU(N,J,ne,je,$e);if(Ye==null)return Ye;if(ye){var Ct=J.children;if(Ct!==void 0)if(ue)if(ct(Ct)){for(var la=0;la<Ct.length;la++)fb(Ct[la],N);Object.freeze&&Object.freeze(Ct)}else O("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 fb(Ct,N)}if(re.call(J,"key")){var Qr=I(N),mt=Object.keys(J).filter(function(VU){return VU!=="key"}),bf=mt.length>0?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}";if(!db[Qr+bf]){var zU=mt.length>0?"{"+mt.join(": ..., ")+": ...}":"{}";O(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ne+">.")}return J}}function db(D,J){{if(!D._store||D._store.validated||D.key!=null)return;D._store.validated=!0;var ne=RU(J);if(fb[ne])return;fb[ne]=!0;var ue="";D&&D._owner&&D._owner!==gf.current&&(ue=" It was passed a child from "+F(D._owner.type)+"."),sa(D),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ne,ue),sa(null)}}function pb(D,J){{if(typeof D!="object")return;if(ct(D))for(var ne=0;ne<D.length;ne++){var ue=D[ne];yf(ue)&&db(ue,J)}else if(yf(D))D._store&&(D._store.validated=!0);else if(D){var Pe=m(D);if(typeof Pe=="function"&&Pe!==D.entries)for(var $e=Pe.call(D),ye;!(ye=$e.next()).done;)yf(ye.value)&&db(ye.value,J)}}}function BU(D){{var J=D.type;if(J==null||typeof J=="string")return;var ne;if(typeof J=="function")ne=J.propTypes;else if(typeof J=="object"&&(J.$$typeof===l||J.$$typeof===f))ne=J.propTypes;else return;if(ne){var ue=F(J);Fe(ne,D.props,"prop",ue,D)}else if(J.PropTypes!==void 0&&!vf){vf=!0;var Pe=F(J);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof J.getDefaultProps=="function"&&!J.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function FU(D){{for(var J=Object.keys(D.props),ne=0;ne<J.length;ne++){var ue=J[ne];if(ue!=="children"&&ue!=="key"){sa(D),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ue),sa(null);break}}D.ref!==null&&(sa(D),w("Invalid attribute `ref` supplied to `React.Fragment`."),sa(null))}}var hb={};function mb(D,J,ne,ue,Pe,$e){{var ye=k(D);if(!ye){var ve="";(D===void 0||typeof D=="object"&&D!==null&&Object.keys(D).length===0)&&(ve+=" 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=LU();ut?ve+=ut:ve+=ub();var He;D===null?He="null":ct(D)?He="array":D!==void 0&&D.$$typeof===t?(He="<"+(F(D.type)||"Unknown")+" />",ve=" Did you accidentally export a JSX literal instead of a component?"):He=typeof D,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",He,ve)}var Ye=IU(D,J,ne,Pe,$e);if(Ye==null)return Ye;if(ye){var Ct=J.children;if(Ct!==void 0)if(ue)if(ct(Ct)){for(var la=0;la<Ct.length;la++)pb(Ct[la],D);Object.freeze&&Object.freeze(Ct)}else w("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 pb(Ct,D)}if(re.call(J,"key")){var Qr=F(D),mt=Object.keys(J).filter(function(HU){return HU!=="key"}),bf=mt.length>0?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}";if(!hb[Qr+bf]){var GU=mt.length>0?"{"+mt.join(": ..., ")+": ...}":"{}";w(`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} />`,bf,Qr,zU,Qr),db[Qr+bf]=!0}}return N===n?RU(Ye):LU(Ye),Ye}}function BU(N,J,ne){return pb(N,J,ne,!0)}function FU(N,J,ne){return pb(N,J,ne,!1)}var UU=FU,WU=BU;ua.Fragment=n,ua.jsx=UU,ua.jsxs=WU}()),ua}process.env.NODE_ENV==="production"?zs.exports=mb():zs.exports=vb();var p=zs.exports;/**
30
+ <%s key={someKey} {...props} />`,bf,Qr,GU,Qr),hb[Qr+bf]=!0}}return D===n?FU(Ye):BU(Ye),Ye}}function UU(D,J,ne){return mb(D,J,ne,!0)}function WU(D,J,ne){return mb(D,J,ne,!1)}var zU=WU,VU=UU;ua.Fragment=n,ua.jsx=zU,ua.jsxs=VU}()),ua}process.env.NODE_ENV==="production"?zs.exports=vb():zs.exports=yb();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 gb={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 bb={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 yb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Pe=(e,t)=>{const r=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...c},u)=>S.createElement("svg",{ref:u,...gb,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${yb(e)}`,s].join(" "),...c},[...t.map(([f,d])=>S.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
40
+ */const xb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),we=(e,t)=>{const r=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...c},u)=>S.createElement("svg",{ref:u,...bb,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${xb(e)}`,s].join(" "),...c},[...t.map(([f,d])=>S.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.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const Of=Pe("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]);/**
45
+ */const Of=we("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]);/**
46
46
  * @license lucide-react v0.294.0 - ISC
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 bb=Pe("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 wb=we("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 xb=Pe("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 Ob=we("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.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const Sf=Pe("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
60
+ */const Sf=we("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
61
61
  * @license lucide-react v0.294.0 - ISC
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 wb=Pe("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
65
+ */const Sb=we("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
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 fr=Pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
70
+ */const fr=we("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
71
71
  * @license lucide-react v0.294.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const Ob=Pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
75
+ */const Tb=we("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
76
76
  * @license lucide-react v0.294.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const ki=Pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
80
+ */const ki=we("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
81
81
  * @license lucide-react v0.294.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const Tf=Pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
85
+ */const Tf=we("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
86
86
  * @license lucide-react v0.294.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const Af=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
90
+ */const Af=we("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
91
91
  * @license lucide-react v0.294.0 - ISC
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 fa=Pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
95
+ */const fa=we("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
96
96
  * @license lucide-react v0.294.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const Sb=Pe("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"}]]);/**
100
+ */const Ab=we("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"}]]);/**
101
101
  * @license lucide-react v0.294.0 - ISC
102
102
  *
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
- */const Tb=Pe("Expand",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]);/**
105
+ */const jb=we("Expand",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]);/**
106
106
  * @license lucide-react v0.294.0 - ISC
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 jf=Pe("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
110
+ */const jf=we("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
111
111
  * @license lucide-react v0.294.0 - ISC
112
112
  *
113
113
  * This source code is licensed under the ISC license.
114
114
  * See the LICENSE file in the root directory of this source tree.
115
- */const Vs=Pe("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
115
+ */const Vs=we("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
116
116
  * @license lucide-react v0.294.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */const Ab=Pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
120
+ */const Pb=we("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
121
121
  * @license lucide-react v0.294.0 - ISC
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 Pf=Pe("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
125
+ */const Pf=we("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
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 _f=Pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
130
+ */const _f=we("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
131
131
  * @license lucide-react v0.294.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const jb=Pe("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"}]]);/**
135
+ */const Ef=we("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
136
136
  * @license lucide-react v0.294.0 - ISC
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 Pb=Pe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
140
+ */const _b=we("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"}]]);/**
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 _b=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
145
+ */const Eb=we("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
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 Eb=Pe("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"}]]);/**
150
+ */const Cb=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 Ef=Pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
155
+ */const $b=we("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"}]]);/**
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 Cb=Pe("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"}]]);/**
160
+ */const Cf=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
161
161
  * @license lucide-react v0.294.0 - ISC
162
162
  *
163
163
  * This source code is licensed under the ISC license.
164
164
  * See the LICENSE file in the root directory of this source tree.
165
- */const $b=Pe("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"}]]);/**
165
+ */const kb=we("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"}]]);/**
166
166
  * @license lucide-react v0.294.0 - ISC
167
167
  *
168
168
  * This source code is licensed under the ISC license.
169
169
  * See the LICENSE file in the root directory of this source tree.
170
- */const kb=Pe("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"}]]);/**
170
+ */const Mb=we("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"}]]);/**
171
171
  * @license lucide-react v0.294.0 - ISC
172
172
  *
173
173
  * This source code is licensed under the ISC license.
174
174
  * See the LICENSE file in the root directory of this source tree.
175
- */const Mb=Pe("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"}]]);/**
175
+ */const Nb=we("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"}]]);/**
176
176
  * @license lucide-react v0.294.0 - ISC
177
177
  *
178
178
  * This source code is licensed under the ISC license.
179
179
  * See the LICENSE file in the root directory of this source tree.
180
- */const Gs=Pe("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
180
+ */const Db=we("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"}]]);/**
181
181
  * @license lucide-react v0.294.0 - ISC
182
182
  *
183
183
  * This source code is licensed under the ISC license.
184
184
  * See the LICENSE file in the root directory of this source tree.
185
- */const Cf=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function $f(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=$f(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ve(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=$f(e))&&(n&&(n+=" "),n+=t);return n}const Hs="-",Nb=e=>{const t=Ib(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Hs);return s[0]===""&&s.length!==1&&s.shift(),kf(s,t)||Db(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},kf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?kf(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Hs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Mf=/^\[(.+)\]$/,Db=e=>{if(Mf.test(e)){const t=Mf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ib=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Rb(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:Nf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Lb(a)){qs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{qs(o,Nf(t,i),r,n)})})},Nf=(e,t)=>{let r=e;return t.split(Hs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Lb=e=>e.isThemeGetter,Rb=(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,Bb=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)}}},Df="!",Fb=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 m=0;m<s.length;m++){let b=s[m];if(c===0){if(b===a&&(n||s.slice(m,m+i)===t)){l.push(s.slice(u,m)),u=m+i;continue}if(b==="/"){f=m;continue}}b==="["?c++:b==="]"&&c--}const d=l.length===0?s:s.substring(u),h=d.startsWith(Df),v=h?d.substring(1):d,g=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:o}):o},Ub=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},Wb=e=>({cache:Bb(e.cacheSize),parseClassName:Fb(e),...Nb(e)}),zb=/\s+/,Vb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(zb);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 v=!!h,g=n(v?d.substring(0,h):d);if(!g){if(!v){s=c+(s.length>0?" "+s:s);continue}if(g=n(d),!g){s=c+(s.length>0?" "+s:s);continue}v=!1}const m=Ub(u).join(":"),b=f?m+Df:m,O=b+g;if(i.includes(O))continue;i.push(O);const x=a(g,v);for(let j=0;j<x.length;++j){const y=x[j];i.push(b+y)}s=c+(s.length>0?" "+s:s)}return s};function Gb(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=If(t))&&(n&&(n+=" "),n+=r);return n}const If=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=If(e[n]))&&(r&&(r+=" "),r+=t);return r};function Hb(e,...t){let r,n,a,i=o;function o(l){const c=t.reduce((u,f)=>f(u),e());return r=Wb(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=Vb(l,r);return a(l,u),u}return function(){return i(Gb.apply(null,arguments))}}const De=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Lf=/^\[(?:([a-z-]+):)?(.+)\]$/i,qb=/^\d+\/\d+$/,Kb=new Set(["px","full","screen"]),Yb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xb=/\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$/,Zb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>tn(e)||Kb.has(e)||qb.test(e),dr=e=>rn(e,"length",sx),tn=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>rn(e,"number",tn),da=e=>!!e&&Number.isInteger(Number(e)),ex=e=>e.endsWith("%")&&tn(e.slice(0,-1)),he=e=>Lf.test(e),pr=e=>Yb.test(e),tx=new Set(["length","size","percentage"]),rx=e=>rn(e,tx,Rf),nx=e=>rn(e,"position",Rf),ax=new Set(["image","url"]),ix=e=>rn(e,ax,cx),ox=e=>rn(e,"",lx),pa=()=>!0,rn=(e,t,r)=>{const n=Lf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},sx=e=>Xb.test(e)&&!Zb.test(e),Rf=()=>!1,lx=e=>Jb.test(e),cx=e=>Qb.test(e),ux=Hb(()=>{const e=De("colors"),t=De("spacing"),r=De("blur"),n=De("brightness"),a=De("borderColor"),i=De("borderRadius"),o=De("borderSpacing"),s=De("borderWidth"),l=De("contrast"),c=De("grayscale"),u=De("hueRotate"),f=De("invert"),d=De("gap"),h=De("gradientColorStops"),v=De("gradientColorStopPositions"),g=De("inset"),m=De("margin"),b=De("opacity"),O=De("padding"),x=De("saturate"),j=De("scale"),y=De("sepia"),w=De("skew"),T=De("space"),A=De("translate"),_=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",he,t],E=()=>[he,t],I=()=>["",Xt,dr],k=()=>["auto",tn,he],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",he],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[tn,he];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Xt,dr],blur:["none","",pr,he],brightness:B(),borderColor:[e],borderRadius:["none","","full",pr,he],borderSpacing:E(),borderWidth:I(),contrast:B(),grayscale:q(),hueRotate:B(),invert:q(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[ex,dr],inset:P(),margin:P(),opacity:B(),padding:E(),saturate:B(),scale:B(),sepia:q(),skew:B(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[pr]}],"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:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],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:P()}],"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:q()}],shrink:[{shrink:q()}],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":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,he]},he]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"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",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"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:[pr]},pr]}],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",pr,dr]}],"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":[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:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,dr]}],"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:E()}],"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(),nx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ix]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"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:[...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":[b]}],"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,dr]}],"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,dr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pr,ox]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",pr,he]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],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":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"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:B()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[da,he]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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,dr,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 ux(ve(e))}const Bf=({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(Ab,{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(Mb,{className:"h-3 w-3"}):p.jsx(kb,{className:"h-3 w-3"}),p.jsx("span",{children:u(o.value)})]})]})]})};var fx=Array.isArray,ft=fx,dx=typeof $i=="object"&&$i&&$i.Object===Object&&$i,Ff=dx,px=Ff,hx=typeof self=="object"&&self&&self.Object===Object&&self,mx=px||hx||Function("return this")(),Ft=mx,vx=Ft,gx=vx.Symbol,ha=gx,Uf=ha,Wf=Object.prototype,yx=Wf.hasOwnProperty,bx=Wf.toString,ma=Uf?Uf.toStringTag:void 0;function xx(e){var t=yx.call(e,ma),r=e[ma];try{e[ma]=void 0;var n=!0}catch{}var a=bx.call(e);return n&&(t?e[ma]=r:delete e[ma]),a}var wx=xx,Ox=Object.prototype,Sx=Ox.toString;function Tx(e){return Sx.call(e)}var Ax=Tx,zf=ha,jx=wx,Px=Ax,_x="[object Null]",Ex="[object Undefined]",Vf=zf?zf.toStringTag:void 0;function Cx(e){return e==null?e===void 0?Ex:_x:Vf&&Vf in Object(e)?jx(e):Px(e)}var Zt=Cx;function $x(e){return e!=null&&typeof e=="object"}var Jt=$x,kx=Zt,Mx=Jt,Nx="[object Symbol]";function Dx(e){return typeof e=="symbol"||Mx(e)&&kx(e)==Nx}var nn=Dx,Ix=ft,Lx=nn,Rx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bx=/^\w*$/;function Fx(e,t){if(Ix(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Lx(e)?!0:Bx.test(e)||!Rx.test(e)||t!=null&&e in Object(t)}var Ys=Fx;function Ux(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hr=Ux;const an=ke(hr);var Wx=Zt,zx=hr,Vx="[object AsyncFunction]",Gx="[object Function]",Hx="[object GeneratorFunction]",qx="[object Proxy]";function Kx(e){if(!zx(e))return!1;var t=Wx(e);return t==Gx||t==Hx||t==Vx||t==qx}var Xs=Kx;const pe=ke(Xs);var Yx=Ft,Xx=Yx["__core-js_shared__"],Zx=Xx,Zs=Zx,Gf=function(){var e=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jx(e){return!!Gf&&Gf in e}var Qx=Jx,e1=Function.prototype,t1=e1.toString;function r1(e){if(e!=null){try{return t1.call(e)}catch{}try{return e+""}catch{}}return""}var Hf=r1,n1=Xs,a1=Qx,i1=hr,o1=Hf,s1=/[\\^$.*+?()[\]{}|]/g,l1=/^\[object .+?Constructor\]$/,c1=Function.prototype,u1=Object.prototype,f1=c1.toString,d1=u1.hasOwnProperty,p1=RegExp("^"+f1.call(d1).replace(s1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h1(e){if(!i1(e)||a1(e))return!1;var t=n1(e)?p1:l1;return t.test(o1(e))}var m1=h1;function v1(e,t){return e==null?void 0:e[t]}var g1=v1,y1=m1,b1=g1;function x1(e,t){var r=b1(e,t);return y1(r)?r:void 0}var Er=x1,w1=Er,O1=w1(Object,"create"),Mi=O1,qf=Mi;function S1(){this.__data__=qf?qf(null):{},this.size=0}var T1=S1;function A1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var j1=A1,P1=Mi,_1="__lodash_hash_undefined__",E1=Object.prototype,C1=E1.hasOwnProperty;function $1(e){var t=this.__data__;if(P1){var r=t[e];return r===_1?void 0:r}return C1.call(t,e)?t[e]:void 0}var k1=$1,M1=Mi,N1=Object.prototype,D1=N1.hasOwnProperty;function I1(e){var t=this.__data__;return M1?t[e]!==void 0:D1.call(t,e)}var L1=I1,R1=Mi,B1="__lodash_hash_undefined__";function F1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=R1&&t===void 0?B1:t,this}var U1=F1,W1=T1,z1=j1,V1=k1,G1=L1,H1=U1;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=W1,on.prototype.delete=z1,on.prototype.get=V1,on.prototype.has=G1,on.prototype.set=H1;var q1=on;function K1(){this.__data__=[],this.size=0}var Y1=K1;function X1(e,t){return e===t||e!==e&&t!==t}var Js=X1,Z1=Js;function J1(e,t){for(var r=e.length;r--;)if(Z1(e[r][0],t))return r;return-1}var Ni=J1,Q1=Ni,ew=Array.prototype,tw=ew.splice;function rw(e){var t=this.__data__,r=Q1(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():tw.call(t,r,1),--this.size,!0}var nw=rw,aw=Ni;function iw(e){var t=this.__data__,r=aw(t,e);return r<0?void 0:t[r][1]}var ow=iw,sw=Ni;function lw(e){return sw(this.__data__,e)>-1}var cw=lw,uw=Ni;function fw(e,t){var r=this.__data__,n=uw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var dw=fw,pw=Y1,hw=nw,mw=ow,vw=cw,gw=dw;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=pw,sn.prototype.delete=hw,sn.prototype.get=mw,sn.prototype.has=vw,sn.prototype.set=gw;var Di=sn,yw=Er,bw=Ft,xw=yw(bw,"Map"),Qs=xw,Kf=q1,ww=Di,Ow=Qs;function Sw(){this.size=0,this.__data__={hash:new Kf,map:new(Ow||ww),string:new Kf}}var Tw=Sw;function Aw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var jw=Aw,Pw=jw;function _w(e,t){var r=e.__data__;return Pw(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ii=_w,Ew=Ii;function Cw(e){var t=Ew(this,e).delete(e);return this.size-=t?1:0,t}var $w=Cw,kw=Ii;function Mw(e){return kw(this,e).get(e)}var Nw=Mw,Dw=Ii;function Iw(e){return Dw(this,e).has(e)}var Lw=Iw,Rw=Ii;function Bw(e,t){var r=Rw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Fw=Bw,Uw=Tw,Ww=$w,zw=Nw,Vw=Lw,Gw=Fw;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=Uw,ln.prototype.delete=Ww,ln.prototype.get=zw,ln.prototype.has=Vw,ln.prototype.set=Gw;var el=ln,Yf=el,Hw="Expected a function";function tl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Hw);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(tl.Cache||Yf),r}tl.Cache=Yf;var Xf=tl;const qw=ke(Xf);var Kw=Xf,Yw=500;function Xw(e){var t=Kw(e,function(n){return r.size===Yw&&r.clear(),n}),r=t.cache;return t}var Zw=Xw,Jw=Zw,Qw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e2=/\\(\\)?/g,t2=Jw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qw,function(r,n,a,i){t.push(a?i.replace(e2,"$1"):n||r)}),t}),r2=t2;function n2(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 rl=n2,Zf=ha,a2=rl,i2=ft,o2=nn,Jf=Zf?Zf.prototype:void 0,Qf=Jf?Jf.toString:void 0;function ed(e){if(typeof e=="string")return e;if(i2(e))return a2(e,ed)+"";if(o2(e))return Qf?Qf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var s2=ed,l2=s2;function c2(e){return e==null?"":l2(e)}var td=c2,u2=ft,f2=Ys,d2=r2,p2=td;function h2(e,t){return u2(e)?e:f2(e,t)?[e]:d2(p2(e))}var rd=h2,m2=nn;function v2(e){if(typeof e=="string"||m2(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Li=v2,g2=rd,y2=Li;function b2(e,t){t=g2(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[y2(t[r++])];return r&&r==n?e:void 0}var nl=b2,x2=nl;function w2(e,t,r){var n=e==null?void 0:x2(e,t);return n===void 0?r:n}var nd=w2;const wt=ke(nd);function O2(e){return e==null}var S2=O2;const fe=ke(S2);var T2=Zt,A2=ft,j2=Jt,P2="[object String]";function _2(e){return typeof e=="string"||!A2(e)&&j2(e)&&T2(e)==P2}var E2=_2;const Cr=ke(E2);var al={exports:{}},we={};/**
185
+ */const Gs=we("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
186
+ * @license lucide-react v0.294.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const $f=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function kf(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=kf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ge(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=kf(e))&&(n&&(n+=" "),n+=t);return n}const Hs="-",Ib=e=>{const t=Rb(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Hs);return s[0]===""&&s.length!==1&&s.shift(),Mf(s,t)||Lb(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Mf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Mf(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Hs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Nf=/^\[(.+)\]$/,Lb=e=>{if(Nf.test(e)){const t=Nf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Rb=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Fb(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:Df(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Bb(a)){qs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{qs(o,Df(t,i),r,n)})})},Df=(e,t)=>{let r=e;return t.split(Hs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Bb=e=>e.isThemeGetter,Fb=(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,Ub=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)}}},If="!",Wb=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 m=0;m<s.length;m++){let b=s[m];if(c===0){if(b===a&&(n||s.slice(m,m+i)===t)){l.push(s.slice(u,m)),u=m+i;continue}if(b==="/"){f=m;continue}}b==="["?c++:b==="]"&&c--}const d=l.length===0?s:s.substring(u),h=d.startsWith(If),g=h?d.substring(1):d,v=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},zb=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},Vb=e=>({cache:Ub(e.cacheSize),parseClassName:Wb(e),...Ib(e)}),Gb=/\s+/,Hb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(Gb);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 g=!!h,v=n(g?d.substring(0,h):d);if(!v){if(!g){s=c+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=c+(s.length>0?" "+s:s);continue}g=!1}const m=zb(u).join(":"),b=f?m+If:m,w=b+v;if(i.includes(w))continue;i.push(w);const x=a(v,g);for(let A=0;A<x.length;++A){const y=x[A];i.push(b+y)}s=c+(s.length>0?" "+s:s)}return s};function qb(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Lf(t))&&(n&&(n+=" "),n+=r);return n}const Lf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Lf(e[n]))&&(r&&(r+=" "),r+=t);return r};function Kb(e,...t){let r,n,a,i=o;function o(l){const c=t.reduce((u,f)=>f(u),e());return r=Vb(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=Hb(l,r);return a(l,u),u}return function(){return i(qb.apply(null,arguments))}}const De=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Rf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yb=/^\d+\/\d+$/,Xb=new Set(["px","full","screen"]),Zb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jb=/\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$/,Qb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>tn(e)||Xb.has(e)||Yb.test(e),dr=e=>rn(e,"length",cx),tn=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>rn(e,"number",tn),da=e=>!!e&&Number.isInteger(Number(e)),rx=e=>e.endsWith("%")&&tn(e.slice(0,-1)),he=e=>Rf.test(e),pr=e=>Zb.test(e),nx=new Set(["length","size","percentage"]),ax=e=>rn(e,nx,Bf),ix=e=>rn(e,"position",Bf),ox=new Set(["image","url"]),sx=e=>rn(e,ox,fx),lx=e=>rn(e,"",ux),pa=()=>!0,rn=(e,t,r)=>{const n=Rf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},cx=e=>Jb.test(e)&&!Qb.test(e),Bf=()=>!1,ux=e=>ex.test(e),fx=e=>tx.test(e),dx=Kb(()=>{const e=De("colors"),t=De("spacing"),r=De("blur"),n=De("brightness"),a=De("borderColor"),i=De("borderRadius"),o=De("borderSpacing"),s=De("borderWidth"),l=De("contrast"),c=De("grayscale"),u=De("hueRotate"),f=De("invert"),d=De("gap"),h=De("gradientColorStops"),g=De("gradientColorStopPositions"),v=De("inset"),m=De("margin"),b=De("opacity"),w=De("padding"),x=De("saturate"),A=De("scale"),y=De("sepia"),O=De("skew"),T=De("space"),j=De("translate"),C=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",he,t],E=()=>[he,t],F=()=>["",Xt,dr],N=()=>["auto",tn,he],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],Y=()=>["","0",he],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[tn,he];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Xt,dr],blur:["none","",pr,he],brightness:B(),borderColor:[e],borderRadius:["none","","full",pr,he],borderSpacing:E(),borderWidth:F(),contrast:B(),grayscale:Y(),hueRotate:B(),invert:Y(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[rx,dr],inset:P(),margin:P(),opacity:B(),padding:E(),saturate:B(),scale:B(),sepia:Y(),skew:B(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[pr]}],"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:[...L(),he]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",da,he]}],basis:[{basis:P()}],"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:Y()}],shrink:[{shrink:Y()}],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":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,he]},he]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"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",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"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:[pr]},pr]}],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",pr,dr]}],"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":[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:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,dr]}],"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:E()}],"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:[...L(),ix]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ax]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"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:[...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":[b]}],"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,dr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Xt,dr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pr,lx]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",pr,he]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],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":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"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:B()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:B()}],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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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,dr,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 dx(ge(e))}const Ff=({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(Pb,{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(Db,{className:"h-3 w-3"}):p.jsx(Nb,{className:"h-3 w-3"}),p.jsx("span",{children:u(o.value)})]})]})]})};var px=Array.isArray,ft=px,hx=typeof $i=="object"&&$i&&$i.Object===Object&&$i,Uf=hx,mx=Uf,gx=typeof self=="object"&&self&&self.Object===Object&&self,vx=mx||gx||Function("return this")(),Ft=vx,yx=Ft,bx=yx.Symbol,ha=bx,Wf=ha,zf=Object.prototype,xx=zf.hasOwnProperty,wx=zf.toString,ma=Wf?Wf.toStringTag:void 0;function Ox(e){var t=xx.call(e,ma),r=e[ma];try{e[ma]=void 0;var n=!0}catch{}var a=wx.call(e);return n&&(t?e[ma]=r:delete e[ma]),a}var Sx=Ox,Tx=Object.prototype,Ax=Tx.toString;function jx(e){return Ax.call(e)}var Px=jx,Vf=ha,_x=Sx,Ex=Px,Cx="[object Null]",$x="[object Undefined]",Gf=Vf?Vf.toStringTag:void 0;function kx(e){return e==null?e===void 0?$x:Cx:Gf&&Gf in Object(e)?_x(e):Ex(e)}var Zt=kx;function Mx(e){return e!=null&&typeof e=="object"}var Jt=Mx,Nx=Zt,Dx=Jt,Ix="[object Symbol]";function Lx(e){return typeof e=="symbol"||Dx(e)&&Nx(e)==Ix}var nn=Lx,Rx=ft,Bx=nn,Fx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ux=/^\w*$/;function Wx(e,t){if(Rx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Bx(e)?!0:Ux.test(e)||!Fx.test(e)||t!=null&&e in Object(t)}var Ys=Wx;function zx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hr=zx;const an=ke(hr);var Vx=Zt,Gx=hr,Hx="[object AsyncFunction]",qx="[object Function]",Kx="[object GeneratorFunction]",Yx="[object Proxy]";function Xx(e){if(!Gx(e))return!1;var t=Vx(e);return t==qx||t==Kx||t==Hx||t==Yx}var Xs=Xx;const pe=ke(Xs);var Zx=Ft,Jx=Zx["__core-js_shared__"],Qx=Jx,Zs=Qx,Hf=function(){var e=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function e1(e){return!!Hf&&Hf in e}var t1=e1,r1=Function.prototype,n1=r1.toString;function a1(e){if(e!=null){try{return n1.call(e)}catch{}try{return e+""}catch{}}return""}var qf=a1,i1=Xs,o1=t1,s1=hr,l1=qf,c1=/[\\^$.*+?()[\]{}|]/g,u1=/^\[object .+?Constructor\]$/,f1=Function.prototype,d1=Object.prototype,p1=f1.toString,h1=d1.hasOwnProperty,m1=RegExp("^"+p1.call(h1).replace(c1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g1(e){if(!s1(e)||o1(e))return!1;var t=i1(e)?m1:u1;return t.test(l1(e))}var v1=g1;function y1(e,t){return e==null?void 0:e[t]}var b1=y1,x1=v1,w1=b1;function O1(e,t){var r=w1(e,t);return x1(r)?r:void 0}var Er=O1,S1=Er,T1=S1(Object,"create"),Mi=T1,Kf=Mi;function A1(){this.__data__=Kf?Kf(null):{},this.size=0}var j1=A1;function P1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _1=P1,E1=Mi,C1="__lodash_hash_undefined__",$1=Object.prototype,k1=$1.hasOwnProperty;function M1(e){var t=this.__data__;if(E1){var r=t[e];return r===C1?void 0:r}return k1.call(t,e)?t[e]:void 0}var N1=M1,D1=Mi,I1=Object.prototype,L1=I1.hasOwnProperty;function R1(e){var t=this.__data__;return D1?t[e]!==void 0:L1.call(t,e)}var B1=R1,F1=Mi,U1="__lodash_hash_undefined__";function W1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=F1&&t===void 0?U1:t,this}var z1=W1,V1=j1,G1=_1,H1=N1,q1=B1,K1=z1;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=V1,on.prototype.delete=G1,on.prototype.get=H1,on.prototype.has=q1,on.prototype.set=K1;var Y1=on;function X1(){this.__data__=[],this.size=0}var Z1=X1;function J1(e,t){return e===t||e!==e&&t!==t}var Js=J1,Q1=Js;function ew(e,t){for(var r=e.length;r--;)if(Q1(e[r][0],t))return r;return-1}var Ni=ew,tw=Ni,rw=Array.prototype,nw=rw.splice;function aw(e){var t=this.__data__,r=tw(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():nw.call(t,r,1),--this.size,!0}var iw=aw,ow=Ni;function sw(e){var t=this.__data__,r=ow(t,e);return r<0?void 0:t[r][1]}var lw=sw,cw=Ni;function uw(e){return cw(this.__data__,e)>-1}var fw=uw,dw=Ni;function pw(e,t){var r=this.__data__,n=dw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var hw=pw,mw=Z1,gw=iw,vw=lw,yw=fw,bw=hw;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=mw,sn.prototype.delete=gw,sn.prototype.get=vw,sn.prototype.has=yw,sn.prototype.set=bw;var Di=sn,xw=Er,ww=Ft,Ow=xw(ww,"Map"),Qs=Ow,Yf=Y1,Sw=Di,Tw=Qs;function Aw(){this.size=0,this.__data__={hash:new Yf,map:new(Tw||Sw),string:new Yf}}var jw=Aw;function Pw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var _w=Pw,Ew=_w;function Cw(e,t){var r=e.__data__;return Ew(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ii=Cw,$w=Ii;function kw(e){var t=$w(this,e).delete(e);return this.size-=t?1:0,t}var Mw=kw,Nw=Ii;function Dw(e){return Nw(this,e).get(e)}var Iw=Dw,Lw=Ii;function Rw(e){return Lw(this,e).has(e)}var Bw=Rw,Fw=Ii;function Uw(e,t){var r=Fw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ww=Uw,zw=jw,Vw=Mw,Gw=Iw,Hw=Bw,qw=Ww;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=zw,ln.prototype.delete=Vw,ln.prototype.get=Gw,ln.prototype.has=Hw,ln.prototype.set=qw;var el=ln,Xf=el,Kw="Expected a function";function tl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Kw);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(tl.Cache||Xf),r}tl.Cache=Xf;var Zf=tl;const Yw=ke(Zf);var Xw=Zf,Zw=500;function Jw(e){var t=Xw(e,function(n){return r.size===Zw&&r.clear(),n}),r=t.cache;return t}var Qw=Jw,e2=Qw,t2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r2=/\\(\\)?/g,n2=e2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(t2,function(r,n,a,i){t.push(a?i.replace(r2,"$1"):n||r)}),t}),a2=n2;function i2(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 rl=i2,Jf=ha,o2=rl,s2=ft,l2=nn,Qf=Jf?Jf.prototype:void 0,ed=Qf?Qf.toString:void 0;function td(e){if(typeof e=="string")return e;if(s2(e))return o2(e,td)+"";if(l2(e))return ed?ed.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var c2=td,u2=c2;function f2(e){return e==null?"":u2(e)}var rd=f2,d2=ft,p2=Ys,h2=a2,m2=rd;function g2(e,t){return d2(e)?e:p2(e,t)?[e]:h2(m2(e))}var nd=g2,v2=nn;function y2(e){if(typeof e=="string"||v2(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Li=y2,b2=nd,x2=Li;function w2(e,t){t=b2(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[x2(t[r++])];return r&&r==n?e:void 0}var nl=w2,O2=nl;function S2(e,t,r){var n=e==null?void 0:O2(e,t);return n===void 0?r:n}var ad=S2;const wt=ke(ad);function T2(e){return e==null}var A2=T2;const fe=ke(A2);var j2=Zt,P2=ft,_2=Jt,E2="[object String]";function C2(e){return typeof e=="string"||!P2(e)&&_2(e)&&j2(e)==E2}var $2=C2;const Cr=ke($2);var al={exports:{}},Oe={};/**
186
191
  * @license React
187
192
  * react-is.production.min.js
188
193
  *
@@ -190,7 +195,7 @@ React keys must be passed directly to JSX without using spread:
190
195
  *
191
196
  * This source code is licensed under the MIT license found in the
192
197
  * LICENSE file in the root directory of this source tree.
193
- */var ad;function C2(){if(ad)return we;ad=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"),v;v=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case a:case n:case c:case u:return m;default:switch(m=m&&m.$$typeof,m){case s:case o:case l:case d:case f:case i:return m;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=c,we.SuspenseList=u,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(m){return g(m)===o},we.isContextProvider=function(m){return g(m)===i},we.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},we.isForwardRef=function(m){return g(m)===l},we.isFragment=function(m){return g(m)===r},we.isLazy=function(m){return g(m)===d},we.isMemo=function(m){return g(m)===f},we.isPortal=function(m){return g(m)===t},we.isProfiler=function(m){return g(m)===a},we.isStrictMode=function(m){return g(m)===n},we.isSuspense=function(m){return g(m)===c},we.isSuspenseList=function(m){return g(m)===u},we.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===c||m===u||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===f||m.$$typeof===i||m.$$typeof===o||m.$$typeof===l||m.$$typeof===v||m.getModuleId!==void 0)},we.typeOf=g,we}var Oe={};/**
198
+ */var id;function k2(){if(id)return Oe;id=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"),g;g=Symbol.for("react.module.reference");function v(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case a:case n:case c:case u:return m;default:switch(m=m&&m.$$typeof,m){case s:case o:case l:case d:case f:case i:return m;default:return b}}case t:return b}}}return Oe.ContextConsumer=o,Oe.ContextProvider=i,Oe.Element=e,Oe.ForwardRef=l,Oe.Fragment=r,Oe.Lazy=d,Oe.Memo=f,Oe.Portal=t,Oe.Profiler=a,Oe.StrictMode=n,Oe.Suspense=c,Oe.SuspenseList=u,Oe.isAsyncMode=function(){return!1},Oe.isConcurrentMode=function(){return!1},Oe.isContextConsumer=function(m){return v(m)===o},Oe.isContextProvider=function(m){return v(m)===i},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Oe.isForwardRef=function(m){return v(m)===l},Oe.isFragment=function(m){return v(m)===r},Oe.isLazy=function(m){return v(m)===d},Oe.isMemo=function(m){return v(m)===f},Oe.isPortal=function(m){return v(m)===t},Oe.isProfiler=function(m){return v(m)===a},Oe.isStrictMode=function(m){return v(m)===n},Oe.isSuspense=function(m){return v(m)===c},Oe.isSuspenseList=function(m){return v(m)===u},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===c||m===u||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===f||m.$$typeof===i||m.$$typeof===o||m.$$typeof===l||m.$$typeof===g||m.getModuleId!==void 0)},Oe.typeOf=v,Oe}var Se={};/**
194
199
  * @license React
195
200
  * react-is.development.js
196
201
  *
@@ -198,86 +203,86 @@ React keys must be passed directly to JSX without using spread:
198
203
  *
199
204
  * This source code is licensed under the MIT license found in the
200
205
  * LICENSE file in the root directory of this source tree.
201
- */var id;function $2(){return id||(id=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"),v=!1,g=!1,m=!1,b=!1,O=!1,x;x=Symbol.for("react.module.reference");function j(X){return!!(typeof X=="string"||typeof X=="function"||X===r||X===a||O||X===n||X===c||X===u||b||X===h||v||g||m||typeof X=="object"&&X!==null&&(X.$$typeof===d||X.$$typeof===f||X.$$typeof===i||X.$$typeof===o||X.$$typeof===l||X.$$typeof===x||X.getModuleId!==void 0))}function y(X){if(typeof X=="object"&&X!==null){var ce=X.$$typeof;switch(ce){case e:var re=X.type;switch(re){case r:case a:case n:case c:case u:return re;default:var me=re&&re.$$typeof;switch(me){case s:case o:case l:case d:case f:case i:return me;default:return ce}}case t:return ce}}}var w=o,T=i,A=e,_=l,C=r,P=d,E=f,I=t,k=a,D=n,M=c,F=u,z=!1,q=!1;function $(X){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(X){return q||(q=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(X){return y(X)===o}function W(X){return y(X)===i}function K(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function R(X){return y(X)===l}function G(X){return y(X)===r}function Y(X){return y(X)===d}function te(X){return y(X)===f}function V(X){return y(X)===t}function Z(X){return y(X)===a}function ee(X){return y(X)===n}function L(X){return y(X)===c}function oe(X){return y(X)===u}Oe.ContextConsumer=w,Oe.ContextProvider=T,Oe.Element=A,Oe.ForwardRef=_,Oe.Fragment=C,Oe.Lazy=P,Oe.Memo=E,Oe.Portal=I,Oe.Profiler=k,Oe.StrictMode=D,Oe.Suspense=M,Oe.SuspenseList=F,Oe.isAsyncMode=$,Oe.isConcurrentMode=B,Oe.isContextConsumer=U,Oe.isContextProvider=W,Oe.isElement=K,Oe.isForwardRef=R,Oe.isFragment=G,Oe.isLazy=Y,Oe.isMemo=te,Oe.isPortal=V,Oe.isProfiler=Z,Oe.isStrictMode=ee,Oe.isSuspense=L,Oe.isSuspenseList=oe,Oe.isValidElementType=j,Oe.typeOf=y}()),Oe}process.env.NODE_ENV==="production"?al.exports=C2():al.exports=$2();var k2=al.exports,M2=Zt,N2=Jt,D2="[object Number]";function I2(e){return typeof e=="number"||N2(e)&&M2(e)==D2}var od=I2;const L2=ke(od);var R2=od;function B2(e){return R2(e)&&e!=+e}var F2=B2;const cn=ke(F2);var $t=function(t){return t===0?0:t>0?1:-1},$r=function(t){return Cr(t)&&t.indexOf("%")===t.length-1},Q=function(t){return L2(t)&&!cn(t)},U2=function(t){return fe(t)},Xe=function(t){return Q(t)||Cr(t)},W2=0,kr=function(t){var r=++W2;return"".concat(t||"").concat(r)},Mr=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(!Q(t)&&!Cr(t))return n;var i;if($r(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},mr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},z2=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 Q(t)&&Q(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 V2=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}},G2=function(t,r){return Q(t)&&Q(r)?t-r:Cr(t)&&Cr(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 il(e){"@babel/helpers - typeof";return il=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},il(e)}var H2=["viewBox","children"],q2=["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"],sd=["points","pathLength"],ol={svg:H2,polygon:sd,polyline:sd},sl=["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(S.isValidElement(t)&&(n=t.props),!an(n))return null;var a={};return Object.keys(n).forEach(function(i){sl.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},K2=function(t,r,n){return function(a){return t(r,n,a),null}},va=function(t,r,n){if(!an(t)||il(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];sl.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=K2(o,r,n))}),a},Y2=["children"],X2=["children"];function ld(e,t){if(e==null)return{};var r=Z2(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 Z2(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 ll(e){"@babel/helpers - typeof";return ll=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},ll(e)}var cd={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,cl=null,ul=function e(t){if(t===ud&&Array.isArray(cl))return cl;var r=[];return S.Children.forEach(t,function(n){fe(n)||(k2.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),cl=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 vt(e,t){var r=dt(e,t);return r&&r[0]}var fd=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Q(n)||n<=0||!Q(a)||a<=0)},J2=["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"],Q2=function(t){return t&&t.type&&Cr(t.type)&&J2.indexOf(t.type)>=0},dd=function(t){return t&&ll(t)==="object"&&"clipDot"in t},eO=function(t,r,n,a){var i,o=(i=ol==null?void 0:ol[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!pe(t)&&(a&&o.includes(r)||q2.includes(r))||n&&sl.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!an(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;eO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},fl=function e(t,r){if(t===r)return!0;var n=S.Children.count(t);if(n!==S.Children.count(r))return!1;if(n===0)return!0;if(n===1)return pd(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(!pd(i,o))return!1}return!0},pd=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=ld(n,Y2),o=r.props||{},s=o.children,l=ld(o,X2);return a&&s?un(i,l)&&fl(a,s):!a&&!s?un(i,l):!1}return!1},hd=function(t,r){var n=[],a={};return ul(t).forEach(function(i,o){if(Q2(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},tO=function(t){var r=t&&t.type;return r&&cd[r]?cd[r]:null},rO=function(t,r){return ul(r).indexOf(t)},nO=["children","width","height","viewBox","className","style","title","desc"];function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dl.apply(this,arguments)}function aO(e,t){if(e==null)return{};var r=iO(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 iO(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 pl(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=aO(e,nO),u=a||{width:r,height:n,x:0,y:0},f=ve("recharts-surface",i);return S.createElement("svg",dl({},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)}),S.createElement("title",null,s),S.createElement("desc",null,l),t)}var oO=["children","className"];function hl(){return hl=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},hl.apply(this,arguments)}function sO(e,t){if(e==null)return{};var r=lO(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 lO(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=S.forwardRef(function(e,t){var r=e.children,n=e.className,a=sO(e,oO),i=ve("recharts-layer",n);return S.createElement("g",hl({className:i},de(a,!0),{ref:t}),r)}),cO=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(cO&&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 uO(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 fO=uO,dO=fO;function pO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:dO(e,t,r)}var hO=pO,mO="\\ud800-\\udfff",vO="\\u0300-\\u036f",gO="\\ufe20-\\ufe2f",yO="\\u20d0-\\u20ff",bO=vO+gO+yO,xO="\\ufe0e\\ufe0f",wO="\\u200d",OO=RegExp("["+wO+mO+bO+xO+"]");function SO(e){return OO.test(e)}var md=SO;function TO(e){return e.split("")}var AO=TO,vd="\\ud800-\\udfff",jO="\\u0300-\\u036f",PO="\\ufe20-\\ufe2f",_O="\\u20d0-\\u20ff",EO=jO+PO+_O,CO="\\ufe0e\\ufe0f",$O="["+vd+"]",ml="["+EO+"]",vl="\\ud83c[\\udffb-\\udfff]",kO="(?:"+ml+"|"+vl+")",gd="[^"+vd+"]",yd="(?:\\ud83c[\\udde6-\\uddff]){2}",bd="[\\ud800-\\udbff][\\udc00-\\udfff]",MO="\\u200d",xd=kO+"?",wd="["+CO+"]?",NO="(?:"+MO+"(?:"+[gd,yd,bd].join("|")+")"+wd+xd+")*",DO=wd+xd+NO,IO="(?:"+[gd+ml+"?",ml,yd,bd,$O].join("|")+")",LO=RegExp(vl+"(?="+vl+")|"+IO+DO,"g");function RO(e){return e.match(LO)||[]}var BO=RO,FO=AO,UO=md,WO=BO;function zO(e){return UO(e)?WO(e):FO(e)}var VO=zO,GO=hO,HO=md,qO=VO,KO=td;function YO(e){return function(t){t=KO(t);var r=HO(t)?qO(t):void 0,n=r?r[0]:t.charAt(0),a=r?GO(r,1).join(""):t.slice(1);return n[e]()+a}}var XO=YO,ZO=XO,JO=ZO("toUpperCase"),QO=JO;const Fi=ke(QO);function Me(e){return function(){return e}}const Od=Math.cos,Ui=Math.sin,kt=Math.sqrt,Wi=Math.PI,zi=2*Wi,gl=Math.PI,yl=2*gl,Nr=1e-6,eS=yl-Nr;function Sd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function tS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Sd;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 rS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Sd:tS(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>Nr)if(!(Math.abs(f*l-c*u)>Nr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,v=a-s,g=l*l+c*c,m=h*h+v*v,b=Math.sqrt(g),O=Math.sqrt(d),x=i*Math.tan((gl-Math.acos((g+d-m)/(2*b*O)))/2),j=x/O,y=x/b;Math.abs(j-1)>Nr&&this._append`L${t+j*u},${r+j*f}`,this._append`A${i},${i},0,0,${+(f*h>u*v)},${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)>Nr||Math.abs(this._y1-u)>Nr)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%yl+yl),d>eS?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>Nr&&this._append`A${n},${n},0,${+(d>=gl)},${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 bl(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 rS(t)}function xl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Td(e){this._context=e}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new Td(e)}function Ad(e){return e[0]}function jd(e){return e[1]}function Pd(e,t){var r=Me(!0),n=null,a=Vi,i=null,o=bl(s);e=typeof e=="function"?e:e===void 0?Ad:Me(e),t=typeof t=="function"?t:t===void 0?jd:Me(t);function s(l){var c,u=(l=xl(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:Me(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Me(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Me(!!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=Me(!0),i=null,o=Vi,s=null,l=bl(c);e=typeof e=="function"?e:e===void 0?Ad:Me(+e),t=typeof t=="function"?t:Me(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?jd:Me(+r);function c(f){var d,h,v,g=(f=xl(f)).length,m,b=!1,O,x=new Array(g),j=new Array(g);for(i==null&&(s=o(O=l())),d=0;d<=g;++d){if(!(d<g&&a(m=f[d],d,f))===b)if(b=!b)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=d-1;v>=h;--v)s.point(x[v],j[v]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(m,d,f),j[d]=+t(m,d,f),s.point(n?+n(m,d,f):x[d],r?+r(m,d,f):j[d]))}if(O)return s=null,O+""||null}function u(){return Pd().defined(a).curve(o).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Me(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Me(+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:Me(!!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 _d{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function nS(e){return new _d(e,!0)}function aS(e){return new _d(e,!1)}const wl={draw(e,t){const r=kt(t/Wi);e.moveTo(r,0),e.arc(0,0,r,0,zi)}},iS={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()}},Ed=kt(1/3),oS=Ed*2,sS={draw(e,t){const r=kt(t/oS),n=r*Ed;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},lS={draw(e,t){const r=kt(t),n=-r/2;e.rect(n,n,r,r)}},cS=.8908130915292852,Cd=Ui(Wi/10)/Ui(7*Wi/10),uS=Ui(zi/10)*Cd,fS=-Od(zi/10)*Cd,dS={draw(e,t){const r=kt(t*cS),n=uS*r,a=fS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zi*i/5,s=Od(o),l=Ui(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},Ol=kt(3),pS={draw(e,t){const r=-kt(t/(Ol*3));e.moveTo(0,r*2),e.lineTo(-Ol*r,-r),e.lineTo(Ol*r,-r),e.closePath()}},Ot=-.5,St=kt(3)/2,Sl=1/kt(12),hS=(Sl/2+1)*3,mS={draw(e,t){const r=kt(t/hS),n=r/2,a=r*Sl,i=n,o=r*Sl+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 vS(e,t){let r=null,n=bl(a);e=typeof e=="function"?e:Me(e||wl),t=typeof t=="function"?t:Me(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:Me(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Me(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Hi(){}function qi(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 $d(e){this._context=e}$d.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:qi(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:qi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gS(e){return new $d(e)}function kd(e){this._context=e}kd.prototype={areaStart:Hi,areaEnd:Hi,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:qi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yS(e){return new kd(e)}function Md(e){this._context=e}Md.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:qi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bS(e){return new Md(e)}function Nd(e){this._context=e}Nd.prototype={areaStart:Hi,areaEnd:Hi,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 xS(e){return new Nd(e)}function Dd(e){return e<0?-1:1}function Id(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(Dd(i)+Dd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Ld(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Tl(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:Tl(this,this._t0,Ld(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,Tl(this,Ld(this,r=Id(this,e,t)),r);break;default:Tl(this,this._t0,r=Id(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Rd(e){this._context=new Bd(e)}(Rd.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function Bd(e){this._context=e}Bd.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 wS(e){return new Ki(e)}function OS(e){return new Rd(e)}function Fd(e){this._context=e}Fd.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=Ud(e),a=Ud(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 Ud(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 SS(e){return new Fd(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 TS(e){return new Yi(e,.5)}function AS(e){return new Yi(e,0)}function jS(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 Al(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function PS(e,t){return e[t]}function _S(e){const t=[];return t.key=e,t}function ES(){var e=Me([]),t=Al,r=fn,n=PS;function a(i){var o=Array.from(e.apply(this,arguments),_S),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=xl(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:Me(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Me(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Al:typeof i=="function"?i:Me(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??fn,a):r},a}function CS(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 $S(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 kS(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,v=0;v<s;++v){var g=e[t[v]],m=g[n][1]||0,b=g[n-1][1]||0;h+=m-b}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 ga(e){"@babel/helpers - typeof";return ga=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},ga(e)}var MS=["type","size","sizeType"];function jl(){return jl=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},jl.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 zd(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){NS(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 NS(e,t,r){return t=DS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DS(e){var t=IS(e,"string");return ga(t)=="symbol"?t:t+""}function IS(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LS(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 Vd={symbolCircle:wl,symbolCross:iS,symbolDiamond:sS,symbolSquare:lS,symbolStar:dS,symbolTriangle:pS,symbolWye:mS},BS=Math.PI/180,FS=function(t){var r="symbol".concat(Fi(t));return Vd[r]||wl},US=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*BS;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}},WS=function(t,r){Vd["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=LS(t,MS),c=zd(zd({},l),{},{type:n,size:i,sizeType:s}),u=function(){var m=FS(n),b=vS().type(m).size(US(i,s,n));return b()},f=c.className,d=c.cx,h=c.cy,v=de(c,!0);return d===+d&&h===+h&&i===+i?S.createElement("path",jl({},v,{className:ve("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:u()})):null};Xi.registerSymbol=WS;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 Gd(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 zS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gd(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GS(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 HS(e,t,r){return t&&GS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qS(e,t,r){return t=Zi(t),KS(e,Hd()?Reflect.construct(t,r||[],Zi(e).constructor):t.apply(e,r))}function KS(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 YS(e)}function YS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hd=function(){return!!e})()}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zi(e)}function XS(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&&_l(e,t)}function _l(e,t){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_l(e,t)}function ya(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=ZS(e,"string");return dn(t)=="symbol"?t:t+""}function ZS(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,El=function(e){function t(){return VS(this,t),qS(this,t,arguments)}return XS(t,e),HS(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 S.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 S.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
206
+ */var od;function M2(){return od||(od=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"),g=!1,v=!1,m=!1,b=!1,w=!1,x;x=Symbol.for("react.module.reference");function A(X){return!!(typeof X=="string"||typeof X=="function"||X===r||X===a||w||X===n||X===c||X===u||b||X===h||g||v||m||typeof X=="object"&&X!==null&&(X.$$typeof===d||X.$$typeof===f||X.$$typeof===i||X.$$typeof===o||X.$$typeof===l||X.$$typeof===x||X.getModuleId!==void 0))}function y(X){if(typeof X=="object"&&X!==null){var ce=X.$$typeof;switch(ce){case e:var re=X.type;switch(re){case r:case a:case n:case c:case u:return re;default:var me=re&&re.$$typeof;switch(me){case s:case o:case l:case d:case f:case i:return me;default:return ce}}case t:return ce}}}var O=o,T=i,j=e,C=l,k=r,P=d,E=f,F=t,N=a,L=n,M=c,W=u,H=!1,Y=!1;function $(X){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(X){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function _(X){return y(X)===o}function U(X){return y(X)===i}function V(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function I(X){return y(X)===l}function z(X){return y(X)===r}function q(X){return y(X)===d}function Q(X){return y(X)===f}function G(X){return y(X)===t}function Z(X){return y(X)===a}function ee(X){return y(X)===n}function R(X){return y(X)===c}function oe(X){return y(X)===u}Se.ContextConsumer=O,Se.ContextProvider=T,Se.Element=j,Se.ForwardRef=C,Se.Fragment=k,Se.Lazy=P,Se.Memo=E,Se.Portal=F,Se.Profiler=N,Se.StrictMode=L,Se.Suspense=M,Se.SuspenseList=W,Se.isAsyncMode=$,Se.isConcurrentMode=B,Se.isContextConsumer=_,Se.isContextProvider=U,Se.isElement=V,Se.isForwardRef=I,Se.isFragment=z,Se.isLazy=q,Se.isMemo=Q,Se.isPortal=G,Se.isProfiler=Z,Se.isStrictMode=ee,Se.isSuspense=R,Se.isSuspenseList=oe,Se.isValidElementType=A,Se.typeOf=y}()),Se}process.env.NODE_ENV==="production"?al.exports=k2():al.exports=M2();var N2=al.exports,D2=Zt,I2=Jt,L2="[object Number]";function R2(e){return typeof e=="number"||I2(e)&&D2(e)==L2}var sd=R2;const B2=ke(sd);var F2=sd;function U2(e){return F2(e)&&e!=+e}var W2=U2;const cn=ke(W2);var kt=function(t){return t===0?0:t>0?1:-1},$r=function(t){return Cr(t)&&t.indexOf("%")===t.length-1},te=function(t){return B2(t)&&!cn(t)},z2=function(t){return fe(t)},Xe=function(t){return te(t)||Cr(t)},V2=0,kr=function(t){var r=++V2;return"".concat(t||"").concat(r)},Mr=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(!te(t)&&!Cr(t))return n;var i;if($r(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},mr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},G2=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 te(t)&&te(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 H2=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}},q2=function(t,r){return te(t)&&te(r)?t-r:Cr(t)&&Cr(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 il(e){"@babel/helpers - typeof";return il=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},il(e)}var K2=["viewBox","children"],Y2=["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"],ld=["points","pathLength"],ol={svg:K2,polygon:ld,polyline:ld},sl=["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(S.isValidElement(t)&&(n=t.props),!an(n))return null;var a={};return Object.keys(n).forEach(function(i){sl.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},X2=function(t,r,n){return function(a){return t(r,n,a),null}},ga=function(t,r,n){if(!an(t)||il(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];sl.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=X2(o,r,n))}),a},Z2=["children"],J2=["children"];function cd(e,t){if(e==null)return{};var r=Q2(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 Q2(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 ll(e){"@babel/helpers - typeof";return ll=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},ll(e)}var ud={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":""},fd=null,cl=null,ul=function e(t){if(t===fd&&Array.isArray(cl))return cl;var r=[];return S.Children.forEach(t,function(n){fe(n)||(N2.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),cl=r,fd=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 gt(e,t){var r=dt(e,t);return r&&r[0]}var dd=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!te(n)||n<=0||!te(a)||a<=0)},eO=["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"],tO=function(t){return t&&t.type&&Cr(t.type)&&eO.indexOf(t.type)>=0},pd=function(t){return t&&ll(t)==="object"&&"clipDot"in t},rO=function(t,r,n,a){var i,o=(i=ol==null?void 0:ol[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!pe(t)&&(a&&o.includes(r)||Y2.includes(r))||n&&sl.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!an(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;rO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},fl=function e(t,r){if(t===r)return!0;var n=S.Children.count(t);if(n!==S.Children.count(r))return!1;if(n===0)return!0;if(n===1)return hd(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(!hd(i,o))return!1}return!0},hd=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=cd(n,Z2),o=r.props||{},s=o.children,l=cd(o,J2);return a&&s?un(i,l)&&fl(a,s):!a&&!s?un(i,l):!1}return!1},md=function(t,r){var n=[],a={};return ul(t).forEach(function(i,o){if(tO(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},nO=function(t){var r=t&&t.type;return r&&ud[r]?ud[r]:null},aO=function(t,r){return ul(r).indexOf(t)},iO=["children","width","height","viewBox","className","style","title","desc"];function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dl.apply(this,arguments)}function oO(e,t){if(e==null)return{};var r=sO(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 sO(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 pl(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=oO(e,iO),u=a||{width:r,height:n,x:0,y:0},f=ge("recharts-surface",i);return S.createElement("svg",dl({},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)}),S.createElement("title",null,s),S.createElement("desc",null,l),t)}var lO=["children","className"];function hl(){return hl=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},hl.apply(this,arguments)}function cO(e,t){if(e==null)return{};var r=uO(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 uO(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=S.forwardRef(function(e,t){var r=e.children,n=e.className,a=cO(e,lO),i=ge("recharts-layer",n);return S.createElement("g",hl({className:i},de(a,!0),{ref:t}),r)}),fO=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(fO&&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 dO(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 pO=dO,hO=pO;function mO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:hO(e,t,r)}var gO=mO,vO="\\ud800-\\udfff",yO="\\u0300-\\u036f",bO="\\ufe20-\\ufe2f",xO="\\u20d0-\\u20ff",wO=yO+bO+xO,OO="\\ufe0e\\ufe0f",SO="\\u200d",TO=RegExp("["+SO+vO+wO+OO+"]");function AO(e){return TO.test(e)}var gd=AO;function jO(e){return e.split("")}var PO=jO,vd="\\ud800-\\udfff",_O="\\u0300-\\u036f",EO="\\ufe20-\\ufe2f",CO="\\u20d0-\\u20ff",$O=_O+EO+CO,kO="\\ufe0e\\ufe0f",MO="["+vd+"]",ml="["+$O+"]",gl="\\ud83c[\\udffb-\\udfff]",NO="(?:"+ml+"|"+gl+")",yd="[^"+vd+"]",bd="(?:\\ud83c[\\udde6-\\uddff]){2}",xd="[\\ud800-\\udbff][\\udc00-\\udfff]",DO="\\u200d",wd=NO+"?",Od="["+kO+"]?",IO="(?:"+DO+"(?:"+[yd,bd,xd].join("|")+")"+Od+wd+")*",LO=Od+wd+IO,RO="(?:"+[yd+ml+"?",ml,bd,xd,MO].join("|")+")",BO=RegExp(gl+"(?="+gl+")|"+RO+LO,"g");function FO(e){return e.match(BO)||[]}var UO=FO,WO=PO,zO=gd,VO=UO;function GO(e){return zO(e)?VO(e):WO(e)}var HO=GO,qO=gO,KO=gd,YO=HO,XO=rd;function ZO(e){return function(t){t=XO(t);var r=KO(t)?YO(t):void 0,n=r?r[0]:t.charAt(0),a=r?qO(r,1).join(""):t.slice(1);return n[e]()+a}}var JO=ZO,QO=JO,eS=QO("toUpperCase"),tS=eS;const Fi=ke(tS);function Me(e){return function(){return e}}const Sd=Math.cos,Ui=Math.sin,Mt=Math.sqrt,Wi=Math.PI,zi=2*Wi,vl=Math.PI,yl=2*vl,Nr=1e-6,rS=yl-Nr;function Td(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function nS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Td;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 aS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Td:nS(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>Nr)if(!(Math.abs(f*l-c*u)>Nr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,g=a-s,v=l*l+c*c,m=h*h+g*g,b=Math.sqrt(v),w=Math.sqrt(d),x=i*Math.tan((vl-Math.acos((v+d-m)/(2*b*w)))/2),A=x/w,y=x/b;Math.abs(A-1)>Nr&&this._append`L${t+A*u},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*h>u*g)},${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)>Nr||Math.abs(this._y1-u)>Nr)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%yl+yl),d>rS?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>Nr&&this._append`A${n},${n},0,${+(d>=vl)},${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 bl(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 aS(t)}function xl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ad(e){this._context=e}Ad.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 Ad(e)}function jd(e){return e[0]}function Pd(e){return e[1]}function _d(e,t){var r=Me(!0),n=null,a=Vi,i=null,o=bl(s);e=typeof e=="function"?e:e===void 0?jd:Me(e),t=typeof t=="function"?t:t===void 0?Pd:Me(t);function s(l){var c,u=(l=xl(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:Me(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Me(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Me(!!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=Me(!0),i=null,o=Vi,s=null,l=bl(c);e=typeof e=="function"?e:e===void 0?jd:Me(+e),t=typeof t=="function"?t:Me(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Pd:Me(+r);function c(f){var d,h,g,v=(f=xl(f)).length,m,b=!1,w,x=new Array(v),A=new Array(v);for(i==null&&(s=o(w=l())),d=0;d<=v;++d){if(!(d<v&&a(m=f[d],d,f))===b)if(b=!b)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=d-1;g>=h;--g)s.point(x[g],A[g]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(m,d,f),A[d]=+t(m,d,f),s.point(n?+n(m,d,f):x[d],r?+r(m,d,f):A[d]))}if(w)return s=null,w+""||null}function u(){return _d().defined(a).curve(o).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Me(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Me(+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:Me(!!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 Ed{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 iS(e){return new Ed(e,!0)}function oS(e){return new Ed(e,!1)}const wl={draw(e,t){const r=Mt(t/Wi);e.moveTo(r,0),e.arc(0,0,r,0,zi)}},sS={draw(e,t){const r=Mt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Cd=Mt(1/3),lS=Cd*2,cS={draw(e,t){const r=Mt(t/lS),n=r*Cd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},uS={draw(e,t){const r=Mt(t),n=-r/2;e.rect(n,n,r,r)}},fS=.8908130915292852,$d=Ui(Wi/10)/Ui(7*Wi/10),dS=Ui(zi/10)*$d,pS=-Sd(zi/10)*$d,hS={draw(e,t){const r=Mt(t*fS),n=dS*r,a=pS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zi*i/5,s=Sd(o),l=Ui(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},Ol=Mt(3),mS={draw(e,t){const r=-Mt(t/(Ol*3));e.moveTo(0,r*2),e.lineTo(-Ol*r,-r),e.lineTo(Ol*r,-r),e.closePath()}},Ot=-.5,St=Mt(3)/2,Sl=1/Mt(12),gS=(Sl/2+1)*3,vS={draw(e,t){const r=Mt(t/gS),n=r/2,a=r*Sl,i=n,o=r*Sl+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 yS(e,t){let r=null,n=bl(a);e=typeof e=="function"?e:Me(e||wl),t=typeof t=="function"?t:Me(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:Me(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Me(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Hi(){}function qi(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 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(){switch(this._point){case 3:qi(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:qi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bS(e){return new kd(e)}function Md(e){this._context=e}Md.prototype={areaStart:Hi,areaEnd:Hi,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:qi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xS(e){return new Md(e)}function Nd(e){this._context=e}Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:qi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wS(e){return new Nd(e)}function Dd(e){this._context=e}Dd.prototype={areaStart:Hi,areaEnd:Hi,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 OS(e){return new Dd(e)}function Id(e){return e<0?-1:1}function Ld(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(Id(i)+Id(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Rd(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Tl(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:Tl(this,this._t0,Rd(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,Tl(this,Rd(this,r=Ld(this,e,t)),r);break;default:Tl(this,this._t0,r=Ld(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Bd(e){this._context=new Fd(e)}(Bd.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function Fd(e){this._context=e}Fd.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 SS(e){return new Ki(e)}function TS(e){return new Bd(e)}function Ud(e){this._context=e}Ud.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=Wd(e),a=Wd(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 Wd(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 AS(e){return new Ud(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 jS(e){return new Yi(e,.5)}function PS(e){return new Yi(e,0)}function _S(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 Al(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function ES(e,t){return e[t]}function CS(e){const t=[];return t.key=e,t}function $S(){var e=Me([]),t=Al,r=fn,n=ES;function a(i){var o=Array.from(e.apply(this,arguments),CS),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=xl(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:Me(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Me(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Al:typeof i=="function"?i:Me(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??fn,a):r},a}function kS(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 MS(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 NS(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,g=0;g<s;++g){var v=e[t[g]],m=v[n][1]||0,b=v[n-1][1]||0;h+=m-b}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 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)}var DS=["type","size","sizeType"];function jl(){return jl=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},jl.apply(this,arguments)}function zd(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 Vd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(r),!0).forEach(function(n){IS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IS(e,t,r){return t=LS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LS(e){var t=RS(e,"string");return va(t)=="symbol"?t:t+""}function RS(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 BS(e,t){if(e==null)return{};var r=FS(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 FS(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 Gd={symbolCircle:wl,symbolCross:sS,symbolDiamond:cS,symbolSquare:uS,symbolStar:hS,symbolTriangle:mS,symbolWye:vS},US=Math.PI/180,WS=function(t){var r="symbol".concat(Fi(t));return Gd[r]||wl},zS=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*US;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}},VS=function(t,r){Gd["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=BS(t,DS),c=Vd(Vd({},l),{},{type:n,size:i,sizeType:s}),u=function(){var m=WS(n),b=yS().type(m).size(zS(i,s,n));return b()},f=c.className,d=c.cx,h=c.cy,g=de(c,!0);return d===+d&&h===+h&&i===+i?S.createElement("path",jl({},g,{className:ge("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:u()})):null};Xi.registerSymbol=VS;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 Hd(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 GS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qS(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,Kd(n.key),n)}}function KS(e,t,r){return t&&qS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YS(e,t,r){return t=Zi(t),XS(e,qd()?Reflect.construct(t,r||[],Zi(e).constructor):t.apply(e,r))}function XS(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 ZS(e)}function ZS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qd=function(){return!!e})()}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zi(e)}function JS(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&&_l(e,t)}function _l(e,t){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_l(e,t)}function ya(e,t,r){return t=Kd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kd(e){var t=QS(e,"string");return dn(t)=="symbol"?t:t+""}function QS(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,El=function(e){function t(){return HS(this,t),YS(this,t,arguments)}return JS(t,e),KS(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 S.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 S.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
202
207
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
203
208
  H`).concat(Tt,"M").concat(2*s,",").concat(i,`
204
- A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return S.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(S.isValidElement(n.legendIcon)){var c=zS({},n);return delete c.legendIcon,S.cloneElement(n.legendIcon,c)}return S.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,v){var g=h.formatter||l,m=ve(ya(ya({"recharts-legend-item":!0},"legend-item-".concat(v),!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 O=h.inactive?c:h.color;return S.createElement("li",Pl({className:m,style:f,key:"legend-item-".concat(v)},va(n.props,h,v)),S.createElement(pl,{width:o,height:o,viewBox:u,style:d},n.renderIcon(h)),S.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},g?g(b,h,v):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 S.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(S.PureComponent);ya(El,"displayName","Legend"),ya(El,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var JS=Di;function QS(){this.__data__=new JS,this.size=0}var eT=QS;function tT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var rT=tT;function nT(e){return this.__data__.get(e)}var aT=nT;function iT(e){return this.__data__.has(e)}var oT=iT,sT=Di,lT=Qs,cT=el,uT=200;function fT(e,t){var r=this.__data__;if(r instanceof sT){var n=r.__data__;if(!lT||n.length<uT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cT(n)}return r.set(e,t),this.size=r.size,this}var dT=fT,pT=Di,hT=eT,mT=rT,vT=aT,gT=oT,yT=dT;function pn(e){var t=this.__data__=new pT(e);this.size=t.size}pn.prototype.clear=hT,pn.prototype.delete=mT,pn.prototype.get=vT,pn.prototype.has=gT,pn.prototype.set=yT;var Kd=pn,bT="__lodash_hash_undefined__";function xT(e){return this.__data__.set(e,bT),this}var wT=xT;function OT(e){return this.__data__.has(e)}var ST=OT,TT=el,AT=wT,jT=ST;function Ji(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new TT;++t<r;)this.add(e[t])}Ji.prototype.add=Ji.prototype.push=AT,Ji.prototype.has=jT;var Yd=Ji;function PT(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 Xd=PT;function _T(e,t){return e.has(t)}var Zd=_T,ET=Yd,CT=Xd,$T=Zd,kT=1,MT=2;function NT(e,t,r,n,a,i){var o=r&kT,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&MT?new ET:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],g=t[f];if(n)var m=o?n(g,v,f,t,e,i):n(v,g,f,e,t,i);if(m!==void 0){if(m)continue;d=!1;break}if(h){if(!CT(t,function(b,O){if(!$T(h,O)&&(v===b||a(v,b,r,n,i)))return h.push(O)})){d=!1;break}}else if(!(v===g||a(v,g,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Jd=NT,DT=Ft,IT=DT.Uint8Array,LT=IT;function RT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var BT=RT;function FT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Cl=FT,Qd=ha,ep=LT,UT=Js,WT=Jd,zT=BT,VT=Cl,GT=1,HT=2,qT="[object Boolean]",KT="[object Date]",YT="[object Error]",XT="[object Map]",ZT="[object Number]",JT="[object RegExp]",QT="[object Set]",eA="[object String]",tA="[object Symbol]",rA="[object ArrayBuffer]",nA="[object DataView]",tp=Qd?Qd.prototype:void 0,$l=tp?tp.valueOf:void 0;function aA(e,t,r,n,a,i,o){switch(r){case nA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rA:return!(e.byteLength!=t.byteLength||!i(new ep(e),new ep(t)));case qT:case KT:case ZT:return UT(+e,+t);case YT:return e.name==t.name&&e.message==t.message;case JT:case eA:return e==t+"";case XT:var s=zT;case QT:var l=n&GT;if(s||(s=VT),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=HT,o.set(e,t);var u=WT(s(e),s(t),n,a,i,o);return o.delete(e),u;case tA:if($l)return $l.call(e)==$l.call(t)}return!1}var iA=aA;function oA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var rp=oA,sA=rp,lA=ft;function cA(e,t,r){var n=t(e);return lA(e)?n:sA(n,r(e))}var uA=cA;function fA(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 dA=fA;function pA(){return[]}var hA=pA,mA=dA,vA=hA,gA=Object.prototype,yA=gA.propertyIsEnumerable,np=Object.getOwnPropertySymbols,bA=np?function(e){return e==null?[]:(e=Object(e),mA(np(e),function(t){return yA.call(e,t)}))}:vA,xA=bA;function wA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var OA=wA,SA=Zt,TA=Jt,AA="[object Arguments]";function jA(e){return TA(e)&&SA(e)==AA}var PA=jA,ap=PA,_A=Jt,ip=Object.prototype,EA=ip.hasOwnProperty,CA=ip.propertyIsEnumerable,$A=ap(function(){return arguments}())?ap:function(e){return _A(e)&&EA.call(e,"callee")&&!CA.call(e,"callee")},kl=$A,Qi={exports:{}};function kA(){return!1}var MA=kA;Qi.exports,function(e,t){var r=Ft,n=MA,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 op=Qi.exports,NA=9007199254740991,DA=/^(?:0|[1-9]\d*)$/;function IA(e,t){var r=typeof e;return t=t??NA,!!t&&(r=="number"||r!="symbol"&&DA.test(e))&&e>-1&&e%1==0&&e<t}var Ml=IA,LA=9007199254740991;function RA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LA}var Nl=RA,BA=Zt,FA=Nl,UA=Jt,WA="[object Arguments]",zA="[object Array]",VA="[object Boolean]",GA="[object Date]",HA="[object Error]",qA="[object Function]",KA="[object Map]",YA="[object Number]",XA="[object Object]",ZA="[object RegExp]",JA="[object Set]",QA="[object String]",ej="[object WeakMap]",tj="[object ArrayBuffer]",rj="[object DataView]",nj="[object Float32Array]",aj="[object Float64Array]",ij="[object Int8Array]",oj="[object Int16Array]",sj="[object Int32Array]",lj="[object Uint8Array]",cj="[object Uint8ClampedArray]",uj="[object Uint16Array]",fj="[object Uint32Array]",Ie={};Ie[nj]=Ie[aj]=Ie[ij]=Ie[oj]=Ie[sj]=Ie[lj]=Ie[cj]=Ie[uj]=Ie[fj]=!0,Ie[WA]=Ie[zA]=Ie[tj]=Ie[VA]=Ie[rj]=Ie[GA]=Ie[HA]=Ie[qA]=Ie[KA]=Ie[YA]=Ie[XA]=Ie[ZA]=Ie[JA]=Ie[QA]=Ie[ej]=!1;function dj(e){return UA(e)&&FA(e.length)&&!!Ie[BA(e)]}var pj=dj;function hj(e){return function(t){return e(t)}}var sp=hj,eo={exports:{}};eo.exports,function(e,t){var r=Ff,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 mj=eo.exports,vj=pj,gj=sp,lp=mj,cp=lp&&lp.isTypedArray,yj=cp?gj(cp):vj,up=yj,bj=OA,xj=kl,wj=ft,Oj=op,Sj=Ml,Tj=up,Aj=Object.prototype,jj=Aj.hasOwnProperty;function Pj(e,t){var r=wj(e),n=!r&&xj(e),a=!r&&!n&&Oj(e),i=!r&&!n&&!a&&Tj(e),o=r||n||a||i,s=o?bj(e.length,String):[],l=s.length;for(var c in e)(t||jj.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Sj(c,l)))&&s.push(c);return s}var _j=Pj,Ej=Object.prototype;function Cj(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ej;return e===r}var $j=Cj;function kj(e,t){return function(r){return e(t(r))}}var fp=kj,Mj=fp,Nj=Mj(Object.keys,Object),Dj=Nj,Ij=$j,Lj=Dj,Rj=Object.prototype,Bj=Rj.hasOwnProperty;function Fj(e){if(!Ij(e))return Lj(e);var t=[];for(var r in Object(e))Bj.call(e,r)&&r!="constructor"&&t.push(r);return t}var Uj=Fj,Wj=Xs,zj=Nl;function Vj(e){return e!=null&&zj(e.length)&&!Wj(e)}var ba=Vj,Gj=_j,Hj=Uj,qj=ba;function Kj(e){return qj(e)?Gj(e):Hj(e)}var to=Kj,Yj=uA,Xj=xA,Zj=to;function Jj(e){return Yj(e,Zj,Xj)}var Qj=Jj,dp=Qj,eP=1,tP=Object.prototype,rP=tP.hasOwnProperty;function nP(e,t,r,n,a,i){var o=r&eP,s=dp(e),l=s.length,c=dp(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:rP.call(t,d)))return!1}var h=i.get(e),v=i.get(t);if(h&&v)return h==t&&v==e;var g=!0;i.set(e,t),i.set(t,e);for(var m=o;++f<l;){d=s[f];var b=e[d],O=t[d];if(n)var x=o?n(O,b,d,t,e,i):n(b,O,d,e,t,i);if(!(x===void 0?b===O||a(b,O,r,n,i):x)){g=!1;break}m||(m=d=="constructor")}if(g&&!m){var j=e.constructor,y=t.constructor;j!=y&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof y=="function"&&y instanceof y)&&(g=!1)}return i.delete(e),i.delete(t),g}var aP=nP,iP=Er,oP=Ft,sP=iP(oP,"DataView"),lP=sP,cP=Er,uP=Ft,fP=cP(uP,"Promise"),dP=fP,pP=Er,hP=Ft,mP=pP(hP,"Set"),pp=mP,vP=Er,gP=Ft,yP=vP(gP,"WeakMap"),bP=yP,Dl=lP,Il=Qs,Ll=dP,Rl=pp,Bl=bP,hp=Zt,hn=Hf,mp="[object Map]",xP="[object Object]",vp="[object Promise]",gp="[object Set]",yp="[object WeakMap]",bp="[object DataView]",wP=hn(Dl),OP=hn(Il),SP=hn(Ll),TP=hn(Rl),AP=hn(Bl),Dr=hp;(Dl&&Dr(new Dl(new ArrayBuffer(1)))!=bp||Il&&Dr(new Il)!=mp||Ll&&Dr(Ll.resolve())!=vp||Rl&&Dr(new Rl)!=gp||Bl&&Dr(new Bl)!=yp)&&(Dr=function(e){var t=hp(e),r=t==xP?e.constructor:void 0,n=r?hn(r):"";if(n)switch(n){case wP:return bp;case OP:return mp;case SP:return vp;case TP:return gp;case AP:return yp}return t});var jP=Dr,Fl=Kd,PP=Jd,_P=iA,EP=aP,xp=jP,wp=ft,Op=op,CP=up,$P=1,Sp="[object Arguments]",Tp="[object Array]",ro="[object Object]",kP=Object.prototype,Ap=kP.hasOwnProperty;function MP(e,t,r,n,a,i){var o=wp(e),s=wp(t),l=o?Tp:xp(e),c=s?Tp:xp(t);l=l==Sp?ro:l,c=c==Sp?ro:c;var u=l==ro,f=c==ro,d=l==c;if(d&&Op(e)){if(!Op(t))return!1;o=!0,u=!1}if(d&&!u)return i||(i=new Fl),o||CP(e)?PP(e,t,r,n,a,i):_P(e,t,l,r,n,a,i);if(!(r&$P)){var h=u&&Ap.call(e,"__wrapped__"),v=f&&Ap.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;return i||(i=new Fl),a(g,m,r,n,i)}}return d?(i||(i=new Fl),EP(e,t,r,n,a,i)):!1}var NP=MP,DP=NP,jp=Jt;function Pp(e,t,r,n,a){return e===t?!0:e==null||t==null||!jp(e)&&!jp(t)?e!==e&&t!==t:DP(e,t,r,n,Pp,a)}var Ul=Pp,IP=Kd,LP=Ul,RP=1,BP=2;function FP(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 IP;if(n)var d=n(c,u,l,e,t,f);if(!(d===void 0?LP(u,c,RP|BP,n,f):d))return!1}}return!0}var UP=FP,WP=hr;function zP(e){return e===e&&!WP(e)}var _p=zP,VP=_p,GP=to;function HP(e){for(var t=GP(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,VP(a)]}return t}var qP=HP;function KP(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Ep=KP,YP=UP,XP=qP,ZP=Ep;function JP(e){var t=XP(e);return t.length==1&&t[0][2]?ZP(t[0][0],t[0][1]):function(r){return r===e||YP(r,e,t)}}var QP=JP;function e_(e,t){return e!=null&&t in Object(e)}var t_=e_,r_=rd,n_=kl,a_=ft,i_=Ml,o_=Nl,s_=Li;function l_(e,t,r){t=r_(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=s_(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&&o_(a)&&i_(o,a)&&(a_(e)||n_(e)))}var c_=l_,u_=t_,f_=c_;function d_(e,t){return e!=null&&f_(e,t,u_)}var p_=d_,h_=Ul,m_=nd,v_=p_,g_=Ys,y_=_p,b_=Ep,x_=Li,w_=1,O_=2;function S_(e,t){return g_(e)&&y_(t)?b_(x_(e),t):function(r){var n=m_(r,e);return n===void 0&&n===t?v_(r,e):h_(t,n,w_|O_)}}var T_=S_;function A_(e){return e}var mn=A_;function j_(e){return function(t){return t==null?void 0:t[e]}}var P_=j_,__=nl;function E_(e){return function(t){return __(t,e)}}var C_=E_,$_=P_,k_=C_,M_=Ys,N_=Li;function D_(e){return M_(e)?$_(N_(e)):k_(e)}var I_=D_,L_=QP,R_=T_,B_=mn,F_=ft,U_=I_;function W_(e){return typeof e=="function"?e:e==null?B_:typeof e=="object"?F_(e)?R_(e[0],e[1]):L_(e):U_(e)}var vr=W_;function z_(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 Cp=z_;function V_(e){return e!==e}var G_=V_;function H_(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var q_=H_,K_=Cp,Y_=G_,X_=q_;function Z_(e,t,r){return t===t?X_(e,t,r):K_(e,Y_,r)}var J_=Z_,Q_=J_;function eE(e,t){var r=e==null?0:e.length;return!!r&&Q_(e,t,0)>-1}var tE=eE;function rE(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 nE=rE;function aE(){}var iE=aE,Wl=pp,oE=iE,sE=Cl,lE=1/0,cE=Wl&&1/sE(new Wl([,-0]))[1]==lE?function(e){return new Wl(e)}:oE,uE=cE,fE=Yd,dE=tE,pE=nE,hE=Zd,mE=uE,vE=Cl,gE=200;function yE(e,t,r){var n=-1,a=dE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=pE;else if(i>=gE){var c=t?null:mE(e);if(c)return vE(c);o=!1,a=hE,l=new fE}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 bE=yE,xE=vr,wE=bE;function OE(e,t){return e&&e.length?wE(e,xE(t)):[]}var SE=OE;const $p=ke(SE);function kp(e,t,r){return t===!0?$p(e,r):pe(t)?$p(e,t):e}function vn(e){"@babel/helpers - typeof";return vn=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},vn(e)}var TE=["ref"];function Mp(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?Mp(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Np(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,Ip(n.key),n)}}function jE(e,t,r){return t&&Np(e.prototype,t),r&&Np(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function PE(e,t,r){return t=no(t),_E(e,Dp()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function _E(e,t){if(t&&(vn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EE(e)}function EE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dp=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function CE(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&&zl(e,t)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zl(e,t)}function ao(e,t,r){return t=Ip(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ip(e){var t=$E(e,"string");return vn(t)=="symbol"?t:t+""}function $E(e,t){if(vn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kE(e,t){if(e==null)return{};var r=ME(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 ME(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 NE(e){return e.value}function DE(e,t){if(S.isValidElement(e))return S.cloneElement(e,t);if(typeof e=="function")return S.createElement(e,t);t.ref;var r=kE(t,TE);return S.createElement(El,r)}var Lp=1,gn=function(e){function t(){var r;AE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=PE(this,t,[].concat(a)),ao(r,"lastBoundingBox",{width:-1,height:-1}),r}return CE(t,e),jE(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)>Lp||Math.abs(a.height-this.lastBoundingBox.height)>Lp)&&(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 v=this.getBBoxSnapshot();d={top:((u||0)-v.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 S.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},DE(i,tr(tr({},this.props),{},{payload:kp(u,c,NE)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&Q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(S.PureComponent);ao(gn,"displayName","Legend"),ao(gn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Rp=ha,IE=kl,LE=ft,Bp=Rp?Rp.isConcatSpreadable:void 0;function RE(e){return LE(e)||IE(e)||!!(Bp&&e&&e[Bp])}var BE=RE,FE=rp,UE=BE;function Fp(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=UE),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Fp(s,t-1,r,n,a):FE(a,s):n||(a[a.length]=s)}return a}var Up=Fp;function WE(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 zE=WE,VE=zE,GE=VE(),HE=GE,qE=HE,KE=to;function YE(e,t){return e&&qE(e,t,KE)}var Wp=YE,XE=ba;function ZE(e,t){return function(r,n){if(r==null)return r;if(!XE(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 JE=ZE,QE=Wp,eC=JE,tC=eC(QE),Vl=tC,rC=Vl,nC=ba;function aC(e,t){var r=-1,n=nC(e)?Array(e.length):[];return rC(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var zp=aC;function iC(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var oC=iC,Vp=nn;function sC(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Vp(e),o=t!==void 0,s=t===null,l=t===t,c=Vp(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 lC=sC,cC=lC;function uC(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=cC(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 fC=uC,Gl=rl,dC=nl,pC=vr,hC=zp,mC=oC,vC=sp,gC=fC,yC=mn,bC=ft;function xC(e,t,r){t.length?t=Gl(t,function(i){return bC(i)?function(o){return dC(o,i.length===1?i[0]:i)}:i}):t=[yC];var n=-1;t=Gl(t,vC(pC));var a=hC(e,function(i,o,s){var l=Gl(t,function(c){return c(i)});return{criteria:l,index:++n,value:i}});return mC(a,function(i,o){return gC(i,o,r)})}var wC=xC;function OC(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 SC=OC,TC=SC,Gp=Math.max;function AC(e,t,r){return t=Gp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Gp(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),TC(e,this,s)}}var jC=AC;function PC(e){return function(){return e}}var _C=PC,EC=Er,CC=function(){try{var e=EC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Hp=CC,$C=_C,qp=Hp,kC=mn,MC=qp?function(e,t){return qp(e,"toString",{configurable:!0,enumerable:!1,value:$C(t),writable:!0})}:kC,NC=MC,DC=800,IC=16,LC=Date.now;function RC(e){var t=0,r=0;return function(){var n=LC(),a=IC-(n-r);if(r=n,a>0){if(++t>=DC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var BC=RC,FC=NC,UC=BC,WC=UC(FC),zC=WC,VC=mn,GC=jC,HC=zC;function qC(e,t){return HC(GC(e,t,VC),e+"")}var KC=qC,YC=Js,XC=ba,ZC=Ml,JC=hr;function QC(e,t,r){if(!JC(r))return!1;var n=typeof t;return(n=="number"?XC(r)&&ZC(t,r.length):n=="string"&&t in r)?YC(r[t],e):!1}var io=QC,e$=Up,t$=wC,r$=KC,Kp=io,n$=r$(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]]),t$(e,e$(t,1),[])}),a$=n$;const Hl=ke(a$);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 i$(e,t){return c$(e)||l$(e,t)||s$(e,t)||o$()}function o$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
205
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s$(e,t){if(e){if(typeof e=="string")return Yp(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 Yp(e,t)}}function Yp(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 l$(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 c$(e){if(Array.isArray(e))return e}function Xp(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?Xp(Object(r),!0).forEach(function(n){u$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u$(e,t,r){return t=f$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f$(e){var t=d$(e,"string");return xa(t)=="symbol"?t:t+""}function d$(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 p$(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var h$=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,v=t.labelClassName,g=t.label,m=t.labelFormatter,b=t.accessibilityLayer,O=b===void 0?!1:b,x=function(){if(u&&u.length){var E={padding:0,margin:0},I=(d?Hl(u,d):u).map(function(k,D){if(k.type==="none")return null;var M=Kl({display:"block",paddingTop:4,paddingBottom:4,color:k.color||"#000"},s),F=k.formatter||f||p$,z=k.value,q=k.name,$=z,B=q;if(F&&$!=null&&B!=null){var U=F(z,q,k,D,u);if(Array.isArray(U)){var W=i$(U,2);$=W[0],B=W[1]}else $=U}return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:M},Xe(B)?S.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Xe(B)?S.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,S.createElement("span",{className:"recharts-tooltip-item-value"},$),S.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:E},I)}return null},j=Kl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Kl({margin:0},c),w=!fe(g),T=w?g:"",A=ve("recharts-default-tooltip",h),_=ve("recharts-tooltip-label",v);w&&m&&u!==void 0&&u!==null&&(T=m(g,u));var C=O?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",ql({className:A,style:j},C),S.createElement("p",{className:_,style:y},S.isValidElement(T)?T:"".concat(T)),x())};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=m$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m$(e){var t=v$(e,"string");return wa(t)=="symbol"?t:t+""}function v$(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",g$={visibility:"hidden"};function y$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ve(Oa,oo(oo(oo(oo({},"".concat(Oa,"-right"),Q(r)&&t&&Q(t.x)&&r>=t.x),"".concat(Oa,"-left"),Q(r)&&t&&Q(t.x)&&r<t.x),"".concat(Oa,"-bottom"),Q(n)&&t&&Q(t.y)&&n>=t.y),"".concat(Oa,"-top"),Q(n)&&t&&Q(t.y)&&n<t.y))}function Zp(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&&Q(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 v=f+s,g=l[n]+c;return v>g?Math.max(u,l[n]):Math.max(f,l[n])}function b$(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 x$(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=Zp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Zp({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=b$({translateX:u,translateY:f,useTranslate3d:s})):c=g$,{cssProperties:c,cssClasses:y$({translateX:u,translateY:f,coordinate:r})}}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 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 Qp(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){Xl(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 w$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O$(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,th(n.key),n)}}function S$(e,t,r){return t&&O$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T$(e,t,r){return t=so(t),A$(e,eh()?Reflect.construct(t,r||[],so(e).constructor):t.apply(e,r))}function A$(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 j$(e)}function j$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eh=function(){return!!e})()}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}function P$(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&&Yl(e,t)}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yl(e,t)}function Xl(e,t,r){return t=th(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function th(e){var t=_$(e,"string");return yn(t)=="symbol"?t:t+""}function _$(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 rh=1,E$=function(e){function t(){var r;w$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=T$(this,t,[].concat(a)),Xl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Xl(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 P$(t,e),S$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>rh||Math.abs(n.height-this.state.lastBoundingBox.height)>rh)&&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,v=a.position,g=a.reverseDirection,m=a.useTranslate3d,b=a.viewBox,O=a.wrapperStyle,x=x$({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:h,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:b}),j=x.cssClasses,y=x.cssProperties,w=Qp(Qp({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},O);return S.createElement("div",{tabIndex:-1,className:j,style:w,ref:function(A){n.wrapperNode=A}},c)}}])}(S.PureComponent),C$=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gr={isSsr:C$()};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 nh(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 ah(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nh(Object(r),!0).forEach(function(n){Jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k$(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,oh(n.key),n)}}function M$(e,t,r){return t&&k$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N$(e,t,r){return t=lo(t),D$(e,ih()?Reflect.construct(t,r||[],lo(e).constructor):t.apply(e,r))}function D$(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 I$(e)}function I$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ih(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ih=function(){return!!e})()}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function L$(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&&Zl(e,t)}function Zl(e,t){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zl(e,t)}function Jl(e,t,r){return t=oh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oh(e){var t=R$(e,"string");return bn(t)=="symbol"?t:t+""}function R$(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 B$(e){return e.dataKey}function F$(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(h$,t)}var Ut=function(e){function t(){return $$(this,t),N$(this,t,arguments)}return L$(t,e),M$(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,v=a.payload,g=a.payloadUniqBy,m=a.position,b=a.reverseDirection,O=a.useTranslate3d,x=a.viewBox,j=a.wrapperStyle,y=v??[];f&&y.length&&(y=kp(v.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),g,B$));var w=y.length>0;return S.createElement(E$,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:u,hasPayload:w,offset:h,position:m,reverseDirection:b,useTranslate3d:O,viewBox:x,wrapperStyle:j},F$(c,ah(ah({},this.props),{},{payload:y})))}}])}(S.PureComponent);Jl(Ut,"displayName","Tooltip"),Jl(Ut,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gr.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 U$=Ft,W$=function(){return U$.Date.now()},z$=W$,V$=/\s/;function G$(e){for(var t=e.length;t--&&V$.test(e.charAt(t)););return t}var H$=G$,q$=H$,K$=/^\s+/;function Y$(e){return e&&e.slice(0,q$(e)+1).replace(K$,"")}var X$=Y$,Z$=X$,sh=hr,J$=nn,lh=NaN,Q$=/^[-+]0x[0-9a-f]+$/i,ek=/^0b[01]+$/i,tk=/^0o[0-7]+$/i,rk=parseInt;function nk(e){if(typeof e=="number")return e;if(J$(e))return lh;if(sh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=sh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Z$(e);var r=ek.test(e);return r||tk.test(e)?rk(e.slice(2),r?2:8):Q$.test(e)?lh:+e}var ch=nk,ak=hr,Ql=z$,uh=ch,ik="Expected a function",ok=Math.max,sk=Math.min;function lk(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(ik);t=uh(t)||0,ak(r)&&(u=!!r.leading,f="maxWait"in r,i=f?ok(uh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(w){var T=n,A=a;return n=a=void 0,c=w,o=e.apply(A,T),o}function v(w){return c=w,s=setTimeout(b,t),u?h(w):o}function g(w){var T=w-l,A=w-c,_=t-T;return f?sk(_,i-A):_}function m(w){var T=w-l,A=w-c;return l===void 0||T>=t||T<0||f&&A>=i}function b(){var w=Ql();if(m(w))return O(w);s=setTimeout(b,g(w))}function O(w){return s=void 0,d&&n?h(w):(n=a=void 0,o)}function x(){s!==void 0&&clearTimeout(s),c=0,n=l=a=s=void 0}function j(){return s===void 0?o:O(Ql())}function y(){var w=Ql(),T=m(w);if(n=arguments,a=this,l=w,T){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(b,t),h(l)}return s===void 0&&(s=setTimeout(b,t)),o}return y.cancel=x,y.flush=j,y}var ck=lk,uk=ck,fk=hr,dk="Expected a function";function pk(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(dk);return fk(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),uk(e,t,{leading:n,maxWait:t,trailing:a})}var hk=pk;const fh=ke(hk);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 dh(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?dh(Object(r),!0).forEach(function(n){mk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mk(e,t,r){return t=vk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vk(e){var t=gk(e,"string");return Sa(t)=="symbol"?t:t+""}function gk(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 yk(e,t){return Ok(e)||wk(e,t)||xk(e,t)||bk()}function bk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
206
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xk(e,t){if(e){if(typeof e=="string")return ph(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 ph(e,t)}}function ph(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 wk(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 Ok(e){if(Array.isArray(e))return e}var Sk=S.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,v=e.debounce,g=v===void 0?0:v,m=e.id,b=e.className,O=e.onResize,x=e.style,j=x===void 0?{}:x,y=S.useRef(null),w=S.useRef();w.current=O,S.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 T=S.useState({containerWidth:a.width,containerHeight:a.height}),A=yk(T,2),_=A[0],C=A[1],P=S.useCallback(function(I,k){C(function(D){var M=Math.round(I),F=Math.round(k);return D.containerWidth===M&&D.containerHeight===F?D:{containerWidth:M,containerHeight:F}})},[]);S.useEffect(function(){var I=function(q){var $,B=q[0].contentRect,U=B.width,W=B.height;P(U,W),($=w.current)===null||$===void 0||$.call(w,U,W)};g>0&&(I=fh(I,g,{trailing:!0,leading:!1}));var k=new ResizeObserver(I),D=y.current.getBoundingClientRect(),M=D.width,F=D.height;return P(M,F),k.observe(y.current),function(){k.disconnect()}},[P,g]);var E=S.useMemo(function(){var I=_.containerWidth,k=_.containerHeight;if(I<0||k<0)return null;er($r(o)||$r(l),`The width(%s) and height(%s) are both fixed numbers,
207
- 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=$r(o)?I:o,M=$r(l)?k: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,
209
+ A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return S.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(S.isValidElement(n.legendIcon)){var c=GS({},n);return delete c.legendIcon,S.cloneElement(n.legendIcon,c)}return S.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,g){var v=h.formatter||l,m=ge(ya(ya({"recharts-legend-item":!0},"legend-item-".concat(g),!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 w=h.inactive?c:h.color;return S.createElement("li",Pl({className:m,style:f,key:"legend-item-".concat(g)},ga(n.props,h,g)),S.createElement(pl,{width:o,height:o,viewBox:u,style:d},n.renderIcon(h)),S.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(b,h,g):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 S.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(S.PureComponent);ya(El,"displayName","Legend"),ya(El,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var eT=Di;function tT(){this.__data__=new eT,this.size=0}var rT=tT;function nT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var aT=nT;function iT(e){return this.__data__.get(e)}var oT=iT;function sT(e){return this.__data__.has(e)}var lT=sT,cT=Di,uT=Qs,fT=el,dT=200;function pT(e,t){var r=this.__data__;if(r instanceof cT){var n=r.__data__;if(!uT||n.length<dT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new fT(n)}return r.set(e,t),this.size=r.size,this}var hT=pT,mT=Di,gT=rT,vT=aT,yT=oT,bT=lT,xT=hT;function pn(e){var t=this.__data__=new mT(e);this.size=t.size}pn.prototype.clear=gT,pn.prototype.delete=vT,pn.prototype.get=yT,pn.prototype.has=bT,pn.prototype.set=xT;var Yd=pn,wT="__lodash_hash_undefined__";function OT(e){return this.__data__.set(e,wT),this}var ST=OT;function TT(e){return this.__data__.has(e)}var AT=TT,jT=el,PT=ST,_T=AT;function Ji(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new jT;++t<r;)this.add(e[t])}Ji.prototype.add=Ji.prototype.push=PT,Ji.prototype.has=_T;var Xd=Ji;function ET(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 Zd=ET;function CT(e,t){return e.has(t)}var Jd=CT,$T=Xd,kT=Zd,MT=Jd,NT=1,DT=2;function IT(e,t,r,n,a,i){var o=r&NT,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&DT?new $T:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var g=e[f],v=t[f];if(n)var m=o?n(v,g,f,t,e,i):n(g,v,f,e,t,i);if(m!==void 0){if(m)continue;d=!1;break}if(h){if(!kT(t,function(b,w){if(!MT(h,w)&&(g===b||a(g,b,r,n,i)))return h.push(w)})){d=!1;break}}else if(!(g===v||a(g,v,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Qd=IT,LT=Ft,RT=LT.Uint8Array,BT=RT;function FT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var UT=FT;function WT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Cl=WT,ep=ha,tp=BT,zT=Js,VT=Qd,GT=UT,HT=Cl,qT=1,KT=2,YT="[object Boolean]",XT="[object Date]",ZT="[object Error]",JT="[object Map]",QT="[object Number]",eA="[object RegExp]",tA="[object Set]",rA="[object String]",nA="[object Symbol]",aA="[object ArrayBuffer]",iA="[object DataView]",rp=ep?ep.prototype:void 0,$l=rp?rp.valueOf:void 0;function oA(e,t,r,n,a,i,o){switch(r){case iA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case aA:return!(e.byteLength!=t.byteLength||!i(new tp(e),new tp(t)));case YT:case XT:case QT:return zT(+e,+t);case ZT:return e.name==t.name&&e.message==t.message;case eA:case rA:return e==t+"";case JT:var s=GT;case tA:var l=n&qT;if(s||(s=HT),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=KT,o.set(e,t);var u=VT(s(e),s(t),n,a,i,o);return o.delete(e),u;case nA:if($l)return $l.call(e)==$l.call(t)}return!1}var sA=oA;function lA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var np=lA,cA=np,uA=ft;function fA(e,t,r){var n=t(e);return uA(e)?n:cA(n,r(e))}var dA=fA;function pA(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 hA=pA;function mA(){return[]}var gA=mA,vA=hA,yA=gA,bA=Object.prototype,xA=bA.propertyIsEnumerable,ap=Object.getOwnPropertySymbols,wA=ap?function(e){return e==null?[]:(e=Object(e),vA(ap(e),function(t){return xA.call(e,t)}))}:yA,OA=wA;function SA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var TA=SA,AA=Zt,jA=Jt,PA="[object Arguments]";function _A(e){return jA(e)&&AA(e)==PA}var EA=_A,ip=EA,CA=Jt,op=Object.prototype,$A=op.hasOwnProperty,kA=op.propertyIsEnumerable,MA=ip(function(){return arguments}())?ip:function(e){return CA(e)&&$A.call(e,"callee")&&!kA.call(e,"callee")},kl=MA,Qi={exports:{}};function NA(){return!1}var DA=NA;Qi.exports,function(e,t){var r=Ft,n=DA,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 sp=Qi.exports,IA=9007199254740991,LA=/^(?:0|[1-9]\d*)$/;function RA(e,t){var r=typeof e;return t=t??IA,!!t&&(r=="number"||r!="symbol"&&LA.test(e))&&e>-1&&e%1==0&&e<t}var Ml=RA,BA=9007199254740991;function FA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=BA}var Nl=FA,UA=Zt,WA=Nl,zA=Jt,VA="[object Arguments]",GA="[object Array]",HA="[object Boolean]",qA="[object Date]",KA="[object Error]",YA="[object Function]",XA="[object Map]",ZA="[object Number]",JA="[object Object]",QA="[object RegExp]",ej="[object Set]",tj="[object String]",rj="[object WeakMap]",nj="[object ArrayBuffer]",aj="[object DataView]",ij="[object Float32Array]",oj="[object Float64Array]",sj="[object Int8Array]",lj="[object Int16Array]",cj="[object Int32Array]",uj="[object Uint8Array]",fj="[object Uint8ClampedArray]",dj="[object Uint16Array]",pj="[object Uint32Array]",Ie={};Ie[ij]=Ie[oj]=Ie[sj]=Ie[lj]=Ie[cj]=Ie[uj]=Ie[fj]=Ie[dj]=Ie[pj]=!0,Ie[VA]=Ie[GA]=Ie[nj]=Ie[HA]=Ie[aj]=Ie[qA]=Ie[KA]=Ie[YA]=Ie[XA]=Ie[ZA]=Ie[JA]=Ie[QA]=Ie[ej]=Ie[tj]=Ie[rj]=!1;function hj(e){return zA(e)&&WA(e.length)&&!!Ie[UA(e)]}var mj=hj;function gj(e){return function(t){return e(t)}}var lp=gj,eo={exports:{}};eo.exports,function(e,t){var r=Uf,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 vj=eo.exports,yj=mj,bj=lp,cp=vj,up=cp&&cp.isTypedArray,xj=up?bj(up):yj,fp=xj,wj=TA,Oj=kl,Sj=ft,Tj=sp,Aj=Ml,jj=fp,Pj=Object.prototype,_j=Pj.hasOwnProperty;function Ej(e,t){var r=Sj(e),n=!r&&Oj(e),a=!r&&!n&&Tj(e),i=!r&&!n&&!a&&jj(e),o=r||n||a||i,s=o?wj(e.length,String):[],l=s.length;for(var c in e)(t||_j.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Aj(c,l)))&&s.push(c);return s}var Cj=Ej,$j=Object.prototype;function kj(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||$j;return e===r}var Mj=kj;function Nj(e,t){return function(r){return e(t(r))}}var dp=Nj,Dj=dp,Ij=Dj(Object.keys,Object),Lj=Ij,Rj=Mj,Bj=Lj,Fj=Object.prototype,Uj=Fj.hasOwnProperty;function Wj(e){if(!Rj(e))return Bj(e);var t=[];for(var r in Object(e))Uj.call(e,r)&&r!="constructor"&&t.push(r);return t}var zj=Wj,Vj=Xs,Gj=Nl;function Hj(e){return e!=null&&Gj(e.length)&&!Vj(e)}var ba=Hj,qj=Cj,Kj=zj,Yj=ba;function Xj(e){return Yj(e)?qj(e):Kj(e)}var to=Xj,Zj=dA,Jj=OA,Qj=to;function eP(e){return Zj(e,Qj,Jj)}var tP=eP,pp=tP,rP=1,nP=Object.prototype,aP=nP.hasOwnProperty;function iP(e,t,r,n,a,i){var o=r&rP,s=pp(e),l=s.length,c=pp(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:aP.call(t,d)))return!1}var h=i.get(e),g=i.get(t);if(h&&g)return h==t&&g==e;var v=!0;i.set(e,t),i.set(t,e);for(var m=o;++f<l;){d=s[f];var b=e[d],w=t[d];if(n)var x=o?n(w,b,d,t,e,i):n(b,w,d,e,t,i);if(!(x===void 0?b===w||a(b,w,r,n,i):x)){v=!1;break}m||(m=d=="constructor")}if(v&&!m){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)&&(v=!1)}return i.delete(e),i.delete(t),v}var oP=iP,sP=Er,lP=Ft,cP=sP(lP,"DataView"),uP=cP,fP=Er,dP=Ft,pP=fP(dP,"Promise"),hP=pP,mP=Er,gP=Ft,vP=mP(gP,"Set"),hp=vP,yP=Er,bP=Ft,xP=yP(bP,"WeakMap"),wP=xP,Dl=uP,Il=Qs,Ll=hP,Rl=hp,Bl=wP,mp=Zt,hn=qf,gp="[object Map]",OP="[object Object]",vp="[object Promise]",yp="[object Set]",bp="[object WeakMap]",xp="[object DataView]",SP=hn(Dl),TP=hn(Il),AP=hn(Ll),jP=hn(Rl),PP=hn(Bl),Dr=mp;(Dl&&Dr(new Dl(new ArrayBuffer(1)))!=xp||Il&&Dr(new Il)!=gp||Ll&&Dr(Ll.resolve())!=vp||Rl&&Dr(new Rl)!=yp||Bl&&Dr(new Bl)!=bp)&&(Dr=function(e){var t=mp(e),r=t==OP?e.constructor:void 0,n=r?hn(r):"";if(n)switch(n){case SP:return xp;case TP:return gp;case AP:return vp;case jP:return yp;case PP:return bp}return t});var _P=Dr,Fl=Yd,EP=Qd,CP=sA,$P=oP,wp=_P,Op=ft,Sp=sp,kP=fp,MP=1,Tp="[object Arguments]",Ap="[object Array]",ro="[object Object]",NP=Object.prototype,jp=NP.hasOwnProperty;function DP(e,t,r,n,a,i){var o=Op(e),s=Op(t),l=o?Ap:wp(e),c=s?Ap:wp(t);l=l==Tp?ro:l,c=c==Tp?ro:c;var u=l==ro,f=c==ro,d=l==c;if(d&&Sp(e)){if(!Sp(t))return!1;o=!0,u=!1}if(d&&!u)return i||(i=new Fl),o||kP(e)?EP(e,t,r,n,a,i):CP(e,t,l,r,n,a,i);if(!(r&MP)){var h=u&&jp.call(e,"__wrapped__"),g=f&&jp.call(t,"__wrapped__");if(h||g){var v=h?e.value():e,m=g?t.value():t;return i||(i=new Fl),a(v,m,r,n,i)}}return d?(i||(i=new Fl),$P(e,t,r,n,a,i)):!1}var IP=DP,LP=IP,Pp=Jt;function _p(e,t,r,n,a){return e===t?!0:e==null||t==null||!Pp(e)&&!Pp(t)?e!==e&&t!==t:LP(e,t,r,n,_p,a)}var Ul=_p,RP=Yd,BP=Ul,FP=1,UP=2;function WP(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 RP;if(n)var d=n(c,u,l,e,t,f);if(!(d===void 0?BP(u,c,FP|UP,n,f):d))return!1}}return!0}var zP=WP,VP=hr;function GP(e){return e===e&&!VP(e)}var Ep=GP,HP=Ep,qP=to;function KP(e){for(var t=qP(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,HP(a)]}return t}var YP=KP;function XP(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Cp=XP,ZP=zP,JP=YP,QP=Cp;function e_(e){var t=JP(e);return t.length==1&&t[0][2]?QP(t[0][0],t[0][1]):function(r){return r===e||ZP(r,e,t)}}var t_=e_;function r_(e,t){return e!=null&&t in Object(e)}var n_=r_,a_=nd,i_=kl,o_=ft,s_=Ml,l_=Nl,c_=Li;function u_(e,t,r){t=a_(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=c_(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&&l_(a)&&s_(o,a)&&(o_(e)||i_(e)))}var f_=u_,d_=n_,p_=f_;function h_(e,t){return e!=null&&p_(e,t,d_)}var m_=h_,g_=Ul,v_=ad,y_=m_,b_=Ys,x_=Ep,w_=Cp,O_=Li,S_=1,T_=2;function A_(e,t){return b_(e)&&x_(t)?w_(O_(e),t):function(r){var n=v_(r,e);return n===void 0&&n===t?y_(r,e):g_(t,n,S_|T_)}}var j_=A_;function P_(e){return e}var mn=P_;function __(e){return function(t){return t==null?void 0:t[e]}}var E_=__,C_=nl;function $_(e){return function(t){return C_(t,e)}}var k_=$_,M_=E_,N_=k_,D_=Ys,I_=Li;function L_(e){return D_(e)?M_(I_(e)):N_(e)}var R_=L_,B_=t_,F_=j_,U_=mn,W_=ft,z_=R_;function V_(e){return typeof e=="function"?e:e==null?U_:typeof e=="object"?W_(e)?F_(e[0],e[1]):B_(e):z_(e)}var gr=V_;function G_(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 $p=G_;function H_(e){return e!==e}var q_=H_;function K_(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var Y_=K_,X_=$p,Z_=q_,J_=Y_;function Q_(e,t,r){return t===t?J_(e,t,r):X_(e,Z_,r)}var eE=Q_,tE=eE;function rE(e,t){var r=e==null?0:e.length;return!!r&&tE(e,t,0)>-1}var nE=rE;function aE(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 iE=aE;function oE(){}var sE=oE,Wl=hp,lE=sE,cE=Cl,uE=1/0,fE=Wl&&1/cE(new Wl([,-0]))[1]==uE?function(e){return new Wl(e)}:lE,dE=fE,pE=Xd,hE=nE,mE=iE,gE=Jd,vE=dE,yE=Cl,bE=200;function xE(e,t,r){var n=-1,a=hE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=mE;else if(i>=bE){var c=t?null:vE(e);if(c)return yE(c);o=!1,a=gE,l=new pE}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 wE=xE,OE=gr,SE=wE;function TE(e,t){return e&&e.length?SE(e,OE(t)):[]}var AE=TE;const kp=ke(AE);function Mp(e,t,r){return t===!0?kp(e,r):pe(t)?kp(e,t):e}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)}var jE=["ref"];function Np(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?Np(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Np(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dp(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,Lp(n.key),n)}}function _E(e,t,r){return t&&Dp(e.prototype,t),r&&Dp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function EE(e,t,r){return t=no(t),CE(e,Ip()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function CE(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 $E(e)}function $E(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ip(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ip=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function kE(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&&zl(e,t)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zl(e,t)}function ao(e,t,r){return t=Lp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lp(e){var t=ME(e,"string");return gn(t)=="symbol"?t:t+""}function ME(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)}function NE(e,t){if(e==null)return{};var r=DE(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 DE(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 IE(e){return e.value}function LE(e,t){if(S.isValidElement(e))return S.cloneElement(e,t);if(typeof e=="function")return S.createElement(e,t);t.ref;var r=NE(t,jE);return S.createElement(El,r)}var Rp=1,vn=function(e){function t(){var r;PE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=EE(this,t,[].concat(a)),ao(r,"lastBoundingBox",{width:-1,height:-1}),r}return kE(t,e),_E(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)>Rp||Math.abs(a.height-this.lastBoundingBox.height)>Rp)&&(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 g=this.getBBoxSnapshot();d={top:((u||0)-g.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 S.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},LE(i,tr(tr({},this.props),{},{payload:Mp(u,c,IE)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&te(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(S.PureComponent);ao(vn,"displayName","Legend"),ao(vn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Bp=ha,RE=kl,BE=ft,Fp=Bp?Bp.isConcatSpreadable:void 0;function FE(e){return BE(e)||RE(e)||!!(Fp&&e&&e[Fp])}var UE=FE,WE=np,zE=UE;function Up(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=zE),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Up(s,t-1,r,n,a):WE(a,s):n||(a[a.length]=s)}return a}var Wp=Up;function VE(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 GE=VE,HE=GE,qE=HE(),KE=qE,YE=KE,XE=to;function ZE(e,t){return e&&YE(e,t,XE)}var zp=ZE,JE=ba;function QE(e,t){return function(r,n){if(r==null)return r;if(!JE(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 eC=QE,tC=zp,rC=eC,nC=rC(tC),Vl=nC,aC=Vl,iC=ba;function oC(e,t){var r=-1,n=iC(e)?Array(e.length):[];return aC(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Vp=oC;function sC(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var lC=sC,Gp=nn;function cC(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Gp(e),o=t!==void 0,s=t===null,l=t===t,c=Gp(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 uC=cC,fC=uC;function dC(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=fC(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 pC=dC,Gl=rl,hC=nl,mC=gr,gC=Vp,vC=lC,yC=lp,bC=pC,xC=mn,wC=ft;function OC(e,t,r){t.length?t=Gl(t,function(i){return wC(i)?function(o){return hC(o,i.length===1?i[0]:i)}:i}):t=[xC];var n=-1;t=Gl(t,yC(mC));var a=gC(e,function(i,o,s){var l=Gl(t,function(c){return c(i)});return{criteria:l,index:++n,value:i}});return vC(a,function(i,o){return bC(i,o,r)})}var SC=OC;function TC(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 AC=TC,jC=AC,Hp=Math.max;function PC(e,t,r){return t=Hp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Hp(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),jC(e,this,s)}}var _C=PC;function EC(e){return function(){return e}}var CC=EC,$C=Er,kC=function(){try{var e=$C(Object,"defineProperty");return e({},"",{}),e}catch{}}(),qp=kC,MC=CC,Kp=qp,NC=mn,DC=Kp?function(e,t){return Kp(e,"toString",{configurable:!0,enumerable:!1,value:MC(t),writable:!0})}:NC,IC=DC,LC=800,RC=16,BC=Date.now;function FC(e){var t=0,r=0;return function(){var n=BC(),a=RC-(n-r);if(r=n,a>0){if(++t>=LC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var UC=FC,WC=IC,zC=UC,VC=zC(WC),GC=VC,HC=mn,qC=_C,KC=GC;function YC(e,t){return KC(qC(e,t,HC),e+"")}var XC=YC,ZC=Js,JC=ba,QC=Ml,e$=hr;function t$(e,t,r){if(!e$(r))return!1;var n=typeof t;return(n=="number"?JC(r)&&QC(t,r.length):n=="string"&&t in r)?ZC(r[t],e):!1}var io=t$,r$=Wp,n$=SC,a$=XC,Yp=io,i$=a$(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Yp(e,t[0],t[1])?t=[]:r>2&&Yp(t[0],t[1],t[2])&&(t=[t[0]]),n$(e,r$(t,1),[])}),o$=i$;const Hl=ke(o$);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 s$(e,t){return f$(e)||u$(e,t)||c$(e,t)||l$()}function l$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
210
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c$(e,t){if(e){if(typeof e=="string")return Xp(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 Xp(e,t)}}function Xp(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 u$(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 f$(e){if(Array.isArray(e))return e}function Zp(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?Zp(Object(r),!0).forEach(function(n){d$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d$(e,t,r){return t=p$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p$(e){var t=h$(e,"string");return xa(t)=="symbol"?t:t+""}function h$(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 m$(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var g$=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,g=t.labelClassName,v=t.label,m=t.labelFormatter,b=t.accessibilityLayer,w=b===void 0?!1:b,x=function(){if(u&&u.length){var E={padding:0,margin:0},F=(d?Hl(u,d):u).map(function(N,L){if(N.type==="none")return null;var M=Kl({display:"block",paddingTop:4,paddingBottom:4,color:N.color||"#000"},s),W=N.formatter||f||m$,H=N.value,Y=N.name,$=H,B=Y;if(W&&$!=null&&B!=null){var _=W(H,Y,N,L,u);if(Array.isArray(_)){var U=s$(_,2);$=U[0],B=U[1]}else $=_}return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:M},Xe(B)?S.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Xe(B)?S.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,S.createElement("span",{className:"recharts-tooltip-item-value"},$),S.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:E},F)}return null},A=Kl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Kl({margin:0},c),O=!fe(v),T=O?v:"",j=ge("recharts-default-tooltip",h),C=ge("recharts-tooltip-label",g);O&&m&&u!==void 0&&u!==null&&(T=m(v,u));var k=w?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",ql({className:j,style:A},k),S.createElement("p",{className:C,style:y},S.isValidElement(T)?T:"".concat(T)),x())};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=v$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v$(e){var t=y$(e,"string");return wa(t)=="symbol"?t:t+""}function y$(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",b$={visibility:"hidden"};function x$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ge(Oa,oo(oo(oo(oo({},"".concat(Oa,"-right"),te(r)&&t&&te(t.x)&&r>=t.x),"".concat(Oa,"-left"),te(r)&&t&&te(t.x)&&r<t.x),"".concat(Oa,"-bottom"),te(n)&&t&&te(t.y)&&n>=t.y),"".concat(Oa,"-top"),te(n)&&t&&te(t.y)&&n<t.y))}function Jp(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&&te(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 g=f+s,v=l[n]+c;return g>v?Math.max(u,l[n]):Math.max(f,l[n])}function w$(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 O$(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=Jp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Jp({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=w$({translateX:u,translateY:f,useTranslate3d:s})):c=b$,{cssProperties:c,cssClasses:x$({translateX:u,translateY:f,coordinate:r})}}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 Qp(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 eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qp(Object(r),!0).forEach(function(n){Xl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T$(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,rh(n.key),n)}}function A$(e,t,r){return t&&T$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j$(e,t,r){return t=so(t),P$(e,th()?Reflect.construct(t,r||[],so(e).constructor):t.apply(e,r))}function P$(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 _$(e)}function _$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function th(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(th=function(){return!!e})()}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}function E$(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&&Yl(e,t)}function Yl(e,t){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yl(e,t)}function Xl(e,t,r){return t=rh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rh(e){var t=C$(e,"string");return yn(t)=="symbol"?t:t+""}function C$(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 nh=1,$$=function(e){function t(){var r;S$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=j$(this,t,[].concat(a)),Xl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Xl(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 E$(t,e),A$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>nh||Math.abs(n.height-this.state.lastBoundingBox.height)>nh)&&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,g=a.position,v=a.reverseDirection,m=a.useTranslate3d,b=a.viewBox,w=a.wrapperStyle,x=O$({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:h,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:b}),A=x.cssClasses,y=x.cssProperties,O=eh(eh({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},w);return S.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(j){n.wrapperNode=j}},c)}}])}(S.PureComponent),k$=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:k$()};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 ah(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 ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){Jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N$(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,sh(n.key),n)}}function D$(e,t,r){return t&&N$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function I$(e,t,r){return t=lo(t),L$(e,oh()?Reflect.construct(t,r||[],lo(e).constructor):t.apply(e,r))}function L$(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 R$(e)}function R$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oh=function(){return!!e})()}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function B$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zl(e,t)}function Zl(e,t){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zl(e,t)}function Jl(e,t,r){return t=sh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sh(e){var t=F$(e,"string");return bn(t)=="symbol"?t:t+""}function F$(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 U$(e){return e.dataKey}function W$(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(g$,t)}var Ut=function(e){function t(){return M$(this,t),I$(this,t,arguments)}return B$(t,e),D$(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,g=a.payload,v=a.payloadUniqBy,m=a.position,b=a.reverseDirection,w=a.useTranslate3d,x=a.viewBox,A=a.wrapperStyle,y=g??[];f&&y.length&&(y=Mp(g.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),v,U$));var O=y.length>0;return S.createElement($$,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:u,hasPayload:O,offset:h,position:m,reverseDirection:b,useTranslate3d:w,viewBox:x,wrapperStyle:A},W$(c,ih(ih({},this.props),{},{payload:y})))}}])}(S.PureComponent);Jl(Ut,"displayName","Tooltip"),Jl(Ut,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!vr.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 z$=Ft,V$=function(){return z$.Date.now()},G$=V$,H$=/\s/;function q$(e){for(var t=e.length;t--&&H$.test(e.charAt(t)););return t}var K$=q$,Y$=K$,X$=/^\s+/;function Z$(e){return e&&e.slice(0,Y$(e)+1).replace(X$,"")}var J$=Z$,Q$=J$,lh=hr,ek=nn,ch=NaN,tk=/^[-+]0x[0-9a-f]+$/i,rk=/^0b[01]+$/i,nk=/^0o[0-7]+$/i,ak=parseInt;function ik(e){if(typeof e=="number")return e;if(ek(e))return ch;if(lh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=lh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Q$(e);var r=rk.test(e);return r||nk.test(e)?ak(e.slice(2),r?2:8):tk.test(e)?ch:+e}var uh=ik,ok=hr,Ql=G$,fh=uh,sk="Expected a function",lk=Math.max,ck=Math.min;function uk(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(sk);t=fh(t)||0,ok(r)&&(u=!!r.leading,f="maxWait"in r,i=f?lk(fh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(O){var T=n,j=a;return n=a=void 0,c=O,o=e.apply(j,T),o}function g(O){return c=O,s=setTimeout(b,t),u?h(O):o}function v(O){var T=O-l,j=O-c,C=t-T;return f?ck(C,i-j):C}function m(O){var T=O-l,j=O-c;return l===void 0||T>=t||T<0||f&&j>=i}function b(){var O=Ql();if(m(O))return w(O);s=setTimeout(b,v(O))}function w(O){return s=void 0,d&&n?h(O):(n=a=void 0,o)}function x(){s!==void 0&&clearTimeout(s),c=0,n=l=a=s=void 0}function A(){return s===void 0?o:w(Ql())}function y(){var O=Ql(),T=m(O);if(n=arguments,a=this,l=O,T){if(s===void 0)return g(l);if(f)return clearTimeout(s),s=setTimeout(b,t),h(l)}return s===void 0&&(s=setTimeout(b,t)),o}return y.cancel=x,y.flush=A,y}var fk=uk,dk=fk,pk=hr,hk="Expected a function";function mk(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(hk);return pk(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),dk(e,t,{leading:n,maxWait:t,trailing:a})}var gk=mk;const dh=ke(gk);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 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 co(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){vk(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 vk(e,t,r){return t=yk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yk(e){var t=bk(e,"string");return Sa(t)=="symbol"?t:t+""}function bk(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 xk(e,t){return Tk(e)||Sk(e,t)||Ok(e,t)||wk()}function wk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
211
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ok(e,t){if(e){if(typeof e=="string")return hh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hh(e,t)}}function hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sk(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 Tk(e){if(Array.isArray(e))return e}var Ak=S.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,g=e.debounce,v=g===void 0?0:g,m=e.id,b=e.className,w=e.onResize,x=e.style,A=x===void 0?{}:x,y=S.useRef(null),O=S.useRef();O.current=w,S.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 T=S.useState({containerWidth:a.width,containerHeight:a.height}),j=xk(T,2),C=j[0],k=j[1],P=S.useCallback(function(F,N){k(function(L){var M=Math.round(F),W=Math.round(N);return L.containerWidth===M&&L.containerHeight===W?L:{containerWidth:M,containerHeight:W}})},[]);S.useEffect(function(){var F=function(Y){var $,B=Y[0].contentRect,_=B.width,U=B.height;P(_,U),($=O.current)===null||$===void 0||$.call(O,_,U)};v>0&&(F=dh(F,v,{trailing:!0,leading:!1}));var N=new ResizeObserver(F),L=y.current.getBoundingClientRect(),M=L.width,W=L.height;return P(M,W),N.observe(y.current),function(){N.disconnect()}},[P,v]);var E=S.useMemo(function(){var F=C.containerWidth,N=C.containerHeight;if(F<0||N<0)return null;er($r(o)||$r(l),`The width(%s) and height(%s) are both fixed numbers,
212
+ 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 L=$r(o)?F:o,M=$r(l)?N:l;r&&r>0&&(L?M=L/r:M&&(L=M*r),d&&M>d&&(M=d)),er(L>0||M>0,`The width(%s) and height(%s) of chart should be greater than 0,
208
213
  please check the style of container, or the props width(%s) and height(%s),
209
214
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
210
- height and width.`,D,M,o,l,u,f,r);var F=!Array.isArray(h)&&Qt(h.type).endsWith("Chart");return S.Children.map(h,function(z){return S.isValidElement(z)?S.cloneElement(z,co({width:D,height:M},F?{style:co({height:"100%",width:"100%",maxHeight:M,maxWidth:D},z.props.style)}:{})):z})},[r,h,l,d,f,u,_,o]);return S.createElement("div",{id:m?"".concat(m):void 0,className:ve("recharts-responsive-container",b),style:co(co({},j),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:d}),ref:y},E)}),ec=function(t){return null};ec.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 hh(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 tc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hh(Object(r),!0).forEach(function(n){Tk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tk(e,t,r){return t=Ak(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ak(e){var t=jk(e,"string");return Ta(t)=="symbol"?t:t+""}function jk(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},Pk=2e3,_k={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},mh="recharts_measurement_span";function Ek(e){var t=tc({},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||gr.isSsr)return{width:0,height:0};var n=Ek(r),a=JSON.stringify({text:t,copyStyle:n});if(xn.widthCache[a])return xn.widthCache[a];try{var i=document.getElementById(mh);i||(i=document.createElement("span"),i.setAttribute("id",mh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=tc(tc({},_k),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>Pk&&(xn.cacheCount=0,xn.widthCache={}),l}catch{return{width:0,height:0}}},Ck=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 uo(e,t){return Nk(e)||Mk(e,t)||kk(e,t)||$k()}function $k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
211
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kk(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 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){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 Nk(e){if(Array.isArray(e))return e}function Dk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gh(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,Lk(n.key),n)}}function Ik(e,t,r){return t&&gh(e.prototype,t),r&&gh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lk(e){var t=Rk(e,"string");return ja(t)=="symbol"?t:t+""}function Rk(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 String(e)}var yh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Bk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Fk=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,xh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Uk=Object.keys(xh),wn="NaN";function Wk(e,t){return e*xh[t]}var fo=function(){function e(t,r){Dk(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Bk.test(r)&&(this.num=NaN,this.unit=""),Uk.includes(r)&&(this.num=Wk(t,r),this.unit="px")}return Ik(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=Fk.exec(r))!==null&&n!==void 0?n:[],i=uo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function wh(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=bh.exec(t))!==null&&f!==void 0?f:[],h=uo(d,4),v=h[1],g=h[2],m=h[3],b=fo.parse(v??""),O=fo.parse(m??""),x=g==="+"?b.add(O):b.subtract(O);if(x.isNaN())return wn;t=t.replace(bh,x.toString())}return t}var Oh=/\(([^()]*)\)/;function zk(e){for(var t=e;t.includes("(");){var r=Oh.exec(t),n=uo(r,2),a=n[1];t=t.replace(Oh,wh(a))}return t}function Vk(e){var t=e.replace(/\s+/g,"");return t=zk(t),t=wh(t),t}function Gk(e){try{return Vk(e)}catch{return wn}}function rc(e){var t=Gk(e.slice(5,-1));return t===wn?"":t}var Hk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],qk=["dx","dy","angle","className","breakAll"];function nc(){return nc=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},nc.apply(this,arguments)}function Sh(e,t){if(e==null)return{};var r=Kk(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 Kk(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 Th(e,t){return Jk(e)||Zk(e,t)||Xk(e,t)||Yk()}function Yk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
212
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xk(e,t){if(e){if(typeof e=="string")return Ah(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 Ah(e,t)}}function Ah(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 Zk(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 Jk(e){if(Array.isArray(e))return e}var jh=/[ \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(jh));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}},Qk=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=Q(o),f=s,d=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(M,F){var z=F.word,q=F.width,$=M[M.length-1];if($&&(a==null||i||$.width+q+n<Number(a)))$.words.push(z),$.width+=q+n;else{var B={words:[z],width:q};M.push(B)}return M},[])},h=d(r),v=function(D){return D.reduce(function(M,F){return M.width>F.width?M:F})};if(!u)return h;for(var g="…",m=function(D){var M=f.slice(0,D),F=Ph({breakAll:c,style:l,children:M+g}).wordsWithComputedWidth,z=d(F),q=z.length>o||v(z).width>Number(a);return[q,z]},b=0,O=f.length-1,x=0,j;b<=O&&x<=f.length-1;){var y=Math.floor((b+O)/2),w=y-1,T=m(w),A=Th(T,2),_=A[0],C=A[1],P=m(y),E=Th(P,1),I=E[0];if(!_&&!I&&(b=y+1),_&&I&&(O=y-1),!_&&I){j=C;break}x++}return j||h},_h=function(t){var r=fe(t)?[]:t.toString().split(jh);return[{words:r}]},eM=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!gr.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 _h(a);return Qk({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return _h(a)},Eh="#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,v=t.verticalAnchor,g=v===void 0?"end":v,m=t.fill,b=m===void 0?Eh:m,O=Sh(t,Hk),x=S.useMemo(function(){return eM({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:f,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,f,O.style,O.width]),j=O.dx,y=O.dy,w=O.angle,T=O.className,A=O.breakAll,_=Sh(O,qk);if(!Xe(n)||!Xe(i))return null;var C=n+(Q(j)?j:0),P=i+(Q(y)?y:0),E;switch(g){case"start":E=rc("calc(".concat(c,")"));break;case"middle":E=rc("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:E=rc("calc(".concat(x.length-1," * -").concat(s,")"));break}var I=[];if(f){var k=x[0].width,D=O.width;I.push("scale(".concat((Q(D)?D/k:1)/k,")"))}return w&&I.push("rotate(".concat(w,", ").concat(C,", ").concat(P,")")),I.length&&(_.transform=I.join(" ")),S.createElement("text",nc({},de(_,!0),{x:C,y:P,className:ve("recharts-text",T),textAnchor:h,fill:b.includes("url")?Eh:b}),x.map(function(M,F){var z=M.words.join(A?"":" ");return S.createElement("tspan",{x:C,dy:F===0?E:s,key:"".concat(z,"-").concat(F)},z)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tM(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ac(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===tM?e:rM,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 rM(){return 0}function Ch(e){return e===null?NaN:+e}function*nM(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Pa=ac(yr).right;ac(Ch).center;class $h extends Map{constructor(t,r=oM){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(kh(this,t))}has(t){return super.has(kh(this,t))}set(t,r){return super.set(aM(this,t),r)}delete(t){return super.delete(iM(this,t))}}function kh({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function aM({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function iM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function oM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function sM(e=yr){if(e===yr)return Mh;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 Mh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const lM=Math.sqrt(50),cM=Math.sqrt(10),uM=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>=lM?10:i>=cM?5:i>=uM?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 ic(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 oc(e,t,r){return t=+t,e=+e,r=+r,ho(e,t,r)[2]}function sc(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?oc(t,e,r):oc(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}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){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Ih(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?Mh:sM(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)),v=Math.min(n,Math.floor(t+(l-c)*f/l+d));Ih(e,t,h,v,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 fM(e,t,r){if(e=Float64Array.from(nM(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Dh(e);if(t>=1)return Nh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Nh(Ih(e,i).subarray(0,i+1)),s=Dh(e.subarray(i+1));return o+(s-o)*(a-i)}}function dM(e,t,r=Ch){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 pM(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 lc=Symbol("implicit");function cc(){var e=new $h,t=[],r=[],n=lc;function a(i){let o=e.get(i);if(o===void 0){if(n!==lc)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 $h;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 cc(t,r).unknown(n)},At.apply(a,arguments),a}function Ea(){var e=cc().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,v=h?a:n,g=h?n:a;i=(g-v)/Math.max(1,d-l+c*2),s&&(i=Math.floor(i)),v+=(g-v-i*(d-l))*u,o=i*(1-l),s&&(v=Math.round(v),o=Math.round(o));var m=pM(d).map(function(b){return v+i*b});return r(h?m.reverse():m)}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 Lh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Lh(t())},e}function Ca(){return Lh(Ea.apply(null,arguments).paddingInner(1))}function uc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Rh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function $a(){}var ka=.7,mo=1/ka,On="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hM=/^#([0-9a-f]{3,8})$/,mM=new RegExp(`^rgb\\(${On},${On},${On}\\)$`),vM=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),gM=new RegExp(`^rgba\\(${On},${On},${On},${Ma}\\)$`),yM=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Ma}\\)$`),bM=new RegExp(`^hsl\\(${Ma},${Wt},${Wt}\\)$`),xM=new RegExp(`^hsla\\(${Ma},${Wt},${Wt},${Ma}\\)$`),Bh={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};uc($a,Na,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Fh,formatHex:Fh,formatHex8:wM,formatHsl:OM,formatRgb:Uh,toString:Uh});function Fh(){return this.rgb().formatHex()}function wM(){return this.rgb().formatHex8()}function OM(){return Hh(this).formatHsl()}function Uh(){return this.rgb().formatRgb()}function Na(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=hM.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?vo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?vo(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=mM.exec(e))?new pt(t[1],t[2],t[3],1):(t=vM.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gM.exec(e))?vo(t[1],t[2],t[3],t[4]):(t=yM.exec(e))?vo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bM.exec(e))?Gh(t[1],t[2]/100,t[3]/100,1):(t=xM.exec(e))?Gh(t[1],t[2]/100,t[3]/100,t[4]):Bh.hasOwnProperty(e)?Wh(Bh[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 vo(e,t,r,n){return n<=0&&(e=t=r=NaN),new pt(e,t,r,n)}function SM(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 fc(e,t,r,n){return arguments.length===1?SM(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}uc(pt,fc,Rh($a,{brighter(e){return e=e==null?mo:Math.pow(mo,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(Ir(this.r),Ir(this.g),Ir(this.b),go(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:zh,formatHex:zh,formatHex8:TM,formatRgb:Vh,toString:Vh}));function zh(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function TM(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vh(){const e=go(this.opacity);return`${e===1?"rgb(":"rgba("}${Ir(this.r)}, ${Ir(this.g)}, ${Ir(this.b)}${e===1?")":`, ${e})`}`}function go(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ir(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Ir(e),(e<16?"0":"")+e.toString(16)}function Gh(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 Hh(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 AM(e,t,r,n){return arguments.length===1?Hh(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}uc(Mt,AM,Rh($a,{brighter(e){return e=e==null?mo:Math.pow(mo,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(dc(e>=240?e-240:e+120,a,n),dc(e,a,n),dc(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mt(qh(this.h),yo(this.s),yo(this.l),go(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=go(this.opacity);return`${e===1?"hsl(":"hsla("}${qh(this.h)}, ${yo(this.s)*100}%, ${yo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qh(e){return e=(e||0)%360,e<0?e+360:e}function yo(e){return Math.max(0,Math.min(1,e||0))}function dc(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 pc=e=>()=>e;function jM(e,t){return function(r){return e+r*t}}function PM(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 _M(e){return(e=+e)==1?Kh:function(t,r){return r-t?PM(t,r,e):pc(isNaN(t)?r:t)}}function Kh(e,t){var r=t-e;return r?jM(e,r):pc(isNaN(e)?t:e)}const Yh=function e(t){var r=_M(t);function n(a,i){var o=r((a=fc(a)).r,(i=fc(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 EM(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 CM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $M(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 kM(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 MM(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 hc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mc=new RegExp(hc.source,"g");function NM(e){return function(){return e}}function DM(e){return function(t){return e(t)+""}}function IM(e,t){var r=hc.lastIndex=mc.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=hc.exec(e))&&(a=mc.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=mc.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?DM(l[0].x):NM(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"?pc(t):(r==="number"?bo:r==="string"?(n=Na(t))?(t=n,Yh):IM:t instanceof Na?Yh:t instanceof Date?kM:CM(t)?EM:Array.isArray(t)?$M:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?MM:bo)(e,t)}function vc(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function LM(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 RM(e){return function(){return e}}function xo(e){return+e}var Xh=[0,1];function lt(e){return e}function gc(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:RM(isNaN(t)?NaN:.5)}function BM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function FM(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=gc(a,n),i=r(o,i)):(n=gc(n,a),i=r(i,o)),function(s){return i(n(s))}}function UM(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]=gc(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Pa(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=Xh,t=Xh,r=Sn,n,a,i,o=lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==lt&&(o=BM(e[0],e[d-1])),s=d>2?UM:FM,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 WM(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 zM(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 VM(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var GM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=GM.exec(e)))throw new Error("invalid format: "+e);var t;return new bc({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=bc.prototype;function bc(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+""}bc.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 HM(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 Zh;function qM(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Zh=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 Qh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:WM,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:qM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function em(e){return e}var tm=Array.prototype.map,rm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function KM(e){var t=e.grouping===void 0||e.thousands===void 0?em:zM(tm.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?em:VM(tm.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,v=f.sign,g=f.symbol,m=f.zero,b=f.width,O=f.comma,x=f.precision,j=f.trim,y=f.type;y==="n"?(O=!0,y="g"):Qh[y]||(x===void 0&&(x=12),j=!0,y="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var w=g==="$"?r:g==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",T=g==="$"?n:/[%p]/.test(y)?o:"",A=Qh[y],_=/[defgprs%]/.test(y);x=x===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function C(P){var E=w,I=T,k,D,M;if(y==="c")I=A(P)+I,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?l:A(Math.abs(P),x),j&&(P=HM(P)),F&&+P==0&&v!=="+"&&(F=!1),E=(F?v==="("?v:s:v==="-"||v==="("?"":v)+E,I=(y==="s"?rm[8+Zh/3]:"")+I+(F&&v==="("?")":""),_){for(k=-1,D=P.length;++k<D;)if(M=P.charCodeAt(k),48>M||M>57){I=(M===46?a+P.slice(k+1):P.slice(k))+I,P=P.slice(0,k);break}}}O&&!m&&(P=t(P,1/0));var z=E.length+P.length+I.length,q=z<b?new Array(b-z+1).join(d):"";switch(O&&m&&(P=t(q+P,q.length?b-I.length:1/0),q=""),h){case"<":P=E+P+I+q;break;case"=":P=E+q+P+I;break;case"^":P=q.slice(0,z=q.length>>1)+E+P+I+q.slice(z);break;default:P=q+E+P+I;break}return i(P)}return C.toString=function(){return f+""},C}function u(f,d){var h=c((f=Ia(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Tn(d)/3)))*3,g=Math.pow(10,-v),m=rm[8+v/3];return function(b){return h(g*b)+m}}return{format:c,formatPrefix:u}}var So,xc,nm;YM({thousands:",",grouping:[3],currency:["$",""]});function YM(e){return So=KM(e),xc=So.format,nm=So.formatPrefix,So}function XM(e){return Math.max(0,-Tn(Math.abs(e)))}function ZM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Tn(t)/3)))*3-Tn(Math.abs(e)))}function JM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function am(e,t,r,n){var a=sc(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=ZM(a,o))&&(n.precision=i),nm(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=JM(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=XM(a))&&(n.precision=i-(n.type==="%")*2);break}}return xc(n)}function br(e){var t=e.domain;return e.ticks=function(r){var n=t();return ic(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return am(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=oc(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),br(e)}function im(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 im(e).unknown(t)},e=arguments.length?Array.from(e,xo):[0,1],br(r)}function om(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 sm(e){return Math.log(e)}function lm(e){return Math.exp(e)}function QM(e){return-Math.log(-e)}function e3(e){return-Math.exp(-e)}function t3(e){return isFinite(e)?+("1e"+e):e<0?0:e}function r3(e){return e===10?t3:e===Math.E?Math.exp:t=>Math.pow(e,t)}function n3(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 cm(e){return(t,r)=>-e(-t,r)}function wc(e){const t=e(sm,lm),r=t.domain;let n=10,a,i;function o(){return a=n3(n),i=r3(n),r()[0]<0?(a=cm(a),i=cm(i),e(QM,e3)):e(sm,lm),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),v,g;const m=s==null?10:+s;let b=[];if(!(n%1)&&h-d<m){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(v=1;v<n;++v)if(g=d<0?v/i(-d):v*i(d),!(g<c)){if(g>u)break;b.push(g)}}else for(;d<=h;++d)for(v=n-1;v>=1;--v)if(g=d>0?v/i(-d):v*i(d),!(g<c)){if(g>u)break;b.push(g)}b.length*2<m&&(b=ic(c,u,m))}else b=ic(d,h,Math.min(h-d,m)).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=xc(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(om(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function um(){const e=wc(wo()).domain([1,10]);return e.copy=()=>Da(e,um()).base(e.base()),At.apply(e,arguments),e}function fm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function dm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Oc(e){var t=1,r=e(fm(t),dm(t));return r.constant=function(n){return arguments.length?e(fm(t=+n),dm(t)):t},br(r)}function pm(){var e=Oc(wo());return e.copy=function(){return Da(e,pm()).constant(e.constant())},At.apply(e,arguments)}function hm(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function a3(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function i3(e){return e<0?-e*e:e*e}function Sc(e){var t=e(lt,lt),r=1;function n(){return r===1?e(lt,lt):r===.5?e(a3,i3):e(hm(r),hm(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},br(t)}function Tc(){var e=Sc(wo());return e.copy=function(){return Da(e,Tc()).exponent(e.exponent())},At.apply(e,arguments),e}function o3(){return Tc.apply(null,arguments).exponent(.5)}function mm(e){return Math.sign(e)*e*e}function s3(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vm(){var e=yc(),t=[0,1],r=!1,n;function a(i){var o=s3(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(mm(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(mm)),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 vm(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),br(a)}function gm(){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]=dM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Pa(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 gm().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function ym(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Pa(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 ym().domain([e,t]).range(a).unknown(i)},At.apply(br(o),arguments)}function bm(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Pa(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 bm().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const Ac=new Date,jc=new Date;function Ze(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=>Ze(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)=>(Ac.setTime(+i),jc.setTime(+o),e(Ac),e(jc),Math.floor(r(Ac,jc))),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=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ao.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ze(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,jt=nr*60,ar=jt*60,ir=ar*24,Pc=ir*7,xm=ir*30,_c=ir*365,Rr=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Rr.range;const Ec=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getMinutes());Ec.range;const Cc=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getUTCMinutes());Cc.range;const $c=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*jt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());$c.range;const kc=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());kc.range;const La=Ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jt)/ir,e=>e.getDate()-1);La.range;const jo=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);jo.range;const wm=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));wm.range;function Br(e){return Ze(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())*jt)/Pc)}const Po=Br(0),_o=Br(1),l3=Br(2),c3=Br(3),An=Br(4),u3=Br(5),f3=Br(6);Po.range,_o.range,l3.range,c3.range,An.range,u3.range,f3.range;function Fr(e){return Ze(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=Fr(0),Co=Fr(1),d3=Fr(2),p3=Fr(3),jn=Fr(4),h3=Fr(5),m3=Fr(6);Eo.range,Co.range,d3.range,p3.range,jn.range,h3.range,m3.range;const Mc=Ze(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());Mc.range;const Nc=Ze(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());Nc.range;const or=Ze(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:Ze(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=Ze(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:Ze(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 Om(e,t,r,n,a,i){const o=[[Rr,1,nr],[Rr,5,5*nr],[Rr,15,15*nr],[Rr,30,30*nr],[i,1,jt],[i,5,5*jt],[i,15,15*jt],[i,30,30*jt],[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,xm],[t,3,3*xm],[e,1,_c]];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),v=h?h.range(c,+u+1):[];return d?v.reverse():v}function l(c,u,f){const d=Math.abs(u-c)/f,h=ac(([,,m])=>m).right(o,d);if(h===o.length)return e.every(sc(c/_c,u/_c,f));if(h===0)return Ao.every(Math.max(sc(c,u,f),1));const[v,g]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return v.every(g)}return[s,l]}const[v3,g3]=Om(sr,Nc,Eo,wm,kc,Cc),[y3,b3]=Om(or,Mc,Po,La,$c,Ec);function Dc(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 Ic(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 x3(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),v=Fa(o),g=Ba(s),m=Fa(s),b=Ba(l),O=Fa(l),x={a:F,A:z,b:q,B:$,c:null,d:_m,e:_m,f:z3,g:Q3,G:tN,H:F3,I:U3,j:W3,L:Em,m:V3,M:G3,p:B,q:U,Q:Dm,s:Im,S:H3,u:q3,U:K3,V:Y3,w:X3,W:Z3,x:null,X:null,y:J3,Y:eN,Z:rN,"%":Nm},j={a:W,A:K,b:R,B:G,c:null,d:$m,e:$m,f:oN,g:vN,G:yN,H:nN,I:aN,j:iN,L:km,m:sN,M:lN,p:Y,q:te,Q:Dm,s:Im,S:cN,u:uN,U:fN,V:dN,w:pN,W:hN,x:null,X:null,y:mN,Y:gN,Z:bN,"%":Nm},y={a:C,A:P,b:E,B:I,c:k,d:jm,e:jm,f:I3,g:Am,G:Tm,H:Pm,I:Pm,j:k3,L:D3,m:$3,M:M3,p:_,q:C3,Q:R3,s:B3,S:N3,u:A3,U:j3,V:P3,w:T3,W:_3,x:D,X:M,y:Am,Y:Tm,Z:E3,"%":L3};x.x=w(r,x),x.X=w(n,x),x.c=w(t,x),j.x=w(r,j),j.X=w(n,j),j.c=w(t,j);function w(V,Z){return function(ee){var L=[],oe=-1,X=0,ce=V.length,re,me,We;for(ee instanceof Date||(ee=new Date(+ee));++oe<ce;)V.charCodeAt(oe)===37&&(L.push(V.slice(X,oe)),(me=Sm[re=V.charAt(++oe)])!=null?re=V.charAt(++oe):me=re==="e"?" ":"0",(We=Z[re])&&(re=We(ee,me)),L.push(re),X=oe+1);return L.push(V.slice(X,oe)),L.join("")}}function T(V,Z){return function(ee){var L=Ra(1900,void 0,1),oe=A(L,V,ee+="",0),X,ce;if(oe!=ee.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(Z&&!("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?(X=Ic(Ra(L.y,0,1)),ce=X.getUTCDay(),X=ce>4||ce===0?Co.ceil(X):Co(X),X=jo.offset(X,(L.V-1)*7),L.y=X.getUTCFullYear(),L.m=X.getUTCMonth(),L.d=X.getUTCDate()+(L.w+6)%7):(X=Dc(Ra(L.y,0,1)),ce=X.getDay(),X=ce>4||ce===0?_o.ceil(X):_o(X),X=La.offset(X,(L.V-1)*7),L.y=X.getFullYear(),L.m=X.getMonth(),L.d=X.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?Ic(Ra(L.y,0,1)).getUTCDay():Dc(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,Ic(L)):Dc(L)}}function A(V,Z,ee,L){for(var oe=0,X=Z.length,ce=ee.length,re,me;oe<X;){if(L>=ce)return-1;if(re=Z.charCodeAt(oe++),re===37){if(re=Z.charAt(oe++),me=y[re in Sm?Z.charAt(oe++):re],!me||(L=me(V,ee,L))<0)return-1}else if(re!=ee.charCodeAt(L++))return-1}return L}function _(V,Z,ee){var L=c.exec(Z.slice(ee));return L?(V.p=u.get(L[0].toLowerCase()),ee+L[0].length):-1}function C(V,Z,ee){var L=h.exec(Z.slice(ee));return L?(V.w=v.get(L[0].toLowerCase()),ee+L[0].length):-1}function P(V,Z,ee){var L=f.exec(Z.slice(ee));return L?(V.w=d.get(L[0].toLowerCase()),ee+L[0].length):-1}function E(V,Z,ee){var L=b.exec(Z.slice(ee));return L?(V.m=O.get(L[0].toLowerCase()),ee+L[0].length):-1}function I(V,Z,ee){var L=g.exec(Z.slice(ee));return L?(V.m=m.get(L[0].toLowerCase()),ee+L[0].length):-1}function k(V,Z,ee){return A(V,t,Z,ee)}function D(V,Z,ee){return A(V,r,Z,ee)}function M(V,Z,ee){return A(V,n,Z,ee)}function F(V){return o[V.getDay()]}function z(V){return i[V.getDay()]}function q(V){return l[V.getMonth()]}function $(V){return s[V.getMonth()]}function B(V){return a[+(V.getHours()>=12)]}function U(V){return 1+~~(V.getMonth()/3)}function W(V){return o[V.getUTCDay()]}function K(V){return i[V.getUTCDay()]}function R(V){return l[V.getUTCMonth()]}function G(V){return s[V.getUTCMonth()]}function Y(V){return a[+(V.getUTCHours()>=12)]}function te(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Z=w(V+="",x);return Z.toString=function(){return V},Z},parse:function(V){var Z=T(V+="",!1);return Z.toString=function(){return V},Z},utcFormat:function(V){var Z=w(V+="",j);return Z.toString=function(){return V},Z},utcParse:function(V){var Z=T(V+="",!0);return Z.toString=function(){return V},Z}}}var Sm={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,w3=/^%/,O3=/[\\^$*+?|[\]().{}]/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 S3(e){return e.replace(O3,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(S3).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function T3(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function A3(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function j3(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function P3(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function _3(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Tm(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Am(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 E3(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 C3(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 $3(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 jm(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function k3(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 Pm(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function M3(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N3(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function D3(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function I3(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 L3(e,t,r){var n=w3.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function R3(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function B3(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function _m(e,t){return be(e.getDate(),t,2)}function F3(e,t){return be(e.getHours(),t,2)}function U3(e,t){return be(e.getHours()%12||12,t,2)}function W3(e,t){return be(1+La.count(or(e),e),t,3)}function Em(e,t){return be(e.getMilliseconds(),t,3)}function z3(e,t){return Em(e,t)+"000"}function V3(e,t){return be(e.getMonth()+1,t,2)}function G3(e,t){return be(e.getMinutes(),t,2)}function H3(e,t){return be(e.getSeconds(),t,2)}function q3(e){var t=e.getDay();return t===0?7:t}function K3(e,t){return be(Po.count(or(e)-1,e),t,2)}function Cm(e){var t=e.getDay();return t>=4||t===0?An(e):An.ceil(e)}function Y3(e,t){return e=Cm(e),be(An.count(or(e),e)+(or(e).getDay()===4),t,2)}function X3(e){return e.getDay()}function Z3(e,t){return be(_o.count(or(e)-1,e),t,2)}function J3(e,t){return be(e.getFullYear()%100,t,2)}function Q3(e,t){return e=Cm(e),be(e.getFullYear()%100,t,2)}function eN(e,t){return be(e.getFullYear()%1e4,t,4)}function tN(e,t){var r=e.getDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getFullYear()%1e4,t,4)}function rN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function $m(e,t){return be(e.getUTCDate(),t,2)}function nN(e,t){return be(e.getUTCHours(),t,2)}function aN(e,t){return be(e.getUTCHours()%12||12,t,2)}function iN(e,t){return be(1+jo.count(sr(e),e),t,3)}function km(e,t){return be(e.getUTCMilliseconds(),t,3)}function oN(e,t){return km(e,t)+"000"}function sN(e,t){return be(e.getUTCMonth()+1,t,2)}function lN(e,t){return be(e.getUTCMinutes(),t,2)}function cN(e,t){return be(e.getUTCSeconds(),t,2)}function uN(e){var t=e.getUTCDay();return t===0?7:t}function fN(e,t){return be(Eo.count(sr(e)-1,e),t,2)}function Mm(e){var t=e.getUTCDay();return t>=4||t===0?jn(e):jn.ceil(e)}function dN(e,t){return e=Mm(e),be(jn.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function pN(e){return e.getUTCDay()}function hN(e,t){return be(Co.count(sr(e)-1,e),t,2)}function mN(e,t){return be(e.getUTCFullYear()%100,t,2)}function vN(e,t){return e=Mm(e),be(e.getUTCFullYear()%100,t,2)}function gN(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function yN(e,t){var r=e.getUTCDay();return e=r>=4||r===0?jn(e):jn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function bN(){return"+0000"}function Nm(){return"%"}function Dm(e){return+e}function Im(e){return Math.floor(+e/1e3)}var Pn,Lm,Rm;xN({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 xN(e){return Pn=x3(e),Lm=Pn.format,Pn.parse,Rm=Pn.utcFormat,Pn.utcParse,Pn}function wN(e){return new Date(e)}function ON(e){return e instanceof Date?+e:+new Date(+e)}function Lc(e,t,r,n,a,i,o,s,l,c){var u=yc(),f=u.invert,d=u.domain,h=c(".%L"),v=c(":%S"),g=c("%I:%M"),m=c("%I %p"),b=c("%a %d"),O=c("%b %d"),x=c("%B"),j=c("%Y");function y(w){return(l(w)<w?h:s(w)<w?v:o(w)<w?g:i(w)<w?m:n(w)<w?a(w)<w?b:O:r(w)<w?x:j)(w)}return u.invert=function(w){return new Date(f(w))},u.domain=function(w){return arguments.length?d(Array.from(w,ON)):d().map(wN)},u.ticks=function(w){var T=d();return e(T[0],T[T.length-1],w??10)},u.tickFormat=function(w,T){return T==null?y:c(T)},u.nice=function(w){var T=d();return(!w||typeof w.range!="function")&&(w=t(T[0],T[T.length-1],w??10)),w?d(om(T,w)):u},u.copy=function(){return Da(u,Lc(e,t,r,n,a,i,o,s,l,c))},u}function SN(){return At.apply(Lc(y3,b3,or,Mc,Po,La,$c,Ec,Rr,Lm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function TN(){return At.apply(Lc(v3,g3,sr,Nc,Eo,jo,kc,Cc,Rr,Rm).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,v;return arguments.length?([h,v]=d,o=f(h,v),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 xr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Bm(){var e=br($o()(lt));return e.copy=function(){return xr(e,Bm())},rr.apply(e,arguments)}function Fm(){var e=wc($o()).domain([1,10]);return e.copy=function(){return xr(e,Fm()).base(e.base())},rr.apply(e,arguments)}function Um(){var e=Oc($o());return e.copy=function(){return xr(e,Um()).constant(e.constant())},rr.apply(e,arguments)}function Rc(){var e=Sc($o());return e.copy=function(){return xr(e,Rc()).exponent(e.exponent())},rr.apply(e,arguments)}function AN(){return Rc.apply(null,arguments).exponent(.5)}function Wm(){var e=[],t=lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((Pa(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)=>fM(e,i/n))},r.copy=function(){return Wm(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 v(g){return function(m){var b,O,x;return arguments.length?([b,O,x]=m,c=LM(g,[b,O,x]),h):[c(0),c(.5),c(1)]}}return h.range=v(Sn),h.rangeRound=v(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 zm(){var e=br(ko()(lt));return e.copy=function(){return xr(e,zm())},rr.apply(e,arguments)}function Vm(){var e=wc(ko()).domain([.1,1,10]);return e.copy=function(){return xr(e,Vm()).base(e.base())},rr.apply(e,arguments)}function Gm(){var e=Oc(ko());return e.copy=function(){return xr(e,Gm()).constant(e.constant())},rr.apply(e,arguments)}function Bc(){var e=Sc(ko());return e.copy=function(){return xr(e,Bc()).exponent(e.exponent())},rr.apply(e,arguments)}function jN(){return Bc.apply(null,arguments).exponent(.5)}const Hm=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ea,scaleDiverging:zm,scaleDivergingLog:Vm,scaleDivergingPow:Bc,scaleDivergingSqrt:jN,scaleDivergingSymlog:Gm,scaleIdentity:im,scaleImplicit:lc,scaleLinear:To,scaleLog:um,scaleOrdinal:cc,scalePoint:Ca,scalePow:Tc,scaleQuantile:gm,scaleQuantize:ym,scaleRadial:vm,scaleSequential:Bm,scaleSequentialLog:Fm,scaleSequentialPow:Rc,scaleSequentialQuantile:Wm,scaleSequentialSqrt:AN,scaleSequentialSymlog:Um,scaleSqrt:o3,scaleSymlog:pm,scaleThreshold:bm,scaleTime:SN,scaleUtc:TN,tickFormat:am},Symbol.toStringTag,{value:"Module"}));var PN=nn;function _N(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&&!PN(o):r(o,s)))var s=o,l=i}return l}var qm=_N;function EN(e,t){return e>t}var CN=EN,$N=qm,kN=CN,MN=mn;function NN(e){return e&&e.length?$N(e,MN,kN):void 0}var DN=NN;const wr=ke(DN);function IN(e,t){return e<t}var LN=IN,RN=qm,BN=LN,FN=mn;function UN(e){return e&&e.length?RN(e,FN,BN):void 0}var WN=UN;const Mo=ke(WN);var zN=rl,VN=vr,GN=zp,HN=ft;function qN(e,t){var r=HN(e)?zN:GN;return r(e,VN(t))}var KN=qN,YN=Up,XN=KN;function ZN(e,t){return YN(XN(e,t),1)}var JN=ZN;const QN=ke(JN);var e5=Ul;function t5(e,t){return e5(e,t)}var r5=t5;const Ur=ke(r5);var _n=1e9,n5={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wc,Re=!0,Pt="[DecimalError] ",Wr=Pt+"Invalid argument: ",Fc=Pt+"Exponent out of range: ",En=Math.floor,zr=Math.pow,a5=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,gt,rt=1e7,Le=7,Km=9007199254740991,No=En(Km/Le),ae={};ae.absoluteValue=ae.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ae.comparedTo=ae.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},ae.decimalPlaces=ae.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ae.dividedBy=ae.div=function(e){return lr(this,new this.constructor(e))},ae.dividedToIntegerBy=ae.idiv=function(e){var t=this,r=t.constructor;return Ce(lr(t,new r(e),0,1),r.precision)},ae.equals=ae.eq=function(e){return!this.cmp(e)},ae.exponent=function(){return qe(this)},ae.greaterThan=ae.gt=function(e){return this.cmp(e)>0},ae.greaterThanOrEqualTo=ae.gte=function(e){return this.cmp(e)>=0},ae.isInteger=ae.isint=function(){return this.e>this.d.length-2},ae.isNegative=ae.isneg=function(){return this.s<0},ae.isPositive=ae.ispos=function(){return this.s>0},ae.isZero=function(){return this.s===0},ae.lessThan=ae.lt=function(e){return this.cmp(e)<0},ae.lessThanOrEqualTo=ae.lte=function(e){return this.cmp(e)<1},ae.logarithm=ae.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(gt))throw Error(Pt+"NaN");if(r.s<1)throw Error(Pt+(r.s?"NaN":"-Infinity"));return r.eq(gt)?new n(0):(Re=!1,t=lr(Ua(r,i),Ua(e,i),i),Re=!0,Ce(t,a))},ae.minus=ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Jm(t,e):Ym(t,(e.s=-e.s,e))},ae.modulo=ae.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Pt+"NaN");return r.s?(Re=!1,t=lr(r,e,0,1).times(e),Re=!0,r.minus(t)):Ce(new n(r),a)},ae.naturalExponential=ae.exp=function(){return Xm(this)},ae.naturalLogarithm=ae.ln=function(){return Ua(this)},ae.negated=ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ae.plus=ae.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ym(t,e):Jm(t,(e.s=-e.s,e))},ae.precision=ae.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=qe(a)+1,n=a.d.length-1,r=n*Le+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},ae.squareRoot=ae.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(Pt+"NaN")}for(e=qe(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(Ce(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Re=!0,Ce(n,r)},ae.times=ae.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?Ce(e,f.precision):e},ae.toDecimalPlaces=ae.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),Ce(r,e+qe(r)+1,t))},ae.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Vr(n,!0):(zt(e,0,_n),t===void 0?t=a.rounding:zt(t,0,8),n=Ce(new a(n),e+1,t),r=Vr(n,!0,e+1)),r},ae.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Vr(a):(zt(e,0,_n),t===void 0?t=i.rounding:zt(t,0,8),n=Ce(new i(a),e+qe(a)+1,t),r=Vr(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ae.toInteger=ae.toint=function(){var e=this,t=e.constructor;return Ce(new t(e),qe(e)+1,t.rounding)},ae.toNumber=function(){return+this},ae.toPower=ae.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(gt);if(s=new l(s),!s.s){if(e.s<1)throw Error(Pt+"Infinity");return s}if(s.eq(gt))return s;if(n=l.precision,e.eq(gt))return Ce(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=u<0?-u:u)<=Km){for(a=new l(gt),t=Math.ceil(n/Le+4),Re=!1;r%2&&(a=a.times(s),Qm(a.d,t)),r=En(r/2),r!==0;)s=s.times(s),Qm(s.d,t);return Re=!0,e.s<0?new l(gt).div(a):Ce(a,n)}}else if(i<0)throw Error(Pt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Re=!1,a=e.times(Ua(s,n+c)),Re=!0,a=Xm(a),a.s=i,a},ae.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=qe(a),n=Vr(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,_n),t===void 0?t=i.rounding:zt(t,0,8),a=Ce(new i(a),e,t),r=qe(a),n=Vr(a,e<=r||r<=i.toExpNeg,e)),n},ae.toSignificantDigits=ae.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)),Ce(new n(r),e,t)},ae.toString=ae.valueOf=ae.val=ae.toJSON=ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=qe(e),r=e.constructor;return Vr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Ym(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?Ce(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/Le),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?Ce(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=Le-n.length,r&&(i+=Or(r)),i+=n;o=e[t],n=o+"",r=Le-n.length,r&&(i+=Or(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,v,g,m,b,O,x,j,y,w,T,A,_=n.constructor,C=n.s==a.s?1:-1,P=n.d,E=a.d;if(!n.s)return new _(n);if(!a.s)throw Error(Pt+"Division by zero");for(l=n.e-a.e,T=E.length,y=P.length,h=new _(C),v=h.d=[],c=0;E[c]==(P[c]||0);)++c;if(E[c]>(P[c]||0)&&--l,i==null?O=i=_.precision:o?O=i+(qe(n)-qe(a))+1:O=i,O<0)return new _(0);if(O=O/Le+2|0,c=0,T==1)for(u=0,E=E[0],O++;(c<y||u)&&O--;c++)x=u*rt+(P[c]||0),v[c]=x/E|0,u=x%E|0;else{for(u=rt/(E[0]+1)|0,u>1&&(E=e(E,u),P=e(P,u),T=E.length,y=P.length),j=T,g=P.slice(0,T),m=g.length;m<T;)g[m++]=0;A=E.slice(),A.unshift(0),w=E[0],E[1]>=rt/2&&++w;do u=0,s=t(E,g,T,m),s<0?(b=g[0],T!=m&&(b=b*rt+(g[1]||0)),u=b/w|0,u>1?(u>=rt&&(u=rt-1),f=e(E,u),d=f.length,m=g.length,s=t(f,g,d,m),s==1&&(u--,r(f,T<d?A:E,d))):(u==0&&(s=u=1),f=E.slice()),d=f.length,d<m&&f.unshift(0),r(g,f,m),s==-1&&(m=g.length,s=t(E,g,T,m),s<1&&(u++,r(g,T<m?A:E,m))),m=g.length):s===0&&(u++,g=[0]),v[c++]=u,s&&g[0]?g[m++]=P[j]||0:(g=[P[j]],m=1);while((j++<y||g[0]!==void 0)&&O--)}return v[0]||v.shift(),h.e=l,Ce(h,o?i+qe(h)+1:i)}}();function Xm(e,t){var r,n,a,i,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(qe(e)>16)throw Error(Fc+qe(e));if(!e.s)return new u(gt);for(Re=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(zr(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new u(gt),u.precision=s;;){if(a=Ce(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=Ce(i.times(i),s);return u.precision=f,t==null?(Re=!0,Ce(i,f)):i}i=o}}function qe(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function Uc(e,t,r){if(t>e.LN10.sd())throw Re=!0,r&&(e.precision=r),Error(Pt+"LN10 precision limit exceeded");return Ce(new e(e.LN10),t)}function Or(e){for(var t="";e--;)t+="0";return t}function Ua(e,t){var r,n,a,i,o,s,l,c,u,f=1,d=10,h=e,v=h.d,g=h.constructor,m=g.precision;if(h.s<1)throw Error(Pt+(h.s?"NaN":"-Infinity"));if(h.eq(gt))return new g(0);if(t==null?(Re=!1,c=m):c=t,h.eq(10))return t==null&&(Re=!0),Uc(g,c);if(c+=d,g.precision=c,r=Vt(v),n=r.charAt(0),i=qe(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=qe(h),n>1?(h=new g("0."+r),i++):h=new g(n+"."+r.slice(1))}else return l=Uc(g,c+2,m).times(i+""),h=Ua(new g(n+"."+r.slice(1)),c-d).plus(l),g.precision=m,t==null?(Re=!0,Ce(h,m)):h;for(s=o=h=lr(h.minus(gt),h.plus(gt),c),u=Ce(h.times(h),c),a=3;;){if(o=Ce(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(Uc(g,c+2,m).times(i+""))),s=lr(s,new g(f),c),g.precision=m,t==null?(Re=!0,Ce(s,m)):s;s=l,a+=2}}function Zm(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/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Le;n<a;)e.d.push(+t.slice(n,n+=Le));t=t.slice(n),n=Le-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Re&&(e.e>No||e.e<-No))throw Error(Fc+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ce(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+=Le,a=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Le),i=f.length,u>=i)return e;for(c=i=f[u],o=1;i>=10;i/=10)o++;n%=Le,a=n-Le+o}if(r!==void 0&&(i=zr(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/zr(10,o-a):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=qe(e),f.length=1,t=t-i-1,f[0]=zr(10,(Le-t%Le)%Le),e.e=En(-t/Le)||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=zr(10,Le-n),f[u]=a>0?(c/zr(10,o-a)%zr(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(Fc+qe(e));return e}function Jm(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?Ce(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/Le),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?Ce(t,h):t):new d(0)}function Vr(e,t,r){var n,a=qe(e),i=Vt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Or(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Or(-a-1)+i,r&&(n=r-o)>0&&(i+=Or(n))):a>=o?(i+=Or(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Or(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=Or(n))),e.s<0?"-"+i:i}function Qm(e,t){if(e.length>t)return e.length=t,!0}function ev(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 Zm(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,a5.test(i))Zm(o,i);else throw Error(Wr+i)}if(a.prototype=ae,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=ev,a.config=a.set=i5,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 i5(e){if(!e||typeof e!="object")throw Error(Pt+"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=ev(n5);gt=new Wc(1);const Ee=Wc;function o5(e){return u5(e)||c5(e)||l5(e)||s5()}function s5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
213
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l5(e,t){if(e){if(typeof e=="string")return zc(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 zc(e,t)}}function c5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function u5(e){if(Array.isArray(e))return zc(e)}function zc(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 f5=function(t){return t},tv={},rv=function(t){return t===tv},nv=function(t){return function r(){return arguments.length===0||arguments.length===1&&rv(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},d5=function e(t,r){return t===1?r:nv(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!==tv}).length;return o>=t?r.apply(void 0,a):e(t-o,nv(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 rv(f)?l.shift():f});return r.apply(void 0,o5(u).concat(l))}))})},Do=function(t){return d5(t.length,t)},Vc=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},p5=Do(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),h5=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return f5;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))}},Gc=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},av=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 m5(e){var t;return e===0?t=1:t=Math.floor(new Ee(e).abs().log(10).toNumber())+1,t}function v5(e,t,r){for(var n=new Ee(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var g5=Do(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),y5=Do(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),b5=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:v5,getDigitCount:m5,interpolateNumber:g5,uninterpolateNumber:y5,uninterpolateTruncation:b5};function Hc(e){return O5(e)||w5(e)||iv(e)||x5()}function x5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
214
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function O5(e){if(Array.isArray(e))return qc(e)}function Wa(e,t){return A5(e)||T5(e,t)||iv(e,t)||S5()}function S5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
215
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iv(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 T5(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 A5(e){if(Array.isArray(e))return e}function ov(e){var t=Wa(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function sv(e,t,r){if(e.lte(0))return new Ee(0);var n=Io.getDigitCount(e.toNumber()),a=new Ee(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Ee(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Ee(Math.ceil(l))}function j5(e,t,r){var n=1,a=new Ee(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ee(10).pow(Io.getDigitCount(e)-1),a=new Ee(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ee(Math.floor(e)))}else e===0?a=new Ee(Math.floor((t-1)/2)):r||(a=new Ee(Math.floor(e)));var o=Math.floor((t-1)/2),s=h5(p5(function(l){return a.add(new Ee(l-o).mul(n)).toNumber()}),Vc);return s(0,t)}function lv(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 Ee(0),tickMin:new Ee(0),tickMax:new Ee(0)};var i=sv(new Ee(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Ee(0):(o=new Ee(e).add(t).div(2),o=o.sub(new Ee(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Ee(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?lv(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 Ee(s).mul(i)),tickMax:o.add(new Ee(l).mul(i))})}function P5(e){var t=Wa(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=ov([r,n]),l=Wa(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(Hc(Vc(0,a-1).map(function(){return 1/0}))):[].concat(Hc(Vc(0,a-1).map(function(){return-1/0})),[u]);return r>n?Gc(f):f}if(c===u)return j5(c,a,i);var d=lv(c,u,o,i),h=d.step,v=d.tickMin,g=d.tickMax,m=Io.rangeStep(v,g.add(new Ee(.1).mul(h)),h);return r>n?Gc(m):m}function _5(e,t){var r=Wa(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=ov([n,a]),s=Wa(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=sv(new Ee(c).sub(l).div(u-1),i,0),d=[].concat(Hc(Io.rangeStep(new Ee(l),new Ee(c).sub(new Ee(.99).mul(f)),f)),[c]);return n>a?Gc(d):d}var E5=av(P5),C5=av(_5),$5=process.env.NODE_ENV==="production",Kc="Invariant failed";function ht(e,t){if($5)throw new Error(Kc);var r=typeof t=="function"?t():t,n=r?"".concat(Kc,": ").concat(r):Kc;throw new Error(n)}var k5=["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 M5(e,t){return L5(e)||I5(e,t)||D5(e,t)||N5()}function N5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
216
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D5(e,t){if(e){if(typeof e=="string")return cv(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 cv(e,t)}}function cv(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 I5(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 L5(e){if(Array.isArray(e))return e}function R5(e,t){if(e==null)return{};var r=B5(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 B5(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 F5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U5(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dv(n.key),n)}}function W5(e,t,r){return t&&U5(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function z5(e,t,r){return t=Ro(t),V5(e,uv()?Reflect.construct(t,r||[],Ro(e).constructor):t.apply(e,r))}function V5(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 G5(e)}function G5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uv=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}function H5(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 fv(e,t,r){return t=dv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dv(e){var t=q5(e,"string");return Cn(t)=="symbol"?t:t+""}function q5(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 F5(this,t),z5(this,t,arguments)}return H5(t,e),W5(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=R5(n,k5),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 v=l.map(function(g){var m=c(g,s),b=m.x,O=m.y,x=m.value,j=m.errorVal;if(!j)return null;var y=[],w,T;if(Array.isArray(j)){var A=M5(j,2);w=A[0],T=A[1]}else w=T=j;if(i==="vertical"){var _=u.scale,C=O+a,P=C+o,E=C-o,I=_(x-w),k=_(x+T);y.push({x1:k,y1:P,x2:k,y2:E}),y.push({x1:I,y1:C,x2:k,y2:C}),y.push({x1:I,y1:P,x2:I,y2:E})}else if(i==="horizontal"){var D=f.scale,M=b+a,F=M-o,z=M+o,q=D(x-w),$=D(x+T);y.push({x1:F,y1:$,x2:z,y2:$}),y.push({x1:M,y1:q,x2:M,y2:$}),y.push({x1:F,y1:q,x2:z,y2:q})}return S.createElement(xe,Lo({className:"recharts-errorBar",key:"bar-".concat(y.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},h),y.map(function(B){return S.createElement("line",Lo({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return S.createElement(xe,{className:"recharts-errorBars"},v)}}])}(S.Component);fv($n,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),fv($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 pv(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 Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pv(Object(r),!0).forEach(function(n){K5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K5(e,t,r){return t=Y5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y5(e){var t=X5(e,"string");return za(t)=="symbol"?t:t+""}function X5(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 hv=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=vt(r,gn);if(!o)return null;var s=gn.defaultProps,l=s!==void 0?Gr(Gr({},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,v=h.sectors||h.data||[];return u.concat(v.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?Gr(Gr({},d),f.props):{},v=h.dataKey,g=h.name,m=h.legendType,b=h.hide;return{inactive:b,dataKey:v,type:l.iconType||m||"square",color:Zc(f),value:g||v,payload:h}}),Gr(Gr(Gr({},l),gn.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 mv(e){return e6(e)||Q5(e)||J5(e)||Z5()}function Z5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
217
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J5(e,t){if(e){if(typeof e=="string")return Xc(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 Xc(e,t)}}function Q5(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function e6(e){if(Array.isArray(e))return Xc(e)}function Xc(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 vv(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 Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vv(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(e,t,r){return t=t6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t6(e){var t=r6(e,"string");return Va(t)=="symbol"?t:t+""}function r6(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 Je(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=QN(e,function(s){return Je(s,t)});if(r==="number"){var i=a.filter(function(s){return Q(s)||parseFloat(s)});return i.length?[Mo(i),wr(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 n6=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 v=[];if($t(d-f)===$t(l[1]-l[0])){h=d;var g=f+l[1]-l[0];v[0]=Math.min(g,(g+u)/2),v[1]=Math.max(g,(g+u)/2)}else{h=u;var m=d+l[1]-l[0];v[0]=Math.min(f,(m+f)/2),v[1]=Math.max(f,(m+f)/2)}var b=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>b[0]&&t<=b[1]||t>=v[0]&&t<=v[1]){o=a[c].index;break}}else{var O=Math.min(u,d),x=Math.max(u,d);if(t>(O+f)/2&&t<=(x+f)/2){o=a[c].index;break}}}else for(var j=0;j<s;j++)if(j===0&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j>0&&j<s-1&&t>(n[j].coordinate+n[j-1].coordinate)/2&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j===s-1&&t>(n[j].coordinate+n[j-1].coordinate)/2){o=n[j].index;break}return o},Zc=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ue(Ue({},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},a6=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 v=u[f[d]],g=v.items,m=v.cateAxisId,b=g.filter(function(T){return Qt(T.type).indexOf("Bar")>=0});if(b&&b.length){var O=b[0].type.defaultProps,x=O!==void 0?Ue(Ue({},O),b[0].props):b[0].props,j=x.barSize,y=x[m];o[y]||(o[y]=[]);var w=fe(j)?r:j;o[y].push({item:b[0],stackList:b.slice(1),barSize:fe(w)?void 0:Mr(w,n,0)})}}return o},i6=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=Mr(r,a,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,v=o.reduce(function(j,y){return j+y.barSize||0},0);v+=(l-1)*c,v>=a&&(v-=(l-1)*c,c=0),v>=a&&h>0&&(d=!0,h*=.9,v=l*h);var g=(a-v)/2>>0,m={offset:g-c,size:0};u=o.reduce(function(j,y){var w={item:y.item,position:{offset:m.offset+m.size+c,size:d?h:y.barSize}},T=[].concat(mv(j),[w]);return m=T[T.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){T.push({item:A,position:m})}),T},f)}else{var b=Mr(n,a,0,!0);a-2*b-(l-1)*c<=0&&(c=0);var O=(a-2*b-(l-1)*c)/l;O>1&&(O>>=0);var x=s===+s?Math.min(O,s):O;u=o.reduce(function(j,y,w){var T=[].concat(mv(j),[{item:y.item,position:{offset:b+(O+c)*w+(O-x)/2,size:x}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){T.push({item:A,position:T[T.length-1].position})}),T},f)}return u},o6=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=hv({children:i,legendWidth:l});if(c){var u=a||{},f=u.width,d=u.height,h=c.align,v=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&h!=="center"&&Q(t[h]))return Ue(Ue({},t),{},kn({},h,t[h]+(f||0)));if((g==="horizontal"||g==="vertical"&&h==="center")&&v!=="middle"&&Q(t[v]))return Ue(Ue({},t),{},kn({},v,t[v]+(d||0)))}return t},s6=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},gv=function(t,r,n,a,i){var o=r.props.children,s=dt(o,$n).filter(function(c){return s6(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=Je(u,n);if(fe(f))return c;var d=Array.isArray(f)?[Mo(f),wr(f)]:[f,f],h=l.reduce(function(v,g){var m=Je(u,g,0),b=d[0]-Math.abs(Array.isArray(m)?m[0]:m),O=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(b,v[0]),Math.max(O,v[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},l6=function(t,r,n,a,i){var o=r.map(function(s){return gv(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},yv=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&gv(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},[])},bv=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},xv=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},c6=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(Cr(a)){var l="scale".concat(Fi(a));return{scale:(Hm[l]||Ca)(),realScaleType:Hm[l]?l:"point"}}return pe(a)?{scale:a}:{scale:Ca(),realScaleType:"point"}},wv=1e-4,u6=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])-wv,o=Math.max(a[0],a[1])+wv,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},f6=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},d6=function(t,r){if(!r||r.length!==2||!Q(r[0])||!Q(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(!Q(t[0])||t[0]<n)&&(i[0]=n),(!Q(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},p6=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])}},h6=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)}},m6={sign:p6,expand:CS,none:fn,silhouette:$S,wiggle:kS,positive:h6},v6=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=m6[n],o=ES().keys(a).value(function(s,l){return+Je(s,l,0)}).order(Al).offset(i);return o(t)},g6=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,v=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Ue(Ue({},d.type.defaultProps),d.props):d.props,g=v.stackId,m=v.hide;if(m)return f;var b=v[n],O=f[b]||{hasStack:!1,stackGroups:{}};if(Xe(g)){var x=O.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),O.hasStack=!0,O.stackGroups[g]=x}else O.stackGroups[kr("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Ue(Ue({},f),{},kn({},b,O))},l),u={};return Object.keys(c).reduce(function(f,d){var h=c[d];if(h.hasStack){var v={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(g,m){var b=h.stackGroups[m];return Ue(Ue({},g),{},kn({},m,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:v6(t,b.items,i)}))},v)}return Ue(Ue({},f),{},kn({},d,h))},u)},y6=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=E5(c,i,s);return t.domain([Mo(u),wr(u)]),{niceTicks:u}}if(i&&a==="number"){var f=t.domain(),d=C5(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=Je(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var Ov=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=Je(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},b6=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]},x6=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ue(Ue({},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},w6=function(t){return t.reduce(function(r,n){return[Mo(n.concat([r[0]]).filter(Q)),wr(n.concat([r[1]]).filter(Q))]},[1/0,-1/0])},Sv=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=w6(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})},Tv=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Av=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qc=function(t,r,n){if(pe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Q(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(Tv.test(t[0])){var i=+Tv.exec(t[0])[1];a[0]=r[0]-i}else pe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Q(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Av.test(t[1])){var o=+Av.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=Hl(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},jv=function(t,r,n){return!t||!t.length||Ur(t,wt(n,"type.defaultProps.domain"))?r:t},Pv=function(t,r){var n=t.type.defaultProps?Ue(Ue({},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 Ue(Ue({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Zc(t),value:Je(r,a),type:l,payload:r,chartType:c,hide:u})};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)}function _v(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 Ev(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_v(Object(r),!0).forEach(function(n){O6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_v(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O6(e,t,r){return t=S6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S6(e){var t=T6(e,"string");return Ha(t)=="symbol"?t:t+""}function T6(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)}var Uo=Math.PI/180,A6=function(t){return t*180/Math.PI},nt=function(t,r,n,a){return{x:t+Math.cos(-Uo*a)*n,y:r+Math.sin(-Uo*a)*n}},j6=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))},P6=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=j6({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:A6(c),angleInRadian:c}},_6=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}},E6=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},Cv=function(t,r){var n=t.x,a=t.y,i=P6({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=_6(r),f=u.startAngle,d=u.endAngle,h=s,v;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;v=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;v=h>=d&&h<=f}return v?Ev(Ev({},r),{},{radius:o,angle:E6(h,r)}):null};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)}var C6=["offset"];function $6(e){return D6(e)||N6(e)||M6(e)||k6()}function k6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
218
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M6(e,t){if(e){if(typeof e=="string")return 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 N6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D6(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 I6(e,t){if(e==null)return{};var r=L6(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 L6(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 $v(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?$v(Object(r),!0).forEach(function(n){R6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R6(e,t,r){return t=B6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B6(e){var t=F6(e,"string");return qa(t)=="symbol"?t:t+""}function F6(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)}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 U6=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return pe(n)?n(a):a},W6=function(t,r){var n=$t(r-t),a=Math.min(Math.abs(r-t),360);return n*a},z6=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,v=l.endAngle,g=l.clockWise,m=(f+d)/2,b=W6(h,v),O=b>=0?1:-1,x,j;a==="insideStart"?(x=h+O*o,j=g):a==="insideEnd"?(x=v-O*o,j=!g):a==="end"&&(x=v+O*o,j=g),j=b<=0?j:!j;var y=nt(c,u,m,x),w=nt(c,u,m,x+(j?1:-1)*359),T="M".concat(y.x,",").concat(y.y,`
219
- A`).concat(m,",").concat(m,",0,1,").concat(j?0:1,`,
220
- `).concat(w.x,",").concat(w.y),A=fe(t.id)?kr("recharts-radial-line-"):t.id;return S.createElement("text",Ka({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",s)}),S.createElement("defs",null,S.createElement("path",{id:A,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(A)},r))},V6=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),v=h.x,g=h.y;return{x:v,y:g,textAnchor:v>=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 m=(l+c)/2,b=nt(o,s,m,d),O=b.x,x=b.y;return{x:O,y:x,textAnchor:"middle",verticalAnchor:"middle"}},G6=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",v=f>0?"start":"end",g=c>=0?1:-1,m=g*a,b=g>0?"end":"start",O=g>0?"start":"end";if(i==="top"){var x={x:s+c/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},x),n?{height:Math.max(l-n.y,0),width:c}:{})}if(i==="bottom"){var j={x:s+c/2,y:l+u+d,textAnchor:"middle",verticalAnchor:v};return Qe(Qe({},j),n?{height:Math.max(n.y+n.height-(l+u),0),width:c}:{})}if(i==="left"){var y={x:s-m,y:l+u/2,textAnchor:b,verticalAnchor:"middle"};return Qe(Qe({},y),n?{width:Math.max(y.x-n.x,0),height:u}:{})}if(i==="right"){var w={x:s+c+m,y:l+u/2,textAnchor:O,verticalAnchor:"middle"};return Qe(Qe({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:u}:{})}var T=n?{width:c,height:u}:{};return i==="insideLeft"?Qe({x:s+m,y:l+u/2,textAnchor:O,verticalAnchor:"middle"},T):i==="insideRight"?Qe({x:s+c-m,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},T):i==="insideTop"?Qe({x:s+c/2,y:l+d,textAnchor:"middle",verticalAnchor:v},T):i==="insideBottom"?Qe({x:s+c/2,y:l+u-d,textAnchor:"middle",verticalAnchor:h},T):i==="insideTopLeft"?Qe({x:s+m,y:l+d,textAnchor:O,verticalAnchor:v},T):i==="insideTopRight"?Qe({x:s+c-m,y:l+d,textAnchor:b,verticalAnchor:v},T):i==="insideBottomLeft"?Qe({x:s+m,y:l+u-d,textAnchor:O,verticalAnchor:h},T):i==="insideBottomRight"?Qe({x:s+c-m,y:l+u-d,textAnchor:b,verticalAnchor:h},T):an(i)&&(Q(i.x)||$r(i.x))&&(Q(i.y)||$r(i.y))?Qe({x:s+Mr(i.x,c),y:l+Mr(i.y,u),textAnchor:"end",verticalAnchor:"end"},T):Qe({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},T)},H6=function(t){return"cx"in t&&Q(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=I6(e,C6),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)&&!S.isValidElement(c)&&!pe(c))return null;if(S.isValidElement(c))return S.cloneElement(c,a);var h;if(pe(c)){if(h=S.createElement(c,a),S.isValidElement(h))return h}else h=U6(a);var v=H6(i),g=de(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return z6(a,h,g);var m=v?V6(a):G6(a);return S.createElement(po,Ka({className:ve("recharts-label",f)},g,m,{breakAll:d}),h)}it.displayName="Label";var kv=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,v=t.left,g=t.width,m=t.height,b=t.clockWise,O=t.labelViewBox;if(O)return O;if(Q(g)&&Q(m)){if(Q(f)&&Q(d))return{x:f,y:d,width:g,height:m};if(Q(h)&&Q(v))return{x:h,y:v,width:g,height:m}}return Q(f)&&Q(d)?{x:f,y:d,width:0,height:0}:Q(r)&&Q(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},q6=function(t,r){return t?t===!0?S.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?S.createElement(it,{key:"label-implicit",viewBox:r,value:t}):S.isValidElement(t)?t.type===it?S.cloneElement(t,{key:"label-implicit",viewBox:r}):S.createElement(it,{key:"label-implicit",content:t,viewBox:r}):pe(t)?S.createElement(it,{key:"label-implicit",content:t,viewBox:r}):an(t)?S.createElement(it,Ka({viewBox:r},t,{key:"label-implicit"})):null:null},K6=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=kv(t),o=dt(a,it).map(function(l,c){return S.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=q6(t.label,r||i);return[s].concat($6(o))};it.parseViewBox=kv,it.renderCallByParent=K6;function Y6(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var X6=Y6;const Z6=ke(X6);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 J6=["valueAccessor"],Q6=["data","dataKey","clockWise","id","textBreakAll"];function e4(e){return a4(e)||n4(e)||r4(e)||t4()}function t4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
221
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r4(e,t){if(e){if(typeof e=="string")return tu(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 tu(e,t)}}function n4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a4(e){if(Array.isArray(e))return tu(e)}function tu(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 Wo(){return Wo=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},Wo.apply(this,arguments)}function Mv(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 Nv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mv(Object(r),!0).forEach(function(n){i4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i4(e,t,r){return t=o4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o4(e){var t=s4(e,"string");return Ya(t)=="symbol"?t:t+""}function s4(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 Dv(e,t){if(e==null)return{};var r=l4(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 l4(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 c4=function(t){return Array.isArray(t.value)?Z6(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?c4:t,n=Dv(e,J6),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Dv(n,Q6);return!a||!a.length?null:S.createElement(xe,{className:"recharts-label-list"},a.map(function(u,f){var d=fe(i)?r(u,f):Je(u&&u.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return S.createElement(it,Wo({},de(u,!0),c,h,{parentViewBox:u.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(fe(o)?u:Nv(Nv({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function u4(e,t){return e?e===!0?S.createElement(Gt,{key:"labelList-implicit",data:t}):S.isValidElement(e)||pe(e)?S.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):an(e)?S.createElement(Gt,Wo({data:t},e,{key:"labelList-implicit"})):null:null}function f4(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 S.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=u4(e.label,t);return[i].concat(e4(a))}Gt.renderCallByParent=f4;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 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 Iv(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 Lv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iv(Object(r),!0).forEach(function(n){d4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d4(e,t,r){return t=p4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p4(e){var t=h4(e,"string");return Xa(t)=="symbol"?t:t+""}function h4(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 m4=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)/Uo,d=c?i:i+o*f,h=nt(r,n,u,d),v=nt(r,n,a,d),g=c?i-o*f:i,m=nt(r,n,u*Math.cos(f*Uo),g);return{center:h,circleTangency:v,lineTangency:m,theta:f}},Rv=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=m4(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,`
215
+ height and width.`,L,M,o,l,u,f,r);var W=!Array.isArray(h)&&Qt(h.type).endsWith("Chart");return S.Children.map(h,function(H){return S.isValidElement(H)?S.cloneElement(H,co({width:L,height:M},W?{style:co({height:"100%",width:"100%",maxHeight:M,maxWidth:L},H.props.style)}:{})):H})},[r,h,l,d,f,u,C,o]);return S.createElement("div",{id:m?"".concat(m):void 0,className:ge("recharts-responsive-container",b),style:co(co({},A),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:d}),ref:y},E)}),ec=function(t){return null};ec.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 mh(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 tc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mh(Object(r),!0).forEach(function(n){jk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jk(e,t,r){return t=Pk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pk(e){var t=_k(e,"string");return Ta(t)=="symbol"?t:t+""}function _k(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},Ek=2e3,Ck={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},gh="recharts_measurement_span";function $k(e){var t=tc({},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||vr.isSsr)return{width:0,height:0};var n=$k(r),a=JSON.stringify({text:t,copyStyle:n});if(xn.widthCache[a])return xn.widthCache[a];try{var i=document.getElementById(gh);i||(i=document.createElement("span"),i.setAttribute("id",gh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=tc(tc({},Ck),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>Ek&&(xn.cacheCount=0,xn.widthCache={}),l}catch{return{width:0,height:0}}},kk=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 uo(e,t){return Ik(e)||Dk(e,t)||Nk(e,t)||Mk()}function Mk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
216
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nk(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 Dk(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 Ik(e){if(Array.isArray(e))return e}function Lk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yh(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,Bk(n.key),n)}}function Rk(e,t,r){return t&&yh(e.prototype,t),r&&yh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bk(e){var t=Fk(e,"string");return ja(t)=="symbol"?t:t+""}function Fk(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 String(e)}var bh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Uk=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Wk=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,wh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},zk=Object.keys(wh),wn="NaN";function Vk(e,t){return e*wh[t]}var fo=function(){function e(t,r){Lk(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Uk.test(r)&&(this.num=NaN,this.unit=""),zk.includes(r)&&(this.num=Vk(t,r),this.unit="px")}return Rk(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=Wk.exec(r))!==null&&n!==void 0?n:[],i=uo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function Oh(e){if(e.includes(wn))return wn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=bh.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(bh,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=xh.exec(t))!==null&&f!==void 0?f:[],h=uo(d,4),g=h[1],v=h[2],m=h[3],b=fo.parse(g??""),w=fo.parse(m??""),x=v==="+"?b.add(w):b.subtract(w);if(x.isNaN())return wn;t=t.replace(xh,x.toString())}return t}var Sh=/\(([^()]*)\)/;function Gk(e){for(var t=e;t.includes("(");){var r=Sh.exec(t),n=uo(r,2),a=n[1];t=t.replace(Sh,Oh(a))}return t}function Hk(e){var t=e.replace(/\s+/g,"");return t=Gk(t),t=Oh(t),t}function qk(e){try{return Hk(e)}catch{return wn}}function rc(e){var t=qk(e.slice(5,-1));return t===wn?"":t}var Kk=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Yk=["dx","dy","angle","className","breakAll"];function nc(){return nc=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},nc.apply(this,arguments)}function Th(e,t){if(e==null)return{};var r=Xk(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 Xk(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 Ah(e,t){return eM(e)||Qk(e,t)||Jk(e,t)||Zk()}function Zk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
217
+ 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 jh(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 jh(e,t)}}function jh(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 eM(e){if(Array.isArray(e))return e}var Ph=/[ \f\n\r\t\v\u2028\u2029]+/,_h=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(Ph));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}},tM=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=te(o),f=s,d=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return L.reduce(function(M,W){var H=W.word,Y=W.width,$=M[M.length-1];if($&&(a==null||i||$.width+Y+n<Number(a)))$.words.push(H),$.width+=Y+n;else{var B={words:[H],width:Y};M.push(B)}return M},[])},h=d(r),g=function(L){return L.reduce(function(M,W){return M.width>W.width?M:W})};if(!u)return h;for(var v="…",m=function(L){var M=f.slice(0,L),W=_h({breakAll:c,style:l,children:M+v}).wordsWithComputedWidth,H=d(W),Y=H.length>o||g(H).width>Number(a);return[Y,H]},b=0,w=f.length-1,x=0,A;b<=w&&x<=f.length-1;){var y=Math.floor((b+w)/2),O=y-1,T=m(O),j=Ah(T,2),C=j[0],k=j[1],P=m(y),E=Ah(P,1),F=E[0];if(!C&&!F&&(b=y+1),C&&F&&(w=y-1),!C&&F){A=k;break}x++}return A||h},Eh=function(t){var r=fe(t)?[]:t.toString().split(Ph);return[{words:r}]},rM=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!vr.isSsr){var l,c,u=_h({breakAll:o,children:a,style:i});if(u){var f=u.wordsWithComputedWidth,d=u.spaceWidth;l=f,c=d}else return Eh(a);return tM({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return Eh(a)},Ch="#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,g=t.verticalAnchor,v=g===void 0?"end":g,m=t.fill,b=m===void 0?Ch:m,w=Th(t,Kk),x=S.useMemo(function(){return rM({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:f,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,f,w.style,w.width]),A=w.dx,y=w.dy,O=w.angle,T=w.className,j=w.breakAll,C=Th(w,Yk);if(!Xe(n)||!Xe(i))return null;var k=n+(te(A)?A:0),P=i+(te(y)?y:0),E;switch(v){case"start":E=rc("calc(".concat(c,")"));break;case"middle":E=rc("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:E=rc("calc(".concat(x.length-1," * -").concat(s,")"));break}var F=[];if(f){var N=x[0].width,L=w.width;F.push("scale(".concat((te(L)?L/N:1)/N,")"))}return O&&F.push("rotate(".concat(O,", ").concat(k,", ").concat(P,")")),F.length&&(C.transform=F.join(" ")),S.createElement("text",nc({},de(C,!0),{x:k,y:P,className:ge("recharts-text",T),textAnchor:h,fill:b.includes("url")?Ch:b}),x.map(function(M,W){var H=M.words.join(j?"":" ");return S.createElement("tspan",{x:k,dy:W===0?E:s,key:"".concat(H,"-").concat(W)},H)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function nM(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ac(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===nM?e:aM,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 aM(){return 0}function $h(e){return e===null?NaN:+e}function*iM(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Pa=ac(yr).right;ac($h).center;class kh extends Map{constructor(t,r=lM){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(Mh(this,t))}has(t){return super.has(Mh(this,t))}set(t,r){return super.set(oM(this,t),r)}delete(t){return super.delete(sM(this,t))}}function Mh({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function oM({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function sM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function lM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function cM(e=yr){if(e===yr)return Nh;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 Nh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const uM=Math.sqrt(50),fM=Math.sqrt(10),dM=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>=uM?10:i>=fM?5:i>=dM?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 ic(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 oc(e,t,r){return t=+t,e=+e,r=+r,ho(e,t,r)[2]}function sc(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?oc(t,e,r):oc(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Dh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Ih(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Lh(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?Nh:cM(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)),g=Math.min(n,Math.floor(t+(l-c)*f/l+d));Lh(e,t,h,g,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 pM(e,t,r){if(e=Float64Array.from(iM(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Ih(e);if(t>=1)return Dh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Dh(Lh(e,i).subarray(0,i+1)),s=Ih(e.subarray(i+1));return o+(s-o)*(a-i)}}function hM(e,t,r=$h){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 mM(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 lc=Symbol("implicit");function cc(){var e=new kh,t=[],r=[],n=lc;function a(i){let o=e.get(i);if(o===void 0){if(n!==lc)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 kh;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 cc(t,r).unknown(n)},At.apply(a,arguments),a}function Ea(){var e=cc().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,g=h?a:n,v=h?n:a;i=(v-g)/Math.max(1,d-l+c*2),s&&(i=Math.floor(i)),g+=(v-g-i*(d-l))*u,o=i*(1-l),s&&(g=Math.round(g),o=Math.round(o));var m=mM(d).map(function(b){return g+i*b});return r(h?m.reverse():m)}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 Rh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Rh(t())},e}function Ca(){return Rh(Ea.apply(null,arguments).paddingInner(1))}function uc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Bh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function $a(){}var ka=.7,mo=1/ka,On="\\s*([+-]?\\d+)\\s*",Ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gM=/^#([0-9a-f]{3,8})$/,vM=new RegExp(`^rgb\\(${On},${On},${On}\\)$`),yM=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),bM=new RegExp(`^rgba\\(${On},${On},${On},${Ma}\\)$`),xM=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Ma}\\)$`),wM=new RegExp(`^hsl\\(${Ma},${Wt},${Wt}\\)$`),OM=new RegExp(`^hsla\\(${Ma},${Wt},${Wt},${Ma}\\)$`),Fh={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};uc($a,Na,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Uh,formatHex:Uh,formatHex8:SM,formatHsl:TM,formatRgb:Wh,toString:Wh});function Uh(){return this.rgb().formatHex()}function SM(){return this.rgb().formatHex8()}function TM(){return qh(this).formatHsl()}function Wh(){return this.rgb().formatRgb()}function Na(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=gM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?zh(t):r===3?new pt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?go(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?go(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=vM.exec(e))?new pt(t[1],t[2],t[3],1):(t=yM.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bM.exec(e))?go(t[1],t[2],t[3],t[4]):(t=xM.exec(e))?go(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wM.exec(e))?Hh(t[1],t[2]/100,t[3]/100,1):(t=OM.exec(e))?Hh(t[1],t[2]/100,t[3]/100,t[4]):Fh.hasOwnProperty(e)?zh(Fh[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function zh(e){return new pt(e>>16&255,e>>8&255,e&255,1)}function go(e,t,r,n){return n<=0&&(e=t=r=NaN),new pt(e,t,r,n)}function AM(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 fc(e,t,r,n){return arguments.length===1?AM(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}uc(pt,fc,Bh($a,{brighter(e){return e=e==null?mo:Math.pow(mo,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(Ir(this.r),Ir(this.g),Ir(this.b),vo(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:Vh,formatHex:Vh,formatHex8:jM,formatRgb:Gh,toString:Gh}));function Vh(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function jM(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gh(){const e=vo(this.opacity);return`${e===1?"rgb(":"rgba("}${Ir(this.r)}, ${Ir(this.g)}, ${Ir(this.b)}${e===1?")":`, ${e})`}`}function vo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ir(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Ir(e),(e<16?"0":"")+e.toString(16)}function Hh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Nt(e,t,r,n)}function qh(e){if(e instanceof Nt)return new Nt(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=Na(e)),!e)return new Nt;if(e instanceof Nt)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 Nt(o,s,l,e.opacity)}function PM(e,t,r,n){return arguments.length===1?qh(e):new Nt(e,t,r,n??1)}function Nt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}uc(Nt,PM,Bh($a,{brighter(e){return e=e==null?mo:Math.pow(mo,e),new Nt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new Nt(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(dc(e>=240?e-240:e+120,a,n),dc(e,a,n),dc(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Nt(Kh(this.h),yo(this.s),yo(this.l),vo(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=vo(this.opacity);return`${e===1?"hsl(":"hsla("}${Kh(this.h)}, ${yo(this.s)*100}%, ${yo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kh(e){return e=(e||0)%360,e<0?e+360:e}function yo(e){return Math.max(0,Math.min(1,e||0))}function dc(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 pc=e=>()=>e;function _M(e,t){return function(r){return e+r*t}}function EM(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 CM(e){return(e=+e)==1?Yh:function(t,r){return r-t?EM(t,r,e):pc(isNaN(t)?r:t)}}function Yh(e,t){var r=t-e;return r?_M(e,r):pc(isNaN(e)?t:e)}const Xh=function e(t){var r=CM(t);function n(a,i){var o=r((a=fc(a)).r,(i=fc(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),c=Yh(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 $M(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 kM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function MM(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 NM(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 DM(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 hc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mc=new RegExp(hc.source,"g");function IM(e){return function(){return e}}function LM(e){return function(t){return e(t)+""}}function RM(e,t){var r=hc.lastIndex=mc.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=hc.exec(e))&&(a=mc.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=mc.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?LM(l[0].x):IM(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"?pc(t):(r==="number"?bo:r==="string"?(n=Na(t))?(t=n,Xh):RM:t instanceof Na?Xh:t instanceof Date?NM:kM(t)?$M:Array.isArray(t)?MM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?DM:bo)(e,t)}function gc(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function BM(e,t){t===void 0&&(t=e,e=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 FM(e){return function(){return e}}function xo(e){return+e}var Zh=[0,1];function lt(e){return e}function vc(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:FM(isNaN(t)?NaN:.5)}function UM(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function WM(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=vc(a,n),i=r(o,i)):(n=vc(n,a),i=r(i,o)),function(s){return i(n(s))}}function zM(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]=vc(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Pa(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=Zh,t=Zh,r=Sn,n,a,i,o=lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==lt&&(o=UM(e[0],e[d-1])),s=d>2?zM:WM,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=gc,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 VM(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 GM(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 HM(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var qM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=qM.exec(e)))throw new Error("invalid format: "+e);var t;return new bc({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=bc.prototype;function bc(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+""}bc.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 KM(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 Jh;function YM(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Jh=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 Qh(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 em={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:VM,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)=>Qh(e*100,t),r:Qh,s:YM,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tm(e){return e}var rm=Array.prototype.map,nm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function XM(e){var t=e.grouping===void 0||e.thousands===void 0?tm:GM(rm.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?tm:HM(rm.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,g=f.sign,v=f.symbol,m=f.zero,b=f.width,w=f.comma,x=f.precision,A=f.trim,y=f.type;y==="n"?(w=!0,y="g"):em[y]||(x===void 0&&(x=12),A=!0,y="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var O=v==="$"?r:v==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",T=v==="$"?n:/[%p]/.test(y)?o:"",j=em[y],C=/[defgprs%]/.test(y);x=x===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function k(P){var E=O,F=T,N,L,M;if(y==="c")F=j(P)+F,P="";else{P=+P;var W=P<0||1/P<0;if(P=isNaN(P)?l:j(Math.abs(P),x),A&&(P=KM(P)),W&&+P==0&&g!=="+"&&(W=!1),E=(W?g==="("?g:s:g==="-"||g==="("?"":g)+E,F=(y==="s"?nm[8+Jh/3]:"")+F+(W&&g==="("?")":""),C){for(N=-1,L=P.length;++N<L;)if(M=P.charCodeAt(N),48>M||M>57){F=(M===46?a+P.slice(N+1):P.slice(N))+F,P=P.slice(0,N);break}}}w&&!m&&(P=t(P,1/0));var H=E.length+P.length+F.length,Y=H<b?new Array(b-H+1).join(d):"";switch(w&&m&&(P=t(Y+P,Y.length?b-F.length:1/0),Y=""),h){case"<":P=E+P+F+Y;break;case"=":P=E+Y+P+F;break;case"^":P=Y.slice(0,H=Y.length>>1)+E+P+F+Y.slice(H);break;default:P=Y+E+P+F;break}return i(P)}return k.toString=function(){return f+""},k}function u(f,d){var h=c((f=Ia(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Tn(d)/3)))*3,v=Math.pow(10,-g),m=nm[8+g/3];return function(b){return h(v*b)+m}}return{format:c,formatPrefix:u}}var So,xc,am;ZM({thousands:",",grouping:[3],currency:["$",""]});function ZM(e){return So=XM(e),xc=So.format,am=So.formatPrefix,So}function JM(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 eN(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function im(e,t,r,n){var a=sc(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),am(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=eN(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=JM(a))&&(n.precision=i-(n.type==="%")*2);break}}return xc(n)}function br(e){var t=e.domain;return e.ticks=function(r){var n=t();return ic(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return im(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=oc(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),br(e)}function om(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 om(e).unknown(t)},e=arguments.length?Array.from(e,xo):[0,1],br(r)}function sm(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 lm(e){return Math.log(e)}function cm(e){return Math.exp(e)}function tN(e){return-Math.log(-e)}function rN(e){return-Math.exp(-e)}function nN(e){return isFinite(e)?+("1e"+e):e<0?0:e}function aN(e){return e===10?nN:e===Math.E?Math.exp:t=>Math.pow(e,t)}function iN(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 um(e){return(t,r)=>-e(-t,r)}function wc(e){const t=e(lm,cm),r=t.domain;let n=10,a,i;function o(){return a=iN(n),i=aN(n),r()[0]<0?(a=um(a),i=um(i),e(tN,rN)):e(lm,cm),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),g,v;const m=s==null?10:+s;let b=[];if(!(n%1)&&h-d<m){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(g=1;g<n;++g)if(v=d<0?g/i(-d):g*i(d),!(v<c)){if(v>u)break;b.push(v)}}else for(;d<=h;++d)for(g=n-1;g>=1;--g)if(v=d>0?g/i(-d):g*i(d),!(v<c)){if(v>u)break;b.push(v)}b.length*2<m&&(b=ic(c,u,m))}else b=ic(d,h,Math.min(h-d,m)).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=xc(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(sm(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function fm(){const e=wc(wo()).domain([1,10]);return e.copy=()=>Da(e,fm()).base(e.base()),At.apply(e,arguments),e}function dm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Oc(e){var t=1,r=e(dm(t),pm(t));return r.constant=function(n){return arguments.length?e(dm(t=+n),pm(t)):t},br(r)}function hm(){var e=Oc(wo());return e.copy=function(){return Da(e,hm()).constant(e.constant())},At.apply(e,arguments)}function mm(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oN(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function sN(e){return e<0?-e*e:e*e}function Sc(e){var t=e(lt,lt),r=1;function n(){return r===1?e(lt,lt):r===.5?e(oN,sN):e(mm(r),mm(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},br(t)}function Tc(){var e=Sc(wo());return e.copy=function(){return Da(e,Tc()).exponent(e.exponent())},At.apply(e,arguments),e}function lN(){return Tc.apply(null,arguments).exponent(.5)}function gm(e){return Math.sign(e)*e*e}function cN(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vm(){var e=yc(),t=[0,1],r=!1,n;function a(i){var o=cN(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(gm(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(gm)),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 vm(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),br(a)}function ym(){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]=hM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Pa(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 ym().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function bm(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Pa(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 bm().domain([e,t]).range(a).unknown(i)},At.apply(br(o),arguments)}function xm(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Pa(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 xm().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const Ac=new Date,jc=new Date;function Ze(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=>Ze(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)=>(Ac.setTime(+i),jc.setTime(+o),e(Ac),e(jc),Math.floor(r(Ac,jc))),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=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ao.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ze(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,jt=nr*60,ar=jt*60,ir=ar*24,Pc=ir*7,wm=ir*30,_c=ir*365,Rr=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Rr.range;const Ec=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getMinutes());Ec.range;const Cc=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getUTCMinutes());Cc.range;const $c=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*jt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());$c.range;const kc=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());kc.range;const La=Ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jt)/ir,e=>e.getDate()-1);La.range;const jo=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);jo.range;const Om=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));Om.range;function Br(e){return Ze(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())*jt)/Pc)}const Po=Br(0),_o=Br(1),uN=Br(2),fN=Br(3),An=Br(4),dN=Br(5),pN=Br(6);Po.range,_o.range,uN.range,fN.range,An.range,dN.range,pN.range;function Fr(e){return Ze(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=Fr(0),Co=Fr(1),hN=Fr(2),mN=Fr(3),jn=Fr(4),gN=Fr(5),vN=Fr(6);Eo.range,Co.range,hN.range,mN.range,jn.range,gN.range,vN.range;const Mc=Ze(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());Mc.range;const Nc=Ze(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());Nc.range;const or=Ze(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:Ze(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=Ze(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:Ze(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 Sm(e,t,r,n,a,i){const o=[[Rr,1,nr],[Rr,5,5*nr],[Rr,15,15*nr],[Rr,30,30*nr],[i,1,jt],[i,5,5*jt],[i,15,15*jt],[i,30,30*jt],[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,wm],[t,3,3*wm],[e,1,_c]];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),g=h?h.range(c,+u+1):[];return d?g.reverse():g}function l(c,u,f){const d=Math.abs(u-c)/f,h=ac(([,,m])=>m).right(o,d);if(h===o.length)return e.every(sc(c/_c,u/_c,f));if(h===0)return Ao.every(Math.max(sc(c,u,f),1));const[g,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return g.every(v)}return[s,l]}const[yN,bN]=Sm(sr,Nc,Eo,Om,kc,Cc),[xN,wN]=Sm(or,Mc,Po,La,$c,Ec);function Dc(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 Ic(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 ON(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),g=Fa(o),v=Ba(s),m=Fa(s),b=Ba(l),w=Fa(l),x={a:W,A:H,b:Y,B:$,c:null,d:Em,e:Em,f:GN,g:t3,G:n3,H:WN,I:zN,j:VN,L:Cm,m:HN,M:qN,p:B,q:_,Q:Im,s:Lm,S:KN,u:YN,U:XN,V:ZN,w:JN,W:QN,x:null,X:null,y:e3,Y:r3,Z:a3,"%":Dm},A={a:U,A:V,b:I,B:z,c:null,d:km,e:km,f:l3,g:y3,G:x3,H:i3,I:o3,j:s3,L:Mm,m:c3,M:u3,p:q,q:Q,Q:Im,s:Lm,S:f3,u:d3,U:p3,V:h3,w:m3,W:g3,x:null,X:null,y:v3,Y:b3,Z:w3,"%":Dm},y={a:k,A:P,b:E,B:F,c:N,d:Pm,e:Pm,f:RN,g:jm,G:Am,H:_m,I:_m,j:NN,L:LN,m:MN,M:DN,p:C,q:kN,Q:FN,s:UN,S:IN,u:PN,U:_N,V:EN,w:jN,W:CN,x:L,X:M,y:jm,Y:Am,Z:$N,"%":BN};x.x=O(r,x),x.X=O(n,x),x.c=O(t,x),A.x=O(r,A),A.X=O(n,A),A.c=O(t,A);function O(G,Z){return function(ee){var R=[],oe=-1,X=0,ce=G.length,re,me,We;for(ee instanceof Date||(ee=new Date(+ee));++oe<ce;)G.charCodeAt(oe)===37&&(R.push(G.slice(X,oe)),(me=Tm[re=G.charAt(++oe)])!=null?re=G.charAt(++oe):me=re==="e"?" ":"0",(We=Z[re])&&(re=We(ee,me)),R.push(re),X=oe+1);return R.push(G.slice(X,oe)),R.join("")}}function T(G,Z){return function(ee){var R=Ra(1900,void 0,1),oe=j(R,G,ee+="",0),X,ce;if(oe!=ee.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(Z&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(X=Ic(Ra(R.y,0,1)),ce=X.getUTCDay(),X=ce>4||ce===0?Co.ceil(X):Co(X),X=jo.offset(X,(R.V-1)*7),R.y=X.getUTCFullYear(),R.m=X.getUTCMonth(),R.d=X.getUTCDate()+(R.w+6)%7):(X=Dc(Ra(R.y,0,1)),ce=X.getDay(),X=ce>4||ce===0?_o.ceil(X):_o(X),X=La.offset(X,(R.V-1)*7),R.y=X.getFullYear(),R.m=X.getMonth(),R.d=X.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ce="Z"in R?Ic(Ra(R.y,0,1)).getUTCDay():Dc(Ra(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ce+5)%7:R.w+R.U*7-(ce+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Ic(R)):Dc(R)}}function j(G,Z,ee,R){for(var oe=0,X=Z.length,ce=ee.length,re,me;oe<X;){if(R>=ce)return-1;if(re=Z.charCodeAt(oe++),re===37){if(re=Z.charAt(oe++),me=y[re in Tm?Z.charAt(oe++):re],!me||(R=me(G,ee,R))<0)return-1}else if(re!=ee.charCodeAt(R++))return-1}return R}function C(G,Z,ee){var R=c.exec(Z.slice(ee));return R?(G.p=u.get(R[0].toLowerCase()),ee+R[0].length):-1}function k(G,Z,ee){var R=h.exec(Z.slice(ee));return R?(G.w=g.get(R[0].toLowerCase()),ee+R[0].length):-1}function P(G,Z,ee){var R=f.exec(Z.slice(ee));return R?(G.w=d.get(R[0].toLowerCase()),ee+R[0].length):-1}function E(G,Z,ee){var R=b.exec(Z.slice(ee));return R?(G.m=w.get(R[0].toLowerCase()),ee+R[0].length):-1}function F(G,Z,ee){var R=v.exec(Z.slice(ee));return R?(G.m=m.get(R[0].toLowerCase()),ee+R[0].length):-1}function N(G,Z,ee){return j(G,t,Z,ee)}function L(G,Z,ee){return j(G,r,Z,ee)}function M(G,Z,ee){return j(G,n,Z,ee)}function W(G){return o[G.getDay()]}function H(G){return i[G.getDay()]}function Y(G){return l[G.getMonth()]}function $(G){return s[G.getMonth()]}function B(G){return a[+(G.getHours()>=12)]}function _(G){return 1+~~(G.getMonth()/3)}function U(G){return o[G.getUTCDay()]}function V(G){return i[G.getUTCDay()]}function I(G){return l[G.getUTCMonth()]}function z(G){return s[G.getUTCMonth()]}function q(G){return a[+(G.getUTCHours()>=12)]}function Q(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var Z=O(G+="",x);return Z.toString=function(){return G},Z},parse:function(G){var Z=T(G+="",!1);return Z.toString=function(){return G},Z},utcFormat:function(G){var Z=O(G+="",A);return Z.toString=function(){return G},Z},utcParse:function(G){var Z=T(G+="",!0);return Z.toString=function(){return G},Z}}}var Tm={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,SN=/^%/,TN=/[\\^$*+?|[\]().{}]/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 AN(e){return e.replace(TN,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(AN).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function jN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function PN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function _N(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function EN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function CN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Am(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function jm(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 $N(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 kN(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 MN(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 Pm(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function NN(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 _m(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function DN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function IN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function RN(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 BN(e,t,r){var n=SN.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function FN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function UN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Em(e,t){return be(e.getDate(),t,2)}function WN(e,t){return be(e.getHours(),t,2)}function zN(e,t){return be(e.getHours()%12||12,t,2)}function VN(e,t){return be(1+La.count(or(e),e),t,3)}function Cm(e,t){return be(e.getMilliseconds(),t,3)}function GN(e,t){return Cm(e,t)+"000"}function HN(e,t){return be(e.getMonth()+1,t,2)}function qN(e,t){return be(e.getMinutes(),t,2)}function KN(e,t){return be(e.getSeconds(),t,2)}function YN(e){var t=e.getDay();return t===0?7:t}function XN(e,t){return be(Po.count(or(e)-1,e),t,2)}function $m(e){var t=e.getDay();return t>=4||t===0?An(e):An.ceil(e)}function ZN(e,t){return e=$m(e),be(An.count(or(e),e)+(or(e).getDay()===4),t,2)}function JN(e){return e.getDay()}function QN(e,t){return be(_o.count(or(e)-1,e),t,2)}function e3(e,t){return be(e.getFullYear()%100,t,2)}function t3(e,t){return e=$m(e),be(e.getFullYear()%100,t,2)}function r3(e,t){return be(e.getFullYear()%1e4,t,4)}function n3(e,t){var r=e.getDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getFullYear()%1e4,t,4)}function a3(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function km(e,t){return be(e.getUTCDate(),t,2)}function i3(e,t){return be(e.getUTCHours(),t,2)}function o3(e,t){return be(e.getUTCHours()%12||12,t,2)}function s3(e,t){return be(1+jo.count(sr(e),e),t,3)}function Mm(e,t){return be(e.getUTCMilliseconds(),t,3)}function l3(e,t){return Mm(e,t)+"000"}function c3(e,t){return be(e.getUTCMonth()+1,t,2)}function u3(e,t){return be(e.getUTCMinutes(),t,2)}function f3(e,t){return be(e.getUTCSeconds(),t,2)}function d3(e){var t=e.getUTCDay();return t===0?7:t}function p3(e,t){return be(Eo.count(sr(e)-1,e),t,2)}function Nm(e){var t=e.getUTCDay();return t>=4||t===0?jn(e):jn.ceil(e)}function h3(e,t){return e=Nm(e),be(jn.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function m3(e){return e.getUTCDay()}function g3(e,t){return be(Co.count(sr(e)-1,e),t,2)}function v3(e,t){return be(e.getUTCFullYear()%100,t,2)}function y3(e,t){return e=Nm(e),be(e.getUTCFullYear()%100,t,2)}function b3(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function x3(e,t){var r=e.getUTCDay();return e=r>=4||r===0?jn(e):jn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function w3(){return"+0000"}function Dm(){return"%"}function Im(e){return+e}function Lm(e){return Math.floor(+e/1e3)}var Pn,Rm,Bm;O3({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 O3(e){return Pn=ON(e),Rm=Pn.format,Pn.parse,Bm=Pn.utcFormat,Pn.utcParse,Pn}function S3(e){return new Date(e)}function T3(e){return e instanceof Date?+e:+new Date(+e)}function Lc(e,t,r,n,a,i,o,s,l,c){var u=yc(),f=u.invert,d=u.domain,h=c(".%L"),g=c(":%S"),v=c("%I:%M"),m=c("%I %p"),b=c("%a %d"),w=c("%b %d"),x=c("%B"),A=c("%Y");function y(O){return(l(O)<O?h:s(O)<O?g:o(O)<O?v:i(O)<O?m:n(O)<O?a(O)<O?b:w:r(O)<O?x:A)(O)}return u.invert=function(O){return new Date(f(O))},u.domain=function(O){return arguments.length?d(Array.from(O,T3)):d().map(S3)},u.ticks=function(O){var T=d();return e(T[0],T[T.length-1],O??10)},u.tickFormat=function(O,T){return T==null?y:c(T)},u.nice=function(O){var T=d();return(!O||typeof O.range!="function")&&(O=t(T[0],T[T.length-1],O??10)),O?d(sm(T,O)):u},u.copy=function(){return Da(u,Lc(e,t,r,n,a,i,o,s,l,c))},u}function A3(){return At.apply(Lc(xN,wN,or,Mc,Po,La,$c,Ec,Rr,Rm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function j3(){return At.apply(Lc(yN,bN,sr,Nc,Eo,jo,kc,Cc,Rr,Bm).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,g;return arguments.length?([h,g]=d,o=f(h,g),c):[o(0),o(1)]}}return c.range=u(Sn),c.rangeRound=u(gc),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 xr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Fm(){var e=br($o()(lt));return e.copy=function(){return xr(e,Fm())},rr.apply(e,arguments)}function Um(){var e=wc($o()).domain([1,10]);return e.copy=function(){return xr(e,Um()).base(e.base())},rr.apply(e,arguments)}function Wm(){var e=Oc($o());return e.copy=function(){return xr(e,Wm()).constant(e.constant())},rr.apply(e,arguments)}function Rc(){var e=Sc($o());return e.copy=function(){return xr(e,Rc()).exponent(e.exponent())},rr.apply(e,arguments)}function P3(){return Rc.apply(null,arguments).exponent(.5)}function zm(){var e=[],t=lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((Pa(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)=>pM(e,i/n))},r.copy=function(){return zm(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(v){return isNaN(v=+v)?d:(v=.5+((v=+u(v))-i)*(n*v<n*i?s:l),c(f?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,r]=v,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(v){return arguments.length?(f=!!v,h):f},h.interpolator=function(v){return arguments.length?(c=v,h):c};function g(v){return function(m){var b,w,x;return arguments.length?([b,w,x]=m,c=BM(v,[b,w,x]),h):[c(0),c(.5),c(1)]}}return h.range=g(Sn),h.rangeRound=g(gc),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return u=v,a=v(e),i=v(t),o=v(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function Vm(){var e=br(ko()(lt));return e.copy=function(){return xr(e,Vm())},rr.apply(e,arguments)}function Gm(){var e=wc(ko()).domain([.1,1,10]);return e.copy=function(){return xr(e,Gm()).base(e.base())},rr.apply(e,arguments)}function Hm(){var e=Oc(ko());return e.copy=function(){return xr(e,Hm()).constant(e.constant())},rr.apply(e,arguments)}function Bc(){var e=Sc(ko());return e.copy=function(){return xr(e,Bc()).exponent(e.exponent())},rr.apply(e,arguments)}function _3(){return Bc.apply(null,arguments).exponent(.5)}const qm=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ea,scaleDiverging:Vm,scaleDivergingLog:Gm,scaleDivergingPow:Bc,scaleDivergingSqrt:_3,scaleDivergingSymlog:Hm,scaleIdentity:om,scaleImplicit:lc,scaleLinear:To,scaleLog:fm,scaleOrdinal:cc,scalePoint:Ca,scalePow:Tc,scaleQuantile:ym,scaleQuantize:bm,scaleRadial:vm,scaleSequential:Fm,scaleSequentialLog:Um,scaleSequentialPow:Rc,scaleSequentialQuantile:zm,scaleSequentialSqrt:P3,scaleSequentialSymlog:Wm,scaleSqrt:lN,scaleSymlog:hm,scaleThreshold:xm,scaleTime:A3,scaleUtc:j3,tickFormat:im},Symbol.toStringTag,{value:"Module"}));var E3=nn;function C3(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&&!E3(o):r(o,s)))var s=o,l=i}return l}var Km=C3;function $3(e,t){return e>t}var k3=$3,M3=Km,N3=k3,D3=mn;function I3(e){return e&&e.length?M3(e,D3,N3):void 0}var L3=I3;const wr=ke(L3);function R3(e,t){return e<t}var B3=R3,F3=Km,U3=B3,W3=mn;function z3(e){return e&&e.length?F3(e,W3,U3):void 0}var V3=z3;const Mo=ke(V3);var G3=rl,H3=gr,q3=Vp,K3=ft;function Y3(e,t){var r=K3(e)?G3:q3;return r(e,H3(t))}var X3=Y3,Z3=Wp,J3=X3;function Q3(e,t){return Z3(J3(e,t),1)}var e5=Q3;const t5=ke(e5);var r5=Ul;function n5(e,t){return r5(e,t)}var a5=n5;const Ur=ke(a5);var _n=1e9,i5={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wc,Re=!0,Pt="[DecimalError] ",Wr=Pt+"Invalid argument: ",Fc=Pt+"Exponent out of range: ",En=Math.floor,zr=Math.pow,o5=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,vt,rt=1e7,Le=7,Ym=9007199254740991,No=En(Ym/Le),ae={};ae.absoluteValue=ae.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ae.comparedTo=ae.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},ae.decimalPlaces=ae.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ae.dividedBy=ae.div=function(e){return lr(this,new this.constructor(e))},ae.dividedToIntegerBy=ae.idiv=function(e){var t=this,r=t.constructor;return Ce(lr(t,new r(e),0,1),r.precision)},ae.equals=ae.eq=function(e){return!this.cmp(e)},ae.exponent=function(){return qe(this)},ae.greaterThan=ae.gt=function(e){return this.cmp(e)>0},ae.greaterThanOrEqualTo=ae.gte=function(e){return this.cmp(e)>=0},ae.isInteger=ae.isint=function(){return this.e>this.d.length-2},ae.isNegative=ae.isneg=function(){return this.s<0},ae.isPositive=ae.ispos=function(){return this.s>0},ae.isZero=function(){return this.s===0},ae.lessThan=ae.lt=function(e){return this.cmp(e)<0},ae.lessThanOrEqualTo=ae.lte=function(e){return this.cmp(e)<1},ae.logarithm=ae.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(vt))throw Error(Pt+"NaN");if(r.s<1)throw Error(Pt+(r.s?"NaN":"-Infinity"));return r.eq(vt)?new n(0):(Re=!1,t=lr(Ua(r,i),Ua(e,i),i),Re=!0,Ce(t,a))},ae.minus=ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Qm(t,e):Xm(t,(e.s=-e.s,e))},ae.modulo=ae.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Pt+"NaN");return r.s?(Re=!1,t=lr(r,e,0,1).times(e),Re=!0,r.minus(t)):Ce(new n(r),a)},ae.naturalExponential=ae.exp=function(){return Zm(this)},ae.naturalLogarithm=ae.ln=function(){return Ua(this)},ae.negated=ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ae.plus=ae.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Xm(t,e):Qm(t,(e.s=-e.s,e))},ae.precision=ae.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=qe(a)+1,n=a.d.length-1,r=n*Le+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},ae.squareRoot=ae.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(Pt+"NaN")}for(e=qe(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(Ce(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Re=!0,Ce(n,r)},ae.times=ae.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?Ce(e,f.precision):e},ae.toDecimalPlaces=ae.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),Ce(r,e+qe(r)+1,t))},ae.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Vr(n,!0):(zt(e,0,_n),t===void 0?t=a.rounding:zt(t,0,8),n=Ce(new a(n),e+1,t),r=Vr(n,!0,e+1)),r},ae.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Vr(a):(zt(e,0,_n),t===void 0?t=i.rounding:zt(t,0,8),n=Ce(new i(a),e+qe(a)+1,t),r=Vr(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ae.toInteger=ae.toint=function(){var e=this,t=e.constructor;return Ce(new t(e),qe(e)+1,t.rounding)},ae.toNumber=function(){return+this},ae.toPower=ae.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(vt);if(s=new l(s),!s.s){if(e.s<1)throw Error(Pt+"Infinity");return s}if(s.eq(vt))return s;if(n=l.precision,e.eq(vt))return Ce(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=u<0?-u:u)<=Ym){for(a=new l(vt),t=Math.ceil(n/Le+4),Re=!1;r%2&&(a=a.times(s),eg(a.d,t)),r=En(r/2),r!==0;)s=s.times(s),eg(s.d,t);return Re=!0,e.s<0?new l(vt).div(a):Ce(a,n)}}else if(i<0)throw Error(Pt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Re=!1,a=e.times(Ua(s,n+c)),Re=!0,a=Zm(a),a.s=i,a},ae.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=qe(a),n=Vr(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,_n),t===void 0?t=i.rounding:zt(t,0,8),a=Ce(new i(a),e,t),r=qe(a),n=Vr(a,e<=r||r<=i.toExpNeg,e)),n},ae.toSignificantDigits=ae.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)),Ce(new n(r),e,t)},ae.toString=ae.valueOf=ae.val=ae.toJSON=ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=qe(e),r=e.constructor;return Vr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Xm(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?Ce(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/Le),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?Ce(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=Le-n.length,r&&(i+=Or(r)),i+=n;o=e[t],n=o+"",r=Le-n.length,r&&(i+=Or(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,g,v,m,b,w,x,A,y,O,T,j,C=n.constructor,k=n.s==a.s?1:-1,P=n.d,E=a.d;if(!n.s)return new C(n);if(!a.s)throw Error(Pt+"Division by zero");for(l=n.e-a.e,T=E.length,y=P.length,h=new C(k),g=h.d=[],c=0;E[c]==(P[c]||0);)++c;if(E[c]>(P[c]||0)&&--l,i==null?w=i=C.precision:o?w=i+(qe(n)-qe(a))+1:w=i,w<0)return new C(0);if(w=w/Le+2|0,c=0,T==1)for(u=0,E=E[0],w++;(c<y||u)&&w--;c++)x=u*rt+(P[c]||0),g[c]=x/E|0,u=x%E|0;else{for(u=rt/(E[0]+1)|0,u>1&&(E=e(E,u),P=e(P,u),T=E.length,y=P.length),A=T,v=P.slice(0,T),m=v.length;m<T;)v[m++]=0;j=E.slice(),j.unshift(0),O=E[0],E[1]>=rt/2&&++O;do u=0,s=t(E,v,T,m),s<0?(b=v[0],T!=m&&(b=b*rt+(v[1]||0)),u=b/O|0,u>1?(u>=rt&&(u=rt-1),f=e(E,u),d=f.length,m=v.length,s=t(f,v,d,m),s==1&&(u--,r(f,T<d?j:E,d))):(u==0&&(s=u=1),f=E.slice()),d=f.length,d<m&&f.unshift(0),r(v,f,m),s==-1&&(m=v.length,s=t(E,v,T,m),s<1&&(u++,r(v,T<m?j:E,m))),m=v.length):s===0&&(u++,v=[0]),g[c++]=u,s&&v[0]?v[m++]=P[A]||0:(v=[P[A]],m=1);while((A++<y||v[0]!==void 0)&&w--)}return g[0]||g.shift(),h.e=l,Ce(h,o?i+qe(h)+1:i)}}();function Zm(e,t){var r,n,a,i,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(qe(e)>16)throw Error(Fc+qe(e));if(!e.s)return new u(vt);for(Re=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(zr(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new u(vt),u.precision=s;;){if(a=Ce(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=Ce(i.times(i),s);return u.precision=f,t==null?(Re=!0,Ce(i,f)):i}i=o}}function qe(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function Uc(e,t,r){if(t>e.LN10.sd())throw Re=!0,r&&(e.precision=r),Error(Pt+"LN10 precision limit exceeded");return Ce(new e(e.LN10),t)}function Or(e){for(var t="";e--;)t+="0";return t}function Ua(e,t){var r,n,a,i,o,s,l,c,u,f=1,d=10,h=e,g=h.d,v=h.constructor,m=v.precision;if(h.s<1)throw Error(Pt+(h.s?"NaN":"-Infinity"));if(h.eq(vt))return new v(0);if(t==null?(Re=!1,c=m):c=t,h.eq(10))return t==null&&(Re=!0),Uc(v,c);if(c+=d,v.precision=c,r=Vt(g),n=r.charAt(0),i=qe(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=qe(h),n>1?(h=new v("0."+r),i++):h=new v(n+"."+r.slice(1))}else return l=Uc(v,c+2,m).times(i+""),h=Ua(new v(n+"."+r.slice(1)),c-d).plus(l),v.precision=m,t==null?(Re=!0,Ce(h,m)):h;for(s=o=h=lr(h.minus(vt),h.plus(vt),c),u=Ce(h.times(h),c),a=3;;){if(o=Ce(o.times(u),c),l=s.plus(lr(o,new v(a),c)),Vt(l.d).slice(0,c)===Vt(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Uc(v,c+2,m).times(i+""))),s=lr(s,new v(f),c),v.precision=m,t==null?(Re=!0,Ce(s,m)):s;s=l,a+=2}}function Jm(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/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Le;n<a;)e.d.push(+t.slice(n,n+=Le));t=t.slice(n),n=Le-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Re&&(e.e>No||e.e<-No))throw Error(Fc+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ce(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+=Le,a=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Le),i=f.length,u>=i)return e;for(c=i=f[u],o=1;i>=10;i/=10)o++;n%=Le,a=n-Le+o}if(r!==void 0&&(i=zr(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/zr(10,o-a):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=qe(e),f.length=1,t=t-i-1,f[0]=zr(10,(Le-t%Le)%Le),e.e=En(-t/Le)||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=zr(10,Le-n),f[u]=a>0?(c/zr(10,o-a)%zr(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(Fc+qe(e));return e}function Qm(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?Ce(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/Le),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?Ce(t,h):t):new d(0)}function Vr(e,t,r){var n,a=qe(e),i=Vt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Or(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Or(-a-1)+i,r&&(n=r-o)>0&&(i+=Or(n))):a>=o?(i+=Or(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Or(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=Or(n))),e.s<0?"-"+i:i}function eg(e,t){if(e.length>t)return e.length=t,!0}function tg(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 Jm(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,o5.test(i))Jm(o,i);else throw Error(Wr+i)}if(a.prototype=ae,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=tg,a.config=a.set=s5,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 s5(e){if(!e||typeof e!="object")throw Error(Pt+"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=tg(i5);vt=new Wc(1);const Ee=Wc;function l5(e){return d5(e)||f5(e)||u5(e)||c5()}function c5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
218
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u5(e,t){if(e){if(typeof e=="string")return zc(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 zc(e,t)}}function f5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function d5(e){if(Array.isArray(e))return zc(e)}function zc(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 p5=function(t){return t},rg={},ng=function(t){return t===rg},ag=function(t){return function r(){return arguments.length===0||arguments.length===1&&ng(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},h5=function e(t,r){return t===1?r:ag(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!==rg}).length;return o>=t?r.apply(void 0,a):e(t-o,ag(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 ng(f)?l.shift():f});return r.apply(void 0,l5(u).concat(l))}))})},Do=function(t){return h5(t.length,t)},Vc=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},m5=Do(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),g5=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return p5;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))}},Gc=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},ig=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 v5(e){var t;return e===0?t=1:t=Math.floor(new Ee(e).abs().log(10).toNumber())+1,t}function y5(e,t,r){for(var n=new Ee(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var b5=Do(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),x5=Do(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),w5=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:y5,getDigitCount:v5,interpolateNumber:b5,uninterpolateNumber:x5,uninterpolateTruncation:w5};function Hc(e){return T5(e)||S5(e)||og(e)||O5()}function O5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
219
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function T5(e){if(Array.isArray(e))return qc(e)}function Wa(e,t){return P5(e)||j5(e,t)||og(e,t)||A5()}function A5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
220
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function og(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 j5(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 P5(e){if(Array.isArray(e))return e}function sg(e){var t=Wa(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function lg(e,t,r){if(e.lte(0))return new Ee(0);var n=Io.getDigitCount(e.toNumber()),a=new Ee(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Ee(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Ee(Math.ceil(l))}function _5(e,t,r){var n=1,a=new Ee(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ee(10).pow(Io.getDigitCount(e)-1),a=new Ee(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ee(Math.floor(e)))}else e===0?a=new Ee(Math.floor((t-1)/2)):r||(a=new Ee(Math.floor(e)));var o=Math.floor((t-1)/2),s=g5(m5(function(l){return a.add(new Ee(l-o).mul(n)).toNumber()}),Vc);return s(0,t)}function cg(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 Ee(0),tickMin:new Ee(0),tickMax:new Ee(0)};var i=lg(new Ee(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Ee(0):(o=new Ee(e).add(t).div(2),o=o.sub(new Ee(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Ee(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?cg(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 Ee(s).mul(i)),tickMax:o.add(new Ee(l).mul(i))})}function E5(e){var t=Wa(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=sg([r,n]),l=Wa(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var f=u===1/0?[c].concat(Hc(Vc(0,a-1).map(function(){return 1/0}))):[].concat(Hc(Vc(0,a-1).map(function(){return-1/0})),[u]);return r>n?Gc(f):f}if(c===u)return _5(c,a,i);var d=cg(c,u,o,i),h=d.step,g=d.tickMin,v=d.tickMax,m=Io.rangeStep(g,v.add(new Ee(.1).mul(h)),h);return r>n?Gc(m):m}function C5(e,t){var r=Wa(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=sg([n,a]),s=Wa(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=lg(new Ee(c).sub(l).div(u-1),i,0),d=[].concat(Hc(Io.rangeStep(new Ee(l),new Ee(c).sub(new Ee(.99).mul(f)),f)),[c]);return n>a?Gc(d):d}var $5=ig(E5),k5=ig(C5),M5=process.env.NODE_ENV==="production",Kc="Invariant failed";function ht(e,t){if(M5)throw new Error(Kc);var r=typeof t=="function"?t():t,n=r?"".concat(Kc,": ").concat(r):Kc;throw new Error(n)}var N5=["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 D5(e,t){return B5(e)||R5(e,t)||L5(e,t)||I5()}function I5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
221
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L5(e,t){if(e){if(typeof e=="string")return ug(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 ug(e,t)}}function ug(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 R5(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 B5(e){if(Array.isArray(e))return e}function F5(e,t){if(e==null)return{};var r=U5(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 U5(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 W5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z5(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,pg(n.key),n)}}function V5(e,t,r){return t&&z5(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function G5(e,t,r){return t=Ro(t),H5(e,fg()?Reflect.construct(t,r||[],Ro(e).constructor):t.apply(e,r))}function H5(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 q5(e)}function q5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fg=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}function K5(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 dg(e,t,r){return t=pg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pg(e){var t=Y5(e,"string");return Cn(t)=="symbol"?t:t+""}function Y5(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 W5(this,t),G5(this,t,arguments)}return K5(t,e),V5(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=F5(n,N5),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 g=l.map(function(v){var m=c(v,s),b=m.x,w=m.y,x=m.value,A=m.errorVal;if(!A)return null;var y=[],O,T;if(Array.isArray(A)){var j=D5(A,2);O=j[0],T=j[1]}else O=T=A;if(i==="vertical"){var C=u.scale,k=w+a,P=k+o,E=k-o,F=C(x-O),N=C(x+T);y.push({x1:N,y1:P,x2:N,y2:E}),y.push({x1:F,y1:k,x2:N,y2:k}),y.push({x1:F,y1:P,x2:F,y2:E})}else if(i==="horizontal"){var L=f.scale,M=b+a,W=M-o,H=M+o,Y=L(x-O),$=L(x+T);y.push({x1:W,y1:$,x2:H,y2:$}),y.push({x1:M,y1:Y,x2:M,y2:$}),y.push({x1:W,y1:Y,x2:H,y2:Y})}return S.createElement(xe,Lo({className:"recharts-errorBar",key:"bar-".concat(y.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},h),y.map(function(B){return S.createElement("line",Lo({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return S.createElement(xe,{className:"recharts-errorBars"},g)}}])}(S.Component);dg($n,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),dg($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 hg(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 Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hg(Object(r),!0).forEach(function(n){X5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X5(e,t,r){return t=Z5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z5(e){var t=J5(e,"string");return za(t)=="symbol"?t:t+""}function J5(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 mg=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=gt(r,vn);if(!o)return null;var s=vn.defaultProps,l=s!==void 0?Gr(Gr({},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,g=h.sectors||h.data||[];return u.concat(g.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):c=(n||[]).map(function(u){var f=u.item,d=f.type.defaultProps,h=d!==void 0?Gr(Gr({},d),f.props):{},g=h.dataKey,v=h.name,m=h.legendType,b=h.hide;return{inactive:b,dataKey:g,type:l.iconType||m||"square",color:Zc(f),value:v||g,payload:h}}),Gr(Gr(Gr({},l),vn.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 gg(e){return r6(e)||t6(e)||e6(e)||Q5()}function Q5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
222
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e6(e,t){if(e){if(typeof e=="string")return Xc(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 Xc(e,t)}}function t6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function r6(e){if(Array.isArray(e))return Xc(e)}function Xc(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 vg(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 Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vg(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(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=a6(e,"string");return Va(t)=="symbol"?t:t+""}function a6(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 Je(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=t5(e,function(s){return Je(s,t)});if(r==="number"){var i=a.filter(function(s){return te(s)||parseFloat(s)});return i.length?[Mo(i),wr(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 i6=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(kt(f-u)!==kt(d-f)){var g=[];if(kt(d-f)===kt(l[1]-l[0])){h=d;var v=f+l[1]-l[0];g[0]=Math.min(v,(v+u)/2),g[1]=Math.max(v,(v+u)/2)}else{h=u;var m=d+l[1]-l[0];g[0]=Math.min(f,(m+f)/2),g[1]=Math.max(f,(m+f)/2)}var b=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>b[0]&&t<=b[1]||t>=g[0]&&t<=g[1]){o=a[c].index;break}}else{var w=Math.min(u,d),x=Math.max(u,d);if(t>(w+f)/2&&t<=(x+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},Zc=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ue(Ue({},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},o6=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 g=u[f[d]],v=g.items,m=g.cateAxisId,b=v.filter(function(T){return Qt(T.type).indexOf("Bar")>=0});if(b&&b.length){var w=b[0].type.defaultProps,x=w!==void 0?Ue(Ue({},w),b[0].props):b[0].props,A=x.barSize,y=x[m];o[y]||(o[y]=[]);var O=fe(A)?r:A;o[y].push({item:b[0],stackList:b.slice(1),barSize:fe(O)?void 0:Mr(O,n,0)})}}return o},s6=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=Mr(r,a,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,g=o.reduce(function(A,y){return A+y.barSize||0},0);g+=(l-1)*c,g>=a&&(g-=(l-1)*c,c=0),g>=a&&h>0&&(d=!0,h*=.9,g=l*h);var v=(a-g)/2>>0,m={offset:v-c,size:0};u=o.reduce(function(A,y){var O={item:y.item,position:{offset:m.offset+m.size+c,size:d?h:y.barSize}},T=[].concat(gg(A),[O]);return m=T[T.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(j){T.push({item:j,position:m})}),T},f)}else{var b=Mr(n,a,0,!0);a-2*b-(l-1)*c<=0&&(c=0);var w=(a-2*b-(l-1)*c)/l;w>1&&(w>>=0);var x=s===+s?Math.min(w,s):w;u=o.reduce(function(A,y,O){var T=[].concat(gg(A),[{item:y.item,position:{offset:b+(w+c)*O+(w-x)/2,size:x}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(j){T.push({item:j,position:T[T.length-1].position})}),T},f)}return u},l6=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=mg({children:i,legendWidth:l});if(c){var u=a||{},f=u.width,d=u.height,h=c.align,g=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&h!=="center"&&te(t[h]))return Ue(Ue({},t),{},kn({},h,t[h]+(f||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&g!=="middle"&&te(t[g]))return Ue(Ue({},t),{},kn({},g,t[g]+(d||0)))}return t},c6=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},yg=function(t,r,n,a,i){var o=r.props.children,s=dt(o,$n).filter(function(c){return c6(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=Je(u,n);if(fe(f))return c;var d=Array.isArray(f)?[Mo(f),wr(f)]:[f,f],h=l.reduce(function(g,v){var m=Je(u,v,0),b=d[0]-Math.abs(Array.isArray(m)?m[0]:m),w=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(b,g[0]),Math.max(w,g[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},u6=function(t,r,n,a,i){var o=r.map(function(s){return yg(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},bg=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&yg(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},[])},xg=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},wg=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?kt(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},f6=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(Cr(a)){var l="scale".concat(Fi(a));return{scale:(qm[l]||Ca)(),realScaleType:qm[l]?l:"point"}}return pe(a)?{scale:a}:{scale:Ca(),realScaleType:"point"}},Og=1e-4,d6=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])-Og,o=Math.max(a[0],a[1])+Og,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},p6=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},h6=function(t,r){if(!r||r.length!==2||!te(r[0])||!te(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(!te(t[0])||t[0]<n)&&(i[0]=n),(!te(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},m6=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])}},g6=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)}},v6={sign:m6,expand:kS,none:fn,silhouette:MS,wiggle:NS,positive:g6},y6=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=v6[n],o=$S().keys(a).value(function(s,l){return+Je(s,l,0)}).order(Al).offset(i);return o(t)},b6=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,g=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Ue(Ue({},d.type.defaultProps),d.props):d.props,v=g.stackId,m=g.hide;if(m)return f;var b=g[n],w=f[b]||{hasStack:!1,stackGroups:{}};if(Xe(v)){var x=w.stackGroups[v]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),w.hasStack=!0,w.stackGroups[v]=x}else w.stackGroups[kr("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Ue(Ue({},f),{},kn({},b,w))},l),u={};return Object.keys(c).reduce(function(f,d){var h=c[d];if(h.hasStack){var g={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,m){var b=h.stackGroups[m];return Ue(Ue({},v),{},kn({},m,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:y6(t,b.items,i)}))},g)}return Ue(Ue({},f),{},kn({},d,h))},u)},x6=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=$5(c,i,s);return t.domain([Mo(u),wr(u)]),{niceTicks:u}}if(i&&a==="number"){var f=t.domain(),d=k5(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=Je(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var Sg=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=Je(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},w6=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]},O6=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ue(Ue({},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},S6=function(t){return t.reduce(function(r,n){return[Mo(n.concat([r[0]]).filter(te)),wr(n.concat([r[1]]).filter(te))]},[1/0,-1/0])},Tg=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=S6(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})},Ag=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qc=function(t,r,n){if(pe(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(te(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(Ag.test(t[0])){var i=+Ag.exec(t[0])[1];a[0]=r[0]-i}else pe(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(te(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(jg.test(t[1])){var o=+jg.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=Hl(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},Pg=function(t,r,n){return!t||!t.length||Ur(t,wt(n,"type.defaultProps.domain"))?r:t},_g=function(t,r){var n=t.type.defaultProps?Ue(Ue({},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 Ue(Ue({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Zc(t),value:Je(r,a),type:l,payload:r,chartType:c,hide:u})};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)}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 Cg(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){T6(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 T6(e,t,r){return t=A6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A6(e){var t=j6(e,"string");return Ha(t)=="symbol"?t:t+""}function j6(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)}var Uo=Math.PI/180,P6=function(t){return t*180/Math.PI},nt=function(t,r,n,a){return{x:t+Math.cos(-Uo*a)*n,y:r+Math.sin(-Uo*a)*n}},_6=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))},E6=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=_6({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:P6(c),angleInRadian:c}},C6=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}},$6=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},$g=function(t,r){var n=t.x,a=t.y,i=E6({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=C6(r),f=u.startAngle,d=u.endAngle,h=s,g;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;g=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;g=h>=d&&h<=f}return g?Cg(Cg({},r),{},{radius:o,angle:$6(h,r)}):null};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)}var k6=["offset"];function M6(e){return L6(e)||I6(e)||D6(e)||N6()}function N6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
223
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D6(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 I6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L6(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 R6(e,t){if(e==null)return{};var r=B6(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 B6(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 kg(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?kg(Object(r),!0).forEach(function(n){F6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F6(e,t,r){return t=U6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U6(e){var t=W6(e,"string");return qa(t)=="symbol"?t:t+""}function W6(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)}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 z6=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return pe(n)?n(a):a},V6=function(t,r){var n=kt(r-t),a=Math.min(Math.abs(r-t),360);return n*a},G6=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,g=l.endAngle,v=l.clockWise,m=(f+d)/2,b=V6(h,g),w=b>=0?1:-1,x,A;a==="insideStart"?(x=h+w*o,A=v):a==="insideEnd"?(x=g-w*o,A=!v):a==="end"&&(x=g+w*o,A=v),A=b<=0?A:!A;var y=nt(c,u,m,x),O=nt(c,u,m,x+(A?1:-1)*359),T="M".concat(y.x,",").concat(y.y,`
224
+ A`).concat(m,",").concat(m,",0,1,").concat(A?0:1,`,
225
+ `).concat(O.x,",").concat(O.y),j=fe(t.id)?kr("recharts-radial-line-"):t.id;return S.createElement("text",Ka({},n,{dominantBaseline:"central",className:ge("recharts-radial-bar-label",s)}),S.createElement("defs",null,S.createElement("path",{id:j,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(j)},r))},H6=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),g=h.x,v=h.y;return{x:g,y:v,textAnchor:g>=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 m=(l+c)/2,b=nt(o,s,m,d),w=b.x,x=b.y;return{x:w,y:x,textAnchor:"middle",verticalAnchor:"middle"}},q6=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",g=f>0?"start":"end",v=c>=0?1:-1,m=v*a,b=v>0?"end":"start",w=v>0?"start":"end";if(i==="top"){var x={x:s+c/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},x),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:g};return Qe(Qe({},A),n?{height:Math.max(n.y+n.height-(l+u),0),width:c}:{})}if(i==="left"){var y={x:s-m,y:l+u/2,textAnchor:b,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+m,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return Qe(Qe({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:u}:{})}var T=n?{width:c,height:u}:{};return i==="insideLeft"?Qe({x:s+m,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},T):i==="insideRight"?Qe({x:s+c-m,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},T):i==="insideTop"?Qe({x:s+c/2,y:l+d,textAnchor:"middle",verticalAnchor:g},T):i==="insideBottom"?Qe({x:s+c/2,y:l+u-d,textAnchor:"middle",verticalAnchor:h},T):i==="insideTopLeft"?Qe({x:s+m,y:l+d,textAnchor:w,verticalAnchor:g},T):i==="insideTopRight"?Qe({x:s+c-m,y:l+d,textAnchor:b,verticalAnchor:g},T):i==="insideBottomLeft"?Qe({x:s+m,y:l+u-d,textAnchor:w,verticalAnchor:h},T):i==="insideBottomRight"?Qe({x:s+c-m,y:l+u-d,textAnchor:b,verticalAnchor:h},T):an(i)&&(te(i.x)||$r(i.x))&&(te(i.y)||$r(i.y))?Qe({x:s+Mr(i.x,c),y:l+Mr(i.y,u),textAnchor:"end",verticalAnchor:"end"},T):Qe({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},T)},K6=function(t){return"cx"in t&&te(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=R6(e,k6),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)&&!S.isValidElement(c)&&!pe(c))return null;if(S.isValidElement(c))return S.cloneElement(c,a);var h;if(pe(c)){if(h=S.createElement(c,a),S.isValidElement(h))return h}else h=z6(a);var g=K6(i),v=de(a,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return G6(a,h,v);var m=g?H6(a):q6(a);return S.createElement(po,Ka({className:ge("recharts-label",f)},v,m,{breakAll:d}),h)}it.displayName="Label";var Mg=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,g=t.left,v=t.width,m=t.height,b=t.clockWise,w=t.labelViewBox;if(w)return w;if(te(v)&&te(m)){if(te(f)&&te(d))return{x:f,y:d,width:v,height:m};if(te(h)&&te(g))return{x:h,y:g,width:v,height:m}}return te(f)&&te(d)?{x:f,y:d,width:0,height:0}:te(r)&&te(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},Y6=function(t,r){return t?t===!0?S.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?S.createElement(it,{key:"label-implicit",viewBox:r,value:t}):S.isValidElement(t)?t.type===it?S.cloneElement(t,{key:"label-implicit",viewBox:r}):S.createElement(it,{key:"label-implicit",content:t,viewBox:r}):pe(t)?S.createElement(it,{key:"label-implicit",content:t,viewBox:r}):an(t)?S.createElement(it,Ka({viewBox:r},t,{key:"label-implicit"})):null:null},X6=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=Mg(t),o=dt(a,it).map(function(l,c){return S.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=Y6(t.label,r||i);return[s].concat(M6(o))};it.parseViewBox=Mg,it.renderCallByParent=X6;function Z6(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var J6=Z6;const Q6=ke(J6);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 e4=["valueAccessor"],t4=["data","dataKey","clockWise","id","textBreakAll"];function r4(e){return o4(e)||i4(e)||a4(e)||n4()}function n4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
226
+ 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 tu(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 tu(e,t)}}function i4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o4(e){if(Array.isArray(e))return tu(e)}function tu(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 Wo(){return Wo=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},Wo.apply(this,arguments)}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 Dg(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){s4(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 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=c4(e,"string");return Ya(t)=="symbol"?t:t+""}function c4(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 Ig(e,t){if(e==null)return{};var r=u4(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 u4(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 f4=function(t){return Array.isArray(t.value)?Q6(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?f4:t,n=Ig(e,e4),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Ig(n,t4);return!a||!a.length?null:S.createElement(xe,{className:"recharts-label-list"},a.map(function(u,f){var d=fe(i)?r(u,f):Je(u&&u.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return S.createElement(it,Wo({},de(u,!0),c,h,{parentViewBox:u.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(fe(o)?u:Dg(Dg({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function d4(e,t){return e?e===!0?S.createElement(Gt,{key:"labelList-implicit",data:t}):S.isValidElement(e)||pe(e)?S.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):an(e)?S.createElement(Gt,Wo({data:t},e,{key:"labelList-implicit"})):null:null}function p4(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 S.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=d4(e.label,t);return[i].concat(r4(a))}Gt.renderCallByParent=p4;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 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 Lg(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 Rg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lg(Object(r),!0).forEach(function(n){h4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h4(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=g4(e,"string");return Xa(t)=="symbol"?t:t+""}function g4(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 v4=function(t,r){var n=kt(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)/Uo,d=c?i:i+o*f,h=nt(r,n,u,d),g=nt(r,n,a,d),v=c?i-o*f:i,m=nt(r,n,u*Math.cos(f*Uo),v);return{center:h,circleTangency:g,lineTangency:m,theta:f}},Bg=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=v4(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,`
222
227
  A `).concat(i,",").concat(i,`,0,
223
228
  `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
224
229
  `).concat(f.x,",").concat(f.y,`
225
- `);if(a>0){var h=nt(r,n,a,o),v=nt(r,n,a,c);d+="L ".concat(v.x,",").concat(v.y,`
230
+ `);if(a>0){var h=nt(r,n,a,o),g=nt(r,n,a,c);d+="L ".concat(g.x,",").concat(g.y,`
226
231
  A `).concat(a,",").concat(a,`,0,
227
232
  `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
228
- `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},v4=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,v=d.lineTangency,g=d.theta,m=zo({cx:r,cy:n,radius:i,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:l}),b=m.circleTangency,O=m.lineTangency,x=m.theta,j=l?Math.abs(c-u):Math.abs(c-u)-g-x;if(j<0)return s?"M ".concat(v.x,",").concat(v.y,`
233
+ `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},y4=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=kt(u-c),d=zo({cx:r,cy:n,radius:i,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,g=d.lineTangency,v=d.theta,m=zo({cx:r,cy:n,radius:i,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:l}),b=m.circleTangency,w=m.lineTangency,x=m.theta,A=l?Math.abs(c-u):Math.abs(c-u)-v-x;if(A<0)return s?"M ".concat(g.x,",").concat(g.y,`
229
234
  a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
230
235
  a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
231
- `):Rv({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:u});var y="M ".concat(v.x,",").concat(v.y,`
236
+ `):Bg({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:u});var y="M ".concat(g.x,",").concat(g.y,`
232
237
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
233
- A`).concat(i,",").concat(i,",0,").concat(+(j>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
234
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
235
- `);if(a>0){var w=zo({cx:r,cy:n,radius:a,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=w.circleTangency,A=w.lineTangency,_=w.theta,C=zo({cx:r,cy:n,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=C.circleTangency,E=C.lineTangency,I=C.theta,k=l?Math.abs(c-u):Math.abs(c-u)-_-I;if(k<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(E.x,",").concat(E.y,`
238
+ A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
239
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(w.x,",").concat(w.y,`
240
+ `);if(a>0){var O=zo({cx:r,cy:n,radius:a,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=O.circleTangency,j=O.lineTangency,C=O.theta,k=zo({cx:r,cy:n,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=k.circleTangency,E=k.lineTangency,F=k.theta,N=l?Math.abs(c-u):Math.abs(c-u)-C-F;if(N<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(E.x,",").concat(E.y,`
236
241
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,`
237
- A`).concat(a,",").concat(a,",0,").concat(+(k>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,`
238
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(A.x,",").concat(A.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},g4={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Bv=function(t){var r=Lv(Lv({},g4),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=ve("recharts-sector",d),v=o-i,g=Mr(s,v,0,!0),m;return g>0&&Math.abs(u-f)<360?m=v4({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):m=Rv({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),S.createElement("path",ru({},de(r,!0),{className:h,d:m,role:"img"}))};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 nu(){return nu=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},nu.apply(this,arguments)}function Fv(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 Uv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fv(Object(r),!0).forEach(function(n){y4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y4(e,t,r){return t=b4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b4(e){var t=x4(e,"string");return Za(t)=="symbol"?t:t+""}function x4(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 Wv={curveBasisClosed:yS,curveBasisOpen:bS,curveBasis:gS,curveBumpX:nS,curveBumpY:aS,curveLinearClosed:xS,curveLinear:Vi,curveMonotoneX:wS,curveMonotoneY:OS,curveNatural:SS,curveStep:TS,curveStepAfter:jS,curveStepBefore:AS},Vo=function(t){return t.x===+t.x&&t.y===+t.y},Ja=function(t){return t.x},Qa=function(t){return t.y},w4=function(t,r){if(pe(t))return t;var n="curve".concat(Fi(t));return(n==="curveMonotone"||n==="curveBump")&&r?Wv["".concat(n).concat(r==="vertical"?"Y":"X")]:Wv[n]||Vi},O4=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=w4(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,v=f.map(function(g,m){return Uv(Uv({},g),{},{base:h[m]})});return s==="vertical"?d=Gi().y(Qa).x1(Ja).x0(function(g){return g.base.x}):d=Gi().x(Ja).y1(Qa).y0(function(g){return g.base.y}),d.defined(Vo).curve(u),d(v)}return s==="vertical"&&Q(o)?d=Gi().y(Qa).x1(Ja).x0(o):Q(o)?d=Gi().x(Ja).y1(Qa).y0(o):d=Pd().x(Ja).y(Qa),d.defined(Vo).curve(u),d(f)},Hr=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?O4(t):a;return xt.createElement("path",nu({},de(t,!1),Bi(t),{className:ve("recharts-curve",r),d:o,ref:i}))},au={exports:{}},Go={exports:{}},Se={};/** @license React v16.13.1
242
+ A`).concat(a,",").concat(a,",0,").concat(+(N>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,`
243
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(j.x,",").concat(j.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},b4={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Fg=function(t){var r=Rg(Rg({},b4),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=ge("recharts-sector",d),g=o-i,v=Mr(s,g,0,!0),m;return v>0&&Math.abs(u-f)<360?m=y4({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(v,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):m=Bg({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),S.createElement("path",ru({},de(r,!0),{className:h,d:m,role:"img"}))};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 nu(){return nu=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},nu.apply(this,arguments)}function Ug(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?Ug(Object(r),!0).forEach(function(n){x4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x4(e,t,r){return t=w4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w4(e){var t=O4(e,"string");return Za(t)=="symbol"?t:t+""}function O4(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 zg={curveBasisClosed:xS,curveBasisOpen:wS,curveBasis:bS,curveBumpX:iS,curveBumpY:oS,curveLinearClosed:OS,curveLinear:Vi,curveMonotoneX:SS,curveMonotoneY:TS,curveNatural:AS,curveStep:jS,curveStepAfter:_S,curveStepBefore:PS},Vo=function(t){return t.x===+t.x&&t.y===+t.y},Ja=function(t){return t.x},Qa=function(t){return t.y},S4=function(t,r){if(pe(t))return t;var n="curve".concat(Fi(t));return(n==="curveMonotone"||n==="curveBump")&&r?zg["".concat(n).concat(r==="vertical"?"Y":"X")]:zg[n]||Vi},T4=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=S4(n,s),f=c?i.filter(function(v){return Vo(v)}):i,d;if(Array.isArray(o)){var h=c?o.filter(function(v){return Vo(v)}):o,g=f.map(function(v,m){return Wg(Wg({},v),{},{base:h[m]})});return s==="vertical"?d=Gi().y(Qa).x1(Ja).x0(function(v){return v.base.x}):d=Gi().x(Ja).y1(Qa).y0(function(v){return v.base.y}),d.defined(Vo).curve(u),d(g)}return s==="vertical"&&te(o)?d=Gi().y(Qa).x1(Ja).x0(o):te(o)?d=Gi().x(Ja).y1(Qa).y0(o):d=_d().x(Ja).y(Qa),d.defined(Vo).curve(u),d(f)},Hr=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?T4(t):a;return xt.createElement("path",nu({},de(t,!1),Bi(t),{className:ge("recharts-curve",r),d:o,ref:i}))},au={exports:{}},Go={exports:{}},Te={};/** @license React v16.13.1
239
244
  * react-is.production.min.js
240
245
  *
241
246
  * Copyright (c) Facebook, Inc. and its affiliates.
242
247
  *
243
248
  * This source code is licensed under the MIT license found in the
244
249
  * LICENSE file in the root directory of this source tree.
245
- */var zv;function S4(){if(zv)return Se;zv=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,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(y){if(typeof y=="object"&&y!==null){var w=y.$$typeof;switch(w){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 v:case h:case o:return y;default:return w}}case r:return w}}}function j(y){return x(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=v,Se.Memo=h,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(y){return j(y)||x(y)===l},Se.isConcurrentMode=j,Se.isContextConsumer=function(y){return x(y)===s},Se.isContextProvider=function(y){return x(y)===o},Se.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Se.isForwardRef=function(y){return x(y)===u},Se.isFragment=function(y){return x(y)===n},Se.isLazy=function(y){return x(y)===v},Se.isMemo=function(y){return x(y)===h},Se.isPortal=function(y){return x(y)===r},Se.isProfiler=function(y){return x(y)===i},Se.isStrictMode=function(y){return x(y)===a},Se.isSuspense=function(y){return x(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===v||y.$$typeof===h||y.$$typeof===o||y.$$typeof===s||y.$$typeof===u||y.$$typeof===m||y.$$typeof===b||y.$$typeof===O||y.$$typeof===g)},Se.typeOf=x,Se}var Te={};/** @license React v16.13.1
250
+ */var Vg;function A4(){if(Vg)return Te;Vg=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,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(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 g:case h:case o:return y;default:return O}}case r:return O}}}function A(y){return x(y)===c}return Te.AsyncMode=l,Te.ConcurrentMode=c,Te.ContextConsumer=s,Te.ContextProvider=o,Te.Element=t,Te.ForwardRef=u,Te.Fragment=n,Te.Lazy=g,Te.Memo=h,Te.Portal=r,Te.Profiler=i,Te.StrictMode=a,Te.Suspense=f,Te.isAsyncMode=function(y){return A(y)||x(y)===l},Te.isConcurrentMode=A,Te.isContextConsumer=function(y){return x(y)===s},Te.isContextProvider=function(y){return x(y)===o},Te.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Te.isForwardRef=function(y){return x(y)===u},Te.isFragment=function(y){return x(y)===n},Te.isLazy=function(y){return x(y)===g},Te.isMemo=function(y){return x(y)===h},Te.isPortal=function(y){return x(y)===r},Te.isProfiler=function(y){return x(y)===i},Te.isStrictMode=function(y){return x(y)===a},Te.isSuspense=function(y){return x(y)===f},Te.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===g||y.$$typeof===h||y.$$typeof===o||y.$$typeof===s||y.$$typeof===u||y.$$typeof===m||y.$$typeof===b||y.$$typeof===w||y.$$typeof===v)},Te.typeOf=x,Te}var Ae={};/** @license React v16.13.1
246
251
  * react-is.development.js
247
252
  *
248
253
  * Copyright (c) Facebook, Inc. and its affiliates.
249
254
  *
250
255
  * This source code is licensed under the MIT license found in the
251
256
  * LICENSE file in the root directory of this source tree.
252
- */var Vv;function T4(){return Vv||(Vv=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,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function x(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===v||L.$$typeof===h||L.$$typeof===o||L.$$typeof===s||L.$$typeof===u||L.$$typeof===m||L.$$typeof===b||L.$$typeof===O||L.$$typeof===g)}function j(L){if(typeof L=="object"&&L!==null){var oe=L.$$typeof;switch(oe){case t:var X=L.type;switch(X){case l:case c:case n:case i:case a:case f:return X;default:var ce=X&&X.$$typeof;switch(ce){case s:case u:case v:case h:case o:return ce;default:return oe}}case r:return oe}}}var y=l,w=c,T=s,A=o,_=t,C=u,P=n,E=v,I=h,k=r,D=i,M=a,F=f,z=!1;function q(L){return z||(z=!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)||j(L)===l}function $(L){return j(L)===c}function B(L){return j(L)===s}function U(L){return j(L)===o}function W(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function K(L){return j(L)===u}function R(L){return j(L)===n}function G(L){return j(L)===v}function Y(L){return j(L)===h}function te(L){return j(L)===r}function V(L){return j(L)===i}function Z(L){return j(L)===a}function ee(L){return j(L)===f}Te.AsyncMode=y,Te.ConcurrentMode=w,Te.ContextConsumer=T,Te.ContextProvider=A,Te.Element=_,Te.ForwardRef=C,Te.Fragment=P,Te.Lazy=E,Te.Memo=I,Te.Portal=k,Te.Profiler=D,Te.StrictMode=M,Te.Suspense=F,Te.isAsyncMode=q,Te.isConcurrentMode=$,Te.isContextConsumer=B,Te.isContextProvider=U,Te.isElement=W,Te.isForwardRef=K,Te.isFragment=R,Te.isLazy=G,Te.isMemo=Y,Te.isPortal=te,Te.isProfiler=V,Te.isStrictMode=Z,Te.isSuspense=ee,Te.isValidElementType=x,Te.typeOf=j}()),Te}var Gv;function Hv(){return Gv||(Gv=1,process.env.NODE_ENV==="production"?Go.exports=S4():Go.exports=T4()),Go.exports}/*
257
+ */var Gg;function j4(){return Gg||(Gg=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,g=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===n||R===c||R===i||R===a||R===f||R===d||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===m||R.$$typeof===b||R.$$typeof===w||R.$$typeof===v)}function A(R){if(typeof R=="object"&&R!==null){var oe=R.$$typeof;switch(oe){case t:var X=R.type;switch(X){case l:case c:case n:case i:case a:case f:return X;default:var ce=X&&X.$$typeof;switch(ce){case s:case u:case g:case h:case o:return ce;default:return oe}}case r:return oe}}}var y=l,O=c,T=s,j=o,C=t,k=u,P=n,E=g,F=h,N=r,L=i,M=a,W=f,H=!1;function Y(R){return H||(H=!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.")),$(R)||A(R)===l}function $(R){return A(R)===c}function B(R){return A(R)===s}function _(R){return A(R)===o}function U(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function V(R){return A(R)===u}function I(R){return A(R)===n}function z(R){return A(R)===g}function q(R){return A(R)===h}function Q(R){return A(R)===r}function G(R){return A(R)===i}function Z(R){return A(R)===a}function ee(R){return A(R)===f}Ae.AsyncMode=y,Ae.ConcurrentMode=O,Ae.ContextConsumer=T,Ae.ContextProvider=j,Ae.Element=C,Ae.ForwardRef=k,Ae.Fragment=P,Ae.Lazy=E,Ae.Memo=F,Ae.Portal=N,Ae.Profiler=L,Ae.StrictMode=M,Ae.Suspense=W,Ae.isAsyncMode=Y,Ae.isConcurrentMode=$,Ae.isContextConsumer=B,Ae.isContextProvider=_,Ae.isElement=U,Ae.isForwardRef=V,Ae.isFragment=I,Ae.isLazy=z,Ae.isMemo=q,Ae.isPortal=Q,Ae.isProfiler=G,Ae.isStrictMode=Z,Ae.isSuspense=ee,Ae.isValidElementType=x,Ae.typeOf=A}()),Ae}var Hg;function qg(){return Hg||(Hg=1,process.env.NODE_ENV==="production"?Go.exports=A4():Go.exports=j4()),Go.exports}/*
253
258
  object-assign
254
259
  (c) Sindre Sorhus
255
260
  @license MIT
256
- */var iu,qv;function A4(){if(qv)return iu;qv=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 iu=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},iu}var ou,Kv;function su(){if(Kv)return ou;Kv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ou=e,ou}var lu,Yv;function Xv(){return Yv||(Yv=1,lu=Function.call.bind(Object.prototype.hasOwnProperty)),lu}var cu,Zv;function j4(){if(Zv)return cu;Zv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=su(),r={},n=Xv();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(v){f=v}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={})},cu=a,cu}var uu,Jv;function P4(){if(Jv)return uu;Jv=1;var e=Hv(),t=A4(),r=su(),n=Xv(),a=j4(),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 uu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}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:O(),arrayOf:x,element:j(),elementType:y(),instanceOf:w,node:C(),objectOf:A,oneOf:T,oneOfType:_,shape:E,exact:I};function v($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function g($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}g.prototype=Error.prototype;function m($){if(process.env.NODE_ENV!=="production")var B={},U=0;function W(R,G,Y,te,V,Z,ee){if(te=te||d,Z=Z||Y,ee!==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+":"+Y;!B[oe]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` 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."),B[oe]=!0,U++)}}return G[Y]==null?R?G[Y]===null?new g("The "+V+" `"+Z+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new g("The "+V+" `"+Z+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:$(G,Y,te,V,Z)}var K=W.bind(null,!1);return K.isRequired=W.bind(null,!0),K}function b($){function B(U,W,K,R,G,Y){var te=U[W],V=M(te);if(V!==$){var Z=F(te);return new g("Invalid "+R+" `"+G+"` of type "+("`"+Z+"` supplied to `"+K+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return m(B)}function O(){return m(o)}function x($){function B(U,W,K,R,G){if(typeof $!="function")return new g("Property `"+G+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var Y=U[W];if(!Array.isArray(Y)){var te=M(Y);return new g("Invalid "+R+" `"+G+"` of type "+("`"+te+"` supplied to `"+K+"`, expected an array."))}for(var V=0;V<Y.length;V++){var Z=$(Y,V,K,R,G+"["+V+"]",r);if(Z instanceof Error)return Z}return null}return m(B)}function j(){function $(B,U,W,K,R){var G=B[U];if(!s(G)){var Y=M(G);return new g("Invalid "+K+" `"+R+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return m($)}function y(){function $(B,U,W,K,R){var G=B[U];if(!e.isValidElementType(G)){var Y=M(G);return new g("Invalid "+K+" `"+R+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return m($)}function w($){function B(U,W,K,R,G){if(!(U[W]instanceof $)){var Y=$.name||d,te=q(U[W]);return new g("Invalid "+R+" `"+G+"` of type "+("`"+te+"` supplied to `"+K+"`, expected ")+("instance of `"+Y+"`."))}return null}return m(B)}function T($){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 B(U,W,K,R,G){for(var Y=U[W],te=0;te<$.length;te++)if(v(Y,$[te]))return null;var V=JSON.stringify($,function(ee,L){var oe=F(L);return oe==="symbol"?String(L):L});return new g("Invalid "+R+" `"+G+"` of value `"+String(Y)+"` "+("supplied to `"+K+"`, expected one of "+V+"."))}return m(B)}function A($){function B(U,W,K,R,G){if(typeof $!="function")return new g("Property `"+G+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var Y=U[W],te=M(Y);if(te!=="object")return new g("Invalid "+R+" `"+G+"` of type "+("`"+te+"` supplied to `"+K+"`, expected an object."));for(var V in Y)if(n(Y,V)){var Z=$(Y,V,K,R,G+"."+V,r);if(Z instanceof Error)return Z}return null}return m(B)}function _($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var B=0;B<$.length;B++){var U=$[B];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(U)+" at index "+B+"."),o}function W(K,R,G,Y,te){for(var V=[],Z=0;Z<$.length;Z++){var ee=$[Z],L=ee(K,R,G,Y,te,r);if(L==null)return null;L.data&&n(L.data,"expectedType")&&V.push(L.data.expectedType)}var oe=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new g("Invalid "+Y+" `"+te+"` supplied to "+("`"+G+"`"+oe+"."))}return m(W)}function C(){function $(B,U,W,K,R){return k(B[U])?null:new g("Invalid "+K+" `"+R+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return m($)}function P($,B,U,W,K){return new g(($||"React class")+": "+B+" type `"+U+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function E($){function B(U,W,K,R,G){var Y=U[W],te=M(Y);if(te!=="object")return new g("Invalid "+R+" `"+G+"` of type `"+te+"` "+("supplied to `"+K+"`, expected `object`."));for(var V in $){var Z=$[V];if(typeof Z!="function")return P(K,R,G,V,F(Z));var ee=Z(Y,V,K,R,G+"."+V,r);if(ee)return ee}return null}return m(B)}function I($){function B(U,W,K,R,G){var Y=U[W],te=M(Y);if(te!=="object")return new g("Invalid "+R+" `"+G+"` of type `"+te+"` "+("supplied to `"+K+"`, expected `object`."));var V=t({},U[W],$);for(var Z in V){var ee=$[Z];if(n($,Z)&&typeof ee!="function")return P(K,R,G,Z,F(ee));if(!ee)return new g("Invalid "+R+" `"+G+"` key `"+Z+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(U[W],null," ")+`
257
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var L=ee(Y,Z,K,R,G+"."+Z,r);if(L)return L}return null}return m(B)}function k($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(k);if($===null||s($))return!0;var B=f($);if(B){var U=B.call($),W;if(B!==$.entries){for(;!(W=U.next()).done;)if(!k(W.value))return!1}else for(;!(W=U.next()).done;){var K=W.value;if(K&&!k(K[1]))return!1}}else return!1;return!0;default:return!1}}function D($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function M($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":D(B,$)?"symbol":B}function F($){if(typeof $>"u"||$===null)return""+$;var B=M($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function z($){var B=F($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function q($){return!$.constructor||!$.constructor.name?d:$.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},uu}var fu,Qv;function _4(){if(Qv)return fu;Qv=1;var e=su();function t(){}function r(){}return r.resetWarningCache=t,fu=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},fu}if(process.env.NODE_ENV!=="production"){var E4=Hv(),C4=!0;au.exports=P4()(E4.isElement,C4)}else au.exports=_4()();var $4=au.exports;const Ae=ke($4);var k4=Object.getOwnPropertyNames,M4=Object.getOwnPropertySymbols,N4=Object.prototype.hasOwnProperty;function eg(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Ho(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 tg(e){return k4(e).concat(M4(e))}var D4=Object.hasOwn||function(e,t){return N4.call(e,t)};function qr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var I4="__v",L4="__o",R4="_owner",rg=Object.getOwnPropertyDescriptor,ng=Object.keys;function B4(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 F4(e,t){return qr(e.getTime(),t.getTime())}function U4(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function W4(e,t){return e===t}function ag(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 z4=qr;function V4(e,t,r){var n=ng(e),a=n.length;if(ng(t).length!==a)return!1;for(;a-- >0;)if(!og(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=tg(e),a=n.length;if(tg(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!og(e,t,r,i)||(o=rg(e,i),s=rg(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function G4(e,t){return qr(e.valueOf(),t.valueOf())}function H4(e,t){return e.source===t.source&&e.flags===t.flags}function ig(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 q4(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 K4(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 og(e,t,r,n){return(n===R4||n===L4||n===I4)&&(e.$$typeof||t.$$typeof)?!0:D4(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Y4="[object Arguments]",X4="[object Boolean]",Z4="[object Date]",J4="[object Error]",Q4="[object Map]",e8="[object Number]",t8="[object Object]",r8="[object RegExp]",n8="[object Set]",a8="[object String]",i8="[object URL]",o8=Array.isArray,sg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,lg=Object.assign,s8=Object.prototype.toString.call.bind(Object.prototype.toString);function l8(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(v,g,m){if(v===g)return!0;if(v==null||g==null)return!1;var b=typeof v;if(b!==typeof g)return!1;if(b!=="object")return b==="number"?o(v,g,m):b==="function"?a(v,g,m):!1;var O=v.constructor;if(O!==g.constructor)return!1;if(O===Object)return s(v,g,m);if(o8(v))return t(v,g,m);if(sg!=null&&sg(v))return f(v,g,m);if(O===Date)return r(v,g,m);if(O===RegExp)return c(v,g,m);if(O===Map)return i(v,g,m);if(O===Set)return u(v,g,m);var x=s8(v);return x===Z4?r(v,g,m):x===r8?c(v,g,m):x===Q4?i(v,g,m):x===n8?u(v,g,m):x===t8?typeof v.then!="function"&&typeof g.then!="function"&&s(v,g,m):x===i8?d(v,g,m):x===J4?n(v,g,m):x===Y4?s(v,g,m):x===X4||x===e8||x===a8?l(v,g,m):!1}}function c8(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:B4,areDatesEqual:F4,areErrorsEqual:U4,areFunctionsEqual:W4,areMapsEqual:n?eg(ag,ei):ag,areNumbersEqual:z4,areObjectsEqual:n?ei:V4,arePrimitiveWrappersEqual:G4,areRegExpsEqual:H4,areSetsEqual:n?eg(ig,ei):ig,areTypedArraysEqual:n?ei:q4,areUrlsEqual:K4};if(r&&(a=lg({},a,r(a))),t){var i=Ho(a.areArraysEqual),o=Ho(a.areMapsEqual),s=Ho(a.areObjectsEqual),l=Ho(a.areSetsEqual);a=lg({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function u8(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function f8(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 d8=Sr();Sr({strict:!0}),Sr({circular:!0}),Sr({circular:!0,strict:!0}),Sr({createInternalComparator:function(){return qr}}),Sr({strict:!0,createInternalComparator:function(){return qr}}),Sr({circular:!0,createInternalComparator:function(){return qr}}),Sr({circular:!0,createInternalComparator:function(){return qr},strict:!0});function Sr(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=c8(e),l=l8(s),c=n?n(l):u8(l);return f8({circular:r,comparator:l,createState:a,equals:c,strict:o})}function p8(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function cg(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):p8(a)};requestAnimationFrame(n)}function du(e){"@babel/helpers - typeof";return du=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},du(e)}function h8(e){return y8(e)||g8(e)||v8(e)||m8()}function m8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
258
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v8(e,t){if(e){if(typeof e=="string")return ug(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 ug(e,t)}}function ug(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 g8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function y8(e){if(Array.isArray(e))return e}function b8(){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=h8(o),l=s[0],c=s.slice(1);if(typeof l=="number"){cg(a.bind(null,c),l);return}a(l),cg(a.bind(null,c));return}du(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 fg(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 dg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fg(Object(r),!0).forEach(function(n){pg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pg(e,t,r){return t=x8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x8(e){var t=w8(e,"string");return ti(t)==="symbol"?t:String(t)}function w8(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 O8=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},S8=function(t){return t},T8=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 dg(dg({},n),{},pg({},a,t(a,r[a])))},{})},hg=function(t,r,n){return t.map(function(a){return"".concat(T8(a)," ").concat(r,"ms ").concat(n)}).join(",")},A8=process.env.NODE_ENV!=="production",qo=function(t,r,n,a,i,o,s,l){if(A8&&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 j8(e,t){return E8(e)||_8(e,t)||mg(e,t)||P8()}function P8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
259
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _8(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 E8(e){if(Array.isArray(e))return e}function C8(e){return M8(e)||k8(e)||mg(e)||$8()}function $8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
260
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mg(e,t){if(e){if(typeof e=="string")return pu(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 pu(e,t)}}function k8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function M8(e){if(Array.isArray(e))return pu(e)}function pu(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,vg=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},gg=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},yg=function(t,r){return function(n){var a=vg(t,r);return gg(a,n)}},N8=function(t,r){return function(n){var a=vg(t,r),i=[].concat(C8(a.map(function(o,s){return o*s}).slice(1)),[0]);return gg(i,n)}},bg=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(m){return parseFloat(m)}),u=j8(c,4);a=u[0],i=u[1],o=u[2],s=u[3]}else qo(!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)}}qo([a,o,i,s].every(function(m){return typeof m=="number"&&m>=0&&m<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=yg(a,o),d=yg(i,s),h=N8(a,o),v=function(b){return b>1?1:b<0?0:b},g=function(b){for(var O=b>1?1:b,x=O,j=0;j<8;++j){var y=f(x)-O,w=h(x);if(Math.abs(y-O)<Ko||w<Ko)return d(x);x=v(x-y/w)}return d(x)};return g.isStepper=!1,g},D8=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,v=d*i,g=d+(h-v)*s/1e3,m=d*s/1e3+u;return Math.abs(m-f)<Ko&&Math.abs(g)<Ko?[f,0]:[m,g]};return l.isStepper=!0,l.dt=s,l},I8=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 bg(a);case"spring":return D8();default:if(a.split("(")[0]==="cubic-bezier")return bg(a);qo(!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:(qo(!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 xg(e){return B8(e)||R8(e)||Og(e)||L8()}function L8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
261
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B8(e){if(Array.isArray(e))return mu(e)}function wg(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?wg(Object(r),!0).forEach(function(n){hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hu(e,t,r){return t=F8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F8(e){var t=U8(e,"string");return ni(t)==="symbol"?t:String(t)}function U8(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 W8(e,t){return G8(e)||V8(e,t)||Og(e,t)||z8()}function z8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
262
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Og(e,t){if(e){if(typeof e=="string")return mu(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 mu(e,t)}}function mu(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 V8(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 G8(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},H8=function e(t,r,n){var a=ri(function(i,o){if(vu(o)){var s=t(o.from,o.to,o.velocity),l=W8(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 q8=function(e,t,r,n,a){var i=O8(e,t),o=i.reduce(function(m,b){return at(at({},m),{},hu({},b,[e[b],t[b]]))},{}),s=i.reduce(function(m,b){return at(at({},m),{},hu({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,c,u,f=function(){return null},d=function(){return ri(function(b,O){return O.from},s)},h=function(){return!Object.values(s).filter(vu).length},v=function(b){c||(c=b);var O=b-c,x=O/r.dt;s=H8(r,s,x),a(at(at(at({},e),t),d())),c=b,h()||(l=requestAnimationFrame(f))},g=function(b){u||(u=b);var O=(b-u)/n,x=ri(function(y,w){return Yo.apply(void 0,xg(w).concat([r(O)]))},o);if(a(at(at(at({},e),t),x)),O<1)l=requestAnimationFrame(f);else{var j=ri(function(y,w){return Yo.apply(void 0,xg(w).concat([r(1)]))},o);a(at(at(at({},e),t),j))}};return f=r.isStepper?v: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 K8=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Y8(e,t){if(e==null)return{};var r=X8(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 X8(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 gu(e){return eD(e)||Q8(e)||J8(e)||Z8()}function Z8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
263
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J8(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 Q8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eD(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 Sg(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?Sg(Object(r),!0).forEach(function(n){ai(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ai(e,t,r){return t=Tg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rD(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,Tg(n.key),n)}}function nD(e,t,r){return t&&rD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tg(e){var t=aD(e,"string");return Nn(t)==="symbol"?t:String(t)}function aD(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 iD(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&&bu(e,t)}function bu(e,t){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bu(e,t)}function oD(e){var t=sD();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 xu(this,a)}}function xu(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 wu(e)}function wu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sD(){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){iD(r,e);var t=oD(r);function r(n,a){var i;tD(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(wu(i)),i.changeStyle=i.changeStyle.bind(wu(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:u}),xu(i);if(f&&f.length)i.state={style:f[0].style};else if(c){if(typeof d=="function")return i.state={style:c},xu(i);i.state={style:l?ai({},l,c):c}}else i.state={style:{}};return i}return nD(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(!(d8(a.to,u)&&a.canBegin&&a.isActive)){var v=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=v||c?f:a.to;if(this.state&&d){var m={style:l?ai({},l,g):g};(l&&d[l]!==g||!l&&d!==g)&&this.setState(m)}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=q8(o,s,I8(c),l,this.changeStyle),v=function(){i.stopJSAnimation=h()};this.manager.start([d,u,v,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,m,b){if(b===0)return g;var O=m.duration,x=m.easing,j=x===void 0?"ease":x,y=m.style,w=m.properties,T=m.onAnimationEnd,A=b>0?o[b-1]:m,_=w||Object.keys(y);if(typeof j=="function"||j==="spring")return[].concat(gu(g),[i.runJSAnimation.bind(i,{from:A.style,to:y,duration:O,easing:j}),O]);var C=hg(_,O,j),P=Nt(Nt(Nt({},A.style),y),{},{transition:C});return[].concat(gu(g),[P,O,T]).filter(S8)};return this.manager.start([l].concat(gu(o.reduce(h,[u,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=b8());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,v=this.manager;if(this.unSubscribe=v.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,m=hg(Object.keys(g),o,c);v.start([u,i,Nt(Nt({},g),{},{transition:m}),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=Y8(a,K8),c=S.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 v=h.props,g=v.style,m=g===void 0?{}:g,b=v.className,O=S.cloneElement(h,Nt(Nt({},l),{},{style:Nt(Nt({},m),u),className:b}));return O};return c===1?f(S.Children.only(i)):S.createElement("div",null,S.Children.map(i,function(d){return f(d)}))}}]),r}(S.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 Zo(){return Zo=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},Zo.apply(this,arguments)}function lD(e,t){return dD(e)||fD(e,t)||uD(e,t)||cD()}function cD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
264
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uD(e,t){if(e){if(typeof e=="string")return Ag(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 Ag(e,t)}}function Ag(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 fD(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 dD(e){if(Array.isArray(e))return e}function jg(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 Pg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jg(Object(r),!0).forEach(function(n){pD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pD(e,t,r){return t=hD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hD(e){var t=mD(e,"string");return ii(t)=="symbol"?t:t+""}function mD(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 _g=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,`,
261
+ */var iu,Kg;function P4(){if(Kg)return iu;Kg=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 iu=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},iu}var ou,Yg;function su(){if(Yg)return ou;Yg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ou=e,ou}var lu,Xg;function Zg(){return Xg||(Xg=1,lu=Function.call.bind(Object.prototype.hasOwnProperty)),lu}var cu,Jg;function _4(){if(Jg)return cu;Jg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=su(),r={},n=Zg();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(g){f=g}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={})},cu=a,cu}var uu,Qg;function E4(){if(Qg)return uu;Qg=1;var e=qg(),t=P4(),r=su(),n=Zg(),a=_4(),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 uu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}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:w(),arrayOf:x,element:A(),elementType:y(),instanceOf:O,node:k(),objectOf:j,oneOf:T,oneOfType:C,shape:E,exact:F};function g($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function v($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}v.prototype=Error.prototype;function m($){if(process.env.NODE_ENV!=="production")var B={},_=0;function U(I,z,q,Q,G,Z,ee){if(Q=Q||d,Z=Z||q,ee!==r){if(l){var R=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 R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=Q+":"+q;!B[oe]&&_<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+Q+"`. 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."),B[oe]=!0,_++)}}return z[q]==null?I?z[q]===null?new v("The "+G+" `"+Z+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new v("The "+G+" `"+Z+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:$(z,q,Q,G,Z)}var V=U.bind(null,!1);return V.isRequired=U.bind(null,!0),V}function b($){function B(_,U,V,I,z,q){var Q=_[U],G=M(Q);if(G!==$){var Z=W(Q);return new v("Invalid "+I+" `"+z+"` of type "+("`"+Z+"` supplied to `"+V+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return m(B)}function w(){return m(o)}function x($){function B(_,U,V,I,z){if(typeof $!="function")return new v("Property `"+z+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var q=_[U];if(!Array.isArray(q)){var Q=M(q);return new v("Invalid "+I+" `"+z+"` of type "+("`"+Q+"` supplied to `"+V+"`, expected an array."))}for(var G=0;G<q.length;G++){var Z=$(q,G,V,I,z+"["+G+"]",r);if(Z instanceof Error)return Z}return null}return m(B)}function A(){function $(B,_,U,V,I){var z=B[_];if(!s(z)){var q=M(z);return new v("Invalid "+V+" `"+I+"` of type "+("`"+q+"` supplied to `"+U+"`, expected a single ReactElement."))}return null}return m($)}function y(){function $(B,_,U,V,I){var z=B[_];if(!e.isValidElementType(z)){var q=M(z);return new v("Invalid "+V+" `"+I+"` of type "+("`"+q+"` supplied to `"+U+"`, expected a single ReactElement type."))}return null}return m($)}function O($){function B(_,U,V,I,z){if(!(_[U]instanceof $)){var q=$.name||d,Q=Y(_[U]);return new v("Invalid "+I+" `"+z+"` of type "+("`"+Q+"` supplied to `"+V+"`, expected ")+("instance of `"+q+"`."))}return null}return m(B)}function T($){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 B(_,U,V,I,z){for(var q=_[U],Q=0;Q<$.length;Q++)if(g(q,$[Q]))return null;var G=JSON.stringify($,function(ee,R){var oe=W(R);return oe==="symbol"?String(R):R});return new v("Invalid "+I+" `"+z+"` of value `"+String(q)+"` "+("supplied to `"+V+"`, expected one of "+G+"."))}return m(B)}function j($){function B(_,U,V,I,z){if(typeof $!="function")return new v("Property `"+z+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var q=_[U],Q=M(q);if(Q!=="object")return new v("Invalid "+I+" `"+z+"` of type "+("`"+Q+"` supplied to `"+V+"`, expected an object."));for(var G in q)if(n(q,G)){var Z=$(q,G,V,I,z+"."+G,r);if(Z instanceof Error)return Z}return null}return m(B)}function C($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var B=0;B<$.length;B++){var _=$[B];if(typeof _!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(_)+" at index "+B+"."),o}function U(V,I,z,q,Q){for(var G=[],Z=0;Z<$.length;Z++){var ee=$[Z],R=ee(V,I,z,q,Q,r);if(R==null)return null;R.data&&n(R.data,"expectedType")&&G.push(R.data.expectedType)}var oe=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new v("Invalid "+q+" `"+Q+"` supplied to "+("`"+z+"`"+oe+"."))}return m(U)}function k(){function $(B,_,U,V,I){return N(B[_])?null:new v("Invalid "+V+" `"+I+"` supplied to "+("`"+U+"`, expected a ReactNode."))}return m($)}function P($,B,_,U,V){return new v(($||"React class")+": "+B+" type `"+_+"."+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function E($){function B(_,U,V,I,z){var q=_[U],Q=M(q);if(Q!=="object")return new v("Invalid "+I+" `"+z+"` of type `"+Q+"` "+("supplied to `"+V+"`, expected `object`."));for(var G in $){var Z=$[G];if(typeof Z!="function")return P(V,I,z,G,W(Z));var ee=Z(q,G,V,I,z+"."+G,r);if(ee)return ee}return null}return m(B)}function F($){function B(_,U,V,I,z){var q=_[U],Q=M(q);if(Q!=="object")return new v("Invalid "+I+" `"+z+"` of type `"+Q+"` "+("supplied to `"+V+"`, expected `object`."));var G=t({},_[U],$);for(var Z in G){var ee=$[Z];if(n($,Z)&&typeof ee!="function")return P(V,I,z,Z,W(ee));if(!ee)return new v("Invalid "+I+" `"+z+"` key `"+Z+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(_[U],null," ")+`
262
+ Valid keys: `+JSON.stringify(Object.keys($),null," "));var R=ee(q,Z,V,I,z+"."+Z,r);if(R)return R}return null}return m(B)}function N($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(N);if($===null||s($))return!0;var B=f($);if(B){var _=B.call($),U;if(B!==$.entries){for(;!(U=_.next()).done;)if(!N(U.value))return!1}else for(;!(U=_.next()).done;){var V=U.value;if(V&&!N(V[1]))return!1}}else return!1;return!0;default:return!1}}function L($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function M($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":L(B,$)?"symbol":B}function W($){if(typeof $>"u"||$===null)return""+$;var B=M($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function H($){var B=W($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function Y($){return!$.constructor||!$.constructor.name?d:$.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},uu}var fu,ev;function C4(){if(ev)return fu;ev=1;var e=su();function t(){}function r(){}return r.resetWarningCache=t,fu=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},fu}if(process.env.NODE_ENV!=="production"){var $4=qg(),k4=!0;au.exports=E4()($4.isElement,k4)}else au.exports=C4()();var M4=au.exports;const je=ke(M4);var N4=Object.getOwnPropertyNames,D4=Object.getOwnPropertySymbols,I4=Object.prototype.hasOwnProperty;function tv(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Ho(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 rv(e){return N4(e).concat(D4(e))}var L4=Object.hasOwn||function(e,t){return I4.call(e,t)};function qr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var R4="__v",B4="__o",F4="_owner",nv=Object.getOwnPropertyDescriptor,av=Object.keys;function U4(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 W4(e,t){return qr(e.getTime(),t.getTime())}function z4(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function V4(e,t){return e===t}function iv(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 G4=qr;function H4(e,t,r){var n=av(e),a=n.length;if(av(t).length!==a)return!1;for(;a-- >0;)if(!sv(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=rv(e),a=n.length;if(rv(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!sv(e,t,r,i)||(o=nv(e,i),s=nv(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function q4(e,t){return qr(e.valueOf(),t.valueOf())}function K4(e,t){return e.source===t.source&&e.flags===t.flags}function ov(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 Y4(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 X4(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 sv(e,t,r,n){return(n===F4||n===B4||n===R4)&&(e.$$typeof||t.$$typeof)?!0:L4(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Z4="[object Arguments]",J4="[object Boolean]",Q4="[object Date]",e8="[object Error]",t8="[object Map]",r8="[object Number]",n8="[object Object]",a8="[object RegExp]",i8="[object Set]",o8="[object String]",s8="[object URL]",l8=Array.isArray,lv=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,cv=Object.assign,c8=Object.prototype.toString.call.bind(Object.prototype.toString);function u8(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(g,v,m){if(g===v)return!0;if(g==null||v==null)return!1;var b=typeof g;if(b!==typeof v)return!1;if(b!=="object")return b==="number"?o(g,v,m):b==="function"?a(g,v,m):!1;var w=g.constructor;if(w!==v.constructor)return!1;if(w===Object)return s(g,v,m);if(l8(g))return t(g,v,m);if(lv!=null&&lv(g))return f(g,v,m);if(w===Date)return r(g,v,m);if(w===RegExp)return c(g,v,m);if(w===Map)return i(g,v,m);if(w===Set)return u(g,v,m);var x=c8(g);return x===Q4?r(g,v,m):x===a8?c(g,v,m):x===t8?i(g,v,m):x===i8?u(g,v,m):x===n8?typeof g.then!="function"&&typeof v.then!="function"&&s(g,v,m):x===s8?d(g,v,m):x===e8?n(g,v,m):x===Z4?s(g,v,m):x===J4||x===r8||x===o8?l(g,v,m):!1}}function f8(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:U4,areDatesEqual:W4,areErrorsEqual:z4,areFunctionsEqual:V4,areMapsEqual:n?tv(iv,ei):iv,areNumbersEqual:G4,areObjectsEqual:n?ei:H4,arePrimitiveWrappersEqual:q4,areRegExpsEqual:K4,areSetsEqual:n?tv(ov,ei):ov,areTypedArraysEqual:n?ei:Y4,areUrlsEqual:X4};if(r&&(a=cv({},a,r(a))),t){var i=Ho(a.areArraysEqual),o=Ho(a.areMapsEqual),s=Ho(a.areObjectsEqual),l=Ho(a.areSetsEqual);a=cv({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function d8(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function p8(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 h8=Sr();Sr({strict:!0}),Sr({circular:!0}),Sr({circular:!0,strict:!0}),Sr({createInternalComparator:function(){return qr}}),Sr({strict:!0,createInternalComparator:function(){return qr}}),Sr({circular:!0,createInternalComparator:function(){return qr}}),Sr({circular:!0,createInternalComparator:function(){return qr},strict:!0});function Sr(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=f8(e),l=u8(s),c=n?n(l):d8(l);return p8({circular:r,comparator:l,createState:a,equals:c,strict:o})}function m8(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function uv(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):m8(a)};requestAnimationFrame(n)}function du(e){"@babel/helpers - typeof";return du=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},du(e)}function g8(e){return x8(e)||b8(e)||y8(e)||v8()}function v8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
263
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y8(e,t){if(e){if(typeof e=="string")return fv(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 fv(e,t)}}function fv(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 b8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x8(e){if(Array.isArray(e))return e}function w8(){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=g8(o),l=s[0],c=s.slice(1);if(typeof l=="number"){uv(a.bind(null,c),l);return}a(l),uv(a.bind(null,c));return}du(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 dv(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 pv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(r),!0).forEach(function(n){hv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hv(e,t,r){return t=O8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O8(e){var t=S8(e,"string");return ti(t)==="symbol"?t:String(t)}function S8(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 T8=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},A8=function(t){return t},j8=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 pv(pv({},n),{},hv({},a,t(a,r[a])))},{})},mv=function(t,r,n){return t.map(function(a){return"".concat(j8(a)," ").concat(r,"ms ").concat(n)}).join(",")},P8=process.env.NODE_ENV!=="production",qo=function(t,r,n,a,i,o,s,l){if(P8&&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 _8(e,t){return $8(e)||C8(e,t)||gv(e,t)||E8()}function E8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
264
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C8(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 $8(e){if(Array.isArray(e))return e}function k8(e){return D8(e)||N8(e)||gv(e)||M8()}function M8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
265
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gv(e,t){if(e){if(typeof e=="string")return pu(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 pu(e,t)}}function N8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D8(e){if(Array.isArray(e))return pu(e)}function pu(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,vv=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},yv=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},bv=function(t,r){return function(n){var a=vv(t,r);return yv(a,n)}},I8=function(t,r){return function(n){var a=vv(t,r),i=[].concat(k8(a.map(function(o,s){return o*s}).slice(1)),[0]);return yv(i,n)}},xv=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(m){return parseFloat(m)}),u=_8(c,4);a=u[0],i=u[1],o=u[2],s=u[3]}else qo(!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)}}qo([a,o,i,s].every(function(m){return typeof m=="number"&&m>=0&&m<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=bv(a,o),d=bv(i,s),h=I8(a,o),g=function(b){return b>1?1:b<0?0:b},v=function(b){for(var w=b>1?1:b,x=w,A=0;A<8;++A){var y=f(x)-w,O=h(x);if(Math.abs(y-w)<Ko||O<Ko)return d(x);x=g(x-y/O)}return d(x)};return v.isStepper=!1,v},L8=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,g=d*i,v=d+(h-g)*s/1e3,m=d*s/1e3+u;return Math.abs(m-f)<Ko&&Math.abs(v)<Ko?[f,0]:[m,v]};return l.isStepper=!0,l.dt=s,l},R8=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 xv(a);case"spring":return L8();default:if(a.split("(")[0]==="cubic-bezier")return xv(a);qo(!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:(qo(!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 wv(e){return U8(e)||F8(e)||Sv(e)||B8()}function B8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
266
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function U8(e){if(Array.isArray(e))return mu(e)}function Ov(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?Ov(Object(r),!0).forEach(function(n){hu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ov(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hu(e,t,r){return t=W8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W8(e){var t=z8(e,"string");return ni(t)==="symbol"?t:String(t)}function z8(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 V8(e,t){return q8(e)||H8(e,t)||Sv(e,t)||G8()}function G8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
267
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sv(e,t){if(e){if(typeof e=="string")return mu(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 mu(e,t)}}function mu(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 H8(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 q8(e){if(Array.isArray(e))return e}var Yo=function(t,r,n){return t+(r-t)*n},gu=function(t){var r=t.from,n=t.to;return r!==n},K8=function e(t,r,n){var a=ri(function(i,o){if(gu(o)){var s=t(o.from,o.to,o.velocity),l=V8(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 gu(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 Y8=function(e,t,r,n,a){var i=T8(e,t),o=i.reduce(function(m,b){return at(at({},m),{},hu({},b,[e[b],t[b]]))},{}),s=i.reduce(function(m,b){return at(at({},m),{},hu({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,c,u,f=function(){return null},d=function(){return ri(function(b,w){return w.from},s)},h=function(){return!Object.values(s).filter(gu).length},g=function(b){c||(c=b);var w=b-c,x=w/r.dt;s=K8(r,s,x),a(at(at(at({},e),t),d())),c=b,h()||(l=requestAnimationFrame(f))},v=function(b){u||(u=b);var w=(b-u)/n,x=ri(function(y,O){return Yo.apply(void 0,wv(O).concat([r(w)]))},o);if(a(at(at(at({},e),t),x)),w<1)l=requestAnimationFrame(f);else{var A=ri(function(y,O){return Yo.apply(void 0,wv(O).concat([r(1)]))},o);a(at(at(at({},e),t),A))}};return f=r.isStepper?g:v,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 X8=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Z8(e,t){if(e==null)return{};var r=J8(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 J8(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 vu(e){return rD(e)||tD(e)||eD(e)||Q8()}function Q8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
268
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eD(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 tD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rD(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 Tv(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 Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tv(Object(r),!0).forEach(function(n){ai(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ai(e,t,r){return t=Av(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Av(n.key),n)}}function iD(e,t,r){return t&&aD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Av(e){var t=oD(e,"string");return Nn(t)==="symbol"?t:String(t)}function oD(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 sD(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&&bu(e,t)}function bu(e,t){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bu(e,t)}function lD(e){var t=cD();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 xu(this,a)}}function xu(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 wu(e)}function wu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cD(){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 It=function(e){sD(r,e);var t=lD(r);function r(n,a){var i;nD(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(wu(i)),i.changeStyle=i.changeStyle.bind(wu(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:u}),xu(i);if(f&&f.length)i.state={style:f[0].style};else if(c){if(typeof d=="function")return i.state={style:c},xu(i);i.state={style:l?ai({},l,c):c}}else i.state={style:{}};return i}return iD(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(!(h8(a.to,u)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||c?f:a.to;if(this.state&&d){var m={style:l?ai({},l,v):v};(l&&d[l]!==v||!l&&d!==v)&&this.setState(m)}this.runAnimation(Dt(Dt({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,c=a.easing,u=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=Y8(o,s,R8(c),l,this.changeStyle),g=function(){i.stopJSAnimation=h()};this.manager.start([d,u,g,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(v,m,b){if(b===0)return v;var w=m.duration,x=m.easing,A=x===void 0?"ease":x,y=m.style,O=m.properties,T=m.onAnimationEnd,j=b>0?o[b-1]:m,C=O||Object.keys(y);if(typeof A=="function"||A==="spring")return[].concat(vu(v),[i.runJSAnimation.bind(i,{from:j.style,to:y,duration:w,easing:A}),w]);var k=mv(C,w,A),P=Dt(Dt(Dt({},j.style),y),{},{transition:k});return[].concat(vu(v),[P,w,T]).filter(A8)};return this.manager.start([l].concat(vu(o.reduce(h,[u,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=w8());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,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var v=s?ai({},s,l):l,m=mv(Object.keys(v),o,c);g.start([u,i,Dt(Dt({},v),{},{transition:m}),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=Z8(a,X8),c=S.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 g=h.props,v=g.style,m=v===void 0?{}:v,b=g.className,w=S.cloneElement(h,Dt(Dt({},l),{},{style:Dt(Dt({},m),u),className:b}));return w};return c===1?f(S.Children.only(i)):S.createElement("div",null,S.Children.map(i,function(d){return f(d)}))}}]),r}(S.PureComponent);It.displayName="Animate",It.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},It.propTypes={from:je.oneOfType([je.object,je.string]),to:je.oneOfType([je.object,je.string]),attributeName:je.string,duration:je.number,begin:je.number,easing:je.oneOfType([je.string,je.func]),steps:je.arrayOf(je.shape({duration:je.number.isRequired,style:je.object.isRequired,easing:je.oneOfType([je.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),je.func]),properties:je.arrayOf("string"),onAnimationEnd:je.func})),children:je.oneOfType([je.node,je.func]),isActive:je.bool,canBegin:je.bool,onAnimationEnd:je.func,shouldReAnimate:je.bool,onAnimationStart:je.func,onAnimationReStart:je.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 Zo(){return Zo=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},Zo.apply(this,arguments)}function uD(e,t){return hD(e)||pD(e,t)||dD(e,t)||fD()}function fD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
269
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dD(e,t){if(e){if(typeof e=="string")return jv(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 jv(e,t)}}function jv(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 pD(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 hD(e){if(Array.isArray(e))return e}function Pv(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 _v(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pv(Object(r),!0).forEach(function(n){mD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mD(e,t,r){return t=gD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gD(e){var t=vD(e,"string");return ii(t)=="symbol"?t:t+""}function vD(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 Ev=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,`,
265
270
  `).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,`,
266
271
  `).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,`,
267
- `).concat(t,",").concat(r+a-s*f[3])),u+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);u="M ".concat(t,",").concat(r+s*v,`
268
- A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+l*v,",").concat(r,`
269
- L `).concat(t+n-l*v,",").concat(r,`
270
- A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*v,`
271
- L `).concat(t+n,",").concat(r+a-s*v,`
272
- A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n-l*v,",").concat(r+a,`
273
- L `).concat(t+l*v,",").concat(r+a,`
274
- A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t,",").concat(r+a-s*v," Z")}else u="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return u},vD=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},gD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ou=function(t){var r=Pg(Pg({},gD),t),n=S.useRef(),a=S.useState(-1),i=lD(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&s(j)}catch{}},[]);var l=r.x,c=r.y,u=r.width,f=r.height,d=r.radius,h=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,b=r.isAnimationActive,O=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var x=ve("recharts-rectangle",h);return O?S.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:v,isActive:O},function(j){var y=j.width,w=j.height,T=j.x,A=j.y;return S.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,isActive:b,easing:v},S.createElement("path",Zo({},de(r,!0),{className:x,d:_g(T,A,y,w,d),ref:n})))}):S.createElement("path",Zo({},de(r,!0),{className:x,d:_g(l,c,u,f,d)}))};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)}var Jo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ve("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",Su({},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 yD=["x","y","top","left","width","height","className"];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 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 bD(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){xD(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 xD(e,t,r){return t=wD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wD(e){var t=OD(e,"string");return oi(t)=="symbol"?t:t+""}function OD(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 SD(e,t){if(e==null)return{};var r=TD(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 TD(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 AD=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},jD=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,v=t.className,g=SD(t,yD),m=bD({x:n,y:i,top:s,left:c,width:f,height:h},g);return!Q(n)||!Q(i)||!Q(f)||!Q(h)||!Q(s)||!Q(c)?null:S.createElement("path",Tu({},de(m,!0),{className:ve("recharts-cross",v),d:AD(n,i,f,h,s,c)}))},PD=fp,_D=PD(Object.getPrototypeOf,Object),ED=_D,CD=Zt,$D=ED,kD=Jt,MD="[object Object]",ND=Function.prototype,DD=Object.prototype,Cg=ND.toString,ID=DD.hasOwnProperty,LD=Cg.call(Object);function RD(e){if(!kD(e)||CD(e)!=MD)return!1;var t=$D(e);if(t===null)return!0;var r=ID.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Cg.call(r)==LD}var BD=RD;const FD=ke(BD);var UD=Zt,WD=Jt,zD="[object Boolean]";function VD(e){return e===!0||e===!1||WD(e)&&UD(e)==zD}var GD=VD;const HD=ke(GD);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 qD(e,t){return ZD(e)||XD(e,t)||YD(e,t)||KD()}function KD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
275
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YD(e,t){if(e){if(typeof e=="string")return $g(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 $g(e,t)}}function $g(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 XD(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 ZD(e){if(Array.isArray(e))return e}function kg(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 Mg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kg(Object(r),!0).forEach(function(n){JD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JD(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=eI(e,"string");return si(t)=="symbol"?t:t+""}function eI(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 Ng=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},tI={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rI=function(t){var r=Mg(Mg({},tI),t),n=S.useRef(),a=S.useState(-1),i=qD(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var x=n.current.getTotalLength();x&&s(x)}catch{}},[]);var l=r.x,c=r.y,u=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,b=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||d!==+d||u===0&&f===0||d===0)return null;var O=ve("recharts-trapezoid",h);return b?S.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:v,isActive:b},function(x){var j=x.upperWidth,y=x.lowerWidth,w=x.height,T=x.x,A=x.y;return S.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:v},S.createElement("path",Qo({},de(r,!0),{className:O,d:Ng(T,A,j,y,w),ref:n})))}):S.createElement("g",null,S.createElement("path",Qo({},de(r,!0),{className:O,d:Ng(l,c,u,f,d)})))},nI=["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 aI(e,t){if(e==null)return{};var r=iI(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 iI(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 Dg(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?Dg(Object(r),!0).forEach(function(n){oI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oI(e,t,r){return t=sI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sI(e){var t=lI(e,"string");return li(t)=="symbol"?t:t+""}function lI(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 cI(e,t){return es(es({},t),e)}function uI(e,t){return e==="symbols"}function Ig(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return S.createElement(Ou,r);case"trapezoid":return S.createElement(rI,r);case"sector":return S.createElement(Bv,r);case"symbols":if(uI(t))return S.createElement(Xi,r);break;default:return null}}function fI(e){return S.isValidElement(e)?e.props:e}function Au(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?cI:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=aI(e,nI),c;if(S.isValidElement(t))c=S.cloneElement(t,es(es({},l),fI(t)));else if(pe(t))c=t(l);else if(FD(t)&&!HD(t)){var u=a(t,l);c=S.createElement(Ig,{shapeType:r,elementProps:u})}else{var f=l;c=S.createElement(Ig,{shapeType:r,elementProps:f})}return s?S.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 dI(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 pI(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function hI(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function mI(e,t){var r;return ts(e,t)?r=dI:rs(e,t)?r=pI:ci(e,t)&&(r=hI),r}function vI(e,t){var r;return ts(e,t)?r="trapezoids":rs(e,t)?r="sectors":ci(e,t)&&(r="points"),r}function gI(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 yI(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=vI(r,t),i=gI(r,t),o=n.filter(function(l,c){var u=Ur(i,l),f=r.props[a].filter(function(v){var g=mI(r,t);return g(v,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 bI=Math.ceil,xI=Math.max;function wI(e,t,r,n){for(var a=-1,i=xI(bI((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var OI=wI,SI=ch,Lg=1/0,TI=17976931348623157e292;function AI(e){if(!e)return e===0?e:0;if(e=SI(e),e===Lg||e===-Lg){var t=e<0?-1:1;return t*TI}return e===e?e:0}var Rg=AI,jI=OI,PI=io,ju=Rg;function _I(e){return function(t,r,n){return n&&typeof n!="number"&&PI(t,r,n)&&(r=n=void 0),t=ju(t),r===void 0?(r=t,t=0):r=ju(r),n=n===void 0?t<r?1:-1:ju(n),jI(t,r,n,e)}}var EI=_I,CI=EI,$I=CI(),kI=$I;const ns=ke(kI);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 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 Fg(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){Ug(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 Ug(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 ui(t)=="symbol"?t:t+""}function NI(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 DI=["Webkit","Moz","O","ms"],II=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=DI.reduce(function(i,o){return Fg(Fg({},i),{},Ug({},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 Wg(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?Wg(Object(r),!0).forEach(function(n){yt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zg(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 RI(e,t,r){return t&&zg(e.prototype,t),r&&zg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BI(e,t,r){return t=is(t),FI(e,Vg()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function FI(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 UI(e)}function UI(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 is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function WI(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&&_u(e,t)}function _u(e,t){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_u(e,t)}function yt(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=zI(e,"string");return Dn(t)=="symbol"?t:t+""}function zI(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 VI=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}},Hg=function(t){return t.changedTouches&&!!t.changedTouches.length},In=function(e){function t(r){var n;return LI(this,t),n=BI(this,t,[r]),yt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),yt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),yt(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()}),yt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),yt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),yt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),yt(n,"handleSlideDragStart",function(a){var i=Hg(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 WI(t,e),RI(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),v=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:v===u?u:v-v%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Je(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,v=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 m=this.getIndex({startX:o+g,endX:s+g});(m.startIndex!==d||m.endIndex!==h)&&v&&v(m),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Hg(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,v=u.onChange,g=u.gap,m=u.data,b={startX:this.state.startX,endX:this.state.endX},O=n.pageX-i;O>0?O=Math.min(O,f+d-h-c):O<0&&(O=Math.max(O,f-c)),b[o]=c+O;var x=this.getIndex(b),j=x.startIndex,y=x.endIndex,w=function(){var A=m.length-1;return o==="startX"&&(s>l?j%g===0:y%g===0)||s<l&&y===A||o==="endX"&&(s>l?y%g===0:j%g===0)||s>l&&y===A};this.setState(yt(yt({},o,c+O),"brushMoveStartX",n.pageX),function(){v&&w()&&v(x)})}},{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(yt({},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 S.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=S.Children.only(c);return f?S.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,v=l.data,g=l.startIndex,m=l.endIndex,b=Math.max(n,this.props.x),O=Pu(Pu({},de(this.props,!1)),{},{x:b,y:c,width:u,height:f}),x=h||"Min value: ".concat((i=v[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[m])===null||o===void 0?void 0:o.name);return S.createElement(xe,{tabIndex:0,role:"slider","aria-label":x,"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,O))}},{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 S.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,v={pointerEvents:"none",fill:c};return S.createElement(xe,{className:"recharts-brush-texts"},S.createElement(po,as({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},v),this.getTextOfTick(a)),S.createElement(po,as({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},v),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,v=d.endX,g=d.isTextActive,m=d.isSlideMoving,b=d.isTravellerMoving,O=d.isTravellerFocused;if(!a||!a.length||!Q(s)||!Q(l)||!Q(c)||!Q(u)||c<=0||u<=0)return null;var x=ve("recharts-brush",i),j=S.Children.count(o)===1,y=II("userSelect","none");return S.createElement(xe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(h,v),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(v,"endX"),(g||m||b||O||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 S.createElement(S.Fragment,null,S.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),S.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),S.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 S.isValidElement(n)?i=S.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?VI({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}}])}(S.PureComponent);yt(In,"displayName","Brush"),yt(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 GI=Vl;function HI(e,t){var r;return GI(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var qI=HI,KI=Xd,YI=vr,XI=qI,ZI=ft,JI=io;function QI(e,t,r){var n=ZI(e)?KI:XI;return r&&JI(e,t,r)&&(t=void 0),n(e,YI(t))}var e9=QI;const t9=ke(e9);var Ht=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},qg=Hp;function r9(e,t,r){t=="__proto__"&&qg?qg(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var n9=r9,a9=n9,i9=Wp,o9=vr;function s9(e,t){var r={};return t=o9(t),i9(e,function(n,a,i){a9(r,a,t(n,a,i))}),r}var l9=s9;const c9=ke(l9);function u9(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 f9=u9,d9=Vl;function p9(e,t){var r=!0;return d9(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var h9=p9,m9=f9,v9=h9,g9=vr,y9=ft,b9=io;function x9(e,t,r){var n=y9(e)?m9:v9;return r&&b9(e,t,r)&&(t=void 0),n(e,g9(t))}var w9=x9;const Kg=ke(w9);var O9=["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 Eu(){return Eu=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},Eu.apply(this,arguments)}function Yg(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?Yg(Object(r),!0).forEach(function(n){S9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S9(e,t,r){return t=T9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T9(e){var t=A9(e,"string");return Ln(t)=="symbol"?t:t+""}function A9(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 j9(e,t){if(e==null)return{};var r=P9(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 P9(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 _9(e,t){var r=e.x,n=e.y,a=j9(e,O9),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 Xg(e){return S.createElement(Au,Eu({shapeType:"rectangle",propTransformer:_9,activeClassName:"recharts-active-bar"},e))}var E9=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=Q(n)||U2(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)}},C9=["value","background"],Zg;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 $9(e,t){if(e==null)return{};var r=k9(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 k9(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 Jg(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?Jg(Object(r),!0).forEach(function(n){Tr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M9(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,ty(n.key),n)}}function N9(e,t,r){return t&&Qg(e.prototype,t),r&&Qg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D9(e,t,r){return t=ss(t),I9(e,ey()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function I9(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 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 ey(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ey=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(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&&Cu(e,t)}function Cu(e,t){return Cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Cu(e,t)}function Tr(e,t,r){return t=ty(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ty(e){var t=B9(e,"string");return Rn(t)=="symbol"?t:t+""}function B9(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;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)),Tr(r,"state",{isAnimationFinished:!1}),Tr(r,"id",kr("recharts-bar-")),Tr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Tr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return R9(t,e),N9(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,v=h?c:o,g=Ke(Ke(Ke({},u),f),{},{isActive:h,option:v,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return S.createElement(xe,os({className:"recharts-bar-rectangle"},va(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)}),S.createElement(Xg,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 S.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 v=h.t,g=i.map(function(m,b){var O=d&&d[b];if(O){var x=ze(O.x,m.x),j=ze(O.y,m.y),y=ze(O.width,m.width),w=ze(O.height,m.height);return Ke(Ke({},m),{},{x:x(v),y:j(v),width:y(v),height:w(v)})}if(o==="horizontal"){var T=ze(0,m.height),A=T(v);return Ke(Ke({},m),{},{y:m.y+m.height-A,height:A})}var _=ze(0,m.width),C=_(v);return Ke(Ke({},m),{},{width:C})});return S.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||!Ur(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=$9(c,C9);if(!f)return null;var h=Ke(Ke(Ke(Ke(Ke({},d),{},{fill:"#eee"},f),l),va(n.props,c,u)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return S.createElement(Xg,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(m,b){var O=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:O,errorVal:Je(m,b)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(xe,v,f.map(function(g){return S.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,v=n.background,g=n.id;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,b=ve("recharts-bar",o),O=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,j=O||x,y=fe(g)?this.id:g;return S.createElement(xe,{className:b},O||x?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(y)},S.createElement("rect",{x:O?c:c-f/2,y:x?u:u-d/2,width:O?f:f*2,height:x?d:d*2}))):null,S.createElement(xe,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(y,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,y),(!h||m)&&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}}])}(S.PureComponent);Zg=Bn,Tr(Bn,"displayName","Bar"),Tr(Bn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!gr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Tr(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=f6(n,r);if(!h)return null;var v=t.layout,g=r.type.defaultProps,m=g!==void 0?Ke(Ke({},g),r.props):r.props,b=m.dataKey,O=m.children,x=m.minPointSize,j=v==="horizontal"?o:i,y=c?j.scale.domain():null,w=b6({numericAxis:j}),T=dt(O,ec),A=f.map(function(_,C){var P,E,I,k,D,M;c?P=d6(c[u+C],y):(P=Je(_,b),Array.isArray(P)||(P=[w,P]));var F=E9(x,Zg.defaultProps.minPointSize)(P[1],C);if(v==="horizontal"){var z,q=[o.scale(P[0]),o.scale(P[1])],$=q[0],B=q[1];E=Ov({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:_,index:C}),I=(z=B??$)!==null&&z!==void 0?z:void 0,k=h.size;var U=$-B;if(D=Number.isNaN(U)?0:U,M={x:E,y:o.y,width:k,height:o.height},Math.abs(F)>0&&Math.abs(D)<Math.abs(F)){var W=$t(D||F)*(Math.abs(F)-Math.abs(D));I-=W,D+=W}}else{var K=[i.scale(P[0]),i.scale(P[1])],R=K[0],G=K[1];if(E=R,I=Ov({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:_,index:C}),k=G-R,D=h.size,M={x:i.x,y:I,width:i.width,height:D},Math.abs(F)>0&&Math.abs(k)<Math.abs(F)){var Y=$t(k||F)*(Math.abs(F)-Math.abs(k));k+=Y}}return Ke(Ke(Ke({},_),{},{x:E,y:I,width:k,height:D,value:c?P:P[1],payload:_,background:M},T&&T[C]&&T[C].props),{},{tooltipPayload:[Pv(r,_)],tooltipPosition:{x:E+k/2,y:I+D/2}})});return Ke({data:A,layout:v},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 F9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ry(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,ay(n.key),n)}}function U9(e,t,r){return t&&ry(e.prototype,t),r&&ry(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}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 It(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){ls(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 ls(e,t,r){return t=ay(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ay(e){var t=W9(e,"string");return di(t)=="symbol"?t:t+""}function W9(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 z9=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=!!vt(c,Bn);return u.reduce(function(h,v){var g=r[v],m=g.orientation,b=g.domain,O=g.padding,x=O===void 0?{}:O,j=g.mirror,y=g.reversed,w="".concat(m).concat(j?"Mirror":""),T,A,_,C,P;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var E=b[1]-b[0],I=1/0,k=g.categoricalDomain.sort(G2);if(k.forEach(function(K,R){R>0&&(I=Math.min((K||0)-(k[R-1]||0),I))}),Number.isFinite(I)){var D=I/E,M=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(T=D*M/2),g.padding==="no-gap"){var F=Mr(t.barCategoryGap,D*M),z=D*M/2;T=z-F-(z-F)/M*F}}}a==="xAxis"?A=[n.left+(x.left||0)+(T||0),n.left+n.width-(x.right||0)-(T||0)]:a==="yAxis"?A=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(T||0),n.top+n.height-(x.bottom||0)-(T||0)]:A=g.range,y&&(A=[A[1],A[0]]);var q=c6(g,i,d),$=q.scale,B=q.realScaleType;$.domain(b).range(A),u6($);var U=y6($,It(It({},g),{},{realScaleType:B}));a==="xAxis"?(P=m==="top"&&!j||m==="bottom"&&j,_=n.left,C=f[w]-P*g.height):a==="yAxis"&&(P=m==="left"&&!j||m==="right"&&j,_=f[w]-P*g.width,C=n.top);var W=It(It(It({},g),U),{},{realScaleType:B,x:_,y:C,scale:$,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return W.bandSize=Fo(W,U),!g.hide&&a==="xAxis"?f[w]+=(P?-1:1)*W.height:g.hide||(f[w]+=(P?-1:1)*W.width),It(It({},h),{},ls({},v,W))},{})},iy=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)}},V9=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return iy({x:r,y:n},{x:a,y:i})},oy=function(){function e(t){F9(this,e),this.scale=t}return U9(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(oy,"EPS",1e-4);var $u=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},ls({},a,oy.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 c9(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Kg(a,function(i,o){return r[o].isInRange(i)})}})};function G9(e){return(e%180+180)%180}var H9=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=G9(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)},q9=vr,K9=ba,Y9=to;function X9(e){return function(t,r,n){var a=Object(t);if(!K9(t)){var i=q9(r);t=Y9(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 Z9=X9,J9=Rg;function Q9(e){var t=J9(e),r=t%1;return t===t?r?t-r:t:0}var eL=Q9,tL=Cp,rL=vr,nL=eL,aL=Math.max;function iL(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:nL(r);return a<0&&(a=aL(n+a,0)),tL(e,rL(t),a)}var oL=iL,sL=Z9,lL=oL,cL=sL(lL),uL=cL;const fL=ke(uL);var dL=qw(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 ku=S.createContext(void 0),Mu=S.createContext(void 0),sy=S.createContext(void 0),ly=S.createContext({}),cy=S.createContext(void 0),uy=S.createContext(0),fy=S.createContext(0),dy=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=dL(i);return S.createElement(ku.Provider,{value:n},S.createElement(Mu.Provider,{value:a},S.createElement(ly.Provider,{value:i},S.createElement(sy.Provider,{value:u},S.createElement(cy.Provider,{value:o},S.createElement(uy.Provider,{value:c},S.createElement(fy.Provider,{value:l},s)))))))},pL=function(){return S.useContext(cy)};function py(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var hy=function(t){var r=S.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 xAxis by id "'.concat(t,'" [').concat(cs(t),"]. ").concat(py(r))):ht()),n},hL=function(){var t=S.useContext(ku);return mr(t)},mL=function(){var t=S.useContext(Mu),r=fL(t,function(n){return Kg(n.domain,Number.isFinite)});return r||mr(t)},my=function(t){var r=S.useContext(Mu);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(py(r))):ht()),n},vL=function(){var t=S.useContext(sy);return t},gL=function(){return S.useContext(ly)},Nu=function(){return S.useContext(fy)},Du=function(){return S.useContext(uy)};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 yL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bL(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,by(n.key),n)}}function xL(e,t,r){return t&&bL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wL(e,t,r){return t=us(t),OL(e,vy()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function OL(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 SL(e)}function SL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vy=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function TL(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&&Iu(e,t)}function Iu(e,t){return Iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Iu(e,t)}function gy(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 yy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gy(Object(r),!0).forEach(function(n){Lu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lu(e,t,r){return t=by(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function by(e){var t=AL(e,"string");return Fn(t)=="symbol"?t:t+""}function AL(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 jL(e,t){return CL(e)||EL(e,t)||_L(e,t)||PL()}function PL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
276
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _L(e,t){if(e){if(typeof e=="string")return xy(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 xy(e,t)}}function xy(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 EL(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 CL(e){if(Array.isArray(e))return 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)}var $L=function(t,r){var n;return S.isValidElement(t)?n=S.cloneElement(t,r):pe(t)?n=t(r):n=S.createElement("line",Ru({},r,{className:"recharts-reference-line-line"})),n},kL=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 v=c.y,g=t.y.apply(v,{position:o});if(Ht(c,"discard")&&!t.y.isInRange(g))return null;var m=[{x:u+d,y:g},{x:u,y:g}];return l==="left"?m.reverse():m}if(r){var b=c.x,O=t.x.apply(b,{position:o});if(Ht(c,"discard")&&!t.x.isInRange(O))return null;var x=[{x:O,y:f+h},{x:O,y:f}];return s==="top"?x.reverse():x}if(a){var j=c.segment,y=j.map(function(w){return t.apply(w,{position:o})});return Ht(c,"discard")&&t9(y,function(w){return!t.isInRange(w)})?null:y}return null};function ML(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=pL(),u=hy(a),f=my(i),d=vL();if(!c||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=$u({x:u.scale,y:f.scale}),v=Xe(t),g=Xe(r),m=n&&n.length===2,b=kL(h,v,g,m,d,e.position,u.orientation,f.orientation,e);if(!b)return null;var O=jL(b,2),x=O[0],j=x.x,y=x.y,w=O[1],T=w.x,A=w.y,_=Ht(e,"hidden")?"url(#".concat(c,")"):void 0,C=yy(yy({clipPath:_},de(e,!0)),{},{x1:j,y1:y,x2:T,y2:A});return S.createElement(xe,{className:ve("recharts-reference-line",s)},$L(o,C),it.renderCallByParent(e,V9({x1:j,y1:y,x2:T,y2:A})))}var Bu=function(e){function t(){return yL(this,t),wL(this,t,arguments)}return TL(t,e),xL(t,[{key:"render",value:function(){return S.createElement(ML,this.props)}}])}(S.Component);Lu(Bu,"displayName","ReferenceLine"),Lu(Bu,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Fu(){return Fu=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},Fu.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 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 Oy(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){ds(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 NL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DL(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,Ty(n.key),n)}}function IL(e,t,r){return t&&DL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LL(e,t,r){return t=fs(t),RL(e,Sy()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function RL(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 BL(e)}function BL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sy=function(){return!!e})()}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}function FL(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 ds(e,t,r){return t=Ty(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ty(e){var t=UL(e,"string");return Un(t)=="symbol"?t:t+""}function UL(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 WL=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=$u({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Ht(t,"discard")&&!o.isInRange(s)?null:s},ps=function(e){function t(){return NL(this,t),LL(this,t,arguments)}return FL(t,e),IL(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=WL(this.props);if(!f)return null;var d=f.x,h=f.y,v=this.props,g=v.shape,m=v.className,b=Ht(this.props,"hidden")?"url(#".concat(l,")"):void 0,O=Oy(Oy({clipPath:b},de(this.props,!0)),{},{cx:d,cy:h});return S.createElement(xe,{className:ve("recharts-reference-dot",m)},t.renderDot(g,O),it.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(S.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 S.isValidElement(e)?r=S.cloneElement(e,t):pe(e)?r=e(t):r=S.createElement(Jo,Fu({},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 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 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 jy(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){ms(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 zL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VL(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,_y(n.key),n)}}function GL(e,t,r){return t&&VL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HL(e,t,r){return t=hs(t),qL(e,Py()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function qL(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 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 Py(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Py=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function YL(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 ms(e,t,r){return t=_y(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _y(e){var t=XL(e,"string");return Wn(t)=="symbol"?t:t+""}function XL(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 ZL=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=$u({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},v={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(c,{position:"end"}):d.y.rangeMax};return Ht(i,"discard")&&(!d.isInRange(h)||!d.isInRange(v))?null:iy(h,v)},vs=function(e){function t(){return zL(this,t),HL(this,t,arguments)}return YL(t,e),GL(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),v=Xe(s),g=this.props.shape;if(!f&&!d&&!h&&!v&&!g)return null;var m=ZL(f,d,h,v,this.props);if(!m&&!g)return null;var b=Ht(this.props,"hidden")?"url(#".concat(u,")"):void 0;return S.createElement(xe,{className:ve("recharts-reference-area",l)},t.renderRect(g,jy(jy({clipPath:b},de(this.props,!0)),m)),it.renderCallByParent(this.props,m))}}])}(S.Component);ms(vs,"displayName","ReferenceArea"),ms(vs,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),ms(vs,"renderRect",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):pe(e)?r=e(t):r=S.createElement(Ou,Wu({},t,{className:"recharts-reference-area-rect"})),r});function Ey(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 JL(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return H9(n,r)}function QL(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 gs(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 e7(e,t){return Ey(e,t+1)}function t7(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 v=n==null?void 0:n[l];if(v===void 0)return{v:Ey(n,c)};var g=l,m,b=function(){return m===void 0&&(m=r(v,g)),m},O=v.coordinate,x=l===0||gs(e,O,b,u,s);x||(l=0,u=o,c+=1),x&&(u=O+e*(b()/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 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 ot(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){r7(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 r7(e,t,r){return t=n7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n7(e){var t=a7(e,"string");return pi(t)=="symbol"?t:t+""}function a7(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 i7(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],v,g=function(){return v===void 0&&(v=r(h,d)),v};if(d===o-1){var m=e*(h.coordinate+e*g()/2-l);i[d]=h=ot(ot({},h),{},{tickCoord:m>0?h.coordinate-m*e:h.coordinate})}else i[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var b=gs(e,h.tickCoord,g,s,l);b&&(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 o7(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=gs(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 v=i?s-1:s,g=function(O){var x=o[O],j,y=function(){return j===void 0&&(j=r(x,O)),j};if(O===0){var w=e*(x.coordinate-e*y()/2-l);o[O]=x=ot(ot({},x),{},{tickCoord:w<0?x.coordinate-w*e:x.coordinate})}else o[O]=x=ot(ot({},x),{},{tickCoord:x.coordinate});var T=gs(e,x.tickCoord,y,l,c);T&&(l=x.tickCoord+e*(y()/2+a),o[O]=ot(ot({},x),{},{isShow:!0}))},m=0;m<v;m++)g(m);return o}function Vu(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(Q(l)||gr.isSsr)return e7(a,typeof l=="number"&&Q(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",v=u&&h==="width"?Aa(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(x,j){var y=pe(c)?c(x.value,j):x.value;return h==="width"?JL(Aa(y,{fontSize:t,letterSpacing:r}),v,f):Aa(y,{fontSize:t,letterSpacing:r})[h]},m=a.length>=2?$t(a[1].coordinate-a[0].coordinate):1,b=QL(i,m,h);return l==="equidistantPreserveStart"?t7(m,b,g,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=o7(m,b,g,a,o,l==="preserveStartEnd"):d=i7(m,b,g,a,o),d.filter(function(O){return O.isShow}))}var s7=["viewBox"],l7=["viewBox"],c7=["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 $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 et(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){qu(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 Gu(e,t){if(e==null)return{};var r=u7(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 u7(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 f7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ky(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,Ny(n.key),n)}}function d7(e,t,r){return t&&ky(e.prototype,t),r&&ky(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p7(e,t,r){return t=ys(t),h7(e,My()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function h7(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 m7(e)}function m7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function My(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(My=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function v7(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 qu(e,t,r){return t=Ny(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ny(e){var t=g7(e,"string");return zn(t)=="symbol"?t:t+""}function g7(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 f7(this,t),n=p7(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return v7(t,e),d7(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Gu(n,s7),s=this.props,l=s.viewBox,c=Gu(s,l7);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,v,g,m,b,O,x=f?-1:1,j=n.tickSize||u,y=Q(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=v=n.coordinate,m=o+ +!f*l,g=m-x*j,O=g-x*d,b=y;break;case"left":g=m=n.coordinate,v=i+ +!f*s,h=v-x*j,b=h-x*d,O=y;break;case"right":g=m=n.coordinate,v=i+ +f*s,h=v+x*j,b=h+x*d,O=y;break;default:h=v=n.coordinate,m=o+ +f*l,g=m+x*j,O=g+x*d,b=y;break}return{line:{x1:h,y1:g,x2:v,y2:m},tick:{x:b,y:O}}}},{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 S.createElement("line",Vn({},f,{className:ve("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=Vu(et(et({},this.props),{},{ticks:n}),a,i),v=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),m=de(this.props,!1),b=de(u,!1),O=et(et({},m),{},{fill:"none"},de(l,!1)),x=h.map(function(j,y){var w=o.getTickLineCoord(j),T=w.line,A=w.tick,_=et(et(et(et({textAnchor:v,verticalAnchor:g},m),{},{stroke:"none",fill:c},b),A),{},{index:y,payload:j,visibleTicksCount:h.length,tickFormatter:f});return S.createElement(xe,Vn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},va(o.props,j,y)),l&&S.createElement("line",Vn({},O,T,{className:ve("recharts-cartesian-axis-tick-line",wt(l,"className"))})),u&&t.renderTickItem(u,_,"".concat(pe(f)?f(j.value,y):j.value).concat(d||"")))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{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=Gu(f,c7),v=d;return pe(l)&&(v=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!v||!v.length?null:S.createElement(xe,{className:ve("recharts-cartesian-axis",c),ref:function(m){n.layerReference=m}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),it.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ve(a.className,"recharts-cartesian-axis-tick-value");return S.isValidElement(n)?o=S.cloneElement(n,et(et({},a),{},{className:s})):pe(n)?o=n(et(et({},a),{},{className:s})):o=S.createElement(po,Vn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(S.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 y7=["x1","y1","x2","y2","key"],b7=["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 Dy(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?Dy(Object(r),!0).forEach(function(n){x7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x7(e,t,r){return t=w7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w7(e){var t=O7(e,"string");return Kr(t)=="symbol"?t:t+""}function O7(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 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 Iy(e,t){if(e==null)return{};var r=S7(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 S7(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 T7=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 S.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ly(e,t){var r;if(S.isValidElement(e))r=S.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=Iy(t,y7),c=de(l,!1);c.offset;var u=Iy(c,b7);r=S.createElement("line",Yr({},u,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function A7(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 Ly(a,c)});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function j7(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 Ly(a,c)});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function P7(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 v=!u[h+1],g=v?a+o-d:u[h+1]-d;if(g<=0)return null;var m=h%t.length;return S.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:g,width:i,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function _7(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 v=!u[h+1],g=v?i+s-d:u[h+1]-d;if(g<=0)return null;var m=h%n.length;return S.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:g,height:l,stroke:"none",fill:n[m],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var E7=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return xv(Vu(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)},C7=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return xv(Vu(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)},Hn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ry(e){var t,r,n,a,i,o,s=Nu(),l=Du(),c=gL(),u=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Hn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Hn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Hn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Hn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Hn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Hn.verticalFill,x:Q(e.x)?e.x:c.left,y:Q(e.y)?e.y:c.top,width:Q(e.width)?e.width:c.width,height:Q(e.height)?e.height:c.height}),f=u.x,d=u.y,h=u.width,v=u.height,g=u.syncWithTicks,m=u.horizontalValues,b=u.verticalValues,O=hL(),x=mL();if(!Q(h)||h<=0||!Q(v)||v<=0||!Q(f)||f!==+f||!Q(d)||d!==+d)return null;var j=u.verticalCoordinatesGenerator||E7,y=u.horizontalCoordinatesGenerator||C7,w=u.horizontalPoints,T=u.verticalPoints;if((!w||!w.length)&&pe(y)){var A=m&&m.length,_=y({yAxis:x?st(st({},x),{},{ticks:A?m:x.ticks}):void 0,width:s,height:l,offset:c},A?!0:g);er(Array.isArray(_),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(_),"]")),Array.isArray(_)&&(w=_)}if((!T||!T.length)&&pe(j)){var C=b&&b.length,P=j({xAxis:O?st(st({},O),{},{ticks:C?b:O.ticks}):void 0,width:s,height:l,offset:c},C?!0:g);er(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(P),"]")),Array.isArray(P)&&(T=P)}return S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(T7,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),S.createElement(A7,Yr({},u,{offset:c,horizontalPoints:w,xAxis:O,yAxis:x})),S.createElement(j7,Yr({},u,{offset:c,verticalPoints:T,xAxis:O,yAxis:x})),S.createElement(P7,Yr({},u,{horizontalPoints:w})),S.createElement(_7,Yr({},u,{verticalPoints:T})))}Ry.displayName="CartesianGrid";var $7=["type","layout","connectNulls","ref"],k7=["key"];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 By(e,t){if(e==null)return{};var r=M7(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 M7(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 Fy(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?Fy(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kn(e){return L7(e)||I7(e)||D7(e)||N7()}function N7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
277
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D7(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 I7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L7(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 R7(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,zy(n.key),n)}}function B7(e,t,r){return t&&Uy(e.prototype,t),r&&Uy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function F7(e,t,r){return t=bs(t),U7(e,Wy()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function U7(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 W7(e)}function W7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wy=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function z7(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 Lt(e,t,r){return t=zy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zy(e){var t=V7(e,"string");return qn(t)=="symbol"?t:t+""}function V7(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)}var mi=function(e){function t(){var r;R7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=F7(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(b,O){return b+O});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var u=Math.floor(o/c),f=o%c,d=s-o,h=[],v=0,g=0;v<l.length;g+=l[v],++v)if(g+l[v]>f){h=[].concat(Kn(l.slice(0,v)),[f-g]);break}var m=h.length%2===0?[0,d]:[d];return[].concat(Kn(t.repeat(l,u)),Kn(h),m).map(function(b){return"".concat(b,"px")}).join(", ")}),Lt(r,"id",kr("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 z7(t,e),B7(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,m){return{x:g.x,y:g.y,value:g.value,errorVal:Je(g.payload,m)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(xe,h,f.map(function(v){return S.cloneElement(v,{key:"bar-".concat(v.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,m){var b=bt(bt(bt({key:"dot-".concat(m),r:3},f),d),{},{index:m,cx:g.x,cy:g.y,value:g.value,dataKey:u,payload:g.payload,points:c});return t.renderDotItem(l,b)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(xe,hi({className:"recharts-line-dots",key:"dots"},v),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=By(s,$7),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 S.createElement(Hr,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,v=o.animateNewValues,g=o.width,m=o.height,b=this.state,O=b.prevPoints,x=b.totalLength;return S.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(j){var y=j.t;if(O){var w=O.length/s.length,T=s.map(function(E,I){var k=Math.floor(I*w);if(O[k]){var D=O[k],M=ze(D.x,E.x),F=ze(D.y,E.y);return bt(bt({},E),{},{x:M(y),y:F(y)})}if(v){var z=ze(g*2,E.x),q=ze(m/2,E.y);return bt(bt({},E),{},{x:z(y),y:q(y)})}return bt(bt({},E),{},{x:E.x,y:E.y})});return i.renderCurveStatically(T,n,a)}var A=ze(0,x),_=A(y),C;if(l){var P="".concat(l).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});C=i.getStrokeDasharray(_,x,P)}else C=i.generateSimpleStrokeDasharray(x,_);return i.renderCurveStatically(s,n,a,{strokeDasharray:C})})}},{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||!Ur(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,v=a.height,g=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,O=s.length===1,x=ve("recharts-line",l),j=c&&c.allowDataOverflow,y=u&&u.allowDataOverflow,w=j||y,T=fe(m)?this.id:m,A=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,C=_===void 0?3:_,P=A.strokeWidth,E=P===void 0?2:P,I=dd(o)?o:{},k=I.clipDot,D=k===void 0?!0:k,M=C*2+E;return S.createElement(xe,{className:x},j||y?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:j?d:d-h/2,y:y?f:f-v/2,width:j?h:h*2,height:y?v:v*2})),!D&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:d-M/2,y:f-M/2,width:h+M,height:v+M}))):null,!O&&this.renderCurve(w,T),this.renderErrorBar(w,T),(O||o)&&this.renderDots(w,D,T),(!g||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(S.isValidElement(n))i=S.cloneElement(n,a);else if(pe(n))i=n(a);else{var o=a.key,s=By(a,k7),l=ve("recharts-line-dot",typeof n!="boolean"?n.className:"");i=S.createElement(Jo,hi({key:o},s,{className:l}))}return i}}])}(S.PureComponent);Lt(mi,"displayName","Line"),Lt(mi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!gr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(mi,"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 v=Je(d,o);return u==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(v)?null:n.scale(v),value:v,payload:d}:{x:fe(v)?null:r.scale(v),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:v,payload:d}});return bt({points:f,layout:u},c)});var G7=["layout","type","stroke","connectNulls","isRange","ref"],H7=["key"],Vy;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 Gy(e,t){if(e==null)return{};var r=q7(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 q7(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 Xr(){return Xr=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},Xr.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 Ar(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){qt(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 K7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qy(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,Yy(n.key),n)}}function Y7(e,t,r){return t&&qy(e.prototype,t),r&&qy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function X7(e,t,r){return t=xs(t),Z7(e,Ky()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function Z7(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 J7(e)}function J7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ky(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ky=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function Q7(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 qt(e,t,r){return t=Yy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yy(e){var t=eR(e,"string");return Yn(t)=="symbol"?t:t+""}function eR(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 jr=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=X7(this,t,[].concat(a)),qt(r,"state",{isAnimationFinished:!0}),qt(r,"id",kr("recharts-area-")),qt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(o)&&o()}),qt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(o)&&o()}),r}return Q7(t,e),Y7(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),v=u.map(function(m,b){var O=Ar(Ar(Ar({key:"dot-".concat(b),r:3},d),h),{},{index:b,cx:m.x,cy:m.y,dataKey:f,value:m.value,payload:m.payload,points:u});return t.renderDotItem(c,O)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(xe,Xr({className:"recharts-area-dots"},g),v)}},{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=wr(o.map(function(d){return d.y||0}));return Q(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(wr(i.map(function(d){return d.y||0})),f)),Q(f)?S.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=wr(o.map(function(d){return d.x||0}));return Q(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(wr(i.map(function(d){return d.x||0})),f)),Q(f)?S.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=Gy(s,G7);return S.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},S.createElement(Hr,Xr({},de(h,!0),{points:n,connectNulls:f,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&S.createElement(Hr,Xr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:n})),u!=="none"&&d&&S.createElement(Hr,Xr({},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,v=this.state,g=v.prevPoints,m=v.prevBaseLine;return S.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(b){var O=b.t;if(g){var x=g.length/s.length,j=s.map(function(A,_){var C=Math.floor(_*x);if(g[C]){var P=g[C],E=ze(P.x,A.x),I=ze(P.y,A.y);return Ar(Ar({},A),{},{x:E(O),y:I(O)})}return A}),y;if(Q(l)&&typeof l=="number"){var w=ze(m,l);y=w(O)}else if(fe(l)||cn(l)){var T=ze(m,0);y=T(O)}else y=l.map(function(A,_){var C=Math.floor(_*x);if(m[C]){var P=m[C],E=ze(P.x,A.x),I=ze(P.y,A.y);return Ar(Ar({},A),{},{x:E(O),y:I(O)})}return A});return i.renderAreaStatically(j,y,n,a)}return S.createElement(xe,null,S.createElement("defs",null,S.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(O))),S.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||!Ur(u,o)||!Ur(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,v=a.height,g=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,O=s.length===1,x=ve("recharts-area",l),j=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,w=j||y,T=fe(m)?this.id:m,A=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,C=_===void 0?3:_,P=A.strokeWidth,E=P===void 0?2:P,I=dd(o)?o:{},k=I.clipDot,D=k===void 0?!0:k,M=C*2+E;return S.createElement(xe,{className:x},j||y?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:j?u:u-h/2,y:y?c:c-v/2,width:j?h:h*2,height:y?v:v*2})),!D&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:u-M/2,y:c-M/2,width:h+M,height:v+M}))):null,O?null:this.renderArea(w,T),(o||O)&&this.renderDots(w,D,T),(!g||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}}])}(S.PureComponent);Vy=jr,qt(jr,"displayName","Area"),qt(jr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!gr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),qt(jr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(Q(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]}),qt(jr,"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,v=c&&c.length,g=Vy.getBaseValue(t,r,n,a),m=h==="horizontal",b=!1,O=f.map(function(j,y){var w;v?w=c[u+y]:(w=Je(j,l),Array.isArray(w)?b=!0:w=[g,w]);var T=w[1]==null||v&&Je(j,l)==null;return m?{x:Mn({axis:n,ticks:i,bandSize:s,entry:j,index:y}),y:T?null:a.scale(w[1]),value:w,payload:j}:{x:T?null:n.scale(w[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:j,index:y}),value:w,payload:j}}),x;return v||b?x=O.map(function(j){var y=Array.isArray(j.value)?j.value[0]:null;return m?{x:j.x,y:y!=null&&j.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:j.y}}):x=m?a.scale(g):n.scale(g),Ar({points:O,baseLine:x,layout:h,isRange:b},d)}),qt(jr,"renderDotItem",function(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=ve("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Gy(t,H7);r=S.createElement(Jo,Xr({},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 tR(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,Jy(n.key),n)}}function nR(e,t,r){return t&&rR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aR(e,t,r){return t=ws(t),iR(e,Xy()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function iR(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 oR(e)}function oR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xy=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function sR(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 Zy(e,t,r){return t=Jy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jy(e){var t=lR(e,"string");return Xn(t)=="symbol"?t:t+""}function lR(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 tR(this,t),aR(this,t,arguments)}return sR(t,e),nR(t,[{key:"render",value:function(){return null}}])}(xt.Component);Zy(Os,"displayName","ZAxis"),Zy(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var cR=["option","isActive"];function vi(){return vi=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},vi.apply(this,arguments)}function uR(e,t){if(e==null)return{};var r=fR(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 fR(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 dR(e){var t=e.option,r=e.isActive,n=uR(e,cR);return typeof t=="string"?xt.createElement(Au,vi({option:xt.createElement(Xi,vi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(Au,vi({option:t,isActive:r,shapeType:"symbols"},n))}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 gi(){return gi=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},gi.apply(this,arguments)}function Qy(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?Qy(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e0(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,r0(n.key),n)}}function hR(e,t,r){return t&&e0(e.prototype,t),r&&e0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mR(e,t,r){return t=Ss(t),vR(e,t0()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function vR(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 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 t0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t0=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function yR(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=r0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r0(e){var t=bR(e,"string");return Zn(t)=="symbol"?t:t+""}function bR(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts=function(e){function t(){var r;pR(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=mR(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",kr("recharts-scatter-")),r}return yR(t,e),hR(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,v=_t(_t({},c),u);return S.createElement(xe,gi({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)},va(a.props,u,f),{role:"img"}),S.createElement(dR,gi({option:h,isActive:d,key:"symbol-".concat(f)},v)))})}},{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 S.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,v=i.map(function(g,m){var b=f&&f[m];if(b){var O=ze(b.cx,g.cx),x=ze(b.cy,g.cy),j=ze(b.size,g.size);return _t(_t({},g),{},{cx:O(h),cy:x(h),size:j(h)})}var y=ze(0,g.size);return _t(_t({},g),{},{size:y(h)})});return S.createElement(xe,null,n.renderSymbolsStatically(v))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Ur(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,v=d.dataKey;return S.cloneElement(u,{key:"".concat(h,"-").concat(v,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(m,b){return{x:m.cx,y:m.cy,value:h==="x"?+m.node.x:+m.node.y,errorVal:Je(m,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),c=de(i,!1),u,f;if(o==="joint")u=a.map(function(x){return{x:x.cx,y:x.cy}});else if(o==="fitting"){var d=V2(a),h=d.xmin,v=d.xmax,g=d.a,m=d.b,b=function(j){return g*j+m};u=[{x:h,y:b(h)},{x:v,y:b(v)}]}var O=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return S.isValidElement(i)?f=S.cloneElement(i,O):pe(i)?f=i(O):f=S.createElement(Hr,gi({},O,{type:s})),S.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,v=n.id,g=n.isAnimationActive;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,b=ve("recharts-scatter",s),O=l&&l.allowDataOverflow,x=c&&c.allowDataOverflow,j=O||x,y=fe(v)?this.id:v;return S.createElement(xe,{className:b,clipPath:j?"url(#clipPath-".concat(y,")"):null},O||x?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(y)},S.createElement("rect",{x:O?u:u-d/2,y:x?f:f-h/2,width:O?d:d*2,height:x?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),S.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!g||m)&&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}}])}(S.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:!gr.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,ec),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,v=n?n.range:Os.defaultProps.range,g=v&&v[0],m=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,O=i.map(function(x,j){var y=Je(x,f),w=Je(x,d),T=!fe(h)&&Je(x,h)||"-",A=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:x,dataKey:f,type:c},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:d,type:c}];T!=="-"&&A.push({name:n.name||n.dataKey,unit:n.unit||"",value:T,payload:x,dataKey:h,type:c});var _=Mn({axis:t,ticks:o,bandSize:m,entry:x,index:j,dataKey:f}),C=Mn({axis:r,ticks:s,bandSize:b,entry:x,index:j,dataKey:d}),P=T!=="-"?n.scale(T):g,E=Math.sqrt(Math.max(P,0)/Math.PI);return _t(_t({},x),{},{cx:_,cy:C,x:_-E,y:C-E,xAxis:t,yAxis:r,zAxis:n,width:2*E,height:2*E,size:P,node:{x:y,y:w,z:T},tooltipPayload:A,tooltipPosition:{x:_,y:C},payload:x},u&&u[j]&&u[j].props)});return _t({points:O},l)});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 xR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(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,i0(n.key),n)}}function OR(e,t,r){return t&&wR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SR(e,t,r){return t=As(t),TR(e,n0()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function TR(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 AR(e)}function AR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n0=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function jR(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&&Qu(e,t)}function Qu(e,t){return Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Qu(e,t)}function a0(e,t,r){return t=i0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i0(e){var t=PR(e,"string");return Jn(t)=="symbol"?t:t+""}function PR(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 String(e)}function ef(){return ef=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},ef.apply(this,arguments)}function _R(e){var t=e.xAxisId,r=Nu(),n=Du(),a=hy(t);return a==null?null:xt.createElement(Gn,ef({},a,{className:ve("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 js=function(e){function t(){return xR(this,t),SR(this,t,arguments)}return jR(t,e),OR(t,[{key:"render",value:function(){return xt.createElement(_R,this.props)}}])}(xt.Component);a0(js,"displayName","XAxis"),a0(js,"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 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,l0(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=Ps(t),MR(e,o0()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function MR(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 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 o0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o0=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(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&&tf(e,t)}function tf(e,t){return tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tf(e,t)}function s0(e,t,r){return t=l0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l0(e){var t=IR(e,"string");return Qn(t)=="symbol"?t:t+""}function IR(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 rf(){return rf=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},rf.apply(this,arguments)}var LR=function(t){var r=t.yAxisId,n=Nu(),a=Du(),i=my(r);return i==null?null:xt.createElement(Gn,rf({},i,{className:ve("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 ER(this,t),kR(this,t,arguments)}return DR(t,e),$R(t,[{key:"render",value:function(){return xt.createElement(LR,this.props)}}])}(xt.Component);s0(_s,"displayName","YAxis"),s0(_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 c0(e){return UR(e)||FR(e)||BR(e)||RR()}function RR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
278
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BR(e,t){if(e){if(typeof e=="string")return nf(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 nf(e,t)}}function FR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UR(e){if(Array.isArray(e))return nf(e)}function nf(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 af=function(t,r,n,a,i){var o=dt(t,Bu),s=dt(t,ps),l=[].concat(c0(o),c0(s)),c=dt(t,vs),u="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(g,m){if(m.props[u]===n&&Ht(m.props,"extendDomain")&&Q(m.props[f])){var b=m.props[f];return[Math.min(g[0],b),Math.max(g[1],b)]}return g},d)),c.length){var h="".concat(f,"1"),v="".concat(f,"2");d=c.reduce(function(g,m){if(m.props[u]===n&&Ht(m.props,"extendDomain")&&Q(m.props[h])&&Q(m.props[v])){var b=m.props[h],O=m.props[v];return[Math.min(g[0],b,O),Math.max(g[1],b,O)]}return g},d)}return i&&i.length&&(d=i.reduce(function(g,m){return Q(m)?[Math.min(g[0],m),Math.max(g[1],m)]:g},d)),d},u0={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),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=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,v=new Array(h);d<h;d++)v[d]=f[d].fn;return v},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,v){var g=r?r+c:c;if(!this._events[g])return!1;var m=this._events[g],b=arguments.length,O,x;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,u),!0;case 3:return m.fn.call(m.context,u,f),!0;case 4:return m.fn.call(m.context,u,f,d),!0;case 5:return m.fn.call(m.context,u,f,d,h),!0;case 6:return m.fn.call(m.context,u,f,d,h,v),!0}for(x=1,O=new Array(b-1);x<b;x++)O[x-1]=arguments[x];m.fn.apply(m.context,O)}else{var j=m.length,y;for(x=0;x<j;x++)switch(m[x].once&&this.removeListener(c,m[x].fn,void 0,!0),b){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,u);break;case 3:m[x].fn.call(m[x].context,u,f);break;case 4:m[x].fn.call(m[x].context,u,f,d);break;default:if(!O)for(y=1,O=new Array(b-1);y<b;y++)O[y-1]=arguments[y];m[x].fn.apply(m[x].context,O)}}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 v=this._events[h];if(v.fn)v.fn===u&&(!d||v.once)&&(!f||v.context===f)&&o(this,h);else{for(var g=0,m=[],b=v.length;g<b;g++)(v[g].fn!==u||d&&!v[g].once||f&&v[g].context!==f)&&m.push(v[g]);m.length?this._events[h]=m.length===1?m[0]:m: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})(u0);var WR=u0.exports;const zR=ke(WR);var of=new zR,sf="recharts.syncMouseEvents";function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function VR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GR(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,f0(n.key),n)}}function HR(e,t,r){return t&&GR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t,r){return t=f0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f0(e){var t=qR(e,"string");return yi(t)=="symbol"?t:t+""}function qR(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KR=function(){function e(){VR(this,e),lf(this,"activeIndex",0),lf(this,"coordinateList",[]),lf(this,"layout","horizontal")}return HR(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 YR(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&&Q(n)&&Q(a))return!0}return!1}function XR(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 d0(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 ZR(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 d0(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 p0(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?p0(Object(r),!0).forEach(function(n){JR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JR(e,t,r){return t=QR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QR(e){var t=eB(e,"string");return bi(t)=="symbol"?t:t+""}function eB(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 tB(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 v,g=Hr;if(d==="ScatterChart")v=o,g=jD;else if(d==="BarChart")v=XR(f,o,l,u),g=Ou;else if(f==="radial"){var m=d0(o),b=m.cx,O=m.cy,x=m.radius,j=m.startAngle,y=m.endAngle;v={cx:b,cy:O,startAngle:j,endAngle:y,innerRadius:x,outerRadius:x},g=Bv}else v={points:ZR(f,o,l)},g=Hr;var w=Es(Es(Es(Es({stroke:"#ccc",pointerEvents:"none"},l),v),de(h,!1)),{},{payload:s,payloadIndex:c,className:ve("recharts-tooltip-cursor",h.className)});return S.isValidElement(h)?S.cloneElement(h,w):S.createElement(g,w)}var rB=["item"],nB=["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 h0(e,t){return oB(e)||iB(e,t)||g0(e,t)||aB()}function aB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
279
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iB(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 oB(e){if(Array.isArray(e))return e}function m0(e,t){if(e==null)return{};var r=sB(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 sB(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 lB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cB(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,b0(n.key),n)}}function uB(e,t,r){return t&&cB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fB(e,t,r){return t=Cs(t),dB(e,v0()?Reflect.construct(t,r||[],Cs(e).constructor):t.apply(e,r))}function dB(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 pB(e)}function pB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v0=function(){return!!e})()}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}function hB(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&&cf(e,t)}function cf(e,t){return cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cf(e,t)}function ra(e){return gB(e)||vB(e)||g0(e)||mB()}function mB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
280
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g0(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 vB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gB(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 y0(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 H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y0(Object(r),!0).forEach(function(n){le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function le(e,t,r){return t=b0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b0(e){var t=yB(e,"string");return ea(t)=="symbol"?t:t+""}function yB(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 bB={xAxis:["bottom","top"],yAxis:["left","right"]},xB={width:"100%",height:"100%"},x0={x:0,y:0};function $s(e){return e}var wB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},OB=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 H(H(H({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return H(H(H({},a),nt(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return x0},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&&Q(a)&&Q(i)?t.slice(a,i+1):[]};function w0(e){return e==="number"?[0,"auto"]:void 0}var ff=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),[Pv(c,d)]):l},[])},O0=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=wB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=n6(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,d=ff(t,r,u,f),h=OB(n,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},SB=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=bv(u,i);return n.reduce(function(v,g){var m,b=g.type.defaultProps!==void 0?H(H({},g.type.defaultProps),g.props):g.props,O=b.type,x=b.dataKey,j=b.allowDataOverflow,y=b.allowDuplicatedCategory,w=b.scale,T=b.ticks,A=b.includeHidden,_=b[o];if(v[_])return v;var C=ks(t.data,{graphicalItems:a.filter(function(U){var W,K=o in U.props?U.props[o]:(W=U.type.defaultProps)===null||W===void 0?void 0:W[o];return K===_}),dataStartIndex:l,dataEndIndex:c}),P=C.length,E,I,k;YR(b.domain,j,O)&&(E=Qc(b.domain,null,j),h&&(O==="number"||w!=="auto")&&(k=Ga(C,x,"category")));var D=w0(O);if(!E||E.length===0){var M,F=(M=b.domain)!==null&&M!==void 0?M:D;if(x){if(E=Ga(C,x,O),O==="category"&&h){var z=z2(E);y&&z?(I=E,E=ns(0,P)):y||(E=jv(F,E,g).reduce(function(U,W){return U.indexOf(W)>=0?U:[].concat(ra(U),[W])},[]))}else if(O==="category")y?E=E.filter(function(U){return U!==""&&!fe(U)}):E=jv(F,E,g).reduce(function(U,W){return U.indexOf(W)>=0||W===""||fe(W)?U:[].concat(ra(U),[W])},[]);else if(O==="number"){var q=l6(C,a.filter(function(U){var W,K,R=o in U.props?U.props[o]:(W=U.type.defaultProps)===null||W===void 0?void 0:W[o],G="hide"in U.props?U.props.hide:(K=U.type.defaultProps)===null||K===void 0?void 0:K.hide;return R===_&&(A||!G)}),x,i,u);q&&(E=q)}h&&(O==="number"||w!=="auto")&&(k=Ga(C,x,"category"))}else h?E=ns(0,P):s&&s[_]&&s[_].hasStack&&O==="number"?E=d==="expand"?[0,1]:Sv(s[_].stackGroups,l,c):E=yv(C,a.filter(function(U){var W=o in U.props?U.props[o]:U.type.defaultProps[o],K="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return W===_&&(A||!K)}),O,u,!0);if(O==="number")E=af(f,E,_,i,T),F&&(E=Qc(F,E,j));else if(O==="category"&&F){var $=F,B=E.every(function(U){return $.indexOf(U)>=0});B&&(E=$)}}return H(H({},v),{},le({},_,H(H({},b),{},{axisType:i,domain:E,categoricalDomain:k,duplicateDomain:I,originalDomain:(m=b.domain)!==null&&m!==void 0?m:D,isCategorical:h,layout:u})))},{})},TB=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,v=bv(u,i),g=-1;return n.reduce(function(m,b){var O=b.type.defaultProps!==void 0?H(H({},b.type.defaultProps),b.props):b.props,x=O[o],j=w0("number");if(!m[x]){g++;var y;return v?y=ns(0,h):s&&s[x]&&s[x].hasStack?(y=Sv(s[x].stackGroups,l,c),y=af(f,y,x,i)):(y=Qc(j,yv(d,n.filter(function(w){var T,A,_=o in w.props?w.props[o]:(T=w.type.defaultProps)===null||T===void 0?void 0:T[o],C="hide"in w.props?w.props.hide:(A=w.type.defaultProps)===null||A===void 0?void 0:A.hide;return _===x&&!C}),"number",u),a.defaultProps.allowDataOverflow),y=af(f,y,x,i)),H(H({},m),{},le({},x,H(H({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(bB,"".concat(i,".").concat(g%2),null),domain:y,originalDomain:j,isCategorical:v,layout:u})))}return m},{})},AB=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=SB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(h=TB(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},jB=function(t){var r=mr(t),n=cr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Hl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},S0=function(t){var r=t.children,n=t.defaultShowTooltip,a=vt(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}},PB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},T0=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"}},_B=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=vt(f,In),v=vt(f,gn),g=Object.keys(l).reduce(function(y,w){var T=l[w],A=T.orientation;return!T.mirror&&!T.hide?H(H({},y),{},le({},A,y[A]+T.width)):y},{left:d.left||0,right:d.right||0}),m=Object.keys(o).reduce(function(y,w){var T=o[w],A=T.orientation;return!T.mirror&&!T.hide?H(H({},y),{},le({},A,wt(y,"".concat(A))+T.height)):y},{top:d.top||0,bottom:d.bottom||0}),b=H(H({},m),g),O=b.bottom;h&&(b.bottom+=h.props.height||In.defaultProps.height),v&&r&&(b=o6(b,a,n,r));var x=c-b.left-b.right,j=u-b.top-b.bottom;return H(H({brushBottom:O},b),{},{width:Math.max(x,0),height:Math.max(j,0)})},EB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},CB=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(b,O){var x=O.graphicalItems,j=O.stackGroups,y=O.offset,w=O.updateId,T=O.dataStartIndex,A=O.dataEndIndex,_=b.barSize,C=b.layout,P=b.barGap,E=b.barCategoryGap,I=b.maxBarSize,k=T0(C),D=k.numericAxisName,M=k.cateAxisName,F=PB(x),z=[];return x.forEach(function(q,$){var B=ks(b.data,{graphicalItems:[q],dataStartIndex:T,dataEndIndex:A}),U=q.type.defaultProps!==void 0?H(H({},q.type.defaultProps),q.props):q.props,W=U.dataKey,K=U.maxBarSize,R=U["".concat(D,"Id")],G=U["".concat(M,"Id")],Y={},te=l.reduce(function(Ge,ct){var Pi,_i,oa=O["".concat(ct.axisType,"Map")],Ei=U["".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((Pi=q==null||(_i=q.type)===null||_i===void 0?void 0:_i.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ci=oa[Ei];return H(H({},Ge),{},le(le({},ct.axisType,Ci),"".concat(ct.axisType,"Ticks"),cr(Ci)))},Y),V=te[M],Z=te["".concat(M,"Ticks")],ee=j&&j[R]&&j[R].hasStack&&x6(q,j[R].stackGroups),L=Qt(q.type).indexOf("Bar")>=0,oe=Fo(V,Z),X=[],ce=F&&a6({barSize:_,stackGroups:j,totalSize:EB(te,M)});if(L){var re,me,We=fe(K)?I:K,Be=(re=(me=Fo(V,Z,!0))!==null&&me!==void 0?me:We)!==null&&re!==void 0?re:0;X=i6({barGap:P,barCategoryGap:E,bandSize:Be!==oe?Be:oe,sizeList:ce[G],maxBarSize:We}),Be!==oe&&(X=X.map(function(Ge){return H(H({},Ge),{},{position:H(H({},Ge.position),{},{offset:Ge.position.offset-Be/2})})}))}var Fe=q&&q.type&&q.type.getComposedData;Fe&&z.push({props:H(H({},Fe(H(H({},te),{},{displayedData:B,props:b,dataKey:W,item:q,bandSize:oe,barPosition:X,offset:y,stackedData:ee,layout:C,dataStartIndex:T,dataEndIndex:A}))),{},le(le(le({key:q.key||"item-".concat($)},D,te[D]),M,te[M]),"animationId",w)),childIndex:rO(q,b.children),item:q})}),z},h=function(b,O){var x=b.props,j=b.dataStartIndex,y=b.dataEndIndex,w=b.updateId;if(!fd({props:x}))return null;var T=x.children,A=x.layout,_=x.stackOffset,C=x.data,P=x.reverseStackOrder,E=T0(A),I=E.numericAxisName,k=E.cateAxisName,D=dt(T,n),M=g6(C,D,"".concat(I,"Id"),"".concat(k,"Id"),_,P),F=l.reduce(function(U,W){var K="".concat(W.axisType,"Map");return H(H({},U),{},le({},K,AB(x,H(H({},W),{},{graphicalItems:D,stackGroups:W.axisType===I&&M,dataStartIndex:j,dataEndIndex:y}))))},{}),z=_B(H(H({},F),{},{props:x,graphicalItems:D}),O==null?void 0:O.legendBBox);Object.keys(F).forEach(function(U){F[U]=u(x,F[U],z,U.replace("Map",""),r)});var q=F["".concat(k,"Map")],$=jB(q),B=d(x,H(H({},F),{},{dataStartIndex:j,dataEndIndex:y,updateId:w,graphicalItems:D,stackGroups:M,offset:z}));return H(H({formattedGraphicalItems:B,graphicalItems:D,offset:z,stackGroups:M},$),F)},v=function(m){function b(O){var x,j,y;return lB(this,b),y=fB(this,b,[O]),le(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),le(y,"accessibilityManager",new KR),le(y,"handleLegendBBoxUpdate",function(w){if(w){var T=y.state,A=T.dataStartIndex,_=T.dataEndIndex,C=T.updateId;y.setState(H({legendBBox:w},h({props:y.props,dataStartIndex:A,dataEndIndex:_,updateId:C},H(H({},y.state),{},{legendBBox:w}))))}}),le(y,"handleReceiveSyncEvent",function(w,T,A){if(y.props.syncId===w){if(A===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(T)}}),le(y,"handleBrushChange",function(w){var T=w.startIndex,A=w.endIndex;if(T!==y.state.dataStartIndex||A!==y.state.dataEndIndex){var _=y.state.updateId;y.setState(function(){return H({dataStartIndex:T,dataEndIndex:A},h({props:y.props,dataStartIndex:T,dataEndIndex:A,updateId:_},y.state))}),y.triggerSyncEvent({dataStartIndex:T,dataEndIndex:A})}}),le(y,"handleMouseEnter",function(w){var T=y.getMouseInfo(w);if(T){var A=H(H({},T),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var _=y.props.onMouseEnter;pe(_)&&_(A,w)}}),le(y,"triggeredAfterMouseMove",function(w){var T=y.getMouseInfo(w),A=T?H(H({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var _=y.props.onMouseMove;pe(_)&&_(A,w)}),le(y,"handleItemMouseEnter",function(w){y.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),le(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),le(y,"handleMouseMove",function(w){w.persist(),y.throttleTriggeredAfterMouseMove(w)}),le(y,"handleMouseLeave",function(w){y.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};y.setState(T),y.triggerSyncEvent(T);var A=y.props.onMouseLeave;pe(A)&&A(T,w)}),le(y,"handleOuterEvent",function(w){var T=tO(w),A=wt(y.props,"".concat(T));if(T&&pe(A)){var _,C;/.*touch.*/i.test(T)?C=y.getMouseInfo(w.changedTouches[0]):C=y.getMouseInfo(w),A((_=C)!==null&&_!==void 0?_:{},w)}}),le(y,"handleClick",function(w){var T=y.getMouseInfo(w);if(T){var A=H(H({},T),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var _=y.props.onClick;pe(_)&&_(A,w)}}),le(y,"handleMouseDown",function(w){var T=y.props.onMouseDown;if(pe(T)){var A=y.getMouseInfo(w);T(A,w)}}),le(y,"handleMouseUp",function(w){var T=y.props.onMouseUp;if(pe(T)){var A=y.getMouseInfo(w);T(A,w)}}),le(y,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),le(y,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseDown(w.changedTouches[0])}),le(y,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseUp(w.changedTouches[0])}),le(y,"handleDoubleClick",function(w){var T=y.props.onDoubleClick;if(pe(T)){var A=y.getMouseInfo(w);T(A,w)}}),le(y,"handleContextMenu",function(w){var T=y.props.onContextMenu;if(pe(T)){var A=y.getMouseInfo(w);T(A,w)}}),le(y,"triggerSyncEvent",function(w){y.props.syncId!==void 0&&of.emit(sf,y.props.syncId,w,y.eventEmitterSymbol)}),le(y,"applySyncEvent",function(w){var T=y.props,A=T.layout,_=T.syncMethod,C=y.state.updateId,P=w.dataStartIndex,E=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)y.setState(H({dataStartIndex:P,dataEndIndex:E},h({props:y.props,dataStartIndex:P,dataEndIndex:E,updateId:C},y.state)));else if(w.activeTooltipIndex!==void 0){var I=w.chartX,k=w.chartY,D=w.activeTooltipIndex,M=y.state,F=M.offset,z=M.tooltipTicks;if(!F)return;if(typeof _=="function")D=_(z,w);else if(_==="value"){D=-1;for(var q=0;q<z.length;q++)if(z[q].value===w.activeLabel){D=q;break}}var $=H(H({},F),{},{x:F.left,y:F.top}),B=Math.min(I,$.x+$.width),U=Math.min(k,$.y+$.height),W=z[D]&&z[D].value,K=ff(y.state,y.props.data,D),R=z[D]?{x:A==="horizontal"?z[D].coordinate:B,y:A==="horizontal"?U:z[D].coordinate}:x0;y.setState(H(H({},w),{},{activeLabel:W,activeCoordinate:R,activePayload:K,activeTooltipIndex:D}))}else y.setState(w)}),le(y,"renderCursor",function(w){var T,A=y.state,_=A.isTooltipActive,C=A.activeCoordinate,P=A.activePayload,E=A.offset,I=A.activeTooltipIndex,k=A.tooltipAxisBandSize,D=y.getTooltipEventType(),M=(T=w.props.active)!==null&&T!==void 0?T:_,F=y.props.layout,z=w.key||"_recharts-cursor";return S.createElement(tB,{key:z,activeCoordinate:C,activePayload:P,activeTooltipIndex:I,chartName:r,element:w,isActive:M,layout:F,offset:E,tooltipAxisBandSize:k,tooltipEventType:D})}),le(y,"renderPolarAxis",function(w,T,A){var _=wt(w,"type.axisType"),C=wt(y.state,"".concat(_,"Map")),P=w.type.defaultProps,E=P!==void 0?H(H({},P),w.props):w.props,I=C&&C[E["".concat(_,"Id")]];return S.cloneElement(w,H(H({},I),{},{className:ve(_,I.className),key:w.key||"".concat(T,"-").concat(A),ticks:cr(I,!0)}))}),le(y,"renderPolarGrid",function(w){var T=w.props,A=T.radialLines,_=T.polarAngles,C=T.polarRadius,P=y.state,E=P.radiusAxisMap,I=P.angleAxisMap,k=mr(E),D=mr(I),M=D.cx,F=D.cy,z=D.innerRadius,q=D.outerRadius;return S.cloneElement(w,{polarAngles:Array.isArray(_)?_:cr(D,!0).map(function($){return $.coordinate}),polarRadius:Array.isArray(C)?C:cr(k,!0).map(function($){return $.coordinate}),cx:M,cy:F,innerRadius:z,outerRadius:q,key:w.key||"polar-grid",radialLines:A})}),le(y,"renderLegend",function(){var w=y.state.formattedGraphicalItems,T=y.props,A=T.children,_=T.width,C=T.height,P=y.props.margin||{},E=_-(P.left||0)-(P.right||0),I=hv({children:A,formattedGraphicalItems:w,legendWidth:E,legendContent:c});if(!I)return null;var k=I.item,D=m0(I,rB);return S.cloneElement(k,H(H({},D),{},{chartWidth:_,chartHeight:C,margin:P,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),le(y,"renderTooltip",function(){var w,T=y.props,A=T.children,_=T.accessibilityLayer,C=vt(A,Ut);if(!C)return null;var P=y.state,E=P.isTooltipActive,I=P.activeCoordinate,k=P.activePayload,D=P.activeLabel,M=P.offset,F=(w=C.props.active)!==null&&w!==void 0?w:E;return S.cloneElement(C,{viewBox:H(H({},M),{},{x:M.left,y:M.top}),active:F,label:D,payload:F?k:[],coordinate:I,accessibilityLayer:_})}),le(y,"renderBrush",function(w){var T=y.props,A=T.margin,_=T.data,C=y.state,P=C.offset,E=C.dataStartIndex,I=C.dataEndIndex,k=C.updateId;return S.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,w.props.onChange),data:_,x:Q(w.props.x)?w.props.x:P.left,y:Q(w.props.y)?w.props.y:P.top+P.height+P.brushBottom-(A.bottom||0),width:Q(w.props.width)?w.props.width:P.width,startIndex:E,endIndex:I,updateId:"brush-".concat(k)})}),le(y,"renderReferenceElement",function(w,T,A){if(!w)return null;var _=y,C=_.clipPathId,P=y.state,E=P.xAxisMap,I=P.yAxisMap,k=P.offset,D=w.type.defaultProps||{},M=w.props,F=M.xAxisId,z=F===void 0?D.xAxisId:F,q=M.yAxisId,$=q===void 0?D.yAxisId:q;return S.cloneElement(w,{key:w.key||"".concat(T,"-").concat(A),xAxis:E[z],yAxis:I[$],viewBox:{x:k.left,y:k.top,width:k.width,height:k.height},clipPathId:C})}),le(y,"renderActivePoints",function(w){var T=w.item,A=w.activePoint,_=w.basePoint,C=w.childIndex,P=w.isRange,E=[],I=T.props.key,k=T.item.type.defaultProps!==void 0?H(H({},T.item.type.defaultProps),T.item.props):T.item.props,D=k.activeDot,M=k.dataKey,F=H(H({index:C,dataKey:M,cx:A.x,cy:A.y,r:4,fill:Zc(T.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},de(D,!1)),Bi(D));return E.push(b.renderActiveDot(D,F,"".concat(I,"-activePoint-").concat(C))),_?E.push(b.renderActiveDot(D,H(H({},F),{},{cx:_.x,cy:_.y}),"".concat(I,"-basePoint-").concat(C))):P&&E.push(null),E}),le(y,"renderGraphicChild",function(w,T,A){var _=y.filterFormatItem(w,T,A);if(!_)return null;var C=y.getTooltipEventType(),P=y.state,E=P.isTooltipActive,I=P.tooltipAxis,k=P.activeTooltipIndex,D=P.activeLabel,M=y.props.children,F=vt(M,Ut),z=_.props,q=z.points,$=z.isRange,B=z.baseLine,U=_.item.type.defaultProps!==void 0?H(H({},_.item.type.defaultProps),_.item.props):_.item.props,W=U.activeDot,K=U.hide,R=U.activeBar,G=U.activeShape,Y=!!(!K&&E&&F&&(W||R||G)),te={};C!=="axis"&&F&&F.props.trigger==="click"?te={onClick:Bo(y.handleItemMouseEnter,w.props.onClick)}:C!=="axis"&&(te={onMouseLeave:Bo(y.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,w.props.onMouseEnter)});var V=S.cloneElement(w,H(H({},_.props),te));function Z(ct){return typeof I.dataKey=="function"?I.dataKey(ct.payload):null}if(Y)if(k>=0){var ee,L;if(I.dataKey&&!I.allowDuplicatedCategory){var oe=typeof I.dataKey=="function"?Z:"payload.".concat(I.dataKey.toString());ee=Ri(q,oe,D),L=$&&B&&Ri(B,oe,D)}else ee=q==null?void 0:q[k],L=$&&B&&B[k];if(G||R){var X=w.props.activeIndex!==void 0?w.props.activeIndex:k;return[S.cloneElement(w,H(H(H({},_.props),te),{},{activeIndex:X})),null,null]}if(!fe(ee))return[V].concat(ra(y.renderActivePoints({item:_,activePoint:ee,basePoint:L,childIndex:k,isRange:$})))}else{var ce,re=(ce=y.getItemByXY(y.state.activeCoordinate))!==null&&ce!==void 0?ce:{graphicalItem:V},me=re.graphicalItem,We=me.item,Be=We===void 0?w:We,Fe=me.childIndex,Ge=H(H(H({},_.props),te),{},{activeIndex:Fe});return[S.cloneElement(Be,Ge),null,null]}return $?[V,null,null]:[V,null]}),le(y,"renderCustomized",function(w,T,A){return S.cloneElement(w,H(H({key:"recharts-customized-".concat(A)},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((x=O.id)!==null&&x!==void 0?x:kr("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=fh(y.triggeredAfterMouseMove,(j=O.throttleDelay)!==null&&j!==void 0?j:1e3/60),y.state={},y}return hB(b,m),uB(b,[{key:"componentDidMount",value:function(){var x,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,j=x.children,y=x.data,w=x.height,T=x.layout,A=vt(j,Ut);if(A){var _=A.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,P=ff(this.state,y,_,C),E=this.state.tooltipTicks[_].coordinate,I=(this.state.offset.top+w)/2,k=T==="horizontal",D=k?{x:E,y:I}:{y:E,x:I},M=this.state.formattedGraphicalItems.find(function(z){var q=z.item;return q.type.name==="Scatter"});M&&(D=H(H({},D),M.props.points[_].tooltipPosition),P=M.props.points[_].tooltipPayload);var F={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:C,activePayload:P,activeCoordinate:D};this.setState(F),this.renderCursor(A),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var y,w;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(x){fl([vt(x.children,Ut)],[vt(this.props.children,Ut)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=vt(this.props.children,Ut);if(x&&typeof x.props.shared=="boolean"){var j=x.props.shared?"axis":"item";return s.indexOf(j)>=0?j:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var j=this.container,y=j.getBoundingClientRect(),w=Ck(y),T={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},A=y.width/j.offsetWidth||1,_=this.inRange(T.chartX,T.chartY,A);if(!_)return null;var C=this.state,P=C.xAxisMap,E=C.yAxisMap,I=this.getTooltipEventType(),k=O0(this.state,this.props.data,this.props.layout,_);if(I!=="axis"&&P&&E){var D=mr(P).scale,M=mr(E).scale,F=D&&D.invert?D.invert(T.chartX):null,z=M&&M.invert?M.invert(T.chartY):null;return H(H({},T),{},{xValue:F,yValue:z},k)}return k?H(H({},T),k):null}},{key:"inRange",value:function(x,j){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,T=x/y,A=j/y;if(w==="horizontal"||w==="vertical"){var _=this.state.offset,C=T>=_.left&&T<=_.left+_.width&&A>=_.top&&A<=_.top+_.height;return C?{x:T,y:A}:null}var P=this.state,E=P.angleAxisMap,I=P.radiusAxisMap;if(E&&I){var k=mr(E);return Cv({x:T,y:A},k)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,j=this.getTooltipEventType(),y=vt(x,Ut),w={};y&&j==="axis"&&(y.props.trigger==="click"?w={onClick:this.handleClick}:w={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 T=Bi(this.props,this.handleOuterEvent);return H(H({},T),w)}},{key:"addListener",value:function(){of.on(sf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){of.removeListener(sf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,j,y){for(var w=this.state.formattedGraphicalItems,T=0,A=w.length;T<A;T++){var _=w[T];if(_.item===x||_.props.key===x.key||j===Qt(_.item.type)&&y===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,j=this.state.offset,y=j.left,w=j.top,T=j.height,A=j.width;return S.createElement("defs",null,S.createElement("clipPath",{id:x},S.createElement("rect",{x:y,y:w,height:T,width:A})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(j,y){var w=h0(y,2),T=w[0],A=w[1];return H(H({},j),{},le({},T,A.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(j,y){var w=h0(y,2),T=w[0],A=w[1];return H(H({},j),{},le({},T,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[x])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(x){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[x])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(x){var j=this.state,y=j.formattedGraphicalItems,w=j.activeItem;if(y&&y.length)for(var T=0,A=y.length;T<A;T++){var _=y[T],C=_.props,P=_.item,E=P.type.defaultProps!==void 0?H(H({},P.type.defaultProps),P.props):P.props,I=Qt(P.type);if(I==="Bar"){var k=(C.data||[]).find(function(z){return vD(x,z)});if(k)return{graphicalItem:_,payload:k}}else if(I==="RadialBar"){var D=(C.data||[]).find(function(z){return Cv(x,z)});if(D)return{graphicalItem:_,payload:D}}else if(ts(_,w)||rs(_,w)||ci(_,w)){var M=yI({graphicalItem:_,activeTooltipItem:w,itemData:E.data}),F=E.activeIndex===void 0?M:E.activeIndex;return{graphicalItem:H(H({},_),{},{childIndex:F}),payload:ci(_,w)?E.data[M]:_.props.data[M]}}}return null}},{key:"render",value:function(){var x=this;if(!fd(this))return null;var j=this.props,y=j.children,w=j.className,T=j.width,A=j.height,_=j.style,C=j.compact,P=j.title,E=j.desc,I=m0(j,nB),k=de(I,!1);if(C)return S.createElement(dy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(pl,ta({},k,{width:T,height:A,title:P,desc:E}),this.renderClipPath(),hd(y,this.renderMap)));if(this.props.accessibilityLayer){var D,M;k.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,k.role=(M=this.props.role)!==null&&M!==void 0?M:"application",k.onKeyDown=function(z){x.accessibilityManager.keyboardEvent(z)},k.onFocus=function(){x.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return S.createElement(dy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement("div",ta({className:ve("recharts-wrapper",w),style:H({position:"relative",cursor:"default",width:T,height:A},_)},F,{ref:function(q){x.container=q}}),S.createElement(pl,ta({},k,{width:T,height:A,title:P,desc:E,style:xB}),this.renderClipPath(),hd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);le(v,"displayName",r),le(v,"defaultProps",H({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),le(v,"getDerivedStateFromProps",function(m,b){var O=m.dataKey,x=m.data,j=m.children,y=m.width,w=m.height,T=m.layout,A=m.stackOffset,_=m.margin,C=b.dataStartIndex,P=b.dataEndIndex;if(b.updateId===void 0){var E=S0(m);return H(H(H({},E),{},{updateId:0},h(H(H({props:m},E),{},{updateId:0}),b)),{},{prevDataKey:O,prevData:x,prevWidth:y,prevHeight:w,prevLayout:T,prevStackOffset:A,prevMargin:_,prevChildren:j})}if(O!==b.prevDataKey||x!==b.prevData||y!==b.prevWidth||w!==b.prevHeight||T!==b.prevLayout||A!==b.prevStackOffset||!un(_,b.prevMargin)){var I=S0(m),k={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},D=H(H({},O0(b,x,T)),{},{updateId:b.updateId+1}),M=H(H(H({},I),k),D);return H(H(H({},M),h(H({props:m},M),b)),{},{prevDataKey:O,prevData:x,prevWidth:y,prevHeight:w,prevLayout:T,prevStackOffset:A,prevMargin:_,prevChildren:j})}if(!fl(j,b.prevChildren)){var F,z,q,$,B=vt(j,In),U=B&&(F=(z=B.props)===null||z===void 0?void 0:z.startIndex)!==null&&F!==void 0?F:C,W=B&&(q=($=B.props)===null||$===void 0?void 0:$.endIndex)!==null&&q!==void 0?q:P,K=U!==C||W!==P,R=!fe(x),G=R&&!K?b.updateId:b.updateId+1;return H(H({updateId:G},h(H(H({props:m},b),{},{updateId:G,dataStartIndex:U,dataEndIndex:W}),b)),{},{prevChildren:j,dataStartIndex:U,dataEndIndex:W})}return null}),le(v,"renderActiveDot",function(m,b,O){var x;return S.isValidElement(m)?x=S.cloneElement(m,b):pe(m)?x=m(b):x=S.createElement(Jo,b),S.createElement(xe,{className:"recharts-active-dot",key:O},x)});var g=S.forwardRef(function(b,O){return S.createElement(v,ta({},b,{ref:O}))});return g.displayName=v.displayName,g},$B=CB({chartName:"ComposedChart",GraphicalChild:[mi,jr,Bn,Ts],axisComponents:[{axisType:"xAxis",AxisComp:js},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:z9});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"})]})]}),A0=({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,v=u.y;s+=` C ${f} ${d} ${h} ${v} ${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((m,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],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],v=f[0],g=`${d} L ${h.x} 90 L ${v.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((m,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"})]})]})]})})},kB=({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))})]})},j0=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var y,w;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=(T=>{if(!T||T.length===0)return[];const A=[...T].sort((k,D)=>{const M=new Date(k.date),F=new Date(D.date);return M.getTime()-F.getTime()});let _,C;l!=null&&l.start&&(l!=null&&l.end)?(_=new Date(l.start),C=new Date(l.end)):(_=new Date(A[0].date),C=new Date(A[A.length-1].date));const P=new Map;A.forEach(k=>{P.set(k.date,k)});const E=[],I=new Date(_);for(;I<=C;){const k=I.toISOString().split("T")[0];if(P.has(k))E.push(P.get(k));else{const D={date:k,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(A.length>0){const M=A[0];Object.keys(M).forEach(F=>{typeof M[F]=="number"&&!(F in D)&&(D[F]=0)})}E.push(D)}I.setDate(I.getDate()+1)}return E})(a),v=T=>{const A=new Date(T);return isNaN(A.getTime())?T:A.toLocaleDateString("en-US",{month:"short",day:"numeric"})},g=()=>{if(!h||h.length===0)return 0;const T=h.length;return T<=20?0:T<=31?1:T<=61?2:Math.floor(T/7)-1},m=T=>b()&&!Number.isInteger(T)?"":T>=1e3?`${Math.floor(T/1e3)}k`:Math.floor(T).toString(),b=()=>{const T=["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&&T.some(A=>c.toLowerCase().includes(A.toLowerCase()))||i&&T.some(A=>i.toLowerCase().includes(A.toLowerCase()))||e.title&&T.some(A=>e.title.toLowerCase().includes(A.toLowerCase()))||s&&s.some(A=>A.label&&T.some(_=>A.label.toLowerCase().includes(_.toLowerCase()))))},x=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(A0,{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 j=T=>{var _;if(!n||!T||!T.activePayload)return;const A=(_=T.activePayload[0])==null?void 0:_.payload;A&&A.date&&(console.log("Chart data point clicked:",{date:A.date,data:A}),n(A,A.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:(w=h[h.length-1])==null?void 0:w.date,totalDays:h.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",x),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(Sk,{width:"100%",height:u,children:p.jsxs($B,{data:h,onClick:j,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:x.map((T,A)=>p.jsxs("linearGradient",{id:`gradient-${T.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:T.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:T.color,stopOpacity:.01})]},`gradient-${A}`))}),p.jsx(Ry,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),p.jsx(js,{dataKey:"date",tickFormatter:v,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:m,tickMargin:10,allowDecimals:!b(),domain:b()?["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(Ut,{content:T=>p.jsx(kB,{...T,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(T=>p.jsx(jr,{type:"monotone",dataKey:T.dataKey,stroke:"none",fill:`url(#gradient-${T.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${T.dataKey}`)),x.map(T=>p.jsx(mi,{type:"monotone",dataKey:T.dataKey,stroke:T.color,strokeWidth:2.5,strokeDasharray:T.strokeDasharray,dot:!1,activeDot:{r:5,fill:T.color,stroke:T.color,strokeWidth:2},name:T.label},T.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:x.map(T=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:T.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:T.label})]},T.dataKey))})})]})]})},P0=({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]=S.useState(o.defaultSort||null),[u,f]=S.useState(""),[d,h]=S.useState(1),v=S.useMemo(()=>{let y=[...n];return s.searchable&&u&&(y=y.filter(w=>a.some(T=>{const A=w[T.key];return A==null?void 0:A.toString().toLowerCase().includes(u.toLowerCase())}))),l&&y.sort((w,T)=>{const A=w[l.key],_=T[l.key];if(typeof A=="number"&&typeof _=="number")return l.order==="asc"?A-_:_-A;const C=(A==null?void 0:A.toString())||"",P=(_==null?void 0:_.toString())||"",E=C.localeCompare(P);return l.order==="asc"?E:-E}),y},[n,a,u,l,s.searchable]),g=i.enabled?Math.ceil(v.length/i.pageSize):1,m=i.enabled?v.slice((d-1)*i.pageSize,d*i.pageSize):v,b=y=>{!o.enabled||!y.sortable||c(w=>(w==null?void 0:w.key)===y.key?w.order==="asc"?{key:y.key,order:"desc"}:null:{key:y.key,order:"asc"})},O=y=>{f(y),h(1)},x=(y,w,T)=>w.render?w.render(y,T):w.formatter?w.formatter(y,T):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",j=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?p.jsx(Tf,{className:"w-[16px] h-[16px]"}):p.jsx(fr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(Tf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(fr,{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(Ef,{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=>O(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:()=>b(y),children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{children:y.title}),j(y)]})},y.key))})}),p.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:m.map((y,w)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(T=>p.jsx("td",{className:se("px-[16px] py-[12px] text-xs text-gray-900",T.align==="center"&&"text-center",T.align==="right"&&"text-right"),children:x(y[T.key],T,y)},T.key))},w))})]})}),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,v.length)," of"," ",v.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,w)=>{const T=Math.max(1,Math.min(g-4,d-2))+w;return T>g?null:p.jsx("button",{onClick:()=>h(T),className:se("px-[12px] py-[4px] text-xs border rounded",d===T?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:T},T)}),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"})]})]}),m.length===0&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:u?"No results found for your search.":"No data available."})]})},MB=(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"}},NB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},DB=(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]}},IB=(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=MB(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name.replace("agent","avatar")}.svg`},_0=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={xs:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",small:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",medium:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",large:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center"},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)">
272
+ `).concat(t,",").concat(r+a-s*f[3])),u+="Z"}else if(o>0&&i===+i&&i>0){var g=Math.min(o,i);u="M ".concat(t,",").concat(r+s*g,`
273
+ A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+l*g,",").concat(r,`
274
+ L `).concat(t+n-l*g,",").concat(r,`
275
+ A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*g,`
276
+ L `).concat(t+n,",").concat(r+a-s*g,`
277
+ A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+n-l*g,",").concat(r+a,`
278
+ L `).concat(t+l*g,",").concat(r+a,`
279
+ A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(r+a-s*g," Z")}else u="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return u},yD=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},bD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ou=function(t){var r=_v(_v({},bD),t),n=S.useRef(),a=S.useState(-1),i=uD(a,2),o=i[0],s=i[1];S.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,g=r.animationEasing,v=r.animationDuration,m=r.animationBegin,b=r.isAnimationActive,w=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var x=ge("recharts-rectangle",h);return w?S.createElement(It,{canBegin:o>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:v,animationEasing:g,isActive:w},function(A){var y=A.width,O=A.height,T=A.x,j=A.y;return S.createElement(It,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:v,isActive:b,easing:g},S.createElement("path",Zo({},de(r,!0),{className:x,d:Ev(T,j,y,O,d),ref:n})))}):S.createElement("path",Zo({},de(r,!0),{className:x,d:Ev(l,c,u,f,d)}))};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)}var Jo=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ge("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",Su({},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 xD=["x","y","top","left","width","height","className"];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 Cv(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 wD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cv(Object(r),!0).forEach(function(n){OD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OD(e,t,r){return t=SD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SD(e){var t=TD(e,"string");return oi(t)=="symbol"?t:t+""}function TD(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 AD(e,t){if(e==null)return{};var r=jD(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 jD(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 PD=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},_D=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,g=t.className,v=AD(t,xD),m=wD({x:n,y:i,top:s,left:c,width:f,height:h},v);return!te(n)||!te(i)||!te(f)||!te(h)||!te(s)||!te(c)?null:S.createElement("path",Tu({},de(m,!0),{className:ge("recharts-cross",g),d:PD(n,i,f,h,s,c)}))},ED=dp,CD=ED(Object.getPrototypeOf,Object),$D=CD,kD=Zt,MD=$D,ND=Jt,DD="[object Object]",ID=Function.prototype,LD=Object.prototype,$v=ID.toString,RD=LD.hasOwnProperty,BD=$v.call(Object);function FD(e){if(!ND(e)||kD(e)!=DD)return!1;var t=MD(e);if(t===null)return!0;var r=RD.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&$v.call(r)==BD}var UD=FD;const WD=ke(UD);var zD=Zt,VD=Jt,GD="[object Boolean]";function HD(e){return e===!0||e===!1||VD(e)&&zD(e)==GD}var qD=HD;const KD=ke(qD);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 YD(e,t){return QD(e)||JD(e,t)||ZD(e,t)||XD()}function XD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZD(e,t){if(e){if(typeof e=="string")return kv(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 kv(e,t)}}function kv(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 JD(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 QD(e){if(Array.isArray(e))return e}function Mv(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 Nv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mv(Object(r),!0).forEach(function(n){eI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eI(e,t,r){return t=tI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tI(e){var t=rI(e,"string");return si(t)=="symbol"?t:t+""}function rI(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 Dv=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},nI={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aI=function(t){var r=Nv(Nv({},nI),t),n=S.useRef(),a=S.useState(-1),i=YD(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var x=n.current.getTotalLength();x&&s(x)}catch{}},[]);var l=r.x,c=r.y,u=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,g=r.animationEasing,v=r.animationDuration,m=r.animationBegin,b=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||d!==+d||u===0&&f===0||d===0)return null;var w=ge("recharts-trapezoid",h);return b?S.createElement(It,{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:v,animationEasing:g,isActive:b},function(x){var A=x.upperWidth,y=x.lowerWidth,O=x.height,T=x.x,j=x.y;return S.createElement(It,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:v,easing:g},S.createElement("path",Qo({},de(r,!0),{className:w,d:Dv(T,j,A,y,O),ref:n})))}):S.createElement("g",null,S.createElement("path",Qo({},de(r,!0),{className:w,d:Dv(l,c,u,f,d)})))},iI=["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 oI(e,t){if(e==null)return{};var r=sI(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 sI(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 Iv(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?Iv(Object(r),!0).forEach(function(n){lI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lI(e,t,r){return t=cI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cI(e){var t=uI(e,"string");return li(t)=="symbol"?t:t+""}function uI(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 fI(e,t){return es(es({},t),e)}function dI(e,t){return e==="symbols"}function Lv(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return S.createElement(Ou,r);case"trapezoid":return S.createElement(aI,r);case"sector":return S.createElement(Fg,r);case"symbols":if(dI(t))return S.createElement(Xi,r);break;default:return null}}function pI(e){return S.isValidElement(e)?e.props:e}function Au(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?fI:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=oI(e,iI),c;if(S.isValidElement(t))c=S.cloneElement(t,es(es({},l),pI(t)));else if(pe(t))c=t(l);else if(WD(t)&&!KD(t)){var u=a(t,l);c=S.createElement(Lv,{shapeType:r,elementProps:u})}else{var f=l;c=S.createElement(Lv,{shapeType:r,elementProps:f})}return s?S.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 hI(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 mI(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function gI(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function vI(e,t){var r;return ts(e,t)?r=hI:rs(e,t)?r=mI:ci(e,t)&&(r=gI),r}function yI(e,t){var r;return ts(e,t)?r="trapezoids":rs(e,t)?r="sectors":ci(e,t)&&(r="points"),r}function bI(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 xI(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=yI(r,t),i=bI(r,t),o=n.filter(function(l,c){var u=Ur(i,l),f=r.props[a].filter(function(g){var v=vI(r,t);return v(g,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 wI=Math.ceil,OI=Math.max;function SI(e,t,r,n){for(var a=-1,i=OI(wI((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var TI=SI,AI=uh,Rv=1/0,jI=17976931348623157e292;function PI(e){if(!e)return e===0?e:0;if(e=AI(e),e===Rv||e===-Rv){var t=e<0?-1:1;return t*jI}return e===e?e:0}var Bv=PI,_I=TI,EI=io,ju=Bv;function CI(e){return function(t,r,n){return n&&typeof n!="number"&&EI(t,r,n)&&(r=n=void 0),t=ju(t),r===void 0?(r=t,t=0):r=ju(r),n=n===void 0?t<r?1:-1:ju(n),_I(t,r,n,e)}}var $I=CI,kI=$I,MI=kI(),NI=MI;const ns=ke(NI);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 Fv(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 Uv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fv(Object(r),!0).forEach(function(n){Wv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wv(e,t,r){return t=DI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DI(e){var t=II(e,"string");return ui(t)=="symbol"?t:t+""}function II(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 LI=["Webkit","Moz","O","ms"],RI=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=LI.reduce(function(i,o){return Uv(Uv({},i),{},Wv({},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 zv(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?zv(Object(r),!0).forEach(function(n){yt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vv(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,Hv(n.key),n)}}function FI(e,t,r){return t&&Vv(e.prototype,t),r&&Vv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function UI(e,t,r){return t=is(t),WI(e,Gv()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function WI(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 zI(e)}function zI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gv=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function VI(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&&_u(e,t)}function _u(e,t){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_u(e,t)}function yt(e,t,r){return t=Hv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hv(e){var t=GI(e,"string");return Dn(t)=="symbol"?t:t+""}function GI(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 HI=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}},qv=function(t){return t.changedTouches&&!!t.changedTouches.length},In=function(e){function t(r){var n;return BI(this,t),n=UI(this,t,[r]),yt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),yt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),yt(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()}),yt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),yt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),yt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),yt(n,"handleSlideDragStart",function(a){var i=qv(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 VI(t,e),FI(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),g=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:g===u?u:g-g%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Je(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,g=l.onChange,v=n.pageX-i;v>0?v=Math.min(v,c+u-f-s,c+u-f-o):v<0&&(v=Math.max(v,c-o,c-s));var m=this.getIndex({startX:o+v,endX:s+v});(m.startIndex!==d||m.endIndex!==h)&&g&&g(m),this.setState({startX:o+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=qv(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,g=u.onChange,v=u.gap,m=u.data,b={startX:this.state.startX,endX:this.state.endX},w=n.pageX-i;w>0?w=Math.min(w,f+d-h-c):w<0&&(w=Math.max(w,f-c)),b[o]=c+w;var x=this.getIndex(b),A=x.startIndex,y=x.endIndex,O=function(){var j=m.length-1;return o==="startX"&&(s>l?A%v===0:y%v===0)||s<l&&y===j||o==="endX"&&(s>l?y%v===0:A%v===0)||s>l&&y===j};this.setState(yt(yt({},o,c+w),"brushMoveStartX",n.pageX),function(){g&&O()&&g(x)})}},{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(yt({},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 S.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=S.Children.only(c);return f?S.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,g=l.data,v=l.startIndex,m=l.endIndex,b=Math.max(n,this.props.x),w=Pu(Pu({},de(this.props,!1)),{},{x:b,y:c,width:u,height:f}),x=h||"Min value: ".concat((i=g[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=g[m])===null||o===void 0?void 0:o.name);return S.createElement(xe,{tabIndex:0,role:"slider","aria-label":x,"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,w))}},{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 S.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,g={pointerEvents:"none",fill:c};return S.createElement(xe,{className:"recharts-brush-texts"},S.createElement(po,as({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},g),this.getTextOfTick(a)),S.createElement(po,as({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},g),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,g=d.endX,v=d.isTextActive,m=d.isSlideMoving,b=d.isTravellerMoving,w=d.isTravellerFocused;if(!a||!a.length||!te(s)||!te(l)||!te(c)||!te(u)||c<=0||u<=0)return null;var x=ge("recharts-brush",i),A=S.Children.count(o)===1,y=RI("userSelect","none");return S.createElement(xe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(h,g),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(g,"endX"),(v||m||b||w||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 S.createElement(S.Fragment,null,S.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),S.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),S.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 S.isValidElement(n)?i=S.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?HI({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}}])}(S.PureComponent);yt(In,"displayName","Brush"),yt(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 qI=Vl;function KI(e,t){var r;return qI(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var YI=KI,XI=Zd,ZI=gr,JI=YI,QI=ft,e9=io;function t9(e,t,r){var n=QI(e)?XI:JI;return r&&e9(e,t,r)&&(t=void 0),n(e,ZI(t))}var r9=t9;const n9=ke(r9);var Ht=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Kv=qp;function a9(e,t,r){t=="__proto__"&&Kv?Kv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var i9=a9,o9=i9,s9=zp,l9=gr;function c9(e,t){var r={};return t=l9(t),s9(e,function(n,a,i){o9(r,a,t(n,a,i))}),r}var u9=c9;const f9=ke(u9);function d9(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 p9=d9,h9=Vl;function m9(e,t){var r=!0;return h9(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var g9=m9,v9=p9,y9=g9,b9=gr,x9=ft,w9=io;function O9(e,t,r){var n=x9(e)?v9:y9;return r&&w9(e,t,r)&&(t=void 0),n(e,b9(t))}var S9=O9;const Yv=ke(S9);var T9=["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 Eu(){return Eu=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},Eu.apply(this,arguments)}function Xv(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?Xv(Object(r),!0).forEach(function(n){A9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A9(e,t,r){return t=j9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j9(e){var t=P9(e,"string");return Ln(t)=="symbol"?t:t+""}function P9(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 _9(e,t){if(e==null)return{};var r=E9(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 E9(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 C9(e,t){var r=e.x,n=e.y,a=_9(e,T9),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 Zv(e){return S.createElement(Au,Eu({shapeType:"rectangle",propTransformer:C9,activeClassName:"recharts-active-bar"},e))}var $9=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=te(n)||z2(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)}},k9=["value","background"],Jv;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 M9(e,t){if(e==null)return{};var r=N9(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 N9(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 Qv(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?Qv(Object(r),!0).forEach(function(n){Tr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(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,ry(n.key),n)}}function I9(e,t,r){return t&&ey(e.prototype,t),r&&ey(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function L9(e,t,r){return t=ss(t),R9(e,ty()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function R9(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 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 ty(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ty=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(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&&Cu(e,t)}function Cu(e,t){return Cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Cu(e,t)}function Tr(e,t,r){return t=ry(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ry(e){var t=U9(e,"string");return Rn(t)=="symbol"?t:t+""}function U9(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;D9(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=L9(this,t,[].concat(a)),Tr(r,"state",{isAnimationFinished:!1}),Tr(r,"id",kr("recharts-bar-")),Tr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Tr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return F9(t,e),I9(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,g=h?c:o,v=Ke(Ke(Ke({},u),f),{},{isActive:h,option:g,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return S.createElement(xe,os({className:"recharts-bar-rectangle"},ga(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)}),S.createElement(Zv,v))})}},{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 S.createElement(It,{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 g=h.t,v=i.map(function(m,b){var w=d&&d[b];if(w){var x=ze(w.x,m.x),A=ze(w.y,m.y),y=ze(w.width,m.width),O=ze(w.height,m.height);return Ke(Ke({},m),{},{x:x(g),y:A(g),width:y(g),height:O(g)})}if(o==="horizontal"){var T=ze(0,m.height),j=T(g);return Ke(Ke({},m),{},{y:m.y+m.height-j,height:j})}var C=ze(0,m.width),k=C(g);return Ke(Ke({},m),{},{width:k})});return S.createElement(xe,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Ur(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=M9(c,k9);if(!f)return null;var h=Ke(Ke(Ke(Ke(Ke({},d),{},{fill:"#eee"},f),l),ga(n.props,c,u)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return S.createElement(Zv,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(m,b){var w=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:w,errorVal:Je(m,b)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(xe,g,f.map(function(v){return S.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.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,g=n.background,v=n.id;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,b=ge("recharts-bar",o),w=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,A=w||x,y=fe(v)?this.id:v;return S.createElement(xe,{className:b},w||x?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(y)},S.createElement("rect",{x:w?c:c-f/2,y:x?u:u-d/2,width:w?f:f*2,height:x?d:d*2}))):null,S.createElement(xe,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(y,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,y),(!h||m)&&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}}])}(S.PureComponent);Jv=Bn,Tr(Bn,"displayName","Bar"),Tr(Bn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Tr(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=p6(n,r);if(!h)return null;var g=t.layout,v=r.type.defaultProps,m=v!==void 0?Ke(Ke({},v),r.props):r.props,b=m.dataKey,w=m.children,x=m.minPointSize,A=g==="horizontal"?o:i,y=c?A.scale.domain():null,O=w6({numericAxis:A}),T=dt(w,ec),j=f.map(function(C,k){var P,E,F,N,L,M;c?P=h6(c[u+k],y):(P=Je(C,b),Array.isArray(P)||(P=[O,P]));var W=$9(x,Jv.defaultProps.minPointSize)(P[1],k);if(g==="horizontal"){var H,Y=[o.scale(P[0]),o.scale(P[1])],$=Y[0],B=Y[1];E=Sg({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:C,index:k}),F=(H=B??$)!==null&&H!==void 0?H:void 0,N=h.size;var _=$-B;if(L=Number.isNaN(_)?0:_,M={x:E,y:o.y,width:N,height:o.height},Math.abs(W)>0&&Math.abs(L)<Math.abs(W)){var U=kt(L||W)*(Math.abs(W)-Math.abs(L));F-=U,L+=U}}else{var V=[i.scale(P[0]),i.scale(P[1])],I=V[0],z=V[1];if(E=I,F=Sg({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:C,index:k}),N=z-I,L=h.size,M={x:i.x,y:F,width:i.width,height:L},Math.abs(W)>0&&Math.abs(N)<Math.abs(W)){var q=kt(N||W)*(Math.abs(W)-Math.abs(N));N+=q}}return Ke(Ke(Ke({},C),{},{x:E,y:F,width:N,height:L,value:c?P:P[1],payload:C,background:M},T&&T[k]&&T[k].props),{},{tooltipPayload:[_g(r,C)],tooltipPosition:{x:E+N/2,y:F+L/2}})});return Ke({data:j,layout:g},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 W9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ny(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iy(n.key),n)}}function z9(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),Object.defineProperty(e,"prototype",{writable:!1}),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 Lt(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){ls(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 ls(e,t,r){return t=iy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iy(e){var t=V9(e,"string");return di(t)=="symbol"?t:t+""}function V9(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 G9=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=!!gt(c,Bn);return u.reduce(function(h,g){var v=r[g],m=v.orientation,b=v.domain,w=v.padding,x=w===void 0?{}:w,A=v.mirror,y=v.reversed,O="".concat(m).concat(A?"Mirror":""),T,j,C,k,P;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var E=b[1]-b[0],F=1/0,N=v.categoricalDomain.sort(q2);if(N.forEach(function(V,I){I>0&&(F=Math.min((V||0)-(N[I-1]||0),F))}),Number.isFinite(F)){var L=F/E,M=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(T=L*M/2),v.padding==="no-gap"){var W=Mr(t.barCategoryGap,L*M),H=L*M/2;T=H-W-(H-W)/M*W}}}a==="xAxis"?j=[n.left+(x.left||0)+(T||0),n.left+n.width-(x.right||0)-(T||0)]:a==="yAxis"?j=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(T||0),n.top+n.height-(x.bottom||0)-(T||0)]:j=v.range,y&&(j=[j[1],j[0]]);var Y=f6(v,i,d),$=Y.scale,B=Y.realScaleType;$.domain(b).range(j),d6($);var _=x6($,Lt(Lt({},v),{},{realScaleType:B}));a==="xAxis"?(P=m==="top"&&!A||m==="bottom"&&A,C=n.left,k=f[O]-P*v.height):a==="yAxis"&&(P=m==="left"&&!A||m==="right"&&A,C=f[O]-P*v.width,k=n.top);var U=Lt(Lt(Lt({},v),_),{},{realScaleType:B,x:C,y:k,scale:$,width:a==="xAxis"?n.width:v.width,height:a==="yAxis"?n.height:v.height});return U.bandSize=Fo(U,_),!v.hide&&a==="xAxis"?f[O]+=(P?-1:1)*U.height:v.hide||(f[O]+=(P?-1:1)*U.width),Lt(Lt({},h),{},ls({},g,U))},{})},oy=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)}},H9=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return oy({x:r,y:n},{x:a,y:i})},sy=function(){function e(t){W9(this,e),this.scale=t}return z9(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(sy,"EPS",1e-4);var $u=function(t){var r=Object.keys(t).reduce(function(n,a){return Lt(Lt({},n),{},ls({},a,sy.create(t[a])))},{});return Lt(Lt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return f9(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Yv(a,function(i,o){return r[o].isInRange(i)})}})};function q9(e){return(e%180+180)%180}var K9=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=q9(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)},Y9=gr,X9=ba,Z9=to;function J9(e){return function(t,r,n){var a=Object(t);if(!X9(t)){var i=Y9(r);t=Z9(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 Q9=J9,eL=Bv;function tL(e){var t=eL(e),r=t%1;return t===t?r?t-r:t:0}var rL=tL,nL=$p,aL=gr,iL=rL,oL=Math.max;function sL(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:iL(r);return a<0&&(a=oL(n+a,0)),nL(e,aL(t),a)}var lL=sL,cL=Q9,uL=lL,fL=cL(uL),dL=fL;const pL=ke(dL);var hL=Yw(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 ku=S.createContext(void 0),Mu=S.createContext(void 0),ly=S.createContext(void 0),cy=S.createContext({}),uy=S.createContext(void 0),fy=S.createContext(0),dy=S.createContext(0),py=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=hL(i);return S.createElement(ku.Provider,{value:n},S.createElement(Mu.Provider,{value:a},S.createElement(cy.Provider,{value:i},S.createElement(ly.Provider,{value:u},S.createElement(uy.Provider,{value:o},S.createElement(fy.Provider,{value:c},S.createElement(dy.Provider,{value:l},s)))))))},mL=function(){return S.useContext(uy)};function hy(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var my=function(t){var r=S.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 xAxis by id "'.concat(t,'" [').concat(cs(t),"]. ").concat(hy(r))):ht()),n},gL=function(){var t=S.useContext(ku);return mr(t)},vL=function(){var t=S.useContext(Mu),r=pL(t,function(n){return Yv(n.domain,Number.isFinite)});return r||mr(t)},gy=function(t){var r=S.useContext(Mu);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(hy(r))):ht()),n},yL=function(){var t=S.useContext(ly);return t},bL=function(){return S.useContext(cy)},Nu=function(){return S.useContext(dy)},Du=function(){return S.useContext(fy)};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 xL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wL(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,xy(n.key),n)}}function OL(e,t,r){return t&&wL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SL(e,t,r){return t=us(t),TL(e,vy()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function TL(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 AL(e)}function AL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vy=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function jL(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&&Iu(e,t)}function Iu(e,t){return Iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Iu(e,t)}function yy(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?yy(Object(r),!0).forEach(function(n){Lu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lu(e,t,r){return t=xy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xy(e){var t=PL(e,"string");return Fn(t)=="symbol"?t:t+""}function PL(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 _L(e,t){return kL(e)||$L(e,t)||CL(e,t)||EL()}function EL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
281
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CL(e,t){if(e){if(typeof e=="string")return wy(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 wy(e,t)}}function wy(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 $L(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 kL(e){if(Array.isArray(e))return 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)}var ML=function(t,r){var n;return S.isValidElement(t)?n=S.cloneElement(t,r):pe(t)?n=t(r):n=S.createElement("line",Ru({},r,{className:"recharts-reference-line-line"})),n},NL=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 g=c.y,v=t.y.apply(g,{position:o});if(Ht(c,"discard")&&!t.y.isInRange(v))return null;var m=[{x:u+d,y:v},{x:u,y:v}];return l==="left"?m.reverse():m}if(r){var b=c.x,w=t.x.apply(b,{position:o});if(Ht(c,"discard")&&!t.x.isInRange(w))return null;var x=[{x:w,y:f+h},{x:w,y:f}];return s==="top"?x.reverse():x}if(a){var A=c.segment,y=A.map(function(O){return t.apply(O,{position:o})});return Ht(c,"discard")&&n9(y,function(O){return!t.isInRange(O)})?null:y}return null};function DL(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=mL(),u=my(a),f=gy(i),d=yL();if(!c||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=$u({x:u.scale,y:f.scale}),g=Xe(t),v=Xe(r),m=n&&n.length===2,b=NL(h,g,v,m,d,e.position,u.orientation,f.orientation,e);if(!b)return null;var w=_L(b,2),x=w[0],A=x.x,y=x.y,O=w[1],T=O.x,j=O.y,C=Ht(e,"hidden")?"url(#".concat(c,")"):void 0,k=by(by({clipPath:C},de(e,!0)),{},{x1:A,y1:y,x2:T,y2:j});return S.createElement(xe,{className:ge("recharts-reference-line",s)},ML(o,k),it.renderCallByParent(e,H9({x1:A,y1:y,x2:T,y2:j})))}var Bu=function(e){function t(){return xL(this,t),SL(this,t,arguments)}return jL(t,e),OL(t,[{key:"render",value:function(){return S.createElement(DL,this.props)}}])}(S.Component);Lu(Bu,"displayName","ReferenceLine"),Lu(Bu,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Fu(){return Fu=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},Fu.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 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 Sy(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){ds(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 IL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LL(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,Ay(n.key),n)}}function RL(e,t,r){return t&&LL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BL(e,t,r){return t=fs(t),FL(e,Ty()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function FL(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 UL(e)}function UL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ty(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ty=function(){return!!e})()}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}function WL(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 ds(e,t,r){return t=Ay(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ay(e){var t=zL(e,"string");return Un(t)=="symbol"?t:t+""}function zL(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 VL=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=$u({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Ht(t,"discard")&&!o.isInRange(s)?null:s},ps=function(e){function t(){return IL(this,t),BL(this,t,arguments)}return WL(t,e),RL(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=VL(this.props);if(!f)return null;var d=f.x,h=f.y,g=this.props,v=g.shape,m=g.className,b=Ht(this.props,"hidden")?"url(#".concat(l,")"):void 0,w=Sy(Sy({clipPath:b},de(this.props,!0)),{},{cx:d,cy:h});return S.createElement(xe,{className:ge("recharts-reference-dot",m)},t.renderDot(v,w),it.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(S.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 S.isValidElement(e)?r=S.cloneElement(e,t):pe(e)?r=e(t):r=S.createElement(Jo,Fu({},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 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 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 Py(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){ms(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 GL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ey(n.key),n)}}function qL(e,t,r){return t&&HL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KL(e,t,r){return t=hs(t),YL(e,_y()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function YL(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 XL(e)}function XL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_y=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function ZL(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 ms(e,t,r){return t=Ey(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ey(e){var t=JL(e,"string");return Wn(t)=="symbol"?t:t+""}function JL(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 QL=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=$u({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},g={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(c,{position:"end"}):d.y.rangeMax};return Ht(i,"discard")&&(!d.isInRange(h)||!d.isInRange(g))?null:oy(h,g)},gs=function(e){function t(){return GL(this,t),KL(this,t,arguments)}return ZL(t,e),qL(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),g=Xe(s),v=this.props.shape;if(!f&&!d&&!h&&!g&&!v)return null;var m=QL(f,d,h,g,this.props);if(!m&&!v)return null;var b=Ht(this.props,"hidden")?"url(#".concat(u,")"):void 0;return S.createElement(xe,{className:ge("recharts-reference-area",l)},t.renderRect(v,Py(Py({clipPath:b},de(this.props,!0)),m)),it.renderCallByParent(this.props,m))}}])}(S.Component);ms(gs,"displayName","ReferenceArea"),ms(gs,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),ms(gs,"renderRect",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):pe(e)?r=e(t):r=S.createElement(Ou,Wu({},t,{className:"recharts-reference-area-rect"})),r});function Cy(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 e7(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return K9(n,r)}function t7(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 vs(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 r7(e,t){return Cy(e,t+1)}function n7(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 g=n==null?void 0:n[l];if(g===void 0)return{v:Cy(n,c)};var v=l,m,b=function(){return m===void 0&&(m=r(g,v)),m},w=g.coordinate,x=l===0||vs(e,w,b,u,s);x||(l=0,u=o,c+=1),x&&(u=w+e*(b()/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 $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 ot(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){a7(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 a7(e,t,r){return t=i7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i7(e){var t=o7(e,"string");return pi(t)=="symbol"?t:t+""}function o7(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 s7(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],g,v=function(){return g===void 0&&(g=r(h,d)),g};if(d===o-1){var m=e*(h.coordinate+e*v()/2-l);i[d]=h=ot(ot({},h),{},{tickCoord:m>0?h.coordinate-m*e:h.coordinate})}else i[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var b=vs(e,h.tickCoord,v,s,l);b&&(l=h.tickCoord-e*(v()/2+a),i[d]=ot(ot({},h),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return i}function l7(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=vs(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 g=i?s-1:s,v=function(w){var x=o[w],A,y=function(){return A===void 0&&(A=r(x,w)),A};if(w===0){var O=e*(x.coordinate-e*y()/2-l);o[w]=x=ot(ot({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[w]=x=ot(ot({},x),{},{tickCoord:x.coordinate});var T=vs(e,x.tickCoord,y,l,c);T&&(l=x.tickCoord+e*(y()/2+a),o[w]=ot(ot({},x),{},{isShow:!0}))},m=0;m<g;m++)v(m);return o}function Vu(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(te(l)||vr.isSsr)return r7(a,typeof l=="number"&&te(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",g=u&&h==="width"?Aa(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(x,A){var y=pe(c)?c(x.value,A):x.value;return h==="width"?e7(Aa(y,{fontSize:t,letterSpacing:r}),g,f):Aa(y,{fontSize:t,letterSpacing:r})[h]},m=a.length>=2?kt(a[1].coordinate-a[0].coordinate):1,b=t7(i,m,h);return l==="equidistantPreserveStart"?n7(m,b,v,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=l7(m,b,v,a,o,l==="preserveStartEnd"):d=s7(m,b,v,a,o),d.filter(function(w){return w.isShow}))}var c7=["viewBox"],u7=["viewBox"],f7=["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 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 et(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){qu(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 Gu(e,t){if(e==null)return{};var r=d7(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 d7(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 p7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function My(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,Dy(n.key),n)}}function h7(e,t,r){return t&&My(e.prototype,t),r&&My(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m7(e,t,r){return t=ys(t),g7(e,Ny()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function g7(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 v7(e)}function v7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ny(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ny=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function y7(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 qu(e,t,r){return t=Dy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dy(e){var t=b7(e,"string");return zn(t)=="symbol"?t:t+""}function b7(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 p7(this,t),n=m7(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return y7(t,e),h7(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Gu(n,c7),s=this.props,l=s.viewBox,c=Gu(s,u7);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,g,v,m,b,w,x=f?-1:1,A=n.tickSize||u,y=te(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=g=n.coordinate,m=o+ +!f*l,v=m-x*A,w=v-x*d,b=y;break;case"left":v=m=n.coordinate,g=i+ +!f*s,h=g-x*A,b=h-x*d,w=y;break;case"right":v=m=n.coordinate,g=i+ +f*s,h=g+x*A,b=h+x*d,w=y;break;default:h=g=n.coordinate,m=o+ +f*l,v=m+x*A,w=v+x*d,b=y;break}return{line:{x1:h,y1:v,x2:g,y2:m},tick:{x:b,y:w}}}},{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 S.createElement("line",Vn({},f,{className:ge("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=Vu(et(et({},this.props),{},{ticks:n}),a,i),g=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),m=de(this.props,!1),b=de(u,!1),w=et(et({},m),{},{fill:"none"},de(l,!1)),x=h.map(function(A,y){var O=o.getTickLineCoord(A),T=O.line,j=O.tick,C=et(et(et(et({textAnchor:g,verticalAnchor:v},m),{},{stroke:"none",fill:c},b),j),{},{index:y,payload:A,visibleTicksCount:h.length,tickFormatter:f});return S.createElement(xe,Vn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ga(o.props,A,y)),l&&S.createElement("line",Vn({},w,T,{className:ge("recharts-cartesian-axis-tick-line",wt(l,"className"))})),u&&t.renderTickItem(u,C,"".concat(pe(f)?f(A.value,y):A.value).concat(d||"")))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{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=Gu(f,f7),g=d;return pe(l)&&(g=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!g||!g.length?null:S.createElement(xe,{className:ge("recharts-cartesian-axis",c),ref:function(m){n.layerReference=m}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),it.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ge(a.className,"recharts-cartesian-axis-tick-value");return S.isValidElement(n)?o=S.cloneElement(n,et(et({},a),{},{className:s})):pe(n)?o=n(et(et({},a),{},{className:s})):o=S.createElement(po,Vn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(S.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 x7=["x1","y1","x2","y2","key"],w7=["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 Iy(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?Iy(Object(r),!0).forEach(function(n){O7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O7(e,t,r){return t=S7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S7(e){var t=T7(e,"string");return Kr(t)=="symbol"?t:t+""}function T7(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 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 Ly(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}var j7=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 S.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ry(e,t){var r;if(S.isValidElement(e))r=S.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=Ly(t,x7),c=de(l,!1);c.offset;var u=Ly(c,w7);r=S.createElement("line",Yr({},u,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function P7(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 Ry(a,c)});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function _7(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 Ry(a,c)});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function E7(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 g=!u[h+1],v=g?a+o-d:u[h+1]-d;if(v<=0)return null;var m=h%t.length;return S.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:i,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function C7(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 g=!u[h+1],v=g?i+s-d:u[h+1]-d;if(v<=0)return null;var m=h%n.length;return S.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:l,stroke:"none",fill:n[m],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var $7=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return wg(Vu(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)},k7=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return wg(Vu(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)},Hn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function By(e){var t,r,n,a,i,o,s=Nu(),l=Du(),c=bL(),u=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Hn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Hn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Hn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Hn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Hn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Hn.verticalFill,x:te(e.x)?e.x:c.left,y:te(e.y)?e.y:c.top,width:te(e.width)?e.width:c.width,height:te(e.height)?e.height:c.height}),f=u.x,d=u.y,h=u.width,g=u.height,v=u.syncWithTicks,m=u.horizontalValues,b=u.verticalValues,w=gL(),x=vL();if(!te(h)||h<=0||!te(g)||g<=0||!te(f)||f!==+f||!te(d)||d!==+d)return null;var A=u.verticalCoordinatesGenerator||$7,y=u.horizontalCoordinatesGenerator||k7,O=u.horizontalPoints,T=u.verticalPoints;if((!O||!O.length)&&pe(y)){var j=m&&m.length,C=y({yAxis:x?st(st({},x),{},{ticks:j?m:x.ticks}):void 0,width:s,height:l,offset:c},j?!0:v);er(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(C),"]")),Array.isArray(C)&&(O=C)}if((!T||!T.length)&&pe(A)){var k=b&&b.length,P=A({xAxis:w?st(st({},w),{},{ticks:k?b:w.ticks}):void 0,width:s,height:l,offset:c},k?!0:v);er(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(P),"]")),Array.isArray(P)&&(T=P)}return S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(j7,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),S.createElement(P7,Yr({},u,{offset:c,horizontalPoints:O,xAxis:w,yAxis:x})),S.createElement(_7,Yr({},u,{offset:c,verticalPoints:T,xAxis:w,yAxis:x})),S.createElement(E7,Yr({},u,{horizontalPoints:O})),S.createElement(C7,Yr({},u,{verticalPoints:T})))}By.displayName="CartesianGrid";var M7=["type","layout","connectNulls","ref"],N7=["key"];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 Fy(e,t){if(e==null)return{};var r=D7(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 D7(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 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 bt(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){Rt(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 Kn(e){return B7(e)||R7(e)||L7(e)||I7()}function I7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
282
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L7(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 R7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B7(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 F7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wy(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 U7(e,t,r){return t&&Wy(e.prototype,t),r&&Wy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W7(e,t,r){return t=bs(t),z7(e,zy()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function z7(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 V7(e)}function V7(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 bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function G7(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 Rt(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=H7(e,"string");return qn(t)=="symbol"?t:t+""}function H7(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)}var mi=function(e){function t(){var r;F7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=W7(this,t,[].concat(a)),Rt(r,"state",{isAnimationFinished:!0,totalLength:0}),Rt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Rt(r,"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(b,w){return b+w});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var u=Math.floor(o/c),f=o%c,d=s-o,h=[],g=0,v=0;g<l.length;v+=l[g],++g)if(v+l[g]>f){h=[].concat(Kn(l.slice(0,g)),[f-v]);break}var m=h.length%2===0?[0,d]:[d];return[].concat(Kn(t.repeat(l,u)),Kn(h),m).map(function(b){return"".concat(b,"px")}).join(", ")}),Rt(r,"id",kr("recharts-line-")),Rt(r,"pathRef",function(o){r.mainCurve=o}),Rt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Rt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return G7(t,e),U7(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(v,m){return{x:v.x,y:v.y,value:v.value,errorVal:Je(v.payload,m)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(xe,h,f.map(function(g){return S.cloneElement(g,{key:"bar-".concat(g.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(v,m){var b=bt(bt(bt({key:"dot-".concat(m),r:3},f),d),{},{index:m,cx:v.x,cy:v.y,value:v.value,dataKey:u,payload:v.payload,points:c});return t.renderDotItem(l,b)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(xe,hi({className:"recharts-line-dots",key:"dots"},g),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=Fy(s,M7),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 S.createElement(Hr,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,g=o.animateNewValues,v=o.width,m=o.height,b=this.state,w=b.prevPoints,x=b.totalLength;return S.createElement(It,{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(w){var O=w.length/s.length,T=s.map(function(E,F){var N=Math.floor(F*O);if(w[N]){var L=w[N],M=ze(L.x,E.x),W=ze(L.y,E.y);return bt(bt({},E),{},{x:M(y),y:W(y)})}if(g){var H=ze(v*2,E.x),Y=ze(m/2,E.y);return bt(bt({},E),{},{x:H(y),y:Y(y)})}return bt(bt({},E),{},{x:E.x,y:E.y})});return i.renderCurveStatically(T,n,a)}var j=ze(0,x),C=j(y),k;if(l){var P="".concat(l).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});k=i.getStrokeDasharray(C,x,P)}else k=i.generateSimpleStrokeDasharray(x,C);return i.renderCurveStatically(s,n,a,{strokeDasharray:k})})}},{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||!Ur(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,g=a.height,v=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,w=s.length===1,x=ge("recharts-line",l),A=c&&c.allowDataOverflow,y=u&&u.allowDataOverflow,O=A||y,T=fe(m)?this.id:m,j=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=j.r,k=C===void 0?3:C,P=j.strokeWidth,E=P===void 0?2:P,F=pd(o)?o:{},N=F.clipDot,L=N===void 0?!0:N,M=k*2+E;return S.createElement(xe,{className:x},A||y?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:A?d:d-h/2,y:y?f:f-g/2,width:A?h:h*2,height:y?g:g*2})),!L&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:d-M/2,y:f-M/2,width:h+M,height:g+M}))):null,!w&&this.renderCurve(O,T),this.renderErrorBar(O,T),(w||o)&&this.renderDots(O,L,T),(!v||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(S.isValidElement(n))i=S.cloneElement(n,a);else if(pe(n))i=n(a);else{var o=a.key,s=Fy(a,N7),l=ge("recharts-line-dot",typeof n!="boolean"?n.className:"");i=S.createElement(Jo,hi({key:o},s,{className:l}))}return i}}])}(S.PureComponent);Rt(mi,"displayName","Line"),Rt(mi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!vr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Rt(mi,"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 g=Je(d,o);return u==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(g)?null:n.scale(g),value:g,payload:d}:{x:fe(g)?null:r.scale(g),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:g,payload:d}});return bt({points:f,layout:u},c)});var q7=["layout","type","stroke","connectNulls","isRange","ref"],K7=["key"],Gy;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 Hy(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}function Xr(){return Xr=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},Xr.apply(this,arguments)}function qy(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 Ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qy(Object(r),!0).forEach(function(n){qt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ky(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,Xy(n.key),n)}}function Z7(e,t,r){return t&&Ky(e.prototype,t),r&&Ky(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function J7(e,t,r){return t=xs(t),Q7(e,Yy()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function Q7(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 eR(e)}function eR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yy=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function tR(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 qt(e,t,r){return t=Xy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xy(e){var t=rR(e,"string");return Yn(t)=="symbol"?t:t+""}function rR(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 jr=function(e){function t(){var r;X7(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=J7(this,t,[].concat(a)),qt(r,"state",{isAnimationFinished:!0}),qt(r,"id",kr("recharts-area-")),qt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pe(o)&&o()}),qt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pe(o)&&o()}),r}return tR(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,c=l.dot,u=l.points,f=l.dataKey,d=de(this.props,!1),h=de(c,!0),g=u.map(function(m,b){var w=Ar(Ar(Ar({key:"dot-".concat(b),r:3},d),h),{},{index:b,cx:m.x,cy:m.y,dataKey:f,value:m.value,payload:m.payload,points:u});return t.renderDotItem(c,w)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(xe,Xr({className:"recharts-area-dots"},v),g)}},{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=wr(o.map(function(d){return d.y||0}));return te(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(wr(i.map(function(d){return d.y||0})),f)),te(f)?S.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=wr(o.map(function(d){return d.x||0}));return te(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(wr(i.map(function(d){return d.x||0})),f)),te(f)?S.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=Hy(s,q7);return S.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},S.createElement(Hr,Xr({},de(h,!0),{points:n,connectNulls:f,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&S.createElement(Hr,Xr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:n})),u!=="none"&&d&&S.createElement(Hr,Xr({},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,g=this.state,v=g.prevPoints,m=g.prevBaseLine;return S.createElement(It,{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(b){var w=b.t;if(v){var x=v.length/s.length,A=s.map(function(j,C){var k=Math.floor(C*x);if(v[k]){var P=v[k],E=ze(P.x,j.x),F=ze(P.y,j.y);return Ar(Ar({},j),{},{x:E(w),y:F(w)})}return j}),y;if(te(l)&&typeof l=="number"){var O=ze(m,l);y=O(w)}else if(fe(l)||cn(l)){var T=ze(m,0);y=T(w)}else y=l.map(function(j,C){var k=Math.floor(C*x);if(m[k]){var P=m[k],E=ze(P.x,j.x),F=ze(P.y,j.y);return Ar(Ar({},j),{},{x:E(w),y:F(w)})}return j});return i.renderAreaStatically(A,y,n,a)}return S.createElement(xe,null,S.createElement("defs",null,S.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(w))),S.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||!Ur(u,o)||!Ur(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,g=a.height,v=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,w=s.length===1,x=ge("recharts-area",l),A=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,O=A||y,T=fe(m)?this.id:m,j=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=j.r,k=C===void 0?3:C,P=j.strokeWidth,E=P===void 0?2:P,F=pd(o)?o:{},N=F.clipDot,L=N===void 0?!0:N,M=k*2+E;return S.createElement(xe,{className:x},A||y?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:A?u:u-h/2,y:y?c:c-g/2,width:A?h:h*2,height:y?g:g*2})),!L&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:u-M/2,y:c-M/2,width:h+M,height:g+M}))):null,w?null:this.renderArea(O,T),(o||w)&&this.renderDots(O,L,T),(!v||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}}])}(S.PureComponent);Gy=jr,qt(jr,"displayName","Area"),qt(jr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),qt(jr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(te(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]}),qt(jr,"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,g=c&&c.length,v=Gy.getBaseValue(t,r,n,a),m=h==="horizontal",b=!1,w=f.map(function(A,y){var O;g?O=c[u+y]:(O=Je(A,l),Array.isArray(O)?b=!0:O=[v,O]);var T=O[1]==null||g&&Je(A,l)==null;return m?{x:Mn({axis:n,ticks:i,bandSize:s,entry:A,index:y}),y:T?null:a.scale(O[1]),value:O,payload:A}:{x:T?null:n.scale(O[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:A,index:y}),value:O,payload:A}}),x;return g||b?x=w.map(function(A){var y=Array.isArray(A.value)?A.value[0]:null;return m?{x:A.x,y:y!=null&&A.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:A.y}}):x=m?a.scale(v):n.scale(v),Ar({points:w,baseLine:x,layout:h,isRange:b},d)}),qt(jr,"renderDotItem",function(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(pe(e))r=e(t);else{var n=ge("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Hy(t,K7);r=S.createElement(Jo,Xr({},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 nR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aR(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,Qy(n.key),n)}}function iR(e,t,r){return t&&aR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oR(e,t,r){return t=ws(t),sR(e,Zy()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function sR(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 lR(e)}function lR(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 ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function cR(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 Jy(e,t,r){return t=Qy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qy(e){var t=uR(e,"string");return Xn(t)=="symbol"?t:t+""}function uR(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 nR(this,t),oR(this,t,arguments)}return cR(t,e),iR(t,[{key:"render",value:function(){return null}}])}(xt.Component);Jy(Os,"displayName","ZAxis"),Jy(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var fR=["option","isActive"];function gi(){return gi=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},gi.apply(this,arguments)}function dR(e,t){if(e==null)return{};var r=pR(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 pR(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 hR(e){var t=e.option,r=e.isActive,n=dR(e,fR);return typeof t=="string"?xt.createElement(Au,gi({option:xt.createElement(Xi,gi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(Au,gi({option:t,isActive:r,shapeType:"symbols"},n))}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 vi(){return vi=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},vi.apply(this,arguments)}function e0(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?e0(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t0(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,n0(n.key),n)}}function gR(e,t,r){return t&&t0(e.prototype,t),r&&t0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vR(e,t,r){return t=Ss(t),yR(e,r0()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function yR(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 bR(e)}function bR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r0=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function xR(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=n0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n0(e){var t=wR(e,"string");return Zn(t)=="symbol"?t:t+""}function wR(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts=function(e){function t(){var r;mR(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=vR(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",kr("recharts-scatter-")),r}return xR(t,e),gR(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,g=_t(_t({},c),u);return S.createElement(xe,vi({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)},ga(a.props,u,f),{role:"img"}),S.createElement(hR,vi({option:h,isActive:d,key:"symbol-".concat(f)},g)))})}},{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 S.createElement(It,{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,g=i.map(function(v,m){var b=f&&f[m];if(b){var w=ze(b.cx,v.cx),x=ze(b.cy,v.cy),A=ze(b.size,v.size);return _t(_t({},v),{},{cx:w(h),cy:x(h),size:A(h)})}var y=ze(0,v.size);return _t(_t({},v),{},{size:y(h)})});return S.createElement(xe,null,n.renderSymbolsStatically(g))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Ur(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,g=d.dataKey;return S.cloneElement(u,{key:"".concat(h,"-").concat(g,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(m,b){return{x:m.cx,y:m.cy,value:h==="x"?+m.node.x:+m.node.y,errorVal:Je(m,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),c=de(i,!1),u,f;if(o==="joint")u=a.map(function(x){return{x:x.cx,y:x.cy}});else if(o==="fitting"){var d=H2(a),h=d.xmin,g=d.xmax,v=d.a,m=d.b,b=function(A){return v*A+m};u=[{x:h,y:b(h)},{x:g,y:b(g)}]}var w=_t(_t(_t({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return S.isValidElement(i)?f=S.cloneElement(i,w):pe(i)?f=i(w):f=S.createElement(Hr,vi({},w,{type:s})),S.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,g=n.id,v=n.isAnimationActive;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,b=ge("recharts-scatter",s),w=l&&l.allowDataOverflow,x=c&&c.allowDataOverflow,A=w||x,y=fe(g)?this.id:g;return S.createElement(xe,{className:b,clipPath:A?"url(#clipPath-".concat(y,")"):null},w||x?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(y)},S.createElement("rect",{x:w?u:u-d/2,y:x?f:f-h/2,width:w?d:d*2,height:x?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),S.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!v||m)&&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}}])}(S.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:!vr.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,ec),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,g=n?n.range:Os.defaultProps.range,v=g&&g[0],m=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,w=i.map(function(x,A){var y=Je(x,f),O=Je(x,d),T=!fe(h)&&Je(x,h)||"-",j=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:x,dataKey:f,type:c},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:O,payload:x,dataKey:d,type:c}];T!=="-"&&j.push({name:n.name||n.dataKey,unit:n.unit||"",value:T,payload:x,dataKey:h,type:c});var C=Mn({axis:t,ticks:o,bandSize:m,entry:x,index:A,dataKey:f}),k=Mn({axis:r,ticks:s,bandSize:b,entry:x,index:A,dataKey:d}),P=T!=="-"?n.scale(T):v,E=Math.sqrt(Math.max(P,0)/Math.PI);return _t(_t({},x),{},{cx:C,cy:k,x:C-E,y:k-E,xAxis:t,yAxis:r,zAxis:n,width:2*E,height:2*E,size:P,node:{x:y,y:O,z:T},tooltipPayload:j,tooltipPosition:{x:C,y:k},payload:x},u&&u[A]&&u[A].props)});return _t({points:w},l)});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 OR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(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,o0(n.key),n)}}function TR(e,t,r){return t&&SR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AR(e,t,r){return t=As(t),jR(e,a0()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function jR(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 PR(e)}function PR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a0=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function _R(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&&Qu(e,t)}function Qu(e,t){return Qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Qu(e,t)}function i0(e,t,r){return t=o0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o0(e){var t=ER(e,"string");return Jn(t)=="symbol"?t:t+""}function ER(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 String(e)}function ef(){return ef=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},ef.apply(this,arguments)}function CR(e){var t=e.xAxisId,r=Nu(),n=Du(),a=my(t);return a==null?null:xt.createElement(Gn,ef({},a,{className:ge("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 js=function(e){function t(){return OR(this,t),AR(this,t,arguments)}return _R(t,e),TR(t,[{key:"render",value:function(){return xt.createElement(CR,this.props)}}])}(xt.Component);i0(js,"displayName","XAxis"),i0(js,"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 $R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kR(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,c0(n.key),n)}}function MR(e,t,r){return t&&kR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NR(e,t,r){return t=Ps(t),DR(e,s0()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function DR(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 IR(e)}function IR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s0=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function LR(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&&tf(e,t)}function tf(e,t){return tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tf(e,t)}function l0(e,t,r){return t=c0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c0(e){var t=RR(e,"string");return Qn(t)=="symbol"?t:t+""}function RR(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 rf(){return rf=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},rf.apply(this,arguments)}var BR=function(t){var r=t.yAxisId,n=Nu(),a=Du(),i=gy(r);return i==null?null:xt.createElement(Gn,rf({},i,{className:ge("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 $R(this,t),NR(this,t,arguments)}return LR(t,e),MR(t,[{key:"render",value:function(){return xt.createElement(BR,this.props)}}])}(xt.Component);l0(_s,"displayName","YAxis"),l0(_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 u0(e){return zR(e)||WR(e)||UR(e)||FR()}function FR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
283
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UR(e,t){if(e){if(typeof e=="string")return nf(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 nf(e,t)}}function WR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zR(e){if(Array.isArray(e))return nf(e)}function nf(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 af=function(t,r,n,a,i){var o=dt(t,Bu),s=dt(t,ps),l=[].concat(u0(o),u0(s)),c=dt(t,gs),u="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(v,m){if(m.props[u]===n&&Ht(m.props,"extendDomain")&&te(m.props[f])){var b=m.props[f];return[Math.min(v[0],b),Math.max(v[1],b)]}return v},d)),c.length){var h="".concat(f,"1"),g="".concat(f,"2");d=c.reduce(function(v,m){if(m.props[u]===n&&Ht(m.props,"extendDomain")&&te(m.props[h])&&te(m.props[g])){var b=m.props[h],w=m.props[g];return[Math.min(v[0],b,w),Math.max(v[1],b,w)]}return v},d)}return i&&i.length&&(d=i.reduce(function(v,m){return te(m)?[Math.min(v[0],m),Math.max(v[1],m)]:v},d)),d},f0={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),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],h]:l._events[g].push(h):(l._events[g]=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,g=new Array(h);d<h;d++)g[d]=f[d].fn;return g},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,g){var v=r?r+c:c;if(!this._events[v])return!1;var m=this._events[v],b=arguments.length,w,x;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,u),!0;case 3:return m.fn.call(m.context,u,f),!0;case 4:return m.fn.call(m.context,u,f,d),!0;case 5:return m.fn.call(m.context,u,f,d,h),!0;case 6:return m.fn.call(m.context,u,f,d,h,g),!0}for(x=1,w=new Array(b-1);x<b;x++)w[x-1]=arguments[x];m.fn.apply(m.context,w)}else{var A=m.length,y;for(x=0;x<A;x++)switch(m[x].once&&this.removeListener(c,m[x].fn,void 0,!0),b){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,u);break;case 3:m[x].fn.call(m[x].context,u,f);break;case 4:m[x].fn.call(m[x].context,u,f,d);break;default:if(!w)for(y=1,w=new Array(b-1);y<b;y++)w[y-1]=arguments[y];m[x].fn.apply(m[x].context,w)}}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 g=this._events[h];if(g.fn)g.fn===u&&(!d||g.once)&&(!f||g.context===f)&&o(this,h);else{for(var v=0,m=[],b=g.length;v<b;v++)(g[v].fn!==u||d&&!g[v].once||f&&g[v].context!==f)&&m.push(g[v]);m.length?this._events[h]=m.length===1?m[0]:m: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})(f0);var VR=f0.exports;const GR=ke(VR);var of=new GR,sf="recharts.syncMouseEvents";function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function HR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qR(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,d0(n.key),n)}}function KR(e,t,r){return t&&qR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t,r){return t=d0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d0(e){var t=YR(e,"string");return yi(t)=="symbol"?t:t+""}function YR(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var XR=function(){function e(){HR(this,e),lf(this,"activeIndex",0),lf(this,"coordinateList",[]),lf(this,"layout","horizontal")}return KR(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 ZR(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&&te(n)&&te(a))return!0}return!1}function JR(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 p0(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 QR(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 p0(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 h0(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?h0(Object(r),!0).forEach(function(n){eB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eB(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=rB(e,"string");return bi(t)=="symbol"?t:t+""}function rB(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 nB(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 g,v=Hr;if(d==="ScatterChart")g=o,v=_D;else if(d==="BarChart")g=JR(f,o,l,u),v=Ou;else if(f==="radial"){var m=p0(o),b=m.cx,w=m.cy,x=m.radius,A=m.startAngle,y=m.endAngle;g={cx:b,cy:w,startAngle:A,endAngle:y,innerRadius:x,outerRadius:x},v=Fg}else g={points:QR(f,o,l)},v=Hr;var O=Es(Es(Es(Es({stroke:"#ccc",pointerEvents:"none"},l),g),de(h,!1)),{},{payload:s,payloadIndex:c,className:ge("recharts-tooltip-cursor",h.className)});return S.isValidElement(h)?S.cloneElement(h,O):S.createElement(v,O)}var aB=["item"],iB=["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 m0(e,t){return lB(e)||sB(e,t)||y0(e,t)||oB()}function oB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
284
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sB(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 lB(e){if(Array.isArray(e))return e}function g0(e,t){if(e==null)return{};var r=cB(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 cB(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 uB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fB(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,x0(n.key),n)}}function dB(e,t,r){return t&&fB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pB(e,t,r){return t=Cs(t),hB(e,v0()?Reflect.construct(t,r||[],Cs(e).constructor):t.apply(e,r))}function hB(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 mB(e)}function mB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v0=function(){return!!e})()}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}function gB(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&&cf(e,t)}function cf(e,t){return cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cf(e,t)}function ra(e){return bB(e)||yB(e)||y0(e)||vB()}function vB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
285
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y0(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 yB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bB(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 b0(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 K(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(r),!0).forEach(function(n){le(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function le(e,t,r){return t=x0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x0(e){var t=xB(e,"string");return ea(t)=="symbol"?t:t+""}function xB(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 wB={xAxis:["bottom","top"],yAxis:["left","right"]},OB={width:"100%",height:"100%"},w0={x:0,y:0};function $s(e){return e}var SB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},TB=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 K(K(K({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return K(K(K({},a),nt(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return w0},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&&te(a)&&te(i)?t.slice(a,i+1):[]};function O0(e){return e==="number"?[0,"auto"]:void 0}var ff=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),[_g(c,d)]):l},[])},S0=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=SB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=i6(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,d=ff(t,r,u,f),h=TB(n,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},AB=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=xg(u,i);return n.reduce(function(g,v){var m,b=v.type.defaultProps!==void 0?K(K({},v.type.defaultProps),v.props):v.props,w=b.type,x=b.dataKey,A=b.allowDataOverflow,y=b.allowDuplicatedCategory,O=b.scale,T=b.ticks,j=b.includeHidden,C=b[o];if(g[C])return g;var k=ks(t.data,{graphicalItems:a.filter(function(_){var U,V=o in _.props?_.props[o]:(U=_.type.defaultProps)===null||U===void 0?void 0:U[o];return V===C}),dataStartIndex:l,dataEndIndex:c}),P=k.length,E,F,N;ZR(b.domain,A,w)&&(E=Qc(b.domain,null,A),h&&(w==="number"||O!=="auto")&&(N=Ga(k,x,"category")));var L=O0(w);if(!E||E.length===0){var M,W=(M=b.domain)!==null&&M!==void 0?M:L;if(x){if(E=Ga(k,x,w),w==="category"&&h){var H=G2(E);y&&H?(F=E,E=ns(0,P)):y||(E=Pg(W,E,v).reduce(function(_,U){return _.indexOf(U)>=0?_:[].concat(ra(_),[U])},[]))}else if(w==="category")y?E=E.filter(function(_){return _!==""&&!fe(_)}):E=Pg(W,E,v).reduce(function(_,U){return _.indexOf(U)>=0||U===""||fe(U)?_:[].concat(ra(_),[U])},[]);else if(w==="number"){var Y=u6(k,a.filter(function(_){var U,V,I=o in _.props?_.props[o]:(U=_.type.defaultProps)===null||U===void 0?void 0:U[o],z="hide"in _.props?_.props.hide:(V=_.type.defaultProps)===null||V===void 0?void 0:V.hide;return I===C&&(j||!z)}),x,i,u);Y&&(E=Y)}h&&(w==="number"||O!=="auto")&&(N=Ga(k,x,"category"))}else h?E=ns(0,P):s&&s[C]&&s[C].hasStack&&w==="number"?E=d==="expand"?[0,1]:Tg(s[C].stackGroups,l,c):E=bg(k,a.filter(function(_){var U=o in _.props?_.props[o]:_.type.defaultProps[o],V="hide"in _.props?_.props.hide:_.type.defaultProps.hide;return U===C&&(j||!V)}),w,u,!0);if(w==="number")E=af(f,E,C,i,T),W&&(E=Qc(W,E,A));else if(w==="category"&&W){var $=W,B=E.every(function(_){return $.indexOf(_)>=0});B&&(E=$)}}return K(K({},g),{},le({},C,K(K({},b),{},{axisType:i,domain:E,categoricalDomain:N,duplicateDomain:F,originalDomain:(m=b.domain)!==null&&m!==void 0?m:L,isCategorical:h,layout:u})))},{})},jB=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,g=xg(u,i),v=-1;return n.reduce(function(m,b){var w=b.type.defaultProps!==void 0?K(K({},b.type.defaultProps),b.props):b.props,x=w[o],A=O0("number");if(!m[x]){v++;var y;return g?y=ns(0,h):s&&s[x]&&s[x].hasStack?(y=Tg(s[x].stackGroups,l,c),y=af(f,y,x,i)):(y=Qc(A,bg(d,n.filter(function(O){var T,j,C=o in O.props?O.props[o]:(T=O.type.defaultProps)===null||T===void 0?void 0:T[o],k="hide"in O.props?O.props.hide:(j=O.type.defaultProps)===null||j===void 0?void 0:j.hide;return C===x&&!k}),"number",u),a.defaultProps.allowDataOverflow),y=af(f,y,x,i)),K(K({},m),{},le({},x,K(K({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(wB,"".concat(i,".").concat(v%2),null),domain:y,originalDomain:A,isCategorical:g,layout:u})))}return m},{})},PB=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=AB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(h=jB(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},_B=function(t){var r=mr(t),n=cr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Hl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},T0=function(t){var r=t.children,n=t.defaultShowTooltip,a=gt(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}},EB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},A0=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"}},CB=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=gt(f,In),g=gt(f,vn),v=Object.keys(l).reduce(function(y,O){var T=l[O],j=T.orientation;return!T.mirror&&!T.hide?K(K({},y),{},le({},j,y[j]+T.width)):y},{left:d.left||0,right:d.right||0}),m=Object.keys(o).reduce(function(y,O){var T=o[O],j=T.orientation;return!T.mirror&&!T.hide?K(K({},y),{},le({},j,wt(y,"".concat(j))+T.height)):y},{top:d.top||0,bottom:d.bottom||0}),b=K(K({},m),v),w=b.bottom;h&&(b.bottom+=h.props.height||In.defaultProps.height),g&&r&&(b=l6(b,a,n,r));var x=c-b.left-b.right,A=u-b.top-b.bottom;return K(K({brushBottom:w},b),{},{width:Math.max(x,0),height:Math.max(A,0)})},$B=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},kB=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(b,w){var x=w.graphicalItems,A=w.stackGroups,y=w.offset,O=w.updateId,T=w.dataStartIndex,j=w.dataEndIndex,C=b.barSize,k=b.layout,P=b.barGap,E=b.barCategoryGap,F=b.maxBarSize,N=A0(k),L=N.numericAxisName,M=N.cateAxisName,W=EB(x),H=[];return x.forEach(function(Y,$){var B=ks(b.data,{graphicalItems:[Y],dataStartIndex:T,dataEndIndex:j}),_=Y.type.defaultProps!==void 0?K(K({},Y.type.defaultProps),Y.props):Y.props,U=_.dataKey,V=_.maxBarSize,I=_["".concat(L,"Id")],z=_["".concat(M,"Id")],q={},Q=l.reduce(function(Ge,ct){var Pi,_i,oa=w["".concat(ct.axisType,"Map")],Ei=_["".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((Pi=Y==null||(_i=Y.type)===null||_i===void 0?void 0:_i.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ci=oa[Ei];return K(K({},Ge),{},le(le({},ct.axisType,Ci),"".concat(ct.axisType,"Ticks"),cr(Ci)))},q),G=Q[M],Z=Q["".concat(M,"Ticks")],ee=A&&A[I]&&A[I].hasStack&&O6(Y,A[I].stackGroups),R=Qt(Y.type).indexOf("Bar")>=0,oe=Fo(G,Z),X=[],ce=W&&o6({barSize:C,stackGroups:A,totalSize:$B(Q,M)});if(R){var re,me,We=fe(V)?F:V,Be=(re=(me=Fo(G,Z,!0))!==null&&me!==void 0?me:We)!==null&&re!==void 0?re:0;X=s6({barGap:P,barCategoryGap:E,bandSize:Be!==oe?Be:oe,sizeList:ce[z],maxBarSize:We}),Be!==oe&&(X=X.map(function(Ge){return K(K({},Ge),{},{position:K(K({},Ge.position),{},{offset:Ge.position.offset-Be/2})})}))}var Fe=Y&&Y.type&&Y.type.getComposedData;Fe&&H.push({props:K(K({},Fe(K(K({},Q),{},{displayedData:B,props:b,dataKey:U,item:Y,bandSize:oe,barPosition:X,offset:y,stackedData:ee,layout:k,dataStartIndex:T,dataEndIndex:j}))),{},le(le(le({key:Y.key||"item-".concat($)},L,Q[L]),M,Q[M]),"animationId",O)),childIndex:aO(Y,b.children),item:Y})}),H},h=function(b,w){var x=b.props,A=b.dataStartIndex,y=b.dataEndIndex,O=b.updateId;if(!dd({props:x}))return null;var T=x.children,j=x.layout,C=x.stackOffset,k=x.data,P=x.reverseStackOrder,E=A0(j),F=E.numericAxisName,N=E.cateAxisName,L=dt(T,n),M=b6(k,L,"".concat(F,"Id"),"".concat(N,"Id"),C,P),W=l.reduce(function(_,U){var V="".concat(U.axisType,"Map");return K(K({},_),{},le({},V,PB(x,K(K({},U),{},{graphicalItems:L,stackGroups:U.axisType===F&&M,dataStartIndex:A,dataEndIndex:y}))))},{}),H=CB(K(K({},W),{},{props:x,graphicalItems:L}),w==null?void 0:w.legendBBox);Object.keys(W).forEach(function(_){W[_]=u(x,W[_],H,_.replace("Map",""),r)});var Y=W["".concat(N,"Map")],$=_B(Y),B=d(x,K(K({},W),{},{dataStartIndex:A,dataEndIndex:y,updateId:O,graphicalItems:L,stackGroups:M,offset:H}));return K(K({formattedGraphicalItems:B,graphicalItems:L,offset:H,stackGroups:M},$),W)},g=function(m){function b(w){var x,A,y;return uB(this,b),y=pB(this,b,[w]),le(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),le(y,"accessibilityManager",new XR),le(y,"handleLegendBBoxUpdate",function(O){if(O){var T=y.state,j=T.dataStartIndex,C=T.dataEndIndex,k=T.updateId;y.setState(K({legendBBox:O},h({props:y.props,dataStartIndex:j,dataEndIndex:C,updateId:k},K(K({},y.state),{},{legendBBox:O}))))}}),le(y,"handleReceiveSyncEvent",function(O,T,j){if(y.props.syncId===O){if(j===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(T)}}),le(y,"handleBrushChange",function(O){var T=O.startIndex,j=O.endIndex;if(T!==y.state.dataStartIndex||j!==y.state.dataEndIndex){var C=y.state.updateId;y.setState(function(){return K({dataStartIndex:T,dataEndIndex:j},h({props:y.props,dataStartIndex:T,dataEndIndex:j,updateId:C},y.state))}),y.triggerSyncEvent({dataStartIndex:T,dataEndIndex:j})}}),le(y,"handleMouseEnter",function(O){var T=y.getMouseInfo(O);if(T){var j=K(K({},T),{},{isTooltipActive:!0});y.setState(j),y.triggerSyncEvent(j);var C=y.props.onMouseEnter;pe(C)&&C(j,O)}}),le(y,"triggeredAfterMouseMove",function(O){var T=y.getMouseInfo(O),j=T?K(K({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(j),y.triggerSyncEvent(j);var C=y.props.onMouseMove;pe(C)&&C(j,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 T={isTooltipActive:!1};y.setState(T),y.triggerSyncEvent(T);var j=y.props.onMouseLeave;pe(j)&&j(T,O)}),le(y,"handleOuterEvent",function(O){var T=nO(O),j=wt(y.props,"".concat(T));if(T&&pe(j)){var C,k;/.*touch.*/i.test(T)?k=y.getMouseInfo(O.changedTouches[0]):k=y.getMouseInfo(O),j((C=k)!==null&&C!==void 0?C:{},O)}}),le(y,"handleClick",function(O){var T=y.getMouseInfo(O);if(T){var j=K(K({},T),{},{isTooltipActive:!0});y.setState(j),y.triggerSyncEvent(j);var C=y.props.onClick;pe(C)&&C(j,O)}}),le(y,"handleMouseDown",function(O){var T=y.props.onMouseDown;if(pe(T)){var j=y.getMouseInfo(O);T(j,O)}}),le(y,"handleMouseUp",function(O){var T=y.props.onMouseUp;if(pe(T)){var j=y.getMouseInfo(O);T(j,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 T=y.props.onDoubleClick;if(pe(T)){var j=y.getMouseInfo(O);T(j,O)}}),le(y,"handleContextMenu",function(O){var T=y.props.onContextMenu;if(pe(T)){var j=y.getMouseInfo(O);T(j,O)}}),le(y,"triggerSyncEvent",function(O){y.props.syncId!==void 0&&of.emit(sf,y.props.syncId,O,y.eventEmitterSymbol)}),le(y,"applySyncEvent",function(O){var T=y.props,j=T.layout,C=T.syncMethod,k=y.state.updateId,P=O.dataStartIndex,E=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)y.setState(K({dataStartIndex:P,dataEndIndex:E},h({props:y.props,dataStartIndex:P,dataEndIndex:E,updateId:k},y.state)));else if(O.activeTooltipIndex!==void 0){var F=O.chartX,N=O.chartY,L=O.activeTooltipIndex,M=y.state,W=M.offset,H=M.tooltipTicks;if(!W)return;if(typeof C=="function")L=C(H,O);else if(C==="value"){L=-1;for(var Y=0;Y<H.length;Y++)if(H[Y].value===O.activeLabel){L=Y;break}}var $=K(K({},W),{},{x:W.left,y:W.top}),B=Math.min(F,$.x+$.width),_=Math.min(N,$.y+$.height),U=H[L]&&H[L].value,V=ff(y.state,y.props.data,L),I=H[L]?{x:j==="horizontal"?H[L].coordinate:B,y:j==="horizontal"?_:H[L].coordinate}:w0;y.setState(K(K({},O),{},{activeLabel:U,activeCoordinate:I,activePayload:V,activeTooltipIndex:L}))}else y.setState(O)}),le(y,"renderCursor",function(O){var T,j=y.state,C=j.isTooltipActive,k=j.activeCoordinate,P=j.activePayload,E=j.offset,F=j.activeTooltipIndex,N=j.tooltipAxisBandSize,L=y.getTooltipEventType(),M=(T=O.props.active)!==null&&T!==void 0?T:C,W=y.props.layout,H=O.key||"_recharts-cursor";return S.createElement(nB,{key:H,activeCoordinate:k,activePayload:P,activeTooltipIndex:F,chartName:r,element:O,isActive:M,layout:W,offset:E,tooltipAxisBandSize:N,tooltipEventType:L})}),le(y,"renderPolarAxis",function(O,T,j){var C=wt(O,"type.axisType"),k=wt(y.state,"".concat(C,"Map")),P=O.type.defaultProps,E=P!==void 0?K(K({},P),O.props):O.props,F=k&&k[E["".concat(C,"Id")]];return S.cloneElement(O,K(K({},F),{},{className:ge(C,F.className),key:O.key||"".concat(T,"-").concat(j),ticks:cr(F,!0)}))}),le(y,"renderPolarGrid",function(O){var T=O.props,j=T.radialLines,C=T.polarAngles,k=T.polarRadius,P=y.state,E=P.radiusAxisMap,F=P.angleAxisMap,N=mr(E),L=mr(F),M=L.cx,W=L.cy,H=L.innerRadius,Y=L.outerRadius;return S.cloneElement(O,{polarAngles:Array.isArray(C)?C:cr(L,!0).map(function($){return $.coordinate}),polarRadius:Array.isArray(k)?k:cr(N,!0).map(function($){return $.coordinate}),cx:M,cy:W,innerRadius:H,outerRadius:Y,key:O.key||"polar-grid",radialLines:j})}),le(y,"renderLegend",function(){var O=y.state.formattedGraphicalItems,T=y.props,j=T.children,C=T.width,k=T.height,P=y.props.margin||{},E=C-(P.left||0)-(P.right||0),F=mg({children:j,formattedGraphicalItems:O,legendWidth:E,legendContent:c});if(!F)return null;var N=F.item,L=g0(F,aB);return S.cloneElement(N,K(K({},L),{},{chartWidth:C,chartHeight:k,margin:P,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),le(y,"renderTooltip",function(){var O,T=y.props,j=T.children,C=T.accessibilityLayer,k=gt(j,Ut);if(!k)return null;var P=y.state,E=P.isTooltipActive,F=P.activeCoordinate,N=P.activePayload,L=P.activeLabel,M=P.offset,W=(O=k.props.active)!==null&&O!==void 0?O:E;return S.cloneElement(k,{viewBox:K(K({},M),{},{x:M.left,y:M.top}),active:W,label:L,payload:W?N:[],coordinate:F,accessibilityLayer:C})}),le(y,"renderBrush",function(O){var T=y.props,j=T.margin,C=T.data,k=y.state,P=k.offset,E=k.dataStartIndex,F=k.dataEndIndex,N=k.updateId;return S.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,O.props.onChange),data:C,x:te(O.props.x)?O.props.x:P.left,y:te(O.props.y)?O.props.y:P.top+P.height+P.brushBottom-(j.bottom||0),width:te(O.props.width)?O.props.width:P.width,startIndex:E,endIndex:F,updateId:"brush-".concat(N)})}),le(y,"renderReferenceElement",function(O,T,j){if(!O)return null;var C=y,k=C.clipPathId,P=y.state,E=P.xAxisMap,F=P.yAxisMap,N=P.offset,L=O.type.defaultProps||{},M=O.props,W=M.xAxisId,H=W===void 0?L.xAxisId:W,Y=M.yAxisId,$=Y===void 0?L.yAxisId:Y;return S.cloneElement(O,{key:O.key||"".concat(T,"-").concat(j),xAxis:E[H],yAxis:F[$],viewBox:{x:N.left,y:N.top,width:N.width,height:N.height},clipPathId:k})}),le(y,"renderActivePoints",function(O){var T=O.item,j=O.activePoint,C=O.basePoint,k=O.childIndex,P=O.isRange,E=[],F=T.props.key,N=T.item.type.defaultProps!==void 0?K(K({},T.item.type.defaultProps),T.item.props):T.item.props,L=N.activeDot,M=N.dataKey,W=K(K({index:k,dataKey:M,cx:j.x,cy:j.y,r:4,fill:Zc(T.item),strokeWidth:2,stroke:"#fff",payload:j.payload,value:j.value},de(L,!1)),Bi(L));return E.push(b.renderActiveDot(L,W,"".concat(F,"-activePoint-").concat(k))),C?E.push(b.renderActiveDot(L,K(K({},W),{},{cx:C.x,cy:C.y}),"".concat(F,"-basePoint-").concat(k))):P&&E.push(null),E}),le(y,"renderGraphicChild",function(O,T,j){var C=y.filterFormatItem(O,T,j);if(!C)return null;var k=y.getTooltipEventType(),P=y.state,E=P.isTooltipActive,F=P.tooltipAxis,N=P.activeTooltipIndex,L=P.activeLabel,M=y.props.children,W=gt(M,Ut),H=C.props,Y=H.points,$=H.isRange,B=H.baseLine,_=C.item.type.defaultProps!==void 0?K(K({},C.item.type.defaultProps),C.item.props):C.item.props,U=_.activeDot,V=_.hide,I=_.activeBar,z=_.activeShape,q=!!(!V&&E&&W&&(U||I||z)),Q={};k!=="axis"&&W&&W.props.trigger==="click"?Q={onClick:Bo(y.handleItemMouseEnter,O.props.onClick)}:k!=="axis"&&(Q={onMouseLeave:Bo(y.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,O.props.onMouseEnter)});var G=S.cloneElement(O,K(K({},C.props),Q));function Z(ct){return typeof F.dataKey=="function"?F.dataKey(ct.payload):null}if(q)if(N>=0){var ee,R;if(F.dataKey&&!F.allowDuplicatedCategory){var oe=typeof F.dataKey=="function"?Z:"payload.".concat(F.dataKey.toString());ee=Ri(Y,oe,L),R=$&&B&&Ri(B,oe,L)}else ee=Y==null?void 0:Y[N],R=$&&B&&B[N];if(z||I){var X=O.props.activeIndex!==void 0?O.props.activeIndex:N;return[S.cloneElement(O,K(K(K({},C.props),Q),{},{activeIndex:X})),null,null]}if(!fe(ee))return[G].concat(ra(y.renderActivePoints({item:C,activePoint:ee,basePoint:R,childIndex:N,isRange:$})))}else{var ce,re=(ce=y.getItemByXY(y.state.activeCoordinate))!==null&&ce!==void 0?ce:{graphicalItem:G},me=re.graphicalItem,We=me.item,Be=We===void 0?O:We,Fe=me.childIndex,Ge=K(K(K({},C.props),Q),{},{activeIndex:Fe});return[S.cloneElement(Be,Ge),null,null]}return $?[G,null,null]:[G,null]}),le(y,"renderCustomized",function(O,T,j){return S.cloneElement(O,K(K({key:"recharts-customized-".concat(j)},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((x=w.id)!==null&&x!==void 0?x:kr("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=dh(y.triggeredAfterMouseMove,(A=w.throttleDelay)!==null&&A!==void 0?A:1e3/60),y.state={},y}return gB(b,m),dB(b,[{key:"componentDidMount",value:function(){var x,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x: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 x=this.props,A=x.children,y=x.data,O=x.height,T=x.layout,j=gt(A,Ut);if(j){var C=j.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,P=ff(this.state,y,C,k),E=this.state.tooltipTicks[C].coordinate,F=(this.state.offset.top+O)/2,N=T==="horizontal",L=N?{x:E,y:F}:{y:E,x:F},M=this.state.formattedGraphicalItems.find(function(H){var Y=H.item;return Y.type.name==="Scatter"});M&&(L=K(K({},L),M.props.points[C].tooltipPosition),P=M.props.points[C].tooltipPayload);var W={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:k,activePayload:P,activeCoordinate:L};this.setState(W),this.renderCursor(j),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var 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(x){fl([gt(x.children,Ut)],[gt(this.props.children,Ut)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=gt(this.props.children,Ut);if(x&&typeof x.props.shared=="boolean"){var A=x.props.shared?"axis":"item";return s.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var A=this.container,y=A.getBoundingClientRect(),O=kk(y),T={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},j=y.width/A.offsetWidth||1,C=this.inRange(T.chartX,T.chartY,j);if(!C)return null;var k=this.state,P=k.xAxisMap,E=k.yAxisMap,F=this.getTooltipEventType(),N=S0(this.state,this.props.data,this.props.layout,C);if(F!=="axis"&&P&&E){var L=mr(P).scale,M=mr(E).scale,W=L&&L.invert?L.invert(T.chartX):null,H=M&&M.invert?M.invert(T.chartY):null;return K(K({},T),{},{xValue:W,yValue:H},N)}return N?K(K({},T),N):null}},{key:"inRange",value:function(x,A){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,T=x/y,j=A/y;if(O==="horizontal"||O==="vertical"){var C=this.state.offset,k=T>=C.left&&T<=C.left+C.width&&j>=C.top&&j<=C.top+C.height;return k?{x:T,y:j}:null}var P=this.state,E=P.angleAxisMap,F=P.radiusAxisMap;if(E&&F){var N=mr(E);return $g({x:T,y:j},N)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,A=this.getTooltipEventType(),y=gt(x,Ut),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 T=Bi(this.props,this.handleOuterEvent);return K(K({},T),O)}},{key:"addListener",value:function(){of.on(sf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){of.removeListener(sf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,A,y){for(var O=this.state.formattedGraphicalItems,T=0,j=O.length;T<j;T++){var C=O[T];if(C.item===x||C.props.key===x.key||A===Qt(C.item.type)&&y===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,A=this.state.offset,y=A.left,O=A.top,T=A.height,j=A.width;return S.createElement("defs",null,S.createElement("clipPath",{id:x},S.createElement("rect",{x:y,y:O,height:T,width:j})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(A,y){var O=m0(y,2),T=O[0],j=O[1];return K(K({},A),{},le({},T,j.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(A,y){var O=m0(y,2),T=O[0],j=O[1];return K(K({},A),{},le({},T,j.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[x])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(x){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[x])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(x){var A=this.state,y=A.formattedGraphicalItems,O=A.activeItem;if(y&&y.length)for(var T=0,j=y.length;T<j;T++){var C=y[T],k=C.props,P=C.item,E=P.type.defaultProps!==void 0?K(K({},P.type.defaultProps),P.props):P.props,F=Qt(P.type);if(F==="Bar"){var N=(k.data||[]).find(function(H){return yD(x,H)});if(N)return{graphicalItem:C,payload:N}}else if(F==="RadialBar"){var L=(k.data||[]).find(function(H){return $g(x,H)});if(L)return{graphicalItem:C,payload:L}}else if(ts(C,O)||rs(C,O)||ci(C,O)){var M=xI({graphicalItem:C,activeTooltipItem:O,itemData:E.data}),W=E.activeIndex===void 0?M:E.activeIndex;return{graphicalItem:K(K({},C),{},{childIndex:W}),payload:ci(C,O)?E.data[M]:C.props.data[M]}}}return null}},{key:"render",value:function(){var x=this;if(!dd(this))return null;var A=this.props,y=A.children,O=A.className,T=A.width,j=A.height,C=A.style,k=A.compact,P=A.title,E=A.desc,F=g0(A,iB),N=de(F,!1);if(k)return S.createElement(py,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(pl,ta({},N,{width:T,height:j,title:P,desc:E}),this.renderClipPath(),md(y,this.renderMap)));if(this.props.accessibilityLayer){var L,M;N.tabIndex=(L=this.props.tabIndex)!==null&&L!==void 0?L:0,N.role=(M=this.props.role)!==null&&M!==void 0?M:"application",N.onKeyDown=function(H){x.accessibilityManager.keyboardEvent(H)},N.onFocus=function(){x.accessibilityManager.focus()}}var W=this.parseEventsOfWrapper();return S.createElement(py,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement("div",ta({className:ge("recharts-wrapper",O),style:K({position:"relative",cursor:"default",width:T,height:j},C)},W,{ref:function(Y){x.container=Y}}),S.createElement(pl,ta({},N,{width:T,height:j,title:P,desc:E,style:OB}),this.renderClipPath(),md(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);le(g,"displayName",r),le(g,"defaultProps",K({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),le(g,"getDerivedStateFromProps",function(m,b){var w=m.dataKey,x=m.data,A=m.children,y=m.width,O=m.height,T=m.layout,j=m.stackOffset,C=m.margin,k=b.dataStartIndex,P=b.dataEndIndex;if(b.updateId===void 0){var E=T0(m);return K(K(K({},E),{},{updateId:0},h(K(K({props:m},E),{},{updateId:0}),b)),{},{prevDataKey:w,prevData:x,prevWidth:y,prevHeight:O,prevLayout:T,prevStackOffset:j,prevMargin:C,prevChildren:A})}if(w!==b.prevDataKey||x!==b.prevData||y!==b.prevWidth||O!==b.prevHeight||T!==b.prevLayout||j!==b.prevStackOffset||!un(C,b.prevMargin)){var F=T0(m),N={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},L=K(K({},S0(b,x,T)),{},{updateId:b.updateId+1}),M=K(K(K({},F),N),L);return K(K(K({},M),h(K({props:m},M),b)),{},{prevDataKey:w,prevData:x,prevWidth:y,prevHeight:O,prevLayout:T,prevStackOffset:j,prevMargin:C,prevChildren:A})}if(!fl(A,b.prevChildren)){var W,H,Y,$,B=gt(A,In),_=B&&(W=(H=B.props)===null||H===void 0?void 0:H.startIndex)!==null&&W!==void 0?W:k,U=B&&(Y=($=B.props)===null||$===void 0?void 0:$.endIndex)!==null&&Y!==void 0?Y:P,V=_!==k||U!==P,I=!fe(x),z=I&&!V?b.updateId:b.updateId+1;return K(K({updateId:z},h(K(K({props:m},b),{},{updateId:z,dataStartIndex:_,dataEndIndex:U}),b)),{},{prevChildren:A,dataStartIndex:_,dataEndIndex:U})}return null}),le(g,"renderActiveDot",function(m,b,w){var x;return S.isValidElement(m)?x=S.cloneElement(m,b):pe(m)?x=m(b):x=S.createElement(Jo,b),S.createElement(xe,{className:"recharts-active-dot",key:w},x)});var v=S.forwardRef(function(b,w){return S.createElement(g,ta({},b,{ref:w}))});return v.displayName=g.displayName,v},MB=kB({chartName:"ComposedChart",GraphicalChild:[mi,jr,Bn,Ts],axisComponents:[{axisType:"xAxis",AxisComp:js},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:G9});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"})]})]}),j0=({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,g=u.y;s+=` C ${f} ${d} ${h} ${g} ${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((m,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],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],g=f[0],v=`${d} L ${h.x} 90 L ${g.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:v,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((m,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"})]})]})]})})},NB=({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))})]})},P0=({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=(T=>{if(!T||T.length===0)return[];const j=[...T].sort((N,L)=>{const M=new Date(N.date),W=new Date(L.date);return M.getTime()-W.getTime()});let C,k;l!=null&&l.start&&(l!=null&&l.end)?(C=new Date(l.start),k=new Date(l.end)):(C=new Date(j[0].date),k=new Date(j[j.length-1].date));const P=new Map;j.forEach(N=>{P.set(N.date,N)});const E=[],F=new Date(C);for(;F<=k;){const N=F.toISOString().split("T")[0];if(P.has(N))E.push(P.get(N));else{const L={date:N,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 M=j[0];Object.keys(M).forEach(W=>{typeof M[W]=="number"&&!(W in L)&&(L[W]=0)})}E.push(L)}F.setDate(F.getDate()+1)}return E})(a),g=T=>{const j=new Date(T);return isNaN(j.getTime())?T:j.toLocaleDateString("en-US",{month:"short",day:"numeric"})},v=()=>{if(!h||h.length===0)return 0;const T=h.length;return T<=20?0:T<=31?1:T<=61?2:Math.floor(T/7)-1},m=T=>b()&&!Number.isInteger(T)?"":T>=1e3?`${Math.floor(T/1e3)}k`:Math.floor(T).toString(),b=()=>{const T=["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&&T.some(j=>c.toLowerCase().includes(j.toLowerCase()))||i&&T.some(j=>i.toLowerCase().includes(j.toLowerCase()))||e.title&&T.some(j=>e.title.toLowerCase().includes(j.toLowerCase()))||s&&s.some(j=>j.label&&T.some(C=>j.label.toLowerCase().includes(C.toLowerCase()))))},x=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(j0,{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=T=>{var C;if(!n||!T||!T.activePayload)return;const j=(C=T.activePayload[0])==null?void 0:C.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:(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:",x),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(Ak,{width:"100%",height:u,children:p.jsxs(MB,{data:h,onClick:A,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:x.map((T,j)=>p.jsxs("linearGradient",{id:`gradient-${T.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:T.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:T.color,stopOpacity:.01})]},`gradient-${j}`))}),p.jsx(By,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),p.jsx(js,{dataKey:"date",tickFormatter:g,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:v()}),p.jsx(_s,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:m,tickMargin:10,allowDecimals:!b(),domain:b()?["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(Ut,{content:T=>p.jsx(NB,{...T,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(T=>p.jsx(jr,{type:"monotone",dataKey:T.dataKey,stroke:"none",fill:`url(#gradient-${T.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${T.dataKey}`)),x.map(T=>p.jsx(mi,{type:"monotone",dataKey:T.dataKey,stroke:T.color,strokeWidth:2.5,strokeDasharray:T.strokeDasharray,dot:!1,activeDot:{r:5,fill:T.color,stroke:T.color,strokeWidth:2},name:T.label},T.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:x.map(T=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:T.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:T.label})]},T.dataKey))})})]})]})},_0=({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]=S.useState(o.defaultSort||null),[u,f]=S.useState(""),[d,h]=S.useState(1),g=S.useMemo(()=>{let y=[...n];return s.searchable&&u&&(y=y.filter(O=>a.some(T=>{const j=O[T.key];return j==null?void 0:j.toString().toLowerCase().includes(u.toLowerCase())}))),l&&y.sort((O,T)=>{const j=O[l.key],C=T[l.key];if(typeof j=="number"&&typeof C=="number")return l.order==="asc"?j-C:C-j;const k=(j==null?void 0:j.toString())||"",P=(C==null?void 0:C.toString())||"",E=k.localeCompare(P);return l.order==="asc"?E:-E}),y},[n,a,u,l,s.searchable]),v=i.enabled?Math.ceil(g.length/i.pageSize):1,m=i.enabled?g.slice((d-1)*i.pageSize,d*i.pageSize):g,b=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"})},w=y=>{f(y),h(1)},x=(y,O,T)=>O.render?O.render(y,T):O.formatter?O.formatter(y,T):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(Tf,{className:"w-[16px] h-[16px]"}):p.jsx(fr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(Tf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(fr,{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(Cf,{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=>w(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:()=>b(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:m.map((y,O)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(T=>p.jsx("td",{className:se("px-[16px] py-[12px] text-xs text-gray-900",T.align==="center"&&"text-center",T.align==="right"&&"text-right"),children:x(y[T.key],T,y)},T.key))},O))})]})}),i.enabled&&v>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,g.length)," of"," ",g.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,v)},(y,O)=>{const T=Math.max(1,Math.min(v-4,d-2))+O;return T>v?null:p.jsx("button",{onClick:()=>h(T),className:se("px-[12px] py-[4px] text-xs border rounded",d===T?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:T},T)}),p.jsx("button",{onClick:()=>h(y=>Math.min(v,y+1)),disabled:d===v,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"})]})]}),m.length===0&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:u?"No results found for your search.":"No data available."})]})},DB=(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"}},IB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},LB=(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]}},RB=(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=DB(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name.replace("agent","avatar")}.svg`},E0=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"},BB={xs:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",small:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",medium:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center",large:"w-[24px] h-[24px] bg-gray-200 rounded-[8px] text-xs uppercase flex items-center justify-center"},Bt={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)">
281
286
  <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>
282
287
  <defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
283
288
  </svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -286,8 +291,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
286
291
  <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"/>
287
292
  </svg>`,MCP:`<svg width="14" height="14" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
288
293
  <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"/>
289
- </svg>`},RB=(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]=S.useState(!1),[u,f]=S.useState(!1),[d,h]=S.useState(!1),v=NB(e),g=LB[r];if(t==="model"){const O=_0(o),x=()=>{h(!0)};if(d){const j=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${g} rounded-[8px] bg-gray-200 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-gray-900 text-xs font-bold",children:j})})}return p.jsx("img",{src:O,alt:s||a,className:`${g} rounded-[8px] ${n}`,onError:x})}if(v!=null&&v.name&&v.name!=="fallback"&&!l){const O=IB(v,t),x=()=>{c(!0)};return p.jsx("img",{src:O,alt:a,className:`${g} rounded-[8px] object-cover ${n}`,onError:x})}if(l&&!u&&t==="agent"){const O=`${window.location.origin}/agenticai/assets/agent-avatars/avatar1.svg`,x=()=>{f(!0)};return p.jsx("img",{src:O,alt:a,className:`${g} rounded-[8px] object-cover ${n}`,onError:x})}if(t==="model"){const O=_0(o),x=()=>{h(!0)};if(d){const j=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${g} rounded-[8px] bg-gray-200 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-gray-900 text-xs font-bold",children:j})})}return p.jsx("img",{src:O,alt:s||a,className:`${g} rounded-[8px] ${n}`,onError:x})}const m=v||DB(a,t);if(t==="workflowtool"){const O=i||m.type||"toolLibrary",x=RB(O,a);return p.jsx("div",{className:`${g} rounded-[8px] flex items-center justify-center bg-gray-100 ${n}`,children:p.jsx("div",{dangerouslySetInnerHTML:{__html:x}})})}const b=`${window.location.origin}/agenticai/assets/agent-avatars/avatar1.svg`;return p.jsx("img",{src:b,alt:a,className:`${g} rounded-[8px] object-cover ${n}`})},E0=({data:e,className:t})=>{const[r,n]=S.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 BB(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 FB(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 C0=({data:e,className:t})=>{const[r,n]=S.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",BB(o.toolType||o.type||"Default")),children:FB(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"})})]})},UB=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"},WB=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)},zB=({provider:e})=>{const[t,r]=S.useState(!1),n=UB(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})},$0=({data:e,className:t})=>{const[r,n]=S.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(zB,{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:WB(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"})})]})},VB=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"}}},GB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),k0=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var w;const s=VB(n),[l,c]=S.useState(10),[u,f]=S.useState("all"),[d,h]=S.useState(!1),v=[{label:`All ${s.entityName}`,value:"all"},...a.map(T=>({label:T.name,value:T.id}))],g=u==="all"?a:a.filter(T=>T.id===u),m=()=>{f("all"),h(!1),c(10),t()};S.useEffect(()=>{const T=_=>{_.key==="Escape"&&m()},A=_=>{d&&(_.target.closest(".filter-dropdown")||h(!1))};return e&&(document.addEventListener("keydown",T),document.addEventListener("mousedown",A),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",T),document.removeEventListener("mousedown",A),document.body.style.overflow="unset"}},[e,d,m]),S.useEffect(()=>{e&&(f("all"),h(!1),c(10))},[e]);const b=T=>new Date(T).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),O=()=>{c(T=>Math.min(T+10,g.length))},x=T=>{f(T),h(!1),c(10)};if(!e)return null;const j=g.slice(0,l),y=((w=v.find(T=>T.value===u))==null?void 0:w.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:m}),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:m,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:p.jsx(Cf,{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:y}),p.jsx(fr,{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:v.map(T=>p.jsx("button",{onClick:()=>x(T.value),className:se("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",u===T.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:T.label},T.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:j.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:[j.map((T,A)=>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:T.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"model",size:"small",name:T.name,toolType:T.toolType||T.type,provider:T.provider,modelName:T.modelName})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:T.name}),n==="modelRuns"&&T.provider&&p.jsx("div",{className:"text-xs text-[#475467] truncate",children:T.provider})]})]}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:GB(T.runs)})}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:T.responseTime})})]},T.id||A)),l<g.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:O,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 M0{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 N0{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new M0(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 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 N0(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`,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 m=g.count||0,b=(g.toolType||g.tool_type||"").toLowerCase(),O=(g.toolName||g.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:O,count:m});const x=b.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(b)||["inlinetool","tool","code","codetool","event"].includes(x)?c+=m:["toollibrary","toolLibrary","workflow","workflowtool"].includes(b)||["toollibrary","workflow","workflowtool"].includes(x)?u+=m:["knowledge","KNOWLEDGE","knowledgetool"].includes(b)||["knowledge","knowledgetool"].includes(x)?f+=m:["mcp","MCP","mcptool","mcpTool"].includes(b)||["mcp","mcptool"].includes(x)?d+=m:(console.log(`Unknown tool type '${b}' for tool '${O}', defaulting to code tools`),c+=m)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:c,workflowTools:u,knowledgeTools:f,mcpTools:d,total:c+u+f+d,expectedTotal:l});const v=c+u+f+d;if(Math.abs(v-l)>1){console.warn(`Breakdown total (${v}) doesn't match expected total (${l}) for point ${a}`);const g=l-v;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,v=Math.abs(a.getTime()-n.getTime()),g=v<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:c,toDateStr:u,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:v,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 D0=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,c]=S.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),u=(g,m)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:g,date:m,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 O=g.listView||[];console.log("ListView data for clicked date:",O);const j=new Kt({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(O,b),y=g[b]||g.count||0;console.log("Opening slider with data:",{date:m,metricType:b,sliderData:j,totalRuns:y}),c({isOpen:!0,date:m,metricType:b,data:j,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(j0,{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(E0,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(C0,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx($0,{data:o.data})}):p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(P0,{config:o})}):null,v=()=>{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:v()}),p.jsx(k0,{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]=S.useState(!1),[l,c]=S.useState(t||""),u=S.useRef(null),f=e.find(v=>v.value===l);S.useEffect(()=>{const v=g=>{u.current&&!u.current.contains(g.target)&&s(!1)};return o&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[o]);const d=v=>{i||(c(v),s(!1),n==null||n(v))},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(fr,{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(v=>{const g=l===v.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",v.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:()=>!v.disabled&&d(v.value),disabled:v.disabled,children:p.jsx("span",{className:"block whitespace-nowrap w-full",children:v.label})}),v.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:[v.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"})]})})]},v.value)})})]})},I0=({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]=S.useState(!1),[d,h]=S.useState(""),[v,g]=S.useState(()=>{const C=t||r;return a?Array.isArray(C)?C:C?[C]:[]:C?[Array.isArray(C)?C[0]:C]:[]}),m=S.useRef(null);S.useEffect(()=>{const C=P=>{m.current&&!m.current.contains(P.target)&&f(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const b=(C,P=c)=>C.length<=P?C:C.substring(0,P)+"...",O=i?e.filter(C=>C.label.toLowerCase().includes(d.toLowerCase())):e,x=O.slice(0,l),j=O.length>l,y=C=>{let P;if(a){if(C==="all"){T();return}if(v.includes(C))P=v.filter(I=>I!==C),P=P.filter(I=>I!=="all");else{P=v.filter(D=>D!=="all"),P=[...P,C];const I=O.filter(D=>D.value!=="all").map(D=>D.value),k=P.filter(D=>D!=="all");k.length===I.length&&(P=["all",...k])}}else P=[C],f(!1);g(P);const E=a?P:P[0]||"";o==null||o(E)},w=()=>{if(!a)return{checked:!1,indeterminate:!1};const C=O.filter(E=>E.value!=="all").map(E=>E.value),P=v.filter(E=>E!=="all"&&C.includes(E));return v.includes("all")&&P.length===0?{checked:!1,indeterminate:!1}:P.length===0?{checked:!1,indeterminate:!1}:P.length===C.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},T=()=>{if(!a)return;const C=w(),P=O.filter(E=>E.value!=="all").map(E=>E.value);if(C.checked)g(["all"]),o==null||o(["all"]);else{const E=["all",...P];g(E),o==null||o(E)}},A=()=>{g(["all"]),o==null||o(a?["all"]:"all")},_=()=>{if(!a){if(v.length===0)return n;const I=e.find(k=>k.value===v[0]);return(I==null?void 0:I.label)||n}const C=v.filter(I=>I!=="all"),P=v.includes("all");if(C.length===0)return n;if(C.length===1){const I=e.find(k=>k.value===C[0]);return(I==null?void 0:I.label)||n}const E=e.filter(I=>I.value!=="all").length;return C.length===E?"All selected":`${C.length} selected`};return p.jsxs("div",{className:se("relative",s),ref:m,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",v.length===0&&"text-gray-500"),children:_()}),p.jsx(fr,{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(Ef,{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:C=>h(C.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:T,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 C=w();return C.indeterminate||C.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const C=w();return C.indeterminate?p.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):C.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:A,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:[x.length===0?p.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):x.map(C=>{let P;return C.value==="all"?null:(P=v.includes(C.value),p.jsxs("div",{className:"relative group",children:[p.jsxs("div",{onClick:()=>y(C.value),className:se("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",P&&"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",P?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:P&&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",P?"border-blue-600 bg-blue-600":"border-gray-300"),children:P&&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",P?"font-medium text-gray-700":"text-gray-500"),children:b(C.label)})]}),C.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:[C.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"})]})})]},C.value))}),j&&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:["+",O.length-l," more items"]}),i&&p.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},L0=({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(I0,{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(bb,{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($b,{className:"w-[16px] h-[16px]"})})]})]})},R0=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var q;const{id:i,title:o,description:s,metrics:l,view:c,controls:u,layout:f}=e,[d,h]=S.useState(c.type),[v,g]=S.useState("chart"),m=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,O]=S.useState(m()),[x,j]=S.useState("all"),y=$=>{var U,W,K,R,G;const B=A();(U=B==null?void 0:B.controls)!=null&&U.toggle?(g($),(K=(W=B.controls.toggle).onToggle)==null||K.call(W,$)):(h($),(G=(R=u==null?void 0:u.toggle)==null?void 0:R.onToggle)==null||G.call(R,$))},w=$=>{var W,K;const B=$.metricType||$.title.toLowerCase();O(B);const U=l.find(R=>(R.metricType||R.title.toLowerCase())===B);(K=(W=U==null?void 0:U.controls)==null?void 0:W.dropdown)!=null&&K.multiSelect?j(["all"]):j("all"),a==null||a($)},T=$=>{var U,W,K;j($);const B=l.find(R=>(R.metricType||R.title.toLowerCase())===b);(K=(W=(U=B==null?void 0:B.controls)==null?void 0:U.dropdown)==null?void 0:W.onChange)==null||K.call(W,$)},A=()=>l.find($=>($.metricType||$.title.toLowerCase())===b)||null,_=$=>Array.isArray($)?$.filter(U=>U!=="all").length>0:$!=="all",C=$=>Array.isArray($)?$.filter(B=>B!=="all"):$!=="all"?[$]:[],P=$=>{var K,R,G,Y,te,V,Z,ee,L;const B=((R=(K=$.view)==null?void 0:K.chart)==null?void 0:R.data)||((G=c.chart)==null?void 0:G.data)||[];if(!_(x))return B;const U=$.metricType,W=C(x);if(W.length===1){const oe=W[0],X=A(),ce=(V=(te=(Y=X==null?void 0:X.controls)==null?void 0:Y.dropdown)==null?void 0:te.options)==null?void 0:V.find(me=>me.value===oe),re=ce==null?void 0:ce.label;return console.log("🔍 Filtering chart data:",{metricType:U,singleFilter:oe,selectedLabel:re,baseDataSample:B[0]}),B.map(me=>{let We=0;return me.listView&&Array.isArray(me.listView)&&(We=me.listView.filter(Ge=>U==="agentRuns"&&Ge.agentName?Ge.agentName===re||Ge.agentName.toLowerCase()===(re==null?void 0:re.toLowerCase()):U==="toolRuns"&&Ge.toolName?Ge.toolName===re||Ge.toolName.toLowerCase()===(re==null?void 0:re.toLowerCase()):U==="modelRuns"&&Ge.modelName?Ge.modelName===re||Ge.modelName.toLowerCase()===(re==null?void 0:re.toLowerCase()):!1).reduce((Ge,ct)=>Ge+(ct.count||0),0)),console.log("📊 Filtered value for",re,":",We),{...me,[U]:We}})}if(W.length>1){const oe=A(),ce=(((L=(ee=(Z=oe==null?void 0:oe.controls)==null?void 0:Z.dropdown)==null?void 0:ee.options)==null?void 0:L.filter(re=>W.includes(re.value)))||[]).map(re=>re.label);return B.map(re=>{let me=0;return re.listView&&Array.isArray(re.listView)&&(me=re.listView.filter(Be=>U==="agentRuns"&&Be.agentName?ce.some(Fe=>Be.agentName===Fe||Be.agentName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):U==="toolRuns"&&Be.toolName?ce.some(Fe=>Be.toolName===Fe||Be.toolName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):U==="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)),{...re,[U]:me}})}return B},E=$=>{var K;if(!((K=$.view)!=null&&K.chart))return null;const B=P($),U=()=>{var G,Y,te,V,Z,ee;if(!_(x)||!((G=$.controls)!=null&&G.dropdown))return((te=(Y=$.view)==null?void 0:Y.chart)==null?void 0:te.title)||$.title;const R=C(x);if(R.length===1){const L=(V=$.controls.dropdown.options)==null?void 0:V.find(oe=>oe.value===R[0]);return L?`${L.label}`:((ee=(Z=$.view)==null?void 0:Z.chart)==null?void 0:ee.title)||$.title}return`${R.length} selected`},W=C(x);return $.metricType==="toolRuns"&&W.length===1?{...$.view.chart,data:B,title:U(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:$.metricType==="modelRuns"&&W.length===1?{...$.view.chart,data:B,title:U(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...$.view.chart,data:B,title:U()}},I=($,B)=>{if(!_(x))return $;const U=C(x);if(U.length===1){const W=U[0];if(i==="runs"&&B==="agentRuns")return $.map(K=>({...K,agentRuns:K[W]||0}));if(i==="runs"&&B==="toolRuns")return $.map(K=>({...K,toolRuns:K[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&B==="modelRuns")return $.map(K=>({...K,modelRuns:K[W.replace(/[-\.]/g,"")]||0}))}return $},k=$=>{var K;const B=((K=c.chart)==null?void 0:K.data)||[],U=I(B,$),W=R=>{var Y,te;if(!_(x))return R;const G=C(x);if(G.length===1){const V=(te=(Y=u==null?void 0:u.dropdown)==null?void 0:Y.options)==null?void 0:te.find(Z=>Z.value===G[0]);return V?`${V.label}`:R}return`${G.length} selected`};switch($){case"users":return{type:"line",title:"Total Users",data:B,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:B,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:B,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:B,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:U,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 C(x).length===1?{type:"line",title:W("Tool Runs"),data:I(B,"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:U,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 C(x).length===1?{type:"line",title:W("Model Runs"),data:I(B,"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:U,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 $=A();return $!=null&&$.controls?{...$.controls,dropdown:$.controls.dropdown?{...$.controls.dropdown,onChange:T}:void 0,toggle:$.controls.toggle?{...$.controls.toggle,chartView:v==="chart",tableView:v==="table",onToggle:y}:void 0}:u?{...u,dropdown:u.dropdown?{...u.dropdown,onChange:T}:void 0,toggle:u.toggle?{...u.toggle,chartView:d==="chart",tableView:d==="table",onToggle:y}:void 0}:void 0})(),F=(()=>{var U,W,K,R,G,Y,te,V,Z,ee;const $=A();if($!=null&&$.view){if((U=$.controls)!=null&&U.toggle){if(v==="table"&&$.view.table){let oe=$.view.table.data;if($.metricType==="agentRuns"&&_(x)){const X=C(x);if(X.length>0){const ce=((R=(K=(W=$.controls)==null?void 0:W.dropdown)==null?void 0:K.options)==null?void 0:R.filter(re=>X.includes(re.value)))||[];ce.length>0&&(oe=oe.filter(re=>ce.some(me=>re.name===me.label||re.name&&re.name.toLowerCase().includes(me.label.toLowerCase()))))}}if($.metricType==="toolRuns"&&_(x)){const X=C(x);if(X.length>0){const ce=((te=(Y=(G=$.controls)==null?void 0:G.dropdown)==null?void 0:Y.options)==null?void 0:te.filter(re=>X.includes(re.value)))||[];ce.length>0&&(oe=oe.filter(re=>ce.some(me=>re.name===me.label||re.name&&re.name.toLowerCase().includes(me.label.toLowerCase()))))}}if($.metricType==="modelRuns"&&_(x)){const X=C(x);if(X.length>0){const ce=((ee=(Z=(V=$.controls)==null?void 0:V.dropdown)==null?void 0:Z.options)==null?void 0:ee.filter(re=>X.includes(re.value)))||[];ce.length>0&&(oe=oe.filter(re=>ce.some(me=>re.name===me.label||re.name&&re.name.toLowerCase().includes(me.label.toLowerCase()))))}}return{type:"table",table:{...$.view.table,data:oe}}}else if(v==="chart"&&$.view.chart)return{type:"chart",chart:E($)||$.view.chart}}const L=E($);return L?{...$.view,chart:L}:$.view}const B=k(b);return B?{type:"chart",chart:B}:{...c,type:d}})(),z=()=>l.map($=>{const B=$.metricType||$.title.toLowerCase();return{...$,highlighted:$.highlighted||B===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,{})})]}):z().map(($,B)=>p.jsx("div",{className:"flex-1",children:p.jsx(Bf,{data:$,onClick:w,isFirst:B===0})},`${i}-metric-${B}`))}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:A()&&p.jsx("h3",{className:"text-md font-medium text-gray-700",children:(q=A())==null?void 0:q.title})}),D&&p.jsx(L0,{config:D})]}),p.jsx(D0,{config:F,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},df=S.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})});df.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 Ne(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ve(e){Ne(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 HB(e,t){Ne(2,arguments);var r=Ve(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function pf(e,t){Ne(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 qB(e,t){Ne(2,arguments);var r=Ve(e).getTime(),n=Et(t);return new Date(r+n)}var KB={};function Oi(){return KB}function YB(e,t){var r,n,a,i,o,s;Ne(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 XB(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){Ne(1,arguments);var t=Ve(e);return t.setHours(0,0,0,0),t}function Si(e,t){Ne(2,arguments);var r=aa(e),n=aa(t);return r.getTime()===n.getTime()}function ZB(e){return Ne(1,arguments),e instanceof Date||Ns(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function JB(e){if(Ne(1,arguments),!ZB(e)&&typeof e!="number")return!1;var t=Ve(e);return!isNaN(Number(t))}function QB(e){Ne(1,arguments);var t=Ve(e);return t.setHours(23,59,59,999),t}function eF(e){Ne(1,arguments);var t=Ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tF(e,t){Ne(2,arguments);var r=Et(t);return qB(e,-r)}var rF=864e5;function nF(e){Ne(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/rF)+1}function Ds(e){Ne(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 B0(e){Ne(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 aF(e){Ne(1,arguments);var t=B0(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ds(r);return n}var iF=6048e5;function oF(e){Ne(1,arguments);var t=Ve(e),r=Ds(t).getTime()-aF(t).getTime();return Math.round(r/iF)+1}function Is(e,t){var r,n,a,i,o,s,l,c;Ne(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(),v=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-v),d.setUTCHours(0,0,0,0),d}function F0(e,t){var r,n,a,i,o,s,l,c;Ne(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 v=new Date(0);v.setUTCFullYear(f+1,0,h),v.setUTCHours(0,0,0,0);var g=Is(v,t),m=new Date(0);m.setUTCFullYear(f,0,h),m.setUTCHours(0,0,0,0);var b=Is(m,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=b.getTime()?f:f-1}function sF(e,t){var r,n,a,i,o,s,l,c;Ne(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=F0(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var v=Is(h,t);return v}var lF=6048e5;function cF(e,t){Ne(1,arguments);var r=Ve(e),n=Is(r,t).getTime()-sF(r,t).getTime();return Math.round(n/lF)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var _r={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return _e(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(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 _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(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 _e(i,r.length)}},ia={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},uF={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 _r.y(t,r)},Y:function(t,r,n,a){var i=F0(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=B0(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(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 _e(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 _e(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 _r.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 _e(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=cF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=oF(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):_r.d(t,r)},D:function(t,r,n){var a=nF(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_e(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 _e(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 _e(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 _e(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 _r.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):_r.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):_r.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):_r.s(t,r)},S:function(t,r){return _r.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 W0(o);case"XXXX":case"XX":return Zr(o);case"XXXXX":case"XXX":default:return Zr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return W0(o);case"xxxx":case"xx":return Zr(o);case"xxxxx":case"xxx":default:return Zr(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"+U0(o,":");case"OOOO":default:return"GMT"+Zr(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"+U0(o,":");case"zzzz":default:return"GMT"+Zr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return _e(o,r.length)}};function U0(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+_e(i,2)}function W0(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return Zr(e,t)}function Zr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=_e(Math.floor(a/60),2),o=_e(a%60,2);return n+i+r+o}var z0=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"})}},V0=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"})}},fF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return z0(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}}",z0(a,r)).replace("{{time}}",V0(i,r))},dF={p:V0,P:fF},pF=["D","DD"],hF=["YY","YYYY"];function mF(e){return pF.indexOf(e)!==-1}function vF(e){return hF.indexOf(e)!==-1}function G0(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 gF={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"}},yF=function(t,r,n){var a,i=gF[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 hf(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 bF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},OF={date:hf({formats:bF,defaultWidth:"full"}),time:hf({formats:xF,defaultWidth:"full"}),dateTime:hf({formats:wF,defaultWidth:"full"})},SF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TF=function(t,r,n,a){return SF[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 AF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},PF={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"]},_F={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"]},EF={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"}},CF={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"}},$F=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"},kF={ordinalNumber:$F,era:Ti({values:AF,defaultWidth:"wide"}),quarter:Ti({values:jF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ti({values:PF,defaultWidth:"wide"}),day:Ti({values:_F,defaultWidth:"wide"}),dayPeriod:Ti({values:EF,defaultWidth:"wide",formattingValues:CF,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)?NF(s,function(f){return f.test(o)}):MF(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 MF(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function NF(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function DF(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 IF=/^(\d+)(th|st|nd|rd)?/i,LF=/\d+/i,RF={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},BF={any:[/^b/i,/^(a|c)/i]},FF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UF={any:[/1/i,/2/i,/3/i,/4/i]},WF={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},zF={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]},VF={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},GF={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]},HF={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},qF={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}},KF={ordinalNumber:DF({matchPattern:IF,parsePattern:LF,valueCallback:function(t){return parseInt(t,10)}}),era:Ai({matchPatterns:RF,defaultMatchWidth:"wide",parsePatterns:BF,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:FF,defaultMatchWidth:"wide",parsePatterns:UF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ai({matchPatterns:WF,defaultMatchWidth:"wide",parsePatterns:zF,defaultParseWidth:"any"}),day:Ai({matchPatterns:VF,defaultMatchWidth:"wide",parsePatterns:GF,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:HF,defaultMatchWidth:"any",parsePatterns:qF,defaultParseWidth:"any"})},YF={code:"en-US",formatDistance:yF,formatLong:OF,formatRelative:TF,localize:kF,match:KF,options:{weekStartsOn:0,firstWeekContainsDate:1}},XF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ZF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JF=/^'([^]*?)'?$/,QF=/''/g,eU=/[a-zA-Z]/;function Ls(e,t,r){var n,a,i,o,s,l,c,u,f,d,h,v,g,m;Ne(2,arguments);var b=String(t),O=Oi(),x=(n=(a=void 0)!==null&&a!==void 0?a:O.locale)!==null&&n!==void 0?n:YF,j=Et((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:O.firstWeekContainsDate)!==null&&o!==void 0?o:(c=O.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=Et((f=(d=(h=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&h!==void 0?h:O.weekStartsOn)!==null&&d!==void 0?d:(g=O.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&f!==void 0?f:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var w=Ve(e);if(!JB(w))throw new RangeError("Invalid time value");var T=XB(w),A=tF(w,T),_={firstWeekContainsDate:j,weekStartsOn:y,locale:x,_originalDate:w},C=b.match(ZF).map(function(P){var E=P[0];if(E==="p"||E==="P"){var I=dF[E];return I(P,x.formatLong)}return P}).join("").match(XF).map(function(P){if(P==="''")return"'";var E=P[0];if(E==="'")return tU(P);var I=uF[E];if(I)return vF(P)&&G0(P,t,String(e)),mF(P)&&G0(P,t,String(e)),I(A,P,x.localize,_);if(E.match(eU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return P}).join("");return C}function tU(e){var t=e.match(JF);return t?t[1].replace(QF,"'"):e}function H0(e,t){Ne(2,arguments);var r=Ve(e),n=Ve(t);return r.getTime()<n.getTime()}function rU(e,t){Ne(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){Ne(2,arguments);var r=Et(t);return HB(e,-r)}function nU(e,t){Ne(2,arguments);var r=Et(t);return pf(e,-r)}const mf=({children:e})=>{const[t,r]=S.useState(!1);return S.useEffect(()=>(r(!0),()=>r(!1)),[]),t?en.createPortal(e,document.body):null};function q0({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:QB(Rs(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:YB(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:eF(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]=S.useState(a==null?void 0:a.dateRange),[s,l]=S.useState(a==null?void 0:a.dateRange),[c,u]=S.useState(!1),[f,d]=S.useState((a==null?void 0:a.label)||null),[h,v]=S.useState((a==null?void 0:a.label)||null),[g,m]=S.useState(new Date),[b,O]=S.useState(null),[x,j]=S.useState({top:0,left:0}),y=S.useRef(null),w=S.useRef(null);S.useEffect(()=>{var M,F;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:(F=a.dateRange.to)==null?void 0:F.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(z=>`${z.value}:${z.label}`)})},[]),S.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),v(a.label))},[t]);const T=()=>{if(!w.current)return;const M=w.current.getBoundingClientRect(),F=window.scrollY,z=window.scrollX,q=window.innerWidth,$=window.innerHeight,B=720,U=450;let W=M.bottom+F+8,K=M.left+z;K+B>q&&(K=M.right+z-B),K+B>q&&(K=q-B-20),W+U>$&&(W=M.top+F-U-8),K<20&&(K=20),W<20&&(W=20),j({top:W,left:K})};S.useEffect(()=>{const M=()=>{c&&T()};return c&&(window.addEventListener("resize",M),window.addEventListener("scroll",M)),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M)}},[c]);const A=(M,F)=>{if(l(M),v(F),O(null),M.from){const z=new Date(M.from.getFullYear(),M.from.getMonth(),1);m(z)}},_=M=>{if(!b)O(M),l({from:M,to:M}),v(null);else{const F=H0(M,b)?M:b,z=H0(M,b)?b:M;l({from:F,to:z}),O(null),v(null)}},C=()=>{o(s),d(h),r==null||r(s),u(!1),O(null)},P=()=>{l(void 0),v(null),o(void 0),d(null),r==null||r(void 0),u(!1),O(null)},E=M=>{M?(l(i),v(f),O(null),setTimeout(T,0)):(l(i),v(f),O(null)),u(M)},I=(M,F)=>(console.log("📅 formatDateRange called with:",{presetLabel:F,hasDateRange:!!(M!=null&&M.from)}),F||(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")),k=(M=0)=>{const F=pf(g,M),z=F.getFullYear(),q=F.getMonth(),$=new Date(z,q,1),U=new Date(z,q+1,0).getDate(),W=$.getDay(),K=["January","February","March","April","May","June","July","August","September","October","November","December"],R=["Su","Mo","Tu","We","Th","Fr","Sa"],G=[],te=new Date(z,q-1,0).getDate();for(let ee=W-1;ee>=0;ee--){const L=te-ee,oe=new Date(z,q-1,L);G.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 ee=1;ee<=U;ee++){const L=new Date(z,q,ee),oe=Si(L,new Date),X=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&rU(L,{start:s.from,end:s.to}),ce=(s==null?void 0:s.from)&&Si(L,s.from),re=(s==null?void 0:s.to)&&Si(L,s.to),me=b&&Si(L,b);let We="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&&(We+="font-semibold "),me||ce||re?We+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":X&&(We+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),G.push(p.jsx("button",{onClick:()=>_(L),className:We,children:ee},`current-${ee}`))}const Z=Math.ceil((W+U)/7)*7-W-U;for(let ee=1;ee<=Z;ee++){const L=new Date(z,q+1,ee);G.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:ee},`next-${ee}`))}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:()=>m(nU(g,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(Ob,{className:"h-[16px] w-[16px]"})}),p.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[K[q]," ",z]}),M===1&&p.jsx("button",{onClick:()=>m(pf(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:R.map(ee=>p.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:ee},ee))}),p.jsx("div",{className:"grid grid-cols-7 gap-1",children:G})]})},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:w,onClick:()=>E(!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(Sf,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const M=I(i,f);return console.log("📅 Button display text:",{displayText:M,date:i,selectedPresetLabel:f}),M})()]}),c&&p.jsxs(mf,{children:[p.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>E(!1)}),p.jsxs("div",{ref:y,className:D(),style:{top:x.top,left:x.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:()=>A(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:[k(0),k(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:P,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),p.jsx("button",{onClick:C,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 aU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var I;const{title:o,subtitle:s,sections:l,globalControls:c,layout:u={columns:12,gap:24,responsive:!0}}=e,[f,d]=S.useState(!1),[h,v]=S.useState({}),[g,m]=S.useState(l),[b,O]=S.useState([]),[x,j]=S.useState(!1),y=S.useRef(null);S.useEffect(()=>{if(t)try{y.current=new Kt(t),w(),T()}catch(k){console.error("Failed to initialize API service:",k)}},[t]);const w=async()=>{if(!(!y.current||!t)){j(!0);try{const k=await y.current.fetchEnvironments();O(k),console.log("🌍 Environments loaded:",k.map(D=>D.envName))}catch(k){console.error("Error loading environments:",k)}finally{j(!1)}}},T=async()=>{if(!(!y.current||!t)){d(!0);try{const k=y.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:k.fromTimestamp,toTimestamp:k.toTimestamp,fromDate:new Date(k.fromTimestamp).toLocaleDateString(),toDate:new Date(k.toTimestamp).toLocaleDateString()});const D=await y.current.fetchAllCardsDataWithEnhancedViews(k.fromTimestamp,k.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date(k.fromTimestamp).toLocaleDateString(),to:new Date(k.toTimestamp).toLocaleDateString()});const M=l.map(F=>F.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...F,metrics:D.usageAnalytics}):F.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...F,metrics:D.runs}):F);m(M)}catch(k){console.error("Error loading initial data:",k),m(l)}finally{d(!1)}}},A=async(k,D)=>{if(!(!y.current||!t||!D.metricType)){m(M=>M.map(F=>F.id===k?{...F,metrics:F.metrics.map(z=>({...z,highlighted:z.metricType===D.metricType}))}:F)),v(M=>({...M,[k]:!0}));try{const M=t.defaultTimeRange||Kt.getDateRange(7);let F,z;if(["users","sessions","messages","tokens"].includes(D.metricType))F="usage-analytics",z=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))F="runs",z=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const q=await y.current.fetchTimeSeriesData(z,F,M.fromTimestamp,M.toTimestamp),$=y.current.transformTimeSeriesDataForMetric(q,D.metricType);console.log("Time series response for",D.title,":",q),console.log("Transformed data for",D.title,":",$),console.log("Metric type used for transformation:",D.metricType);const U=(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,":",U),m(W=>W.map(K=>{if(K.id===k){const R={...K,view:{...K.view,chart:K.view.chart?{...K.view.chart,data:$,dataKey:U,lines:[{dataKey:U,color:K.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:$,dataKey:U,lines:[{dataKey:U,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",k,":",R),console.log("Chart config set:",R.view.chart),R}return K}))}catch(M){console.error("Error loading metric data:",M)}finally{v(M=>({...M,[k]:!1}))}}},_=k=>{var D,M;if((M=(D=c==null?void 0:c.draft)==null?void 0:D.onChange)==null||M.call(D,k),a==null||a(k),t&&y.current){const F={...t,environment:k};y.current.updateConfig(F),T()}},C=k=>{var D,M;if(console.log("🗓️ Time range change requested:",k),typeof k=="string"&&((M=(D=c==null?void 0:c.timeRange)==null?void 0:D.onChange)==null||M.call(D,k)),i==null||i(k),t&&y.current){let F=null;if(typeof k=="object"&&k.from&&k.to)F={fromTimestamp:k.from.toISOString(),toTimestamp:k.to.toISOString()},console.log("📅 Converting DateRange to API format:",F);else if(typeof k=="string"){const q={"24h":1,"7d":7,"30d":30,"90d":90}[k];q&&(F=Kt.getDateRange(q),console.log(`📅 Converting preset "${k}" (${q} days) to API format:`,F))}if(F){const z={...t,defaultTimeRange:F};console.log("🔄 Updating API configuration with new date range:",z.defaultTimeRange),y.current.updateConfig(z),console.log("🚀 Reloading dashboard data with new date range..."),T()}else console.warn("⚠️ Unable to convert time range value to API format:",k)}},P=(k="csv")=>{var D,M;(M=(D=c==null?void 0:c.export)==null?void 0:D.onExport)==null||M.call(D,k),n==null||n()},E=Object.values(h).some(k=>k);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||E)&&p.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[p.jsx(Eb,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),c&&p.jsxs(p.Fragment,{children:[c.draft&&p.jsx(Ms,{options:b.length>0?b.map(k=>({label:k.envName.charAt(0).toUpperCase()+k.envName.slice(1),value:k.envName})):c.draft.options,value:c.draft.defaultValue,placeholder:x?"Loading environments...":c.draft.label,onChange:_,className:"min-w-[200px]",disabled:f||E||x}),c.timeRange&&(c.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",c.timeRange.defaultValue),p.jsx(q0,{defaultValue:c.timeRange.defaultValue,onDateRangeChange:k=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",k),k&&C(k)}})):p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Sf,{className:"h-4 w-4 text-gray-500"}),p.jsx(Ms,{options:c.timeRange.options||[],value:c.timeRange.defaultValue,placeholder:c.timeRange.label,onChange:C,className:"min-w-[200px]",disabled:f||E})]})),((I=c.export)==null?void 0:I.enabled)&&p.jsxs(df,{variant:"outline",onClick:()=>P(),className:"gap-2",disabled:f||E,children:[p.jsx(Sb,{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(k=>{var D,M,F,z;return p.jsx(R0,{section:k,isLoading:f,isChartLoading:h[k.id]||!1,onMetricClick:q=>A(k.id,q),className:se(u.responsive&&((D=k.layout)==null?void 0:D.span)===12&&"lg:col-span-12",u.responsive&&((M=k.layout)==null?void 0:M.span)===6&&"lg:col-span-6",u.responsive&&((F=k.layout)==null?void 0:F.span)===4&&"lg:col-span-4",u.responsive&&((z=k.layout)==null?void 0:z.span)===3&&"lg:col-span-3")},k.id)})})]})};class K0{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(m=>{const b=`${m.data.id}|${m.data.name}|${m.data.toolName}`;n.has(b)||n.set(b,{});const O=n.get(b);m.type==="node_started"?O.started=m:m.type==="node_completed"&&(O.completed=m)});const a=[];for(const[,m]of n.entries()){const b=m.started,O=m.completed;if(!b)continue;const x=this.createTreeNodeFromEvents(b,O,t);a.push(x)}const i=this.buildNodeHierarchy(a),o=r.filter(m=>m.runId===t),s=Math.min(...o.map(m=>new Date(m.data.timestamp).getTime())),l=o.filter(m=>m.type==="node_completed"),c=l.length>0?Math.max(...l.map(m=>new Date(m.data.timestamp).getTime())):void 0,u=this.calculateRunStatus(o),f=c&&s?c-s:void 0,d=this.calculateRunTokens(o),h=this.extractUserInput(o),v=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:v}}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"||s.data.type==="GuardrailsInputScan"||s.data.type==="GuardrailsOutputScan",c=l?t.data.input:void 0,u=l?r==null?void 0:r.data.output:void 0,f=this.extractLLMUsage(u,r==null?void 0:r.data.metadata),{toolInvocations:d,isResponse:h}=this.extractToolInvocations(u),v=s.data.type==="llm"?this.extractProvider(s.data.name||s.data.toolName):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:v}}}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,r){var n,a,i;if(r!=null&&r.usage_metadata)return r.usage_metadata;if(!(!t||typeof t!="object")){if(t.usage_metadata)return t.usage_metadata;if((n=t.metadata)!=null&&n.usage_metadata)return t.metadata.usage_metadata;if(Array.isArray(t)){const o=t[0];if((a=o==null?void 0:o.additional_kwargs)!=null&&a.llmUsageMetadata)return o.additional_kwargs.llmUsageMetadata}else if((i=t.additional_kwargs)!=null&&i.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"||t.toolName==="route_to_user";return{toolInvocations:[t],isResponse:r}}if(Array.isArray(t)){const r=t.filter(n=>n&&typeof n=="object"&&(n.name==="route_to_user"||n.toolName==="route_to_user")&&n.tool_call_id);if(r.length>0){const n=r.some(a=>a.name==="route_to_user"||a.toolName==="route_to_user");return{toolInvocations:r,isResponse:n}}}if(t.tool_calls&&Array.isArray(t.tool_calls)){const r=t.tool_calls.filter(n=>n&&typeof n=="object"&&(n.name==="route_to_user"||n.toolName==="route_to_user")&&n.tool_call_id);if(r.length>0){const n=r.some(a=>a.name==="route_to_user"||a.toolName==="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 containsRouteToUserTool(t){return!t||typeof t!="object"?!1:Array.isArray(t)?t.some(r=>r&&typeof r=="object"&&(r.name==="route_to_user"||r.toolName==="route_to_user")):t.name==="route_to_user"||t.toolName==="route_to_user"}static extractMessageFromLLMOutput(t){var r,n,a;if(!(!t||typeof t!="object")){if(console.log("Extracting message from LLM output:",JSON.stringify(t,null,2)),Array.isArray(t)){const i=t.find(o=>o&&typeof o=="object"&&(o.name==="route_to_user"||o.toolName==="route_to_user"));if(i){if((r=i.args)!=null&&r.message)return console.log("Found message in LLM array format: routeToUserTool.args.message"),i.args.message;if(i.message)return console.log("Found message in LLM array format: routeToUserTool.message"),i.message;if((n=i.output)!=null&&n.message)return console.log("Found message in LLM array format: routeToUserTool.output.message"),i.output.message}}else if(t.name==="route_to_user"||t.toolName==="route_to_user"){if((a=t.args)!=null&&a.message)return console.log("Found message in LLM single format: output.args.message"),t.args.message;if(t.message)return console.log("Found message in LLM single format: output.message"),t.message}console.log("No message found in LLM output")}}static extractFinalOutput(t){var i,o,s,l,c,u,f,d,h,v;const r=t.filter(g=>g.type==="node_completed"&&g.data.type==="tool"&&(g.data.name==="route_to_user"||g.data.toolName==="route_to_user")),n=t.filter(g=>g.type==="node_completed"&&g.data.type==="llm"&&g.data.output&&this.containsRouteToUserTool(g.data.output));r.length>0&&console.log("Found route_to_user tool events:",r.length),n.length>0&&console.log("Found LLM events with route_to_user:",n.length);const a=[...r,...n];if(a.sort((g,m)=>new Date(g.timestamp).getTime()-new Date(m.timestamp).getTime()),a.length>0){const g=a[a.length-1];if(g.data.type==="llm")return this.extractMessageFromLLMOutput(g.data.output)}if(r.length>0){const m=r[r.length-1].data.output;if(console.log("Route to user output structure:",JSON.stringify(m,null,2)),m)if(Array.isArray(m)){const b=m.find(O=>O&&typeof O=="object"&&(O.name==="route_to_user"||O.toolName==="route_to_user"));if(b){if((i=b.args)!=null&&i.message)return console.log("Found message in array format: routeToUserTool.args.message"),b.args.message;if(b.message)return console.log("Found message in array format: routeToUserTool.message"),b.message;if((o=b.output)!=null&&o.message)return console.log("Found message in array format: routeToUserTool.output.message"),b.output.message}}else{if((s=m.args)!=null&&s.message)return console.log("Found message at: output.args.message"),m.args.message;if(m.message)return console.log("Found message at: output.message"),m.message;if((l=m.output)!=null&&l.message)return console.log("Found message at: output.output.message"),m.output.message;if((c=m.input)!=null&&c.message)return console.log("Found message at: output.input.message"),m.input.message;if((f=(u=m.input)==null?void 0:u.args)!=null&&f.message)return console.log("Found message at: output.input.args.message"),m.input.args.message;if((d=m.data)!=null&&d.message)return console.log("Found message at: output.data.message"),m.data.message;if((h=m.result)!=null&&h.message)return console.log("Found message at: output.result.message"),m.result.message;if(typeof m=="string")try{const b=JSON.parse(m);if((v=b.args)!=null&&v.message)return console.log("Found message in parsed string: parsed.args.message"),b.args.message;if(b.message)return console.log("Found message in parsed string: parsed.message"),b.message}catch{if(m.length>10&&!m.includes("{")&&!m.includes("["))return console.log("Using output string directly as message"),m}try{return JSON.stringify(m)}catch{return m}}console.log("No message found in route_to_user output paths")}}static calculateRunTokens(t){let r=0;return t.forEach(n=>{const a=this.extractLLMUsage(n.data.output,n.data.metadata);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 iU=({isOpen:e,onClose:t,title:r,data:n,initialViewMode:a="interactive",modalHeight:i="50vh"})=>{const[o,s]=S.useState(a),l=S.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(Of,{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(Cf,{className:"w-4 h-4 text-gray-500"})})]})]}),p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(ur,{data:n,showHeader:!1,className:"h-full border-0",defaultExpanded:!0,viewMode:o,onViewModeChange:s})})]})}):null},oU=({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(fr,{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,v)=>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:[v,":"]}),p.jsx("div",{className:"flex-1",children:o(h,String(v),`${u}[${v}]`)})]},v))})]})}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(fr,{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(v=>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:['"',v,'":']}),p.jsx("div",{className:"flex-1",children:o(s[v],v,u)})]},v))})]})}return p.jsx("span",{className:"text-gray-600",children:String(s)})};return p.jsx("div",{className:"font-mono text-xs",children:o(e,"",a)})},Y0=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},ur=({data:e,padding:t="p-3",title:r="Data",className:n="",maxHeight:a="300px",showHeader:i=!0,defaultExpanded:o=!1,defaultViewMode:s="interactive",viewMode:l,onViewModeChange:c,modalHeight:u="50vh"})=>{const[f,d]=S.useState(!1),[h,v]=S.useState(s),g=S.useMemo(()=>o?new Set([""]):new Set(Y0(e)),[e,o]),[m,b]=S.useState(g);S.useEffect(()=>{o||b(new Set(Y0(e)))},[e,o]);const O=l!==void 0,x=O?l:h,j=P=>{O?c==null||c(P):v(P)},{isValidJson:y,displayContent:w}=S.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]),T=S.useCallback(P=>{b(E=>{const I=new Set(E);return I.has(P)?I.delete(P):I.add(P),I})},[]),A=S.useCallback(async()=>{const P=y?JSON.stringify(w,null,2):w;try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(P);return}const E=document.createElement("textarea");E.value=P,E.style.position="fixed",E.style.left="-999999px",E.style.top="-999999px",document.body.appendChild(E),E.focus(),E.select();try{document.execCommand("copy")}catch(I){console.warn("Copy to clipboard failed:",I)}finally{document.body.removeChild(E)}}catch(E){console.warn("Copy to clipboard failed:",E)}},[y,w]),_=S.useCallback(()=>{d(!0)},[]),C=S.useCallback(()=>{d(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`bg-white border border-gray-200 rounded-md overflow-hidden ${n}`,children:[i&&p.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between",children:[y&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>j("interactive"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${x==="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:()=>j("plain"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${x==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(Of,{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:_,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Expand to full screen",children:p.jsx(_f,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:A,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:`${t||"p-3"} overflow-auto bg-white`,style:{maxHeight:a},children:[y?x==="interactive"?p.jsx(oU,{data:w,expandedKeys:m,onToggleKey:T,keyPath:""}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre",children:JSON.stringify(w,null,2)}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre-wrap",children:w}),!w&&w!==0&&w!==!1&&p.jsx("div",{className:"text-center text-gray-400 text-sm py-8",children:"No data available"})]})]}),p.jsx(iU,{isOpen:f,onClose:C,title:r,data:w,initialViewMode:x,modalHeight:u})]})};function X0({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a,showDetailView:i=!0}){const o=S.useMemo(()=>{var A;return e.type==="GuardrailsInputScan"||e.type==="GuardrailsOutputScan"||((A=e.name)==null?void 0:A.toLowerCase().includes("guardrail"))},[e.type,e.name]),s=S.useMemo(()=>o?["summary","request"]:e.type==="llm"?["summary","request","response"]:e.type==="tool"?["request","response","logs"]:[],[e.type,o]),[l,c]=S.useState(s[0]),u=a?a.has(e.id):!1,f=e.children&&e.children.length>0;S.useEffect(()=>{s.includes(l)||c(s[0])},[s,l]);const d=A=>{A.stopPropagation(),t&&t(e.id)},h=()=>{s.length===0&&f&&t?t(e.id):n&&i&&n(e)},v=()=>{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"})}},g=()=>{var _,C;if(o)return p.jsx("div",{className:"flex-shrink-0 relative w-[24px] h-[24px] bg-gray-200 rounded-[8px] flex items-center justify-center",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"21",viewBox:"0 0 17 21",fill:"none",className:"w-[16px] h-[16px]",children:p.jsx("path",{d:"M2.86876 3.16135L2.51444 2.22622V2.22622L2.86876 3.16135ZM1.60989 3.76534L0.944868 3.01852L0.944868 3.01852L1.60989 3.76534ZM1.11768 4.483L2.05352 4.83544L1.11768 4.483ZM8.70562 1.33287L8.35129 2.26799V2.26799L8.70562 1.33287ZM8.32871 1.21247L8.18424 2.20198L8.32871 1.21247ZM7.69438 1.33287L8.04871 2.26799H8.04871L7.69438 1.33287ZM8.07129 1.21247L8.21576 2.20198L8.07129 1.21247ZM15.2823 4.483L14.3465 4.83544L15.2823 4.483ZM13.5312 3.16135L13.1769 4.09647L13.5312 3.16135ZM14.7901 3.76534L15.4551 3.01852V3.01852L14.7901 3.76534ZM8.82819 18.9787L9.33601 19.8402L8.82819 18.9787ZM8.38871 19.1854L8.17694 18.2081H8.17694L8.38871 19.1854ZM7.57181 18.9787L8.07962 18.1173L7.57181 18.9787ZM8.01129 19.1854L8.22306 18.2081L8.01129 19.1854ZM7.10461 9.12831L7.45541 10.0648C7.72607 9.96337 7.93963 9.74983 8.04104 9.47917L7.10461 9.12831ZM8.2 6.20474L9.13643 5.85388H7.26357L8.2 6.20474ZM9.29539 9.12831L8.35897 9.47917C8.46038 9.74983 8.67393 9.96337 8.94459 10.0648L9.29539 9.12831ZM12.25 10.2351L12.6008 11.1716L12.6008 9.29868L12.25 10.2351ZM9.29539 11.3419L8.94459 10.4055C8.66955 10.5085 8.4537 10.7273 8.35435 11.0037L9.29539 11.3419ZM8.2 14.3892L7.25895 14.7275H9.14105L8.2 14.3892ZM7.10461 11.3419L8.04565 11.0037C7.9463 10.7273 7.73045 10.5085 7.45541 10.4055L7.10461 11.3419ZM4.15 10.2351L3.7992 9.29868L3.7992 11.1716L4.15 10.2351ZM9.33601 19.8402C10.251 19.3009 11.9823 18.176 13.4966 16.582C15.0004 14.999 16.4 12.8356 16.4 10.2351H14.4C14.4 12.0983 13.3903 13.79 12.0466 15.2045C10.7133 16.608 9.15867 17.6231 8.32038 18.1173L9.33601 19.8402ZM16.4 10.2351V5.88609H14.4V10.2351H16.4ZM13.8856 2.22622L9.05994 0.397748L8.35129 2.26799L13.1769 4.09647L13.8856 2.22622ZM7.34006 0.397749L2.51444 2.22622L3.22309 4.09647L8.04871 2.26799L7.34006 0.397749ZM0 5.88609V10.2351H2V5.88609H0ZM0 10.2351C0 12.8356 1.39958 14.999 2.90343 16.582C4.41773 18.176 6.14904 19.3009 7.06399 19.8402L8.07962 18.1173C7.24133 17.6231 5.68674 16.608 4.35344 15.2045C3.00971 13.79 2 12.0983 2 10.2351H0ZM2.51444 2.22622C1.91725 2.4525 1.36429 2.64503 0.944868 3.01852L2.27492 4.51216C2.352 4.44352 2.47279 4.38077 3.22309 4.09647L2.51444 2.22622ZM2 5.88609C2 5.07787 2.01549 4.93642 2.05352 4.83544L0.181849 4.13057C-0.0154909 4.65457 0 5.24018 0 5.88609H2ZM0.944868 3.01852C0.60414 3.32193 0.342573 3.70379 0.181849 4.13057L2.05352 4.83544C2.10072 4.71011 2.17703 4.59933 2.27492 4.51216L0.944868 3.01852ZM9.05994 0.397748C8.91343 0.342231 8.70233 0.256421 8.47319 0.222965L8.18424 2.20198C8.15508 2.19772 8.14261 2.19201 8.16863 2.20063C8.18278 2.20531 8.2032 2.21249 8.23486 2.22419C8.26671 2.23595 8.30339 2.24984 8.35129 2.26799L9.05994 0.397748ZM8.04871 2.26799C8.09661 2.24984 8.13329 2.23595 8.16514 2.22419C8.1968 2.21249 8.21722 2.20531 8.23137 2.20063C8.25739 2.19201 8.24492 2.19772 8.21576 2.20198L7.92681 0.222965C7.69767 0.256422 7.48657 0.342232 7.34005 0.397749L8.04871 2.26799ZM8.47319 0.222965C8.29201 0.196512 8.10799 0.196512 7.92681 0.222965L8.21576 2.20198C8.20532 2.20351 8.19468 2.20351 8.18424 2.20198L8.47319 0.222965ZM16.4 5.88609C16.4 5.24018 16.4155 4.65457 16.2182 4.13057L14.3465 4.83544C14.3845 4.93642 14.4 5.07787 14.4 5.88609H16.4ZM13.1769 4.09647C13.9272 4.38077 14.048 4.44352 14.1251 4.51216L15.4551 3.01852C15.0357 2.64503 14.4827 2.4525 13.8856 2.22622L13.1769 4.09647ZM16.2182 4.13057C16.0574 3.70379 15.7959 3.32193 15.4551 3.01852L14.1251 4.51216C14.223 4.59933 14.2993 4.7101 14.3465 4.83544L16.2182 4.13057ZM8.32038 18.1173C8.2687 18.1477 8.2323 18.1692 8.20084 18.1871C8.17008 18.2046 8.15362 18.2132 8.14482 18.2175C8.13738 18.2212 8.14003 18.2195 8.14934 18.2161C8.15948 18.2124 8.16954 18.2097 8.17694 18.2081L8.60048 20.1627C8.9274 20.0919 9.16869 19.9388 9.33601 19.8402L8.32038 18.1173ZM7.06399 19.8402C7.23131 19.9388 7.4726 20.0919 7.79952 20.1627L8.22306 18.2081C8.23046 18.2097 8.24052 18.2124 8.25066 18.2161C8.25997 18.2195 8.26262 18.2212 8.25518 18.2175C8.24638 18.2132 8.22992 18.2046 8.19916 18.1871C8.1677 18.1692 8.1313 18.1477 8.07962 18.1173L7.06399 19.8402ZM8.17694 18.2081C8.18757 18.2058 8.19524 18.2045 8.19954 18.2039C8.20396 18.2032 8.20647 18.203 8.20701 18.2029C8.20764 18.2029 8.20489 18.2031 8.2 18.2031C8.19511 18.2031 8.19236 18.2029 8.19299 18.2029C8.19353 18.203 8.19604 18.2032 8.20046 18.2039C8.20476 18.2045 8.21243 18.2058 8.22306 18.2081L7.79952 20.1627C8.04819 20.2166 8.35181 20.2166 8.60048 20.1627L8.17694 18.2081ZM8.04104 9.47917L9.13643 6.5556L7.26357 5.85388L6.16818 8.77745L8.04104 9.47917ZM7.26357 6.5556L8.35897 9.47917L10.2318 8.77745L9.13643 5.85388L7.26357 6.5556ZM8.94459 10.0648L11.8992 11.1716L12.6008 9.29868L9.6462 8.19186L8.94459 10.0648ZM11.8992 9.29868L8.94459 10.4055L9.6462 12.2784L12.6008 11.1716L11.8992 9.29868ZM8.35435 11.0037L7.25895 14.0509L9.14105 14.7275L10.2364 11.6802L8.35435 11.0037ZM9.14105 14.0509L8.04565 11.0037L6.16356 11.6802L7.25895 14.7275L9.14105 14.0509ZM7.45541 10.4055L4.5008 9.29868L3.7992 11.1716L6.75381 12.2784L7.45541 10.4055ZM4.5008 11.1716L7.45541 10.0648L6.75381 8.19186L3.7992 9.29868L4.5008 11.1716Z",fill:"#101828"})})});let A="agent";switch(e.type){case"Agent":A="agent";break;case"llm":A="model";break;case"tool":A="workflowtool";break;default:A="agent"}return p.jsx(wi,{icon:e.icon,iconSource:A,size:"small",name:e.name,className:"w-[24px] h-[24px]",toolType:e.type==="tool"?(_=e.metadata)==null?void 0:_.type:void 0,provider:e.type==="llm"?(C=e.metadata)==null?void 0:C.provider:void 0,modelName:e.type==="llm"?e.name:void 0})},m=A=>A?A<1e3?`${A}ms`:`${(A/1e3).toFixed(2)}s`:"",b=A=>{if(!A)return"Tool";switch(A){case"route_to_user":return"Route to User";default:return A.split("_").map(_=>_.charAt(0).toUpperCase()+_.slice(1)).join(" ")}},O=()=>s,x=()=>{var C,P,E;const A=e.toolInvocations&&e.toolInvocations.length>0||e.children&&e.children.length>0,_=e.isResponse;return A?p.jsxs("div",{className:"space-y-1",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.jsx("span",{className:"text-xs text-gray-600",children:_?"Responded":"Invoked"}),e.toolInvocations&&e.toolInvocations.length>0&&e.toolInvocations.map((I,k)=>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:b(I.name||I.toolName)})]},I.tool_call_id||k)),(!e.toolInvocations||e.toolInvocations.length===0)&&e.children&&e.children.length>0&&e.children.map((I,k)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[I.type==="tool"?p.jsx(Vs,{className:"w-[12px] h-[12px] text-green-500 flex-shrink-0"}):p.jsx(xb,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:I.name||"Unknown"})]},I.id||k))]}),((E=(P=(C=e.toolInvocations)==null?void 0:C[0])==null?void 0:P.args)==null?void 0:E.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&&!A?p.jsx("div",{className:"space-y-1",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(Cb,{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"})},j=A=>{var _,C,P,E;if(!(!A||typeof A!="object")){if(Array.isArray(A)){const I=A.find(k=>k&&typeof k=="object"&&(k.name==="route_to_user"||k.toolName==="route_to_user"));if(I)return((_=I.args)==null?void 0:_.message)||I.message||((C=I.output)==null?void 0:C.message)}else if(A.name==="route_to_user"||A.toolName==="route_to_user")return((P=A.args)==null?void 0:P.message)||A.message||((E=A.output)==null?void 0:E.message);if(A.message&&typeof A.message=="string")return A.message;if(A.content&&typeof A.content=="string")return A.content;if(A.text&&typeof A.text=="string")return A.text}},y=()=>{if(!e.output)return null;const A=j(e.output);return p.jsx(ur,{padding:"py-1",data:A||e.output,title:"",showHeader:!1,maxHeight:"250px",defaultExpanded:!0,className:"border-0"})},w=()=>{if(!o||!e.output)return null;const A=e.output,_=A.scannersData,C=A.endFlow,P=A.endFlowMsg;return _?p.jsxs("div",{className:"space-y-3",children:[C&&P&&p.jsxs("div",{className:"flex items-start gap-2 p-3 bg-red-50 border border-red-200 rounded-md",children:[p.jsx(Gs,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),p.jsxs("div",{className:"text-xs text-red-700",children:[p.jsx("div",{className:"font-medium",children:"Guardrail Stopped"}),p.jsx("div",{className:"mt-1",children:P})]})]}),p.jsx("div",{className:"space-y-1",children:Object.entries(_).map(([E,I])=>{if(E==="error"&&I.scannerOutput)return p.jsxs("div",{className:"flex items-center justify-between p-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Gs,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),p.jsx("span",{className:"text-xs text-gray-700 capitalize",children:"Error Scanner"})]}),p.jsx("div",{className:"flex items-center gap-3",children:p.jsx("span",{className:"text-xs text-gray-500",children:I.scannerOutput.Duration})})]},E);if(I.scannerOutput){const k=I.scannerOutput.Validity,D=I.scannerOutput.RiskScore,M=I.scannerOutput.Duration;let F="text-gray-500",z="bg-gray-100";return D!==void 0&&(D===0?(F="text-green-600",z="bg-green-50"):D<=3?(F="text-yellow-600",z="bg-yellow-50"):D<=6?(F="text-orange-600",z="bg-orange-50"):(F="text-red-600",z="bg-red-50")),p.jsxs("div",{className:"flex items-center justify-between p-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[k?p.jsx(wb,{className:"w-4 h-4 text-green-500 flex-shrink-0"}):p.jsx(Gs,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),p.jsx("span",{className:"text-xs text-gray-700",children:E.replace(/([A-Z])/g," $1").trim()})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[D!==void 0&&p.jsxs("div",{className:`px-2 py-0.5 rounded text-xs font-medium ${z} ${F}`,children:["Risk: ",D]}),p.jsx("span",{className:"text-xs text-gray-500",children:M})]})]},E)}return null})})]}):null},T=()=>{switch(l){case"summary":return o?p.jsxs("div",{className:"space-y-1",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(ur,{padding:"py-1",data:e.input,title:"",showHeader:!1,maxHeight:"150px",defaultExpanded:!0,className:"border-0"})]}),e.output&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Result"}),w()]})]}):p.jsxs("div",{className:"space-y-1",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(ur,{padding:"py-1",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"}),x()]}),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"}),y()]}),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 o&&e.output?p.jsx(ur,{data:e.output,title:"Full Scanner Output",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"}):p.jsx(ur,{data:e.input,title:"Request Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"response":return p.jsx(ur,{data:e.output,title:"Response Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"logs":const A={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 A.metadata.totalLogs=A.executionLog.length,p.jsx(ur,{data:A,title:"Execution Logs",maxHeight:"400px",defaultExpanded:!0,defaultViewMode:"plain"});default:return null}};return p.jsxs("div",{className:"bg-white w-full",children:[p.jsx("div",{className:`flex items-center pl-[8px] pr-[8px] relative transition-colors cursor-pointer w-full
290
- `,onClick:h,children:p.jsxs("div",{className:"flex items-center gap-[10px] w-full",children:[p.jsx("div",{className:"p-[2px] relative top-[1px] rounded hover:bg-gray-200 cursor-pointer flex-shrink-0 z-[2]",onClick:A=>{A.stopPropagation(),f?d(A):n&&n(e)},title:f?r?"Collapse":"Expand":"Show details",children:p.jsx(ki,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${f&&r||u&&s.length>0?"rotate-90":""}`})}),p.jsxs("div",{className:"flex items-center gap-[8px] w-full py-[8px] border-b border-gray-200",children:[p.jsx("div",{className:"flex-shrink-0 rounded-[8px] bg-[#B2DDFF]",children:g()}),p.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",children:o?e.type==="GuardrailsInputScan"?"Input Guardrails Scanner":"Output Guardrails Scanner":e.type==="tool"?b(e.name):e.name}),p.jsxs("div",{className:"flex items-center gap-[12px] text-[10px] text-gray-500",children:[e.type==="Agent"&&(()=>{var _;const A=(_=e.children)==null?void 0:_.find(C=>C.type==="llm");return A!=null&&A.name?p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:A.name}):null})(),(e.type==="Agent"||e.type==="llm"||o)&&(()=>{var _,C,P,E;const A=e.type==="Agent"?(P=(C=(_=e.children)==null?void 0:_.find(I=>I.type==="llm"))==null?void 0:C.llmUsage)==null?void 0:P.total_tokens:(E=e.llmUsage)==null?void 0:E.total_tokens;return A?p.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:[A.toLocaleString()," Tokens"]}):null})(),e.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Af,{className:"w-[12px] h-[12px]"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:m(e.duration)})]})]}),p.jsx("div",{className:"flex-shrink-0",children:v()})]})]})}),u&&s.length>0&&i&&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",children:[p.jsx("div",{className:"bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200",children:O().map(A=>p.jsx("button",{onClick:()=>c(A),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 ${l===A?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:A.charAt(0).toUpperCase()+A.slice(1)},A))}),p.jsx("div",{className:"px-[4px]",children:T()})]})]}),r&&f&&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(A=>p.jsx(X0,{node:A,onToggle:t,isExpanded:A.isExpanded,onNodeClick:n,selectedNodeIds:a,showDetailView:i},A.id))]})]})}const Z0=S.forwardRef(({executionEvents:e,sessionId:t,config:r={},onNodeExpand:n,onNodeCollapse:a,className:i=""},o)=>{const[s,l]=S.useState(new Set),[c,u]=S.useState(new Set),[f,d]=S.useState(new Set),{expansionMode:h="all",showExpansionControls:v=!1,defaultDetailView:g=!0}=r,[m,b]=S.useState(h),[O,x]=S.useState(new Set),[j,y]=S.useState(e),w=S.useRef(e.length);S.useEffect(()=>{y(e),e.length===0?(l(new Set),u(new Set),d(new Set),_.current=!1,w.current=0):(e.length>w.current&&(_.current=!0),w.current=e.length)},[e]);const T=S.useRef(0),A=S.useRef(null),_=S.useRef(!1);S.useImperativeHandle(o,()=>({addEvent:R=>{y(G=>[...G,R]),_.current=!0},addEvents:R=>{y(G=>[...G,...R]),_.current=!0},clearEvents:()=>{y([]),l(new Set),u(new Set),d(new Set),_.current=!1}}),[]);const C=S.useMemo(()=>{const R=K0.buildSessionTree(j,t);return A.current=R,R},[j,t]),P=R=>{const G=[],Y=te=>{G.push(te.id),te.children.forEach(V=>Y(V))};return R.runs.forEach(te=>{te.rootNodes.forEach(V=>Y(V))}),G},E=S.useCallback(()=>{const R=P(C);l(new Set(R));const G=C.runs.map(Y=>Y.runId);d(new Set(G))},[C]),I=S.useCallback(()=>{if(m==="none"){const R=new Set;C.runs.forEach(G=>{G.rootNodes.forEach(Y=>{R.add(Y.id)})}),l(R)}else l(new Set)},[m,C]),k=S.useCallback(()=>{if(C.runs.length>0){const R=C.runs[C.runs.length-1];if(R.rootNodes.length>0){const G=R.rootNodes[R.rootNodes.length-1],Y=[],te=V=>{if(Y.push(V.id),V.children.length>0){const Z=V.children[V.children.length-1];te(Z)}};te(G),l(new Set(Y)),d(V=>{const Z=new Set(V);return Z.add(R.runId),Z})}}},[C]),D=S.useCallback(R=>{x(G=>{const Y=new Set(G);return Y.has(R)?Y.delete(R):Y.add(R),Y})},[]);S.useEffect(()=>{if(g){const R=C.runs.map(G=>G.runId);x(new Set(R))}},[C.runs,g]);const M=S.useRef(null);S.useEffect(()=>{j.length>T.current&&M.current&&setTimeout(()=>{M.current&&M.current.scrollTo({top:M.current.scrollHeight,behavior:"smooth"})},100),T.current=j.length},[j.length]),S.useEffect(()=>{if(j.length>0&&C.runs.length>0){if(_.current){switch(m){case"all":const R=P(C);l(new Set(R));break;case"last":k();break;case"none":l(G=>{const Y=new Set;return C.runs.forEach(te=>{te.rootNodes.forEach(V=>{Y.add(V.id)})}),Y});break}_.current=!1}else if(m==="none"&&s.size===0&&C.runs.length>0){const R=new Set;C.runs.forEach(G=>{G.rootNodes.forEach(Y=>{R.add(Y.id)})}),R.size>0&&l(R)}if(d(R=>{const G=new Set(R);return C.runs.forEach(Y=>{G.has(Y.runId)||G.add(Y.runId)}),G}),m!=="none"){const R=C.runs[C.runs.length-1];if(R.rootNodes.length>0){const G=R.rootNodes[R.rootNodes.length-1],Y=K(G);Y&&u(te=>{const V=new Set(te);return V.add(Y.id),V})}}}},[C,m,k,s.size]);const F=S.useCallback(R=>{l(G=>{const Y=new Set(G);return Y.has(R)?(Y.delete(R),a==null||a(R)):(Y.add(R),n==null||n(R)),Y})},[n,a]),z=S.useCallback(R=>{u(G=>{const Y=new Set(G);return Y.has(R.id)?Y.delete(R.id):Y.add(R.id),Y})},[]),q=S.useCallback(R=>{d(G=>{const Y=new Set(G);return Y.has(R)?Y.delete(R):Y.add(R),Y})},[]),$=S.useCallback(R=>({...R,isExpanded:s.has(R.id),children:R.children.map(Y=>$(Y))}),[s]),B=R=>R?R<1e3?`${R}ms`:`${(R/1e3).toFixed(2)}s`:"",U=R=>R?R>=1e6?`${(R/1e6).toFixed(1)}M tokens`:R>=1e3?`${(R/1e3).toFixed(1)}K tokens`:`${R} tokens`:"",W=async R=>{try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(R);return}const G=document.createElement("textarea");G.value=R,G.style.position="fixed",G.style.left="-999999px",G.style.top="-999999px",document.body.appendChild(G),G.focus(),G.select();try{document.execCommand("copy")}catch(Y){console.warn("Copy to clipboard failed:",Y)}finally{document.body.removeChild(G)}}catch(G){console.warn("Copy to clipboard failed:",G)}},K=R=>R.children.length===0?R:K(R.children[R.children.length-1]);return C.runs.length?p.jsx("div",{className:`flex flex-col h-full bg-white ${i}`,children:p.jsxs("div",{className:"flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden",ref:M,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:C.sessionId}),p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",onClick:()=>W(C.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(jf,{className:"w-[12px] h-[12px]"})})]})]}),v&&p.jsxs("div",{className:"flex items-center justify-between gap-4 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs font-medium text-gray-700",children:"Expansion:"}),p.jsxs("button",{onClick:E,className:"flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",title:"Expand all nodes",children:[p.jsx(_b,{className:"w-3 h-3"}),"Expand All"]}),p.jsxs("button",{onClick:k,className:"flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",title:"Expand only the last execution path",children:[p.jsx(Tb,{className:"w-3 h-3"}),"Expand Last"]}),p.jsxs("button",{onClick:I,className:"flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",title:"Collapse all nodes",children:[p.jsx(Pb,{className:"w-3 h-3"}),"Collapse All"]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs font-medium text-gray-700",children:"Live Mode:"}),p.jsxs("select",{value:m,onChange:R=>b(R.target.value),className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",title:"Control auto-expansion behavior during live updates",children:[p.jsx("option",{value:"all",children:"Expand All"}),p.jsx("option",{value:"last",children:"Expand Last"}),p.jsx("option",{value:"none",children:"No Auto-Expand"})]})]})]}),C.runs.map(R=>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",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("div",{className:"flex-1 cursor-pointer select-none",onClick:()=>q(R.runId),title:f.has(R.runId)?"Collapse run":"Expand run",children:p.jsx("span",{className:"text-xs text-gray-900 truncate",children:R.userInput||`Run ${R.runId}`})}),p.jsx("button",{onClick:G=>{G.stopPropagation(),D(R.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:O.has(R.runId)?"Hide node details":"Show node details",children:O.has(R.runId)?p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",children:p.jsx("path",{d:"M0.666992 11.3327L4.00033 7.99935L7.33366 11.3327M0.666992 0.666016L4.00033 3.99935L7.33366 0.666016",stroke:"#98A2B3",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}):p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",children:p.jsx("path",{d:"M0.666992 0.666016L4.00033 3.99935L7.33366 0.666016M0.666992 11.3327L4.00033 7.99935L7.33366 11.3327",stroke:"#98A2B3",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})}),p.jsx("button",{onClick:G=>{G.stopPropagation(),q(R.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:f.has(R.runId)?"Collapse run":"Expand run",children:p.jsx(fr,{className:`w-[16px] h-[16px] text-gray-400 transition-transform ${f.has(R.runId)?"rotate-180":""}`})})]})}),f.has(R.runId)&&p.jsx("div",{className:"bg-white w-full flex flex-col",children:R.rootNodes&&R.rootNodes.map(G=>p.jsx("div",{className:"w-full",children:p.jsx(X0,{node:$(G),onToggle:F,isExpanded:s.has(G.id),onNodeClick:z,selectedNodeIds:c,showDetailView:O.has(R.runId)})},G.id))}),R.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:R.finalOutput,children:R.finalOutput}),p.jsxs("div",{className:"flex items-center gap-[8px] flex-shrink-0",children:[R.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Af,{className:"w-[12px] h-[12px] text-gray-400"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:B(R.duration)})]}),R.totalTokens&&p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:U(R.totalTokens)})]})]})]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[p.jsx("span",{className:"text-xs text-gray-400",children:R.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:()=>W(R.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(jf,{className:"w-3 h-3 text-gray-400"})})]})]})]},R.runId))]})}):p.jsx("div",{className:`flex flex-col h-full ${i}`,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"})})})});Z0.displayName="DebugPanel";const J0=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=S.useState(e),[c,u]=S.useState(!1),[f,d]=S.useState(!1),h=S.useRef(null);S.useEffect(()=>{l(e)},[e]);function v(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function g(x){const j=x.target.value;l(j),t==null||t(j)}const m=()=>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:v,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(jb,{size:16}):p.jsx(_f,{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:g}),O=p.jsxs("div",{className:se("flex flex-col h-full w-full border rounded-md bg-background",i),style:{minHeight:"200px"},children:[p.jsx(m,{}),p.jsx(b,{})]});return c?p.jsx(mf,{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:O})})}):O};J0.displayName="CodeEditor";const Q0=S.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}));Q0.displayName="Avatar";const eb=S.forwardRef(({className:e,...t},r)=>p.jsx("img",{ref:r,className:se("aspect-square h-full w-full",e),...t}));eb.displayName="AvatarImage";const tb=S.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}));tb.displayName="AvatarFallback";const rb=S.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}));rb.displayName="Card";const sU=S.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}));sU.displayName="CardHeader";const lU=S.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}));lU.displayName="CardTitle";const cU=S.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("p-6 pt-0",e),...r,children:t}));cU.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"],Us=["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"],uU=(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),v=Math.floor(d*8+Math.random()*300),g=Math.floor(h*.3+Math.random()*100),m=Math.floor(h*.25+Math.random()*80),b=Math.floor(h*.2+Math.random()*60),O=Math.floor(h*.15+Math.random()*50),x={};Bs.forEach(w=>{const T=w.replace(/\s+/g,"").toLowerCase(),A=Math.floor(d/Bs.length);x[T]=Math.floor(A+Math.random()*(A*.5))});const j={};Fs.forEach(w=>{const T=w.replace(/[-]/g,""),A=Math.floor(h/Fs.length);j[T]=Math.floor(A+Math.random()*(A*.8))});const y={};Us.forEach(w=>{const T=w.replace(/[-\.]/g,""),A=Math.floor(v/Us.length);y[T]=Math.floor(A+Math.random()*(A*.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:v,codeTools:g,workflowTools:m,knowledgeTools:b,mcpTools:O,...x,...j,...y,value:o})}return t},fU=()=>{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},dU=()=>{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]}))},pU=()=>Us.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()})),Jr=uU(),hU=fU(),mU=dU(),vU=pU(),gU={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:Jr,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:Jr,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:Jr,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:Jr,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:Jr,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:hU,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:Jr,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:mU,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:Jr,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:vU,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"},...Us.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"]}},yU={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"}},bU={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"}},xU={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"}},nb=(e,t)=>e.primary[t%e.primary.length],ji=(e,t)=>e.semantic[t],wU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},ab=(e,t=Yt)=>e.map((r,n)=>({...r,color:nb(t,n)})),Ws=((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),v=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:v,value:o})}return t})(),OU={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:Ws,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:Ws,lines:ab([{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:Ws,lines:[{dataKey:"users",color:ji(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:ji(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:ji(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:ji(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:Ws,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}}]},SU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},TU={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},AU={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}},jU=`
294
+ </svg>`},FB=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Bt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Bt.toolLibrary;if(r.includes("knowledge"))return Bt.KNOWLEDGE;if(r.includes("mcp"))return Bt.MCP;if(Bt[e])return Bt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Bt.inlineTool:n.includes("library")||n.includes("workflow")?Bt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Bt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Bt.MCP:Bt.toolLibrary},wi=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,c]=S.useState(!1),[u,f]=S.useState(!1),[d,h]=S.useState(!1),g=IB(e),v=BB[r];if(t==="model"){const w=E0(o),x=()=>{h(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${v} rounded-[8px] bg-gray-200 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-gray-900 text-xs font-bold",children:A})})}return p.jsx("img",{src:w,alt:s||a,className:`${v} rounded-[8px] ${n}`,onError:x})}if(g!=null&&g.name&&g.name!=="fallback"&&!l){const w=RB(g,t),x=()=>{c(!0)};return p.jsx("img",{src:w,alt:a,className:`${v} rounded-[8px] object-cover ${n}`,onError:x})}if(l&&!u&&t==="agent"){const w=`${window.location.origin}/agenticai/assets/agent-avatars/avatar1.svg`,x=()=>{f(!0)};return p.jsx("img",{src:w,alt:a,className:`${v} rounded-[8px] object-cover ${n}`,onError:x})}if(t==="model"){const w=E0(o),x=()=>{h(!0)};if(d){const A=o?o.charAt(0).toUpperCase():"🤖";return p.jsx("div",{className:`${v} rounded-[8px] bg-gray-200 flex items-center justify-center ${n}`,children:p.jsx("span",{className:"text-gray-900 text-xs font-bold",children:A})})}return p.jsx("img",{src:w,alt:s||a,className:`${v} rounded-[8px] ${n}`,onError:x})}const m=g||LB(a,t);if(t==="workflowtool"){const w=i||m.type||"toolLibrary",x=FB(w,a);return p.jsx("div",{className:`${v} rounded-[8px] flex items-center justify-center bg-gray-100 ${n}`,children:p.jsx("div",{dangerouslySetInnerHTML:{__html:x}})})}const b=`${window.location.origin}/agenticai/assets/agent-avatars/avatar1.svg`;return p.jsx("img",{src:b,alt:a,className:`${v} rounded-[8px] object-cover ${n}`})},C0=({data:e,className:t})=>{const[r,n]=S.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 UB(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 WB(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 $0=({data:e,className:t})=>{const[r,n]=S.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",UB(o.toolType||o.type||"Default")),children:WB(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"})})]})},zB=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"},VB=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)},GB=({provider:e})=>{const[t,r]=S.useState(!1),n=zB(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})},k0=({data:e,className:t})=>{const[r,n]=S.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(GB,{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:VB(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"})})]})},HB=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"}}},qB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),M0=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var O;const s=HB(n),[l,c]=S.useState(10),[u,f]=S.useState("all"),[d,h]=S.useState(!1),g=[{label:`All ${s.entityName}`,value:"all"},...a.map(T=>({label:T.name,value:T.id}))],v=u==="all"?a:a.filter(T=>T.id===u),m=()=>{f("all"),h(!1),c(10),t()};S.useEffect(()=>{const T=C=>{C.key==="Escape"&&m()},j=C=>{d&&(C.target.closest(".filter-dropdown")||h(!1))};return e&&(document.addEventListener("keydown",T),document.addEventListener("mousedown",j),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",T),document.removeEventListener("mousedown",j),document.body.style.overflow="unset"}},[e,d,m]),S.useEffect(()=>{e&&(f("all"),h(!1),c(10))},[e]);const b=T=>new Date(T).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),w=()=>{c(T=>Math.min(T+10,v.length))},x=T=>{f(T),h(!1),c(10)};if(!e)return null;const A=v.slice(0,l),y=((O=g.find(T=>T.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:m}),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:m,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:p.jsx($f,{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:y}),p.jsx(fr,{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:g.map(T=>p.jsx("button",{onClick:()=>x(T.value),className:se("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",u===T.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:T.label},T.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((T,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:T.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"model",size:"small",name:T.name,toolType:T.toolType||T.type,provider:T.provider,modelName:T.modelName})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:T.name}),n==="modelRuns"&&T.provider&&p.jsx("div",{className:"text-xs text-[#475467] truncate",children:T.provider})]})]}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:qB(T.runs)})}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:T.responseTime})})]},T.id||j)),l<v.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:w,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 N0{constructor(t=""){$t(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");$t(this,"baseUrl","");$t(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 D0{constructor(t){$t(this,"endpointsService");$t(this,"defaultHeaders");$t(this,"timeout");this.endpointsService=new N0(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 Kt{constructor(t){$t(this,"apiInvoker");$t(this,"projectId");$t(this,"environment");$t(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new D0(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`,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(v=>{const m=v.count||0,b=(v.toolType||v.tool_type||"").toLowerCase(),w=(v.toolName||v.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:w,count:m});const x=b.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(b)||["inlinetool","tool","code","codetool","event"].includes(x)?c+=m:["toollibrary","toolLibrary","workflow","workflowtool"].includes(b)||["toollibrary","workflow","workflowtool"].includes(x)?u+=m:["knowledge","KNOWLEDGE","knowledgetool"].includes(b)||["knowledge","knowledgetool"].includes(x)?f+=m:["mcp","MCP","mcptool","mcpTool"].includes(b)||["mcp","mcptool"].includes(x)?d+=m:(console.log(`Unknown tool type '${b}' for tool '${w}', defaulting to code tools`),c+=m)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:c,workflowTools:u,knowledgeTools:f,mcpTools:d,total:c+u+f+d,expectedTotal:l});const g=c+u+f+d;if(Math.abs(g-l)>1){console.warn(`Breakdown total (${g}) doesn't match expected total (${l}) for point ${a}`);const v=l-g;c+=v,console.log(`Adjusted codeTools by ${v} 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,g=Math.abs(a.getTime()-n.getTime()),v=g<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:c,toDateStr:u,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:g,isVeryClose:v,fromStartOfDay:d.toISOString(),recommended:f||h||v||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||v||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const I0=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,c]=S.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),u=(v,m)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:v,date:m,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 w=v.listView||[];console.log("ListView data for clicked date:",w);const A=new Kt({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(w,b),y=v[b]||v.count||0;console.log("Opening slider with data:",{date:m,metricType:b,sliderData:A,totalRuns:y}),c({isOpen:!0,date:m,metricType:b,data:A,totalRuns:y})},f=()=>{c(v=>({...v,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(P0,{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(C0,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx($0,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(k0,{data:o.data})}):p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(_0,{config:o})}):null,g=()=>{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:g()}),p.jsx(M0,{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]=S.useState(!1),[l,c]=S.useState(t||""),u=S.useRef(null),f=e.find(g=>g.value===l);S.useEffect(()=>{const g=v=>{u.current&&!u.current.contains(v.target)&&s(!1)};return o&&document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[o]);const d=g=>{i||(c(g),s(!1),n==null||n(g))},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(fr,{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(g=>{const v=l===g.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",g.disabled?"opacity-50 cursor-not-allowed text-gray-400":v?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-50"),onClick:()=>!g.disabled&&d(g.value),disabled:g.disabled,children:p.jsx("span",{className:"block whitespace-nowrap w-full",children:g.label})}),g.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:[g.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"})]})})]},g.value)})})]})},L0=({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]=S.useState(!1),[d,h]=S.useState(""),[g,v]=S.useState(()=>{const k=t||r;return a?Array.isArray(k)?k:k?[k]:[]:k?[Array.isArray(k)?k[0]:k]:[]}),m=S.useRef(null);S.useEffect(()=>{const k=P=>{m.current&&!m.current.contains(P.target)&&f(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const b=(k,P=c)=>k.length<=P?k:k.substring(0,P)+"...",w=i?e.filter(k=>k.label.toLowerCase().includes(d.toLowerCase())):e,x=w.slice(0,l),A=w.length>l,y=k=>{let P;if(a){if(k==="all"){T();return}if(g.includes(k))P=g.filter(F=>F!==k),P=P.filter(F=>F!=="all");else{P=g.filter(L=>L!=="all"),P=[...P,k];const F=w.filter(L=>L.value!=="all").map(L=>L.value),N=P.filter(L=>L!=="all");N.length===F.length&&(P=["all",...N])}}else P=[k],f(!1);v(P);const E=a?P:P[0]||"";o==null||o(E)},O=()=>{if(!a)return{checked:!1,indeterminate:!1};const k=w.filter(E=>E.value!=="all").map(E=>E.value),P=g.filter(E=>E!=="all"&&k.includes(E));return g.includes("all")&&P.length===0?{checked:!1,indeterminate:!1}:P.length===0?{checked:!1,indeterminate:!1}:P.length===k.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},T=()=>{if(!a)return;const k=O(),P=w.filter(E=>E.value!=="all").map(E=>E.value);if(k.checked)v(["all"]),o==null||o(["all"]);else{const E=["all",...P];v(E),o==null||o(E)}},j=()=>{v(["all"]),o==null||o(a?["all"]:"all")},C=()=>{if(!a){if(g.length===0)return n;const F=e.find(N=>N.value===g[0]);return(F==null?void 0:F.label)||n}const k=g.filter(F=>F!=="all"),P=g.includes("all");if(k.length===0)return n;if(k.length===1){const F=e.find(N=>N.value===k[0]);return(F==null?void 0:F.label)||n}const E=e.filter(F=>F.value!=="all").length;return k.length===E?"All selected":`${k.length} selected`};return p.jsxs("div",{className:se("relative",s),ref:m,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",g.length===0&&"text-gray-500"),children:C()}),p.jsx(fr,{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(Cf,{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:k=>h(k.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:T,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 k=O();return k.indeterminate||k.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const k=O();return k.indeterminate?p.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):k.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:[x.length===0?p.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):x.map(k=>{let P;return k.value==="all"?null:(P=g.includes(k.value),p.jsxs("div",{className:"relative group",children:[p.jsxs("div",{onClick:()=>y(k.value),className:se("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",P&&"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",P?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:P&&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",P?"border-blue-600 bg-blue-600":"border-gray-300"),children:P&&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",P?"font-medium text-gray-700":"text-gray-500"),children:b(k.label)})]}),k.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:[k.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"})]})})]},k.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:["+",w.length-l," more items"]}),i&&p.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},R0=({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(L0,{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(wb,{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(Mb,{className:"w-[16px] h-[16px]"})})]})]})},B0=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var Y;const{id:i,title:o,description:s,metrics:l,view:c,controls:u,layout:f}=e,[d,h]=S.useState(c.type),[g,v]=S.useState("chart"),m=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,w]=S.useState(m()),[x,A]=S.useState("all"),y=$=>{var _,U,V,I,z;const B=j();(_=B==null?void 0:B.controls)!=null&&_.toggle?(v($),(V=(U=B.controls.toggle).onToggle)==null||V.call(U,$)):(h($),(z=(I=u==null?void 0:u.toggle)==null?void 0:I.onToggle)==null||z.call(I,$))},O=$=>{var U,V;const B=$.metricType||$.title.toLowerCase();w(B);const _=l.find(I=>(I.metricType||I.title.toLowerCase())===B);(V=(U=_==null?void 0:_.controls)==null?void 0:U.dropdown)!=null&&V.multiSelect?A(["all"]):A("all"),a==null||a($)},T=$=>{var _,U,V;A($);const B=l.find(I=>(I.metricType||I.title.toLowerCase())===b);(V=(U=(_=B==null?void 0:B.controls)==null?void 0:_.dropdown)==null?void 0:U.onChange)==null||V.call(U,$)},j=()=>l.find($=>($.metricType||$.title.toLowerCase())===b)||null,C=$=>Array.isArray($)?$.filter(_=>_!=="all").length>0:$!=="all",k=$=>Array.isArray($)?$.filter(B=>B!=="all"):$!=="all"?[$]:[],P=$=>{var V,I,z,q,Q,G,Z,ee,R;const B=((I=(V=$.view)==null?void 0:V.chart)==null?void 0:I.data)||((z=c.chart)==null?void 0:z.data)||[];if(!C(x))return B;const _=$.metricType,U=k(x);if(U.length===1){const oe=U[0],X=j(),ce=(G=(Q=(q=X==null?void 0:X.controls)==null?void 0:q.dropdown)==null?void 0:Q.options)==null?void 0:G.find(me=>me.value===oe),re=ce==null?void 0:ce.label;return console.log("🔍 Filtering chart data:",{metricType:_,singleFilter:oe,selectedLabel:re,baseDataSample:B[0]}),B.map(me=>{let We=0;return me.listView&&Array.isArray(me.listView)&&(We=me.listView.filter(Ge=>_==="agentRuns"&&Ge.agentName?Ge.agentName===re||Ge.agentName.toLowerCase()===(re==null?void 0:re.toLowerCase()):_==="toolRuns"&&Ge.toolName?Ge.toolName===re||Ge.toolName.toLowerCase()===(re==null?void 0:re.toLowerCase()):_==="modelRuns"&&Ge.modelName?Ge.modelName===re||Ge.modelName.toLowerCase()===(re==null?void 0:re.toLowerCase()):!1).reduce((Ge,ct)=>Ge+(ct.count||0),0)),console.log("📊 Filtered value for",re,":",We),{...me,[_]:We}})}if(U.length>1){const oe=j(),ce=(((R=(ee=(Z=oe==null?void 0:oe.controls)==null?void 0:Z.dropdown)==null?void 0:ee.options)==null?void 0:R.filter(re=>U.includes(re.value)))||[]).map(re=>re.label);return B.map(re=>{let me=0;return re.listView&&Array.isArray(re.listView)&&(me=re.listView.filter(Be=>_==="agentRuns"&&Be.agentName?ce.some(Fe=>Be.agentName===Fe||Be.agentName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):_==="toolRuns"&&Be.toolName?ce.some(Fe=>Be.toolName===Fe||Be.toolName.toLowerCase()===(Fe==null?void 0:Fe.toLowerCase())):_==="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)),{...re,[_]:me}})}return B},E=$=>{var V;if(!((V=$.view)!=null&&V.chart))return null;const B=P($),_=()=>{var z,q,Q,G,Z,ee;if(!C(x)||!((z=$.controls)!=null&&z.dropdown))return((Q=(q=$.view)==null?void 0:q.chart)==null?void 0:Q.title)||$.title;const I=k(x);if(I.length===1){const R=(G=$.controls.dropdown.options)==null?void 0:G.find(oe=>oe.value===I[0]);return R?`${R.label}`:((ee=(Z=$.view)==null?void 0:Z.chart)==null?void 0:ee.title)||$.title}return`${I.length} selected`},U=k(x);return $.metricType==="toolRuns"&&U.length===1?{...$.view.chart,data:B,title:_(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:$.metricType==="modelRuns"&&U.length===1?{...$.view.chart,data:B,title:_(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...$.view.chart,data:B,title:_()}},F=($,B)=>{if(!C(x))return $;const _=k(x);if(_.length===1){const U=_[0];if(i==="runs"&&B==="agentRuns")return $.map(V=>({...V,agentRuns:V[U]||0}));if(i==="runs"&&B==="toolRuns")return $.map(V=>({...V,toolRuns:V[U.replace(/[-]/g,"")]||0}));if(i==="runs"&&B==="modelRuns")return $.map(V=>({...V,modelRuns:V[U.replace(/[-\.]/g,"")]||0}))}return $},N=$=>{var V;const B=((V=c.chart)==null?void 0:V.data)||[],_=F(B,$),U=I=>{var q,Q;if(!C(x))return I;const z=k(x);if(z.length===1){const G=(Q=(q=u==null?void 0:u.dropdown)==null?void 0:q.options)==null?void 0:Q.find(Z=>Z.value===z[0]);return G?`${G.label}`:I}return`${z.length} selected`};switch($){case"users":return{type:"line",title:"Total Users",data:B,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:B,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:B,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:B,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:U("Agent Runs"),data:_,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 k(x).length===1?{type:"line",title:U("Tool Runs"),data:F(B,"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:_,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 k(x).length===1?{type:"line",title:U("Model Runs"),data:F(B,"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:U("Model Runs"),data:_,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}},L=(()=>{const $=j();return $!=null&&$.controls?{...$.controls,dropdown:$.controls.dropdown?{...$.controls.dropdown,onChange:T}:void 0,toggle:$.controls.toggle?{...$.controls.toggle,chartView:g==="chart",tableView:g==="table",onToggle:y}:void 0}:u?{...u,dropdown:u.dropdown?{...u.dropdown,onChange:T}:void 0,toggle:u.toggle?{...u.toggle,chartView:d==="chart",tableView:d==="table",onToggle:y}:void 0}:void 0})(),W=(()=>{var _,U,V,I,z,q,Q,G,Z,ee;const $=j();if($!=null&&$.view){if((_=$.controls)!=null&&_.toggle){if(g==="table"&&$.view.table){let oe=$.view.table.data;if($.metricType==="agentRuns"&&C(x)){const X=k(x);if(X.length>0){const ce=((I=(V=(U=$.controls)==null?void 0:U.dropdown)==null?void 0:V.options)==null?void 0:I.filter(re=>X.includes(re.value)))||[];ce.length>0&&(oe=oe.filter(re=>ce.some(me=>re.name===me.label||re.name&&re.name.toLowerCase().includes(me.label.toLowerCase()))))}}if($.metricType==="toolRuns"&&C(x)){const X=k(x);if(X.length>0){const ce=((Q=(q=(z=$.controls)==null?void 0:z.dropdown)==null?void 0:q.options)==null?void 0:Q.filter(re=>X.includes(re.value)))||[];ce.length>0&&(oe=oe.filter(re=>ce.some(me=>re.name===me.label||re.name&&re.name.toLowerCase().includes(me.label.toLowerCase()))))}}if($.metricType==="modelRuns"&&C(x)){const X=k(x);if(X.length>0){const ce=((ee=(Z=(G=$.controls)==null?void 0:G.dropdown)==null?void 0:Z.options)==null?void 0:ee.filter(re=>X.includes(re.value)))||[];ce.length>0&&(oe=oe.filter(re=>ce.some(me=>re.name===me.label||re.name&&re.name.toLowerCase().includes(me.label.toLowerCase()))))}}return{type:"table",table:{...$.view.table,data:oe}}}else if(g==="chart"&&$.view.chart)return{type:"chart",chart:E($)||$.view.chart}}const R=E($);return R?{...$.view,chart:R}:$.view}const B=N(b);return B?{type:"chart",chart:B}:{...c,type:d}})(),H=()=>l.map($=>{const B=$.metricType||$.title.toLowerCase();return{...$,highlighted:$.highlighted||B===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,{})})]}):H().map(($,B)=>p.jsx("div",{className:"flex-1",children:p.jsx(Ff,{data:$,onClick:O,isFirst:B===0})},`${i}-metric-${B}`))}),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:(Y=j())==null?void 0:Y.title})}),L&&p.jsx(R0,{config:L})]}),p.jsx(I0,{config:W,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},df=S.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})});df.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 Ne(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ve(e){Ne(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 KB(e,t){Ne(2,arguments);var r=Ve(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function pf(e,t){Ne(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 YB(e,t){Ne(2,arguments);var r=Ve(e).getTime(),n=Et(t);return new Date(r+n)}var XB={};function Oi(){return XB}function ZB(e,t){var r,n,a,i,o,s;Ne(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 JB(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){Ne(1,arguments);var t=Ve(e);return t.setHours(0,0,0,0),t}function Si(e,t){Ne(2,arguments);var r=aa(e),n=aa(t);return r.getTime()===n.getTime()}function QB(e){return Ne(1,arguments),e instanceof Date||Ns(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function eF(e){if(Ne(1,arguments),!QB(e)&&typeof e!="number")return!1;var t=Ve(e);return!isNaN(Number(t))}function tF(e){Ne(1,arguments);var t=Ve(e);return t.setHours(23,59,59,999),t}function rF(e){Ne(1,arguments);var t=Ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function nF(e,t){Ne(2,arguments);var r=Et(t);return YB(e,-r)}var aF=864e5;function iF(e){Ne(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/aF)+1}function Ds(e){Ne(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 F0(e){Ne(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 oF(e){Ne(1,arguments);var t=F0(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ds(r);return n}var sF=6048e5;function lF(e){Ne(1,arguments);var t=Ve(e),r=Ds(t).getTime()-oF(t).getTime();return Math.round(r/sF)+1}function Is(e,t){var r,n,a,i,o,s,l,c;Ne(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(),g=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-g),d.setUTCHours(0,0,0,0),d}function U0(e,t){var r,n,a,i,o,s,l,c;Ne(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 g=new Date(0);g.setUTCFullYear(f+1,0,h),g.setUTCHours(0,0,0,0);var v=Is(g,t),m=new Date(0);m.setUTCFullYear(f,0,h),m.setUTCHours(0,0,0,0);var b=Is(m,t);return u.getTime()>=v.getTime()?f+1:u.getTime()>=b.getTime()?f:f-1}function cF(e,t){var r,n,a,i,o,s,l,c;Ne(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=U0(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var g=Is(h,t);return g}var uF=6048e5;function fF(e,t){Ne(1,arguments);var r=Ve(e),n=Is(r,t).getTime()-cF(r,t).getTime();return Math.round(n/uF)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var _r={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return _e(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(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 _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(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 _e(i,r.length)}},ia={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dF={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 _r.y(t,r)},Y:function(t,r,n,a){var i=U0(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=F0(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(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 _e(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 _e(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 _r.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 _e(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=fF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=lF(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):_r.d(t,r)},D:function(t,r,n){var a=iF(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_e(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 _e(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 _e(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 _e(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 _r.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):_r.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):_r.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):_r.s(t,r)},S:function(t,r){return _r.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 z0(o);case"XXXX":case"XX":return Zr(o);case"XXXXX":case"XXX":default:return Zr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return z0(o);case"xxxx":case"xx":return Zr(o);case"xxxxx":case"xxx":default:return Zr(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"+W0(o,":");case"OOOO":default:return"GMT"+Zr(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"+W0(o,":");case"zzzz":default:return"GMT"+Zr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return _e(o,r.length)}};function W0(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+_e(i,2)}function z0(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return Zr(e,t)}function Zr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=_e(Math.floor(a/60),2),o=_e(a%60,2);return n+i+r+o}var V0=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"})}},G0=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"})}},pF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return V0(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}}",V0(a,r)).replace("{{time}}",G0(i,r))},hF={p:G0,P:pF},mF=["D","DD"],gF=["YY","YYYY"];function vF(e){return mF.indexOf(e)!==-1}function yF(e){return gF.indexOf(e)!==-1}function H0(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 bF={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"}},xF=function(t,r,n){var a,i=bF[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 hf(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 wF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},OF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},SF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TF={date:hf({formats:wF,defaultWidth:"full"}),time:hf({formats:OF,defaultWidth:"full"}),dateTime:hf({formats:SF,defaultWidth:"full"})},AF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jF=function(t,r,n,a){return AF[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 PF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_F={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},EF={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"]},CF={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"]},$F={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"}},kF={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"}},MF=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"},NF={ordinalNumber:MF,era:Ti({values:PF,defaultWidth:"wide"}),quarter:Ti({values:_F,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ti({values:EF,defaultWidth:"wide"}),day:Ti({values:CF,defaultWidth:"wide"}),dayPeriod:Ti({values:$F,defaultWidth:"wide",formattingValues:kF,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)?IF(s,function(f){return f.test(o)}):DF(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 DF(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function IF(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function LF(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 RF=/^(\d+)(th|st|nd|rd)?/i,BF=/\d+/i,FF={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},UF={any:[/^b/i,/^(a|c)/i]},WF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zF={any:[/1/i,/2/i,/3/i,/4/i]},VF={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},GF={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]},HF={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},qF={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]},KF={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},YF={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}},XF={ordinalNumber:LF({matchPattern:RF,parsePattern:BF,valueCallback:function(t){return parseInt(t,10)}}),era:Ai({matchPatterns:FF,defaultMatchWidth:"wide",parsePatterns:UF,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:WF,defaultMatchWidth:"wide",parsePatterns:zF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ai({matchPatterns:VF,defaultMatchWidth:"wide",parsePatterns:GF,defaultParseWidth:"any"}),day:Ai({matchPatterns:HF,defaultMatchWidth:"wide",parsePatterns:qF,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:KF,defaultMatchWidth:"any",parsePatterns:YF,defaultParseWidth:"any"})},ZF={code:"en-US",formatDistance:xF,formatLong:TF,formatRelative:jF,localize:NF,match:XF,options:{weekStartsOn:0,firstWeekContainsDate:1}},JF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eU=/^'([^]*?)'?$/,tU=/''/g,rU=/[a-zA-Z]/;function Ls(e,t,r){var n,a,i,o,s,l,c,u,f,d,h,g,v,m;Ne(2,arguments);var b=String(t),w=Oi(),x=(n=(a=void 0)!==null&&a!==void 0?a:w.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:w.firstWeekContainsDate)!==null&&o!==void 0?o:(c=w.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=(g=void 0)!==null&&g!==void 0?g:void 0)!==null&&h!==void 0?h:w.weekStartsOn)!==null&&d!==void 0?d:(v=w.locale)===null||v===void 0||(m=v.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&f!==void 0?f:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var O=Ve(e);if(!eF(O))throw new RangeError("Invalid time value");var T=JB(O),j=nF(O,T),C={firstWeekContainsDate:A,weekStartsOn:y,locale:x,_originalDate:O},k=b.match(QF).map(function(P){var E=P[0];if(E==="p"||E==="P"){var F=hF[E];return F(P,x.formatLong)}return P}).join("").match(JF).map(function(P){if(P==="''")return"'";var E=P[0];if(E==="'")return nU(P);var F=dF[E];if(F)return yF(P)&&H0(P,t,String(e)),vF(P)&&H0(P,t,String(e)),F(j,P,x.localize,C);if(E.match(rU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return P}).join("");return k}function nU(e){var t=e.match(eU);return t?t[1].replace(tU,"'"):e}function q0(e,t){Ne(2,arguments);var r=Ve(e),n=Ve(t);return r.getTime()<n.getTime()}function aU(e,t){Ne(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){Ne(2,arguments);var r=Et(t);return KB(e,-r)}function iU(e,t){Ne(2,arguments);var r=Et(t);return pf(e,-r)}const mf=({children:e})=>{const[t,r]=S.useState(!1);return S.useEffect(()=>(r(!0),()=>r(!1)),[]),t?en.createPortal(e,document.body):null};function K0({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:tF(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:rF(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]=S.useState(a==null?void 0:a.dateRange),[s,l]=S.useState(a==null?void 0:a.dateRange),[c,u]=S.useState(!1),[f,d]=S.useState((a==null?void 0:a.label)||null),[h,g]=S.useState((a==null?void 0:a.label)||null),[v,m]=S.useState(new Date),[b,w]=S.useState(null),[x,A]=S.useState({top:0,left:0}),y=S.useRef(null),O=S.useRef(null);S.useEffect(()=>{var M,W;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:(W=a.dateRange.to)==null?void 0:W.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(H=>`${H.value}:${H.label}`)})},[]),S.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),g(a.label))},[t]);const T=()=>{if(!O.current)return;const M=O.current.getBoundingClientRect(),W=window.scrollY,H=window.scrollX,Y=window.innerWidth,$=window.innerHeight,B=720,_=450;let U=M.bottom+W+8,V=M.left+H;V+B>Y&&(V=M.right+H-B),V+B>Y&&(V=Y-B-20),U+_>$&&(U=M.top+W-_-8),V<20&&(V=20),U<20&&(U=20),A({top:U,left:V})};S.useEffect(()=>{const M=()=>{c&&T()};return c&&(window.addEventListener("resize",M),window.addEventListener("scroll",M)),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M)}},[c]);const j=(M,W)=>{if(l(M),g(W),w(null),M.from){const H=new Date(M.from.getFullYear(),M.from.getMonth(),1);m(H)}},C=M=>{if(!b)w(M),l({from:M,to:M}),g(null);else{const W=q0(M,b)?M:b,H=q0(M,b)?b:M;l({from:W,to:H}),w(null),g(null)}},k=()=>{o(s),d(h),r==null||r(s),u(!1),w(null)},P=()=>{l(void 0),g(null),o(void 0),d(null),r==null||r(void 0),u(!1),w(null)},E=M=>{M?(l(i),g(f),w(null),setTimeout(T,0)):(l(i),g(f),w(null)),u(M)},F=(M,W)=>(console.log("📅 formatDateRange called with:",{presetLabel:W,hasDateRange:!!(M!=null&&M.from)}),W||(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")),N=(M=0)=>{const W=pf(v,M),H=W.getFullYear(),Y=W.getMonth(),$=new Date(H,Y,1),_=new Date(H,Y+1,0).getDate(),U=$.getDay(),V=["January","February","March","April","May","June","July","August","September","October","November","December"],I=["Su","Mo","Tu","We","Th","Fr","Sa"],z=[],Q=new Date(H,Y-1,0).getDate();for(let ee=U-1;ee>=0;ee--){const R=Q-ee,oe=new Date(H,Y-1,R);z.push(p.jsx("button",{onClick:()=>C(oe),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:R},`prev-${R}`))}for(let ee=1;ee<=_;ee++){const R=new Date(H,Y,ee),oe=Si(R,new Date),X=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&aU(R,{start:s.from,end:s.to}),ce=(s==null?void 0:s.from)&&Si(R,s.from),re=(s==null?void 0:s.to)&&Si(R,s.to),me=b&&Si(R,b);let We="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&&(We+="font-semibold "),me||ce||re?We+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":X&&(We+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),z.push(p.jsx("button",{onClick:()=>C(R),className:We,children:ee},`current-${ee}`))}const Z=Math.ceil((U+_)/7)*7-U-_;for(let ee=1;ee<=Z;ee++){const R=new Date(H,Y+1,ee);z.push(p.jsx("button",{onClick:()=>C(R),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:ee},`next-${ee}`))}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:()=>m(iU(v,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(Tb,{className:"h-[16px] w-[16px]"})}),p.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[V[Y]," ",H]}),M===1&&p.jsx("button",{onClick:()=>m(pf(v,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:I.map(ee=>p.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:ee},ee))}),p.jsx("div",{className:"grid grid-cols-7 gap-1",children:z})]})},L=()=>"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:()=>E(!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(Sf,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const M=F(i,f);return console.log("📅 Button display text:",{displayText:M,date:i,selectedPresetLabel:f}),M})()]}),c&&p.jsxs(mf,{children:[p.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>E(!1)}),p.jsxs("div",{ref:y,className:L(),style:{top:x.top,left:x.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:()=>j(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:[N(0),N(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:P,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),p.jsx("button",{onClick:k,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 oU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var F;const{title:o,subtitle:s,sections:l,globalControls:c,layout:u={columns:12,gap:24,responsive:!0}}=e,[f,d]=S.useState(!1),[h,g]=S.useState({}),[v,m]=S.useState(l),[b,w]=S.useState([]),[x,A]=S.useState(!1),y=S.useRef(null);S.useEffect(()=>{if(t)try{y.current=new Kt(t),O(),T()}catch(N){console.error("Failed to initialize API service:",N)}},[t]);const O=async()=>{if(!(!y.current||!t)){A(!0);try{const N=await y.current.fetchEnvironments();w(N),console.log("🌍 Environments loaded:",N.map(L=>L.envName))}catch(N){console.error("Error loading environments:",N)}finally{A(!1)}}},T=async()=>{if(!(!y.current||!t)){d(!0);try{const N=y.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:N.fromTimestamp,toTimestamp:N.toTimestamp,fromDate:new Date(N.fromTimestamp).toLocaleDateString(),toDate:new Date(N.toTimestamp).toLocaleDateString()});const L=await y.current.fetchAllCardsDataWithEnhancedViews(N.fromTimestamp,N.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",L),console.log("📈 Data covers period:",{from:new Date(N.fromTimestamp).toLocaleDateString(),to:new Date(N.toTimestamp).toLocaleDateString()});const M=l.map(W=>W.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...W,metrics:L.usageAnalytics}):W.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...W,metrics:L.runs}):W);m(M)}catch(N){console.error("Error loading initial data:",N),m(l)}finally{d(!1)}}},j=async(N,L)=>{if(!(!y.current||!t||!L.metricType)){m(M=>M.map(W=>W.id===N?{...W,metrics:W.metrics.map(H=>({...H,highlighted:H.metricType===L.metricType}))}:W)),g(M=>({...M,[N]:!0}));try{const M=t.defaultTimeRange||Kt.getDateRange(7);let W,H;if(["users","sessions","messages","tokens"].includes(L.metricType))W="usage-analytics",H=L.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(L.metricType))W="runs",H=L.metricType==="agentRuns"?"agent-runs":L.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const Y=await y.current.fetchTimeSeriesData(H,W,M.fromTimestamp,M.toTimestamp),$=y.current.transformTimeSeriesDataForMetric(Y,L.metricType);console.log("Time series response for",L.title,":",Y),console.log("Transformed data for",L.title,":",$),console.log("Metric type used for transformation:",L.metricType);const _=(U=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[U]||"count")(L.metricType||"count");console.log("Using dataKey for metric",L.metricType,":",_),m(U=>U.map(V=>{if(V.id===N){const I={...V,view:{...V.view,chart:V.view.chart?{...V.view.chart,data:$,dataKey:_,lines:[{dataKey:_,color:V.view.chart.color||"#3b82f6",label:L.title,strokeWidth:2}]}:{type:"line",data:$,dataKey:_,lines:[{dataKey:_,color:"#3b82f6",label:L.title,strokeWidth:2}],yAxisLabel:L.title}}};return console.log("Updated section for",N,":",I),console.log("Chart config set:",I.view.chart),I}return V}))}catch(M){console.error("Error loading metric data:",M)}finally{g(M=>({...M,[N]:!1}))}}},C=N=>{var L,M;if((M=(L=c==null?void 0:c.draft)==null?void 0:L.onChange)==null||M.call(L,N),a==null||a(N),t&&y.current){const W={...t,environment:N};y.current.updateConfig(W),T()}},k=N=>{var L,M;if(console.log("🗓️ Time range change requested:",N),typeof N=="string"&&((M=(L=c==null?void 0:c.timeRange)==null?void 0:L.onChange)==null||M.call(L,N)),i==null||i(N),t&&y.current){let W=null;if(typeof N=="object"&&N.from&&N.to)W={fromTimestamp:N.from.toISOString(),toTimestamp:N.to.toISOString()},console.log("📅 Converting DateRange to API format:",W);else if(typeof N=="string"){const Y={"24h":1,"7d":7,"30d":30,"90d":90}[N];Y&&(W=Kt.getDateRange(Y),console.log(`📅 Converting preset "${N}" (${Y} days) to API format:`,W))}if(W){const H={...t,defaultTimeRange:W};console.log("🔄 Updating API configuration with new date range:",H.defaultTimeRange),y.current.updateConfig(H),console.log("🚀 Reloading dashboard data with new date range..."),T()}else console.warn("⚠️ Unable to convert time range value to API format:",N)}},P=(N="csv")=>{var L,M;(M=(L=c==null?void 0:c.export)==null?void 0:L.onExport)==null||M.call(L,N),n==null||n()},E=Object.values(h).some(N=>N);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||E)&&p.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[p.jsx($b,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),c&&p.jsxs(p.Fragment,{children:[c.draft&&p.jsx(Ms,{options:b.length>0?b.map(N=>({label:N.envName.charAt(0).toUpperCase()+N.envName.slice(1),value:N.envName})):c.draft.options,value:c.draft.defaultValue,placeholder:x?"Loading environments...":c.draft.label,onChange:C,className:"min-w-[200px]",disabled:f||E||x}),c.timeRange&&(c.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",c.timeRange.defaultValue),p.jsx(K0,{defaultValue:c.timeRange.defaultValue,onDateRangeChange:N=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",N),N&&k(N)}})):p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Sf,{className:"h-4 w-4 text-gray-500"}),p.jsx(Ms,{options:c.timeRange.options||[],value:c.timeRange.defaultValue,placeholder:c.timeRange.label,onChange:k,className:"min-w-[200px]",disabled:f||E})]})),((F=c.export)==null?void 0:F.enabled)&&p.jsxs(df,{variant:"outline",onClick:()=>P(),className:"gap-2",disabled:f||E,children:[p.jsx(Ab,{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:v.map(N=>{var L,M,W,H;return p.jsx(B0,{section:N,isLoading:f,isChartLoading:h[N.id]||!1,onMetricClick:Y=>j(N.id,Y),className:se(u.responsive&&((L=N.layout)==null?void 0:L.span)===12&&"lg:col-span-12",u.responsive&&((M=N.layout)==null?void 0:M.span)===6&&"lg:col-span-6",u.responsive&&((W=N.layout)==null?void 0:W.span)===4&&"lg:col-span-4",u.responsive&&((H=N.layout)==null?void 0:H.span)===3&&"lg:col-span-3")},N.id)})})]})};class Y0{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 v;const n=new Map;r.forEach(m=>{const b=`${m.data.id}|${m.data.name}|${m.data.toolName}`;n.has(b)||n.set(b,{});const w=n.get(b);m.type==="node_started"?w.started=m:m.type==="node_completed"&&(w.completed=m)});const a=[];for(const[,m]of n.entries()){const b=m.started,w=m.completed;if(!b)continue;const x=this.createTreeNodeFromEvents(b,w,t);a.push(x)}const i=this.buildNodeHierarchy(a),o=r.filter(m=>m.runId===t),s=Math.min(...o.map(m=>new Date(m.data.timestamp).getTime())),l=o.filter(m=>m.type==="node_completed"),c=l.length>0?Math.max(...l.map(m=>new Date(m.data.timestamp).getTime())):void 0,u=this.calculateRunStatus(o),f=c&&s?c-s:void 0,d=this.calculateRunTokens(o),h=this.extractUserInput(o),g=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:((v=o[0])==null?void 0:v.sessionId)||"unknown",userInput:h,finalOutput:g}}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"||s.data.type==="GuardrailsInputScan"||s.data.type==="GuardrailsOutputScan"||s.data.type==="Agent"||s.data.type==="External Orchestrator",c=l?t.data.input:void 0;let u;r&&(r.data.error?u=r.data.error:l&&(u=r.data.output));const f=this.extractLLMUsage(u,r==null?void 0:r.data.metadata),{toolInvocations:d,isResponse:h}=this.extractToolInvocations(u),g=s.data.type==="llm"?this.extractProvider(s.data.name||s.data.toolName):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:g}}}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,r){var n,a,i;if(r!=null&&r.usage_metadata)return r.usage_metadata;if(!(!t||typeof t!="object")){if(t.usage_metadata)return t.usage_metadata;if((n=t.metadata)!=null&&n.usage_metadata)return t.metadata.usage_metadata;if(Array.isArray(t)){const o=t[0];if((a=o==null?void 0:o.additional_kwargs)!=null&&a.llmUsageMetadata)return o.additional_kwargs.llmUsageMetadata}else if((i=t.additional_kwargs)!=null&&i.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"||t.toolName==="route_to_user";return{toolInvocations:[t],isResponse:r}}if(Array.isArray(t)){const r=t.filter(n=>n&&typeof n=="object"&&(n.name==="route_to_user"||n.toolName==="route_to_user")&&n.tool_call_id);if(r.length>0){const n=r.some(a=>a.name==="route_to_user"||a.toolName==="route_to_user");return{toolInvocations:r,isResponse:n}}}if(t.tool_calls&&Array.isArray(t.tool_calls)){const r=t.tool_calls.filter(n=>n&&typeof n=="object"&&(n.name==="route_to_user"||n.toolName==="route_to_user")&&n.tool_call_id);if(r.length>0){const n=r.some(a=>a.name==="route_to_user"||a.toolName==="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"||a.data.status==="errored");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 containsRouteToUserTool(t){return!t||typeof t!="object"?!1:Array.isArray(t)?t.some(r=>r&&typeof r=="object"&&(r.name==="route_to_user"||r.toolName==="route_to_user")):t.name==="route_to_user"||t.toolName==="route_to_user"}static extractMessageFromLLMOutput(t){var r,n,a;if(!(!t||typeof t!="object")){if(console.log("Extracting message from LLM output:",JSON.stringify(t,null,2)),Array.isArray(t)){const i=t.find(o=>o&&typeof o=="object"&&(o.name==="route_to_user"||o.toolName==="route_to_user"));if(i){if((r=i.args)!=null&&r.message)return console.log("Found message in LLM array format: routeToUserTool.args.message"),i.args.message;if(i.message)return console.log("Found message in LLM array format: routeToUserTool.message"),i.message;if((n=i.output)!=null&&n.message)return console.log("Found message in LLM array format: routeToUserTool.output.message"),i.output.message}}else if(t.name==="route_to_user"||t.toolName==="route_to_user"){if((a=t.args)!=null&&a.message)return console.log("Found message in LLM single format: output.args.message"),t.args.message;if(t.message)return console.log("Found message in LLM single format: output.message"),t.message}console.log("No message found in LLM output")}}static extractFinalOutput(t){var o,s,l,c,u,f,d,h,g,v;const r=t.filter(m=>m.type==="node_completed"&&m.data.error&&(m.data.status==="errored"||m.data.status==="failed"));if(r.length>0){const m=r.sort((b,w)=>new Date(w.timestamp).getTime()-new Date(b.timestamp).getTime());return typeof m[0].data.error=="string"?m[0].data.error:JSON.stringify(m[0].data.error)}const n=t.filter(m=>m.type==="node_completed"&&m.data.type==="tool"&&(m.data.name==="route_to_user"||m.data.toolName==="route_to_user")),a=t.filter(m=>m.type==="node_completed"&&m.data.type==="llm"&&m.data.output&&this.containsRouteToUserTool(m.data.output));n.length>0&&console.log("Found route_to_user tool events:",n.length),a.length>0&&console.log("Found LLM events with route_to_user:",a.length);const i=[...n,...a];if(i.sort((m,b)=>new Date(m.timestamp).getTime()-new Date(b.timestamp).getTime()),i.length>0){const m=i[i.length-1];if(m.data.type==="llm")return this.extractMessageFromLLMOutput(m.data.output)}if(n.length>0){const b=n[n.length-1].data.output;if(console.log("Route to user output structure:",JSON.stringify(b,null,2)),b)if(Array.isArray(b)){const w=b.find(x=>x&&typeof x=="object"&&(x.name==="route_to_user"||x.toolName==="route_to_user"));if(w){if((o=w.args)!=null&&o.message)return console.log("Found message in array format: routeToUserTool.args.message"),w.args.message;if(w.message)return console.log("Found message in array format: routeToUserTool.message"),w.message;if((s=w.output)!=null&&s.message)return console.log("Found message in array format: routeToUserTool.output.message"),w.output.message}}else{if((l=b.args)!=null&&l.message)return console.log("Found message at: output.args.message"),b.args.message;if(b.message)return console.log("Found message at: output.message"),b.message;if((c=b.output)!=null&&c.message)return console.log("Found message at: output.output.message"),b.output.message;if((u=b.input)!=null&&u.message)return console.log("Found message at: output.input.message"),b.input.message;if((d=(f=b.input)==null?void 0:f.args)!=null&&d.message)return console.log("Found message at: output.input.args.message"),b.input.args.message;if((h=b.data)!=null&&h.message)return console.log("Found message at: output.data.message"),b.data.message;if((g=b.result)!=null&&g.message)return console.log("Found message at: output.result.message"),b.result.message;if(typeof b=="string")try{const w=JSON.parse(b);if((v=w.args)!=null&&v.message)return console.log("Found message in parsed string: parsed.args.message"),w.args.message;if(w.message)return console.log("Found message in parsed string: parsed.message"),w.message}catch{if(b.length>10&&!b.includes("{")&&!b.includes("["))return console.log("Using output string directly as message"),b}try{return JSON.stringify(b)}catch{return b}}console.log("No message found in route_to_user output paths")}}static calculateRunTokens(t){let r=0;return t.forEach(n=>{const a=this.extractLLMUsage(n.data.output,n.data.metadata);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 sU=({isOpen:e,onClose:t,title:r,data:n,initialViewMode:a="interactive",modalHeight:i="50vh"})=>{const[o,s]=S.useState(a),l=S.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(Of,{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($f,{className:"w-4 h-4 text-gray-500"})})]})]}),p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(ur,{data:n,showHeader:!1,className:"h-full border-0",defaultExpanded:!0,viewMode:o,onViewModeChange:s})})]})}):null},lU=({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(fr,{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,g)=>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:[g,":"]}),p.jsx("div",{className:"flex-1",children:o(h,String(g),`${u}[${g}]`)})]},g))})]})}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(fr,{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(g=>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:['"',g,'":']}),p.jsx("div",{className:"flex-1",children:o(s[g],g,u)})]},g))})]})}return p.jsx("span",{className:"text-gray-600",children:String(s)})};return p.jsx("div",{className:"font-mono text-xs",children:o(e,"",a)})},X0=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},ur=({data:e,padding:t="p-3",title:r="Data",className:n="",maxHeight:a="300px",showHeader:i=!0,defaultExpanded:o=!1,defaultViewMode:s="interactive",viewMode:l,onViewModeChange:c,modalHeight:u="50vh"})=>{const[f,d]=S.useState(!1),[h,g]=S.useState(s),v=S.useMemo(()=>o?new Set([""]):new Set(X0(e)),[e,o]),[m,b]=S.useState(v);S.useEffect(()=>{o||b(new Set(X0(e)))},[e,o]);const w=l!==void 0,x=w?l:h,A=P=>{w?c==null||c(P):g(P)},{isValidJson:y,displayContent:O}=S.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]),T=S.useCallback(P=>{b(E=>{const F=new Set(E);return F.has(P)?F.delete(P):F.add(P),F})},[]),j=S.useCallback(async()=>{const P=y?JSON.stringify(O,null,2):O;try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(P);return}const E=document.createElement("textarea");E.value=P,E.style.position="fixed",E.style.left="-999999px",E.style.top="-999999px",document.body.appendChild(E),E.focus(),E.select();try{document.execCommand("copy")}catch(F){console.warn("Copy to clipboard failed:",F)}finally{document.body.removeChild(E)}}catch(E){console.warn("Copy to clipboard failed:",E)}},[y,O]),C=S.useCallback(()=>{d(!0)},[]),k=S.useCallback(()=>{d(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`bg-white border border-gray-200 rounded-md overflow-hidden ${n}`,children:[i&&p.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between",children:[y&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>A("interactive"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${x==="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:()=>A("plain"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${x==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(Of,{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:C,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Expand to full screen",children:p.jsx(Ef,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:j,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:`${t||"p-3"} overflow-auto bg-white`,style:{maxHeight:a},children:[y?x==="interactive"?p.jsx(lU,{data:O,expandedKeys:m,onToggleKey:T,keyPath:""}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre",children:JSON.stringify(O,null,2)}):p.jsx("div",{className:"font-mono text-xs text-gray-700 whitespace-pre-wrap",children:O}),!O&&O!==0&&O!==!1&&p.jsx("div",{className:"text-center text-gray-400 text-sm py-8",children:"No data available"})]})]}),p.jsx(sU,{isOpen:f,onClose:k,title:r,data:O,initialViewMode:x,modalHeight:u})]})};class Z0{constructor(t){$t(this,"config");this.config=t}async getObservationById(t){var r,n;console.log("🚀 OBSERVATION API CALL:",{observationId:t.observationId,traceId:t.traceId,projectId:t.projectId,tracingUrl:this.config.tracingUrl});try{const a={json:{observationId:t.observationId,traceId:t.traceId,projectId:t.projectId}},i=encodeURIComponent(JSON.stringify(a)),o=`${this.config.tracingUrl}/tracing/api/trpc/observations.byId?input=${i}`;console.log("📤 Making observation GET request to:",o),console.log("📤 Headers:",this.config.headers);const s=await fetch(o,{method:"GET",headers:this.config.headers});if(console.log("📥 Observation response status:",s.status),console.log("📥 Observation response ok:",s.ok),!s.ok){const u=await s.text();throw console.error("❌ Observation API Error:",u),new Error(`HTTP error! status: ${s.status}, response: ${u}`)}const l=await s.json();console.log("✅ Observation API Response:",l);const c=((n=(r=l==null?void 0:l.result)==null?void 0:r.data)==null?void 0:n.json)||null;return console.log("📊 Extracted observation data:",c),c}catch(a){return console.error("❌ Error fetching observation data:",a),null}}async getTraceById(t){var r,n,a;console.log("🚀 TRACE API CALL:",{traceId:t.traceId,projectId:t.projectId,tracingUrl:this.config.tracingUrl});try{const i={json:{traceId:t.traceId,projectId:t.projectId}},o=encodeURIComponent(JSON.stringify(i)),s=`${this.config.tracingUrl}/tracing/api/trpc/traces.byIdWithObservationsAndScores?input=${o}&pollingApi=true&skipGlobalToast=true`;console.log("📤 Making trace GET request to:",s),console.log("📤 Headers:",this.config.headers);const l=await fetch(s,{method:"GET",headers:this.config.headers});if(console.log("📥 Trace response status:",l.status),console.log("📥 Trace response ok:",l.ok),!l.ok){const d=await l.text();throw console.error("❌ Trace API Error:",d),new Error(`HTTP error! status: ${l.status}, response: ${d}`)}const c=await l.json();console.log("✅ Trace API Response:",c);const f=[...((a=(n=(r=c==null?void 0:c.result)==null?void 0:r.data)==null?void 0:n.json)==null?void 0:a.observations)||[]].sort((d,h)=>new Date(d.startTime).getTime()-new Date(h.startTime).getTime());return console.log("📊 Sorted observations:",f.length,"total"),f}catch(i){return console.error("❌ Error fetching trace data:",i),null}}matchNodeToObservation(t,r,n,a){console.log("🔍 Matching node to observation:",{nodeName:t,nodeType:r,nodeIndex:n,totalObservations:a.length});const i=a.filter(s=>{var l,c,u,f,d;return r==="llm"?s.type==="GENERATION"||((l=s.name)==null?void 0:l.toLowerCase().includes("llm"))||((c=s.name)==null?void 0:c.toLowerCase().includes("chat")):r==="tool"?s.type==="SPAN"&&(((u=s.name)==null?void 0:u.toLowerCase().includes("tool"))||((f=s.metadata)==null?void 0:f.type)==="tool"):r==="Agent"?s.type==="SPAN"&&((d=s.name)==null?void 0:d.toLowerCase().includes("agent")):!0});console.log("🎯 Type-filtered observations:",i.length);let o=i.find(s=>{var l;return s.name===t||((l=s.name)==null?void 0:l.includes(t))});return!o&&i.length>n&&(o=i[n]),!o&&i.length>0&&(o=i[0]),console.log("✅ Matched observation:",o?{id:o.id,name:o.name,type:o.type}:"No match found"),o||null}async getObservationForNode(t,r,n,a,i){console.log("🔄 Getting observation for node (two-step process):",{nodeName:t,nodeType:r,nodeIndex:n,traceId:a,projectId:i});try{const o=await this.getTraceById({traceId:a,projectId:i});if(!o||o.length===0)return console.log("❌ No observations found for trace"),null;const s=this.matchNodeToObservation(t,r,n,o);return s?await this.getObservationById({observationId:s.id,traceId:a,projectId:i}):(console.log("❌ No matching observation found for node"),null)}catch(o){return console.error("❌ Error in two-step observation fetch:",o),null}}updateConfig(t){this.config=t}getConfig(){return this.config}}function J0({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a,showDetailView:i=!0,apiConfig:o,projectId:s,nodeIndex:l=0}){const c=S.useMemo(()=>{var _;return e.type==="GuardrailsInputScan"||e.type==="GuardrailsOutputScan"||((_=e.name)==null?void 0:_.toLowerCase().includes("guardrail"))},[e.type,e.name]),u=S.useMemo(()=>c?["summary","request"]:e.type==="llm"?["summary","request","response"]:e.type==="tool"?["request","response","logs"]:[],[e.type,c]),[f,d]=S.useState(u[0]),h=a?a.has(e.id):!1,g=e.children&&e.children.length>0,[v,m]=S.useState(null),[b,w]=S.useState(!1),[x,A]=S.useState(null),[y,O]=S.useState(!1);console.log("🔧 DebugCard - Props received:",{nodeId:e.id,nodeName:e.name,nodeType:e.type,nodeIndex:l,hasApiConfig:!!o,apiConfigDetails:o?{tracingUrl:o.tracingUrl,projectId:o.projectId,hasHeaders:!!o.headers}:null,projectIdProp:s,propsMatch:(o==null?void 0:o.projectId)===s});const T=S.useMemo(()=>(console.log("🔧 DebugCard - Creating ApiService:",{hasApiConfig:!!o,willCreateService:!!o}),o?new Z0(o):null),[o]),j=S.useCallback(async()=>{if(!T||!s||y){console.log("🔍 DebugCard - API call skipped:",{hasApiService:!!T,hasProjectId:!!s,hasLoadedApi:y,reason:T?s?"Already loaded":"No project ID":"No API service"});return}w(!0),A(null);try{const _=await T.getObservationForNode(e.name,e.type,l,e.runId,s);if(_){const U={..._};try{typeof _.input=="string"?U.input=JSON.parse(_.input):_.input&&typeof _.input=="object"&&(U.input=JSON.parse(JSON.stringify(_.input,null,2)))}catch{U.input=_.input||{}}try{typeof _.output=="string"?U.output=JSON.parse(_.output):_.output&&typeof _.output=="object"&&(U.output=JSON.parse(JSON.stringify(_.output,null,2)))}catch{U.output=_.output||{}}m(U),O(!0)}else A("No data found")}catch(_){console.error("Error fetching observation data:",_),A(_ instanceof Error?_.message:"Unknown error")}finally{w(!1)}},[T,s,e.id,e.runId]);S.useEffect(()=>{u.includes(f)||d(u[0])},[u,f]),S.useEffect(()=>{m(null),w(!1),A(null),O(!1)},[e.id]);const C=S.useCallback(_=>{d(_),console.log("🔍 DebugCard - Tab clicked:",{nodeId:e.id,nodeName:e.name,nodeType:e.type,clickedTab:_,hasApiService:!!T,hasProjectId:!!s,hasLoadedApi:y,isLoadingApi:b}),(_==="request"||_==="response")&&T&&s&&!y&&!b&&(console.log("🚀 DebugCard - Triggering API call for node:",e.id),j())},[T,s,y,b,j,e.id]),k=_=>{_.stopPropagation(),t&&t(e.id)},P=()=>{console.log("node clicked");debugger;u.length===0&&g&&t?t(e.id):n&&i&&n(e)},E=()=>{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":case"errored":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"})}},F=()=>{var U,V;if(c)return p.jsx("div",{className:"flex-shrink-0 relative w-[24px] h-[24px] bg-gray-200 rounded-[8px] flex items-center justify-center",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"21",viewBox:"0 0 17 21",fill:"none",className:"w-[16px] h-[16px]",children:p.jsx("path",{d:"M2.86876 3.16135L2.51444 2.22622V2.22622L2.86876 3.16135ZM1.60989 3.76534L0.944868 3.01852L0.944868 3.01852L1.60989 3.76534ZM1.11768 4.483L2.05352 4.83544L1.11768 4.483ZM8.70562 1.33287L8.35129 2.26799V2.26799L8.70562 1.33287ZM8.32871 1.21247L8.18424 2.20198L8.32871 1.21247ZM7.69438 1.33287L8.04871 2.26799H8.04871L7.69438 1.33287ZM8.07129 1.21247L8.21576 2.20198L8.07129 1.21247ZM15.2823 4.483L14.3465 4.83544L15.2823 4.483ZM13.5312 3.16135L13.1769 4.09647L13.5312 3.16135ZM14.7901 3.76534L15.4551 3.01852V3.01852L14.7901 3.76534ZM8.82819 18.9787L9.33601 19.8402L8.82819 18.9787ZM8.38871 19.1854L8.17694 18.2081H8.17694L8.38871 19.1854ZM7.57181 18.9787L8.07962 18.1173L7.57181 18.9787ZM8.01129 19.1854L8.22306 18.2081L8.01129 19.1854ZM7.10461 9.12831L7.45541 10.0648C7.72607 9.96337 7.93963 9.74983 8.04104 9.47917L7.10461 9.12831ZM8.2 6.20474L9.13643 5.85388H7.26357L8.2 6.20474ZM9.29539 9.12831L8.35897 9.47917C8.46038 9.74983 8.67393 9.96337 8.94459 10.0648L9.29539 9.12831ZM12.25 10.2351L12.6008 11.1716L12.6008 9.29868L12.25 10.2351ZM9.29539 11.3419L8.94459 10.4055C8.66955 10.5085 8.4537 10.7273 8.35435 11.0037L9.29539 11.3419ZM8.2 14.3892L7.25895 14.7275H9.14105L8.2 14.3892ZM7.10461 11.3419L8.04565 11.0037C7.9463 10.7273 7.73045 10.5085 7.45541 10.4055L7.10461 11.3419ZM4.15 10.2351L3.7992 9.29868L3.7992 11.1716L4.15 10.2351ZM9.33601 19.8402C10.251 19.3009 11.9823 18.176 13.4966 16.582C15.0004 14.999 16.4 12.8356 16.4 10.2351H14.4C14.4 12.0983 13.3903 13.79 12.0466 15.2045C10.7133 16.608 9.15867 17.6231 8.32038 18.1173L9.33601 19.8402ZM16.4 10.2351V5.88609H14.4V10.2351H16.4ZM13.8856 2.22622L9.05994 0.397748L8.35129 2.26799L13.1769 4.09647L13.8856 2.22622ZM7.34006 0.397749L2.51444 2.22622L3.22309 4.09647L8.04871 2.26799L7.34006 0.397749ZM0 5.88609V10.2351H2V5.88609H0ZM0 10.2351C0 12.8356 1.39958 14.999 2.90343 16.582C4.41773 18.176 6.14904 19.3009 7.06399 19.8402L8.07962 18.1173C7.24133 17.6231 5.68674 16.608 4.35344 15.2045C3.00971 13.79 2 12.0983 2 10.2351H0ZM2.51444 2.22622C1.91725 2.4525 1.36429 2.64503 0.944868 3.01852L2.27492 4.51216C2.352 4.44352 2.47279 4.38077 3.22309 4.09647L2.51444 2.22622ZM2 5.88609C2 5.07787 2.01549 4.93642 2.05352 4.83544L0.181849 4.13057C-0.0154909 4.65457 0 5.24018 0 5.88609H2ZM0.944868 3.01852C0.60414 3.32193 0.342573 3.70379 0.181849 4.13057L2.05352 4.83544C2.10072 4.71011 2.17703 4.59933 2.27492 4.51216L0.944868 3.01852ZM9.05994 0.397748C8.91343 0.342231 8.70233 0.256421 8.47319 0.222965L8.18424 2.20198C8.15508 2.19772 8.14261 2.19201 8.16863 2.20063C8.18278 2.20531 8.2032 2.21249 8.23486 2.22419C8.26671 2.23595 8.30339 2.24984 8.35129 2.26799L9.05994 0.397748ZM8.04871 2.26799C8.09661 2.24984 8.13329 2.23595 8.16514 2.22419C8.1968 2.21249 8.21722 2.20531 8.23137 2.20063C8.25739 2.19201 8.24492 2.19772 8.21576 2.20198L7.92681 0.222965C7.69767 0.256422 7.48657 0.342232 7.34005 0.397749L8.04871 2.26799ZM8.47319 0.222965C8.29201 0.196512 8.10799 0.196512 7.92681 0.222965L8.21576 2.20198C8.20532 2.20351 8.19468 2.20351 8.18424 2.20198L8.47319 0.222965ZM16.4 5.88609C16.4 5.24018 16.4155 4.65457 16.2182 4.13057L14.3465 4.83544C14.3845 4.93642 14.4 5.07787 14.4 5.88609H16.4ZM13.1769 4.09647C13.9272 4.38077 14.048 4.44352 14.1251 4.51216L15.4551 3.01852C15.0357 2.64503 14.4827 2.4525 13.8856 2.22622L13.1769 4.09647ZM16.2182 4.13057C16.0574 3.70379 15.7959 3.32193 15.4551 3.01852L14.1251 4.51216C14.223 4.59933 14.2993 4.7101 14.3465 4.83544L16.2182 4.13057ZM8.32038 18.1173C8.2687 18.1477 8.2323 18.1692 8.20084 18.1871C8.17008 18.2046 8.15362 18.2132 8.14482 18.2175C8.13738 18.2212 8.14003 18.2195 8.14934 18.2161C8.15948 18.2124 8.16954 18.2097 8.17694 18.2081L8.60048 20.1627C8.9274 20.0919 9.16869 19.9388 9.33601 19.8402L8.32038 18.1173ZM7.06399 19.8402C7.23131 19.9388 7.4726 20.0919 7.79952 20.1627L8.22306 18.2081C8.23046 18.2097 8.24052 18.2124 8.25066 18.2161C8.25997 18.2195 8.26262 18.2212 8.25518 18.2175C8.24638 18.2132 8.22992 18.2046 8.19916 18.1871C8.1677 18.1692 8.1313 18.1477 8.07962 18.1173L7.06399 19.8402ZM8.17694 18.2081C8.18757 18.2058 8.19524 18.2045 8.19954 18.2039C8.20396 18.2032 8.20647 18.203 8.20701 18.2029C8.20764 18.2029 8.20489 18.2031 8.2 18.2031C8.19511 18.2031 8.19236 18.2029 8.19299 18.2029C8.19353 18.203 8.19604 18.2032 8.20046 18.2039C8.20476 18.2045 8.21243 18.2058 8.22306 18.2081L7.79952 20.1627C8.04819 20.2166 8.35181 20.2166 8.60048 20.1627L8.17694 18.2081ZM8.04104 9.47917L9.13643 6.5556L7.26357 5.85388L6.16818 8.77745L8.04104 9.47917ZM7.26357 6.5556L8.35897 9.47917L10.2318 8.77745L9.13643 5.85388L7.26357 6.5556ZM8.94459 10.0648L11.8992 11.1716L12.6008 9.29868L9.6462 8.19186L8.94459 10.0648ZM11.8992 9.29868L8.94459 10.4055L9.6462 12.2784L12.6008 11.1716L11.8992 9.29868ZM8.35435 11.0037L7.25895 14.0509L9.14105 14.7275L10.2364 11.6802L8.35435 11.0037ZM9.14105 14.0509L8.04565 11.0037L6.16356 11.6802L7.25895 14.7275L9.14105 14.0509ZM7.45541 10.4055L4.5008 9.29868L3.7992 11.1716L6.75381 12.2784L7.45541 10.4055ZM4.5008 11.1716L7.45541 10.0648L6.75381 8.19186L3.7992 9.29868L4.5008 11.1716Z",fill:"#101828"})})});let _="agent";switch(e.type){case"Agent":_="agent";break;case"llm":_="model";break;case"tool":_="workflowtool";break;default:_="agent"}return p.jsx(wi,{icon:e.icon,iconSource:_,size:"small",name:e.name,className:"w-[24px] h-[24px]",toolType:e.type==="tool"?(U=e.metadata)==null?void 0:U.type:void 0,provider:e.type==="llm"?(V=e.metadata)==null?void 0:V.provider:void 0,modelName:e.type==="llm"?e.name:void 0})},N=_=>_?_<1e3?`${_}ms`:`${(_/1e3).toFixed(2)}s`:"",L=_=>{if(!_)return"Tool";switch(_){case"route_to_user":return"Route to User";default:return _.split("_").map(U=>U.charAt(0).toUpperCase()+U.slice(1)).join(" ")}},M=()=>u,W=()=>{var V,I,z;const _=e.toolInvocations&&e.toolInvocations.length>0||e.children&&e.children.length>0,U=e.isResponse;return _?p.jsxs("div",{className:"space-y-1",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.jsx("span",{className:"text-xs text-gray-600",children:U?"Responded":"Invoked"}),e.toolInvocations&&e.toolInvocations.length>0&&e.toolInvocations.map((q,Q)=>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:L(q.name||q.toolName)})]},q.tool_call_id||Q)),(!e.toolInvocations||e.toolInvocations.length===0)&&e.children&&e.children.length>0&&e.children.map((q,Q)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[q.type==="tool"?p.jsx(Vs,{className:"w-[12px] h-[12px] text-green-500 flex-shrink-0"}):p.jsx(Ob,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:q.name||"Unknown"})]},q.id||Q))]}),((z=(I=(V=e.toolInvocations)==null?void 0:V[0])==null?void 0:I.args)==null?void 0:z.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&&!_?p.jsx("div",{className:"space-y-1",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(kb,{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"})},H=_=>{var U,V,I,z;if(!(!_||typeof _!="object")){if(Array.isArray(_)){const q=_.find(Q=>Q&&typeof Q=="object"&&(Q.name==="route_to_user"||Q.toolName==="route_to_user"));if(q)return((U=q.args)==null?void 0:U.message)||q.message||((V=q.output)==null?void 0:V.message)}else if(_.name==="route_to_user"||_.toolName==="route_to_user")return((I=_.args)==null?void 0:I.message)||_.message||((z=_.output)==null?void 0:z.message);if(_.message&&typeof _.message=="string")return _.message;if(_.content&&typeof _.content=="string")return _.content;if(_.text&&typeof _.text=="string")return _.text}},Y=()=>{if(!e.output)return null;const _=H(e.output);return p.jsx(ur,{padding:"py-1",data:_||e.output,title:"",showHeader:!1,maxHeight:"250px",defaultExpanded:!0,className:"border-0"})},$=()=>{if(!c||!e.output)return null;const _=e.output,U=_.scannersData,V=_.endFlow,I=_.endFlowMsg;return U?p.jsxs("div",{className:"space-y-3",children:[V&&I&&p.jsxs("div",{className:"flex items-start gap-2 p-3 bg-red-50 border border-red-200 rounded-md",children:[p.jsx(Gs,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),p.jsxs("div",{className:"text-xs text-red-700",children:[p.jsx("div",{className:"font-medium",children:"Guardrail Stopped"}),p.jsx("div",{className:"mt-1",children:I})]})]}),p.jsx("div",{className:"space-y-1",children:Object.entries(U).map(([z,q])=>{if(z==="error"&&q.scannerOutput)return p.jsxs("div",{className:"flex items-center justify-between p-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Gs,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),p.jsx("span",{className:"text-xs text-gray-700 capitalize",children:"Error Scanner"})]}),p.jsx("div",{className:"flex items-center gap-3",children:p.jsx("span",{className:"text-xs text-gray-500",children:q.scannerOutput.Duration})})]},z);if(q.scannerOutput){const Q=q.scannerOutput.Validity,G=q.scannerOutput.RiskScore,Z=q.scannerOutput.Duration;let ee="text-gray-500",R="bg-gray-100";return G!==void 0&&(G===0?(ee="text-green-600",R="bg-green-50"):G<=3?(ee="text-yellow-600",R="bg-yellow-50"):G<=6?(ee="text-orange-600",R="bg-orange-50"):(ee="text-red-600",R="bg-red-50")),p.jsxs("div",{className:"flex items-center justify-between p-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[Q?p.jsx(Sb,{className:"w-4 h-4 text-green-500 flex-shrink-0"}):p.jsx(Gs,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),p.jsx("span",{className:"text-xs text-gray-700",children:z.replace(/([A-Z])/g," $1").trim()})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[G!==void 0&&p.jsxs("div",{className:`px-2 py-0.5 rounded text-xs font-medium ${R} ${ee}`,children:["Risk: ",G]}),p.jsx("span",{className:"text-xs text-gray-500",children:Z})]})]},z)}return null})})]}):null},B=()=>{switch(f){case"summary":return c?p.jsxs("div",{className:"space-y-1",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(ur,{padding:"py-1",data:e.input,title:"",showHeader:!1,maxHeight:"150px",defaultExpanded:!0,className:"border-0"})]}),e.output&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Result"}),$()]})]}):p.jsxs("div",{className:"space-y-1",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(ur,{padding:"py-1",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"}),W()]}),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"}),Y()]}),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":if(T&&b)return p.jsxs("div",{className:"flex items-center justify-center py-8",children:[p.jsx(_f,{className:"w-5 h-5 animate-spin text-blue-500"}),p.jsx("span",{className:"ml-2 text-sm text-gray-600",children:"Loading request data..."})]});if(T&&x)return p.jsx("div",{className:"flex items-center justify-center py-8",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-red-500 text-sm mb-2",children:"Failed to load API data"}),p.jsx("div",{className:"text-xs text-gray-500",children:x}),p.jsx("button",{onClick:j,className:"mt-2 px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})});if(c&&e.output)return p.jsx(ur,{data:e.output,title:"Full Scanner Output",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});const _=v?v.input:e.input;return p.jsx(ur,{data:_,title:v?"Request Data (API)":"Request Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"response":if(T&&b)return p.jsxs("div",{className:"flex items-center justify-center py-8",children:[p.jsx(_f,{className:"w-5 h-5 animate-spin text-blue-500"}),p.jsx("span",{className:"ml-2 text-sm text-gray-600",children:"Loading response data..."})]});if(T&&x)return p.jsx("div",{className:"flex items-center justify-center py-8",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-red-500 text-sm mb-2",children:"Failed to load API data"}),p.jsx("div",{className:"text-xs text-gray-500",children:x}),p.jsx("button",{onClick:j,className:"mt-2 px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})});const U=v?v.output:e.output;return p.jsx(ur,{data:U,title:v?"Response Data (API)":"Response Data",maxHeight:"400px",defaultExpanded:!1,defaultViewMode:"interactive"});case"logs":const V={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 V.metadata.totalLogs=V.executionLog.length,p.jsx(ur,{data:V,title:"Execution Logs",maxHeight:"400px",defaultExpanded:!0,defaultViewMode:"plain"});default:return null}};return p.jsxs("div",{className:"bg-white w-full",children:[p.jsx("div",{className:`flex items-center pl-[8px] pr-[8px] relative transition-colors cursor-pointer w-full
295
+ `,onClick:P,children:p.jsxs("div",{className:"flex items-center gap-[10px] w-full",children:[p.jsx("div",{className:"p-[2px] relative top-[1px] rounded hover:bg-gray-200 cursor-pointer flex-shrink-0 z-[2]",onClick:_=>{_.stopPropagation(),g?k(_):n&&n(e)},title:g?r?"Collapse":"Expand":"Show details",children:p.jsx(ki,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${g&&r||h&&u.length>0?"rotate-90":""}`})}),p.jsxs("div",{className:"flex items-center gap-[8px] w-full py-[8px] border-b border-gray-200",children:[p.jsx("div",{className:"flex-shrink-0 rounded-[8px] bg-[#B2DDFF]",children:F()}),p.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",children:c?e.type==="GuardrailsInputScan"?"Input Guardrails Scanner":"Output Guardrails Scanner":e.type==="tool"?L(e.name):e.name}),p.jsxs("div",{className:"flex items-center gap-[12px] text-[10px] text-gray-500",children:[e.type==="Agent"&&(()=>{var U;const _=(U=e.children)==null?void 0:U.find(V=>V.type==="llm");return _!=null&&_.name?p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:_.name}):null})(),(e.type==="Agent"||e.type==="llm"||c)&&(()=>{var U,V,I,z;const _=e.type==="Agent"?(I=(V=(U=e.children)==null?void 0:U.find(q=>q.type==="llm"))==null?void 0:V.llmUsage)==null?void 0:I.total_tokens:(z=e.llmUsage)==null?void 0:z.total_tokens;return _?p.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:[_.toLocaleString()," Tokens"]}):null})(),e.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Af,{className:"w-[12px] h-[12px]"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:N(e.duration)})]})]}),p.jsx("div",{className:"flex-shrink-0",children:E()})]})]})}),h&&u.length>0&&i&&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",children:[p.jsx("div",{className:"bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200",children:M().map(_=>p.jsx("button",{onClick:()=>C(_),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 ${f===_?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:_.charAt(0).toUpperCase()+_.slice(1)},_))}),p.jsx("div",{className:"px-[4px]",children:B()})]})]}),r&&g&&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((_,U)=>p.jsx(J0,{node:_,onToggle:t,isExpanded:_.isExpanded,onNodeClick:n,selectedNodeIds:a,showDetailView:i,apiConfig:o,projectId:s,nodeIndex:U},_.id))]})]})}const Q0=S.forwardRef(({executionEvents:e,sessionId:t,config:r={},onNodeExpand:n,onNodeCollapse:a,className:i=""},o)=>{const[s,l]=S.useState(new Set),[c,u]=S.useState(new Set),[f,d]=S.useState(new Set),{expansionMode:h="all",showExpansionControls:g=!1,defaultDetailView:v=!0}=r;console.log("🔧 DebugPanel - Config received:",{hasConfig:!!r,hasApiConfig:!!r.apiConfig,apiConfigDetails:r.apiConfig?{tracingUrl:r.apiConfig.tracingUrl,projectId:r.apiConfig.projectId,hasHeaders:!!r.apiConfig.headers}:null});const[m,b]=S.useState(h),[w,x]=S.useState(new Set),[A,y]=S.useState(e),O=S.useRef(e.length);S.useEffect(()=>{y(e),e.length===0?(l(new Set),u(new Set),d(new Set),C.current=!1,O.current=0):(e.length>O.current&&(C.current=!0),O.current=e.length)},[e]);const T=S.useRef(0),j=S.useRef(null),C=S.useRef(!1);S.useImperativeHandle(o,()=>({addEvent:I=>{y(z=>[...z,I]),C.current=!0},addEvents:I=>{y(z=>[...z,...I]),C.current=!0},clearEvents:()=>{y([]),l(new Set),u(new Set),d(new Set),C.current=!1}}),[]);const k=S.useMemo(()=>{const I=Y0.buildSessionTree(A,t);return j.current=I,I},[A,t]),P=I=>{const z=[],q=Q=>{z.push(Q.id),Q.children.forEach(G=>q(G))};return I.runs.forEach(Q=>{Q.rootNodes.forEach(G=>q(G))}),z},E=S.useCallback(()=>{const I=P(k);l(new Set(I));const z=k.runs.map(q=>q.runId);d(new Set(z))},[k]),F=S.useCallback(()=>{if(m==="none"){const I=new Set;k.runs.forEach(z=>{z.rootNodes.forEach(q=>{I.add(q.id)})}),l(I)}else l(new Set)},[m,k]),N=S.useCallback(()=>{if(k.runs.length>0){const I=k.runs[k.runs.length-1];if(I.rootNodes.length>0){const z=I.rootNodes[I.rootNodes.length-1],q=[],Q=G=>{if(q.push(G.id),G.children.length>0){const Z=G.children[G.children.length-1];Q(Z)}};Q(z),l(new Set(q)),d(G=>{const Z=new Set(G);return Z.add(I.runId),Z})}}},[k]),L=S.useCallback(I=>{x(z=>{const q=new Set(z);return q.has(I)?q.delete(I):q.add(I),q})},[]);S.useEffect(()=>{if(v){const I=k.runs.map(z=>z.runId);x(new Set(I))}},[k.runs,v]);const M=S.useRef(null);S.useEffect(()=>{A.length>T.current&&M.current&&setTimeout(()=>{M.current&&M.current.scrollTo({top:M.current.scrollHeight,behavior:"smooth"})},100),T.current=A.length},[A.length]),S.useEffect(()=>{if(A.length>0&&k.runs.length>0){if(C.current){switch(m){case"all":const I=P(k);l(new Set(I));break;case"last":N();break;case"none":l(z=>{const q=new Set;return k.runs.forEach(Q=>{Q.rootNodes.forEach(G=>{q.add(G.id)})}),q});break}C.current=!1}else if(m==="none"&&s.size===0&&k.runs.length>0){const I=new Set;k.runs.forEach(z=>{z.rootNodes.forEach(q=>{I.add(q.id)})}),I.size>0&&l(I)}if(d(I=>{const z=new Set(I);return k.runs.forEach(q=>{z.has(q.runId)||z.add(q.runId)}),z}),m!=="none"){const I=k.runs[k.runs.length-1];if(I.rootNodes.length>0){const z=I.rootNodes[I.rootNodes.length-1],q=V(z);q&&u(Q=>{const G=new Set(Q);return G.add(q.id),G})}}}},[k,m,N,s.size]);const W=S.useCallback(I=>{l(z=>{const q=new Set(z);return q.has(I)?(q.delete(I),a==null||a(I)):(q.add(I),n==null||n(I)),q})},[n,a]),H=S.useCallback(I=>{u(z=>{const q=new Set(z);return q.has(I.id)?q.delete(I.id):q.add(I.id),q})},[]),Y=S.useCallback(I=>{d(z=>{const q=new Set(z);return q.has(I)?q.delete(I):q.add(I),q})},[]),$=S.useCallback(I=>({...I,isExpanded:s.has(I.id),children:I.children.map(q=>$(q))}),[s]),B=I=>I?I<1e3?`${I}ms`:`${(I/1e3).toFixed(2)}s`:"",_=I=>I?I>=1e6?`${(I/1e6).toFixed(1)}M tokens`:I>=1e3?`${(I/1e3).toFixed(1)}K tokens`:`${I} tokens`:"",U=async I=>{try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(I);return}const z=document.createElement("textarea");z.value=I,z.style.position="fixed",z.style.left="-999999px",z.style.top="-999999px",document.body.appendChild(z),z.focus(),z.select();try{document.execCommand("copy")}catch(q){console.warn("Copy to clipboard failed:",q)}finally{document.body.removeChild(z)}}catch(z){console.warn("Copy to clipboard failed:",z)}},V=I=>I.children.length===0?I:V(I.children[I.children.length-1]);return k.runs.length?p.jsx("div",{className:`flex flex-col h-full bg-white ${i}`,children:p.jsxs("div",{className:"flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden",ref:M,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:k.sessionId}),p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",onClick:()=>U(k.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(jf,{className:"w-[12px] h-[12px]"})})]})]}),g&&p.jsxs("div",{className:"flex items-center justify-between gap-4 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs font-medium text-gray-700",children:"Expansion:"}),p.jsxs("button",{onClick:E,className:"flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",title:"Expand all nodes",children:[p.jsx(Cb,{className:"w-3 h-3"}),"Expand All"]}),p.jsxs("button",{onClick:N,className:"flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",title:"Expand only the last execution path",children:[p.jsx(jb,{className:"w-3 h-3"}),"Expand Last"]}),p.jsxs("button",{onClick:F,className:"flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",title:"Collapse all nodes",children:[p.jsx(Eb,{className:"w-3 h-3"}),"Collapse All"]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs font-medium text-gray-700",children:"Live Mode:"}),p.jsxs("select",{value:m,onChange:I=>b(I.target.value),className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",title:"Control auto-expansion behavior during live updates",children:[p.jsx("option",{value:"all",children:"Expand All"}),p.jsx("option",{value:"last",children:"Expand Last"}),p.jsx("option",{value:"none",children:"No Auto-Expand"})]})]})]}),k.runs.map(I=>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",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("div",{className:"flex-1 cursor-pointer select-none",onClick:()=>Y(I.runId),title:f.has(I.runId)?"Collapse run":"Expand run",children:p.jsx("span",{className:"text-xs text-gray-900 truncate",children:I.userInput||`Run ${I.runId}`})}),p.jsx("button",{onClick:z=>{z.stopPropagation(),L(I.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:w.has(I.runId)?"Hide node details":"Show node details",children:w.has(I.runId)?p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",children:p.jsx("path",{d:"M0.666992 11.3327L4.00033 7.99935L7.33366 11.3327M0.666992 0.666016L4.00033 3.99935L7.33366 0.666016",stroke:"#98A2B3",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}):p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",children:p.jsx("path",{d:"M0.666992 0.666016L4.00033 3.99935L7.33366 0.666016M0.666992 11.3327L4.00033 7.99935L7.33366 11.3327",stroke:"#98A2B3",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})}),p.jsx("button",{onClick:z=>{z.stopPropagation(),Y(I.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:f.has(I.runId)?"Collapse run":"Expand run",children:p.jsx(fr,{className:`w-[16px] h-[16px] text-gray-400 transition-transform ${f.has(I.runId)?"rotate-180":""}`})})]})}),f.has(I.runId)&&p.jsx("div",{className:"bg-white w-full flex flex-col",children:I.rootNodes&&I.rootNodes.map((z,q)=>{var Q;return p.jsx("div",{className:"w-full",children:p.jsx(J0,{node:$(z),onToggle:W,isExpanded:s.has(z.id),onNodeClick:H,selectedNodeIds:c,showDetailView:w.has(I.runId),apiConfig:r.apiConfig,projectId:(Q=r.apiConfig)==null?void 0:Q.projectId,nodeIndex:q})},z.id)})}),I.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:I.finalOutput,children:I.finalOutput}),p.jsxs("div",{className:"flex items-center gap-[8px] flex-shrink-0",children:[I.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Af,{className:"w-[12px] h-[12px] text-gray-400"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:B(I.duration)})]}),I.totalTokens&&p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:_(I.totalTokens)})]})]})]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[p.jsx("span",{className:"text-xs text-gray-400",children:I.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:()=>U(I.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(jf,{className:"w-3 h-3 text-gray-400"})})]})]})]},I.runId))]})}):p.jsx("div",{className:`flex flex-col h-full ${i}`,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"})})})});Q0.displayName="DebugPanel";const eb=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=S.useState(e),[c,u]=S.useState(!1),[f,d]=S.useState(!1),h=S.useRef(null);S.useEffect(()=>{l(e)},[e]);function g(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function v(x){const A=x.target.value;l(A),t==null||t(A)}const m=()=>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:g,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(_b,{size:16}):p.jsx(Ef,{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:v}),w=p.jsxs("div",{className:se("flex flex-col h-full w-full border rounded-md bg-background",i),style:{minHeight:"200px"},children:[p.jsx(m,{}),p.jsx(b,{})]});return c?p.jsx(mf,{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:w})})}):w};eb.displayName="CodeEditor";const tb=S.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}));tb.displayName="Avatar";const rb=S.forwardRef(({className:e,...t},r)=>p.jsx("img",{ref:r,className:se("aspect-square h-full w-full",e),...t}));rb.displayName="AvatarImage";const nb=S.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}));nb.displayName="AvatarFallback";const ab=S.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}));ab.displayName="Card";const cU=S.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}));cU.displayName="CardHeader";const uU=S.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}));uU.displayName="CardTitle";const fU=S.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:se("p-6 pt-0",e),...r,children:t}));fU.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"],Us=["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"],dU=(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),g=Math.floor(d*8+Math.random()*300),v=Math.floor(h*.3+Math.random()*100),m=Math.floor(h*.25+Math.random()*80),b=Math.floor(h*.2+Math.random()*60),w=Math.floor(h*.15+Math.random()*50),x={};Bs.forEach(O=>{const T=O.replace(/\s+/g,"").toLowerCase(),j=Math.floor(d/Bs.length);x[T]=Math.floor(j+Math.random()*(j*.5))});const A={};Fs.forEach(O=>{const T=O.replace(/[-]/g,""),j=Math.floor(h/Fs.length);A[T]=Math.floor(j+Math.random()*(j*.8))});const y={};Us.forEach(O=>{const T=O.replace(/[-\.]/g,""),j=Math.floor(g/Us.length);y[T]=Math.floor(j+Math.random()*(j*.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:g,codeTools:v,workflowTools:m,knowledgeTools:b,mcpTools:w,...x,...A,...y,value:o})}return t},pU=()=>{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},hU=()=>{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]}))},mU=()=>Us.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()})),Jr=dU(),gU=pU(),vU=hU(),yU=mU(),bU={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:Jr,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:Jr,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:Jr,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:Jr,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:Jr,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:gU,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:Jr,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:vU,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:Jr,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:yU,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"},...Us.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"]}},xU={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"}},wU={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"}},OU={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"}},ib=(e,t)=>e.primary[t%e.primary.length],ji=(e,t)=>e.semantic[t],SU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},ob=(e,t=Yt)=>e.map((r,n)=>({...r,color:ib(t,n)})),Ws=((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),g=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:g,value:o})}return t})(),TU={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:Ws,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:Ws,lines:ob([{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:Ws,lines:[{dataKey:"users",color:ji(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:ji(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:ji(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:ji(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:Ws,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}}]},AU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},jU={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},PU={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}},_U=`
291
296
  // In your Angular component (usage-analytics.component.ts)
292
297
  import { Dashboard, apiEnabledDashboardConfig, agenticAppConfig } from '@agentic/ui-libs';
293
298
 
@@ -346,4 +351,4 @@ export class AnalyticsDashboardComponent implements OnInit, AfterViewInit, OnDes
346
351
  }
347
352
  }
348
353
  }
349
- `;ie.AgentListView=E0,ie.AnalyticsChart=j0,ie.AnalyticsTable=P0,ie.ApiInvokerService=N0,ie.Avatar=Q0,ie.AvatarFallback=tb,ie.AvatarImage=eb,ie.Button=df,ie.Card=rb,ie.ChartSkeleton=A0,ie.CodeEditor=J0,ie.Dashboard=aU,ie.DashboardApiService=Kt,ie.DashboardSection=R0,ie.DataViewer=ur,ie.DateRangePicker=q0,ie.DebugPanel=Z0,ie.EndpointsConfigService=M0,ie.IconPreview=wi,ie.MetricCard=Bf,ie.MetricCardSkeleton=xi,ie.ModelListView=$0,ie.MultiSelect=I0,ie.Portal=mf,ie.RunsSlider=k0,ie.SectionControls=L0,ie.Select=Ms,ie.Skeleton=na,ie.ToolListView=C0,ie.TreeBuilder=K0,ie.ViewRenderer=D0,ie.agenticAppConfig=TU,ie.angularIntegrationExample=jU,ie.apiEnabledDashboardConfig=AU,ie.autoAssignColors=ab,ie.businessPalette=xU,ie.cn=se,ie.colorExamples=SU,ie.darkPalette=yU,ie.defaultPalette=Yt,ie.enhancedDashboardConfig=OU,ie.getColorFromPalette=nb,ie.getGradientColors=wU,ie.getSemanticColor=ji,ie.lightPalette=bU,ie.sampleDashboardConfig=gU,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
354
+ `;ie.AgentListView=C0,ie.AnalyticsChart=P0,ie.AnalyticsTable=_0,ie.ApiInvokerService=D0,ie.ApiService=Z0,ie.Avatar=tb,ie.AvatarFallback=nb,ie.AvatarImage=rb,ie.Button=df,ie.Card=ab,ie.ChartSkeleton=j0,ie.CodeEditor=eb,ie.Dashboard=oU,ie.DashboardApiService=Kt,ie.DashboardSection=B0,ie.DataViewer=ur,ie.DateRangePicker=K0,ie.DebugPanel=Q0,ie.EndpointsConfigService=N0,ie.IconPreview=wi,ie.MetricCard=Ff,ie.MetricCardSkeleton=xi,ie.ModelListView=k0,ie.MultiSelect=L0,ie.Portal=mf,ie.RunsSlider=M0,ie.SectionControls=R0,ie.Select=Ms,ie.Skeleton=na,ie.ToolListView=$0,ie.TreeBuilder=Y0,ie.ViewRenderer=I0,ie.agenticAppConfig=jU,ie.angularIntegrationExample=_U,ie.apiEnabledDashboardConfig=PU,ie.autoAssignColors=ob,ie.businessPalette=OU,ie.cn=se,ie.colorExamples=AU,ie.darkPalette=xU,ie.defaultPalette=Yt,ie.enhancedDashboardConfig=TU,ie.getColorFromPalette=ib,ie.getGradientColors=SU,ie.getSemanticColor=ji,ie.lightPalette=wU,ie.sampleDashboardConfig=bU,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});