agentic-ui-libs 0.3.0-beta.7 → 0.3.0-beta.9

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(oe,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],O):(oe=typeof globalThis<"u"?globalThis:oe||self,O(oe.AgenticUILibs={},oe.React,oe.ReactDOM))})(this,function(oe,O,tn){"use strict";var KU=Object.defineProperty;var YU=(oe,O,tn)=>O in oe?KU(oe,O,{enumerable:!0,configurable:!0,writable:!0,value:tn}):oe[O]=tn;var kt=(oe,O,tn)=>YU(oe,typeof O!="symbol"?O+"":O,tn);function bb(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 wt=bb(O);var $i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}},ua={};/**
1
+ (function(se,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],O):(se=typeof globalThis<"u"?globalThis:se||self,O(se.AgenticUILibs={},se.React,se.ReactDOM))})(this,function(se,O,tn){"use strict";var ZU=Object.defineProperty;var JU=(se,O,tn)=>O in se?ZU(se,O,{enumerable:!0,configurable:!0,writable:!0,value:tn}):se[O]=tn;var Mt=(se,O,tn)=>JU(se,typeof O!="symbol"?O+"":O,tn);function bb(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 wt=bb(O);var $i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zs={exports:{}},ua={};/**
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 wf;function xb(){if(wf)return ua;wf=1;var e=O,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,m=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(m=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:m,props:f,_owner:a.current}}return ua.Fragment=r,ua.jsx=o,ua.jsxs=o,ua}var fa={};/**
9
+ */var wf;function xb(){if(wf)return ua;wf=1;var e=O,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 ua.Fragment=r,ua.jsx=o,ua.jsxs=o,ua}var fa={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
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 Of;function wb(){return Of||(Of=1,process.env.NODE_ENV!=="production"&&function(){var e=O,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"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function h(N){if(N===null||typeof N!="object")return null;var ee=v&&N[v]||N[g];return typeof ee=="function"?ee:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(N){{for(var ee=arguments.length,ae=new Array(ee>1?ee-1:0),de=1;de<ee;de++)ae[de-1]=arguments[de];x("error",N,ae)}}function x(N,ee,ae){{var de=b.ReactDebugCurrentFrame,Ce=de.getStackAddendum();Ce!==""&&(ee+="%s",ae=ae.concat([Ce]));var Me=ae.map(function(be){return String(be)});Me.unshift("Warning: "+ee),Function.prototype.apply.call(console[N],console,Me)}}var T=!1,y=!1,w=!1,A=!1,P=!1,$;$=Symbol.for("react.module.reference");function R(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===i||P||N===a||N===c||N===u||A||N===m||T||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 j(N,ee,ae){var de=N.displayName;if(de)return de;var Ce=ee.displayName||ee.name||"";return Ce!==""?ae+"("+Ce+")":ae}function C(N){return N.displayName||"Context"}function F(N){if(N==null)return null;if(typeof N.tag=="number"&&S("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 ee=N;return C(ee)+".Consumer";case o:var ae=N;return C(ae._context)+".Provider";case l:return j(N,N.render,"ForwardRef");case f:var de=N.displayName||null;return de!==null?de:F(N.type)||"Memo";case d:{var Ce=N,Me=Ce._payload,be=Ce._init;try{return F(be(Me))}catch{return null}}}return null}var B=Object.assign,z=0,_,L,V,G,E,M,W;function K(){}K.__reactDisabledLog=!0;function D(){{if(z===0){_=console.log,L=console.info,V=console.warn,G=console.error,E=console.group,M=console.groupCollapsed,W=console.groupEnd;var N={configurable:!0,enumerable:!0,value:K,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}z++}}function H(){{if(z--,z===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},N,{value:_}),info:B({},N,{value:L}),warn:B({},N,{value:V}),error:B({},N,{value:G}),group:B({},N,{value:E}),groupCollapsed:B({},N,{value:M}),groupEnd:B({},N,{value:W})})}z<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=b.ReactCurrentDispatcher,te;function I(N,ee,ae){{if(te===void 0)try{throw Error()}catch(Ce){var de=Ce.stack.trim().match(/\n( *(at )?)/);te=de&&de[1]||""}return`
18
- `+te+N}}var U=!1,q;{var J=typeof WeakMap=="function"?WeakMap:Map;q=new J}function k(N,ee){if(!N||U)return"";{var ae=q.get(N);if(ae!==void 0)return ae}var de;U=!0;var Ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Me;Me=Y.current,Y.current=null,D();try{if(ee){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(mt){de=mt}Reflect.construct(N,[],be)}else{try{be.call()}catch(mt){de=mt}N.call(be.prototype)}}else{try{throw Error()}catch(mt){de=mt}N()}}catch(mt){if(mt&&de&&typeof mt.stack=="string"){for(var ye=mt.stack.split(`
17
+ */var Of;function wb(){return Of||(Of=1,process.env.NODE_ENV!=="production"&&function(){var e=O,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(k){if(k===null||typeof k!="object")return null;var te=v&&k[v]||k[g];return typeof te=="function"?te:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(k){{for(var te=arguments.length,ae=new Array(te>1?te-1:0),de=1;de<te;de++)ae[de-1]=arguments[de];x("error",k,ae)}}function x(k,te,ae){{var de=b.ReactDebugCurrentFrame,Ee=de.getStackAddendum();Ee!==""&&(te+="%s",ae=ae.concat([Ee]));var Ie=ae.map(function(be){return String(be)});Ie.unshift("Warning: "+te),Function.prototype.apply.call(console[k],console,Ie)}}var T=!1,y=!1,w=!1,A=!1,j=!1,$;$=Symbol.for("react.module.reference");function U(k){return!!(typeof k=="string"||typeof k=="function"||k===n||k===i||j||k===a||k===c||k===u||A||k===h||T||y||w||typeof k=="object"&&k!==null&&(k.$$typeof===d||k.$$typeof===f||k.$$typeof===o||k.$$typeof===s||k.$$typeof===l||k.$$typeof===$||k.getModuleId!==void 0))}function P(k,te,ae){var de=k.displayName;if(de)return de;var Ee=te.displayName||te.name||"";return Ee!==""?ae+"("+Ee+")":ae}function _(k){return k.displayName||"Context"}function R(k){if(k==null)return null;if(typeof k.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){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 k=="object")switch(k.$$typeof){case s:var te=k;return _(te)+".Consumer";case o:var ae=k;return _(ae._context)+".Provider";case l:return P(k,k.render,"ForwardRef");case f:var de=k.displayName||null;return de!==null?de:R(k.type)||"Memo";case d:{var Ee=k,Ie=Ee._payload,be=Ee._init;try{return R(be(Ie))}catch{return null}}}return null}var F=Object.assign,z=0,C,D,H,V,E,N,W;function q(){}q.__reactDisabledLog=!0;function J(){{if(z===0){C=console.log,D=console.info,H=console.warn,V=console.error,E=console.group,N=console.groupCollapsed,W=console.groupEnd;var k={configurable:!0,enumerable:!0,value:q,writable:!0};Object.defineProperties(console,{info:k,log:k,warn:k,error:k,group:k,groupCollapsed:k,groupEnd:k})}z++}}function L(){{if(z--,z===0){var k={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},k,{value:C}),info:F({},k,{value:D}),warn:F({},k,{value:H}),error:F({},k,{value:V}),group:F({},k,{value:E}),groupCollapsed:F({},k,{value:N}),groupEnd:F({},k,{value:W})})}z<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=b.ReactCurrentDispatcher,Q;function I(k,te,ae){{if(Q===void 0)try{throw Error()}catch(Ee){var de=Ee.stack.trim().match(/\n( *(at )?)/);Q=de&&de[1]||""}return`
18
+ `+Q+k}}var B=!1,Y;{var Z=typeof WeakMap=="function"?WeakMap:Map;Y=new Z}function M(k,te){if(!k||B)return"";{var ae=Y.get(k);if(ae!==void 0)return ae}var de;B=!0;var Ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ie;Ie=G.current,G.current=null,J();try{if(te){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(mt){de=mt}Reflect.construct(k,[],be)}else{try{be.call()}catch(mt){de=mt}k.call(be.prototype)}}else{try{throw Error()}catch(mt){de=mt}k()}}catch(mt){if(mt&&de&&typeof mt.stack=="string"){for(var ye=mt.stack.split(`
19
19
  `),ut=de.stack.split(`
20
- `),He=ye.length-1,Ye=ut.length-1;He>=1&&Ye>=0&&ye[He]!==ut[Ye];)Ye--;for(;He>=1&&Ye>=0;He--,Ye--)if(ye[He]!==ut[Ye]){if(He!==1||Ye!==1)do if(He--,Ye--,Ye<0||ye[He]!==ut[Ye]){var $t=`
21
- `+ye[He].replace(" at new "," at ");return N.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",N.displayName)),typeof N=="function"&&q.set(N,$t),$t}while(He>=1&&Ye>=0);break}}}finally{U=!1,Y.current=Me,H(),Error.prepareStackTrace=Ce}var ca=N?N.displayName||N.name:"",en=ca?I(ca):"";return typeof N=="function"&&q.set(N,en),en}function Q(N,ee,ae){return k(N,!1)}function X(N){var ee=N.prototype;return!!(ee&&ee.isReactComponent)}function se(N,ee,ae){if(N==null)return"";if(typeof N=="function")return k(N,X(N));if(typeof N=="string")return I(N);switch(N){case c:return I("Suspense");case u:return I("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case l:return Q(N.render);case f:return se(N.type,ee,ae);case d:{var de=N,Ce=de._payload,Me=de._init;try{return se(Me(Ce),ee,ae)}catch{}}}return""}var ne=Object.prototype.hasOwnProperty,fe={},ce=b.ReactDebugCurrentFrame;function Ee(N){if(N){var ee=N._owner,ae=se(N.type,N._source,ee?ee.type:null);ce.setExtraStackFrame(ae)}else ce.setExtraStackFrame(null)}function Oe(N,ee,ae,de,Ce){{var Me=Function.call.bind(ne);for(var be in N)if(Me(N,be)){var ye=void 0;try{if(typeof N[be]!="function"){var ut=Error((de||"React class")+": "+ae+" type `"+be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}ye=N[be](ee,be,de,ae,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(He){ye=He}ye&&!(ye instanceof Error)&&(Ee(Ce),S("%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).",de||"React class",ae,be,typeof ye),Ee(null)),ye instanceof Error&&!(ye.message in fe)&&(fe[ye.message]=!0,Ee(Ce),S("Failed %s type: %s",ae,ye.message),Ee(null))}}}var Ge=Array.isArray;function ct(N){return Ge(N)}function Pi(N){{var ee=typeof Symbol=="function"&&Symbol.toStringTag,ae=ee&&N[Symbol.toStringTag]||N.constructor.name||"Object";return ae}}function _i(N){try{return sa(N),!1}catch{return!0}}function sa(N){return""+N}function Ei(N){if(_i(N))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pi(N)),sa(N)}var Ci=b.ReactCurrentOwner,CU={key:!0,ref:!0,__self:!0,__source:!0},ub,fb;function $U(N){if(ne.call(N,"ref")){var ee=Object.getOwnPropertyDescriptor(N,"ref").get;if(ee&&ee.isReactWarning)return!1}return N.ref!==void 0}function kU(N){if(ne.call(N,"key")){var ee=Object.getOwnPropertyDescriptor(N,"key").get;if(ee&&ee.isReactWarning)return!1}return N.key!==void 0}function NU(N,ee){typeof N.ref=="string"&&Ci.current}function MU(N,ee){{var ae=function(){ub||(ub=!0,S("%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)",ee))};ae.isReactWarning=!0,Object.defineProperty(N,"key",{get:ae,configurable:!0})}}function DU(N,ee){{var ae=function(){fb||(fb=!0,S("%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)",ee))};ae.isReactWarning=!0,Object.defineProperty(N,"ref",{get:ae,configurable:!0})}}var IU=function(N,ee,ae,de,Ce,Me,be){var ye={$$typeof:t,type:N,key:ee,ref:ae,props:be,_owner:Me};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function LU(N,ee,ae,de,Ce){{var Me,be={},ye=null,ut=null;ae!==void 0&&(Ei(ae),ye=""+ae),kU(ee)&&(Ei(ee.key),ye=""+ee.key),$U(ee)&&(ut=ee.ref,NU(ee,Ce));for(Me in ee)ne.call(ee,Me)&&!CU.hasOwnProperty(Me)&&(be[Me]=ee[Me]);if(N&&N.defaultProps){var He=N.defaultProps;for(Me in He)be[Me]===void 0&&(be[Me]=He[Me])}if(ye||ut){var Ye=typeof N=="function"?N.displayName||N.name||"Unknown":N;ye&&MU(be,Ye),ut&&DU(be,Ye)}return IU(N,ye,ut,Ce,de,Ci.current,be)}}var vf=b.ReactCurrentOwner,db=b.ReactDebugCurrentFrame;function la(N){if(N){var ee=N._owner,ae=se(N.type,N._source,ee?ee.type:null);db.setExtraStackFrame(ae)}else db.setExtraStackFrame(null)}var yf;yf=!1;function bf(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function pb(){{if(vf.current){var N=F(vf.current.type);if(N)return`
20
+ `),Ge=ye.length-1,Ye=ut.length-1;Ge>=1&&Ye>=0&&ye[Ge]!==ut[Ye];)Ye--;for(;Ge>=1&&Ye>=0;Ge--,Ye--)if(ye[Ge]!==ut[Ye]){if(Ge!==1||Ye!==1)do if(Ge--,Ye--,Ye<0||ye[Ge]!==ut[Ye]){var $t=`
21
+ `+ye[Ge].replace(" at new "," at ");return k.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",k.displayName)),typeof k=="function"&&Y.set(k,$t),$t}while(Ge>=1&&Ye>=0);break}}}finally{B=!1,G.current=Ie,L(),Error.prepareStackTrace=Ee}var ca=k?k.displayName||k.name:"",en=ca?I(ca):"";return typeof k=="function"&&Y.set(k,en),en}function ee(k,te,ae){return M(k,!1)}function K(k){var te=k.prototype;return!!(te&&te.isReactComponent)}function oe(k,te,ae){if(k==null)return"";if(typeof k=="function")return M(k,K(k));if(typeof k=="string")return I(k);switch(k){case c:return I("Suspense");case u:return I("SuspenseList")}if(typeof k=="object")switch(k.$$typeof){case l:return ee(k.render);case f:return oe(k.type,te,ae);case d:{var de=k,Ee=de._payload,Ie=de._init;try{return oe(Ie(Ee),te,ae)}catch{}}}return""}var ne=Object.prototype.hasOwnProperty,fe={},Se=b.ReactDebugCurrentFrame;function ce(k){if(k){var te=k._owner,ae=oe(k.type,k._source,te?te.type:null);Se.setExtraStackFrame(ae)}else Se.setExtraStackFrame(null)}function Ce(k,te,ae,de,Ee){{var Ie=Function.call.bind(ne);for(var be in k)if(Ie(k,be)){var ye=void 0;try{if(typeof k[be]!="function"){var ut=Error((de||"React class")+": "+ae+" type `"+be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof k[be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}ye=k[be](te,be,de,ae,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){ye=Ge}ye&&!(ye instanceof Error)&&(ce(Ee),S("%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).",de||"React class",ae,be,typeof ye),ce(null)),ye instanceof Error&&!(ye.message in fe)&&(fe[ye.message]=!0,ce(Ee),S("Failed %s type: %s",ae,ye.message),ce(null))}}}var ke=Array.isArray;function ct(k){return ke(k)}function Pi(k){{var te=typeof Symbol=="function"&&Symbol.toStringTag,ae=te&&k[Symbol.toStringTag]||k.constructor.name||"Object";return ae}}function _i(k){try{return sa(k),!1}catch{return!0}}function sa(k){return""+k}function Ci(k){if(_i(k))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pi(k)),sa(k)}var Ei=b.ReactCurrentOwner,kU={key:!0,ref:!0,__self:!0,__source:!0},ub,fb;function NU(k){if(ne.call(k,"ref")){var te=Object.getOwnPropertyDescriptor(k,"ref").get;if(te&&te.isReactWarning)return!1}return k.ref!==void 0}function IU(k){if(ne.call(k,"key")){var te=Object.getOwnPropertyDescriptor(k,"key").get;if(te&&te.isReactWarning)return!1}return k.key!==void 0}function DU(k,te){typeof k.ref=="string"&&Ei.current}function LU(k,te){{var ae=function(){ub||(ub=!0,S("%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)",te))};ae.isReactWarning=!0,Object.defineProperty(k,"key",{get:ae,configurable:!0})}}function RU(k,te){{var ae=function(){fb||(fb=!0,S("%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)",te))};ae.isReactWarning=!0,Object.defineProperty(k,"ref",{get:ae,configurable:!0})}}var BU=function(k,te,ae,de,Ee,Ie,be){var ye={$$typeof:t,type:k,key:te,ref:ae,props:be,_owner:Ie};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ee}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function FU(k,te,ae,de,Ee){{var Ie,be={},ye=null,ut=null;ae!==void 0&&(Ci(ae),ye=""+ae),IU(te)&&(Ci(te.key),ye=""+te.key),NU(te)&&(ut=te.ref,DU(te,Ee));for(Ie in te)ne.call(te,Ie)&&!kU.hasOwnProperty(Ie)&&(be[Ie]=te[Ie]);if(k&&k.defaultProps){var Ge=k.defaultProps;for(Ie in Ge)be[Ie]===void 0&&(be[Ie]=Ge[Ie])}if(ye||ut){var Ye=typeof k=="function"?k.displayName||k.name||"Unknown":k;ye&&LU(be,Ye),ut&&RU(be,Ye)}return BU(k,ye,ut,Ee,de,Ei.current,be)}}var vf=b.ReactCurrentOwner,db=b.ReactDebugCurrentFrame;function la(k){if(k){var te=k._owner,ae=oe(k.type,k._source,te?te.type:null);db.setExtraStackFrame(ae)}else db.setExtraStackFrame(null)}var yf;yf=!1;function bf(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function pb(){{if(vf.current){var k=R(vf.current.type);if(k)return`
22
22
 
23
- Check the render method of \``+N+"`."}return""}}function RU(N){return""}var hb={};function BU(N){{var ee=pb();if(!ee){var ae=typeof N=="string"?N:N.displayName||N.name;ae&&(ee=`
23
+ Check the render method of \``+k+"`."}return""}}function UU(k){return""}var hb={};function WU(k){{var te=pb();if(!te){var ae=typeof k=="string"?k:k.displayName||k.name;ae&&(te=`
24
24
 
25
- Check the top-level render call using <`+ae+">.")}return ee}}function mb(N,ee){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var ae=BU(ee);if(hb[ae])return;hb[ae]=!0;var de="";N&&N._owner&&N._owner!==vf.current&&(de=" It was passed a child from "+F(N._owner.type)+"."),la(N),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ae,de),la(null)}}function gb(N,ee){{if(typeof N!="object")return;if(ct(N))for(var ae=0;ae<N.length;ae++){var de=N[ae];bf(de)&&mb(de,ee)}else if(bf(N))N._store&&(N._store.validated=!0);else if(N){var Ce=h(N);if(typeof Ce=="function"&&Ce!==N.entries)for(var Me=Ce.call(N),be;!(be=Me.next()).done;)bf(be.value)&&mb(be.value,ee)}}}function FU(N){{var ee=N.type;if(ee==null||typeof ee=="string")return;var ae;if(typeof ee=="function")ae=ee.propTypes;else if(typeof ee=="object"&&(ee.$$typeof===l||ee.$$typeof===f))ae=ee.propTypes;else return;if(ae){var de=F(ee);Oe(ae,N.props,"prop",de,N)}else if(ee.PropTypes!==void 0&&!yf){yf=!0;var Ce=F(ee);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ce||"Unknown")}typeof ee.getDefaultProps=="function"&&!ee.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function UU(N){{for(var ee=Object.keys(N.props),ae=0;ae<ee.length;ae++){var de=ee[ae];if(de!=="children"&&de!=="key"){la(N),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),la(null);break}}N.ref!==null&&(la(N),S("Invalid attribute `ref` supplied to `React.Fragment`."),la(null))}}var vb={};function yb(N,ee,ae,de,Ce,Me){{var be=R(N);if(!be){var ye="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ut=RU();ut?ye+=ut:ye+=pb();var He;N===null?He="null":ct(N)?He="array":N!==void 0&&N.$$typeof===t?(He="<"+(F(N.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):He=typeof N,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",He,ye)}var Ye=LU(N,ee,ae,Ce,Me);if(Ye==null)return Ye;if(be){var $t=ee.children;if($t!==void 0)if(de)if(ct($t)){for(var ca=0;ca<$t.length;ca++)gb($t[ca],N);Object.freeze&&Object.freeze($t)}else S("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 gb($t,N)}if(ne.call(ee,"key")){var en=F(N),mt=Object.keys(ee).filter(function(qU){return qU!=="key"}),xf=mt.length>0?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}";if(!vb[en+xf]){var HU=mt.length>0?"{"+mt.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ae+">.")}return te}}function mb(k,te){{if(!k._store||k._store.validated||k.key!=null)return;k._store.validated=!0;var ae=WU(te);if(hb[ae])return;hb[ae]=!0;var de="";k&&k._owner&&k._owner!==vf.current&&(de=" It was passed a child from "+R(k._owner.type)+"."),la(k),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ae,de),la(null)}}function gb(k,te){{if(typeof k!="object")return;if(ct(k))for(var ae=0;ae<k.length;ae++){var de=k[ae];bf(de)&&mb(de,te)}else if(bf(k))k._store&&(k._store.validated=!0);else if(k){var Ee=m(k);if(typeof Ee=="function"&&Ee!==k.entries)for(var Ie=Ee.call(k),be;!(be=Ie.next()).done;)bf(be.value)&&mb(be.value,te)}}}function zU(k){{var te=k.type;if(te==null||typeof te=="string")return;var ae;if(typeof te=="function")ae=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===l||te.$$typeof===f))ae=te.propTypes;else return;if(ae){var de=R(te);Ce(ae,k.props,"prop",de,k)}else if(te.PropTypes!==void 0&&!yf){yf=!0;var Ee=R(te);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ee||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function VU(k){{for(var te=Object.keys(k.props),ae=0;ae<te.length;ae++){var de=te[ae];if(de!=="children"&&de!=="key"){la(k),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),la(null);break}}k.ref!==null&&(la(k),S("Invalid attribute `ref` supplied to `React.Fragment`."),la(null))}}var vb={};function yb(k,te,ae,de,Ee,Ie){{var be=U(k);if(!be){var ye="";(k===void 0||typeof k=="object"&&k!==null&&Object.keys(k).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ut=UU();ut?ye+=ut:ye+=pb();var Ge;k===null?Ge="null":ct(k)?Ge="array":k!==void 0&&k.$$typeof===t?(Ge="<"+(R(k.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof k,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,ye)}var Ye=FU(k,te,ae,Ee,Ie);if(Ye==null)return Ye;if(be){var $t=te.children;if($t!==void 0)if(de)if(ct($t)){for(var ca=0;ca<$t.length;ca++)gb($t[ca],k);Object.freeze&&Object.freeze($t)}else S("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 gb($t,k)}if(ne.call(te,"key")){var en=R(k),mt=Object.keys(te).filter(function(XU){return XU!=="key"}),xf=mt.length>0?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}";if(!vb[en+xf]){var YU=mt.length>0?"{"+mt.join(": ..., ")+": ...}":"{}";S(`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} />`,xf,en,HU,en),vb[en+xf]=!0}}return N===n?UU(Ye):FU(Ye),Ye}}function WU(N,ee,ae){return yb(N,ee,ae,!0)}function zU(N,ee,ae){return yb(N,ee,ae,!1)}var VU=zU,GU=WU;fa.Fragment=n,fa.jsx=VU,fa.jsxs=GU}()),fa}process.env.NODE_ENV==="production"?zs.exports=xb():zs.exports=wb();var p=zs.exports;/**
30
+ <%s key={someKey} {...props} />`,xf,en,YU,en),vb[en+xf]=!0}}return k===n?VU(Ye):zU(Ye),Ye}}function HU(k,te,ae){return yb(k,te,ae,!0)}function GU(k,te,ae){return yb(k,te,ae,!1)}var qU=GU,KU=HU;fa.Fragment=n,fa.jsx=qU,fa.jsxs=KU}()),fa}process.env.NODE_ENV==="production"?zs.exports=xb():zs.exports=wb();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.
@@ -37,157 +37,162 @@ React keys must be passed directly to JSX without using spread:
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 Sb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Se=(e,t)=>{const r=O.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...c},u)=>O.createElement("svg",{ref:u,...Ob,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${Sb(e)}`,s].join(" "),...c},[...t.map(([f,d])=>O.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
40
+ */const Sb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),we=(e,t)=>{const r=O.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...c},u)=>O.createElement("svg",{ref:u,...Ob,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${Sb(e)}`,s].join(" "),...c},[...t.map(([f,d])=>O.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 Sf=Se("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 Sf=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 Ab=Se("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 Ab=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 Af=Se("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 Af=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 Tf=Se("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 Tf=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 Tb=Se("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
65
+ */const Tb=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=Se("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 jb=Se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
75
+ */const jb=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=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
80
+ */const Mi=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 jf=Se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
85
+ */const jf=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 Pf=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
90
+ */const Pf=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 _f=Se("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 _f=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 Pb=Se("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 Pb=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 _b=Se("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 _b=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 Ef=Se("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 Cf=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=Se("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 Eb=Se("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 Cb=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 Cf=Se("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 Ef=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=Se("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 kf=Se("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"}]]);/**
135
+ */const Mf=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 Cb=Se("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"}]]);/**
140
+ */const Eb=we("MessageCircle",[["path",{d:"m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z",key:"v2veuj"}]]);/**
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=Se("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
145
+ */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"}]]);/**
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 kb=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
150
+ */const Mb=we("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
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 Nb=Se("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"}]]);/**
155
+ */const kb=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 Nf=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
160
+ */const Nb=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"}]]);/**
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 Mb=Se("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"}]]);/**
165
+ */const kf=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 Db=Se("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"}]]);/**
170
+ */const Ib=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"}]]);/**
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 Ib=Se("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"}]]);/**
175
+ */const Db=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"}]]);/**
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 Lb=Se("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"}]]);/**
180
+ */const Lb=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"}]]);/**
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 Gs=Se("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"}]]);/**
185
+ */const Rb=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"}]]);/**
186
186
  * @license lucide-react v0.294.0 - ISC
187
187
  *
188
188
  * This source code is licensed under the ISC license.
189
189
  * See the LICENSE file in the root directory of this source tree.
190
- */const Mf=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Df(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=Df(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=Df(e))&&(n&&(n+=" "),n+=t);return n}const Hs="-",Rb=e=>{const t=Fb(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Hs);return s[0]===""&&s.length!==1&&s.shift(),If(s,t)||Bb(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},If=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?If(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},Lf=/^\[(.+)\]$/,Bb=e=>{if(Lf.test(e)){const t=Lf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Fb=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Wb(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:Rf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Ub(a)){qs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{qs(o,Rf(t,i),r,n)})})},Rf=(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},Ub=e=>e.isThemeGetter,Wb=(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,zb=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)}}},Bf="!",Vb=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 h=0;h<s.length;h++){let b=s[h];if(c===0){if(b===a&&(n||s.slice(h,h+i)===t)){l.push(s.slice(u,h)),u=h+i;continue}if(b==="/"){f=h;continue}}b==="["?c++:b==="]"&&c--}const d=l.length===0?s:s.substring(u),m=d.startsWith(Bf),v=m?d.substring(1):d,g=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:o}):o},Gb=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},Hb=e=>({cache:zb(e.cacheSize),parseClassName:Vb(e),...Rb(e)}),qb=/\s+/,Kb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(qb);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:m}=r(c);let v=!!m,g=n(v?d.substring(0,m):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 h=Gb(u).join(":"),b=f?h+Bf:h,S=b+g;if(i.includes(S))continue;i.push(S);const x=a(g,v);for(let T=0;T<x.length;++T){const y=x[T];i.push(b+y)}s=c+(s.length>0?" "+s:s)}return s};function Yb(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ff(t))&&(n&&(n+=" "),n+=r);return n}const Ff=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ff(e[n]))&&(r&&(r+=" "),r+=t);return r};function Xb(e,...t){let r,n,a,i=o;function o(l){const c=t.reduce((u,f)=>f(u),e());return r=Hb(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=Kb(l,r);return a(l,u),u}return function(){return i(Yb.apply(null,arguments))}}const Re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Uf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zb=/^\d+\/\d+$/,Jb=new Set(["px","full","screen"]),Qb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ex=/\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$/,tx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>rn(e)||Jb.has(e)||Zb.test(e),dr=e=>nn(e,"length",fx),rn=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>nn(e,"number",rn),da=e=>!!e&&Number.isInteger(Number(e)),ax=e=>e.endsWith("%")&&rn(e.slice(0,-1)),ge=e=>Uf.test(e),pr=e=>Qb.test(e),ix=new Set(["length","size","percentage"]),ox=e=>nn(e,ix,Wf),sx=e=>nn(e,"position",Wf),lx=new Set(["image","url"]),cx=e=>nn(e,lx,px),ux=e=>nn(e,"",dx),pa=()=>!0,nn=(e,t,r)=>{const n=Uf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},fx=e=>ex.test(e)&&!tx.test(e),Wf=()=>!1,dx=e=>rx.test(e),px=e=>nx.test(e),hx=Xb(()=>{const e=Re("colors"),t=Re("spacing"),r=Re("blur"),n=Re("brightness"),a=Re("borderColor"),i=Re("borderRadius"),o=Re("borderSpacing"),s=Re("borderWidth"),l=Re("contrast"),c=Re("grayscale"),u=Re("hueRotate"),f=Re("invert"),d=Re("gap"),m=Re("gradientColorStops"),v=Re("gradientColorStopPositions"),g=Re("inset"),h=Re("margin"),b=Re("opacity"),S=Re("padding"),x=Re("saturate"),T=Re("scale"),y=Re("sepia"),w=Re("skew"),A=Re("space"),P=Re("translate"),$=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ge,t],C=()=>[ge,t],F=()=>["",Zt,dr],B=()=>["auto",rn,ge],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],_=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",ge],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[rn,ge];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Zt,dr],blur:["none","",pr,ge],brightness:M(),borderColor:[e],borderRadius:["none","","full",pr,ge],borderSpacing:C(),borderWidth:F(),contrast:M(),grayscale:G(),hueRotate:M(),invert:G(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[ax,dr],inset:j(),margin:j(),opacity:M(),padding:C(),saturate:M(),scale:M(),sepia:G(),skew:M(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[pr]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),ge]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],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,ge]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",da,ge]}],"grid-cols":[{"grid-cols":[pa]}],"col-start-end":[{col:["auto",{span:["full",da,ge]},ge]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,ge]},ge]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[pr]},pr]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,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",ge]}],"line-clamp":[{"line-clamp":["none",rn,Ks]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zt,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"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:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zt,dr]}],"underline-offset":[{"underline-offset":["auto",Zt,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"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:[...z(),sx]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ox]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cx]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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:[..._(),"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:_()}],"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:["",..._()]}],"outline-offset":[{"outline-offset":[Zt,ge]}],"outline-w":[{outline:[Zt,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":[Zt,dr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pr,ux]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",pr,ge]}],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",ge]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[da,ge]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ge]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zt,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 le(...e){return hx(ve(e))}const zf=({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:le("rounded-lg border py-[16px] px-[24px] transition-all duration-200 bg-white hover:!border-blue-600 hover:!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)]",!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(Eb,{className:"h-[16px] w-[16px] text-gray-400 cursor-help"}),p.jsxs("div",{className:le("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:le("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:le("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(Lb,{className:"h-3 w-3"}):p.jsx(Ib,{className:"h-3 w-3"}),p.jsx("span",{children:u(o.value)})]})]})]})};var mx=Array.isArray,ft=mx,gx=typeof $i=="object"&&$i&&$i.Object===Object&&$i,Vf=gx,vx=Vf,yx=typeof self=="object"&&self&&self.Object===Object&&self,bx=vx||yx||Function("return this")(),Ut=bx,xx=Ut,wx=xx.Symbol,ha=wx,Gf=ha,Hf=Object.prototype,Ox=Hf.hasOwnProperty,Sx=Hf.toString,ma=Gf?Gf.toStringTag:void 0;function Ax(e){var t=Ox.call(e,ma),r=e[ma];try{e[ma]=void 0;var n=!0}catch{}var a=Sx.call(e);return n&&(t?e[ma]=r:delete e[ma]),a}var Tx=Ax,jx=Object.prototype,Px=jx.toString;function _x(e){return Px.call(e)}var Ex=_x,qf=ha,Cx=Tx,$x=Ex,kx="[object Null]",Nx="[object Undefined]",Kf=qf?qf.toStringTag:void 0;function Mx(e){return e==null?e===void 0?Nx:kx:Kf&&Kf in Object(e)?Cx(e):$x(e)}var Jt=Mx;function Dx(e){return e!=null&&typeof e=="object"}var Qt=Dx,Ix=Jt,Lx=Qt,Rx="[object Symbol]";function Bx(e){return typeof e=="symbol"||Lx(e)&&Ix(e)==Rx}var an=Bx,Fx=ft,Ux=an,Wx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zx=/^\w*$/;function Vx(e,t){if(Fx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ux(e)?!0:zx.test(e)||!Wx.test(e)||t!=null&&e in Object(t)}var Ys=Vx;function Gx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hr=Gx;const on=De(hr);var Hx=Jt,qx=hr,Kx="[object AsyncFunction]",Yx="[object Function]",Xx="[object GeneratorFunction]",Zx="[object Proxy]";function Jx(e){if(!qx(e))return!1;var t=Hx(e);return t==Yx||t==Xx||t==Kx||t==Zx}var Xs=Jx;const me=De(Xs);var Qx=Ut,e1=Qx["__core-js_shared__"],t1=e1,Zs=t1,Yf=function(){var e=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function r1(e){return!!Yf&&Yf in e}var n1=r1,a1=Function.prototype,i1=a1.toString;function o1(e){if(e!=null){try{return i1.call(e)}catch{}try{return e+""}catch{}}return""}var Xf=o1,s1=Xs,l1=n1,c1=hr,u1=Xf,f1=/[\\^$.*+?()[\]{}|]/g,d1=/^\[object .+?Constructor\]$/,p1=Function.prototype,h1=Object.prototype,m1=p1.toString,g1=h1.hasOwnProperty,v1=RegExp("^"+m1.call(g1).replace(f1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y1(e){if(!c1(e)||l1(e))return!1;var t=s1(e)?v1:d1;return t.test(u1(e))}var b1=y1;function x1(e,t){return e==null?void 0:e[t]}var w1=x1,O1=b1,S1=w1;function A1(e,t){var r=S1(e,t);return O1(r)?r:void 0}var Er=A1,T1=Er,j1=T1(Object,"create"),Ni=j1,Zf=Ni;function P1(){this.__data__=Zf?Zf(null):{},this.size=0}var _1=P1;function E1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var C1=E1,$1=Ni,k1="__lodash_hash_undefined__",N1=Object.prototype,M1=N1.hasOwnProperty;function D1(e){var t=this.__data__;if($1){var r=t[e];return r===k1?void 0:r}return M1.call(t,e)?t[e]:void 0}var I1=D1,L1=Ni,R1=Object.prototype,B1=R1.hasOwnProperty;function F1(e){var t=this.__data__;return L1?t[e]!==void 0:B1.call(t,e)}var U1=F1,W1=Ni,z1="__lodash_hash_undefined__";function V1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=W1&&t===void 0?z1:t,this}var G1=V1,H1=_1,q1=C1,K1=I1,Y1=U1,X1=G1;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=H1,sn.prototype.delete=q1,sn.prototype.get=K1,sn.prototype.has=Y1,sn.prototype.set=X1;var Z1=sn;function J1(){this.__data__=[],this.size=0}var Q1=J1;function ew(e,t){return e===t||e!==e&&t!==t}var Js=ew,tw=Js;function rw(e,t){for(var r=e.length;r--;)if(tw(e[r][0],t))return r;return-1}var Mi=rw,nw=Mi,aw=Array.prototype,iw=aw.splice;function ow(e){var t=this.__data__,r=nw(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():iw.call(t,r,1),--this.size,!0}var sw=ow,lw=Mi;function cw(e){var t=this.__data__,r=lw(t,e);return r<0?void 0:t[r][1]}var uw=cw,fw=Mi;function dw(e){return fw(this.__data__,e)>-1}var pw=dw,hw=Mi;function mw(e,t){var r=this.__data__,n=hw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var gw=mw,vw=Q1,yw=sw,bw=uw,xw=pw,ww=gw;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=vw,ln.prototype.delete=yw,ln.prototype.get=bw,ln.prototype.has=xw,ln.prototype.set=ww;var Di=ln,Ow=Er,Sw=Ut,Aw=Ow(Sw,"Map"),Qs=Aw,Jf=Z1,Tw=Di,jw=Qs;function Pw(){this.size=0,this.__data__={hash:new Jf,map:new(jw||Tw),string:new Jf}}var _w=Pw;function Ew(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Cw=Ew,$w=Cw;function kw(e,t){var r=e.__data__;return $w(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ii=kw,Nw=Ii;function Mw(e){var t=Nw(this,e).delete(e);return this.size-=t?1:0,t}var Dw=Mw,Iw=Ii;function Lw(e){return Iw(this,e).get(e)}var Rw=Lw,Bw=Ii;function Fw(e){return Bw(this,e).has(e)}var Uw=Fw,Ww=Ii;function zw(e,t){var r=Ww(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Vw=zw,Gw=_w,Hw=Dw,qw=Rw,Kw=Uw,Yw=Vw;function cn(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])}}cn.prototype.clear=Gw,cn.prototype.delete=Hw,cn.prototype.get=qw,cn.prototype.has=Kw,cn.prototype.set=Yw;var el=cn,Qf=el,Xw="Expected a function";function tl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xw);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||Qf),r}tl.Cache=Qf;var ed=tl;const Zw=De(ed);var Jw=ed,Qw=500;function e2(e){var t=Jw(e,function(n){return r.size===Qw&&r.clear(),n}),r=t.cache;return t}var t2=e2,r2=t2,n2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a2=/\\(\\)?/g,i2=r2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(n2,function(r,n,a,i){t.push(a?i.replace(a2,"$1"):n||r)}),t}),o2=i2;function s2(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=s2,td=ha,l2=rl,c2=ft,u2=an,rd=td?td.prototype:void 0,nd=rd?rd.toString:void 0;function ad(e){if(typeof e=="string")return e;if(c2(e))return l2(e,ad)+"";if(u2(e))return nd?nd.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var f2=ad,d2=f2;function p2(e){return e==null?"":d2(e)}var id=p2,h2=ft,m2=Ys,g2=o2,v2=id;function y2(e,t){return h2(e)?e:m2(e,t)?[e]:g2(v2(e))}var od=y2,b2=an;function x2(e){if(typeof e=="string"||b2(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Li=x2,w2=od,O2=Li;function S2(e,t){t=w2(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[O2(t[r++])];return r&&r==n?e:void 0}var nl=S2,A2=nl;function T2(e,t,r){var n=e==null?void 0:A2(e,t);return n===void 0?r:n}var sd=T2;const Ot=De(sd);function j2(e){return e==null}var P2=j2;const pe=De(P2);var _2=Jt,E2=ft,C2=Qt,$2="[object String]";function k2(e){return typeof e=="string"||!E2(e)&&C2(e)&&_2(e)==$2}var N2=k2;const Cr=De(N2);var al={exports:{}},Ae={};/**
190
+ */const Hs=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"}]]);/**
191
+ * @license lucide-react v0.294.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Nf=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function If(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=If(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=If(e))&&(n&&(n+=" "),n+=t);return n}const Gs="-",Bb=e=>{const t=Ub(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Gs);return s[0]===""&&s.length!==1&&s.shift(),Df(s,t)||Fb(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},Df=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Df(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Gs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Lf=/^\[(.+)\]$/,Fb=e=>{if(Lf.test(e)){const t=Lf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ub=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return zb(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:Rf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Wb(a)){qs(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{qs(o,Rf(t,i),r,n)})})},Rf=(e,t)=>{let r=e;return t.split(Gs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Wb=e=>e.isThemeGetter,zb=(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,Vb=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)}}},Bf="!",Hb=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(Bf),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},Gb=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},qb=e=>({cache:Vb(e.cacheSize),parseClassName:Hb(e),...Bb(e)}),Kb=/\s+/,Yb=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(Kb);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=Gb(u).join(":"),b=f?m+Bf:m,S=b+g;if(i.includes(S))continue;i.push(S);const x=a(g,v);for(let T=0;T<x.length;++T){const y=x[T];i.push(b+y)}s=c+(s.length>0?" "+s:s)}return s};function Xb(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ff(t))&&(n&&(n+=" "),n+=r);return n}const Ff=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ff(e[n]))&&(r&&(r+=" "),r+=t);return r};function Zb(e,...t){let r,n,a,i=o;function o(l){const c=t.reduce((u,f)=>f(u),e());return r=qb(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=Yb(l,r);return a(l,u),u}return function(){return i(Xb.apply(null,arguments))}}const Be=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Uf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jb=/^\d+\/\d+$/,Qb=new Set(["px","full","screen"]),e1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t1=/\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$/,r1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,n1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>rn(e)||Qb.has(e)||Jb.test(e),dr=e=>nn(e,"length",d1),rn=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>nn(e,"number",rn),da=e=>!!e&&Number.isInteger(Number(e)),i1=e=>e.endsWith("%")&&rn(e.slice(0,-1)),ge=e=>Uf.test(e),pr=e=>e1.test(e),o1=new Set(["length","size","percentage"]),s1=e=>nn(e,o1,Wf),l1=e=>nn(e,"position",Wf),c1=new Set(["image","url"]),u1=e=>nn(e,c1,h1),f1=e=>nn(e,"",p1),pa=()=>!0,nn=(e,t,r)=>{const n=Uf.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},d1=e=>t1.test(e)&&!r1.test(e),Wf=()=>!1,p1=e=>n1.test(e),h1=e=>a1.test(e),m1=Zb(()=>{const e=Be("colors"),t=Be("spacing"),r=Be("blur"),n=Be("brightness"),a=Be("borderColor"),i=Be("borderRadius"),o=Be("borderSpacing"),s=Be("borderWidth"),l=Be("contrast"),c=Be("grayscale"),u=Be("hueRotate"),f=Be("invert"),d=Be("gap"),h=Be("gradientColorStops"),v=Be("gradientColorStopPositions"),g=Be("inset"),m=Be("margin"),b=Be("opacity"),S=Be("padding"),x=Be("saturate"),T=Be("scale"),y=Be("sepia"),w=Be("skew"),A=Be("space"),j=Be("translate"),$=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",ge,t],_=()=>[ge,t],R=()=>["",Zt,dr],F=()=>["auto",rn,ge],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],D=()=>["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"],V=()=>["","0",ge],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[rn,ge];return{cacheSize:500,separator:":",theme:{colors:[pa],spacing:[Zt,dr],blur:["none","",pr,ge],brightness:N(),borderColor:[e],borderRadius:["none","","full",pr,ge],borderSpacing:_(),borderWidth:R(),contrast:N(),grayscale:V(),hueRotate:N(),invert:V(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[i1,dr],inset:P(),margin:P(),opacity:N(),padding:_(),saturate:N(),scale:N(),sepia:V(),skew:N(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[pr]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),ge]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],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,ge]}],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",ge]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",da,ge]}],"grid-cols":[{"grid-cols":[pa]}],"col-start-end":[{col:["auto",{span:["full",da,ge]},ge]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[pa]}],"row-start-end":[{row:["auto",{span:[da,ge]},ge]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],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:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],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":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[pr]},pr]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,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",ge]}],"line-clamp":[{"line-clamp":["none",rn,Ks]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zt,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"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:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zt,dr]}],"underline-offset":[{"underline-offset":["auto",Zt,ge]}],"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:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"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:[...z(),l1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",s1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},u1]}],"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:[...C(),"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:C()}],"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:["",...C()]}],"outline-offset":[{"outline-offset":[Zt,ge]}],"outline-w":[{outline:[Zt,dr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Zt,dr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pr,f1]}],"shadow-color":[{shadow:[pa]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",pr,ge]}],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",ge]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[da,ge]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"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",ge]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zt,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 le(...e){return m1(ve(e))}const zf=({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:le("rounded-lg border py-[16px] px-[24px] transition-all duration-200 bg-white hover:!border-blue-600 hover:!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)]",!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(Cb,{className:"h-[16px] w-[16px] text-gray-400 cursor-help"}),p.jsxs("div",{className:le("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:le("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:le("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(Rb,{className:"h-3 w-3"}):p.jsx(Lb,{className:"h-3 w-3"}),p.jsx("span",{children:u(o.value)})]})]})]})};var g1=Array.isArray,ft=g1,v1=typeof $i=="object"&&$i&&$i.Object===Object&&$i,Vf=v1,y1=Vf,b1=typeof self=="object"&&self&&self.Object===Object&&self,x1=y1||b1||Function("return this")(),Ut=x1,w1=Ut,O1=w1.Symbol,ha=O1,Hf=ha,Gf=Object.prototype,S1=Gf.hasOwnProperty,A1=Gf.toString,ma=Hf?Hf.toStringTag:void 0;function T1(e){var t=S1.call(e,ma),r=e[ma];try{e[ma]=void 0;var n=!0}catch{}var a=A1.call(e);return n&&(t?e[ma]=r:delete e[ma]),a}var j1=T1,P1=Object.prototype,_1=P1.toString;function C1(e){return _1.call(e)}var E1=C1,qf=ha,$1=j1,M1=E1,k1="[object Null]",N1="[object Undefined]",Kf=qf?qf.toStringTag:void 0;function I1(e){return e==null?e===void 0?N1:k1:Kf&&Kf in Object(e)?$1(e):M1(e)}var Jt=I1;function D1(e){return e!=null&&typeof e=="object"}var Qt=D1,L1=Jt,R1=Qt,B1="[object Symbol]";function F1(e){return typeof e=="symbol"||R1(e)&&L1(e)==B1}var an=F1,U1=ft,W1=an,z1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V1=/^\w*$/;function H1(e,t){if(U1(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||W1(e)?!0:V1.test(e)||!z1.test(e)||t!=null&&e in Object(t)}var Ys=H1;function G1(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hr=G1;const on=De(hr);var q1=Jt,K1=hr,Y1="[object AsyncFunction]",X1="[object Function]",Z1="[object GeneratorFunction]",J1="[object Proxy]";function Q1(e){if(!K1(e))return!1;var t=q1(e);return t==X1||t==Z1||t==Y1||t==J1}var Xs=Q1;const me=De(Xs);var ex=Ut,tx=ex["__core-js_shared__"],rx=tx,Zs=rx,Yf=function(){var e=/[^.]+$/.exec(Zs&&Zs.keys&&Zs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nx(e){return!!Yf&&Yf in e}var ax=nx,ix=Function.prototype,ox=ix.toString;function sx(e){if(e!=null){try{return ox.call(e)}catch{}try{return e+""}catch{}}return""}var Xf=sx,lx=Xs,cx=ax,ux=hr,fx=Xf,dx=/[\\^$.*+?()[\]{}|]/g,px=/^\[object .+?Constructor\]$/,hx=Function.prototype,mx=Object.prototype,gx=hx.toString,vx=mx.hasOwnProperty,yx=RegExp("^"+gx.call(vx).replace(dx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bx(e){if(!ux(e)||cx(e))return!1;var t=lx(e)?yx:px;return t.test(fx(e))}var xx=bx;function wx(e,t){return e==null?void 0:e[t]}var Ox=wx,Sx=xx,Ax=Ox;function Tx(e,t){var r=Ax(e,t);return Sx(r)?r:void 0}var Cr=Tx,jx=Cr,Px=jx(Object,"create"),ki=Px,Zf=ki;function _x(){this.__data__=Zf?Zf(null):{},this.size=0}var Cx=_x;function Ex(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $x=Ex,Mx=ki,kx="__lodash_hash_undefined__",Nx=Object.prototype,Ix=Nx.hasOwnProperty;function Dx(e){var t=this.__data__;if(Mx){var r=t[e];return r===kx?void 0:r}return Ix.call(t,e)?t[e]:void 0}var Lx=Dx,Rx=ki,Bx=Object.prototype,Fx=Bx.hasOwnProperty;function Ux(e){var t=this.__data__;return Rx?t[e]!==void 0:Fx.call(t,e)}var Wx=Ux,zx=ki,Vx="__lodash_hash_undefined__";function Hx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zx&&t===void 0?Vx:t,this}var Gx=Hx,qx=Cx,Kx=$x,Yx=Lx,Xx=Wx,Zx=Gx;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=qx,sn.prototype.delete=Kx,sn.prototype.get=Yx,sn.prototype.has=Xx,sn.prototype.set=Zx;var Jx=sn;function Qx(){this.__data__=[],this.size=0}var ew=Qx;function tw(e,t){return e===t||e!==e&&t!==t}var Js=tw,rw=Js;function nw(e,t){for(var r=e.length;r--;)if(rw(e[r][0],t))return r;return-1}var Ni=nw,aw=Ni,iw=Array.prototype,ow=iw.splice;function sw(e){var t=this.__data__,r=aw(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ow.call(t,r,1),--this.size,!0}var lw=sw,cw=Ni;function uw(e){var t=this.__data__,r=cw(t,e);return r<0?void 0:t[r][1]}var fw=uw,dw=Ni;function pw(e){return dw(this.__data__,e)>-1}var hw=pw,mw=Ni;function gw(e,t){var r=this.__data__,n=mw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var vw=gw,yw=ew,bw=lw,xw=fw,ww=hw,Ow=vw;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=yw,ln.prototype.delete=bw,ln.prototype.get=xw,ln.prototype.has=ww,ln.prototype.set=Ow;var Ii=ln,Sw=Cr,Aw=Ut,Tw=Sw(Aw,"Map"),Qs=Tw,Jf=Jx,jw=Ii,Pw=Qs;function _w(){this.size=0,this.__data__={hash:new Jf,map:new(Pw||jw),string:new Jf}}var Cw=_w;function Ew(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var $w=Ew,Mw=$w;function kw(e,t){var r=e.__data__;return Mw(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Di=kw,Nw=Di;function Iw(e){var t=Nw(this,e).delete(e);return this.size-=t?1:0,t}var Dw=Iw,Lw=Di;function Rw(e){return Lw(this,e).get(e)}var Bw=Rw,Fw=Di;function Uw(e){return Fw(this,e).has(e)}var Ww=Uw,zw=Di;function Vw(e,t){var r=zw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Hw=Vw,Gw=Cw,qw=Dw,Kw=Bw,Yw=Ww,Xw=Hw;function cn(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])}}cn.prototype.clear=Gw,cn.prototype.delete=qw,cn.prototype.get=Kw,cn.prototype.has=Yw,cn.prototype.set=Xw;var el=cn,Qf=el,Zw="Expected a function";function tl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Zw);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||Qf),r}tl.Cache=Qf;var ed=tl;const Jw=De(ed);var Qw=ed,e2=500;function t2(e){var t=Qw(e,function(n){return r.size===e2&&r.clear(),n}),r=t.cache;return t}var r2=t2,n2=r2,a2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i2=/\\(\\)?/g,o2=n2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(a2,function(r,n,a,i){t.push(a?i.replace(i2,"$1"):n||r)}),t}),s2=o2;function l2(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=l2,td=ha,c2=rl,u2=ft,f2=an,rd=td?td.prototype:void 0,nd=rd?rd.toString:void 0;function ad(e){if(typeof e=="string")return e;if(u2(e))return c2(e,ad)+"";if(f2(e))return nd?nd.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var d2=ad,p2=d2;function h2(e){return e==null?"":p2(e)}var id=h2,m2=ft,g2=Ys,v2=s2,y2=id;function b2(e,t){return m2(e)?e:g2(e,t)?[e]:v2(y2(e))}var od=b2,x2=an;function w2(e){if(typeof e=="string"||x2(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Li=w2,O2=od,S2=Li;function A2(e,t){t=O2(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[S2(t[r++])];return r&&r==n?e:void 0}var nl=A2,T2=nl;function j2(e,t,r){var n=e==null?void 0:T2(e,t);return n===void 0?r:n}var sd=j2;const Ot=De(sd);function P2(e){return e==null}var _2=P2;const pe=De(_2);var C2=Jt,E2=ft,$2=Qt,M2="[object String]";function k2(e){return typeof e=="string"||!E2(e)&&$2(e)&&C2(e)==M2}var N2=k2;const Er=De(N2);var al={exports:{}},Ae={};/**
191
196
  * @license React
192
197
  * react-is.production.min.js
193
198
  *
@@ -195,7 +200,7 @@ React keys must be passed directly to JSX without using spread:
195
200
  *
196
201
  * This source code is licensed under the MIT license found in the
197
202
  * LICENSE file in the root directory of this source tree.
198
- */var ld;function M2(){if(ld)return Ae;ld=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"),m=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function g(h){if(typeof h=="object"&&h!==null){var b=h.$$typeof;switch(b){case e:switch(h=h.type,h){case r:case a:case n:case c:case u:return h;default:switch(h=h&&h.$$typeof,h){case s:case o:case l:case d:case f:case i:return h;default:return b}}case t:return b}}}return Ae.ContextConsumer=o,Ae.ContextProvider=i,Ae.Element=e,Ae.ForwardRef=l,Ae.Fragment=r,Ae.Lazy=d,Ae.Memo=f,Ae.Portal=t,Ae.Profiler=a,Ae.StrictMode=n,Ae.Suspense=c,Ae.SuspenseList=u,Ae.isAsyncMode=function(){return!1},Ae.isConcurrentMode=function(){return!1},Ae.isContextConsumer=function(h){return g(h)===o},Ae.isContextProvider=function(h){return g(h)===i},Ae.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},Ae.isForwardRef=function(h){return g(h)===l},Ae.isFragment=function(h){return g(h)===r},Ae.isLazy=function(h){return g(h)===d},Ae.isMemo=function(h){return g(h)===f},Ae.isPortal=function(h){return g(h)===t},Ae.isProfiler=function(h){return g(h)===a},Ae.isStrictMode=function(h){return g(h)===n},Ae.isSuspense=function(h){return g(h)===c},Ae.isSuspenseList=function(h){return g(h)===u},Ae.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===a||h===n||h===c||h===u||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===f||h.$$typeof===i||h.$$typeof===o||h.$$typeof===l||h.$$typeof===v||h.getModuleId!==void 0)},Ae.typeOf=g,Ae}var Te={};/**
203
+ */var ld;function I2(){if(ld)return Ae;ld=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 Ae.ContextConsumer=o,Ae.ContextProvider=i,Ae.Element=e,Ae.ForwardRef=l,Ae.Fragment=r,Ae.Lazy=d,Ae.Memo=f,Ae.Portal=t,Ae.Profiler=a,Ae.StrictMode=n,Ae.Suspense=c,Ae.SuspenseList=u,Ae.isAsyncMode=function(){return!1},Ae.isConcurrentMode=function(){return!1},Ae.isContextConsumer=function(m){return g(m)===o},Ae.isContextProvider=function(m){return g(m)===i},Ae.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ae.isForwardRef=function(m){return g(m)===l},Ae.isFragment=function(m){return g(m)===r},Ae.isLazy=function(m){return g(m)===d},Ae.isMemo=function(m){return g(m)===f},Ae.isPortal=function(m){return g(m)===t},Ae.isProfiler=function(m){return g(m)===a},Ae.isStrictMode=function(m){return g(m)===n},Ae.isSuspense=function(m){return g(m)===c},Ae.isSuspenseList=function(m){return g(m)===u},Ae.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)},Ae.typeOf=g,Ae}var Te={};/**
199
204
  * @license React
200
205
  * react-is.development.js
201
206
  *
@@ -203,70 +208,70 @@ React keys must be passed directly to JSX without using spread:
203
208
  *
204
209
  * This source code is licensed under the MIT license found in the
205
210
  * LICENSE file in the root directory of this source tree.
206
- */var cd;function D2(){return cd||(cd=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"),m=Symbol.for("react.offscreen"),v=!1,g=!1,h=!1,b=!1,S=!1,x;x=Symbol.for("react.module.reference");function T(X){return!!(typeof X=="string"||typeof X=="function"||X===r||X===a||S||X===n||X===c||X===u||b||X===m||v||g||h||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 se=X.$$typeof;switch(se){case e:var ne=X.type;switch(ne){case r:case a:case n:case c:case u:return ne;default:var fe=ne&&ne.$$typeof;switch(fe){case s:case o:case l:case d:case f:case i:return fe;default:return se}}case t:return se}}}var w=o,A=i,P=e,$=l,R=r,j=d,C=f,F=t,B=a,z=n,_=c,L=u,V=!1,G=!1;function E(X){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function M(X){return G||(G=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(X){return y(X)===o}function K(X){return y(X)===i}function D(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function H(X){return y(X)===l}function Y(X){return y(X)===r}function te(X){return y(X)===d}function I(X){return y(X)===f}function U(X){return y(X)===t}function q(X){return y(X)===a}function J(X){return y(X)===n}function k(X){return y(X)===c}function Q(X){return y(X)===u}Te.ContextConsumer=w,Te.ContextProvider=A,Te.Element=P,Te.ForwardRef=$,Te.Fragment=R,Te.Lazy=j,Te.Memo=C,Te.Portal=F,Te.Profiler=B,Te.StrictMode=z,Te.Suspense=_,Te.SuspenseList=L,Te.isAsyncMode=E,Te.isConcurrentMode=M,Te.isContextConsumer=W,Te.isContextProvider=K,Te.isElement=D,Te.isForwardRef=H,Te.isFragment=Y,Te.isLazy=te,Te.isMemo=I,Te.isPortal=U,Te.isProfiler=q,Te.isStrictMode=J,Te.isSuspense=k,Te.isSuspenseList=Q,Te.isValidElementType=T,Te.typeOf=y}()),Te}process.env.NODE_ENV==="production"?al.exports=M2():al.exports=D2();var I2=al.exports,L2=Jt,R2=Qt,B2="[object Number]";function F2(e){return typeof e=="number"||R2(e)&&L2(e)==B2}var ud=F2;const U2=De(ud);var W2=ud;function z2(e){return W2(e)&&e!=+e}var V2=z2;const un=De(V2);var Nt=function(t){return t===0?0:t>0?1:-1},$r=function(t){return Cr(t)&&t.indexOf("%")===t.length-1},re=function(t){return U2(t)&&!un(t)},G2=function(t){return pe(t)},Xe=function(t){return re(t)||Cr(t)},H2=0,kr=function(t){var r=++H2;return"".concat(t||"").concat(r)},Nr=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(!re(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 un(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},q2=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 re(t)&&re(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):Ot(n,t))===r})}var K2=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}},Y2=function(t,r){return re(t)&&re(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 fn(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 X2=["viewBox","children"],Z2=["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"],fd=["points","pathLength"],ol={svg:X2,polygon:fd,polyline:fd},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(O.isValidElement(t)&&(n=t.props),!on(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},J2=function(t,r,n){return function(a){return t(r,n,a),null}},ga=function(t,r,n){if(!on(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]=J2(o,r,n))}),a},Q2=["children"],eO=["children"];function dd(e,t){if(e==null)return{};var r=tO(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 tO(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 pd={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"},er=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},hd=null,cl=null,ul=function e(t){if(t===hd&&Array.isArray(cl))return cl;var r=[];return O.Children.forEach(t,function(n){pe(n)||(I2.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),cl=r,hd=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return er(a)}):n=[er(t)],ul(e).forEach(function(a){var i=Ot(a,"type.displayName")||Ot(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 md=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!re(n)||n<=0||!re(a)||a<=0)},rO=["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"],nO=function(t){return t&&t.type&&Cr(t.type)&&rO.indexOf(t.type)>=0},gd=function(t){return t&&ll(t)==="object"&&"clipDot"in t},aO=function(t,r,n,a){var i,o=(i=ol==null?void 0:ol[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!me(t)&&(a&&o.includes(r)||Z2.includes(r))||n&&sl.includes(r)},he=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(O.isValidElement(t)&&(a=t.props),!on(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;aO((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=O.Children.count(t);if(n!==O.Children.count(r))return!1;if(n===0)return!0;if(n===1)return vd(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(!vd(i,o))return!1}return!0},vd=function(t,r){if(pe(t)&&pe(r))return!0;if(!pe(t)&&!pe(r)){var n=t.props||{},a=n.children,i=dd(n,Q2),o=r.props||{},s=o.children,l=dd(o,eO);return a&&s?fn(i,l)&&fl(a,s):!a&&!s?fn(i,l):!1}return!1},yd=function(t,r){var n=[],a={};return ul(t).forEach(function(i,o){if(nO(i))n.push(i);else if(i){var s=er(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},iO=function(t){var r=t&&t.type;return r&&pd[r]?pd[r]:null},oO=function(t,r){return ul(r).indexOf(t)},sO=["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 lO(e,t){if(e==null)return{};var r=cO(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 cO(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=lO(e,sO),u=a||{width:r,height:n,x:0,y:0},f=ve("recharts-surface",i);return O.createElement("svg",dl({},he(c,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),O.createElement("title",null,s),O.createElement("desc",null,l),t)}var uO=["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 fO(e,t){if(e==null)return{};var r=dO(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 dO(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 we=O.forwardRef(function(e,t){var r=e.children,n=e.className,a=fO(e,uO),i=ve("recharts-layer",n);return O.createElement("g",hl({className:i},he(a,!0),{ref:t}),r)}),pO=process.env.NODE_ENV!=="production",tr=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(pO&&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 hO(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 mO=hO,gO=mO;function vO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:gO(e,t,r)}var yO=vO,bO="\\ud800-\\udfff",xO="\\u0300-\\u036f",wO="\\ufe20-\\ufe2f",OO="\\u20d0-\\u20ff",SO=xO+wO+OO,AO="\\ufe0e\\ufe0f",TO="\\u200d",jO=RegExp("["+TO+bO+SO+AO+"]");function PO(e){return jO.test(e)}var bd=PO;function _O(e){return e.split("")}var EO=_O,xd="\\ud800-\\udfff",CO="\\u0300-\\u036f",$O="\\ufe20-\\ufe2f",kO="\\u20d0-\\u20ff",NO=CO+$O+kO,MO="\\ufe0e\\ufe0f",DO="["+xd+"]",ml="["+NO+"]",gl="\\ud83c[\\udffb-\\udfff]",IO="(?:"+ml+"|"+gl+")",wd="[^"+xd+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Sd="[\\ud800-\\udbff][\\udc00-\\udfff]",LO="\\u200d",Ad=IO+"?",Td="["+MO+"]?",RO="(?:"+LO+"(?:"+[wd,Od,Sd].join("|")+")"+Td+Ad+")*",BO=Td+Ad+RO,FO="(?:"+[wd+ml+"?",ml,Od,Sd,DO].join("|")+")",UO=RegExp(gl+"(?="+gl+")|"+FO+BO,"g");function WO(e){return e.match(UO)||[]}var zO=WO,VO=EO,GO=bd,HO=zO;function qO(e){return GO(e)?HO(e):VO(e)}var KO=qO,YO=yO,XO=bd,ZO=KO,JO=id;function QO(e){return function(t){t=JO(t);var r=XO(t)?ZO(t):void 0,n=r?r[0]:t.charAt(0),a=r?YO(r,1).join(""):t.slice(1);return n[e]()+a}}var eS=QO,tS=eS,rS=tS("toUpperCase"),nS=rS;const Fi=De(nS);function Ie(e){return function(){return e}}const jd=Math.cos,Ui=Math.sin,Mt=Math.sqrt,Wi=Math.PI,zi=2*Wi,vl=Math.PI,yl=2*vl,Mr=1e-6,aS=yl-Mr;function Pd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function iS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pd;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class oS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Pd:iS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,c=a-r,u=o-t,f=s-r,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Mr)if(!(Math.abs(f*l-c*u)>Mr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-o,v=a-s,g=l*l+c*c,h=m*m+v*v,b=Math.sqrt(g),S=Math.sqrt(d),x=i*Math.tan((vl-Math.acos((g+d-h)/(2*b*S)))/2),T=x/S,y=x/b;Math.abs(T-1)>Mr&&this._append`L${t+T*u},${r+T*f}`,this._append`A${i},${i},0,0,${+(f*m>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)>Mr||Math.abs(this._y1-u)>Mr)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%yl+yl),d>aS?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=u}`:d>Mr&&this._append`A${n},${n},0,${+(d>=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 oS(t)}function xl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _d(e){this._context=e}_d.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 _d(e)}function Ed(e){return e[0]}function Cd(e){return e[1]}function $d(e,t){var r=Ie(!0),n=null,a=Vi,i=null,o=bl(s);e=typeof e=="function"?e:e===void 0?Ed:Ie(e),t=typeof t=="function"?t:t===void 0?Cd:Ie(t);function s(l){var c,u=(l=xl(l)).length,f,d=!1,m;for(n==null&&(i=a(m=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(m)return i=null,m+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ie(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ie(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ie(!!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=Ie(!0),i=null,o=Vi,s=null,l=bl(c);e=typeof e=="function"?e:e===void 0?Ed:Ie(+e),t=typeof t=="function"?t:Ie(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Cd:Ie(+r);function c(f){var d,m,v,g=(f=xl(f)).length,h,b=!1,S,x=new Array(g),T=new Array(g);for(i==null&&(s=o(S=l())),d=0;d<=g;++d){if(!(d<g&&a(h=f[d],d,f))===b)if(b=!b)m=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=d-1;v>=m;--v)s.point(x[v],T[v]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(h,d,f),T[d]=+t(h,d,f),s.point(n?+n(h,d,f):x[d],r?+r(h,d,f):T[d]))}if(S)return s=null,S+""||null}function u(){return $d().defined(a).curve(o).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+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:Ie(!!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 kd{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 sS(e){return new kd(e,!0)}function lS(e){return new kd(e,!1)}const wl={draw(e,t){const r=Mt(t/Wi);e.moveTo(r,0),e.arc(0,0,r,0,zi)}},cS={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()}},Nd=Mt(1/3),uS=Nd*2,fS={draw(e,t){const r=Mt(t/uS),n=r*Nd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},dS={draw(e,t){const r=Mt(t),n=-r/2;e.rect(n,n,r,r)}},pS=.8908130915292852,Md=Ui(Wi/10)/Ui(7*Wi/10),hS=Ui(zi/10)*Md,mS=-jd(zi/10)*Md,gS={draw(e,t){const r=Mt(t*pS),n=hS*r,a=mS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zi*i/5,s=jd(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),vS={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()}},St=-.5,At=Mt(3)/2,Sl=1/Mt(12),yS=(Sl/2+1)*3,bS={draw(e,t){const r=Mt(t/yS),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(St*n-At*a,At*n+St*a),e.lineTo(St*i-At*o,At*i+St*o),e.lineTo(St*s-At*l,At*s+St*l),e.lineTo(St*n+At*a,St*a-At*n),e.lineTo(St*i+At*o,St*o-At*i),e.lineTo(St*s+At*l,St*l-At*s),e.closePath()}};function xS(e,t){let r=null,n=bl(a);e=typeof e=="function"?e:Ie(e||wl),t=typeof t=="function"?t:Ie(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:Ie(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ie(+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 Dd(e){this._context=e}Dd.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 wS(e){return new Dd(e)}function Id(e){this._context=e}Id.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 OS(e){return new Id(e)}function Ld(e){this._context=e}Ld.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 SS(e){return new Ld(e)}function Rd(e){this._context=e}Rd.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 AS(e){return new Rd(e)}function Bd(e){return e<0?-1:1}function Fd(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(Bd(i)+Bd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Ud(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Al(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:Al(this,this._t0,Ud(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,Al(this,Ud(this,r=Fd(this,e,t)),r);break;default:Al(this,this._t0,r=Fd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Wd(e){this._context=new zd(e)}(Wd.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function zd(e){this._context=e}zd.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 TS(e){return new Ki(e)}function jS(e){return new Wd(e)}function Vd(e){this._context=e}Vd.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=Gd(e),a=Gd(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 Gd(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 PS(e){return new Vd(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 _S(e){return new Yi(e,.5)}function ES(e){return new Yi(e,0)}function CS(e){return new Yi(e,1)}function dn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Tl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function $S(e,t){return e[t]}function kS(e){const t=[];return t.key=e,t}function NS(){var e=Ie([]),t=Tl,r=dn,n=$S;function a(i){var o=Array.from(e.apply(this,arguments),kS),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:Ie(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Ie(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Tl:typeof i=="function"?i:Ie(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??dn,a):r},a}function MS(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}dn(e,t)}}function DS(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}dn(e,t)}}function IS(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,m=(f-d)/2,v=0;v<s;++v){var g=e[t[v]],h=g[n][1]||0,b=g[n-1][1]||0;m+=h-b}l+=f,c+=m*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,dn(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 LS=["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 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 qd(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){RS(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 RS(e,t,r){return t=BS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BS(e){var t=FS(e,"string");return va(t)=="symbol"?t:t+""}function FS(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 US(e,t){if(e==null)return{};var r=WS(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 WS(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 Kd={symbolCircle:wl,symbolCross:cS,symbolDiamond:fS,symbolSquare:dS,symbolStar:gS,symbolTriangle:vS,symbolWye:bS},zS=Math.PI/180,VS=function(t){var r="symbol".concat(Fi(t));return Kd[r]||wl},GS=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*zS;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}},HS=function(t,r){Kd["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=US(t,LS),c=qd(qd({},l),{},{type:n,size:i,sizeType:s}),u=function(){var h=VS(n),b=xS().type(h).size(GS(i,s,n));return b()},f=c.className,d=c.cx,m=c.cy,v=he(c,!0);return d===+d&&m===+m&&i===+i?O.createElement("path",jl({},v,{className:ve("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(m,")"),d:u()})):null};Xi.registerSymbol=HS;function pn(e){"@babel/helpers - typeof";return pn=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},pn(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 Yd(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 qS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YS(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,Zd(n.key),n)}}function XS(e,t,r){return t&&YS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZS(e,t,r){return t=Zi(t),JS(e,Xd()?Reflect.construct(t,r||[],Zi(e).constructor):t.apply(e,r))}function JS(e,t){if(t&&(pn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QS(e)}function QS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xd=function(){return!!e})()}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zi(e)}function eA(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=Zd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zd(e){var t=tA(e,"string");return pn(t)=="symbol"?t:t+""}function tA(e,t){if(pn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pn(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 KS(this,t),ZS(this,t,arguments)}return eA(t,e),XS(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 O.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 O.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
211
+ */var cd;function D2(){return cd||(cd=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,S=!1,x;x=Symbol.for("react.module.reference");function T(K){return!!(typeof K=="string"||typeof K=="function"||K===r||K===a||S||K===n||K===c||K===u||b||K===h||v||g||m||typeof K=="object"&&K!==null&&(K.$$typeof===d||K.$$typeof===f||K.$$typeof===i||K.$$typeof===o||K.$$typeof===l||K.$$typeof===x||K.getModuleId!==void 0))}function y(K){if(typeof K=="object"&&K!==null){var oe=K.$$typeof;switch(oe){case e:var ne=K.type;switch(ne){case r:case a:case n:case c:case u:return ne;default:var fe=ne&&ne.$$typeof;switch(fe){case s:case o:case l:case d:case f:case i:return fe;default:return oe}}case t:return oe}}}var w=o,A=i,j=e,$=l,U=r,P=d,_=f,R=t,F=a,z=n,C=c,D=u,H=!1,V=!1;function E(K){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function N(K){return V||(V=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(K){return y(K)===o}function q(K){return y(K)===i}function J(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function L(K){return y(K)===l}function G(K){return y(K)===r}function Q(K){return y(K)===d}function I(K){return y(K)===f}function B(K){return y(K)===t}function Y(K){return y(K)===a}function Z(K){return y(K)===n}function M(K){return y(K)===c}function ee(K){return y(K)===u}Te.ContextConsumer=w,Te.ContextProvider=A,Te.Element=j,Te.ForwardRef=$,Te.Fragment=U,Te.Lazy=P,Te.Memo=_,Te.Portal=R,Te.Profiler=F,Te.StrictMode=z,Te.Suspense=C,Te.SuspenseList=D,Te.isAsyncMode=E,Te.isConcurrentMode=N,Te.isContextConsumer=W,Te.isContextProvider=q,Te.isElement=J,Te.isForwardRef=L,Te.isFragment=G,Te.isLazy=Q,Te.isMemo=I,Te.isPortal=B,Te.isProfiler=Y,Te.isStrictMode=Z,Te.isSuspense=M,Te.isSuspenseList=ee,Te.isValidElementType=T,Te.typeOf=y}()),Te}process.env.NODE_ENV==="production"?al.exports=I2():al.exports=D2();var L2=al.exports,R2=Jt,B2=Qt,F2="[object Number]";function U2(e){return typeof e=="number"||B2(e)&&R2(e)==F2}var ud=U2;const W2=De(ud);var z2=ud;function V2(e){return z2(e)&&e!=+e}var H2=V2;const un=De(H2);var kt=function(t){return t===0?0:t>0?1:-1},$r=function(t){return Er(t)&&t.indexOf("%")===t.length-1},re=function(t){return W2(t)&&!un(t)},G2=function(t){return pe(t)},Xe=function(t){return re(t)||Er(t)},q2=0,Mr=function(t){var r=++q2;return"".concat(t||"").concat(r)},kr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!re(t)&&!Er(t))return n;var i;if($r(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return un(i)&&(i=n),a&&i>r&&(i=r),i},mr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},K2=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},Ve=function(t,r){return re(t)&&re(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):Ot(n,t))===r})}var Y2=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}},X2=function(t,r){return re(t)&&re(r)?t-r:Er(t)&&Er(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function fn(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 Z2=["viewBox","children"],J2=["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"],fd=["points","pathLength"],ol={svg:Z2,polygon:fd,polyline:fd},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(O.isValidElement(t)&&(n=t.props),!on(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},Q2=function(t,r,n){return function(a){return t(r,n,a),null}},ga=function(t,r,n){if(!on(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]=Q2(o,r,n))}),a},eO=["children"],tO=["children"];function dd(e,t){if(e==null)return{};var r=rO(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 rO(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 pd={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"},er=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},hd=null,cl=null,ul=function e(t){if(t===hd&&Array.isArray(cl))return cl;var r=[];return O.Children.forEach(t,function(n){pe(n)||(L2.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),cl=r,hd=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return er(a)}):n=[er(t)],ul(e).forEach(function(a){var i=Ot(a,"type.displayName")||Ot(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 md=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!re(n)||n<=0||!re(a)||a<=0)},nO=["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"],aO=function(t){return t&&t.type&&Er(t.type)&&nO.indexOf(t.type)>=0},gd=function(t){return t&&ll(t)==="object"&&"clipDot"in t},iO=function(t,r,n,a){var i,o=(i=ol==null?void 0:ol[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!me(t)&&(a&&o.includes(r)||J2.includes(r))||n&&sl.includes(r)},he=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(O.isValidElement(t)&&(a=t.props),!on(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;iO((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=O.Children.count(t);if(n!==O.Children.count(r))return!1;if(n===0)return!0;if(n===1)return vd(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(!vd(i,o))return!1}return!0},vd=function(t,r){if(pe(t)&&pe(r))return!0;if(!pe(t)&&!pe(r)){var n=t.props||{},a=n.children,i=dd(n,eO),o=r.props||{},s=o.children,l=dd(o,tO);return a&&s?fn(i,l)&&fl(a,s):!a&&!s?fn(i,l):!1}return!1},yd=function(t,r){var n=[],a={};return ul(t).forEach(function(i,o){if(aO(i))n.push(i);else if(i){var s=er(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},oO=function(t){var r=t&&t.type;return r&&pd[r]?pd[r]:null},sO=function(t,r){return ul(r).indexOf(t)},lO=["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 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}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=cO(e,lO),u=a||{width:r,height:n,x:0,y:0},f=ve("recharts-surface",i);return O.createElement("svg",dl({},he(c,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),O.createElement("title",null,s),O.createElement("desc",null,l),t)}var fO=["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 dO(e,t){if(e==null)return{};var r=pO(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 pO(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 Oe=O.forwardRef(function(e,t){var r=e.children,n=e.className,a=dO(e,fO),i=ve("recharts-layer",n);return O.createElement("g",hl({className:i},he(a,!0),{ref:t}),r)}),hO=process.env.NODE_ENV!=="production",tr=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(hO&&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 mO(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 gO=mO,vO=gO;function yO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:vO(e,t,r)}var bO=yO,xO="\\ud800-\\udfff",wO="\\u0300-\\u036f",OO="\\ufe20-\\ufe2f",SO="\\u20d0-\\u20ff",AO=wO+OO+SO,TO="\\ufe0e\\ufe0f",jO="\\u200d",PO=RegExp("["+jO+xO+AO+TO+"]");function _O(e){return PO.test(e)}var bd=_O;function CO(e){return e.split("")}var EO=CO,xd="\\ud800-\\udfff",$O="\\u0300-\\u036f",MO="\\ufe20-\\ufe2f",kO="\\u20d0-\\u20ff",NO=$O+MO+kO,IO="\\ufe0e\\ufe0f",DO="["+xd+"]",ml="["+NO+"]",gl="\\ud83c[\\udffb-\\udfff]",LO="(?:"+ml+"|"+gl+")",wd="[^"+xd+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Sd="[\\ud800-\\udbff][\\udc00-\\udfff]",RO="\\u200d",Ad=LO+"?",Td="["+IO+"]?",BO="(?:"+RO+"(?:"+[wd,Od,Sd].join("|")+")"+Td+Ad+")*",FO=Td+Ad+BO,UO="(?:"+[wd+ml+"?",ml,Od,Sd,DO].join("|")+")",WO=RegExp(gl+"(?="+gl+")|"+UO+FO,"g");function zO(e){return e.match(WO)||[]}var VO=zO,HO=EO,GO=bd,qO=VO;function KO(e){return GO(e)?qO(e):HO(e)}var YO=KO,XO=bO,ZO=bd,JO=YO,QO=id;function eS(e){return function(t){t=QO(t);var r=ZO(t)?JO(t):void 0,n=r?r[0]:t.charAt(0),a=r?XO(r,1).join(""):t.slice(1);return n[e]()+a}}var tS=eS,rS=tS,nS=rS("toUpperCase"),aS=nS;const Fi=De(aS);function Le(e){return function(){return e}}const jd=Math.cos,Ui=Math.sin,Nt=Math.sqrt,Wi=Math.PI,zi=2*Wi,vl=Math.PI,yl=2*vl,Nr=1e-6,iS=yl-Nr;function Pd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function oS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pd;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class sS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Pd:oS(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),S=Math.sqrt(d),x=i*Math.tan((vl-Math.acos((g+d-m)/(2*b*S)))/2),T=x/S,y=x/b;Math.abs(T-1)>Nr&&this._append`L${t+T*u},${r+T*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>iS?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 sS(t)}function xl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _d(e){this._context=e}_d.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 _d(e)}function Cd(e){return e[0]}function Ed(e){return e[1]}function $d(e,t){var r=Le(!0),n=null,a=Vi,i=null,o=bl(s);e=typeof e=="function"?e:e===void 0?Cd:Le(e),t=typeof t=="function"?t:t===void 0?Ed:Le(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:Le(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Le(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Le(!!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 Hi(e,t,r){var n=null,a=Le(!0),i=null,o=Vi,s=null,l=bl(c);e=typeof e=="function"?e:e===void 0?Cd:Le(+e),t=typeof t=="function"?t:Le(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Ed:Le(+r);function c(f){var d,h,v,g=(f=xl(f)).length,m,b=!1,S,x=new Array(g),T=new Array(g);for(i==null&&(s=o(S=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],T[v]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(m,d,f),T[d]=+t(m,d,f),s.point(n?+n(m,d,f):x[d],r?+r(m,d,f):T[d]))}if(S)return s=null,S+""||null}function u(){return $d().defined(a).curve(o).context(i)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Le(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Le(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Le(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Le(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Le(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Le(+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:Le(!!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 Md{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 lS(e){return new Md(e,!0)}function cS(e){return new Md(e,!1)}const wl={draw(e,t){const r=Nt(t/Wi);e.moveTo(r,0),e.arc(0,0,r,0,zi)}},uS={draw(e,t){const r=Nt(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()}},kd=Nt(1/3),fS=kd*2,dS={draw(e,t){const r=Nt(t/fS),n=r*kd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},pS={draw(e,t){const r=Nt(t),n=-r/2;e.rect(n,n,r,r)}},hS=.8908130915292852,Nd=Ui(Wi/10)/Ui(7*Wi/10),mS=Ui(zi/10)*Nd,gS=-jd(zi/10)*Nd,vS={draw(e,t){const r=Nt(t*hS),n=mS*r,a=gS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zi*i/5,s=jd(o),l=Ui(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},Ol=Nt(3),yS={draw(e,t){const r=-Nt(t/(Ol*3));e.moveTo(0,r*2),e.lineTo(-Ol*r,-r),e.lineTo(Ol*r,-r),e.closePath()}},St=-.5,At=Nt(3)/2,Sl=1/Nt(12),bS=(Sl/2+1)*3,xS={draw(e,t){const r=Nt(t/bS),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(St*n-At*a,At*n+St*a),e.lineTo(St*i-At*o,At*i+St*o),e.lineTo(St*s-At*l,At*s+St*l),e.lineTo(St*n+At*a,St*a-At*n),e.lineTo(St*i+At*o,St*o-At*i),e.lineTo(St*s+At*l,St*l-At*s),e.closePath()}};function wS(e,t){let r=null,n=bl(a);e=typeof e=="function"?e:Le(e||wl),t=typeof t=="function"?t:Le(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:Le(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Le(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Gi(){}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 Id(e){this._context=e}Id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3: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 OS(e){return new Id(e)}function Dd(e){this._context=e}Dd.prototype={areaStart:Gi,areaEnd:Gi,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 SS(e){return new Dd(e)}function Ld(e){this._context=e}Ld.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 AS(e){return new Ld(e)}function Rd(e){this._context=e}Rd.prototype={areaStart:Gi,areaEnd:Gi,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 TS(e){return new Rd(e)}function Bd(e){return e<0?-1:1}function Fd(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(Bd(i)+Bd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Ud(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Al(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:Al(this,this._t0,Ud(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,Al(this,Ud(this,r=Fd(this,e,t)),r);break;default:Al(this,this._t0,r=Fd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Wd(e){this._context=new zd(e)}(Wd.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function zd(e){this._context=e}zd.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 jS(e){return new Ki(e)}function PS(e){return new Wd(e)}function Vd(e){this._context=e}Vd.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=Hd(e),a=Hd(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 Hd(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 _S(e){return new Vd(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 CS(e){return new Yi(e,.5)}function ES(e){return new Yi(e,0)}function $S(e){return new Yi(e,1)}function dn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Tl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function MS(e,t){return e[t]}function kS(e){const t=[];return t.key=e,t}function NS(){var e=Le([]),t=Tl,r=dn,n=MS;function a(i){var o=Array.from(e.apply(this,arguments),kS),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:Le(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Le(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Tl:typeof i=="function"?i:Le(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??dn,a):r},a}function IS(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}dn(e,t)}}function DS(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}dn(e,t)}}function LS(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,dn(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 RS=["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 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 qd(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){BS(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 BS(e,t,r){return t=FS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FS(e){var t=US(e,"string");return va(t)=="symbol"?t:t+""}function US(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 WS(e,t){if(e==null)return{};var r=zS(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 zS(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 Kd={symbolCircle:wl,symbolCross:uS,symbolDiamond:dS,symbolSquare:pS,symbolStar:vS,symbolTriangle:yS,symbolWye:xS},VS=Math.PI/180,HS=function(t){var r="symbol".concat(Fi(t));return Kd[r]||wl},GS=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*VS;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}},qS=function(t,r){Kd["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=WS(t,RS),c=qd(qd({},l),{},{type:n,size:i,sizeType:s}),u=function(){var m=HS(n),b=wS().type(m).size(GS(i,s,n));return b()},f=c.className,d=c.cx,h=c.cy,v=he(c,!0);return d===+d&&h===+h&&i===+i?O.createElement("path",jl({},v,{className:ve("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:u()})):null};Xi.registerSymbol=qS;function pn(e){"@babel/helpers - typeof";return pn=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},pn(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 Yd(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 KS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XS(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,Zd(n.key),n)}}function ZS(e,t,r){return t&&XS(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JS(e,t,r){return t=Zi(t),QS(e,Xd()?Reflect.construct(t,r||[],Zi(e).constructor):t.apply(e,r))}function QS(e,t){if(t&&(pn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e3(e)}function e3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xd=function(){return!!e})()}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zi(e)}function t3(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=Zd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zd(e){var t=r3(e,"string");return pn(t)=="symbol"?t:t+""}function r3(e,t){if(pn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Tt=32,Cl=function(e){function t(){return YS(this,t),JS(this,t,arguments)}return t3(t,e),ZS(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 O.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 O.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
207
212
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
208
213
  H`).concat(Tt,"M").concat(2*s,",").concat(i,`
209
- A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return O.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(O.isValidElement(n.legendIcon)){var c=qS({},n);return delete c.legendIcon,O.cloneElement(n.legendIcon,c)}return O.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(m,v){var g=m.formatter||l,h=ve(ya(ya({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",m.inactive));if(m.type==="none")return null;var b=me(m.value)?null:m.value;tr(!me(m.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 S=m.inactive?c:m.color;return O.createElement("li",Pl({className:h,style:f,key:"legend-item-".concat(v)},ga(n.props,m,v)),O.createElement(pl,{width:o,height:o,viewBox:u,style:d},n.renderIcon(m)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},g?g(b,m,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 O.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(O.PureComponent);ya(El,"displayName","Legend"),ya(El,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var rA=Di;function nA(){this.__data__=new rA,this.size=0}var aA=nA;function iA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oA=iA;function sA(e){return this.__data__.get(e)}var lA=sA;function cA(e){return this.__data__.has(e)}var uA=cA,fA=Di,dA=Qs,pA=el,hA=200;function mA(e,t){var r=this.__data__;if(r instanceof fA){var n=r.__data__;if(!dA||n.length<hA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new pA(n)}return r.set(e,t),this.size=r.size,this}var gA=mA,vA=Di,yA=aA,bA=oA,xA=lA,wA=uA,OA=gA;function hn(e){var t=this.__data__=new vA(e);this.size=t.size}hn.prototype.clear=yA,hn.prototype.delete=bA,hn.prototype.get=xA,hn.prototype.has=wA,hn.prototype.set=OA;var Jd=hn,SA="__lodash_hash_undefined__";function AA(e){return this.__data__.set(e,SA),this}var TA=AA;function jA(e){return this.__data__.has(e)}var PA=jA,_A=el,EA=TA,CA=PA;function Ji(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new _A;++t<r;)this.add(e[t])}Ji.prototype.add=Ji.prototype.push=EA,Ji.prototype.has=CA;var Qd=Ji;function $A(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 ep=$A;function kA(e,t){return e.has(t)}var tp=kA,NA=Qd,MA=ep,DA=tp,IA=1,LA=2;function RA(e,t,r,n,a,i){var o=r&IA,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,m=r&LA?new NA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],g=t[f];if(n)var h=o?n(g,v,f,t,e,i):n(v,g,f,e,t,i);if(h!==void 0){if(h)continue;d=!1;break}if(m){if(!MA(t,function(b,S){if(!DA(m,S)&&(v===b||a(v,b,r,n,i)))return m.push(S)})){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 rp=RA,BA=Ut,FA=BA.Uint8Array,UA=FA;function WA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var zA=WA;function VA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Cl=VA,np=ha,ap=UA,GA=Js,HA=rp,qA=zA,KA=Cl,YA=1,XA=2,ZA="[object Boolean]",JA="[object Date]",QA="[object Error]",eT="[object Map]",tT="[object Number]",rT="[object RegExp]",nT="[object Set]",aT="[object String]",iT="[object Symbol]",oT="[object ArrayBuffer]",sT="[object DataView]",ip=np?np.prototype:void 0,$l=ip?ip.valueOf:void 0;function lT(e,t,r,n,a,i,o){switch(r){case sT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oT:return!(e.byteLength!=t.byteLength||!i(new ap(e),new ap(t)));case ZA:case JA:case tT:return GA(+e,+t);case QA:return e.name==t.name&&e.message==t.message;case rT:case aT:return e==t+"";case eT:var s=qA;case nT:var l=n&YA;if(s||(s=KA),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=XA,o.set(e,t);var u=HA(s(e),s(t),n,a,i,o);return o.delete(e),u;case iT:if($l)return $l.call(e)==$l.call(t)}return!1}var cT=lT;function uT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var op=uT,fT=op,dT=ft;function pT(e,t,r){var n=t(e);return dT(e)?n:fT(n,r(e))}var hT=pT;function mT(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 gT=mT;function vT(){return[]}var yT=vT,bT=gT,xT=yT,wT=Object.prototype,OT=wT.propertyIsEnumerable,sp=Object.getOwnPropertySymbols,ST=sp?function(e){return e==null?[]:(e=Object(e),bT(sp(e),function(t){return OT.call(e,t)}))}:xT,AT=ST;function TT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var jT=TT,PT=Jt,_T=Qt,ET="[object Arguments]";function CT(e){return _T(e)&&PT(e)==ET}var $T=CT,lp=$T,kT=Qt,cp=Object.prototype,NT=cp.hasOwnProperty,MT=cp.propertyIsEnumerable,DT=lp(function(){return arguments}())?lp:function(e){return kT(e)&&NT.call(e,"callee")&&!MT.call(e,"callee")},kl=DT,Qi={exports:{}};function IT(){return!1}var LT=IT;Qi.exports,function(e,t){var r=Ut,n=LT,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 up=Qi.exports,RT=9007199254740991,BT=/^(?:0|[1-9]\d*)$/;function FT(e,t){var r=typeof e;return t=t??RT,!!t&&(r=="number"||r!="symbol"&&BT.test(e))&&e>-1&&e%1==0&&e<t}var Nl=FT,UT=9007199254740991;function WT(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UT}var Ml=WT,zT=Jt,VT=Ml,GT=Qt,HT="[object Arguments]",qT="[object Array]",KT="[object Boolean]",YT="[object Date]",XT="[object Error]",ZT="[object Function]",JT="[object Map]",QT="[object Number]",ej="[object Object]",tj="[object RegExp]",rj="[object Set]",nj="[object String]",aj="[object WeakMap]",ij="[object ArrayBuffer]",oj="[object DataView]",sj="[object Float32Array]",lj="[object Float64Array]",cj="[object Int8Array]",uj="[object Int16Array]",fj="[object Int32Array]",dj="[object Uint8Array]",pj="[object Uint8ClampedArray]",hj="[object Uint16Array]",mj="[object Uint32Array]",Be={};Be[sj]=Be[lj]=Be[cj]=Be[uj]=Be[fj]=Be[dj]=Be[pj]=Be[hj]=Be[mj]=!0,Be[HT]=Be[qT]=Be[ij]=Be[KT]=Be[oj]=Be[YT]=Be[XT]=Be[ZT]=Be[JT]=Be[QT]=Be[ej]=Be[tj]=Be[rj]=Be[nj]=Be[aj]=!1;function gj(e){return GT(e)&&VT(e.length)&&!!Be[zT(e)]}var vj=gj;function yj(e){return function(t){return e(t)}}var fp=yj,eo={exports:{}};eo.exports,function(e,t){var r=Vf,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 bj=eo.exports,xj=vj,wj=fp,dp=bj,pp=dp&&dp.isTypedArray,Oj=pp?wj(pp):xj,hp=Oj,Sj=jT,Aj=kl,Tj=ft,jj=up,Pj=Nl,_j=hp,Ej=Object.prototype,Cj=Ej.hasOwnProperty;function $j(e,t){var r=Tj(e),n=!r&&Aj(e),a=!r&&!n&&jj(e),i=!r&&!n&&!a&&_j(e),o=r||n||a||i,s=o?Sj(e.length,String):[],l=s.length;for(var c in e)(t||Cj.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Pj(c,l)))&&s.push(c);return s}var kj=$j,Nj=Object.prototype;function Mj(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Nj;return e===r}var Dj=Mj;function Ij(e,t){return function(r){return e(t(r))}}var mp=Ij,Lj=mp,Rj=Lj(Object.keys,Object),Bj=Rj,Fj=Dj,Uj=Bj,Wj=Object.prototype,zj=Wj.hasOwnProperty;function Vj(e){if(!Fj(e))return Uj(e);var t=[];for(var r in Object(e))zj.call(e,r)&&r!="constructor"&&t.push(r);return t}var Gj=Vj,Hj=Xs,qj=Ml;function Kj(e){return e!=null&&qj(e.length)&&!Hj(e)}var ba=Kj,Yj=kj,Xj=Gj,Zj=ba;function Jj(e){return Zj(e)?Yj(e):Xj(e)}var to=Jj,Qj=hT,eP=AT,tP=to;function rP(e){return Qj(e,tP,eP)}var nP=rP,gp=nP,aP=1,iP=Object.prototype,oP=iP.hasOwnProperty;function sP(e,t,r,n,a,i){var o=r&aP,s=gp(e),l=s.length,c=gp(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:oP.call(t,d)))return!1}var m=i.get(e),v=i.get(t);if(m&&v)return m==t&&v==e;var g=!0;i.set(e,t),i.set(t,e);for(var h=o;++f<l;){d=s[f];var b=e[d],S=t[d];if(n)var x=o?n(S,b,d,t,e,i):n(b,S,d,e,t,i);if(!(x===void 0?b===S||a(b,S,r,n,i):x)){g=!1;break}h||(h=d=="constructor")}if(g&&!h){var T=e.constructor,y=t.constructor;T!=y&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof y=="function"&&y instanceof y)&&(g=!1)}return i.delete(e),i.delete(t),g}var lP=sP,cP=Er,uP=Ut,fP=cP(uP,"DataView"),dP=fP,pP=Er,hP=Ut,mP=pP(hP,"Promise"),gP=mP,vP=Er,yP=Ut,bP=vP(yP,"Set"),vp=bP,xP=Er,wP=Ut,OP=xP(wP,"WeakMap"),SP=OP,Dl=dP,Il=Qs,Ll=gP,Rl=vp,Bl=SP,yp=Jt,mn=Xf,bp="[object Map]",AP="[object Object]",xp="[object Promise]",wp="[object Set]",Op="[object WeakMap]",Sp="[object DataView]",TP=mn(Dl),jP=mn(Il),PP=mn(Ll),_P=mn(Rl),EP=mn(Bl),Dr=yp;(Dl&&Dr(new Dl(new ArrayBuffer(1)))!=Sp||Il&&Dr(new Il)!=bp||Ll&&Dr(Ll.resolve())!=xp||Rl&&Dr(new Rl)!=wp||Bl&&Dr(new Bl)!=Op)&&(Dr=function(e){var t=yp(e),r=t==AP?e.constructor:void 0,n=r?mn(r):"";if(n)switch(n){case TP:return Sp;case jP:return bp;case PP:return xp;case _P:return wp;case EP:return Op}return t});var CP=Dr,Fl=Jd,$P=rp,kP=cT,NP=lP,Ap=CP,Tp=ft,jp=up,MP=hp,DP=1,Pp="[object Arguments]",_p="[object Array]",ro="[object Object]",IP=Object.prototype,Ep=IP.hasOwnProperty;function LP(e,t,r,n,a,i){var o=Tp(e),s=Tp(t),l=o?_p:Ap(e),c=s?_p:Ap(t);l=l==Pp?ro:l,c=c==Pp?ro:c;var u=l==ro,f=c==ro,d=l==c;if(d&&jp(e)){if(!jp(t))return!1;o=!0,u=!1}if(d&&!u)return i||(i=new Fl),o||MP(e)?$P(e,t,r,n,a,i):kP(e,t,l,r,n,a,i);if(!(r&DP)){var m=u&&Ep.call(e,"__wrapped__"),v=f&&Ep.call(t,"__wrapped__");if(m||v){var g=m?e.value():e,h=v?t.value():t;return i||(i=new Fl),a(g,h,r,n,i)}}return d?(i||(i=new Fl),NP(e,t,r,n,a,i)):!1}var RP=LP,BP=RP,Cp=Qt;function $p(e,t,r,n,a){return e===t?!0:e==null||t==null||!Cp(e)&&!Cp(t)?e!==e&&t!==t:BP(e,t,r,n,$p,a)}var Ul=$p,FP=Jd,UP=Ul,WP=1,zP=2;function VP(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 FP;if(n)var d=n(c,u,l,e,t,f);if(!(d===void 0?UP(u,c,WP|zP,n,f):d))return!1}}return!0}var GP=VP,HP=hr;function qP(e){return e===e&&!HP(e)}var kp=qP,KP=kp,YP=to;function XP(e){for(var t=YP(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,KP(a)]}return t}var ZP=XP;function JP(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Np=JP,QP=GP,e_=ZP,t_=Np;function r_(e){var t=e_(e);return t.length==1&&t[0][2]?t_(t[0][0],t[0][1]):function(r){return r===e||QP(r,e,t)}}var n_=r_;function a_(e,t){return e!=null&&t in Object(e)}var i_=a_,o_=od,s_=kl,l_=ft,c_=Nl,u_=Ml,f_=Li;function d_(e,t,r){t=o_(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=f_(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&&u_(a)&&c_(o,a)&&(l_(e)||s_(e)))}var p_=d_,h_=i_,m_=p_;function g_(e,t){return e!=null&&m_(e,t,h_)}var v_=g_,y_=Ul,b_=sd,x_=v_,w_=Ys,O_=kp,S_=Np,A_=Li,T_=1,j_=2;function P_(e,t){return w_(e)&&O_(t)?S_(A_(e),t):function(r){var n=b_(r,e);return n===void 0&&n===t?x_(r,e):y_(t,n,T_|j_)}}var __=P_;function E_(e){return e}var gn=E_;function C_(e){return function(t){return t==null?void 0:t[e]}}var $_=C_,k_=nl;function N_(e){return function(t){return k_(t,e)}}var M_=N_,D_=$_,I_=M_,L_=Ys,R_=Li;function B_(e){return L_(e)?D_(R_(e)):I_(e)}var F_=B_,U_=n_,W_=__,z_=gn,V_=ft,G_=F_;function H_(e){return typeof e=="function"?e:e==null?z_:typeof e=="object"?V_(e)?W_(e[0],e[1]):U_(e):G_(e)}var gr=H_;function q_(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 Mp=q_;function K_(e){return e!==e}var Y_=K_;function X_(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var Z_=X_,J_=Mp,Q_=Y_,eE=Z_;function tE(e,t,r){return t===t?eE(e,t,r):J_(e,Q_,r)}var rE=tE,nE=rE;function aE(e,t){var r=e==null?0:e.length;return!!r&&nE(e,t,0)>-1}var iE=aE;function oE(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 sE=oE;function lE(){}var cE=lE,Wl=vp,uE=cE,fE=Cl,dE=1/0,pE=Wl&&1/fE(new Wl([,-0]))[1]==dE?function(e){return new Wl(e)}:uE,hE=pE,mE=Qd,gE=iE,vE=sE,yE=tp,bE=hE,xE=Cl,wE=200;function OE(e,t,r){var n=-1,a=gE,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=vE;else if(i>=wE){var c=t?null:bE(e);if(c)return xE(c);o=!1,a=yE,l=new mE}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 SE=OE,AE=gr,TE=SE;function jE(e,t){return e&&e.length?TE(e,AE(t)):[]}var PE=jE;const Dp=De(PE);function Ip(e,t,r){return t===!0?Dp(e,r):me(t)?Dp(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 _E=["ref"];function Lp(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 rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lp(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rp(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,Fp(n.key),n)}}function CE(e,t,r){return t&&Rp(e.prototype,t),r&&Rp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $E(e,t,r){return t=no(t),kE(e,Bp()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function kE(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 NE(e)}function NE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bp=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function ME(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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=Fp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fp(e){var t=DE(e,"string");return vn(t)=="symbol"?t:t+""}function DE(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 IE(e,t){if(e==null)return{};var r=LE(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 LE(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 RE(e){return e.value}function BE(e,t){if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return O.createElement(e,t);t.ref;var r=IE(t,_E);return O.createElement(El,r)}var Up=1,yn=function(e){function t(){var r;EE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=$E(this,t,[].concat(a)),ao(r,"lastBoundingBox",{width:-1,height:-1}),r}return ME(t,e),CE(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)>Up||Math.abs(a.height-this.lastBoundingBox.height)>Up)&&(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?rr({},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 m=this.getBBoxSnapshot();f={left:((c||0)-m.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 rr(rr({},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=rr(rr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return O.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){n.wrapperNode=m}},BE(i,rr(rr({},this.props),{},{payload:Ip(u,c,RE)})))}}],[{key:"getWithHeight",value:function(n,a){var i=rr(rr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&re(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(O.PureComponent);ao(yn,"displayName","Legend"),ao(yn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Wp=ha,FE=kl,UE=ft,zp=Wp?Wp.isConcatSpreadable:void 0;function WE(e){return UE(e)||FE(e)||!!(zp&&e&&e[zp])}var zE=WE,VE=op,GE=zE;function Vp(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=GE),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Vp(s,t-1,r,n,a):VE(a,s):n||(a[a.length]=s)}return a}var Gp=Vp;function HE(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 qE=HE,KE=qE,YE=KE(),XE=YE,ZE=XE,JE=to;function QE(e,t){return e&&ZE(e,t,JE)}var Hp=QE,eC=ba;function tC(e,t){return function(r,n){if(r==null)return r;if(!eC(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 rC=tC,nC=Hp,aC=rC,iC=aC(nC),Vl=iC,oC=Vl,sC=ba;function lC(e,t){var r=-1,n=sC(e)?Array(e.length):[];return oC(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var qp=lC;function cC(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var uC=cC,Kp=an;function fC(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Kp(e),o=t!==void 0,s=t===null,l=t===t,c=Kp(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 dC=fC,pC=dC;function hC(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=pC(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 mC=hC,Gl=rl,gC=nl,vC=gr,yC=qp,bC=uC,xC=fp,wC=mC,OC=gn,SC=ft;function AC(e,t,r){t.length?t=Gl(t,function(i){return SC(i)?function(o){return gC(o,i.length===1?i[0]:i)}:i}):t=[OC];var n=-1;t=Gl(t,xC(vC));var a=yC(e,function(i,o,s){var l=Gl(t,function(c){return c(i)});return{criteria:l,index:++n,value:i}});return bC(a,function(i,o){return wC(i,o,r)})}var TC=AC;function jC(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 PC=jC,_C=PC,Yp=Math.max;function EC(e,t,r){return t=Yp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Yp(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),_C(e,this,s)}}var CC=EC;function $C(e){return function(){return e}}var kC=$C,NC=Er,MC=function(){try{var e=NC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Xp=MC,DC=kC,Zp=Xp,IC=gn,LC=Zp?function(e,t){return Zp(e,"toString",{configurable:!0,enumerable:!1,value:DC(t),writable:!0})}:IC,RC=LC,BC=800,FC=16,UC=Date.now;function WC(e){var t=0,r=0;return function(){var n=UC(),a=FC-(n-r);if(r=n,a>0){if(++t>=BC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var zC=WC,VC=RC,GC=zC,HC=GC(VC),qC=HC,KC=gn,YC=CC,XC=qC;function ZC(e,t){return XC(YC(e,t,KC),e+"")}var JC=ZC,QC=Js,e$=ba,t$=Nl,r$=hr;function n$(e,t,r){if(!r$(r))return!1;var n=typeof t;return(n=="number"?e$(r)&&t$(t,r.length):n=="string"&&t in r)?QC(r[t],e):!1}var io=n$,a$=Gp,i$=TC,o$=JC,Jp=io,s$=o$(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Jp(e,t[0],t[1])?t=[]:r>2&&Jp(t[0],t[1],t[2])&&(t=[t[0]]),i$(e,a$(t,1),[])}),l$=s$;const Hl=De(l$);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 c$(e,t){return p$(e)||d$(e,t)||f$(e,t)||u$()}function u$(){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 f$(e,t){if(e){if(typeof e=="string")return Qp(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 Qp(e,t)}}function Qp(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 d$(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 p$(e){if(Array.isArray(e))return e}function eh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(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?eh(Object(r),!0).forEach(function(n){h$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h$(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=g$(e,"string");return xa(t)=="symbol"?t:t+""}function g$(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 v$(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var y$=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,m=t.wrapperClassName,v=t.labelClassName,g=t.label,h=t.labelFormatter,b=t.accessibilityLayer,S=b===void 0?!1:b,x=function(){if(u&&u.length){var C={padding:0,margin:0},F=(d?Hl(u,d):u).map(function(B,z){if(B.type==="none")return null;var _=Kl({display:"block",paddingTop:4,paddingBottom:4,color:B.color||"#000"},s),L=B.formatter||f||v$,V=B.value,G=B.name,E=V,M=G;if(L&&E!=null&&M!=null){var W=L(V,G,B,z,u);if(Array.isArray(W)){var K=c$(W,2);E=K[0],M=K[1]}else E=W}return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:_},Xe(M)?O.createElement("span",{className:"recharts-tooltip-item-name"},M):null,Xe(M)?O.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,O.createElement("span",{className:"recharts-tooltip-item-value"},E),O.createElement("span",{className:"recharts-tooltip-item-unit"},B.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:C},F)}return null},T=Kl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Kl({margin:0},c),w=!pe(g),A=w?g:"",P=ve("recharts-default-tooltip",m),$=ve("recharts-tooltip-label",v);w&&h&&u!==void 0&&u!==null&&(A=h(g,u));var R=S?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",ql({className:P,style:T},R),O.createElement("p",{className:$,style:y},O.isValidElement(A)?A:"".concat(A)),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=b$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b$(e){var t=x$(e,"string");return wa(t)=="symbol"?t:t+""}function x$(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",w$={visibility:"hidden"};function O$(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ve(Oa,oo(oo(oo(oo({},"".concat(Oa,"-right"),re(r)&&t&&re(t.x)&&r>=t.x),"".concat(Oa,"-left"),re(r)&&t&&re(t.x)&&r<t.x),"".concat(Oa,"-bottom"),re(n)&&t&&re(t.y)&&n>=t.y),"".concat(Oa,"-top"),re(n)&&t&&re(t.y)&&n<t.y))}function th(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&&re(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,m=l[n];return d<m?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 S$(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 A$(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=th({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=th({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=S$({translateX:u,translateY:f,useTranslate3d:s})):c=w$,{cssProperties:c,cssClasses:O$({translateX:u,translateY:f,coordinate:r})}}function bn(e){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(e)}function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){Xl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ih(n.key),n)}}function P$(e,t,r){return t&&j$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _$(e,t,r){return t=so(t),E$(e,ah()?Reflect.construct(t,r||[],so(e).constructor):t.apply(e,r))}function E$(e,t){if(t&&(bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C$(e)}function C$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ah(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ah=function(){return!!e})()}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}function $$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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=ih(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ih(e){var t=k$(e,"string");return bn(t)=="symbol"?t:t+""}function k$(e,t){if(bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oh=1,N$=function(e){function t(){var r;T$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=_$(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 $$(t,e),P$(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>oh||Math.abs(n.height-this.state.lastBoundingBox.height)>oh)&&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,m=a.offset,v=a.position,g=a.reverseDirection,h=a.useTranslate3d,b=a.viewBox,S=a.wrapperStyle,x=A$({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:m,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:b}),T=x.cssClasses,y=x.cssProperties,w=nh(nh({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},S);return O.createElement("div",{tabIndex:-1,className:T,style:w,ref:function(P){n.wrapperNode=P}},c)}}])}(O.PureComponent),M$=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:M$()};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 sh(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 lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){Jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I$(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,uh(n.key),n)}}function L$(e,t,r){return t&&I$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function R$(e,t,r){return t=lo(t),B$(e,ch()?Reflect.construct(t,r||[],lo(e).constructor):t.apply(e,r))}function B$(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 F$(e)}function F$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ch(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ch=function(){return!!e})()}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function U$(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=uh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uh(e){var t=W$(e,"string");return xn(t)=="symbol"?t:t+""}function W$(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 String(e)}function z$(e){return e.dataKey}function V$(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(y$,t)}var Wt=function(e){function t(){return D$(this,t),R$(this,t,arguments)}return U$(t,e),L$(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,m=a.offset,v=a.payload,g=a.payloadUniqBy,h=a.position,b=a.reverseDirection,S=a.useTranslate3d,x=a.viewBox,T=a.wrapperStyle,y=v??[];f&&y.length&&(y=Ip(v.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),g,z$));var w=y.length>0;return O.createElement(N$,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:u,hasPayload:w,offset:m,position:h,reverseDirection:b,useTranslate3d:S,viewBox:x,wrapperStyle:T},V$(c,lh(lh({},this.props),{},{payload:y})))}}])}(O.PureComponent);Jl(Wt,"displayName","Tooltip"),Jl(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!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 G$=Ut,H$=function(){return G$.Date.now()},q$=H$,K$=/\s/;function Y$(e){for(var t=e.length;t--&&K$.test(e.charAt(t)););return t}var X$=Y$,Z$=X$,J$=/^\s+/;function Q$(e){return e&&e.slice(0,Z$(e)+1).replace(J$,"")}var e3=Q$,t3=e3,fh=hr,r3=an,dh=NaN,n3=/^[-+]0x[0-9a-f]+$/i,a3=/^0b[01]+$/i,i3=/^0o[0-7]+$/i,o3=parseInt;function s3(e){if(typeof e=="number")return e;if(r3(e))return dh;if(fh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=t3(e);var r=a3.test(e);return r||i3.test(e)?o3(e.slice(2),r?2:8):n3.test(e)?dh:+e}var ph=s3,l3=hr,Ql=q$,hh=ph,c3="Expected a function",u3=Math.max,f3=Math.min;function d3(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(c3);t=hh(t)||0,l3(r)&&(u=!!r.leading,f="maxWait"in r,i=f?u3(hh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function m(w){var A=n,P=a;return n=a=void 0,c=w,o=e.apply(P,A),o}function v(w){return c=w,s=setTimeout(b,t),u?m(w):o}function g(w){var A=w-l,P=w-c,$=t-A;return f?f3($,i-P):$}function h(w){var A=w-l,P=w-c;return l===void 0||A>=t||A<0||f&&P>=i}function b(){var w=Ql();if(h(w))return S(w);s=setTimeout(b,g(w))}function S(w){return s=void 0,d&&n?m(w):(n=a=void 0,o)}function x(){s!==void 0&&clearTimeout(s),c=0,n=l=a=s=void 0}function T(){return s===void 0?o:S(Ql())}function y(){var w=Ql(),A=h(w);if(n=arguments,a=this,l=w,A){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(b,t),m(l)}return s===void 0&&(s=setTimeout(b,t)),o}return y.cancel=x,y.flush=T,y}var p3=d3,h3=p3,m3=hr,g3="Expected a function";function v3(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(g3);return m3(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),h3(e,t,{leading:n,maxWait:t,trailing:a})}var y3=v3;const mh=De(y3);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 gh(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?gh(Object(r),!0).forEach(function(n){b3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b3(e,t,r){return t=x3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x3(e){var t=w3(e,"string");return Sa(t)=="symbol"?t:t+""}function w3(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 O3(e,t){return j3(e)||T3(e,t)||A3(e,t)||S3()}function S3(){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 A3(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 T3(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 j3(e){if(Array.isArray(e))return e}var P3=O.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,m=e.children,v=e.debounce,g=v===void 0?0:v,h=e.id,b=e.className,S=e.onResize,x=e.style,T=x===void 0?{}:x,y=O.useRef(null),w=O.useRef();w.current=S,O.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 A=O.useState({containerWidth:a.width,containerHeight:a.height}),P=O3(A,2),$=P[0],R=P[1],j=O.useCallback(function(F,B){R(function(z){var _=Math.round(F),L=Math.round(B);return z.containerWidth===_&&z.containerHeight===L?z:{containerWidth:_,containerHeight:L}})},[]);O.useEffect(function(){var F=function(G){var E,M=G[0].contentRect,W=M.width,K=M.height;j(W,K),(E=w.current)===null||E===void 0||E.call(w,W,K)};g>0&&(F=mh(F,g,{trailing:!0,leading:!1}));var B=new ResizeObserver(F),z=y.current.getBoundingClientRect(),_=z.width,L=z.height;return j(_,L),B.observe(y.current),function(){B.disconnect()}},[j,g]);var C=O.useMemo(function(){var F=$.containerWidth,B=$.containerHeight;if(F<0||B<0)return null;tr($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),tr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var z=$r(o)?F:o,_=$r(l)?B:l;r&&r>0&&(z?_=z/r:_&&(z=_*r),d&&_>d&&(_=d)),tr(z>0||_>0,`The width(%s) and height(%s) of chart should be greater than 0,
214
+ A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return O.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(O.isValidElement(n.legendIcon)){var c=KS({},n);return delete c.legendIcon,O.cloneElement(n.legendIcon,c)}return O.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=me(h.value)?null:h.value;tr(!me(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 S=h.inactive?c:h.color;return O.createElement("li",Pl({className:m,style:f,key:"legend-item-".concat(v)},ga(n.props,h,v)),O.createElement(pl,{width:o,height:o,viewBox:u,style:d},n.renderIcon(h)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},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 O.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(O.PureComponent);ya(Cl,"displayName","Legend"),ya(Cl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var n3=Ii;function a3(){this.__data__=new n3,this.size=0}var i3=a3;function o3(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var s3=o3;function l3(e){return this.__data__.get(e)}var c3=l3;function u3(e){return this.__data__.has(e)}var f3=u3,d3=Ii,p3=Qs,h3=el,m3=200;function g3(e,t){var r=this.__data__;if(r instanceof d3){var n=r.__data__;if(!p3||n.length<m3-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new h3(n)}return r.set(e,t),this.size=r.size,this}var v3=g3,y3=Ii,b3=i3,x3=s3,w3=c3,O3=f3,S3=v3;function hn(e){var t=this.__data__=new y3(e);this.size=t.size}hn.prototype.clear=b3,hn.prototype.delete=x3,hn.prototype.get=w3,hn.prototype.has=O3,hn.prototype.set=S3;var Jd=hn,A3="__lodash_hash_undefined__";function T3(e){return this.__data__.set(e,A3),this}var j3=T3;function P3(e){return this.__data__.has(e)}var _3=P3,C3=el,E3=j3,$3=_3;function Ji(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new C3;++t<r;)this.add(e[t])}Ji.prototype.add=Ji.prototype.push=E3,Ji.prototype.has=$3;var Qd=Ji;function M3(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 ep=M3;function k3(e,t){return e.has(t)}var tp=k3,N3=Qd,I3=ep,D3=tp,L3=1,R3=2;function B3(e,t,r,n,a,i){var o=r&L3,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&R3?new N3: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(!I3(t,function(b,S){if(!D3(h,S)&&(v===b||a(v,b,r,n,i)))return h.push(S)})){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 rp=B3,F3=Ut,U3=F3.Uint8Array,W3=U3;function z3(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var V3=z3;function H3(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var El=H3,np=ha,ap=W3,G3=Js,q3=rp,K3=V3,Y3=El,X3=1,Z3=2,J3="[object Boolean]",Q3="[object Date]",eA="[object Error]",tA="[object Map]",rA="[object Number]",nA="[object RegExp]",aA="[object Set]",iA="[object String]",oA="[object Symbol]",sA="[object ArrayBuffer]",lA="[object DataView]",ip=np?np.prototype:void 0,$l=ip?ip.valueOf:void 0;function cA(e,t,r,n,a,i,o){switch(r){case lA:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sA:return!(e.byteLength!=t.byteLength||!i(new ap(e),new ap(t)));case J3:case Q3:case rA:return G3(+e,+t);case eA:return e.name==t.name&&e.message==t.message;case nA:case iA:return e==t+"";case tA:var s=K3;case aA:var l=n&X3;if(s||(s=Y3),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=Z3,o.set(e,t);var u=q3(s(e),s(t),n,a,i,o);return o.delete(e),u;case oA:if($l)return $l.call(e)==$l.call(t)}return!1}var uA=cA;function fA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var op=fA,dA=op,pA=ft;function hA(e,t,r){var n=t(e);return pA(e)?n:dA(n,r(e))}var mA=hA;function gA(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 vA=gA;function yA(){return[]}var bA=yA,xA=vA,wA=bA,OA=Object.prototype,SA=OA.propertyIsEnumerable,sp=Object.getOwnPropertySymbols,AA=sp?function(e){return e==null?[]:(e=Object(e),xA(sp(e),function(t){return SA.call(e,t)}))}:wA,TA=AA;function jA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PA=jA,_A=Jt,CA=Qt,EA="[object Arguments]";function $A(e){return CA(e)&&_A(e)==EA}var MA=$A,lp=MA,kA=Qt,cp=Object.prototype,NA=cp.hasOwnProperty,IA=cp.propertyIsEnumerable,DA=lp(function(){return arguments}())?lp:function(e){return kA(e)&&NA.call(e,"callee")&&!IA.call(e,"callee")},Ml=DA,Qi={exports:{}};function LA(){return!1}var RA=LA;Qi.exports,function(e,t){var r=Ut,n=RA,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 up=Qi.exports,BA=9007199254740991,FA=/^(?:0|[1-9]\d*)$/;function UA(e,t){var r=typeof e;return t=t??BA,!!t&&(r=="number"||r!="symbol"&&FA.test(e))&&e>-1&&e%1==0&&e<t}var kl=UA,WA=9007199254740991;function zA(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WA}var Nl=zA,VA=Jt,HA=Nl,GA=Qt,qA="[object Arguments]",KA="[object Array]",YA="[object Boolean]",XA="[object Date]",ZA="[object Error]",JA="[object Function]",QA="[object Map]",eT="[object Number]",tT="[object Object]",rT="[object RegExp]",nT="[object Set]",aT="[object String]",iT="[object WeakMap]",oT="[object ArrayBuffer]",sT="[object DataView]",lT="[object Float32Array]",cT="[object Float64Array]",uT="[object Int8Array]",fT="[object Int16Array]",dT="[object Int32Array]",pT="[object Uint8Array]",hT="[object Uint8ClampedArray]",mT="[object Uint16Array]",gT="[object Uint32Array]",Fe={};Fe[lT]=Fe[cT]=Fe[uT]=Fe[fT]=Fe[dT]=Fe[pT]=Fe[hT]=Fe[mT]=Fe[gT]=!0,Fe[qA]=Fe[KA]=Fe[oT]=Fe[YA]=Fe[sT]=Fe[XA]=Fe[ZA]=Fe[JA]=Fe[QA]=Fe[eT]=Fe[tT]=Fe[rT]=Fe[nT]=Fe[aT]=Fe[iT]=!1;function vT(e){return GA(e)&&HA(e.length)&&!!Fe[VA(e)]}var yT=vT;function bT(e){return function(t){return e(t)}}var fp=bT,eo={exports:{}};eo.exports,function(e,t){var r=Vf,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 xT=eo.exports,wT=yT,OT=fp,dp=xT,pp=dp&&dp.isTypedArray,ST=pp?OT(pp):wT,hp=ST,AT=PA,TT=Ml,jT=ft,PT=up,_T=kl,CT=hp,ET=Object.prototype,$T=ET.hasOwnProperty;function MT(e,t){var r=jT(e),n=!r&&TT(e),a=!r&&!n&&PT(e),i=!r&&!n&&!a&&CT(e),o=r||n||a||i,s=o?AT(e.length,String):[],l=s.length;for(var c in e)(t||$T.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_T(c,l)))&&s.push(c);return s}var kT=MT,NT=Object.prototype;function IT(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||NT;return e===r}var DT=IT;function LT(e,t){return function(r){return e(t(r))}}var mp=LT,RT=mp,BT=RT(Object.keys,Object),FT=BT,UT=DT,WT=FT,zT=Object.prototype,VT=zT.hasOwnProperty;function HT(e){if(!UT(e))return WT(e);var t=[];for(var r in Object(e))VT.call(e,r)&&r!="constructor"&&t.push(r);return t}var GT=HT,qT=Xs,KT=Nl;function YT(e){return e!=null&&KT(e.length)&&!qT(e)}var ba=YT,XT=kT,ZT=GT,JT=ba;function QT(e){return JT(e)?XT(e):ZT(e)}var to=QT,e6=mA,t6=TA,r6=to;function n6(e){return e6(e,r6,t6)}var a6=n6,gp=a6,i6=1,o6=Object.prototype,s6=o6.hasOwnProperty;function l6(e,t,r,n,a,i){var o=r&i6,s=gp(e),l=s.length,c=gp(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:s6.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],S=t[d];if(n)var x=o?n(S,b,d,t,e,i):n(b,S,d,e,t,i);if(!(x===void 0?b===S||a(b,S,r,n,i):x)){g=!1;break}m||(m=d=="constructor")}if(g&&!m){var T=e.constructor,y=t.constructor;T!=y&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof y=="function"&&y instanceof y)&&(g=!1)}return i.delete(e),i.delete(t),g}var c6=l6,u6=Cr,f6=Ut,d6=u6(f6,"DataView"),p6=d6,h6=Cr,m6=Ut,g6=h6(m6,"Promise"),v6=g6,y6=Cr,b6=Ut,x6=y6(b6,"Set"),vp=x6,w6=Cr,O6=Ut,S6=w6(O6,"WeakMap"),A6=S6,Il=p6,Dl=Qs,Ll=v6,Rl=vp,Bl=A6,yp=Jt,mn=Xf,bp="[object Map]",T6="[object Object]",xp="[object Promise]",wp="[object Set]",Op="[object WeakMap]",Sp="[object DataView]",j6=mn(Il),P6=mn(Dl),_6=mn(Ll),C6=mn(Rl),E6=mn(Bl),Ir=yp;(Il&&Ir(new Il(new ArrayBuffer(1)))!=Sp||Dl&&Ir(new Dl)!=bp||Ll&&Ir(Ll.resolve())!=xp||Rl&&Ir(new Rl)!=wp||Bl&&Ir(new Bl)!=Op)&&(Ir=function(e){var t=yp(e),r=t==T6?e.constructor:void 0,n=r?mn(r):"";if(n)switch(n){case j6:return Sp;case P6:return bp;case _6:return xp;case C6:return wp;case E6:return Op}return t});var $6=Ir,Fl=Jd,M6=rp,k6=uA,N6=c6,Ap=$6,Tp=ft,jp=up,I6=hp,D6=1,Pp="[object Arguments]",_p="[object Array]",ro="[object Object]",L6=Object.prototype,Cp=L6.hasOwnProperty;function R6(e,t,r,n,a,i){var o=Tp(e),s=Tp(t),l=o?_p:Ap(e),c=s?_p:Ap(t);l=l==Pp?ro:l,c=c==Pp?ro:c;var u=l==ro,f=c==ro,d=l==c;if(d&&jp(e)){if(!jp(t))return!1;o=!0,u=!1}if(d&&!u)return i||(i=new Fl),o||I6(e)?M6(e,t,r,n,a,i):k6(e,t,l,r,n,a,i);if(!(r&D6)){var h=u&&Cp.call(e,"__wrapped__"),v=f&&Cp.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),N6(e,t,r,n,a,i)):!1}var B6=R6,F6=B6,Ep=Qt;function $p(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ep(e)&&!Ep(t)?e!==e&&t!==t:F6(e,t,r,n,$p,a)}var Ul=$p,U6=Jd,W6=Ul,z6=1,V6=2;function H6(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 U6;if(n)var d=n(c,u,l,e,t,f);if(!(d===void 0?W6(u,c,z6|V6,n,f):d))return!1}}return!0}var G6=H6,q6=hr;function K6(e){return e===e&&!q6(e)}var Mp=K6,Y6=Mp,X6=to;function Z6(e){for(var t=X6(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Y6(a)]}return t}var J6=Z6;function Q6(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var kp=Q6,e5=G6,t5=J6,r5=kp;function n5(e){var t=t5(e);return t.length==1&&t[0][2]?r5(t[0][0],t[0][1]):function(r){return r===e||e5(r,e,t)}}var a5=n5;function i5(e,t){return e!=null&&t in Object(e)}var o5=i5,s5=od,l5=Ml,c5=ft,u5=kl,f5=Nl,d5=Li;function p5(e,t,r){t=s5(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=d5(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&&f5(a)&&u5(o,a)&&(c5(e)||l5(e)))}var h5=p5,m5=o5,g5=h5;function v5(e,t){return e!=null&&g5(e,t,m5)}var y5=v5,b5=Ul,x5=sd,w5=y5,O5=Ys,S5=Mp,A5=kp,T5=Li,j5=1,P5=2;function _5(e,t){return O5(e)&&S5(t)?A5(T5(e),t):function(r){var n=x5(r,e);return n===void 0&&n===t?w5(r,e):b5(t,n,j5|P5)}}var C5=_5;function E5(e){return e}var gn=E5;function $5(e){return function(t){return t==null?void 0:t[e]}}var M5=$5,k5=nl;function N5(e){return function(t){return k5(t,e)}}var I5=N5,D5=M5,L5=I5,R5=Ys,B5=Li;function F5(e){return R5(e)?D5(B5(e)):L5(e)}var U5=F5,W5=a5,z5=C5,V5=gn,H5=ft,G5=U5;function q5(e){return typeof e=="function"?e:e==null?V5:typeof e=="object"?H5(e)?z5(e[0],e[1]):W5(e):G5(e)}var gr=q5;function K5(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 Np=K5;function Y5(e){return e!==e}var X5=Y5;function Z5(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var J5=Z5,Q5=Np,e4=X5,t4=J5;function r4(e,t,r){return t===t?t4(e,t,r):Q5(e,e4,r)}var n4=r4,a4=n4;function i4(e,t){var r=e==null?0:e.length;return!!r&&a4(e,t,0)>-1}var o4=i4;function s4(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 l4=s4;function c4(){}var u4=c4,Wl=vp,f4=u4,d4=El,p4=1/0,h4=Wl&&1/d4(new Wl([,-0]))[1]==p4?function(e){return new Wl(e)}:f4,m4=h4,g4=Qd,v4=o4,y4=l4,b4=tp,x4=m4,w4=El,O4=200;function S4(e,t,r){var n=-1,a=v4,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=y4;else if(i>=O4){var c=t?null:x4(e);if(c)return w4(c);o=!1,a=b4,l=new g4}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 A4=S4,T4=gr,j4=A4;function P4(e,t){return e&&e.length?j4(e,T4(t)):[]}var _4=P4;const Ip=De(_4);function Dp(e,t,r){return t===!0?Ip(e,r):me(t)?Ip(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 C4=["ref"];function Lp(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 rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lp(Object(r),!0).forEach(function(n){ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rp(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,Fp(n.key),n)}}function $4(e,t,r){return t&&Rp(e.prototype,t),r&&Rp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function M4(e,t,r){return t=no(t),k4(e,Bp()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function k4(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 N4(e)}function N4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bp=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function I4(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=Fp(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fp(e){var t=D4(e,"string");return vn(t)=="symbol"?t:t+""}function D4(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 L4(e,t){if(e==null)return{};var r=R4(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 R4(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 B4(e){return e.value}function F4(e,t){if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return O.createElement(e,t);t.ref;var r=L4(t,C4);return O.createElement(Cl,r)}var Up=1,yn=function(e){function t(){var r;E4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=M4(this,t,[].concat(a)),ao(r,"lastBoundingBox",{width:-1,height:-1}),r}return I4(t,e),$4(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)>Up||Math.abs(a.height-this.lastBoundingBox.height)>Up)&&(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?rr({},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 rr(rr({},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=rr(rr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return O.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},F4(i,rr(rr({},this.props),{},{payload:Dp(u,c,B4)})))}}],[{key:"getWithHeight",value:function(n,a){var i=rr(rr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&re(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(O.PureComponent);ao(yn,"displayName","Legend"),ao(yn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Wp=ha,U4=Ml,W4=ft,zp=Wp?Wp.isConcatSpreadable:void 0;function z4(e){return W4(e)||U4(e)||!!(zp&&e&&e[zp])}var V4=z4,H4=op,G4=V4;function Vp(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=G4),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Vp(s,t-1,r,n,a):H4(a,s):n||(a[a.length]=s)}return a}var Hp=Vp;function q4(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 K4=q4,Y4=K4,X4=Y4(),Z4=X4,J4=Z4,Q4=to;function ej(e,t){return e&&J4(e,t,Q4)}var Gp=ej,tj=ba;function rj(e,t){return function(r,n){if(r==null)return r;if(!tj(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 nj=rj,aj=Gp,ij=nj,oj=ij(aj),Vl=oj,sj=Vl,lj=ba;function cj(e,t){var r=-1,n=lj(e)?Array(e.length):[];return sj(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var qp=cj;function uj(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var fj=uj,Kp=an;function dj(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Kp(e),o=t!==void 0,s=t===null,l=t===t,c=Kp(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 pj=dj,hj=pj;function mj(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=hj(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 gj=mj,Hl=rl,vj=nl,yj=gr,bj=qp,xj=fj,wj=fp,Oj=gj,Sj=gn,Aj=ft;function Tj(e,t,r){t.length?t=Hl(t,function(i){return Aj(i)?function(o){return vj(o,i.length===1?i[0]:i)}:i}):t=[Sj];var n=-1;t=Hl(t,wj(yj));var a=bj(e,function(i,o,s){var l=Hl(t,function(c){return c(i)});return{criteria:l,index:++n,value:i}});return xj(a,function(i,o){return Oj(i,o,r)})}var jj=Tj;function Pj(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 _j=Pj,Cj=_j,Yp=Math.max;function Ej(e,t,r){return t=Yp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Yp(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),Cj(e,this,s)}}var $j=Ej;function Mj(e){return function(){return e}}var kj=Mj,Nj=Cr,Ij=function(){try{var e=Nj(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Xp=Ij,Dj=kj,Zp=Xp,Lj=gn,Rj=Zp?function(e,t){return Zp(e,"toString",{configurable:!0,enumerable:!1,value:Dj(t),writable:!0})}:Lj,Bj=Rj,Fj=800,Uj=16,Wj=Date.now;function zj(e){var t=0,r=0;return function(){var n=Wj(),a=Uj-(n-r);if(r=n,a>0){if(++t>=Fj)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Vj=zj,Hj=Bj,Gj=Vj,qj=Gj(Hj),Kj=qj,Yj=gn,Xj=$j,Zj=Kj;function Jj(e,t){return Zj(Xj(e,t,Yj),e+"")}var Qj=Jj,e8=Js,t8=ba,r8=kl,n8=hr;function a8(e,t,r){if(!n8(r))return!1;var n=typeof t;return(n=="number"?t8(r)&&r8(t,r.length):n=="string"&&t in r)?e8(r[t],e):!1}var io=a8,i8=Hp,o8=jj,s8=Qj,Jp=io,l8=s8(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Jp(e,t[0],t[1])?t=[]:r>2&&Jp(t[0],t[1],t[2])&&(t=[t[0]]),o8(e,i8(t,1),[])}),c8=l8;const Gl=De(c8);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 u8(e,t){return h8(e)||p8(e,t)||d8(e,t)||f8()}function f8(){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 d8(e,t){if(e){if(typeof e=="string")return Qp(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 Qp(e,t)}}function Qp(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 p8(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 h8(e){if(Array.isArray(e))return e}function eh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(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?eh(Object(r),!0).forEach(function(n){m8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m8(e,t,r){return t=g8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g8(e){var t=v8(e,"string");return xa(t)=="symbol"?t:t+""}function v8(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 y8(e){return Array.isArray(e)&&Xe(e[0])&&Xe(e[1])?e.join(" ~ "):e}var b8=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,S=b===void 0?!1:b,x=function(){if(u&&u.length){var _={padding:0,margin:0},R=(d?Gl(u,d):u).map(function(F,z){if(F.type==="none")return null;var C=Kl({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},s),D=F.formatter||f||y8,H=F.value,V=F.name,E=H,N=V;if(D&&E!=null&&N!=null){var W=D(H,V,F,z,u);if(Array.isArray(W)){var q=u8(W,2);E=q[0],N=q[1]}else E=W}return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:C},Xe(N)?O.createElement("span",{className:"recharts-tooltip-item-name"},N):null,Xe(N)?O.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,O.createElement("span",{className:"recharts-tooltip-item-value"},E),O.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:_},R)}return null},T=Kl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Kl({margin:0},c),w=!pe(g),A=w?g:"",j=ve("recharts-default-tooltip",h),$=ve("recharts-tooltip-label",v);w&&m&&u!==void 0&&u!==null&&(A=m(g,u));var U=S?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",ql({className:j,style:T},U),O.createElement("p",{className:$,style:y},O.isValidElement(A)?A:"".concat(A)),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=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 wa(t)=="symbol"?t:t+""}function w8(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",O8={visibility:"hidden"};function S8(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ve(Oa,oo(oo(oo(oo({},"".concat(Oa,"-right"),re(r)&&t&&re(t.x)&&r>=t.x),"".concat(Oa,"-left"),re(r)&&t&&re(t.x)&&r<t.x),"".concat(Oa,"-bottom"),re(n)&&t&&re(t.y)&&n>=t.y),"".concat(Oa,"-top"),re(n)&&t&&re(t.y)&&n<t.y))}function th(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&&re(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 A8(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 T8(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=th({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=th({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=A8({translateX:u,translateY:f,useTranslate3d:s})):c=O8,{cssProperties:c,cssClasses:S8({translateX:u,translateY:f,coordinate:r})}}function bn(e){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bn(e)}function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){Xl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ih(n.key),n)}}function _8(e,t,r){return t&&P8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C8(e,t,r){return t=so(t),E8(e,ah()?Reflect.construct(t,r||[],so(e).constructor):t.apply(e,r))}function E8(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 $8(e)}function $8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ah(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ah=function(){return!!e})()}function so(e){return so=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},so(e)}function M8(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=ih(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ih(e){var t=k8(e,"string");return bn(t)=="symbol"?t:t+""}function k8(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)}var oh=1,N8=function(e){function t(){var r;j8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=C8(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 M8(t,e),_8(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>oh||Math.abs(n.height-this.state.lastBoundingBox.height)>oh)&&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,S=a.wrapperStyle,x=T8({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:h,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:b}),T=x.cssClasses,y=x.cssProperties,w=nh(nh({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},S);return O.createElement("div",{tabIndex:-1,className:T,style:w,ref:function(j){n.wrapperNode=j}},c)}}])}(O.PureComponent),I8=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:I8()};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 sh(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 lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){Jl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L8(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,uh(n.key),n)}}function R8(e,t,r){return t&&L8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B8(e,t,r){return t=lo(t),F8(e,ch()?Reflect.construct(t,r||[],lo(e).constructor):t.apply(e,r))}function F8(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 U8(e)}function U8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ch(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ch=function(){return!!e})()}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lo(e)}function W8(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=uh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uh(e){var t=z8(e,"string");return xn(t)=="symbol"?t:t+""}function z8(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 String(e)}function V8(e){return e.dataKey}function H8(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(b8,t)}var Wt=function(e){function t(){return D8(this,t),B8(this,t,arguments)}return W8(t,e),R8(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,S=a.useTranslate3d,x=a.viewBox,T=a.wrapperStyle,y=v??[];f&&y.length&&(y=Dp(v.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),g,V8));var w=y.length>0;return O.createElement(N8,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:u,hasPayload:w,offset:h,position:m,reverseDirection:b,useTranslate3d:S,viewBox:x,wrapperStyle:T},H8(c,lh(lh({},this.props),{},{payload:y})))}}])}(O.PureComponent);Jl(Wt,"displayName","Tooltip"),Jl(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!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 G8=Ut,q8=function(){return G8.Date.now()},K8=q8,Y8=/\s/;function X8(e){for(var t=e.length;t--&&Y8.test(e.charAt(t)););return t}var Z8=X8,J8=Z8,Q8=/^\s+/;function eP(e){return e&&e.slice(0,J8(e)+1).replace(Q8,"")}var tP=eP,rP=tP,fh=hr,nP=an,dh=NaN,aP=/^[-+]0x[0-9a-f]+$/i,iP=/^0b[01]+$/i,oP=/^0o[0-7]+$/i,sP=parseInt;function lP(e){if(typeof e=="number")return e;if(nP(e))return dh;if(fh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=rP(e);var r=iP.test(e);return r||oP.test(e)?sP(e.slice(2),r?2:8):aP.test(e)?dh:+e}var ph=lP,cP=hr,Ql=K8,hh=ph,uP="Expected a function",fP=Math.max,dP=Math.min;function pP(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(uP);t=hh(t)||0,cP(r)&&(u=!!r.leading,f="maxWait"in r,i=f?fP(hh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(w){var A=n,j=a;return n=a=void 0,c=w,o=e.apply(j,A),o}function v(w){return c=w,s=setTimeout(b,t),u?h(w):o}function g(w){var A=w-l,j=w-c,$=t-A;return f?dP($,i-j):$}function m(w){var A=w-l,j=w-c;return l===void 0||A>=t||A<0||f&&j>=i}function b(){var w=Ql();if(m(w))return S(w);s=setTimeout(b,g(w))}function S(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 T(){return s===void 0?o:S(Ql())}function y(){var w=Ql(),A=m(w);if(n=arguments,a=this,l=w,A){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=T,y}var hP=pP,mP=hP,gP=hr,vP="Expected a function";function yP(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(vP);return gP(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),mP(e,t,{leading:n,maxWait:t,trailing:a})}var bP=yP;const mh=De(bP);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 gh(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?gh(Object(r),!0).forEach(function(n){xP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xP(e,t,r){return t=wP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wP(e){var t=OP(e,"string");return Sa(t)=="symbol"?t:t+""}function OP(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 SP(e,t){return PP(e)||jP(e,t)||TP(e,t)||AP()}function AP(){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 TP(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 jP(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 PP(e){if(Array.isArray(e))return e}var _P=O.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,S=e.onResize,x=e.style,T=x===void 0?{}:x,y=O.useRef(null),w=O.useRef();w.current=S,O.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 A=O.useState({containerWidth:a.width,containerHeight:a.height}),j=SP(A,2),$=j[0],U=j[1],P=O.useCallback(function(R,F){U(function(z){var C=Math.round(R),D=Math.round(F);return z.containerWidth===C&&z.containerHeight===D?z:{containerWidth:C,containerHeight:D}})},[]);O.useEffect(function(){var R=function(V){var E,N=V[0].contentRect,W=N.width,q=N.height;P(W,q),(E=w.current)===null||E===void 0||E.call(w,W,q)};g>0&&(R=mh(R,g,{trailing:!0,leading:!1}));var F=new ResizeObserver(R),z=y.current.getBoundingClientRect(),C=z.width,D=z.height;return P(C,D),F.observe(y.current),function(){F.disconnect()}},[P,g]);var _=O.useMemo(function(){var R=$.containerWidth,F=$.containerHeight;if(R<0||F<0)return null;tr($r(o)||$r(l),`The width(%s) and height(%s) are both fixed numbers,
217
+ maybe you don't need to use a ResponsiveContainer.`,o,l),tr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var z=$r(o)?R:o,C=$r(l)?F:l;r&&r>0&&(z?C=z/r:C&&(z=C*r),d&&C>d&&(C=d)),tr(z>0||C>0,`The width(%s) and height(%s) of chart should be greater than 0,
213
218
  please check the style of container, or the props width(%s) and height(%s),
214
219
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
215
- height and width.`,z,_,o,l,u,f,r);var L=!Array.isArray(m)&&er(m.type).endsWith("Chart");return O.Children.map(m,function(V){return O.isValidElement(V)?O.cloneElement(V,co({width:z,height:_},L?{style:co({height:"100%",width:"100%",maxHeight:_,maxWidth:z},V.props.style)}:{})):V})},[r,m,l,d,f,u,$,o]);return O.createElement("div",{id:h?"".concat(h):void 0,className:ve("recharts-responsive-container",b),style:co(co({},T),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:d}),ref:y},C)}),ec=function(t){return null};ec.displayName="Cell";function Aa(e){"@babel/helpers - typeof";return Aa=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},Aa(e)}function yh(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?yh(Object(r),!0).forEach(function(n){_3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _3(e,t,r){return t=E3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E3(e){var t=C3(e,"string");return Aa(t)=="symbol"?t:t+""}function C3(e,t){if(Aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wn={widthCache:{},cacheCount:0},$3=2e3,k3={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},bh="recharts_measurement_span";function N3(e){var t=tc({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Ta=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=N3(r),a=JSON.stringify({text:t,copyStyle:n});if(wn.widthCache[a])return wn.widthCache[a];try{var i=document.getElementById(bh);i||(i=document.createElement("span"),i.setAttribute("id",bh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=tc(tc({},k3),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return wn.widthCache[a]=l,++wn.cacheCount>$3&&(wn.cacheCount=0,wn.widthCache={}),l}catch{return{width:0,height:0}}},M3=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 R3(e)||L3(e,t)||I3(e,t)||D3()}function D3(){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 I3(e,t){if(e){if(typeof e=="string")return xh(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 xh(e,t)}}function xh(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 L3(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 R3(e){if(Array.isArray(e))return e}function B3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wh(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,U3(n.key),n)}}function F3(e,t,r){return t&&wh(e.prototype,t),r&&wh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function U3(e){var t=W3(e,"string");return ja(t)=="symbol"?t:t+""}function W3(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 Oh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Sh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,z3=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,V3=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ah={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},G3=Object.keys(Ah),On="NaN";function H3(e,t){return e*Ah[t]}var fo=function(){function e(t,r){B3(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!z3.test(r)&&(this.num=NaN,this.unit=""),G3.includes(r)&&(this.num=H3(t,r),this.unit="px")}return F3(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=V3.exec(r))!==null&&n!==void 0?n:[],i=uo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function Th(e){if(e.includes(On))return On;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Oh.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 On;t=t.replace(Oh,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=Sh.exec(t))!==null&&f!==void 0?f:[],m=uo(d,4),v=m[1],g=m[2],h=m[3],b=fo.parse(v??""),S=fo.parse(h??""),x=g==="+"?b.add(S):b.subtract(S);if(x.isNaN())return On;t=t.replace(Sh,x.toString())}return t}var jh=/\(([^()]*)\)/;function q3(e){for(var t=e;t.includes("(");){var r=jh.exec(t),n=uo(r,2),a=n[1];t=t.replace(jh,Th(a))}return t}function K3(e){var t=e.replace(/\s+/g,"");return t=q3(t),t=Th(t),t}function Y3(e){try{return K3(e)}catch{return On}}function rc(e){var t=Y3(e.slice(5,-1));return t===On?"":t}var X3=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Z3=["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 Ph(e,t){if(e==null)return{};var r=J3(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 J3(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 _h(e,t){return rk(e)||tk(e,t)||ek(e,t)||Q3()}function Q3(){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 ek(e,t){if(e){if(typeof e=="string")return Eh(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 Eh(e,t)}}function Eh(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 tk(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 rk(e){if(Array.isArray(e))return e}var Ch=/[ \f\n\r\t\v\u2028\u2029]+/,$h=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];pe(r)||(n?i=r.toString().split(""):i=r.toString().split(Ch));var o=i.map(function(l){return{word:l,width:Ta(l,a).width}}),s=n?0:Ta(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},nk=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=re(o),f=s,d=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return z.reduce(function(_,L){var V=L.word,G=L.width,E=_[_.length-1];if(E&&(a==null||i||E.width+G+n<Number(a)))E.words.push(V),E.width+=G+n;else{var M={words:[V],width:G};_.push(M)}return _},[])},m=d(r),v=function(z){return z.reduce(function(_,L){return _.width>L.width?_:L})};if(!u)return m;for(var g="…",h=function(z){var _=f.slice(0,z),L=$h({breakAll:c,style:l,children:_+g}).wordsWithComputedWidth,V=d(L),G=V.length>o||v(V).width>Number(a);return[G,V]},b=0,S=f.length-1,x=0,T;b<=S&&x<=f.length-1;){var y=Math.floor((b+S)/2),w=y-1,A=h(w),P=_h(A,2),$=P[0],R=P[1],j=h(y),C=_h(j,1),F=C[0];if(!$&&!F&&(b=y+1),$&&F&&(S=y-1),!$&&F){T=R;break}x++}return T||m},kh=function(t){var r=pe(t)?[]:t.toString().split(Ch);return[{words:r}]},ak=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 kh(a);return nk({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return kh(a)},Nh="#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,m=d===void 0?"start":d,v=t.verticalAnchor,g=v===void 0?"end":v,h=t.fill,b=h===void 0?Nh:h,S=Ph(t,X3),x=O.useMemo(function(){return ak({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:f,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,f,S.style,S.width]),T=S.dx,y=S.dy,w=S.angle,A=S.className,P=S.breakAll,$=Ph(S,Z3);if(!Xe(n)||!Xe(i))return null;var R=n+(re(T)?T:0),j=i+(re(y)?y:0),C;switch(g){case"start":C=rc("calc(".concat(c,")"));break;case"middle":C=rc("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:C=rc("calc(".concat(x.length-1," * -").concat(s,")"));break}var F=[];if(f){var B=x[0].width,z=S.width;F.push("scale(".concat((re(z)?z/B:1)/B,")"))}return w&&F.push("rotate(".concat(w,", ").concat(R,", ").concat(j,")")),F.length&&($.transform=F.join(" ")),O.createElement("text",nc({},he($,!0),{x:R,y:j,className:ve("recharts-text",A),textAnchor:m,fill:b.includes("url")?Nh:b}),x.map(function(_,L){var V=_.words.join(P?"":" ");return O.createElement("tspan",{x:R,dy:L===0?C:s,key:"".concat(V,"-").concat(L)},V)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ik(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===ik?e:ok,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 ok(){return 0}function Mh(e){return e===null?NaN:+e}function*sk(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Pa=ac(yr).right;ac(Mh).center;class Dh extends Map{constructor(t,r=uk){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(Ih(this,t))}has(t){return super.has(Ih(this,t))}set(t,r){return super.set(lk(this,t),r)}delete(t){return super.delete(ck(this,t))}}function Ih({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function lk({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function ck({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function uk(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fk(e=yr){if(e===yr)return Lh;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 Lh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const dk=Math.sqrt(50),pk=Math.sqrt(10),hk=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>=dk?10:i>=pk?5:i>=hk?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 Rh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Bh(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Fh(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?Lh:fk(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),m=Math.max(r,Math.floor(t-c*f/l+d)),v=Math.min(n,Math.floor(t+(l-c)*f/l+d));Fh(e,t,m,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 mk(e,t,r){if(e=Float64Array.from(sk(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Bh(e);if(t>=1)return Rh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Rh(Fh(e,i).subarray(0,i+1)),s=Bh(e.subarray(i+1));return o+(s-o)*(a-i)}}function gk(e,t,r=Mh){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 vk(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 jt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function nr(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 Dh,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 Dh;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)},jt.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,m=a<n,v=m?a:n,g=m?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 h=vk(d).map(function(b){return v+i*b});return r(m?h.reverse():h)}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)},jt.apply(f(),arguments)}function Uh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Uh(t())},e}function Ca(){return Uh(Ea.apply(null,arguments).paddingInner(1))}function uc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Wh(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,Sn="\\s*([+-]?\\d+)\\s*",Na="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yk=/^#([0-9a-f]{3,8})$/,bk=new RegExp(`^rgb\\(${Sn},${Sn},${Sn}\\)$`),xk=new RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),wk=new RegExp(`^rgba\\(${Sn},${Sn},${Sn},${Na}\\)$`),Ok=new RegExp(`^rgba\\(${zt},${zt},${zt},${Na}\\)$`),Sk=new RegExp(`^hsl\\(${Na},${zt},${zt}\\)$`),Ak=new RegExp(`^hsla\\(${Na},${zt},${zt},${Na}\\)$`),zh={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,Ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vh,formatHex:Vh,formatHex8:Tk,formatHsl:jk,formatRgb:Gh,toString:Gh});function Vh(){return this.rgb().formatHex()}function Tk(){return this.rgb().formatHex8()}function jk(){return Xh(this).formatHsl()}function Gh(){return this.rgb().formatRgb()}function Ma(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=yk.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Hh(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=bk.exec(e))?new pt(t[1],t[2],t[3],1):(t=xk.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wk.exec(e))?go(t[1],t[2],t[3],t[4]):(t=Ok.exec(e))?go(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Sk.exec(e))?Yh(t[1],t[2]/100,t[3]/100,1):(t=Ak.exec(e))?Yh(t[1],t[2]/100,t[3]/100,t[4]):zh.hasOwnProperty(e)?Hh(zh[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Hh(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 Pk(e){return e instanceof $a||(e=Ma(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?Pk(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,Wh($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:qh,formatHex:qh,formatHex8:_k,formatRgb:Kh,toString:Kh}));function qh(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function _k(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kh(){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 Yh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Dt(e,t,r,n)}function Xh(e){if(e instanceof Dt)return new Dt(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=Ma(e)),!e)return new Dt;if(e instanceof Dt)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 Dt(o,s,l,e.opacity)}function Ek(e,t,r,n){return arguments.length===1?Xh(e):new Dt(e,t,r,n??1)}function Dt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}uc(Dt,Ek,Wh($a,{brighter(e){return e=e==null?mo:Math.pow(mo,e),new Dt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new Dt(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 Dt(Zh(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("}${Zh(this.h)}, ${yo(this.s)*100}%, ${yo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Zh(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 Ck(e,t){return function(r){return e+r*t}}function $k(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 kk(e){return(e=+e)==1?Jh:function(t,r){return r-t?$k(t,r,e):pc(isNaN(t)?r:t)}}function Jh(e,t){var r=t-e;return r?Ck(e,r):pc(isNaN(e)?t:e)}const Qh=function e(t){var r=kk(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=Jh(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 Nk(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 Mk(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dk(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]=An(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 Ik(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 Lk(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]=An(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 Rk(e){return function(){return e}}function Bk(e){return function(t){return e(t)+""}}function Fk(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]?Bk(l[0].x):Rk(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 An(e,t){var r=typeof t,n;return t==null||r==="boolean"?pc(t):(r==="number"?bo:r==="string"?(n=Ma(t))?(t=n,Qh):Fk:t instanceof Ma?Qh:t instanceof Date?Ik:Mk(t)?Nk:Array.isArray(t)?Dk:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Lk:bo)(e,t)}function gc(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Uk(e,t){t===void 0&&(t=e,e=An);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 Wk(e){return function(){return e}}function xo(e){return+e}var em=[0,1];function lt(e){return e}function vc(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Wk(isNaN(t)?NaN:.5)}function zk(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Vk(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 Gk(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=em,t=em,r=An,n,a,i,o=lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==lt&&(o=zk(e[0],e[d-1])),s=d>2?Gk:Vk,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,m){return n=d,a=m,u()}}function yc(){return wo()(lt,lt)}function Hk(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 qk(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 Kk(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Yk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(e){if(!(t=Yk.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 Xk(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 tm;function Zk(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(tm=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 rm(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 nm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Hk,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)=>rm(e*100,t),r:rm,s:Zk,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function am(e){return e}var im=Array.prototype.map,om=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Jk(e){var t=e.grouping===void 0||e.thousands===void 0?am:qk(im.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?am:Kk(im.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,m=f.align,v=f.sign,g=f.symbol,h=f.zero,b=f.width,S=f.comma,x=f.precision,T=f.trim,y=f.type;y==="n"?(S=!0,y="g"):nm[y]||(x===void 0&&(x=12),T=!0,y="g"),(h||d==="0"&&m==="=")&&(h=!0,d="0",m="=");var w=g==="$"?r:g==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",A=g==="$"?n:/[%p]/.test(y)?o:"",P=nm[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 R(j){var C=w,F=A,B,z,_;if(y==="c")F=P(j)+F,j="";else{j=+j;var L=j<0||1/j<0;if(j=isNaN(j)?l:P(Math.abs(j),x),T&&(j=Xk(j)),L&&+j==0&&v!=="+"&&(L=!1),C=(L?v==="("?v:s:v==="-"||v==="("?"":v)+C,F=(y==="s"?om[8+tm/3]:"")+F+(L&&v==="("?")":""),$){for(B=-1,z=j.length;++B<z;)if(_=j.charCodeAt(B),48>_||_>57){F=(_===46?a+j.slice(B+1):j.slice(B))+F,j=j.slice(0,B);break}}}S&&!h&&(j=t(j,1/0));var V=C.length+j.length+F.length,G=V<b?new Array(b-V+1).join(d):"";switch(S&&h&&(j=t(G+j,G.length?b-F.length:1/0),G=""),m){case"<":j=C+j+F+G;break;case"=":j=C+G+j+F;break;case"^":j=G.slice(0,V=G.length>>1)+C+j+F+G.slice(V);break;default:j=G+C+j+F;break}return i(j)}return R.toString=function(){return f+""},R}function u(f,d){var m=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),h=om[8+v/3];return function(b){return m(g*b)+h}}return{format:c,formatPrefix:u}}var So,xc,sm;Qk({thousands:",",grouping:[3],currency:["$",""]});function Qk(e){return So=Jk(e),xc=So.format,sm=So.formatPrefix,So}function eN(e){return Math.max(0,-Tn(Math.abs(e)))}function tN(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Tn(t)/3)))*3-Tn(Math.abs(e)))}function rN(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function lm(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=tN(a,o))&&(n.precision=i),sm(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=rN(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=eN(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 lm(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 Ao(){var e=yc();return e.copy=function(){return Da(e,Ao())},jt.apply(e,arguments),br(e)}function cm(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 cm(e).unknown(t)},e=arguments.length?Array.from(e,xo):[0,1],br(r)}function um(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 fm(e){return Math.log(e)}function dm(e){return Math.exp(e)}function nN(e){return-Math.log(-e)}function aN(e){return-Math.exp(-e)}function iN(e){return isFinite(e)?+("1e"+e):e<0?0:e}function oN(e){return e===10?iN:e===Math.E?Math.exp:t=>Math.pow(e,t)}function sN(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 pm(e){return(t,r)=>-e(-t,r)}function wc(e){const t=e(fm,dm),r=t.domain;let n=10,a,i;function o(){return a=sN(n),i=oN(n),r()[0]<0?(a=pm(a),i=pm(i),e(nN,aN)):e(fm,dm),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),m=a(u),v,g;const h=s==null?10:+s;let b=[];if(!(n%1)&&m-d<h){if(d=Math.floor(d),m=Math.ceil(m),c>0){for(;d<=m;++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<=m;++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<h&&(b=ic(c,u,h))}else b=ic(d,m,Math.min(m-d,h)).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(um(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function hm(){const e=wc(wo()).domain([1,10]);return e.copy=()=>Da(e,hm()).base(e.base()),jt.apply(e,arguments),e}function mm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Oc(e){var t=1,r=e(mm(t),gm(t));return r.constant=function(n){return arguments.length?e(mm(t=+n),gm(t)):t},br(r)}function vm(){var e=Oc(wo());return e.copy=function(){return Da(e,vm()).constant(e.constant())},jt.apply(e,arguments)}function ym(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function lN(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function cN(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(lN,cN):e(ym(r),ym(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},br(t)}function Ac(){var e=Sc(wo());return e.copy=function(){return Da(e,Ac()).exponent(e.exponent())},jt.apply(e,arguments),e}function uN(){return Ac.apply(null,arguments).exponent(.5)}function bm(e){return Math.sign(e)*e*e}function fN(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function xm(){var e=yc(),t=[0,1],r=!1,n;function a(i){var o=fN(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(bm(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(bm)),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 xm(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},jt.apply(a,arguments),br(a)}function wm(){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]=gk(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 wm().domain(e).range(t).unknown(n)},jt.apply(i,arguments)}function Om(){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 Om().domain([e,t]).range(a).unknown(i)},jt.apply(br(o),arguments)}function Sm(){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 Sm().domain(e).range(t).unknown(r)},jt.apply(a,arguments)}const Tc=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)=>(Tc.setTime(+i),jc.setTime(+o),e(Tc),e(jc),Math.floor(r(Tc,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 To=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);To.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):To),To.range;const ar=1e3,Pt=ar*60,ir=Pt*60,or=ir*24,Pc=or*7,Am=or*30,_c=or*365,Rr=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCSeconds());Rr.range;const Ec=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ar)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());Ec.range;const Cc=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Cc.range;const $c=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ar-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getHours());$c.range;const kc=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,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())*Pt)/or,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)/or,e=>e.getUTCDate()-1);jo.range;const Tm=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/or,e=>Math.floor(e/or));Tm.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())*Pt)/Pc)}const Po=Br(0),_o=Br(1),dN=Br(2),pN=Br(3),jn=Br(4),hN=Br(5),mN=Br(6);Po.range,_o.range,dN.range,pN.range,jn.range,hN.range,mN.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),gN=Fr(2),vN=Fr(3),Pn=Fr(4),yN=Fr(5),bN=Fr(6);Eo.range,Co.range,gN.range,vN.range,Pn.range,yN.range,bN.range;const Nc=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());Nc.range;const Mc=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());Mc.range;const sr=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());sr.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)}),sr.range;const lr=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());lr.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)}),lr.range;function jm(e,t,r,n,a,i){const o=[[Rr,1,ar],[Rr,5,5*ar],[Rr,15,15*ar],[Rr,30,30*ar],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ir],[a,3,3*ir],[a,6,6*ir],[a,12,12*ir],[n,1,or],[n,2,2*or],[r,1,Pc],[t,1,Am],[t,3,3*Am],[e,1,_c]];function s(c,u,f){const d=u<c;d&&([c,u]=[u,c]);const m=f&&typeof f.range=="function"?f:l(c,u,f),v=m?m.range(c,+u+1):[];return d?v.reverse():v}function l(c,u,f){const d=Math.abs(u-c)/f,m=ac(([,,h])=>h).right(o,d);if(m===o.length)return e.every(sc(c/_c,u/_c,f));if(m===0)return To.every(Math.max(sc(c,u,f),1));const[v,g]=o[d/o[m-1][2]<o[m][2]/d?m-1:m];return v.every(g)}return[s,l]}const[xN,wN]=jm(lr,Mc,Eo,Tm,kc,Cc),[ON,SN]=jm(sr,Nc,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 AN(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),m=Ba(o),v=Fa(o),g=Ba(s),h=Fa(s),b=Ba(l),S=Fa(l),x={a:L,A:V,b:G,B:E,c:null,d:km,e:km,f:qN,g:nM,G:iM,H:VN,I:GN,j:HN,L:Nm,m:KN,M:YN,p:M,q:W,Q:Bm,s:Fm,S:XN,u:ZN,U:JN,V:QN,w:eM,W:tM,x:null,X:null,y:rM,Y:aM,Z:oM,"%":Rm},T={a:K,A:D,b:H,B:Y,c:null,d:Dm,e:Dm,f:uM,g:xM,G:OM,H:sM,I:lM,j:cM,L:Im,m:fM,M:dM,p:te,q:I,Q:Bm,s:Fm,S:pM,u:hM,U:mM,V:gM,w:vM,W:yM,x:null,X:null,y:bM,Y:wM,Z:SM,"%":Rm},y={a:R,A:j,b:C,B:F,c:B,d:Cm,e:Cm,f:FN,g:Em,G:_m,H:$m,I:$m,j:IN,L:BN,m:DN,M:LN,p:$,q:MN,Q:WN,s:zN,S:RN,u:EN,U:CN,V:$N,w:_N,W:kN,x:z,X:_,y:Em,Y:_m,Z:NN,"%":UN};x.x=w(r,x),x.X=w(n,x),x.c=w(t,x),T.x=w(r,T),T.X=w(n,T),T.c=w(t,T);function w(U,q){return function(J){var k=[],Q=-1,X=0,se=U.length,ne,fe,ce;for(J instanceof Date||(J=new Date(+J));++Q<se;)U.charCodeAt(Q)===37&&(k.push(U.slice(X,Q)),(fe=Pm[ne=U.charAt(++Q)])!=null?ne=U.charAt(++Q):fe=ne==="e"?" ":"0",(ce=q[ne])&&(ne=ce(J,fe)),k.push(ne),X=Q+1);return k.push(U.slice(X,Q)),k.join("")}}function A(U,q){return function(J){var k=Ra(1900,void 0,1),Q=P(k,U,J+="",0),X,se;if(Q!=J.length)return null;if("Q"in k)return new Date(k.Q);if("s"in k)return new Date(k.s*1e3+("L"in k?k.L:0));if(q&&!("Z"in k)&&(k.Z=0),"p"in k&&(k.H=k.H%12+k.p*12),k.m===void 0&&(k.m="q"in k?k.q:0),"V"in k){if(k.V<1||k.V>53)return null;"w"in k||(k.w=1),"Z"in k?(X=Ic(Ra(k.y,0,1)),se=X.getUTCDay(),X=se>4||se===0?Co.ceil(X):Co(X),X=jo.offset(X,(k.V-1)*7),k.y=X.getUTCFullYear(),k.m=X.getUTCMonth(),k.d=X.getUTCDate()+(k.w+6)%7):(X=Dc(Ra(k.y,0,1)),se=X.getDay(),X=se>4||se===0?_o.ceil(X):_o(X),X=La.offset(X,(k.V-1)*7),k.y=X.getFullYear(),k.m=X.getMonth(),k.d=X.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),se="Z"in k?Ic(Ra(k.y,0,1)).getUTCDay():Dc(Ra(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(se+5)%7:k.w+k.U*7-(se+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,Ic(k)):Dc(k)}}function P(U,q,J,k){for(var Q=0,X=q.length,se=J.length,ne,fe;Q<X;){if(k>=se)return-1;if(ne=q.charCodeAt(Q++),ne===37){if(ne=q.charAt(Q++),fe=y[ne in Pm?q.charAt(Q++):ne],!fe||(k=fe(U,J,k))<0)return-1}else if(ne!=J.charCodeAt(k++))return-1}return k}function $(U,q,J){var k=c.exec(q.slice(J));return k?(U.p=u.get(k[0].toLowerCase()),J+k[0].length):-1}function R(U,q,J){var k=m.exec(q.slice(J));return k?(U.w=v.get(k[0].toLowerCase()),J+k[0].length):-1}function j(U,q,J){var k=f.exec(q.slice(J));return k?(U.w=d.get(k[0].toLowerCase()),J+k[0].length):-1}function C(U,q,J){var k=b.exec(q.slice(J));return k?(U.m=S.get(k[0].toLowerCase()),J+k[0].length):-1}function F(U,q,J){var k=g.exec(q.slice(J));return k?(U.m=h.get(k[0].toLowerCase()),J+k[0].length):-1}function B(U,q,J){return P(U,t,q,J)}function z(U,q,J){return P(U,r,q,J)}function _(U,q,J){return P(U,n,q,J)}function L(U){return o[U.getDay()]}function V(U){return i[U.getDay()]}function G(U){return l[U.getMonth()]}function E(U){return s[U.getMonth()]}function M(U){return a[+(U.getHours()>=12)]}function W(U){return 1+~~(U.getMonth()/3)}function K(U){return o[U.getUTCDay()]}function D(U){return i[U.getUTCDay()]}function H(U){return l[U.getUTCMonth()]}function Y(U){return s[U.getUTCMonth()]}function te(U){return a[+(U.getUTCHours()>=12)]}function I(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var q=w(U+="",x);return q.toString=function(){return U},q},parse:function(U){var q=A(U+="",!1);return q.toString=function(){return U},q},utcFormat:function(U){var q=w(U+="",T);return q.toString=function(){return U},q},utcParse:function(U){var q=A(U+="",!0);return q.toString=function(){return U},q}}}var Pm={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,TN=/^%/,jN=/[\\^$*+?|[\]().{}]/g;function xe(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 PN(e){return e.replace(jN,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(PN).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function _N(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function EN(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function CN(e,t,r){var n=tt.exec(t.slice(r,r+2));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.V=+n[0],r+n[0].length):-1}function kN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function _m(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Em(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 NN(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 MN(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 DN(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 Cm(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function IN(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 LN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function RN(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function BN(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function FN(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 UN(e,t,r){var n=TN.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function WN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function zN(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function km(e,t){return xe(e.getDate(),t,2)}function VN(e,t){return xe(e.getHours(),t,2)}function GN(e,t){return xe(e.getHours()%12||12,t,2)}function HN(e,t){return xe(1+La.count(sr(e),e),t,3)}function Nm(e,t){return xe(e.getMilliseconds(),t,3)}function qN(e,t){return Nm(e,t)+"000"}function KN(e,t){return xe(e.getMonth()+1,t,2)}function YN(e,t){return xe(e.getMinutes(),t,2)}function XN(e,t){return xe(e.getSeconds(),t,2)}function ZN(e){var t=e.getDay();return t===0?7:t}function JN(e,t){return xe(Po.count(sr(e)-1,e),t,2)}function Mm(e){var t=e.getDay();return t>=4||t===0?jn(e):jn.ceil(e)}function QN(e,t){return e=Mm(e),xe(jn.count(sr(e),e)+(sr(e).getDay()===4),t,2)}function eM(e){return e.getDay()}function tM(e,t){return xe(_o.count(sr(e)-1,e),t,2)}function rM(e,t){return xe(e.getFullYear()%100,t,2)}function nM(e,t){return e=Mm(e),xe(e.getFullYear()%100,t,2)}function aM(e,t){return xe(e.getFullYear()%1e4,t,4)}function iM(e,t){var r=e.getDay();return e=r>=4||r===0?jn(e):jn.ceil(e),xe(e.getFullYear()%1e4,t,4)}function oM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xe(t/60|0,"0",2)+xe(t%60,"0",2)}function Dm(e,t){return xe(e.getUTCDate(),t,2)}function sM(e,t){return xe(e.getUTCHours(),t,2)}function lM(e,t){return xe(e.getUTCHours()%12||12,t,2)}function cM(e,t){return xe(1+jo.count(lr(e),e),t,3)}function Im(e,t){return xe(e.getUTCMilliseconds(),t,3)}function uM(e,t){return Im(e,t)+"000"}function fM(e,t){return xe(e.getUTCMonth()+1,t,2)}function dM(e,t){return xe(e.getUTCMinutes(),t,2)}function pM(e,t){return xe(e.getUTCSeconds(),t,2)}function hM(e){var t=e.getUTCDay();return t===0?7:t}function mM(e,t){return xe(Eo.count(lr(e)-1,e),t,2)}function Lm(e){var t=e.getUTCDay();return t>=4||t===0?Pn(e):Pn.ceil(e)}function gM(e,t){return e=Lm(e),xe(Pn.count(lr(e),e)+(lr(e).getUTCDay()===4),t,2)}function vM(e){return e.getUTCDay()}function yM(e,t){return xe(Co.count(lr(e)-1,e),t,2)}function bM(e,t){return xe(e.getUTCFullYear()%100,t,2)}function xM(e,t){return e=Lm(e),xe(e.getUTCFullYear()%100,t,2)}function wM(e,t){return xe(e.getUTCFullYear()%1e4,t,4)}function OM(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Pn(e):Pn.ceil(e),xe(e.getUTCFullYear()%1e4,t,4)}function SM(){return"+0000"}function Rm(){return"%"}function Bm(e){return+e}function Fm(e){return Math.floor(+e/1e3)}var _n,Um,Wm;AM({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 AM(e){return _n=AN(e),Um=_n.format,_n.parse,Wm=_n.utcFormat,_n.utcParse,_n}function TM(e){return new Date(e)}function jM(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,m=c(".%L"),v=c(":%S"),g=c("%I:%M"),h=c("%I %p"),b=c("%a %d"),S=c("%b %d"),x=c("%B"),T=c("%Y");function y(w){return(l(w)<w?m:s(w)<w?v:o(w)<w?g:i(w)<w?h:n(w)<w?a(w)<w?b:S:r(w)<w?x:T)(w)}return u.invert=function(w){return new Date(f(w))},u.domain=function(w){return arguments.length?d(Array.from(w,jM)):d().map(TM)},u.ticks=function(w){var A=d();return e(A[0],A[A.length-1],w??10)},u.tickFormat=function(w,A){return A==null?y:c(A)},u.nice=function(w){var A=d();return(!w||typeof w.range!="function")&&(w=t(A[0],A[A.length-1],w??10)),w?d(um(A,w)):u},u.copy=function(){return Da(u,Lc(e,t,r,n,a,i,o,s,l,c))},u}function PM(){return jt.apply(Lc(ON,SN,sr,Nc,Po,La,$c,Ec,Rr,Um).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function _M(){return jt.apply(Lc(xN,wN,lr,Mc,Eo,jo,kc,Cc,Rr,Wm).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 m,v;return arguments.length?([m,v]=d,o=f(m,v),c):[o(0),o(1)]}}return c.range=u(An),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 zm(){var e=br($o()(lt));return e.copy=function(){return xr(e,zm())},nr.apply(e,arguments)}function Vm(){var e=wc($o()).domain([1,10]);return e.copy=function(){return xr(e,Vm()).base(e.base())},nr.apply(e,arguments)}function Gm(){var e=Oc($o());return e.copy=function(){return xr(e,Gm()).constant(e.constant())},nr.apply(e,arguments)}function Rc(){var e=Sc($o());return e.copy=function(){return xr(e,Rc()).exponent(e.exponent())},nr.apply(e,arguments)}function EM(){return Rc.apply(null,arguments).exponent(.5)}function Hm(){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)=>mk(e,i/n))},r.copy=function(){return Hm(t).domain(e)},nr.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 m(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))}m.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,m):[e,t,r]},m.clamp=function(g){return arguments.length?(f=!!g,m):f},m.interpolator=function(g){return arguments.length?(c=g,m):c};function v(g){return function(h){var b,S,x;return arguments.length?([b,S,x]=h,c=Uk(g,[b,S,x]),m):[c(0),c(.5),c(1)]}}return m.range=v(An),m.rangeRound=v(gc),m.unknown=function(g){return arguments.length?(d=g,m):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,m}}function qm(){var e=br(ko()(lt));return e.copy=function(){return xr(e,qm())},nr.apply(e,arguments)}function Km(){var e=wc(ko()).domain([.1,1,10]);return e.copy=function(){return xr(e,Km()).base(e.base())},nr.apply(e,arguments)}function Ym(){var e=Oc(ko());return e.copy=function(){return xr(e,Ym()).constant(e.constant())},nr.apply(e,arguments)}function Bc(){var e=Sc(ko());return e.copy=function(){return xr(e,Bc()).exponent(e.exponent())},nr.apply(e,arguments)}function CM(){return Bc.apply(null,arguments).exponent(.5)}const Xm=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ea,scaleDiverging:qm,scaleDivergingLog:Km,scaleDivergingPow:Bc,scaleDivergingSqrt:CM,scaleDivergingSymlog:Ym,scaleIdentity:cm,scaleImplicit:lc,scaleLinear:Ao,scaleLog:hm,scaleOrdinal:cc,scalePoint:Ca,scalePow:Ac,scaleQuantile:wm,scaleQuantize:Om,scaleRadial:xm,scaleSequential:zm,scaleSequentialLog:Vm,scaleSequentialPow:Rc,scaleSequentialQuantile:Hm,scaleSequentialSqrt:EM,scaleSequentialSymlog:Gm,scaleSqrt:uN,scaleSymlog:vm,scaleThreshold:Sm,scaleTime:PM,scaleUtc:_M,tickFormat:lm},Symbol.toStringTag,{value:"Module"}));var $M=an;function kM(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&&!$M(o):r(o,s)))var s=o,l=i}return l}var Zm=kM;function NM(e,t){return e>t}var MM=NM,DM=Zm,IM=MM,LM=gn;function RM(e){return e&&e.length?DM(e,LM,IM):void 0}var BM=RM;const wr=De(BM);function FM(e,t){return e<t}var UM=FM,WM=Zm,zM=UM,VM=gn;function GM(e){return e&&e.length?WM(e,VM,zM):void 0}var HM=GM;const No=De(HM);var qM=rl,KM=gr,YM=qp,XM=ft;function ZM(e,t){var r=XM(e)?qM:YM;return r(e,KM(t))}var JM=ZM,QM=Gp,e5=JM;function t5(e,t){return QM(e5(e,t),1)}var r5=t5;const n5=De(r5);var a5=Ul;function i5(e,t){return a5(e,t)}var o5=i5;const Ur=De(o5);var En=1e9,s5={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wc,Ue=!0,_t="[DecimalError] ",Wr=_t+"Invalid argument: ",Fc=_t+"Exponent out of range: ",Cn=Math.floor,zr=Math.pow,l5=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,vt,rt=1e7,Fe=7,Jm=9007199254740991,Mo=Cn(Jm/Fe),ie={};ie.absoluteValue=ie.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ie.comparedTo=ie.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},ie.decimalPlaces=ie.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Fe;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ie.dividedBy=ie.div=function(e){return cr(this,new this.constructor(e))},ie.dividedToIntegerBy=ie.idiv=function(e){var t=this,r=t.constructor;return Ne(cr(t,new r(e),0,1),r.precision)},ie.equals=ie.eq=function(e){return!this.cmp(e)},ie.exponent=function(){return qe(this)},ie.greaterThan=ie.gt=function(e){return this.cmp(e)>0},ie.greaterThanOrEqualTo=ie.gte=function(e){return this.cmp(e)>=0},ie.isInteger=ie.isint=function(){return this.e>this.d.length-2},ie.isNegative=ie.isneg=function(){return this.s<0},ie.isPositive=ie.ispos=function(){return this.s>0},ie.isZero=function(){return this.s===0},ie.lessThan=ie.lt=function(e){return this.cmp(e)<0},ie.lessThanOrEqualTo=ie.lte=function(e){return this.cmp(e)<1},ie.logarithm=ie.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(_t+"NaN");if(r.s<1)throw Error(_t+(r.s?"NaN":"-Infinity"));return r.eq(vt)?new n(0):(Ue=!1,t=cr(Ua(r,i),Ua(e,i),i),Ue=!0,Ne(t,a))},ie.minus=ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rg(t,e):Qm(t,(e.s=-e.s,e))},ie.modulo=ie.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(_t+"NaN");return r.s?(Ue=!1,t=cr(r,e,0,1).times(e),Ue=!0,r.minus(t)):Ne(new n(r),a)},ie.naturalExponential=ie.exp=function(){return eg(this)},ie.naturalLogarithm=ie.ln=function(){return Ua(this)},ie.negated=ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ie.plus=ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Qm(t,e):rg(t,(e.s=-e.s,e))},ie.precision=ie.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*Fe+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},ie.squareRoot=ie.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(_t+"NaN")}for(e=qe(s),Ue=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Gt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Cn((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(cr(s,i,o+2)).times(.5),Gt(i.d).slice(0,o)===(t=Gt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Ne(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Ue=!0,Ne(n,r)},ie.times=ie.mul=function(e){var t,r,n,a,i,o,s,l,c,u=this,f=u.constructor,d=u.d,m=(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=m.length,l<c&&(i=d,d=m,m=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]+m[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,Ue?Ne(e,f.precision):e},ie.toDecimalPlaces=ie.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Vt(e,0,En),t===void 0?t=n.rounding:Vt(t,0,8),Ne(r,e+qe(r)+1,t))},ie.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Vr(n,!0):(Vt(e,0,En),t===void 0?t=a.rounding:Vt(t,0,8),n=Ne(new a(n),e+1,t),r=Vr(n,!0,e+1)),r},ie.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Vr(a):(Vt(e,0,En),t===void 0?t=i.rounding:Vt(t,0,8),n=Ne(new i(a),e+qe(a)+1,t),r=Vr(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ie.toInteger=ie.toint=function(){var e=this,t=e.constructor;return Ne(new t(e),qe(e)+1,t.rounding)},ie.toNumber=function(){return+this},ie.toPower=ie.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(_t+"Infinity");return s}if(s.eq(vt))return s;if(n=l.precision,e.eq(vt))return Ne(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=u<0?-u:u)<=Jm){for(a=new l(vt),t=Math.ceil(n/Fe+4),Ue=!1;r%2&&(a=a.times(s),ng(a.d,t)),r=Cn(r/2),r!==0;)s=s.times(s),ng(s.d,t);return Ue=!0,e.s<0?new l(vt).div(a):Ne(a,n)}}else if(i<0)throw Error(_t+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ue=!1,a=e.times(Ua(s,n+c)),Ue=!0,a=eg(a),a.s=i,a},ie.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)):(Vt(e,1,En),t===void 0?t=i.rounding:Vt(t,0,8),a=Ne(new i(a),e,t),r=qe(a),n=Vr(a,e<=r||r<=i.toExpNeg,e)),n},ie.toSignificantDigits=ie.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Vt(e,1,En),t===void 0?t=n.rounding:Vt(t,0,8)),Ne(new n(r),e,t)},ie.toString=ie.valueOf=ie.val=ie.toJSON=ie[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 Qm(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)),Ue?Ne(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/Fe),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,Ue?Ne(t,f):t}function Vt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Wr+e)}function Gt(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=Fe-n.length,r&&(i+=Or(r)),i+=n;o=e[t],n=o+"",r=Fe-n.length,r&&(i+=Or(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var cr=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,m,v,g,h,b,S,x,T,y,w,A,P,$=n.constructor,R=n.s==a.s?1:-1,j=n.d,C=a.d;if(!n.s)return new $(n);if(!a.s)throw Error(_t+"Division by zero");for(l=n.e-a.e,A=C.length,y=j.length,m=new $(R),v=m.d=[],c=0;C[c]==(j[c]||0);)++c;if(C[c]>(j[c]||0)&&--l,i==null?S=i=$.precision:o?S=i+(qe(n)-qe(a))+1:S=i,S<0)return new $(0);if(S=S/Fe+2|0,c=0,A==1)for(u=0,C=C[0],S++;(c<y||u)&&S--;c++)x=u*rt+(j[c]||0),v[c]=x/C|0,u=x%C|0;else{for(u=rt/(C[0]+1)|0,u>1&&(C=e(C,u),j=e(j,u),A=C.length,y=j.length),T=A,g=j.slice(0,A),h=g.length;h<A;)g[h++]=0;P=C.slice(),P.unshift(0),w=C[0],C[1]>=rt/2&&++w;do u=0,s=t(C,g,A,h),s<0?(b=g[0],A!=h&&(b=b*rt+(g[1]||0)),u=b/w|0,u>1?(u>=rt&&(u=rt-1),f=e(C,u),d=f.length,h=g.length,s=t(f,g,d,h),s==1&&(u--,r(f,A<d?P:C,d))):(u==0&&(s=u=1),f=C.slice()),d=f.length,d<h&&f.unshift(0),r(g,f,h),s==-1&&(h=g.length,s=t(C,g,A,h),s<1&&(u++,r(g,A<h?P:C,h))),h=g.length):s===0&&(u++,g=[0]),v[c++]=u,s&&g[0]?g[h++]=j[T]||0:(g=[j[T]],h=1);while((T++<y||g[0]!==void 0)&&S--)}return v[0]||v.shift(),m.e=l,Ne(m,o?i+qe(m)+1:i)}}();function eg(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(Ue=!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=Ne(a.times(e),s),r=r.times(++l),o=i.plus(cr(a,r,s)),Gt(o.d).slice(0,s)===Gt(i.d).slice(0,s)){for(;c--;)i=Ne(i.times(i),s);return u.precision=f,t==null?(Ue=!0,Ne(i,f)):i}i=o}}function qe(e){for(var t=e.e*Fe,r=e.d[0];r>=10;r/=10)t++;return t}function Uc(e,t,r){if(t>e.LN10.sd())throw Ue=!0,r&&(e.precision=r),Error(_t+"LN10 precision limit exceeded");return Ne(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,m=e,v=m.d,g=m.constructor,h=g.precision;if(m.s<1)throw Error(_t+(m.s?"NaN":"-Infinity"));if(m.eq(vt))return new g(0);if(t==null?(Ue=!1,c=h):c=t,m.eq(10))return t==null&&(Ue=!0),Uc(g,c);if(c+=d,g.precision=c,r=Gt(v),n=r.charAt(0),i=qe(m),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(e),r=Gt(m.d),n=r.charAt(0),f++;i=qe(m),n>1?(m=new g("0."+r),i++):m=new g(n+"."+r.slice(1))}else return l=Uc(g,c+2,h).times(i+""),m=Ua(new g(n+"."+r.slice(1)),c-d).plus(l),g.precision=h,t==null?(Ue=!0,Ne(m,h)):m;for(s=o=m=cr(m.minus(vt),m.plus(vt),c),u=Ne(m.times(m),c),a=3;;){if(o=Ne(o.times(u),c),l=s.plus(cr(o,new g(a),c)),Gt(l.d).slice(0,c)===Gt(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Uc(g,c+2,h).times(i+""))),s=cr(s,new g(f),c),g.precision=h,t==null?(Ue=!0,Ne(s,h)):s;s=l,a+=2}}function tg(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=Cn(r/Fe),e.d=[],n=(r+1)%Fe,r<0&&(n+=Fe),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Fe;n<a;)e.d.push(+t.slice(n,n+=Fe));t=t.slice(n),n=Fe-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Ue&&(e.e>Mo||e.e<-Mo))throw Error(Fc+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ne(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+=Fe,a=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Fe),i=f.length,u>=i)return e;for(c=i=f[u],o=1;i>=10;i/=10)o++;n%=Fe,a=n-Fe+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,(Fe-t%Fe)%Fe),e.e=Cn(-t/Fe)||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,Fe-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(Ue&&(e.e>Mo||e.e<-Mo))throw Error(Fc+qe(e));return e}function rg(e,t){var r,n,a,i,o,s,l,c,u,f,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ue?Ne(t,m):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(m/Fe),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,Ue?Ne(t,m):t):new d(0)}function Vr(e,t,r){var n,a=qe(e),i=Gt(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 ng(e,t){if(e.length>t)return e.length=t,!0}function ag(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 tg(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,l5.test(i))tg(o,i);else throw Error(Wr+i)}if(a.prototype=ie,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=ag,a.config=a.set=c5,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 c5(e){if(!e||typeof e!="object")throw Error(_t+"Object expected");var t,r,n,a=["precision",1,En,"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(Cn(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=ag(s5);vt=new Wc(1);const ke=Wc;function u5(e){return h5(e)||p5(e)||d5(e)||f5()}function f5(){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 d5(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 p5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function h5(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 m5=function(t){return t},ig={},og=function(t){return t===ig},sg=function(t){return function r(){return arguments.length===0||arguments.length===1&&og(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},g5=function e(t,r){return t===1?r:sg(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!==ig}).length;return o>=t?r.apply(void 0,a):e(t-o,sg(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 og(f)?l.shift():f});return r.apply(void 0,u5(u).concat(l))}))})},Do=function(t){return g5(t.length,t)},Vc=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},v5=Do(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),y5=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return m5;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("")},lg=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 b5(e){var t;return e===0?t=1:t=Math.floor(new ke(e).abs().log(10).toNumber())+1,t}function x5(e,t,r){for(var n=new ke(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var w5=Do(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),O5=Do(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),S5=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:x5,getDigitCount:b5,interpolateNumber:w5,uninterpolateNumber:O5,uninterpolateTruncation:S5};function Hc(e){return j5(e)||T5(e)||cg(e)||A5()}function A5(){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 T5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function j5(e){if(Array.isArray(e))return qc(e)}function Wa(e,t){return E5(e)||_5(e,t)||cg(e,t)||P5()}function P5(){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 cg(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 _5(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 E5(e){if(Array.isArray(e))return e}function ug(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 fg(e,t,r){if(e.lte(0))return new ke(0);var n=Io.getDigitCount(e.toNumber()),a=new ke(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new ke(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new ke(Math.ceil(l))}function C5(e,t,r){var n=1,a=new ke(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new ke(10).pow(Io.getDigitCount(e)-1),a=new ke(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new ke(Math.floor(e)))}else e===0?a=new ke(Math.floor((t-1)/2)):r||(a=new ke(Math.floor(e)));var o=Math.floor((t-1)/2),s=y5(v5(function(l){return a.add(new ke(l-o).mul(n)).toNumber()}),Vc);return s(0,t)}function dg(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 ke(0),tickMin:new ke(0),tickMax:new ke(0)};var i=fg(new ke(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new ke(0):(o=new ke(e).add(t).div(2),o=o.sub(new ke(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new ke(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?dg(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 ke(s).mul(i)),tickMax:o.add(new ke(l).mul(i))})}function $5(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=ug([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 C5(c,a,i);var d=dg(c,u,o,i),m=d.step,v=d.tickMin,g=d.tickMax,h=Io.rangeStep(v,g.add(new ke(.1).mul(m)),m);return r>n?Gc(h):h}function k5(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=ug([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=fg(new ke(c).sub(l).div(u-1),i,0),d=[].concat(Hc(Io.rangeStep(new ke(l),new ke(c).sub(new ke(.99).mul(f)),f)),[c]);return n>a?Gc(d):d}var N5=lg($5),M5=lg(k5),D5=process.env.NODE_ENV==="production",Kc="Invariant failed";function ht(e,t){if(D5)throw new Error(Kc);var r=typeof t=="function"?t():t,n=r?"".concat(Kc,": ").concat(r):Kc;throw new Error(n)}var I5=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function $n(e){"@babel/helpers - typeof";return $n=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},$n(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 L5(e,t){return U5(e)||F5(e,t)||B5(e,t)||R5()}function R5(){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 B5(e,t){if(e){if(typeof e=="string")return pg(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 pg(e,t)}}function pg(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 F5(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 U5(e){if(Array.isArray(e))return e}function W5(e,t){if(e==null)return{};var r=z5(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 z5(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 V5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G5(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 H5(e,t,r){return t&&G5(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q5(e,t,r){return t=Ro(t),K5(e,hg()?Reflect.construct(t,r||[],Ro(e).constructor):t.apply(e,r))}function K5(e,t){if(t&&($n(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y5(e)}function Y5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hg=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}function X5(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 mg(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=Z5(e,"string");return $n(t)=="symbol"?t:t+""}function Z5(e,t){if($n(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($n(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kn=function(e){function t(){return V5(this,t),q5(this,t,arguments)}return X5(t,e),H5(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=W5(n,I5),m=he(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 h=c(g,s),b=h.x,S=h.y,x=h.value,T=h.errorVal;if(!T)return null;var y=[],w,A;if(Array.isArray(T)){var P=L5(T,2);w=P[0],A=P[1]}else w=A=T;if(i==="vertical"){var $=u.scale,R=S+a,j=R+o,C=R-o,F=$(x-w),B=$(x+A);y.push({x1:B,y1:j,x2:B,y2:C}),y.push({x1:F,y1:R,x2:B,y2:R}),y.push({x1:F,y1:j,x2:F,y2:C})}else if(i==="horizontal"){var z=f.scale,_=b+a,L=_-o,V=_+o,G=z(x-w),E=z(x+A);y.push({x1:L,y1:E,x2:V,y2:E}),y.push({x1:_,y1:G,x2:_,y2:E}),y.push({x1:L,y1:G,x2:V,y2:G})}return O.createElement(we,Lo({className:"recharts-errorBar",key:"bar-".concat(y.map(function(M){return"".concat(M.x1,"-").concat(M.x2,"-").concat(M.y1,"-").concat(M.y2)}))},m),y.map(function(M){return O.createElement("line",Lo({},M,{key:"line-".concat(M.x1,"-").concat(M.x2,"-").concat(M.y1,"-").concat(M.y2)}))}))});return O.createElement(we,{className:"recharts-errorBars"},v)}}])}(O.Component);mg(kn,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),mg(kn,"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 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 Gr(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){J5(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 J5(e,t,r){return t=Q5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q5(e){var t=e4(e,"string");return za(t)=="symbol"?t:t+""}function e4(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 yg=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=gt(r,yn);if(!o)return null;var s=yn.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,m=f.props,v=m.sectors||m.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,m=d!==void 0?Gr(Gr({},d),f.props):{},v=m.dataKey,g=m.name,h=m.legendType,b=m.hide;return{inactive:b,dataKey:v,type:l.iconType||h||"square",color:Zc(f),value:g||v,payload:m}}),Gr(Gr(Gr({},l),yn.getWithHeight(o,a)),{},{payload:c,item:o})};function Va(e){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}function bg(e){return a4(e)||n4(e)||r4(e)||t4()}function t4(){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 r4(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 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 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 xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(n){Nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nn(e,t,r){return t=i4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i4(e){var t=o4(e,"string");return Va(t)=="symbol"?t:t+""}function o4(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 pe(e)||pe(t)?r:Xe(t)?Ot(e,t,r):me(t)?t(e):r}function Ga(e,t,r,n){var a=n5(e,function(s){return Je(s,t)});if(r==="number"){var i=a.filter(function(s){return re(s)||parseFloat(s)});return i.length?[No(i),wr(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!pe(s)}):a;return o.map(function(s){return Xe(s)||s instanceof Date?s:""})}var s4=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,m=void 0;if(Nt(f-u)!==Nt(d-f)){var v=[];if(Nt(d-f)===Nt(l[1]-l[0])){m=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{m=u;var h=d+l[1]-l[0];v[0]=Math.min(f,(h+f)/2),v[1]=Math.max(f,(h+f)/2)}var b=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>b[0]&&t<=b[1]||t>=v[0]&&t<=v[1]){o=a[c].index;break}}else{var S=Math.min(u,d),x=Math.max(u,d);if(t>(S+f)/2&&t<=(x+f)/2){o=a[c].index;break}}}else for(var T=0;T<s;T++)if(T===0&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T>0&&T<s-1&&t>(n[T].coordinate+n[T-1].coordinate)/2&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T===s-1&&t>(n[T].coordinate+n[T-1].coordinate)/2){o=n[T].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?We(We({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},l4=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,m=f.length;d<m;d++){var v=u[f[d]],g=v.items,h=v.cateAxisId,b=g.filter(function(A){return er(A.type).indexOf("Bar")>=0});if(b&&b.length){var S=b[0].type.defaultProps,x=S!==void 0?We(We({},S),b[0].props):b[0].props,T=x.barSize,y=x[h];o[y]||(o[y]=[]);var w=pe(T)?r:T;o[y].push({item:b[0],stackList:b.slice(1),barSize:pe(w)?void 0:Nr(w,n,0)})}}return o},c4=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=Nr(r,a,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,m=a/l,v=o.reduce(function(T,y){return T+y.barSize||0},0);v+=(l-1)*c,v>=a&&(v-=(l-1)*c,c=0),v>=a&&m>0&&(d=!0,m*=.9,v=l*m);var g=(a-v)/2>>0,h={offset:g-c,size:0};u=o.reduce(function(T,y){var w={item:y.item,position:{offset:h.offset+h.size+c,size:d?m:y.barSize}},A=[].concat(bg(T),[w]);return h=A[A.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(P){A.push({item:P,position:h})}),A},f)}else{var b=Nr(n,a,0,!0);a-2*b-(l-1)*c<=0&&(c=0);var S=(a-2*b-(l-1)*c)/l;S>1&&(S>>=0);var x=s===+s?Math.min(S,s):S;u=o.reduce(function(T,y,w){var A=[].concat(bg(T),[{item:y.item,position:{offset:b+(S+c)*w+(S-x)/2,size:x}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(P){A.push({item:P,position:A[A.length-1].position})}),A},f)}return u},u4=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=yg({children:i,legendWidth:l});if(c){var u=a||{},f=u.width,d=u.height,m=c.align,v=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&m!=="center"&&re(t[m]))return We(We({},t),{},Nn({},m,t[m]+(f||0)));if((g==="horizontal"||g==="vertical"&&m==="center")&&v!=="middle"&&re(t[v]))return We(We({},t),{},Nn({},v,t[v]+(d||0)))}return t},f4=function(t,r,n){return pe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},wg=function(t,r,n,a,i){var o=r.props.children,s=dt(o,kn).filter(function(c){return f4(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(pe(f))return c;var d=Array.isArray(f)?[No(f),wr(f)]:[f,f],m=l.reduce(function(v,g){var h=Je(u,g,0),b=d[0]-Math.abs(Array.isArray(h)?h[0]:h),S=d[1]+Math.abs(Array.isArray(h)?h[1]:h);return[Math.min(b,v[0]),Math.max(S,v[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},d4=function(t,r,n,a,i){var o=r.map(function(s){return wg(t,s,n,i,a)}).filter(function(s){return!pe(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},Og=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&wg(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},[])},Sg=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Ag=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},ur=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,c=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Nt(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!un(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},p4=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:Ao(),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:Ao(),realScaleType:"linear"};if(Cr(a)){var l="scale".concat(Fi(a));return{scale:(Xm[l]||Ca)(),realScaleType:Xm[l]?l:"point"}}return me(a)?{scale:a}:{scale:Ca(),realScaleType:"point"}},Tg=1e-4,h4=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])-Tg,o=Math.max(a[0],a[1])+Tg,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},m4=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},g4=function(t,r){if(!r||r.length!==2||!re(r[0])||!re(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(!re(t[0])||t[0]<n)&&(i[0]=n),(!re(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},v4=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=un(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},y4=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=un(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},b4={sign:v4,expand:MS,none:dn,silhouette:DS,wiggle:IS,positive:y4},x4=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=b4[n],o=NS().keys(a).value(function(s,l){return+Je(s,l,0)}).order(Tl).offset(i);return o(t)},w4=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 m,v=(m=d.type)!==null&&m!==void 0&&m.defaultProps?We(We({},d.type.defaultProps),d.props):d.props,g=v.stackId,h=v.hide;if(h)return f;var b=v[n],S=f[b]||{hasStack:!1,stackGroups:{}};if(Xe(g)){var x=S.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),S.hasStack=!0,S.stackGroups[g]=x}else S.stackGroups[kr("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return We(We({},f),{},Nn({},b,S))},l),u={};return Object.keys(c).reduce(function(f,d){var m=c[d];if(m.hasStack){var v={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(g,h){var b=m.stackGroups[h];return We(We({},g),{},Nn({},h,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:x4(t,b.items,i)}))},v)}return We(We({},f),{},Nn({},d,m))},u)},O4=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=N5(c,i,s);return t.domain([No(u),wr(u)]),{niceTicks:u}}if(i&&a==="number"){var f=t.domain(),d=M5(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&&!pe(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,pe(o)?t.dataKey:o);return pe(l)?null:t.scale(l)}var jg=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 pe(l)?null:r.scale(l)-i/2+a},S4=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]},A4=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Xe(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},T4=function(t){return t.reduce(function(r,n){return[No(n.concat([r[0]]).filter(re)),wr(n.concat([r[1]]).filter(re))]},[1/0,-1/0])},Pg=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=T4(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})},_g=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Eg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qc=function(t,r,n){if(me(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(re(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(_g.test(t[0])){var i=+_g.exec(t[0])[1];a[0]=r[0]-i}else me(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(re(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Eg.test(t[1])){var o=+Eg.exec(t[1])[1];a[1]=r[1]+o}else me(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},Cg=function(t,r,n){return!t||!t.length||Ur(t,Ot(n,"type.defaultProps.domain"))?r:t},$g=function(t,r){var n=t.type.defaultProps?We(We({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,c=n.chartType,u=n.hide;return We(We({},he(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 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 Ng(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){j4(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 j4(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=_4(e,"string");return Ha(t)=="symbol"?t:t+""}function _4(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,E4=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}},C4=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))},$4=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=C4({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:E4(c),angleInRadian:c}},k4=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}},N4=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},Mg=function(t,r){var n=t.x,a=t.y,i=$4({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=k4(r),f=u.startAngle,d=u.endAngle,m=s,v;if(f<=d){for(;m>d;)m-=360;for(;m<f;)m+=360;v=m>=f&&m<=d}else{for(;m>f;)m-=360;for(;m<d;)m+=360;v=m>=d&&m<=f}return v?Ng(Ng({},r),{},{radius:o,angle:N4(m,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 M4=["offset"];function D4(e){return B4(e)||R4(e)||L4(e)||I4()}function I4(){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 L4(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 R4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B4(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 F4(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}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 Qe(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){W4(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 W4(e,t,r){return t=z4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z4(e){var t=V4(e,"string");return qa(t)=="symbol"?t:t+""}function V4(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 G4=function(t){var r=t.value,n=t.formatter,a=pe(t.children)?r:t.children;return me(n)?n(a):a},H4=function(t,r){var n=Nt(r-t),a=Math.min(Math.abs(r-t),360);return n*a},q4=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,m=l.startAngle,v=l.endAngle,g=l.clockWise,h=(f+d)/2,b=H4(m,v),S=b>=0?1:-1,x,T;a==="insideStart"?(x=m+S*o,T=g):a==="insideEnd"?(x=v-S*o,T=!g):a==="end"&&(x=v+S*o,T=g),T=b<=0?T:!T;var y=nt(c,u,h,x),w=nt(c,u,h,x+(T?1:-1)*359),A="M".concat(y.x,",").concat(y.y,`
224
- A`).concat(h,",").concat(h,",0,1,").concat(T?0:1,`,
225
- `).concat(w.x,",").concat(w.y),P=pe(t.id)?kr("recharts-radial-line-"):t.id;return O.createElement("text",Ka({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",s)}),O.createElement("defs",null,O.createElement("path",{id:P,d:A})),O.createElement("textPath",{xlinkHref:"#".concat(P)},r))},K4=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 m=nt(o,s,c+n,d),v=m.x,g=m.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 h=(l+c)/2,b=nt(o,s,h,d),S=b.x,x=b.y;return{x:S,y:x,textAnchor:"middle",verticalAnchor:"middle"}},Y4=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,m=f>0?"end":"start",v=f>0?"start":"end",g=c>=0?1:-1,h=g*a,b=g>0?"end":"start",S=g>0?"start":"end";if(i==="top"){var x={x:s+c/2,y:l-f*a,textAnchor:"middle",verticalAnchor:m};return Qe(Qe({},x),n?{height:Math.max(l-n.y,0),width:c}:{})}if(i==="bottom"){var T={x:s+c/2,y:l+u+d,textAnchor:"middle",verticalAnchor:v};return Qe(Qe({},T),n?{height:Math.max(n.y+n.height-(l+u),0),width:c}:{})}if(i==="left"){var y={x:s-h,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+h,y:l+u/2,textAnchor:S,verticalAnchor:"middle"};return Qe(Qe({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:u}:{})}var A=n?{width:c,height:u}:{};return i==="insideLeft"?Qe({x:s+h,y:l+u/2,textAnchor:S,verticalAnchor:"middle"},A):i==="insideRight"?Qe({x:s+c-h,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},A):i==="insideTop"?Qe({x:s+c/2,y:l+d,textAnchor:"middle",verticalAnchor:v},A):i==="insideBottom"?Qe({x:s+c/2,y:l+u-d,textAnchor:"middle",verticalAnchor:m},A):i==="insideTopLeft"?Qe({x:s+h,y:l+d,textAnchor:S,verticalAnchor:v},A):i==="insideTopRight"?Qe({x:s+c-h,y:l+d,textAnchor:b,verticalAnchor:v},A):i==="insideBottomLeft"?Qe({x:s+h,y:l+u-d,textAnchor:S,verticalAnchor:m},A):i==="insideBottomRight"?Qe({x:s+c-h,y:l+u-d,textAnchor:b,verticalAnchor:m},A):on(i)&&(re(i.x)||$r(i.x))&&(re(i.y)||$r(i.y))?Qe({x:s+Nr(i.x,c),y:l+Nr(i.y,u),textAnchor:"end",verticalAnchor:"end"},A):Qe({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},A)},X4=function(t){return"cx"in t&&re(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=F4(e,M4),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||pe(s)&&pe(l)&&!O.isValidElement(c)&&!me(c))return null;if(O.isValidElement(c))return O.cloneElement(c,a);var m;if(me(c)){if(m=O.createElement(c,a),O.isValidElement(m))return m}else m=G4(a);var v=X4(i),g=he(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return q4(a,m,g);var h=v?K4(a):Y4(a);return O.createElement(po,Ka({className:ve("recharts-label",f)},g,h,{breakAll:d}),m)}it.displayName="Label";var Ig=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,m=t.top,v=t.left,g=t.width,h=t.height,b=t.clockWise,S=t.labelViewBox;if(S)return S;if(re(g)&&re(h)){if(re(f)&&re(d))return{x:f,y:d,width:g,height:h};if(re(m)&&re(v))return{x:m,y:v,width:g,height:h}}return re(f)&&re(d)?{x:f,y:d,width:0,height:0}:re(r)&&re(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:{}},Z4=function(t,r){return t?t===!0?O.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?O.createElement(it,{key:"label-implicit",viewBox:r,value:t}):O.isValidElement(t)?t.type===it?O.cloneElement(t,{key:"label-implicit",viewBox:r}):O.createElement(it,{key:"label-implicit",content:t,viewBox:r}):me(t)?O.createElement(it,{key:"label-implicit",content:t,viewBox:r}):on(t)?O.createElement(it,Ka({viewBox:r},t,{key:"label-implicit"})):null:null},J4=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=Ig(t),o=dt(a,it).map(function(l,c){return O.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=Z4(t.label,r||i);return[s].concat(D4(o))};it.parseViewBox=Ig,it.renderCallByParent=J4;function Q4(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var e6=Q4;const t6=De(e6);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 r6=["valueAccessor"],n6=["data","dataKey","clockWise","id","textBreakAll"];function a6(e){return l6(e)||s6(e)||o6(e)||i6()}function i6(){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 o6(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 s6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l6(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 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){c6(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 c6(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=f6(e,"string");return Ya(t)=="symbol"?t:t+""}function f6(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 Bg(e,t){if(e==null)return{};var r=d6(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 d6(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 p6=function(t){return Array.isArray(t.value)?t6(t.value):t.value};function Ht(e){var t=e.valueAccessor,r=t===void 0?p6:t,n=Bg(e,r6),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Bg(n,n6);return!a||!a.length?null:O.createElement(we,{className:"recharts-label-list"},a.map(function(u,f){var d=pe(i)?r(u,f):Je(u&&u.payload,i),m=pe(s)?{}:{id:"".concat(s,"-").concat(f)};return O.createElement(it,Wo({},he(u,!0),c,m,{parentViewBox:u.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(pe(o)?u:Rg(Rg({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Ht.displayName="LabelList";function h6(e,t){return e?e===!0?O.createElement(Ht,{key:"labelList-implicit",data:t}):O.isValidElement(e)||me(e)?O.createElement(Ht,{key:"labelList-implicit",data:t,content:e}):on(e)?O.createElement(Ht,Wo({data:t},e,{key:"labelList-implicit"})):null:null}function m6(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,Ht).map(function(o,s){return O.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=h6(e.label,t);return[i].concat(a6(a))}Ht.renderCallByParent=m6;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 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 Ug(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){g6(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 g6(e,t,r){return t=v6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v6(e){var t=y6(e,"string");return Xa(t)=="symbol"?t:t+""}function y6(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 b6=function(t,r){var n=Nt(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,m=nt(r,n,u,d),v=nt(r,n,a,d),g=c?i-o*f:i,h=nt(r,n,u*Math.cos(f*Uo),g);return{center:m,circleTangency:v,lineTangency:h,theta:f}},Wg=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=b6(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,`
220
+ height and width.`,z,C,o,l,u,f,r);var D=!Array.isArray(h)&&er(h.type).endsWith("Chart");return O.Children.map(h,function(H){return O.isValidElement(H)?O.cloneElement(H,co({width:z,height:C},D?{style:co({height:"100%",width:"100%",maxHeight:C,maxWidth:z},H.props.style)}:{})):H})},[r,h,l,d,f,u,$,o]);return O.createElement("div",{id:m?"".concat(m):void 0,className:ve("recharts-responsive-container",b),style:co(co({},T),{},{width:o,height:l,minWidth:u,minHeight:f,maxHeight:d}),ref:y},_)}),ec=function(t){return null};ec.displayName="Cell";function Aa(e){"@babel/helpers - typeof";return Aa=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},Aa(e)}function yh(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?yh(Object(r),!0).forEach(function(n){CP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CP(e,t,r){return t=EP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EP(e){var t=$P(e,"string");return Aa(t)=="symbol"?t:t+""}function $P(e,t){if(Aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wn={widthCache:{},cacheCount:0},MP=2e3,kP={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},bh="recharts_measurement_span";function NP(e){var t=tc({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Ta=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=NP(r),a=JSON.stringify({text:t,copyStyle:n});if(wn.widthCache[a])return wn.widthCache[a];try{var i=document.getElementById(bh);i||(i=document.createElement("span"),i.setAttribute("id",bh),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=tc(tc({},kP),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return wn.widthCache[a]=l,++wn.cacheCount>MP&&(wn.cacheCount=0,wn.widthCache={}),l}catch{return{width:0,height:0}}},IP=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 BP(e)||RP(e,t)||LP(e,t)||DP()}function DP(){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 LP(e,t){if(e){if(typeof e=="string")return xh(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 xh(e,t)}}function xh(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 RP(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 BP(e){if(Array.isArray(e))return e}function FP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wh(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,WP(n.key),n)}}function UP(e,t,r){return t&&wh(e.prototype,t),r&&wh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WP(e){var t=zP(e,"string");return ja(t)=="symbol"?t:t+""}function zP(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 Oh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Sh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VP=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,HP=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ah={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},GP=Object.keys(Ah),On="NaN";function qP(e,t){return e*Ah[t]}var fo=function(){function e(t,r){FP(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!VP.test(r)&&(this.num=NaN,this.unit=""),GP.includes(r)&&(this.num=qP(t,r),this.unit="px")}return UP(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=HP.exec(r))!==null&&n!==void 0?n:[],i=uo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function Th(e){if(e.includes(On))return On;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Oh.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 On;t=t.replace(Oh,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=Sh.exec(t))!==null&&f!==void 0?f:[],h=uo(d,4),v=h[1],g=h[2],m=h[3],b=fo.parse(v??""),S=fo.parse(m??""),x=g==="+"?b.add(S):b.subtract(S);if(x.isNaN())return On;t=t.replace(Sh,x.toString())}return t}var jh=/\(([^()]*)\)/;function KP(e){for(var t=e;t.includes("(");){var r=jh.exec(t),n=uo(r,2),a=n[1];t=t.replace(jh,Th(a))}return t}function YP(e){var t=e.replace(/\s+/g,"");return t=KP(t),t=Th(t),t}function XP(e){try{return YP(e)}catch{return On}}function rc(e){var t=XP(e.slice(5,-1));return t===On?"":t}var ZP=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],JP=["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 Ph(e,t){if(e==null)return{};var r=QP(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 QP(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 _h(e,t){return n_(e)||r_(e,t)||t_(e,t)||e_()}function e_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
222
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t_(e,t){if(e){if(typeof e=="string")return Ch(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 Ch(e,t)}}function Ch(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r_(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,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 n_(e){if(Array.isArray(e))return e}var Eh=/[ \f\n\r\t\v\u2028\u2029]+/,$h=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];pe(r)||(n?i=r.toString().split(""):i=r.toString().split(Eh));var o=i.map(function(l){return{word:l,width:Ta(l,a).width}}),s=n?0:Ta(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},a_=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,u=re(o),f=s,d=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return z.reduce(function(C,D){var H=D.word,V=D.width,E=C[C.length-1];if(E&&(a==null||i||E.width+V+n<Number(a)))E.words.push(H),E.width+=V+n;else{var N={words:[H],width:V};C.push(N)}return C},[])},h=d(r),v=function(z){return z.reduce(function(C,D){return C.width>D.width?C:D})};if(!u)return h;for(var g="…",m=function(z){var C=f.slice(0,z),D=$h({breakAll:c,style:l,children:C+g}).wordsWithComputedWidth,H=d(D),V=H.length>o||v(H).width>Number(a);return[V,H]},b=0,S=f.length-1,x=0,T;b<=S&&x<=f.length-1;){var y=Math.floor((b+S)/2),w=y-1,A=m(w),j=_h(A,2),$=j[0],U=j[1],P=m(y),_=_h(P,1),R=_[0];if(!$&&!R&&(b=y+1),$&&R&&(S=y-1),!$&&R){T=U;break}x++}return T||h},Mh=function(t){var r=pe(t)?[]:t.toString().split(Eh);return[{words:r}]},i_=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 Mh(a);return a_({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return Mh(a)},kh="#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?kh:m,S=Ph(t,ZP),x=O.useMemo(function(){return i_({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:f,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,f,S.style,S.width]),T=S.dx,y=S.dy,w=S.angle,A=S.className,j=S.breakAll,$=Ph(S,JP);if(!Xe(n)||!Xe(i))return null;var U=n+(re(T)?T:0),P=i+(re(y)?y:0),_;switch(g){case"start":_=rc("calc(".concat(c,")"));break;case"middle":_=rc("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:_=rc("calc(".concat(x.length-1," * -").concat(s,")"));break}var R=[];if(f){var F=x[0].width,z=S.width;R.push("scale(".concat((re(z)?z/F:1)/F,")"))}return w&&R.push("rotate(".concat(w,", ").concat(U,", ").concat(P,")")),R.length&&($.transform=R.join(" ")),O.createElement("text",nc({},he($,!0),{x:U,y:P,className:ve("recharts-text",A),textAnchor:h,fill:b.includes("url")?kh:b}),x.map(function(C,D){var H=C.words.join(j?"":" ");return O.createElement("tspan",{x:U,dy:D===0?_:s,key:"".concat(H,"-").concat(D)},H)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function o_(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===o_?e:s_,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 s_(){return 0}function Nh(e){return e===null?NaN:+e}function*l_(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Pa=ac(yr).right;ac(Nh).center;class Ih extends Map{constructor(t,r=f_){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(Dh(this,t))}has(t){return super.has(Dh(this,t))}set(t,r){return super.set(c_(this,t),r)}delete(t){return super.delete(u_(this,t))}}function Dh({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function c_({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function u_({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function f_(e){return e!==null&&typeof e=="object"?e.valueOf():e}function d_(e=yr){if(e===yr)return Lh;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 Lh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const p_=Math.sqrt(50),h_=Math.sqrt(10),m_=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>=p_?10:i>=h_?5:i>=m_?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 Rh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Bh(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Fh(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?Lh:d_(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));Fh(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 g_(e,t,r){if(e=Float64Array.from(l_(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Bh(e);if(t>=1)return Rh(e);var n,a=(n-1)*t,i=Math.floor(a),o=Rh(Fh(e,i).subarray(0,i+1)),s=Bh(e.subarray(i+1));return o+(s-o)*(a-i)}}function v_(e,t,r=Nh){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 y_(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 jt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function nr(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 Ih,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 Ih;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)},jt.apply(a,arguments),a}function Ca(){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=y_(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 Ca(t(),[n,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},jt.apply(f(),arguments)}function Uh(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Uh(t())},e}function Ea(){return Uh(Ca.apply(null,arguments).paddingInner(1))}function uc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Wh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function $a(){}var Ma=.7,mo=1/Ma,Sn="\\s*([+-]?\\d+)\\s*",ka="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b_=/^#([0-9a-f]{3,8})$/,x_=new RegExp(`^rgb\\(${Sn},${Sn},${Sn}\\)$`),w_=new RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),O_=new RegExp(`^rgba\\(${Sn},${Sn},${Sn},${ka}\\)$`),S_=new RegExp(`^rgba\\(${zt},${zt},${zt},${ka}\\)$`),A_=new RegExp(`^hsl\\(${ka},${zt},${zt}\\)$`),T_=new RegExp(`^hsla\\(${ka},${zt},${zt},${ka}\\)$`),zh={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:Vh,formatHex:Vh,formatHex8:j_,formatHsl:P_,formatRgb:Hh,toString:Hh});function Vh(){return this.rgb().formatHex()}function j_(){return this.rgb().formatHex8()}function P_(){return Xh(this).formatHsl()}function Hh(){return this.rgb().formatRgb()}function Na(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=b_.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Gh(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=x_.exec(e))?new pt(t[1],t[2],t[3],1):(t=w_.exec(e))?new pt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=O_.exec(e))?go(t[1],t[2],t[3],t[4]):(t=S_.exec(e))?go(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=A_.exec(e))?Yh(t[1],t[2]/100,t[3]/100,1):(t=T_.exec(e))?Yh(t[1],t[2]/100,t[3]/100,t[4]):zh.hasOwnProperty(e)?Gh(zh[e]):e==="transparent"?new pt(NaN,NaN,NaN,0):null}function Gh(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 __(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?__(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,Wh($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?Ma:Math.pow(Ma,e),new pt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new pt(Dr(this.r),Dr(this.g),Dr(this.b),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:qh,formatHex:qh,formatHex8:C_,formatRgb:Kh,toString:Kh}));function qh(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function C_(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kh(){const e=vo(this.opacity);return`${e===1?"rgb(":"rgba("}${Dr(this.r)}, ${Dr(this.g)}, ${Dr(this.b)}${e===1?")":`, ${e})`}`}function vo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Dr(e),(e<16?"0":"")+e.toString(16)}function Yh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new It(e,t,r,n)}function Xh(e){if(e instanceof It)return new It(e.h,e.s,e.l,e.opacity);if(e instanceof $a||(e=Na(e)),!e)return new It;if(e instanceof It)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 It(o,s,l,e.opacity)}function E_(e,t,r,n){return arguments.length===1?Xh(e):new It(e,t,r,n??1)}function It(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}uc(It,E_,Wh($a,{brighter(e){return e=e==null?mo:Math.pow(mo,e),new It(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ma:Math.pow(Ma,e),new It(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 It(Zh(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("}${Zh(this.h)}, ${yo(this.s)*100}%, ${yo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Zh(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 $_(e,t){return function(r){return e+r*t}}function M_(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 k_(e){return(e=+e)==1?Jh:function(t,r){return r-t?M_(t,r,e):pc(isNaN(t)?r:t)}}function Jh(e,t){var r=t-e;return r?$_(e,r):pc(isNaN(e)?t:e)}const Qh=function e(t){var r=k_(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=Jh(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 N_(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 I_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function D_(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]=An(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 L_(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 R_(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]=An(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 B_(e){return function(){return e}}function F_(e){return function(t){return e(t)+""}}function U_(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]?F_(l[0].x):B_(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 An(e,t){var r=typeof t,n;return t==null||r==="boolean"?pc(t):(r==="number"?bo:r==="string"?(n=Na(t))?(t=n,Qh):U_:t instanceof Na?Qh:t instanceof Date?L_:I_(t)?N_:Array.isArray(t)?D_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?R_:bo)(e,t)}function gc(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function W_(e,t){t===void 0&&(t=e,e=An);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 z_(e){return function(){return e}}function xo(e){return+e}var em=[0,1];function lt(e){return e}function vc(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:z_(isNaN(t)?NaN:.5)}function V_(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function H_(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 G_(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 Ia(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wo(){var e=em,t=em,r=An,n,a,i,o=lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==lt&&(o=V_(e[0],e[d-1])),s=d>2?G_:H_,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 q_(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 K_(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 Y_(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var X_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Da(e){if(!(t=X_.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]})}Da.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 Z_(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 tm;function J_(e,t){var r=Oo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(tm=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 rm(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 nm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:q_,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)=>rm(e*100,t),r:rm,s:J_,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function am(e){return e}var im=Array.prototype.map,om=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Q_(e){var t=e.grouping===void 0||e.thousands===void 0?am:K_(im.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?am:Y_(im.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=Da(f);var d=f.fill,h=f.align,v=f.sign,g=f.symbol,m=f.zero,b=f.width,S=f.comma,x=f.precision,T=f.trim,y=f.type;y==="n"?(S=!0,y="g"):nm[y]||(x===void 0&&(x=12),T=!0,y="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var w=g==="$"?r:g==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",A=g==="$"?n:/[%p]/.test(y)?o:"",j=nm[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 U(P){var _=w,R=A,F,z,C;if(y==="c")R=j(P)+R,P="";else{P=+P;var D=P<0||1/P<0;if(P=isNaN(P)?l:j(Math.abs(P),x),T&&(P=Z_(P)),D&&+P==0&&v!=="+"&&(D=!1),_=(D?v==="("?v:s:v==="-"||v==="("?"":v)+_,R=(y==="s"?om[8+tm/3]:"")+R+(D&&v==="("?")":""),$){for(F=-1,z=P.length;++F<z;)if(C=P.charCodeAt(F),48>C||C>57){R=(C===46?a+P.slice(F+1):P.slice(F))+R,P=P.slice(0,F);break}}}S&&!m&&(P=t(P,1/0));var H=_.length+P.length+R.length,V=H<b?new Array(b-H+1).join(d):"";switch(S&&m&&(P=t(V+P,V.length?b-R.length:1/0),V=""),h){case"<":P=_+P+R+V;break;case"=":P=_+V+P+R;break;case"^":P=V.slice(0,H=V.length>>1)+_+P+R+V.slice(H);break;default:P=V+_+P+R;break}return i(P)}return U.toString=function(){return f+""},U}function u(f,d){var h=c((f=Da(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Tn(d)/3)))*3,g=Math.pow(10,-v),m=om[8+v/3];return function(b){return h(g*b)+m}}return{format:c,formatPrefix:u}}var So,xc,sm;eC({thousands:",",grouping:[3],currency:["$",""]});function eC(e){return So=Q_(e),xc=So.format,sm=So.formatPrefix,So}function tC(e){return Math.max(0,-Tn(Math.abs(e)))}function rC(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Tn(t)/3)))*3-Tn(Math.abs(e)))}function nC(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function lm(e,t,r,n){var a=sc(e,t,r),i;switch(n=Da(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=rC(a,o))&&(n.precision=i),sm(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=nC(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=tC(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 lm(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 Ao(){var e=yc();return e.copy=function(){return Ia(e,Ao())},jt.apply(e,arguments),br(e)}function cm(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 cm(e).unknown(t)},e=arguments.length?Array.from(e,xo):[0,1],br(r)}function um(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 fm(e){return Math.log(e)}function dm(e){return Math.exp(e)}function aC(e){return-Math.log(-e)}function iC(e){return-Math.exp(-e)}function oC(e){return isFinite(e)?+("1e"+e):e<0?0:e}function sC(e){return e===10?oC:e===Math.E?Math.exp:t=>Math.pow(e,t)}function lC(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 pm(e){return(t,r)=>-e(-t,r)}function wc(e){const t=e(fm,dm),r=t.domain;let n=10,a,i;function o(){return a=lC(n),i=sC(n),r()[0]<0?(a=pm(a),i=pm(i),e(aC,iC)):e(fm,dm),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=Da(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(um(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function hm(){const e=wc(wo()).domain([1,10]);return e.copy=()=>Ia(e,hm()).base(e.base()),jt.apply(e,arguments),e}function mm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Oc(e){var t=1,r=e(mm(t),gm(t));return r.constant=function(n){return arguments.length?e(mm(t=+n),gm(t)):t},br(r)}function vm(){var e=Oc(wo());return e.copy=function(){return Ia(e,vm()).constant(e.constant())},jt.apply(e,arguments)}function ym(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function cC(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function uC(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(cC,uC):e(ym(r),ym(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},br(t)}function Ac(){var e=Sc(wo());return e.copy=function(){return Ia(e,Ac()).exponent(e.exponent())},jt.apply(e,arguments),e}function fC(){return Ac.apply(null,arguments).exponent(.5)}function bm(e){return Math.sign(e)*e*e}function dC(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function xm(){var e=yc(),t=[0,1],r=!1,n;function a(i){var o=dC(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(bm(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(bm)),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 xm(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},jt.apply(a,arguments),br(a)}function wm(){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]=v_(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 wm().domain(e).range(t).unknown(n)},jt.apply(i,arguments)}function Om(){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 Om().domain([e,t]).range(a).unknown(i)},jt.apply(br(o),arguments)}function Sm(){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 Sm().domain(e).range(t).unknown(r)},jt.apply(a,arguments)}const Tc=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)=>(Tc.setTime(+i),jc.setTime(+o),e(Tc),e(jc),Math.floor(r(Tc,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 To=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);To.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):To),To.range;const ar=1e3,Pt=ar*60,ir=Pt*60,or=ir*24,Pc=or*7,Am=or*30,_c=or*365,Rr=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCSeconds());Rr.range;const Cc=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ar)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());Cc.range;const Ec=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Ec.range;const $c=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ar-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getHours());$c.range;const Mc=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getUTCHours());Mc.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())*Pt)/or,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)/or,e=>e.getUTCDate()-1);jo.range;const Tm=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/or,e=>Math.floor(e/or));Tm.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())*Pt)/Pc)}const Po=Br(0),_o=Br(1),pC=Br(2),hC=Br(3),jn=Br(4),mC=Br(5),gC=Br(6);Po.range,_o.range,pC.range,hC.range,jn.range,mC.range,gC.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 Co=Fr(0),Eo=Fr(1),vC=Fr(2),yC=Fr(3),Pn=Fr(4),bC=Fr(5),xC=Fr(6);Co.range,Eo.range,vC.range,yC.range,Pn.range,bC.range,xC.range;const kc=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());kc.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 sr=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());sr.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)}),sr.range;const lr=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());lr.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)}),lr.range;function jm(e,t,r,n,a,i){const o=[[Rr,1,ar],[Rr,5,5*ar],[Rr,15,15*ar],[Rr,30,30*ar],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ir],[a,3,3*ir],[a,6,6*ir],[a,12,12*ir],[n,1,or],[n,2,2*or],[r,1,Pc],[t,1,Am],[t,3,3*Am],[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 To.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[wC,OC]=jm(lr,Nc,Co,Tm,Mc,Ec),[SC,AC]=jm(sr,kc,Po,La,$c,Cc);function Ic(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Dc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ra(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function TC(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),S=Fa(l),x={a:D,A:H,b:V,B:E,c:null,d:Mm,e:Mm,f:KC,g:aE,G:oE,H:HC,I:GC,j:qC,L:km,m:YC,M:XC,p:N,q:W,Q:Bm,s:Fm,S:ZC,u:JC,U:QC,V:eE,w:tE,W:rE,x:null,X:null,y:nE,Y:iE,Z:sE,"%":Rm},T={a:q,A:J,b:L,B:G,c:null,d:Im,e:Im,f:fE,g:wE,G:SE,H:lE,I:cE,j:uE,L:Dm,m:dE,M:pE,p:Q,q:I,Q:Bm,s:Fm,S:hE,u:mE,U:gE,V:vE,w:yE,W:bE,x:null,X:null,y:xE,Y:OE,Z:AE,"%":Rm},y={a:U,A:P,b:_,B:R,c:F,d:Em,e:Em,f:UC,g:Cm,G:_m,H:$m,I:$m,j:LC,L:FC,m:DC,M:RC,p:$,q:IC,Q:zC,s:VC,S:BC,u:EC,U:$C,V:MC,w:CC,W:kC,x:z,X:C,y:Cm,Y:_m,Z:NC,"%":WC};x.x=w(r,x),x.X=w(n,x),x.c=w(t,x),T.x=w(r,T),T.X=w(n,T),T.c=w(t,T);function w(B,Y){return function(Z){var M=[],ee=-1,K=0,oe=B.length,ne,fe,Se;for(Z instanceof Date||(Z=new Date(+Z));++ee<oe;)B.charCodeAt(ee)===37&&(M.push(B.slice(K,ee)),(fe=Pm[ne=B.charAt(++ee)])!=null?ne=B.charAt(++ee):fe=ne==="e"?" ":"0",(Se=Y[ne])&&(ne=Se(Z,fe)),M.push(ne),K=ee+1);return M.push(B.slice(K,ee)),M.join("")}}function A(B,Y){return function(Z){var M=Ra(1900,void 0,1),ee=j(M,B,Z+="",0),K,oe;if(ee!=Z.length)return null;if("Q"in M)return new Date(M.Q);if("s"in M)return new Date(M.s*1e3+("L"in M?M.L:0));if(Y&&!("Z"in M)&&(M.Z=0),"p"in M&&(M.H=M.H%12+M.p*12),M.m===void 0&&(M.m="q"in M?M.q:0),"V"in M){if(M.V<1||M.V>53)return null;"w"in M||(M.w=1),"Z"in M?(K=Dc(Ra(M.y,0,1)),oe=K.getUTCDay(),K=oe>4||oe===0?Eo.ceil(K):Eo(K),K=jo.offset(K,(M.V-1)*7),M.y=K.getUTCFullYear(),M.m=K.getUTCMonth(),M.d=K.getUTCDate()+(M.w+6)%7):(K=Ic(Ra(M.y,0,1)),oe=K.getDay(),K=oe>4||oe===0?_o.ceil(K):_o(K),K=La.offset(K,(M.V-1)*7),M.y=K.getFullYear(),M.m=K.getMonth(),M.d=K.getDate()+(M.w+6)%7)}else("W"in M||"U"in M)&&("w"in M||(M.w="u"in M?M.u%7:"W"in M?1:0),oe="Z"in M?Dc(Ra(M.y,0,1)).getUTCDay():Ic(Ra(M.y,0,1)).getDay(),M.m=0,M.d="W"in M?(M.w+6)%7+M.W*7-(oe+5)%7:M.w+M.U*7-(oe+6)%7);return"Z"in M?(M.H+=M.Z/100|0,M.M+=M.Z%100,Dc(M)):Ic(M)}}function j(B,Y,Z,M){for(var ee=0,K=Y.length,oe=Z.length,ne,fe;ee<K;){if(M>=oe)return-1;if(ne=Y.charCodeAt(ee++),ne===37){if(ne=Y.charAt(ee++),fe=y[ne in Pm?Y.charAt(ee++):ne],!fe||(M=fe(B,Z,M))<0)return-1}else if(ne!=Z.charCodeAt(M++))return-1}return M}function $(B,Y,Z){var M=c.exec(Y.slice(Z));return M?(B.p=u.get(M[0].toLowerCase()),Z+M[0].length):-1}function U(B,Y,Z){var M=h.exec(Y.slice(Z));return M?(B.w=v.get(M[0].toLowerCase()),Z+M[0].length):-1}function P(B,Y,Z){var M=f.exec(Y.slice(Z));return M?(B.w=d.get(M[0].toLowerCase()),Z+M[0].length):-1}function _(B,Y,Z){var M=b.exec(Y.slice(Z));return M?(B.m=S.get(M[0].toLowerCase()),Z+M[0].length):-1}function R(B,Y,Z){var M=g.exec(Y.slice(Z));return M?(B.m=m.get(M[0].toLowerCase()),Z+M[0].length):-1}function F(B,Y,Z){return j(B,t,Y,Z)}function z(B,Y,Z){return j(B,r,Y,Z)}function C(B,Y,Z){return j(B,n,Y,Z)}function D(B){return o[B.getDay()]}function H(B){return i[B.getDay()]}function V(B){return l[B.getMonth()]}function E(B){return s[B.getMonth()]}function N(B){return a[+(B.getHours()>=12)]}function W(B){return 1+~~(B.getMonth()/3)}function q(B){return o[B.getUTCDay()]}function J(B){return i[B.getUTCDay()]}function L(B){return l[B.getUTCMonth()]}function G(B){return s[B.getUTCMonth()]}function Q(B){return a[+(B.getUTCHours()>=12)]}function I(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var Y=w(B+="",x);return Y.toString=function(){return B},Y},parse:function(B){var Y=A(B+="",!1);return Y.toString=function(){return B},Y},utcFormat:function(B){var Y=w(B+="",T);return Y.toString=function(){return B},Y},utcParse:function(B){var Y=A(B+="",!0);return Y.toString=function(){return B},Y}}}var Pm={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,jC=/^%/,PC=/[\\^$*+?|[\]().{}]/g;function xe(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 _C(e){return e.replace(PC,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(_C).join("|")+")","i")}function Fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function CC(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function EC(e,t,r){var n=tt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function $C(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function MC(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kC(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function _m(e,t,r){var n=tt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Cm(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 NC(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 IC(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 DC(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 Em(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function LC(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 RC(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function BC(e,t,r){var n=tt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function FC(e,t,r){var n=tt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function UC(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 WC(e,t,r){var n=jC.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zC(e,t,r){var n=tt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function VC(e,t,r){var n=tt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Mm(e,t){return xe(e.getDate(),t,2)}function HC(e,t){return xe(e.getHours(),t,2)}function GC(e,t){return xe(e.getHours()%12||12,t,2)}function qC(e,t){return xe(1+La.count(sr(e),e),t,3)}function km(e,t){return xe(e.getMilliseconds(),t,3)}function KC(e,t){return km(e,t)+"000"}function YC(e,t){return xe(e.getMonth()+1,t,2)}function XC(e,t){return xe(e.getMinutes(),t,2)}function ZC(e,t){return xe(e.getSeconds(),t,2)}function JC(e){var t=e.getDay();return t===0?7:t}function QC(e,t){return xe(Po.count(sr(e)-1,e),t,2)}function Nm(e){var t=e.getDay();return t>=4||t===0?jn(e):jn.ceil(e)}function eE(e,t){return e=Nm(e),xe(jn.count(sr(e),e)+(sr(e).getDay()===4),t,2)}function tE(e){return e.getDay()}function rE(e,t){return xe(_o.count(sr(e)-1,e),t,2)}function nE(e,t){return xe(e.getFullYear()%100,t,2)}function aE(e,t){return e=Nm(e),xe(e.getFullYear()%100,t,2)}function iE(e,t){return xe(e.getFullYear()%1e4,t,4)}function oE(e,t){var r=e.getDay();return e=r>=4||r===0?jn(e):jn.ceil(e),xe(e.getFullYear()%1e4,t,4)}function sE(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xe(t/60|0,"0",2)+xe(t%60,"0",2)}function Im(e,t){return xe(e.getUTCDate(),t,2)}function lE(e,t){return xe(e.getUTCHours(),t,2)}function cE(e,t){return xe(e.getUTCHours()%12||12,t,2)}function uE(e,t){return xe(1+jo.count(lr(e),e),t,3)}function Dm(e,t){return xe(e.getUTCMilliseconds(),t,3)}function fE(e,t){return Dm(e,t)+"000"}function dE(e,t){return xe(e.getUTCMonth()+1,t,2)}function pE(e,t){return xe(e.getUTCMinutes(),t,2)}function hE(e,t){return xe(e.getUTCSeconds(),t,2)}function mE(e){var t=e.getUTCDay();return t===0?7:t}function gE(e,t){return xe(Co.count(lr(e)-1,e),t,2)}function Lm(e){var t=e.getUTCDay();return t>=4||t===0?Pn(e):Pn.ceil(e)}function vE(e,t){return e=Lm(e),xe(Pn.count(lr(e),e)+(lr(e).getUTCDay()===4),t,2)}function yE(e){return e.getUTCDay()}function bE(e,t){return xe(Eo.count(lr(e)-1,e),t,2)}function xE(e,t){return xe(e.getUTCFullYear()%100,t,2)}function wE(e,t){return e=Lm(e),xe(e.getUTCFullYear()%100,t,2)}function OE(e,t){return xe(e.getUTCFullYear()%1e4,t,4)}function SE(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Pn(e):Pn.ceil(e),xe(e.getUTCFullYear()%1e4,t,4)}function AE(){return"+0000"}function Rm(){return"%"}function Bm(e){return+e}function Fm(e){return Math.floor(+e/1e3)}var _n,Um,Wm;TE({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 TE(e){return _n=TC(e),Um=_n.format,_n.parse,Wm=_n.utcFormat,_n.utcParse,_n}function jE(e){return new Date(e)}function PE(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"),S=c("%b %d"),x=c("%B"),T=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:S:r(w)<w?x:T)(w)}return u.invert=function(w){return new Date(f(w))},u.domain=function(w){return arguments.length?d(Array.from(w,PE)):d().map(jE)},u.ticks=function(w){var A=d();return e(A[0],A[A.length-1],w??10)},u.tickFormat=function(w,A){return A==null?y:c(A)},u.nice=function(w){var A=d();return(!w||typeof w.range!="function")&&(w=t(A[0],A[A.length-1],w??10)),w?d(um(A,w)):u},u.copy=function(){return Ia(u,Lc(e,t,r,n,a,i,o,s,l,c))},u}function _E(){return jt.apply(Lc(SC,AC,sr,kc,Po,La,$c,Cc,Rr,Um).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function CE(){return jt.apply(Lc(wC,OC,lr,Nc,Co,jo,Mc,Ec,Rr,Wm).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(An),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 zm(){var e=br($o()(lt));return e.copy=function(){return xr(e,zm())},nr.apply(e,arguments)}function Vm(){var e=wc($o()).domain([1,10]);return e.copy=function(){return xr(e,Vm()).base(e.base())},nr.apply(e,arguments)}function Hm(){var e=Oc($o());return e.copy=function(){return xr(e,Hm()).constant(e.constant())},nr.apply(e,arguments)}function Rc(){var e=Sc($o());return e.copy=function(){return xr(e,Rc()).exponent(e.exponent())},nr.apply(e,arguments)}function EE(){return Rc.apply(null,arguments).exponent(.5)}function Gm(){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)=>g_(e,i/n))},r.copy=function(){return Gm(t).domain(e)},nr.apply(r,arguments)}function Mo(){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,S,x;return arguments.length?([b,S,x]=m,c=W_(g,[b,S,x]),h):[c(0),c(.5),c(1)]}}return h.range=v(An),h.rangeRound=v(gc),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 qm(){var e=br(Mo()(lt));return e.copy=function(){return xr(e,qm())},nr.apply(e,arguments)}function Km(){var e=wc(Mo()).domain([.1,1,10]);return e.copy=function(){return xr(e,Km()).base(e.base())},nr.apply(e,arguments)}function Ym(){var e=Oc(Mo());return e.copy=function(){return xr(e,Ym()).constant(e.constant())},nr.apply(e,arguments)}function Bc(){var e=Sc(Mo());return e.copy=function(){return xr(e,Bc()).exponent(e.exponent())},nr.apply(e,arguments)}function $E(){return Bc.apply(null,arguments).exponent(.5)}const Xm=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ca,scaleDiverging:qm,scaleDivergingLog:Km,scaleDivergingPow:Bc,scaleDivergingSqrt:$E,scaleDivergingSymlog:Ym,scaleIdentity:cm,scaleImplicit:lc,scaleLinear:Ao,scaleLog:hm,scaleOrdinal:cc,scalePoint:Ea,scalePow:Ac,scaleQuantile:wm,scaleQuantize:Om,scaleRadial:xm,scaleSequential:zm,scaleSequentialLog:Vm,scaleSequentialPow:Rc,scaleSequentialQuantile:Gm,scaleSequentialSqrt:EE,scaleSequentialSymlog:Hm,scaleSqrt:fC,scaleSymlog:vm,scaleThreshold:Sm,scaleTime:_E,scaleUtc:CE,tickFormat:lm},Symbol.toStringTag,{value:"Module"}));var ME=an;function kE(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&&!ME(o):r(o,s)))var s=o,l=i}return l}var Zm=kE;function NE(e,t){return e>t}var IE=NE,DE=Zm,LE=IE,RE=gn;function BE(e){return e&&e.length?DE(e,RE,LE):void 0}var FE=BE;const wr=De(FE);function UE(e,t){return e<t}var WE=UE,zE=Zm,VE=WE,HE=gn;function GE(e){return e&&e.length?zE(e,HE,VE):void 0}var qE=GE;const ko=De(qE);var KE=rl,YE=gr,XE=qp,ZE=ft;function JE(e,t){var r=ZE(e)?KE:XE;return r(e,YE(t))}var QE=JE,e9=Hp,t9=QE;function r9(e,t){return e9(t9(e,t),1)}var n9=r9;const a9=De(n9);var i9=Ul;function o9(e,t){return i9(e,t)}var s9=o9;const Ur=De(s9);var Cn=1e9,l9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wc,We=!0,_t="[DecimalError] ",Wr=_t+"Invalid argument: ",Fc=_t+"Exponent out of range: ",En=Math.floor,zr=Math.pow,c9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,vt,rt=1e7,Ue=7,Jm=9007199254740991,No=En(Jm/Ue),ie={};ie.absoluteValue=ie.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ie.comparedTo=ie.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},ie.decimalPlaces=ie.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ue;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ie.dividedBy=ie.div=function(e){return cr(this,new this.constructor(e))},ie.dividedToIntegerBy=ie.idiv=function(e){var t=this,r=t.constructor;return Ne(cr(t,new r(e),0,1),r.precision)},ie.equals=ie.eq=function(e){return!this.cmp(e)},ie.exponent=function(){return qe(this)},ie.greaterThan=ie.gt=function(e){return this.cmp(e)>0},ie.greaterThanOrEqualTo=ie.gte=function(e){return this.cmp(e)>=0},ie.isInteger=ie.isint=function(){return this.e>this.d.length-2},ie.isNegative=ie.isneg=function(){return this.s<0},ie.isPositive=ie.ispos=function(){return this.s>0},ie.isZero=function(){return this.s===0},ie.lessThan=ie.lt=function(e){return this.cmp(e)<0},ie.lessThanOrEqualTo=ie.lte=function(e){return this.cmp(e)<1},ie.logarithm=ie.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(_t+"NaN");if(r.s<1)throw Error(_t+(r.s?"NaN":"-Infinity"));return r.eq(vt)?new n(0):(We=!1,t=cr(Ua(r,i),Ua(e,i),i),We=!0,Ne(t,a))},ie.minus=ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rg(t,e):Qm(t,(e.s=-e.s,e))},ie.modulo=ie.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(_t+"NaN");return r.s?(We=!1,t=cr(r,e,0,1).times(e),We=!0,r.minus(t)):Ne(new n(r),a)},ie.naturalExponential=ie.exp=function(){return eg(this)},ie.naturalLogarithm=ie.ln=function(){return Ua(this)},ie.negated=ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ie.plus=ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Qm(t,e):rg(t,(e.s=-e.s,e))},ie.precision=ie.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*Ue+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},ie.squareRoot=ie.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(_t+"NaN")}for(e=qe(s),We=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Ht(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(cr(s,i,o+2)).times(.5),Ht(i.d).slice(0,o)===(t=Ht(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Ne(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return We=!0,Ne(n,r)},ie.times=ie.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,We?Ne(e,f.precision):e},ie.toDecimalPlaces=ie.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Vt(e,0,Cn),t===void 0?t=n.rounding:Vt(t,0,8),Ne(r,e+qe(r)+1,t))},ie.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Vr(n,!0):(Vt(e,0,Cn),t===void 0?t=a.rounding:Vt(t,0,8),n=Ne(new a(n),e+1,t),r=Vr(n,!0,e+1)),r},ie.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Vr(a):(Vt(e,0,Cn),t===void 0?t=i.rounding:Vt(t,0,8),n=Ne(new i(a),e+qe(a)+1,t),r=Vr(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ie.toInteger=ie.toint=function(){var e=this,t=e.constructor;return Ne(new t(e),qe(e)+1,t.rounding)},ie.toNumber=function(){return+this},ie.toPower=ie.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(_t+"Infinity");return s}if(s.eq(vt))return s;if(n=l.precision,e.eq(vt))return Ne(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=u<0?-u:u)<=Jm){for(a=new l(vt),t=Math.ceil(n/Ue+4),We=!1;r%2&&(a=a.times(s),ng(a.d,t)),r=En(r/2),r!==0;)s=s.times(s),ng(s.d,t);return We=!0,e.s<0?new l(vt).div(a):Ne(a,n)}}else if(i<0)throw Error(_t+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,We=!1,a=e.times(Ua(s,n+c)),We=!0,a=eg(a),a.s=i,a},ie.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)):(Vt(e,1,Cn),t===void 0?t=i.rounding:Vt(t,0,8),a=Ne(new i(a),e,t),r=qe(a),n=Vr(a,e<=r||r<=i.toExpNeg,e)),n},ie.toSignificantDigits=ie.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Vt(e,1,Cn),t===void 0?t=n.rounding:Vt(t,0,8)),Ne(new n(r),e,t)},ie.toString=ie.valueOf=ie.val=ie.toJSON=ie[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 Qm(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)),We?Ne(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/Ue),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,We?Ne(t,f):t}function Vt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Wr+e)}function Ht(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=Ue-n.length,r&&(i+=Or(r)),i+=n;o=e[t],n=o+"",r=Ue-n.length,r&&(i+=Or(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var cr=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,S,x,T,y,w,A,j,$=n.constructor,U=n.s==a.s?1:-1,P=n.d,_=a.d;if(!n.s)return new $(n);if(!a.s)throw Error(_t+"Division by zero");for(l=n.e-a.e,A=_.length,y=P.length,h=new $(U),v=h.d=[],c=0;_[c]==(P[c]||0);)++c;if(_[c]>(P[c]||0)&&--l,i==null?S=i=$.precision:o?S=i+(qe(n)-qe(a))+1:S=i,S<0)return new $(0);if(S=S/Ue+2|0,c=0,A==1)for(u=0,_=_[0],S++;(c<y||u)&&S--;c++)x=u*rt+(P[c]||0),v[c]=x/_|0,u=x%_|0;else{for(u=rt/(_[0]+1)|0,u>1&&(_=e(_,u),P=e(P,u),A=_.length,y=P.length),T=A,g=P.slice(0,A),m=g.length;m<A;)g[m++]=0;j=_.slice(),j.unshift(0),w=_[0],_[1]>=rt/2&&++w;do u=0,s=t(_,g,A,m),s<0?(b=g[0],A!=m&&(b=b*rt+(g[1]||0)),u=b/w|0,u>1?(u>=rt&&(u=rt-1),f=e(_,u),d=f.length,m=g.length,s=t(f,g,d,m),s==1&&(u--,r(f,A<d?j:_,d))):(u==0&&(s=u=1),f=_.slice()),d=f.length,d<m&&f.unshift(0),r(g,f,m),s==-1&&(m=g.length,s=t(_,g,A,m),s<1&&(u++,r(g,A<m?j:_,m))),m=g.length):s===0&&(u++,g=[0]),v[c++]=u,s&&g[0]?g[m++]=P[T]||0:(g=[P[T]],m=1);while((T++<y||g[0]!==void 0)&&S--)}return v[0]||v.shift(),h.e=l,Ne(h,o?i+qe(h)+1:i)}}();function eg(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(We=!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=Ne(a.times(e),s),r=r.times(++l),o=i.plus(cr(a,r,s)),Ht(o.d).slice(0,s)===Ht(i.d).slice(0,s)){for(;c--;)i=Ne(i.times(i),s);return u.precision=f,t==null?(We=!0,Ne(i,f)):i}i=o}}function qe(e){for(var t=e.e*Ue,r=e.d[0];r>=10;r/=10)t++;return t}function Uc(e,t,r){if(t>e.LN10.sd())throw We=!0,r&&(e.precision=r),Error(_t+"LN10 precision limit exceeded");return Ne(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(_t+(h.s?"NaN":"-Infinity"));if(h.eq(vt))return new g(0);if(t==null?(We=!1,c=m):c=t,h.eq(10))return t==null&&(We=!0),Uc(g,c);if(c+=d,g.precision=c,r=Ht(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=Ht(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?(We=!0,Ne(h,m)):h;for(s=o=h=cr(h.minus(vt),h.plus(vt),c),u=Ne(h.times(h),c),a=3;;){if(o=Ne(o.times(u),c),l=s.plus(cr(o,new g(a),c)),Ht(l.d).slice(0,c)===Ht(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Uc(g,c+2,m).times(i+""))),s=cr(s,new g(f),c),g.precision=m,t==null?(We=!0,Ne(s,m)):s;s=l,a+=2}}function tg(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/Ue),e.d=[],n=(r+1)%Ue,r<0&&(n+=Ue),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ue;n<a;)e.d.push(+t.slice(n,n+=Ue));t=t.slice(n),n=Ue-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),We&&(e.e>No||e.e<-No))throw Error(Fc+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ne(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+=Ue,a=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Ue),i=f.length,u>=i)return e;for(c=i=f[u],o=1;i>=10;i/=10)o++;n%=Ue,a=n-Ue+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,(Ue-t%Ue)%Ue),e.e=En(-t/Ue)||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,Ue-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(We&&(e.e>No||e.e<-No))throw Error(Fc+qe(e));return e}function rg(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),We?Ne(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/Ue),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,We?Ne(t,h):t):new d(0)}function Vr(e,t,r){var n,a=qe(e),i=Ht(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 ng(e,t){if(e.length>t)return e.length=t,!0}function ag(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 tg(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,c9.test(i))tg(o,i);else throw Error(Wr+i)}if(a.prototype=ie,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=ag,a.config=a.set=u9,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 u9(e){if(!e||typeof e!="object")throw Error(_t+"Object expected");var t,r,n,a=["precision",1,Cn,"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=ag(l9);vt=new Wc(1);const Me=Wc;function f9(e){return m9(e)||h9(e)||p9(e)||d9()}function d9(){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 p9(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 h9(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function m9(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 g9=function(t){return t},ig={},og=function(t){return t===ig},sg=function(t){return function r(){return arguments.length===0||arguments.length===1&&og(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},v9=function e(t,r){return t===1?r:sg(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!==ig}).length;return o>=t?r.apply(void 0,a):e(t-o,sg(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 og(f)?l.shift():f});return r.apply(void 0,f9(u).concat(l))}))})},Io=function(t){return v9(t.length,t)},Vc=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},y9=Io(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),b9=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return g9;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))}},Hc=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},lg=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 x9(e){var t;return e===0?t=1:t=Math.floor(new Me(e).abs().log(10).toNumber())+1,t}function w9(e,t,r){for(var n=new Me(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var O9=Io(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),S9=Io(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),A9=Io(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Do={rangeStep:w9,getDigitCount:x9,interpolateNumber:O9,uninterpolateNumber:S9,uninterpolateTruncation:A9};function Gc(e){return P9(e)||j9(e)||cg(e)||T9()}function T9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
224
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j9(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function P9(e){if(Array.isArray(e))return qc(e)}function Wa(e,t){return E9(e)||C9(e,t)||cg(e,t)||_9()}function _9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
225
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cg(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 C9(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 E9(e){if(Array.isArray(e))return e}function ug(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 fg(e,t,r){if(e.lte(0))return new Me(0);var n=Do.getDigitCount(e.toNumber()),a=new Me(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Me(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Me(Math.ceil(l))}function $9(e,t,r){var n=1,a=new Me(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Me(10).pow(Do.getDigitCount(e)-1),a=new Me(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Me(Math.floor(e)))}else e===0?a=new Me(Math.floor((t-1)/2)):r||(a=new Me(Math.floor(e)));var o=Math.floor((t-1)/2),s=b9(y9(function(l){return a.add(new Me(l-o).mul(n)).toNumber()}),Vc);return s(0,t)}function dg(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 Me(0),tickMin:new Me(0),tickMax:new Me(0)};var i=fg(new Me(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Me(0):(o=new Me(e).add(t).div(2),o=o.sub(new Me(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Me(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?dg(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 Me(s).mul(i)),tickMax:o.add(new Me(l).mul(i))})}function M9(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=ug([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(Gc(Vc(0,a-1).map(function(){return 1/0}))):[].concat(Gc(Vc(0,a-1).map(function(){return-1/0})),[u]);return r>n?Hc(f):f}if(c===u)return $9(c,a,i);var d=dg(c,u,o,i),h=d.step,v=d.tickMin,g=d.tickMax,m=Do.rangeStep(v,g.add(new Me(.1).mul(h)),h);return r>n?Hc(m):m}function k9(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=ug([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=fg(new Me(c).sub(l).div(u-1),i,0),d=[].concat(Gc(Do.rangeStep(new Me(l),new Me(c).sub(new Me(.99).mul(f)),f)),[c]);return n>a?Hc(d):d}var N9=lg(M9),I9=lg(k9),D9=process.env.NODE_ENV==="production",Kc="Invariant failed";function ht(e,t){if(D9)throw new Error(Kc);var r=typeof t=="function"?t():t,n=r?"".concat(Kc,": ").concat(r):Kc;throw new Error(n)}var L9=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function $n(e){"@babel/helpers - typeof";return $n=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},$n(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 R9(e,t){return W9(e)||U9(e,t)||F9(e,t)||B9()}function B9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
226
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function F9(e,t){if(e){if(typeof e=="string")return pg(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 pg(e,t)}}function pg(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 U9(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 W9(e){if(Array.isArray(e))return e}function z9(e,t){if(e==null)return{};var r=V9(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 V9(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 H9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G9(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 q9(e,t,r){return t&&G9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function K9(e,t,r){return t=Ro(t),Y9(e,hg()?Reflect.construct(t,r||[],Ro(e).constructor):t.apply(e,r))}function Y9(e,t){if(t&&($n(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X9(e)}function X9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hg=function(){return!!e})()}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ro(e)}function Z9(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 mg(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=J9(e,"string");return $n(t)=="symbol"?t:t+""}function J9(e,t){if($n(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($n(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mn=function(e){function t(){return H9(this,t),K9(this,t,arguments)}return Z9(t,e),q9(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=z9(n,L9),h=he(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,S=m.y,x=m.value,T=m.errorVal;if(!T)return null;var y=[],w,A;if(Array.isArray(T)){var j=R9(T,2);w=j[0],A=j[1]}else w=A=T;if(i==="vertical"){var $=u.scale,U=S+a,P=U+o,_=U-o,R=$(x-w),F=$(x+A);y.push({x1:F,y1:P,x2:F,y2:_}),y.push({x1:R,y1:U,x2:F,y2:U}),y.push({x1:R,y1:P,x2:R,y2:_})}else if(i==="horizontal"){var z=f.scale,C=b+a,D=C-o,H=C+o,V=z(x-w),E=z(x+A);y.push({x1:D,y1:E,x2:H,y2:E}),y.push({x1:C,y1:V,x2:C,y2:E}),y.push({x1:D,y1:V,x2:H,y2:V})}return O.createElement(Oe,Lo({className:"recharts-errorBar",key:"bar-".concat(y.map(function(N){return"".concat(N.x1,"-").concat(N.x2,"-").concat(N.y1,"-").concat(N.y2)}))},h),y.map(function(N){return O.createElement("line",Lo({},N,{key:"line-".concat(N.x1,"-").concat(N.x2,"-").concat(N.y1,"-").concat(N.y2)}))}))});return O.createElement(Oe,{className:"recharts-errorBars"},v)}}])}(O.Component);mg(Mn,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),mg(Mn,"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 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 Hr(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){Q9(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 Q9(e,t,r){return t=e$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e$(e){var t=t$(e,"string");return za(t)=="symbol"?t:t+""}function t$(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 yg=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=gt(r,yn);if(!o)return null;var s=yn.defaultProps,l=s!==void 0?Hr(Hr({},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?Hr(Hr({},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}}),Hr(Hr(Hr({},l),yn.getWithHeight(o,a)),{},{payload:c,item:o})};function Va(e){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}function bg(e){return i$(e)||a$(e)||n$(e)||r$()}function r$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
227
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n$(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 a$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i$(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 xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(r),!0).forEach(function(n){kn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kn(e,t,r){return t=o$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o$(e){var t=s$(e,"string");return Va(t)=="symbol"?t:t+""}function s$(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 pe(e)||pe(t)?r:Xe(t)?Ot(e,t,r):me(t)?t(e):r}function Ha(e,t,r,n){var a=a9(e,function(s){return Je(s,t)});if(r==="number"){var i=a.filter(function(s){return re(s)||parseFloat(s)});return i.length?[ko(i),wr(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!pe(s)}):a;return o.map(function(s){return Xe(s)||s instanceof Date?s:""})}var l$=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 v=[];if(kt(d-f)===kt(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 S=Math.min(u,d),x=Math.max(u,d);if(t>(S+f)/2&&t<=(x+f)/2){o=a[c].index;break}}}else for(var T=0;T<s;T++)if(T===0&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T>0&&T<s-1&&t>(n[T].coordinate+n[T-1].coordinate)/2&&t<=(n[T].coordinate+n[T+1].coordinate)/2||T===s-1&&t>(n[T].coordinate+n[T-1].coordinate)/2){o=n[T].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?ze(ze({},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},c$=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(A){return er(A.type).indexOf("Bar")>=0});if(b&&b.length){var S=b[0].type.defaultProps,x=S!==void 0?ze(ze({},S),b[0].props):b[0].props,T=x.barSize,y=x[m];o[y]||(o[y]=[]);var w=pe(T)?r:T;o[y].push({item:b[0],stackList:b.slice(1),barSize:pe(w)?void 0:kr(w,n,0)})}}return o},u$=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=kr(r,a,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,v=o.reduce(function(T,y){return T+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(T,y){var w={item:y.item,position:{offset:m.offset+m.size+c,size:d?h:y.barSize}},A=[].concat(bg(T),[w]);return m=A[A.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(j){A.push({item:j,position:m})}),A},f)}else{var b=kr(n,a,0,!0);a-2*b-(l-1)*c<=0&&(c=0);var S=(a-2*b-(l-1)*c)/l;S>1&&(S>>=0);var x=s===+s?Math.min(S,s):S;u=o.reduce(function(T,y,w){var A=[].concat(bg(T),[{item:y.item,position:{offset:b+(S+c)*w+(S-x)/2,size:x}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(j){A.push({item:j,position:A[A.length-1].position})}),A},f)}return u},f$=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=yg({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"&&re(t[h]))return ze(ze({},t),{},kn({},h,t[h]+(f||0)));if((g==="horizontal"||g==="vertical"&&h==="center")&&v!=="middle"&&re(t[v]))return ze(ze({},t),{},kn({},v,t[v]+(d||0)))}return t},d$=function(t,r,n){return pe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},wg=function(t,r,n,a,i){var o=r.props.children,s=dt(o,Mn).filter(function(c){return d$(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(pe(f))return c;var d=Array.isArray(f)?[ko(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),S=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(b,v[0]),Math.max(S,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},p$=function(t,r,n,a,i){var o=r.map(function(s){return wg(t,s,n,i,a)}).filter(function(s){return!pe(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},Og=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&wg(t,l,c,a)||Ha(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},[])},Sg=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Ag=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},ur=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,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!un(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},h$=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:Ca(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Ao(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ea(),realScaleType:"point"}:i==="category"?{scale:Ca(),realScaleType:"band"}:{scale:Ao(),realScaleType:"linear"};if(Er(a)){var l="scale".concat(Fi(a));return{scale:(Xm[l]||Ea)(),realScaleType:Xm[l]?l:"point"}}return me(a)?{scale:a}:{scale:Ea(),realScaleType:"point"}},Tg=1e-4,m$=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])-Tg,o=Math.max(a[0],a[1])+Tg,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},g$=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},v$=function(t,r){if(!r||r.length!==2||!re(r[0])||!re(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(!re(t[0])||t[0]<n)&&(i[0]=n),(!re(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},y$=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=un(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},b$=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=un(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},x$={sign:y$,expand:IS,none:dn,silhouette:DS,wiggle:LS,positive:b$},w$=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=x$[n],o=NS().keys(a).value(function(s,l){return+Je(s,l,0)}).order(Tl).offset(i);return o(t)},O$=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?ze(ze({},d.type.defaultProps),d.props):d.props,g=v.stackId,m=v.hide;if(m)return f;var b=v[n],S=f[b]||{hasStack:!1,stackGroups:{}};if(Xe(g)){var x=S.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(d),S.hasStack=!0,S.stackGroups[g]=x}else S.stackGroups[Mr("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return ze(ze({},f),{},kn({},b,S))},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 ze(ze({},g),{},kn({},m,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:w$(t,b.items,i)}))},v)}return ze(ze({},f),{},kn({},d,h))},u)},S$=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=N9(c,i,s);return t.domain([ko(u),wr(u)]),{niceTicks:u}}if(i&&a==="number"){var f=t.domain(),d=I9(f,i,s);return{niceTicks:d}}return null};function Nn(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&&!pe(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,pe(o)?t.dataKey:o);return pe(l)?null:t.scale(l)}var jg=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 pe(l)?null:r.scale(l)-i/2+a},A$=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]},T$=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ze(ze({},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},j$=function(t){return t.reduce(function(r,n){return[ko(n.concat([r[0]]).filter(re)),wr(n.concat([r[1]]).filter(re))]},[1/0,-1/0])},Pg=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=j$(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})},_g=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Cg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Qc=function(t,r,n){if(me(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(re(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(_g.test(t[0])){var i=+_g.exec(t[0])[1];a[0]=r[0]-i}else me(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(re(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Cg.test(t[1])){var o=+Cg.exec(t[1])[1];a[1]=r[1]+o}else me(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Fo=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Gl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var c=i[s],u=i[s-1];o=Math.min((c.coordinate||0)-(u.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Eg=function(t,r,n){return!t||!t.length||Ur(t,Ot(n,"type.defaultProps.domain"))?r:t},$g=function(t,r){var n=t.type.defaultProps?ze(ze({},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 ze(ze({},he(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 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)}function Mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mg(Object(r),!0).forEach(function(n){P$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P$(e,t,r){return t=_$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _$(e){var t=C$(e,"string");return Ga(t)=="symbol"?t:t+""}function C$(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)}var Uo=Math.PI/180,E$=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}},$$=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))},M$=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=$$({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:E$(c),angleInRadian:c}},k$=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}},N$=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},Ng=function(t,r){var n=t.x,a=t.y,i=M$({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=k$(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?kg(kg({},r),{},{radius:o,angle:N$(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 I$=["offset"];function D$(e){return F$(e)||B$(e)||R$(e)||L$()}function L$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
228
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R$(e,t){if(e){if(typeof e=="string")return 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 B$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F$(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 U$(e,t){if(e==null)return{};var r=W$(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 W$(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 Ig(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?Ig(Object(r),!0).forEach(function(n){z$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z$(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=H$(e,"string");return qa(t)=="symbol"?t:t+""}function H$(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 G$=function(t){var r=t.value,n=t.formatter,a=pe(t.children)?r:t.children;return me(n)?n(a):a},q$=function(t,r){var n=kt(r-t),a=Math.min(Math.abs(r-t),360);return n*a},K$=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=q$(h,v),S=b>=0?1:-1,x,T;a==="insideStart"?(x=h+S*o,T=g):a==="insideEnd"?(x=v-S*o,T=!g):a==="end"&&(x=v+S*o,T=g),T=b<=0?T:!T;var y=nt(c,u,m,x),w=nt(c,u,m,x+(T?1:-1)*359),A="M".concat(y.x,",").concat(y.y,`
229
+ A`).concat(m,",").concat(m,",0,1,").concat(T?0:1,`,
230
+ `).concat(w.x,",").concat(w.y),j=pe(t.id)?Mr("recharts-radial-line-"):t.id;return O.createElement("text",Ka({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",s)}),O.createElement("defs",null,O.createElement("path",{id:j,d:A})),O.createElement("textPath",{xlinkHref:"#".concat(j)},r))},Y$=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),S=b.x,x=b.y;return{x:S,y:x,textAnchor:"middle",verticalAnchor:"middle"}},X$=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",S=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 T={x:s+c/2,y:l+u+d,textAnchor:"middle",verticalAnchor:v};return Qe(Qe({},T),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:S,verticalAnchor:"middle"};return Qe(Qe({},w),n?{width:Math.max(n.x+n.width-w.x,0),height:u}:{})}var A=n?{width:c,height:u}:{};return i==="insideLeft"?Qe({x:s+m,y:l+u/2,textAnchor:S,verticalAnchor:"middle"},A):i==="insideRight"?Qe({x:s+c-m,y:l+u/2,textAnchor:b,verticalAnchor:"middle"},A):i==="insideTop"?Qe({x:s+c/2,y:l+d,textAnchor:"middle",verticalAnchor:v},A):i==="insideBottom"?Qe({x:s+c/2,y:l+u-d,textAnchor:"middle",verticalAnchor:h},A):i==="insideTopLeft"?Qe({x:s+m,y:l+d,textAnchor:S,verticalAnchor:v},A):i==="insideTopRight"?Qe({x:s+c-m,y:l+d,textAnchor:b,verticalAnchor:v},A):i==="insideBottomLeft"?Qe({x:s+m,y:l+u-d,textAnchor:S,verticalAnchor:h},A):i==="insideBottomRight"?Qe({x:s+c-m,y:l+u-d,textAnchor:b,verticalAnchor:h},A):on(i)&&(re(i.x)||$r(i.x))&&(re(i.y)||$r(i.y))?Qe({x:s+kr(i.x,c),y:l+kr(i.y,u),textAnchor:"end",verticalAnchor:"end"},A):Qe({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},A)},Z$=function(t){return"cx"in t&&re(t.cx)};function it(e){var t=e.offset,r=t===void 0?5:t,n=U$(e,I$),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||pe(s)&&pe(l)&&!O.isValidElement(c)&&!me(c))return null;if(O.isValidElement(c))return O.cloneElement(c,a);var h;if(me(c)){if(h=O.createElement(c,a),O.isValidElement(h))return h}else h=G$(a);var v=Z$(i),g=he(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return K$(a,h,g);var m=v?Y$(a):X$(a);return O.createElement(po,Ka({className:ve("recharts-label",f)},g,m,{breakAll:d}),h)}it.displayName="Label";var Dg=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,S=t.labelViewBox;if(S)return S;if(re(g)&&re(m)){if(re(f)&&re(d))return{x:f,y:d,width:g,height:m};if(re(h)&&re(v))return{x:h,y:v,width:g,height:m}}return re(f)&&re(d)?{x:f,y:d,width:0,height:0}:re(r)&&re(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:{}},J$=function(t,r){return t?t===!0?O.createElement(it,{key:"label-implicit",viewBox:r}):Xe(t)?O.createElement(it,{key:"label-implicit",viewBox:r,value:t}):O.isValidElement(t)?t.type===it?O.cloneElement(t,{key:"label-implicit",viewBox:r}):O.createElement(it,{key:"label-implicit",content:t,viewBox:r}):me(t)?O.createElement(it,{key:"label-implicit",content:t,viewBox:r}):on(t)?O.createElement(it,Ka({viewBox:r},t,{key:"label-implicit"})):null:null},Q$=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=Dg(t),o=dt(a,it).map(function(l,c){return O.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=J$(t.label,r||i);return[s].concat(D$(o))};it.parseViewBox=Dg,it.renderCallByParent=Q$;function eM(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var tM=eM;const rM=De(tM);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 nM=["valueAccessor"],aM=["data","dataKey","clockWise","id","textBreakAll"];function iM(e){return cM(e)||lM(e)||sM(e)||oM()}function oM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
231
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sM(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 lM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cM(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 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){uM(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 uM(e,t,r){return t=fM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fM(e){var t=dM(e,"string");return Ya(t)=="symbol"?t:t+""}function dM(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 Bg(e,t){if(e==null)return{};var r=pM(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 pM(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 hM=function(t){return Array.isArray(t.value)?rM(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?hM:t,n=Bg(e,nM),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Bg(n,aM);return!a||!a.length?null:O.createElement(Oe,{className:"recharts-label-list"},a.map(function(u,f){var d=pe(i)?r(u,f):Je(u&&u.payload,i),h=pe(s)?{}:{id:"".concat(s,"-").concat(f)};return O.createElement(it,Wo({},he(u,!0),c,h,{parentViewBox:u.parentViewBox,value:d,textBreakAll:l,viewBox:it.parseViewBox(pe(o)?u:Rg(Rg({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function mM(e,t){return e?e===!0?O.createElement(Gt,{key:"labelList-implicit",data:t}):O.isValidElement(e)||me(e)?O.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):on(e)?O.createElement(Gt,Wo({data:t},e,{key:"labelList-implicit"})):null:null}function gM(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 O.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=mM(e.label,t);return[i].concat(iM(a))}Gt.renderCallByParent=gM;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 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 Ug(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){vM(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 vM(e,t,r){return t=yM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yM(e){var t=bM(e,"string");return Xa(t)=="symbol"?t:t+""}function bM(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 xM=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),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}},Wg=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=xM(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,`
227
232
  A `).concat(i,",").concat(i,`,0,
228
233
  `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
229
234
  `).concat(f.x,",").concat(f.y,`
230
- `);if(a>0){var m=nt(r,n,a,o),v=nt(r,n,a,c);d+="L ".concat(v.x,",").concat(v.y,`
235
+ `);if(a>0){var h=nt(r,n,a,o),v=nt(r,n,a,c);d+="L ".concat(v.x,",").concat(v.y,`
231
236
  A `).concat(a,",").concat(a,`,0,
232
237
  `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
233
- `).concat(m.x,",").concat(m.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},x6=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=Nt(u-c),d=zo({cx:r,cy:n,radius:i,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),m=d.circleTangency,v=d.lineTangency,g=d.theta,h=zo({cx:r,cy:n,radius:i,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:l}),b=h.circleTangency,S=h.lineTangency,x=h.theta,T=l?Math.abs(c-u):Math.abs(c-u)-g-x;if(T<0)return s?"M ".concat(v.x,",").concat(v.y,`
238
+ `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},wM=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,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,S=m.lineTangency,x=m.theta,T=l?Math.abs(c-u):Math.abs(c-u)-g-x;if(T<0)return s?"M ".concat(v.x,",").concat(v.y,`
234
239
  a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
235
240
  a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
236
241
  `):Wg({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:u});var y="M ".concat(v.x,",").concat(v.y,`
237
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,`
242
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
238
243
  A`).concat(i,",").concat(i,",0,").concat(+(T>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
239
244
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(S.x,",").concat(S.y,`
240
- `);if(a>0){var w=zo({cx:r,cy:n,radius:a,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=w.circleTangency,P=w.lineTangency,$=w.theta,R=zo({cx:r,cy:n,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=R.circleTangency,C=R.lineTangency,F=R.theta,B=l?Math.abs(c-u):Math.abs(c-u)-$-F;if(B<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(C.x,",").concat(C.y,`
241
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(j.x,",").concat(j.y,`
242
- A`).concat(a,",").concat(a,",0,").concat(+(B>180),",").concat(+(f>0),",").concat(A.x,",").concat(A.y,`
243
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},w6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},zg=function(t){var r=Ug(Ug({},w6),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 m=ve("recharts-sector",d),v=o-i,g=Nr(s,v,0,!0),h;return g>0&&Math.abs(u-f)<360?h=x6({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):h=Wg({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),O.createElement("path",ru({},he(r,!0),{className:m,d:h,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 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 Gg(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){O6(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 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=A6(e,"string");return Za(t)=="symbol"?t:t+""}function A6(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 Hg={curveBasisClosed:OS,curveBasisOpen:SS,curveBasis:wS,curveBumpX:sS,curveBumpY:lS,curveLinearClosed:AS,curveLinear:Vi,curveMonotoneX:TS,curveMonotoneY:jS,curveNatural:PS,curveStep:_S,curveStepAfter:CS,curveStepBefore:ES},Vo=function(t){return t.x===+t.x&&t.y===+t.y},Ja=function(t){return t.x},Qa=function(t){return t.y},T6=function(t,r){if(me(t))return t;var n="curve".concat(Fi(t));return(n==="curveMonotone"||n==="curveBump")&&r?Hg["".concat(n).concat(r==="vertical"?"Y":"X")]:Hg[n]||Vi},j6=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=T6(n,s),f=c?i.filter(function(g){return Vo(g)}):i,d;if(Array.isArray(o)){var m=c?o.filter(function(g){return Vo(g)}):o,v=f.map(function(g,h){return Gg(Gg({},g),{},{base:m[h]})});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"&&re(o)?d=Gi().y(Qa).x1(Ja).x0(o):re(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?j6(t):a;return wt.createElement("path",nu({},he(t,!1),Bi(t),{className:ve("recharts-curve",r),d:o,ref:i}))},au={exports:{}},Go={exports:{}},je={};/** @license React v16.13.1
245
+ `);if(a>0){var w=zo({cx:r,cy:n,radius:a,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=w.circleTangency,j=w.lineTangency,$=w.theta,U=zo({cx:r,cy:n,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=U.circleTangency,_=U.lineTangency,R=U.theta,F=l?Math.abs(c-u):Math.abs(c-u)-$-R;if(F<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(_.x,",").concat(_.y,`
246
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,`
247
+ A`).concat(a,",").concat(a,",0,").concat(+(F>180),",").concat(+(f>0),",").concat(A.x,",").concat(A.y,`
248
+ 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},OM={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},zg=function(t){var r=Ug(Ug({},OM),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=kr(s,v,0,!0),m;return g>0&&Math.abs(u-f)<360?m=wM({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):m=Wg({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),O.createElement("path",ru({},he(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 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 Hg(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){SM(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 SM(e,t,r){return t=AM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AM(e){var t=TM(e,"string");return Za(t)=="symbol"?t:t+""}function TM(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 Gg={curveBasisClosed:SS,curveBasisOpen:AS,curveBasis:OS,curveBumpX:lS,curveBumpY:cS,curveLinearClosed:TS,curveLinear:Vi,curveMonotoneX:jS,curveMonotoneY:PS,curveNatural:_S,curveStep:CS,curveStepAfter:$S,curveStepBefore:ES},Vo=function(t){return t.x===+t.x&&t.y===+t.y},Ja=function(t){return t.x},Qa=function(t){return t.y},jM=function(t,r){if(me(t))return t;var n="curve".concat(Fi(t));return(n==="curveMonotone"||n==="curveBump")&&r?Gg["".concat(n).concat(r==="vertical"?"Y":"X")]:Gg[n]||Vi},PM=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=jM(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 Hg(Hg({},g),{},{base:h[m]})});return s==="vertical"?d=Hi().y(Qa).x1(Ja).x0(function(g){return g.base.x}):d=Hi().x(Ja).y1(Qa).y0(function(g){return g.base.y}),d.defined(Vo).curve(u),d(v)}return s==="vertical"&&re(o)?d=Hi().y(Qa).x1(Ja).x0(o):re(o)?d=Hi().x(Ja).y1(Qa).y0(o):d=$d().x(Ja).y(Qa),d.defined(Vo).curve(u),d(f)},Gr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?PM(t):a;return wt.createElement("path",nu({},he(t,!1),Bi(t),{className:ve("recharts-curve",r),d:o,ref:i}))},au={exports:{}},Ho={exports:{}},je={};/** @license React v16.13.1
244
249
  * react-is.production.min.js
245
250
  *
246
251
  * Copyright (c) Facebook, Inc. and its affiliates.
247
252
  *
248
253
  * This source code is licensed under the MIT license found in the
249
254
  * LICENSE file in the root directory of this source tree.
250
- */var qg;function P6(){if(qg)return je;qg=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,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=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 m:case o:return y;default:return w}}case r:return w}}}function T(y){return x(y)===c}return je.AsyncMode=l,je.ConcurrentMode=c,je.ContextConsumer=s,je.ContextProvider=o,je.Element=t,je.ForwardRef=u,je.Fragment=n,je.Lazy=v,je.Memo=m,je.Portal=r,je.Profiler=i,je.StrictMode=a,je.Suspense=f,je.isAsyncMode=function(y){return T(y)||x(y)===l},je.isConcurrentMode=T,je.isContextConsumer=function(y){return x(y)===s},je.isContextProvider=function(y){return x(y)===o},je.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},je.isForwardRef=function(y){return x(y)===u},je.isFragment=function(y){return x(y)===n},je.isLazy=function(y){return x(y)===v},je.isMemo=function(y){return x(y)===m},je.isPortal=function(y){return x(y)===r},je.isProfiler=function(y){return x(y)===i},je.isStrictMode=function(y){return x(y)===a},je.isSuspense=function(y){return x(y)===f},je.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===m||y.$$typeof===o||y.$$typeof===s||y.$$typeof===u||y.$$typeof===h||y.$$typeof===b||y.$$typeof===S||y.$$typeof===g)},je.typeOf=x,je}var Pe={};/** @license React v16.13.1
255
+ */var qg;function _M(){if(qg)return je;qg=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,S=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 T(y){return x(y)===c}return je.AsyncMode=l,je.ConcurrentMode=c,je.ContextConsumer=s,je.ContextProvider=o,je.Element=t,je.ForwardRef=u,je.Fragment=n,je.Lazy=v,je.Memo=h,je.Portal=r,je.Profiler=i,je.StrictMode=a,je.Suspense=f,je.isAsyncMode=function(y){return T(y)||x(y)===l},je.isConcurrentMode=T,je.isContextConsumer=function(y){return x(y)===s},je.isContextProvider=function(y){return x(y)===o},je.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},je.isForwardRef=function(y){return x(y)===u},je.isFragment=function(y){return x(y)===n},je.isLazy=function(y){return x(y)===v},je.isMemo=function(y){return x(y)===h},je.isPortal=function(y){return x(y)===r},je.isProfiler=function(y){return x(y)===i},je.isStrictMode=function(y){return x(y)===a},je.isSuspense=function(y){return x(y)===f},je.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===S||y.$$typeof===g)},je.typeOf=x,je}var Pe={};/** @license React v16.13.1
251
256
  * react-is.development.js
252
257
  *
253
258
  * Copyright (c) Facebook, Inc. and its affiliates.
254
259
  *
255
260
  * This source code is licensed under the MIT license found in the
256
261
  * LICENSE file in the root directory of this source tree.
257
- */var Kg;function _6(){return Kg||(Kg=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,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function x(k){return typeof k=="string"||typeof k=="function"||k===n||k===c||k===i||k===a||k===f||k===d||typeof k=="object"&&k!==null&&(k.$$typeof===v||k.$$typeof===m||k.$$typeof===o||k.$$typeof===s||k.$$typeof===u||k.$$typeof===h||k.$$typeof===b||k.$$typeof===S||k.$$typeof===g)}function T(k){if(typeof k=="object"&&k!==null){var Q=k.$$typeof;switch(Q){case t:var X=k.type;switch(X){case l:case c:case n:case i:case a:case f:return X;default:var se=X&&X.$$typeof;switch(se){case s:case u:case v:case m:case o:return se;default:return Q}}case r:return Q}}}var y=l,w=c,A=s,P=o,$=t,R=u,j=n,C=v,F=m,B=r,z=i,_=a,L=f,V=!1;function G(k){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E(k)||T(k)===l}function E(k){return T(k)===c}function M(k){return T(k)===s}function W(k){return T(k)===o}function K(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function D(k){return T(k)===u}function H(k){return T(k)===n}function Y(k){return T(k)===v}function te(k){return T(k)===m}function I(k){return T(k)===r}function U(k){return T(k)===i}function q(k){return T(k)===a}function J(k){return T(k)===f}Pe.AsyncMode=y,Pe.ConcurrentMode=w,Pe.ContextConsumer=A,Pe.ContextProvider=P,Pe.Element=$,Pe.ForwardRef=R,Pe.Fragment=j,Pe.Lazy=C,Pe.Memo=F,Pe.Portal=B,Pe.Profiler=z,Pe.StrictMode=_,Pe.Suspense=L,Pe.isAsyncMode=G,Pe.isConcurrentMode=E,Pe.isContextConsumer=M,Pe.isContextProvider=W,Pe.isElement=K,Pe.isForwardRef=D,Pe.isFragment=H,Pe.isLazy=Y,Pe.isMemo=te,Pe.isPortal=I,Pe.isProfiler=U,Pe.isStrictMode=q,Pe.isSuspense=J,Pe.isValidElementType=x,Pe.typeOf=T}()),Pe}var Yg;function Xg(){return Yg||(Yg=1,process.env.NODE_ENV==="production"?Go.exports=P6():Go.exports=_6()),Go.exports}/*
262
+ */var Kg;function CM(){return Kg||(Kg=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,S=e?Symbol.for("react.scope"):60119;function x(M){return typeof M=="string"||typeof M=="function"||M===n||M===c||M===i||M===a||M===f||M===d||typeof M=="object"&&M!==null&&(M.$$typeof===v||M.$$typeof===h||M.$$typeof===o||M.$$typeof===s||M.$$typeof===u||M.$$typeof===m||M.$$typeof===b||M.$$typeof===S||M.$$typeof===g)}function T(M){if(typeof M=="object"&&M!==null){var ee=M.$$typeof;switch(ee){case t:var K=M.type;switch(K){case l:case c:case n:case i:case a:case f:return K;default:var oe=K&&K.$$typeof;switch(oe){case s:case u:case v:case h:case o:return oe;default:return ee}}case r:return ee}}}var y=l,w=c,A=s,j=o,$=t,U=u,P=n,_=v,R=h,F=r,z=i,C=a,D=f,H=!1;function V(M){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.")),E(M)||T(M)===l}function E(M){return T(M)===c}function N(M){return T(M)===s}function W(M){return T(M)===o}function q(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function J(M){return T(M)===u}function L(M){return T(M)===n}function G(M){return T(M)===v}function Q(M){return T(M)===h}function I(M){return T(M)===r}function B(M){return T(M)===i}function Y(M){return T(M)===a}function Z(M){return T(M)===f}Pe.AsyncMode=y,Pe.ConcurrentMode=w,Pe.ContextConsumer=A,Pe.ContextProvider=j,Pe.Element=$,Pe.ForwardRef=U,Pe.Fragment=P,Pe.Lazy=_,Pe.Memo=R,Pe.Portal=F,Pe.Profiler=z,Pe.StrictMode=C,Pe.Suspense=D,Pe.isAsyncMode=V,Pe.isConcurrentMode=E,Pe.isContextConsumer=N,Pe.isContextProvider=W,Pe.isElement=q,Pe.isForwardRef=J,Pe.isFragment=L,Pe.isLazy=G,Pe.isMemo=Q,Pe.isPortal=I,Pe.isProfiler=B,Pe.isStrictMode=Y,Pe.isSuspense=Z,Pe.isValidElementType=x,Pe.typeOf=T}()),Pe}var Yg;function Xg(){return Yg||(Yg=1,process.env.NODE_ENV==="production"?Ho.exports=_M():Ho.exports=CM()),Ho.exports}/*
258
263
  object-assign
259
264
  (c) Sindre Sorhus
260
265
  @license MIT
261
- */var iu,Zg;function E6(){if(Zg)return iu;Zg=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,Jg;function su(){if(Jg)return ou;Jg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ou=e,ou}var lu,Qg;function ev(){return Qg||(Qg=1,lu=Function.call.bind(Object.prototype.hasOwnProperty)),lu}var cu,tv;function C6(){if(tv)return cu;tv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=su(),r={},n=ev();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 m=c?c():"";e("Failed "+s+" type: "+f.message+(m??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},cu=a,cu}var uu,rv;function $6(){if(rv)return uu;rv=1;var e=Xg(),t=E6(),r=su(),n=ev(),a=C6(),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(E){var M=E&&(c&&E[c]||E[u]);if(typeof M=="function")return M}var d="<<anonymous>>",m={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:S(),arrayOf:x,element:T(),elementType:y(),instanceOf:w,node:R(),objectOf:P,oneOf:A,oneOfType:$,shape:C,exact:F};function v(E,M){return E===M?E!==0||1/E===1/M:E!==E&&M!==M}function g(E,M){this.message=E,this.data=M&&typeof M=="object"?M:{},this.stack=""}g.prototype=Error.prototype;function h(E){if(process.env.NODE_ENV!=="production")var M={},W=0;function K(H,Y,te,I,U,q,J){if(I=I||d,q=q||te,J!==r){if(l){var k=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 k.name="Invariant Violation",k}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Q=I+":"+te;!M[Q]&&W<3&&(i("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+I+"`. 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."),M[Q]=!0,W++)}}return Y[te]==null?H?Y[te]===null?new g("The "+U+" `"+q+"` is marked as required "+("in `"+I+"`, but its value is `null`.")):new g("The "+U+" `"+q+"` is marked as required in "+("`"+I+"`, but its value is `undefined`.")):null:E(Y,te,I,U,q)}var D=K.bind(null,!1);return D.isRequired=K.bind(null,!0),D}function b(E){function M(W,K,D,H,Y,te){var I=W[K],U=_(I);if(U!==E){var q=L(I);return new g("Invalid "+H+" `"+Y+"` of type "+("`"+q+"` supplied to `"+D+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return h(M)}function S(){return h(o)}function x(E){function M(W,K,D,H,Y){if(typeof E!="function")return new g("Property `"+Y+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var te=W[K];if(!Array.isArray(te)){var I=_(te);return new g("Invalid "+H+" `"+Y+"` of type "+("`"+I+"` supplied to `"+D+"`, expected an array."))}for(var U=0;U<te.length;U++){var q=E(te,U,D,H,Y+"["+U+"]",r);if(q instanceof Error)return q}return null}return h(M)}function T(){function E(M,W,K,D,H){var Y=M[W];if(!s(Y)){var te=_(Y);return new g("Invalid "+D+" `"+H+"` of type "+("`"+te+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return h(E)}function y(){function E(M,W,K,D,H){var Y=M[W];if(!e.isValidElementType(Y)){var te=_(Y);return new g("Invalid "+D+" `"+H+"` of type "+("`"+te+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return h(E)}function w(E){function M(W,K,D,H,Y){if(!(W[K]instanceof E)){var te=E.name||d,I=G(W[K]);return new g("Invalid "+H+" `"+Y+"` of type "+("`"+I+"` supplied to `"+D+"`, expected ")+("instance of `"+te+"`."))}return null}return h(M)}function A(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function M(W,K,D,H,Y){for(var te=W[K],I=0;I<E.length;I++)if(v(te,E[I]))return null;var U=JSON.stringify(E,function(J,k){var Q=L(k);return Q==="symbol"?String(k):k});return new g("Invalid "+H+" `"+Y+"` of value `"+String(te)+"` "+("supplied to `"+D+"`, expected one of "+U+"."))}return h(M)}function P(E){function M(W,K,D,H,Y){if(typeof E!="function")return new g("Property `"+Y+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var te=W[K],I=_(te);if(I!=="object")return new g("Invalid "+H+" `"+Y+"` of type "+("`"+I+"` supplied to `"+D+"`, expected an object."));for(var U in te)if(n(te,U)){var q=E(te,U,D,H,Y+"."+U,r);if(q instanceof Error)return q}return null}return h(M)}function $(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var M=0;M<E.length;M++){var W=E[M];if(typeof W!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(W)+" at index "+M+"."),o}function K(D,H,Y,te,I){for(var U=[],q=0;q<E.length;q++){var J=E[q],k=J(D,H,Y,te,I,r);if(k==null)return null;k.data&&n(k.data,"expectedType")&&U.push(k.data.expectedType)}var Q=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new g("Invalid "+te+" `"+I+"` supplied to "+("`"+Y+"`"+Q+"."))}return h(K)}function R(){function E(M,W,K,D,H){return B(M[W])?null:new g("Invalid "+D+" `"+H+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return h(E)}function j(E,M,W,K,D){return new g((E||"React class")+": "+M+" type `"+W+"."+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function C(E){function M(W,K,D,H,Y){var te=W[K],I=_(te);if(I!=="object")return new g("Invalid "+H+" `"+Y+"` of type `"+I+"` "+("supplied to `"+D+"`, expected `object`."));for(var U in E){var q=E[U];if(typeof q!="function")return j(D,H,Y,U,L(q));var J=q(te,U,D,H,Y+"."+U,r);if(J)return J}return null}return h(M)}function F(E){function M(W,K,D,H,Y){var te=W[K],I=_(te);if(I!=="object")return new g("Invalid "+H+" `"+Y+"` of type `"+I+"` "+("supplied to `"+D+"`, expected `object`."));var U=t({},W[K],E);for(var q in U){var J=E[q];if(n(E,q)&&typeof J!="function")return j(D,H,Y,q,L(J));if(!J)return new g("Invalid "+H+" `"+Y+"` key `"+q+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(W[K],null," ")+`
262
- Valid keys: `+JSON.stringify(Object.keys(E),null," "));var k=J(te,q,D,H,Y+"."+q,r);if(k)return k}return null}return h(M)}function B(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(B);if(E===null||s(E))return!0;var M=f(E);if(M){var W=M.call(E),K;if(M!==E.entries){for(;!(K=W.next()).done;)if(!B(K.value))return!1}else for(;!(K=W.next()).done;){var D=K.value;if(D&&!B(D[1]))return!1}}else return!1;return!0;default:return!1}}function z(E,M){return E==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function _(E){var M=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":z(M,E)?"symbol":M}function L(E){if(typeof E>"u"||E===null)return""+E;var M=_(E);if(M==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return M}function V(E){var M=L(E);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function G(E){return!E.constructor||!E.constructor.name?d:E.constructor.name}return m.checkPropTypes=a,m.resetWarningCache=a.resetWarningCache,m.PropTypes=m,m},uu}var fu,nv;function k6(){if(nv)return fu;nv=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 N6=Xg(),M6=!0;au.exports=$6()(N6.isElement,M6)}else au.exports=k6()();var D6=au.exports;const _e=De(D6);var I6=Object.getOwnPropertyNames,L6=Object.getOwnPropertySymbols,R6=Object.prototype.hasOwnProperty;function av(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 iv(e){return I6(e).concat(L6(e))}var B6=Object.hasOwn||function(e,t){return R6.call(e,t)};function qr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var F6="__v",U6="__o",W6="_owner",ov=Object.getOwnPropertyDescriptor,sv=Object.keys;function z6(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 V6(e,t){return qr(e.getTime(),t.getTime())}function G6(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function H6(e,t){return e===t}function lv(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,m=s.value;if(r.equals(d[0],m[0],l,f,e,t,r)&&r.equals(d[1],m[1],d[0],m[0],e,t,r)){u=a[f]=!0;break}f++}if(!u)return!1;l++}return!0}var q6=qr;function K6(e,t,r){var n=sv(e),a=n.length;if(sv(t).length!==a)return!1;for(;a-- >0;)if(!uv(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=iv(e),a=n.length;if(iv(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!uv(e,t,r,i)||(o=ov(e,i),s=ov(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Y6(e,t){return qr(e.valueOf(),t.valueOf())}function X6(e,t){return e.source===t.source&&e.flags===t.flags}function cv(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 Z6(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 J6(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 uv(e,t,r,n){return(n===W6||n===U6||n===F6)&&(e.$$typeof||t.$$typeof)?!0:B6(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Q6="[object Arguments]",e8="[object Boolean]",t8="[object Date]",r8="[object Error]",n8="[object Map]",a8="[object Number]",i8="[object Object]",o8="[object RegExp]",s8="[object Set]",l8="[object String]",c8="[object URL]",u8=Array.isArray,fv=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,dv=Object.assign,f8=Object.prototype.toString.call.bind(Object.prototype.toString);function d8(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,h){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,h):b==="function"?a(v,g,h):!1;var S=v.constructor;if(S!==g.constructor)return!1;if(S===Object)return s(v,g,h);if(u8(v))return t(v,g,h);if(fv!=null&&fv(v))return f(v,g,h);if(S===Date)return r(v,g,h);if(S===RegExp)return c(v,g,h);if(S===Map)return i(v,g,h);if(S===Set)return u(v,g,h);var x=f8(v);return x===t8?r(v,g,h):x===o8?c(v,g,h):x===n8?i(v,g,h):x===s8?u(v,g,h):x===i8?typeof v.then!="function"&&typeof g.then!="function"&&s(v,g,h):x===c8?d(v,g,h):x===r8?n(v,g,h):x===Q6?s(v,g,h):x===e8||x===a8||x===l8?l(v,g,h):!1}}function p8(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:z6,areDatesEqual:V6,areErrorsEqual:G6,areFunctionsEqual:H6,areMapsEqual:n?av(lv,ei):lv,areNumbersEqual:q6,areObjectsEqual:n?ei:K6,arePrimitiveWrappersEqual:Y6,areRegExpsEqual:X6,areSetsEqual:n?av(cv,ei):cv,areTypedArraysEqual:n?ei:Z6,areUrlsEqual:J6};if(r&&(a=dv({},a,r(a))),t){var i=Ho(a.areArraysEqual),o=Ho(a.areMapsEqual),s=Ho(a.areObjectsEqual),l=Ho(a.areSetsEqual);a=dv({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function h8(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function m8(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,m=u.meta;return r(l,c,{cache:d,equals:a,meta:m,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 g8=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=p8(e),l=d8(s),c=n?n(l):h8(l);return m8({circular:r,comparator:l,createState:a,equals:c,strict:o})}function v8(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function pv(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):v8(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 y8(e){return O8(e)||w8(e)||x8(e)||b8()}function b8(){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 x8(e,t){if(e){if(typeof e=="string")return hv(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 hv(e,t)}}function hv(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 w8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O8(e){if(Array.isArray(e))return e}function S8(){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=y8(o),l=s[0],c=s.slice(1);if(typeof l=="number"){pv(a.bind(null,c),l);return}a(l),pv(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 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 gv(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){vv(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 vv(e,t,r){return t=A8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A8(e){var t=T8(e,"string");return ti(t)==="symbol"?t:String(t)}function T8(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 j8=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},P8=function(t){return t},_8=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 gv(gv({},n),{},vv({},a,t(a,r[a])))},{})},yv=function(t,r,n){return t.map(function(a){return"".concat(_8(a)," ").concat(r,"ms ").concat(n)}).join(",")},E8=process.env.NODE_ENV!=="production",qo=function(t,r,n,a,i,o,s,l){if(E8&&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 C8(e,t){return N8(e)||k8(e,t)||bv(e,t)||$8()}function $8(){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 k8(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 N8(e){if(Array.isArray(e))return e}function M8(e){return L8(e)||I8(e)||bv(e)||D8()}function D8(){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 bv(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 I8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L8(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,xv=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},wv=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},Ov=function(t,r){return function(n){var a=xv(t,r);return wv(a,n)}},R8=function(t,r){return function(n){var a=xv(t,r),i=[].concat(M8(a.map(function(o,s){return o*s}).slice(1)),[0]);return wv(i,n)}},Sv=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(h){return parseFloat(h)}),u=C8(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(h){return typeof h=="number"&&h>=0&&h<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=Ov(a,o),d=Ov(i,s),m=R8(a,o),v=function(b){return b>1?1:b<0?0:b},g=function(b){for(var S=b>1?1:b,x=S,T=0;T<8;++T){var y=f(x)-S,w=m(x);if(Math.abs(y-S)<Ko||w<Ko)return d(x);x=v(x-y/w)}return d(x)};return g.isStepper=!1,g},B8=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 m=-(u-f)*n,v=d*i,g=d+(m-v)*s/1e3,h=d*s/1e3+u;return Math.abs(h-f)<Ko&&Math.abs(g)<Ko?[f,0]:[h,g]};return l.isStepper=!0,l.dt=s,l},F8=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 Sv(a);case"spring":return B8();default:if(a.split("(")[0]==="cubic-bezier")return Sv(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 Av(e){return z8(e)||W8(e)||jv(e)||U8()}function U8(){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 W8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function z8(e){if(Array.isArray(e))return mu(e)}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 at(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){hu(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 hu(e,t,r){return t=V8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V8(e){var t=G8(e,"string");return ni(t)==="symbol"?t:String(t)}function G8(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 H8(e,t){return Y8(e)||K8(e,t)||jv(e,t)||q8()}function q8(){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 jv(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 K8(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 Y8(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},X8=function e(t,r,n){var a=ri(function(i,o){if(gu(o)){var s=t(o.from,o.to,o.velocity),l=H8(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 Z8=function(e,t,r,n,a){var i=j8(e,t),o=i.reduce(function(h,b){return at(at({},h),{},hu({},b,[e[b],t[b]]))},{}),s=i.reduce(function(h,b){return at(at({},h),{},hu({},b,{from:e[b],velocity:0,to:t[b]}))},{}),l=-1,c,u,f=function(){return null},d=function(){return ri(function(b,S){return S.from},s)},m=function(){return!Object.values(s).filter(gu).length},v=function(b){c||(c=b);var S=b-c,x=S/r.dt;s=X8(r,s,x),a(at(at(at({},e),t),d())),c=b,m()||(l=requestAnimationFrame(f))},g=function(b){u||(u=b);var S=(b-u)/n,x=ri(function(y,w){return Yo.apply(void 0,Av(w).concat([r(S)]))},o);if(a(at(at(at({},e),t),x)),S<1)l=requestAnimationFrame(f);else{var T=ri(function(y,w){return Yo.apply(void 0,Av(w).concat([r(1)]))},o);a(at(at(at({},e),t),T))}};return f=r.isStepper?v:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};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)}var J8=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Q8(e,t){if(e==null)return{};var r=eD(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 eD(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 aD(e)||nD(e)||rD(e)||tD()}function tD(){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 rD(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 nD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aD(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 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 It(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){ai(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 ai(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 iD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_v(n.key),n)}}function sD(e,t,r){return t&&oD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _v(e){var t=lD(e,"string");return Dn(t)==="symbol"?t:String(t)}function lD(e,t){if(Dn(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function cD(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 uD(e){var t=fD();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&&(Dn(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 fD(){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 Lt=function(e){cD(r,e);var t=uD(r);function r(n,a){var i;iD(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,m=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(wu(i)),i.changeStyle=i.changeStyle.bind(wu(i)),!s||m<=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 sD(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 m={style:l?ai({},l,u):u};this.state&&d&&(l&&d[l]!==u||!l&&d!==u)&&this.setState(m);return}if(!(g8(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 h={style:l?ai({},l,g):g};(l&&d[l]!==g||!l&&d!==g)&&this.setState(h)}this.runAnimation(It(It({},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,m=Z8(o,s,F8(c),l,this.changeStyle),v=function(){i.stopJSAnimation=m()};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,m=function(g,h,b){if(b===0)return g;var S=h.duration,x=h.easing,T=x===void 0?"ease":x,y=h.style,w=h.properties,A=h.onAnimationEnd,P=b>0?o[b-1]:h,$=w||Object.keys(y);if(typeof T=="function"||T==="spring")return[].concat(vu(g),[i.runJSAnimation.bind(i,{from:P.style,to:y,duration:S,easing:T}),S]);var R=yv($,S,T),j=It(It(It({},P.style),y),{},{transition:R});return[].concat(vu(g),[j,S,A]).filter(P8)};return this.manager.start([l].concat(vu(o.reduce(m,[u,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=S8());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,m=a.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var g=s?ai({},s,l):l,h=yv(Object.keys(g),o,c);v.start([u,i,It(It({},g),{},{transition:h}),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=Q8(a,J8),c=O.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(m){var v=m.props,g=v.style,h=g===void 0?{}:g,b=v.className,S=O.cloneElement(m,It(It({},l),{},{style:It(It({},h),u),className:b}));return S};return c===1?f(O.Children.only(i)):O.createElement("div",null,O.Children.map(i,function(d){return f(d)}))}}]),r}(O.PureComponent);Lt.displayName="Animate",Lt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Lt.propTypes={from:_e.oneOfType([_e.object,_e.string]),to:_e.oneOfType([_e.object,_e.string]),attributeName:_e.string,duration:_e.number,begin:_e.number,easing:_e.oneOfType([_e.string,_e.func]),steps:_e.arrayOf(_e.shape({duration:_e.number.isRequired,style:_e.object.isRequired,easing:_e.oneOfType([_e.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),_e.func]),properties:_e.arrayOf("string"),onAnimationEnd:_e.func})),children:_e.oneOfType([_e.node,_e.func]),isActive:_e.bool,canBegin:_e.bool,onAnimationEnd:_e.func,shouldReAnimate:_e.bool,onAnimationStart:_e.func,onAnimationReStart:_e.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 dD(e,t){return gD(e)||mD(e,t)||hD(e,t)||pD()}function pD(){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 hD(e,t){if(e){if(typeof e=="string")return Ev(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 Ev(e,t)}}function Ev(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 mD(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 gD(e){if(Array.isArray(e))return e}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 $v(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){vD(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 vD(e,t,r){return t=yD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yD(e){var t=bD(e,"string");return ii(t)=="symbol"?t:t+""}function bD(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 kv=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,m=4;d<m;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,`,
266
+ */var iu,Zg;function EM(){if(Zg)return iu;Zg=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,Jg;function su(){if(Jg)return ou;Jg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ou=e,ou}var lu,Qg;function ev(){return Qg||(Qg=1,lu=Function.call.bind(Object.prototype.hasOwnProperty)),lu}var cu,tv;function $M(){if(tv)return cu;tv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=su(),r={},n=ev();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,rv;function MM(){if(rv)return uu;rv=1;var e=Xg(),t=EM(),r=su(),n=ev(),a=$M(),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(E){var N=E&&(c&&E[c]||E[u]);if(typeof N=="function")return N}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:S(),arrayOf:x,element:T(),elementType:y(),instanceOf:w,node:U(),objectOf:j,oneOf:A,oneOfType:$,shape:_,exact:R};function v(E,N){return E===N?E!==0||1/E===1/N:E!==E&&N!==N}function g(E,N){this.message=E,this.data=N&&typeof N=="object"?N:{},this.stack=""}g.prototype=Error.prototype;function m(E){if(process.env.NODE_ENV!=="production")var N={},W=0;function q(L,G,Q,I,B,Y,Z){if(I=I||d,Y=Y||Q,Z!==r){if(l){var M=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 M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ee=I+":"+Q;!N[ee]&&W<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+I+"`. 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."),N[ee]=!0,W++)}}return G[Q]==null?L?G[Q]===null?new g("The "+B+" `"+Y+"` is marked as required "+("in `"+I+"`, but its value is `null`.")):new g("The "+B+" `"+Y+"` is marked as required in "+("`"+I+"`, but its value is `undefined`.")):null:E(G,Q,I,B,Y)}var J=q.bind(null,!1);return J.isRequired=q.bind(null,!0),J}function b(E){function N(W,q,J,L,G,Q){var I=W[q],B=C(I);if(B!==E){var Y=D(I);return new g("Invalid "+L+" `"+G+"` of type "+("`"+Y+"` supplied to `"+J+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return m(N)}function S(){return m(o)}function x(E){function N(W,q,J,L,G){if(typeof E!="function")return new g("Property `"+G+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var Q=W[q];if(!Array.isArray(Q)){var I=C(Q);return new g("Invalid "+L+" `"+G+"` of type "+("`"+I+"` supplied to `"+J+"`, expected an array."))}for(var B=0;B<Q.length;B++){var Y=E(Q,B,J,L,G+"["+B+"]",r);if(Y instanceof Error)return Y}return null}return m(N)}function T(){function E(N,W,q,J,L){var G=N[W];if(!s(G)){var Q=C(G);return new g("Invalid "+J+" `"+L+"` of type "+("`"+Q+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return m(E)}function y(){function E(N,W,q,J,L){var G=N[W];if(!e.isValidElementType(G)){var Q=C(G);return new g("Invalid "+J+" `"+L+"` of type "+("`"+Q+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return m(E)}function w(E){function N(W,q,J,L,G){if(!(W[q]instanceof E)){var Q=E.name||d,I=V(W[q]);return new g("Invalid "+L+" `"+G+"` of type "+("`"+I+"` supplied to `"+J+"`, expected ")+("instance of `"+Q+"`."))}return null}return m(N)}function A(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function N(W,q,J,L,G){for(var Q=W[q],I=0;I<E.length;I++)if(v(Q,E[I]))return null;var B=JSON.stringify(E,function(Z,M){var ee=D(M);return ee==="symbol"?String(M):M});return new g("Invalid "+L+" `"+G+"` of value `"+String(Q)+"` "+("supplied to `"+J+"`, expected one of "+B+"."))}return m(N)}function j(E){function N(W,q,J,L,G){if(typeof E!="function")return new g("Property `"+G+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var Q=W[q],I=C(Q);if(I!=="object")return new g("Invalid "+L+" `"+G+"` of type "+("`"+I+"` supplied to `"+J+"`, expected an object."));for(var B in Q)if(n(Q,B)){var Y=E(Q,B,J,L,G+"."+B,r);if(Y instanceof Error)return Y}return null}return m(N)}function $(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var N=0;N<E.length;N++){var W=E[N];if(typeof W!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(W)+" at index "+N+"."),o}function q(J,L,G,Q,I){for(var B=[],Y=0;Y<E.length;Y++){var Z=E[Y],M=Z(J,L,G,Q,I,r);if(M==null)return null;M.data&&n(M.data,"expectedType")&&B.push(M.data.expectedType)}var ee=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new g("Invalid "+Q+" `"+I+"` supplied to "+("`"+G+"`"+ee+"."))}return m(q)}function U(){function E(N,W,q,J,L){return F(N[W])?null:new g("Invalid "+J+" `"+L+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return m(E)}function P(E,N,W,q,J){return new g((E||"React class")+": "+N+" type `"+W+"."+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function _(E){function N(W,q,J,L,G){var Q=W[q],I=C(Q);if(I!=="object")return new g("Invalid "+L+" `"+G+"` of type `"+I+"` "+("supplied to `"+J+"`, expected `object`."));for(var B in E){var Y=E[B];if(typeof Y!="function")return P(J,L,G,B,D(Y));var Z=Y(Q,B,J,L,G+"."+B,r);if(Z)return Z}return null}return m(N)}function R(E){function N(W,q,J,L,G){var Q=W[q],I=C(Q);if(I!=="object")return new g("Invalid "+L+" `"+G+"` of type `"+I+"` "+("supplied to `"+J+"`, expected `object`."));var B=t({},W[q],E);for(var Y in B){var Z=E[Y];if(n(E,Y)&&typeof Z!="function")return P(J,L,G,Y,D(Z));if(!Z)return new g("Invalid "+L+" `"+G+"` key `"+Y+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(W[q],null," ")+`
267
+ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var M=Z(Q,Y,J,L,G+"."+Y,r);if(M)return M}return null}return m(N)}function F(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(F);if(E===null||s(E))return!0;var N=f(E);if(N){var W=N.call(E),q;if(N!==E.entries){for(;!(q=W.next()).done;)if(!F(q.value))return!1}else for(;!(q=W.next()).done;){var J=q.value;if(J&&!F(J[1]))return!1}}else return!1;return!0;default:return!1}}function z(E,N){return E==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function C(E){var N=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":z(N,E)?"symbol":N}function D(E){if(typeof E>"u"||E===null)return""+E;var N=C(E);if(N==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return N}function H(E){var N=D(E);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function V(E){return!E.constructor||!E.constructor.name?d:E.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},uu}var fu,nv;function kM(){if(nv)return fu;nv=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 NM=Xg(),IM=!0;au.exports=MM()(NM.isElement,IM)}else au.exports=kM()();var DM=au.exports;const _e=De(DM);var LM=Object.getOwnPropertyNames,RM=Object.getOwnPropertySymbols,BM=Object.prototype.hasOwnProperty;function av(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Go(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 iv(e){return LM(e).concat(RM(e))}var FM=Object.hasOwn||function(e,t){return BM.call(e,t)};function qr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var UM="__v",WM="__o",zM="_owner",ov=Object.getOwnPropertyDescriptor,sv=Object.keys;function VM(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 HM(e,t){return qr(e.getTime(),t.getTime())}function GM(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qM(e,t){return e===t}function lv(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 KM=qr;function YM(e,t,r){var n=sv(e),a=n.length;if(sv(t).length!==a)return!1;for(;a-- >0;)if(!uv(e,t,r,n[a]))return!1;return!0}function ei(e,t,r){var n=iv(e),a=n.length;if(iv(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!uv(e,t,r,i)||(o=ov(e,i),s=ov(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function XM(e,t){return qr(e.valueOf(),t.valueOf())}function ZM(e,t){return e.source===t.source&&e.flags===t.flags}function cv(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 JM(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 QM(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 uv(e,t,r,n){return(n===zM||n===WM||n===UM)&&(e.$$typeof||t.$$typeof)?!0:FM(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var ek="[object Arguments]",tk="[object Boolean]",rk="[object Date]",nk="[object Error]",ak="[object Map]",ik="[object Number]",ok="[object Object]",sk="[object RegExp]",lk="[object Set]",ck="[object String]",uk="[object URL]",fk=Array.isArray,fv=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,dv=Object.assign,dk=Object.prototype.toString.call.bind(Object.prototype.toString);function pk(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 S=v.constructor;if(S!==g.constructor)return!1;if(S===Object)return s(v,g,m);if(fk(v))return t(v,g,m);if(fv!=null&&fv(v))return f(v,g,m);if(S===Date)return r(v,g,m);if(S===RegExp)return c(v,g,m);if(S===Map)return i(v,g,m);if(S===Set)return u(v,g,m);var x=dk(v);return x===rk?r(v,g,m):x===sk?c(v,g,m):x===ak?i(v,g,m):x===lk?u(v,g,m):x===ok?typeof v.then!="function"&&typeof g.then!="function"&&s(v,g,m):x===uk?d(v,g,m):x===nk?n(v,g,m):x===ek?s(v,g,m):x===tk||x===ik||x===ck?l(v,g,m):!1}}function hk(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?ei:VM,areDatesEqual:HM,areErrorsEqual:GM,areFunctionsEqual:qM,areMapsEqual:n?av(lv,ei):lv,areNumbersEqual:KM,areObjectsEqual:n?ei:YM,arePrimitiveWrappersEqual:XM,areRegExpsEqual:ZM,areSetsEqual:n?av(cv,ei):cv,areTypedArraysEqual:n?ei:JM,areUrlsEqual:QM};if(r&&(a=dv({},a,r(a))),t){var i=Go(a.areArraysEqual),o=Go(a.areMapsEqual),s=Go(a.areObjectsEqual),l=Go(a.areSetsEqual);a=dv({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function mk(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function gk(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 vk=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=hk(e),l=pk(s),c=n?n(l):mk(l);return gk({circular:r,comparator:l,createState:a,equals:c,strict:o})}function yk(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function pv(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):yk(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 bk(e){return Sk(e)||Ok(e)||wk(e)||xk()}function xk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
268
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wk(e,t){if(e){if(typeof e=="string")return hv(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 hv(e,t)}}function hv(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 Ok(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sk(e){if(Array.isArray(e))return e}function Ak(){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=bk(o),l=s[0],c=s.slice(1);if(typeof l=="number"){pv(a.bind(null,c),l);return}a(l),pv(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 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 gv(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){vv(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 vv(e,t,r){return t=Tk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tk(e){var t=jk(e,"string");return ti(t)==="symbol"?t:String(t)}function jk(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 Pk=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},_k=function(t){return t},Ck=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 gv(gv({},n),{},vv({},a,t(a,r[a])))},{})},yv=function(t,r,n){return t.map(function(a){return"".concat(Ck(a)," ").concat(r,"ms ").concat(n)}).join(",")},Ek=process.env.NODE_ENV!=="production",qo=function(t,r,n,a,i,o,s,l){if(Ek&&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 $k(e,t){return Nk(e)||kk(e,t)||bv(e,t)||Mk()}function Mk(){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 kk(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 Nk(e){if(Array.isArray(e))return e}function Ik(e){return Rk(e)||Lk(e)||bv(e)||Dk()}function Dk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
270
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bv(e,t){if(e){if(typeof e=="string")return 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 Lk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rk(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,xv=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},wv=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},Ov=function(t,r){return function(n){var a=xv(t,r);return wv(a,n)}},Bk=function(t,r){return function(n){var a=xv(t,r),i=[].concat(Ik(a.map(function(o,s){return o*s}).slice(1)),[0]);return wv(i,n)}},Sv=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=$k(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=Ov(a,o),d=Ov(i,s),h=Bk(a,o),v=function(b){return b>1?1:b<0?0:b},g=function(b){for(var S=b>1?1:b,x=S,T=0;T<8;++T){var y=f(x)-S,w=h(x);if(Math.abs(y-S)<Ko||w<Ko)return d(x);x=v(x-y/w)}return d(x)};return g.isStepper=!1,g},Fk=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},Uk=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 Sv(a);case"spring":return Fk();default:if(a.split("(")[0]==="cubic-bezier")return Sv(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 Av(e){return Vk(e)||zk(e)||jv(e)||Wk()}function Wk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
271
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vk(e){if(Array.isArray(e))return mu(e)}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 at(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){hu(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 hu(e,t,r){return t=Hk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hk(e){var t=Gk(e,"string");return ni(t)==="symbol"?t:String(t)}function Gk(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 qk(e,t){return Xk(e)||Yk(e,t)||jv(e,t)||Kk()}function Kk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
272
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jv(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 Yk(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 Xk(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},Zk=function e(t,r,n){var a=ri(function(i,o){if(gu(o)){var s=t(o.from,o.to,o.velocity),l=qk(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 Jk=function(e,t,r,n,a){var i=Pk(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,S){return S.from},s)},h=function(){return!Object.values(s).filter(gu).length},v=function(b){c||(c=b);var S=b-c,x=S/r.dt;s=Zk(r,s,x),a(at(at(at({},e),t),d())),c=b,h()||(l=requestAnimationFrame(f))},g=function(b){u||(u=b);var S=(b-u)/n,x=ri(function(y,w){return Yo.apply(void 0,Av(w).concat([r(S)]))},o);if(a(at(at(at({},e),t),x)),S<1)l=requestAnimationFrame(f);else{var T=ri(function(y,w){return Yo.apply(void 0,Av(w).concat([r(1)]))},o);a(at(at(at({},e),t),T))}};return f=r.isStepper?v:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function In(e){"@babel/helpers - typeof";return In=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},In(e)}var Qk=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function eN(e,t){if(e==null)return{};var r=tN(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 tN(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 iN(e)||aN(e)||nN(e)||rN()}function rN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
273
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nN(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 aN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iN(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 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 Dt(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){ai(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 ai(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 oN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sN(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_v(n.key),n)}}function lN(e,t,r){return t&&sN(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _v(e){var t=cN(e,"string");return In(t)==="symbol"?t:String(t)}function cN(e,t){if(In(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uN(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 fN(e){var t=dN();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&&(In(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 dN(){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 Lt=function(e){uN(r,e);var t=fN(r);function r(n,a){var i;oN(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 lN(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(!(vk(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(Dt(Dt({},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=Jk(o,s,Uk(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 S=m.duration,x=m.easing,T=x===void 0?"ease":x,y=m.style,w=m.properties,A=m.onAnimationEnd,j=b>0?o[b-1]:m,$=w||Object.keys(y);if(typeof T=="function"||T==="spring")return[].concat(vu(g),[i.runJSAnimation.bind(i,{from:j.style,to:y,duration:S,easing:T}),S]);var U=yv($,S,T),P=Dt(Dt(Dt({},j.style),y),{},{transition:U});return[].concat(vu(g),[P,S,A]).filter(_k)};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=Ak());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=yv(Object.keys(g),o,c);v.start([u,i,Dt(Dt({},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=eN(a,Qk),c=O.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,S=O.cloneElement(h,Dt(Dt({},l),{},{style:Dt(Dt({},m),u),className:b}));return S};return c===1?f(O.Children.only(i)):O.createElement("div",null,O.Children.map(i,function(d){return f(d)}))}}]),r}(O.PureComponent);Lt.displayName="Animate",Lt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Lt.propTypes={from:_e.oneOfType([_e.object,_e.string]),to:_e.oneOfType([_e.object,_e.string]),attributeName:_e.string,duration:_e.number,begin:_e.number,easing:_e.oneOfType([_e.string,_e.func]),steps:_e.arrayOf(_e.shape({duration:_e.number.isRequired,style:_e.object.isRequired,easing:_e.oneOfType([_e.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),_e.func]),properties:_e.arrayOf("string"),onAnimationEnd:_e.func})),children:_e.oneOfType([_e.node,_e.func]),isActive:_e.bool,canBegin:_e.bool,onAnimationEnd:_e.func,shouldReAnimate:_e.bool,onAnimationStart:_e.func,onAnimationReStart:_e.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 pN(e,t){return vN(e)||gN(e,t)||mN(e,t)||hN()}function hN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
274
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mN(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 gN(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 vN(e){if(Array.isArray(e))return e}function Ev(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?Ev(Object(r),!0).forEach(function(n){yN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ev(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yN(e,t,r){return t=bN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bN(e){var t=xN(e,"string");return ii(t)=="symbol"?t:t+""}function xN(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 Mv=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,`,
270
275
  `).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,`,
271
276
  `).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,`,
272
277
  `).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,`
@@ -276,13 +281,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
276
281
  L `).concat(t+n,",").concat(r+a-s*v,`
277
282
  A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n-l*v,",").concat(r+a,`
278
283
  L `).concat(t+l*v,",").concat(r+a,`
279
- 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},xD=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},wD={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({},wD),t),n=O.useRef(),a=O.useState(-1),i=dD(a,2),o=i[0],s=i[1];O.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&s(T)}catch{}},[]);var l=r.x,c=r.y,u=r.width,f=r.height,d=r.radius,m=r.className,v=r.animationEasing,g=r.animationDuration,h=r.animationBegin,b=r.isAnimationActive,S=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var x=ve("recharts-rectangle",m);return S?O.createElement(Lt,{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:S},function(T){var y=T.width,w=T.height,A=T.x,P=T.y;return O.createElement(Lt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:g,isActive:b,easing:v},O.createElement("path",Zo({},he(r,!0),{className:x,d:kv(A,P,y,w,d),ref:n})))}):O.createElement("path",Zo({},he(r,!0),{className:x,d:kv(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?wt.createElement("circle",Su({},he(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 OD=["x","y","top","left","width","height","className"];function Au(){return Au=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},Au.apply(this,arguments)}function Nv(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 SD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nv(Object(r),!0).forEach(function(n){AD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AD(e,t,r){return t=TD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TD(e){var t=jD(e,"string");return oi(t)=="symbol"?t:t+""}function jD(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 PD(e,t){if(e==null)return{};var r=_D(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 _D(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 ED=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},CD=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,m=d===void 0?0:d,v=t.className,g=PD(t,OD),h=SD({x:n,y:i,top:s,left:c,width:f,height:m},g);return!re(n)||!re(i)||!re(f)||!re(m)||!re(s)||!re(c)?null:O.createElement("path",Au({},he(h,!0),{className:ve("recharts-cross",v),d:ED(n,i,f,m,s,c)}))},$D=mp,kD=$D(Object.getPrototypeOf,Object),ND=kD,MD=Jt,DD=ND,ID=Qt,LD="[object Object]",RD=Function.prototype,BD=Object.prototype,Mv=RD.toString,FD=BD.hasOwnProperty,UD=Mv.call(Object);function WD(e){if(!ID(e)||MD(e)!=LD)return!1;var t=DD(e);if(t===null)return!0;var r=FD.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Mv.call(r)==UD}var zD=WD;const VD=De(zD);var GD=Jt,HD=Qt,qD="[object Boolean]";function KD(e){return e===!0||e===!1||HD(e)&&GD(e)==qD}var YD=KD;const XD=De(YD);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 ZD(e,t){return tI(e)||eI(e,t)||QD(e,t)||JD()}function JD(){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 QD(e,t){if(e){if(typeof e=="string")return Dv(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 Dv(e,t)}}function Dv(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 eI(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 tI(e){if(Array.isArray(e))return e}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){rI(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 rI(e,t,r){return t=nI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nI(e){var t=aI(e,"string");return si(t)=="symbol"?t:t+""}function aI(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 Rv=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},iI={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oI=function(t){var r=Lv(Lv({},iI),t),n=O.useRef(),a=O.useState(-1),i=ZD(a,2),o=i[0],s=i[1];O.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,m=r.className,v=r.animationEasing,g=r.animationDuration,h=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 S=ve("recharts-trapezoid",m);return b?O.createElement(Lt,{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 T=x.upperWidth,y=x.lowerWidth,w=x.height,A=x.x,P=x.y;return O.createElement(Lt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:h,duration:g,easing:v},O.createElement("path",Qo({},he(r,!0),{className:S,d:Rv(A,P,T,y,w),ref:n})))}):O.createElement("g",null,O.createElement("path",Qo({},he(r,!0),{className:S,d:Rv(l,c,u,f,d)})))},sI=["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 lI(e,t){if(e==null)return{};var r=cI(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 cI(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 Bv(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?Bv(Object(r),!0).forEach(function(n){uI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uI(e,t,r){return t=fI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fI(e){var t=dI(e,"string");return li(t)=="symbol"?t:t+""}function dI(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 pI(e,t){return es(es({},t),e)}function hI(e,t){return e==="symbols"}function Fv(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return O.createElement(Ou,r);case"trapezoid":return O.createElement(oI,r);case"sector":return O.createElement(zg,r);case"symbols":if(hI(t))return O.createElement(Xi,r);break;default:return null}}function mI(e){return O.isValidElement(e)?e.props:e}function Tu(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?pI:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=lI(e,sI),c;if(O.isValidElement(t))c=O.cloneElement(t,es(es({},l),mI(t)));else if(me(t))c=t(l);else if(VD(t)&&!XD(t)){var u=a(t,l);c=O.createElement(Fv,{shapeType:r,elementProps:u})}else{var f=l;c=O.createElement(Fv,{shapeType:r,elementProps:f})}return s?O.createElement(we,{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 gI(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 vI(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function yI(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function bI(e,t){var r;return ts(e,t)?r=gI:rs(e,t)?r=vI:ci(e,t)&&(r=yI),r}function xI(e,t){var r;return ts(e,t)?r="trapezoids":rs(e,t)?r="sectors":ci(e,t)&&(r="points"),r}function wI(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 OI(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=xI(r,t),i=wI(r,t),o=n.filter(function(l,c){var u=Ur(i,l),f=r.props[a].filter(function(v){var g=bI(r,t);return g(v,t)}),d=r.props[a].indexOf(f[f.length-1]),m=c===d;return u&&m}),s=n.indexOf(o[o.length-1]);return s}var SI=Math.ceil,AI=Math.max;function TI(e,t,r,n){for(var a=-1,i=AI(SI((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var jI=TI,PI=ph,Uv=1/0,_I=17976931348623157e292;function EI(e){if(!e)return e===0?e:0;if(e=PI(e),e===Uv||e===-Uv){var t=e<0?-1:1;return t*_I}return e===e?e:0}var Wv=EI,CI=jI,$I=io,ju=Wv;function kI(e){return function(t,r,n){return n&&typeof n!="number"&&$I(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),CI(t,r,n,e)}}var NI=kI,MI=NI,DI=MI(),II=DI;const ns=De(II);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 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 Vv(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){Gv(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 Gv(e,t,r){return t=LI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LI(e){var t=RI(e,"string");return ui(t)=="symbol"?t:t+""}function RI(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 BI=["Webkit","Moz","O","ms"],FI=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=BI.reduce(function(i,o){return Vv(Vv({},i),{},Gv({},o+n,r))},{});return a[t]=r,a};function In(e){"@babel/helpers - typeof";return In=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},In(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 Hv(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?Hv(Object(r),!0).forEach(function(n){yt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qv(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,Yv(n.key),n)}}function WI(e,t,r){return t&&qv(e.prototype,t),r&&qv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zI(e,t,r){return t=is(t),VI(e,Kv()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function VI(e,t){if(t&&(In(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GI(e)}function GI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kv=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function HI(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=Yv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yv(e){var t=qI(e,"string");return In(t)=="symbol"?t:t+""}function qI(e,t){if(In(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KI=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}},Xv=function(t){return t.changedTouches&&!!t.changedTouches.length},Ln=function(e){function t(r){var n;return UI(this,t),n=zI(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=Xv(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 HI(t,e),WI(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),m=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:m-m%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 me(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,m=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 h=this.getIndex({startX:o+g,endX:s+g});(h.startIndex!==d||h.endIndex!==m)&&v&&v(h),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Xv(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,m=u.travellerWidth,v=u.onChange,g=u.gap,h=u.data,b={startX:this.state.startX,endX:this.state.endX},S=n.pageX-i;S>0?S=Math.min(S,f+d-m-c):S<0&&(S=Math.max(S,f-c)),b[o]=c+S;var x=this.getIndex(b),T=x.startIndex,y=x.endIndex,w=function(){var P=h.length-1;return o==="startX"&&(s>l?T%g===0:y%g===0)||s<l&&y===P||o==="endX"&&(s>l?y%g===0:T%g===0)||s>l&&y===P};this.setState(yt(yt({},o,c+S),"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 m=s[d];a==="startX"&&m>=c||a==="endX"&&m<=l||this.setState(yt({},a,m),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 O.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=O.Children.only(c);return f?O.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,m=l.ariaLabel,v=l.data,g=l.startIndex,h=l.endIndex,b=Math.max(n,this.props.x),S=Pu(Pu({},he(this.props,!1)),{},{x:b,y:c,width:u,height:f}),x=m||"Min value: ".concat((i=v[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[h])===null||o===void 0?void 0:o.name);return O.createElement(we,{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,S))}},{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 O.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill: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,m=5,v={pointerEvents:"none",fill:c};return O.createElement(we,{className:"recharts-brush-texts"},O.createElement(po,as({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-m,y:o+s/2},v),this.getTextOfTick(a)),O.createElement(po,as({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+m,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,m=d.startX,v=d.endX,g=d.isTextActive,h=d.isSlideMoving,b=d.isTravellerMoving,S=d.isTravellerFocused;if(!a||!a.length||!re(s)||!re(l)||!re(c)||!re(u)||c<=0||u<=0)return null;var x=ve("recharts-brush",i),T=O.Children.count(o)===1,y=FI("userSelect","none");return O.createElement(we,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(m,v),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(v,"endX"),(g||h||b||S||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 O.createElement(O.Fragment,null,O.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),O.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),O.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 O.isValidElement(n)?i=O.cloneElement(n,a):me(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?KI({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(m){return a.scale(m)});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}}])}(O.PureComponent);yt(Ln,"displayName","Brush"),yt(Ln,"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 YI=Vl;function XI(e,t){var r;return YI(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var ZI=XI,JI=ep,QI=gr,e9=ZI,t9=ft,r9=io;function n9(e,t,r){var n=t9(e)?JI:e9;return r&&r9(e,t,r)&&(t=void 0),n(e,QI(t))}var a9=n9;const i9=De(a9);var qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Zv=Xp;function o9(e,t,r){t=="__proto__"&&Zv?Zv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var s9=o9,l9=s9,c9=Hp,u9=gr;function f9(e,t){var r={};return t=u9(t),c9(e,function(n,a,i){l9(r,a,t(n,a,i))}),r}var d9=f9;const p9=De(d9);function h9(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 m9=h9,g9=Vl;function v9(e,t){var r=!0;return g9(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var y9=v9,b9=m9,x9=y9,w9=gr,O9=ft,S9=io;function A9(e,t,r){var n=O9(e)?b9:x9;return r&&S9(e,t,r)&&(t=void 0),n(e,w9(t))}var T9=A9;const Jv=De(T9);var j9=["x","y"];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 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 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 fi(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){P9(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 P9(e,t,r){return t=_9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _9(e){var t=E9(e,"string");return Rn(t)=="symbol"?t:t+""}function E9(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)}function C9(e,t){if(e==null)return{};var r=$9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function k9(e,t){var r=e.x,n=e.y,a=C9(e,j9),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 ey(e){return O.createElement(Tu,Eu({shapeType:"rectangle",propTransformer:k9,activeClassName:"recharts-active-bar"},e))}var N9=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=re(n)||G2(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(Rn(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},M9=["value","background"],ty;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 D9(e,t){if(e==null)return{};var r=I9(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function I9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function 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 ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(n){Ar(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L9(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 R9(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function B9(e,t,r){return t=ss(t),F9(e,ay()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function F9(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 U9(e)}function U9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ay(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ay=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function W9(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 Ar(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=z9(e,"string");return Bn(t)=="symbol"?t:t+""}function z9(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(t==="string"?String:Number)(e)}var Fn=function(e){function t(){var r;L9(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=B9(this,t,[].concat(a)),Ar(r,"state",{isAnimationFinished:!1}),Ar(r,"id",kr("recharts-bar-")),Ar(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ar(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return W9(t,e),R9(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=he(this.props,!1);return n&&n.map(function(f,d){var m=d===l,v=m?c:o,g=Ke(Ke(Ke({},u),f),{},{isActive:m,option:v,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return O.createElement(we,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)}),O.createElement(ey,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 O.createElement(Lt,{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(m){var v=m.t,g=i.map(function(h,b){var S=d&&d[b];if(S){var x=ze(S.x,h.x),T=ze(S.y,h.y),y=ze(S.width,h.width),w=ze(S.height,h.height);return Ke(Ke({},h),{},{x:x(v),y:T(v),width:y(v),height:w(v)})}if(o==="horizontal"){var A=ze(0,h.height),P=A(v);return Ke(Ke({},h),{},{y:h.y+h.height-P,height:P})}var $=ze(0,h.width),R=$(v);return Ke(Ke({},h),{},{width:R})});return O.createElement(we,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=he(this.props.background,!1);return i.map(function(c,u){c.value;var f=c.background,d=D9(c,M9);if(!f)return null;var m=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 O.createElement(ey,os({key:"background-bar-".concat(u),option:n.props.background,isActive:u===s},m))})}},{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,kn);if(!f)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,m=function(h,b){var S=Array.isArray(h.value)?h.value[1]:h.value;return{x:h.x,y:h.y,value:S,errorVal:Je(h,b)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.createElement(we,v,f.map(function(g){return O.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:d,dataPointFormatter:m})}))}},{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,m=n.isAnimationActive,v=n.background,g=n.id;if(a||!i||!i.length)return null;var h=this.state.isAnimationFinished,b=ve("recharts-bar",o),S=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,T=S||x,y=pe(g)?this.id:g;return O.createElement(we,{className:b},S||x?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(y)},O.createElement("rect",{x:S?c:c-f/2,y:x?u:u-d/2,width:S?f:f*2,height:x?d:d*2}))):null,O.createElement(we,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(y,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,y),(!m||h)&&Ht.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}}])}(O.PureComponent);ty=Fn,Ar(Fn,"displayName","Bar"),Ar(Fn,"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"}),Ar(Fn,"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,m=m4(n,r);if(!m)return null;var v=t.layout,g=r.type.defaultProps,h=g!==void 0?Ke(Ke({},g),r.props):r.props,b=h.dataKey,S=h.children,x=h.minPointSize,T=v==="horizontal"?o:i,y=c?T.scale.domain():null,w=S4({numericAxis:T}),A=dt(S,ec),P=f.map(function($,R){var j,C,F,B,z,_;c?j=g4(c[u+R],y):(j=Je($,b),Array.isArray(j)||(j=[w,j]));var L=N9(x,ty.defaultProps.minPointSize)(j[1],R);if(v==="horizontal"){var V,G=[o.scale(j[0]),o.scale(j[1])],E=G[0],M=G[1];C=jg({axis:i,ticks:s,bandSize:a,offset:m.offset,entry:$,index:R}),F=(V=M??E)!==null&&V!==void 0?V:void 0,B=m.size;var W=E-M;if(z=Number.isNaN(W)?0:W,_={x:C,y:o.y,width:B,height:o.height},Math.abs(L)>0&&Math.abs(z)<Math.abs(L)){var K=Nt(z||L)*(Math.abs(L)-Math.abs(z));F-=K,z+=K}}else{var D=[i.scale(j[0]),i.scale(j[1])],H=D[0],Y=D[1];if(C=H,F=jg({axis:o,ticks:l,bandSize:a,offset:m.offset,entry:$,index:R}),B=Y-H,z=m.size,_={x:i.x,y:F,width:i.width,height:z},Math.abs(L)>0&&Math.abs(B)<Math.abs(L)){var te=Nt(B||L)*(Math.abs(L)-Math.abs(B));B+=te}}return Ke(Ke(Ke({},$),{},{x:C,y:F,width:B,height:z,value:c?j:j[1],payload:$,background:_},A&&A[R]&&A[R].props),{},{tooltipPayload:[$g(r,$)],tooltipPosition:{x:C+B/2,y:F+z/2}})});return Ke({data:P,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 V9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oy(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,ly(n.key),n)}}function G9(e,t,r){return t&&oy(e.prototype,t),r&&oy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sy(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ls(e,t,r){return t=ly(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ly(e){var t=H9(e,"string");return di(t)=="symbol"?t:t+""}function H9(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 q9=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,Fn);return u.reduce(function(m,v){var g=r[v],h=g.orientation,b=g.domain,S=g.padding,x=S===void 0?{}:S,T=g.mirror,y=g.reversed,w="".concat(h).concat(T?"Mirror":""),A,P,$,R,j;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var C=b[1]-b[0],F=1/0,B=g.categoricalDomain.sort(Y2);if(B.forEach(function(D,H){H>0&&(F=Math.min((D||0)-(B[H-1]||0),F))}),Number.isFinite(F)){var z=F/C,_=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(A=z*_/2),g.padding==="no-gap"){var L=Nr(t.barCategoryGap,z*_),V=z*_/2;A=V-L-(V-L)/_*L}}}a==="xAxis"?P=[n.left+(x.left||0)+(A||0),n.left+n.width-(x.right||0)-(A||0)]:a==="yAxis"?P=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(A||0),n.top+n.height-(x.bottom||0)-(A||0)]:P=g.range,y&&(P=[P[1],P[0]]);var G=p4(g,i,d),E=G.scale,M=G.realScaleType;E.domain(b).range(P),h4(E);var W=O4(E,Rt(Rt({},g),{},{realScaleType:M}));a==="xAxis"?(j=h==="top"&&!T||h==="bottom"&&T,$=n.left,R=f[w]-j*g.height):a==="yAxis"&&(j=h==="left"&&!T||h==="right"&&T,$=f[w]-j*g.width,R=n.top);var K=Rt(Rt(Rt({},g),W),{},{realScaleType:M,x:$,y:R,scale:E,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return K.bandSize=Fo(K,W),!g.hide&&a==="xAxis"?f[w]+=(j?-1:1)*K.height:g.hide||(f[w]+=(j?-1:1)*K.width),Rt(Rt({},m),{},ls({},v,K))},{})},cy=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)}},K9=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return cy({x:r,y:n},{x:a,y:i})},uy=function(){function e(t){V9(this,e),this.scale=t}return G9(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(uy,"EPS",1e-4);var $u=function(t){var r=Object.keys(t).reduce(function(n,a){return Rt(Rt({},n),{},ls({},a,uy.create(t[a])))},{});return Rt(Rt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return p9(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Jv(a,function(i,o){return r[o].isInRange(i)})}})};function Y9(e){return(e%180+180)%180}var X9=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Y9(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)},Z9=gr,J9=ba,Q9=to;function e7(e){return function(t,r,n){var a=Object(t);if(!J9(t)){var i=Z9(r);t=Q9(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 t7=e7,r7=Wv;function n7(e){var t=r7(e),r=t%1;return t===t?r?t-r:t:0}var a7=n7,i7=Mp,o7=gr,s7=a7,l7=Math.max;function c7(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:s7(r);return a<0&&(a=l7(n+a,0)),i7(e,o7(t),a)}var u7=c7,f7=t7,d7=u7,p7=f7(d7),h7=p7;const m7=De(h7);var g7=Zw(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=O.createContext(void 0),Nu=O.createContext(void 0),fy=O.createContext(void 0),dy=O.createContext({}),py=O.createContext(void 0),hy=O.createContext(0),my=O.createContext(0),gy=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=g7(i);return O.createElement(ku.Provider,{value:n},O.createElement(Nu.Provider,{value:a},O.createElement(dy.Provider,{value:i},O.createElement(fy.Provider,{value:u},O.createElement(py.Provider,{value:o},O.createElement(hy.Provider,{value:c},O.createElement(my.Provider,{value:l},s)))))))},v7=function(){return O.useContext(py)};function vy(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var yy=function(t){var r=O.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(vy(r))):ht()),n},y7=function(){var t=O.useContext(ku);return mr(t)},b7=function(){var t=O.useContext(Nu),r=m7(t,function(n){return Jv(n.domain,Number.isFinite)});return r||mr(t)},by=function(t){var r=O.useContext(Nu);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(vy(r))):ht()),n},x7=function(){var t=O.useContext(fy);return t},w7=function(){return O.useContext(dy)},Mu=function(){return O.useContext(my)},Du=function(){return O.useContext(hy)};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 O7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sy(n.key),n)}}function A7(e,t,r){return t&&S7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function T7(e,t,r){return t=us(t),j7(e,xy()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function j7(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 P7(e)}function P7(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 us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function _7(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 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){Lu(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 Lu(e,t,r){return t=Sy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sy(e){var t=E7(e,"string");return Un(t)=="symbol"?t:t+""}function E7(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)}function C7(e,t){return M7(e)||N7(e,t)||k7(e,t)||$7()}function $7(){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 k7(e,t){if(e){if(typeof e=="string")return Ay(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 Ay(e,t)}}function Ay(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 N7(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 M7(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 D7=function(t,r){var n;return O.isValidElement(t)?n=O.cloneElement(t,r):me(t)?n=t(r):n=O.createElement("line",Ru({},r,{className:"recharts-reference-line-line"})),n},I7=function(t,r,n,a,i,o,s,l,c){var u=i.x,f=i.y,d=i.width,m=i.height;if(n){var v=c.y,g=t.y.apply(v,{position:o});if(qt(c,"discard")&&!t.y.isInRange(g))return null;var h=[{x:u+d,y:g},{x:u,y:g}];return l==="left"?h.reverse():h}if(r){var b=c.x,S=t.x.apply(b,{position:o});if(qt(c,"discard")&&!t.x.isInRange(S))return null;var x=[{x:S,y:f+m},{x:S,y:f}];return s==="top"?x.reverse():x}if(a){var T=c.segment,y=T.map(function(w){return t.apply(w,{position:o})});return qt(c,"discard")&&i9(y,function(w){return!t.isInRange(w)})?null:y}return null};function L7(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=v7(),u=yy(a),f=by(i),d=x7();if(!c||!d)return null;tr(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=$u({x:u.scale,y:f.scale}),v=Xe(t),g=Xe(r),h=n&&n.length===2,b=I7(m,v,g,h,d,e.position,u.orientation,f.orientation,e);if(!b)return null;var S=C7(b,2),x=S[0],T=x.x,y=x.y,w=S[1],A=w.x,P=w.y,$=qt(e,"hidden")?"url(#".concat(c,")"):void 0,R=Oy(Oy({clipPath:$},he(e,!0)),{},{x1:T,y1:y,x2:A,y2:P});return O.createElement(we,{className:ve("recharts-reference-line",s)},D7(o,R),it.renderCallByParent(e,K9({x1:T,y1:y,x2:A,y2:P})))}var Bu=function(e){function t(){return O7(this,t),T7(this,t,arguments)}return _7(t,e),A7(t,[{key:"render",value:function(){return O.createElement(L7,this.props)}}])}(O.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 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 Ty(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?Ty(Object(r),!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B7(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 F7(e,t,r){return t&&B7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U7(e,t,r){return t=fs(t),W7(e,Py()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function W7(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 z7(e)}function z7(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 fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(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&&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=_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=G7(e,"string");return Wn(t)=="symbol"?t:t+""}function G7(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 H7=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 qt(t,"discard")&&!o.isInRange(s)?null:s},ps=function(e){function t(){return R7(this,t),U7(this,t,arguments)}return V7(t,e),F7(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(tr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=H7(this.props);if(!f)return null;var d=f.x,m=f.y,v=this.props,g=v.shape,h=v.className,b=qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,S=jy(jy({clipPath:b},he(this.props,!0)),{},{cx:d,cy:m});return O.createElement(we,{className:ve("recharts-reference-dot",h)},t.renderDot(g,S),it.renderCallByParent(this.props,{x:d-o,y:m-o,width:2*o,height:2*o}))}}])}(O.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 O.isValidElement(e)?r=O.cloneElement(e,t):me(e)?r=e(t):r=O.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 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 Ey(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 Cy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(r),!0).forEach(function(n){ms(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K7(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,ky(n.key),n)}}function Y7(e,t,r){return t&&K7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X7(e,t,r){return t=hs(t),Z7(e,$y()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function Z7(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 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 $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 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&&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=ky(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ky(e){var t=eL(e,"string");return zn(t)=="symbol"?t:t+""}function eL(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 tL=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}),m={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 qt(i,"discard")&&(!d.isInRange(m)||!d.isInRange(v))?null:cy(m,v)},gs=function(e){function t(){return q7(this,t),X7(this,t,arguments)}return Q7(t,e),Y7(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;tr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Xe(a),d=Xe(i),m=Xe(o),v=Xe(s),g=this.props.shape;if(!f&&!d&&!m&&!v&&!g)return null;var h=tL(f,d,m,v,this.props);if(!h&&!g)return null;var b=qt(this.props,"hidden")?"url(#".concat(u,")"):void 0;return O.createElement(we,{className:ve("recharts-reference-area",l)},t.renderRect(g,Cy(Cy({clipPath:b},he(this.props,!0)),h)),it.renderCallByParent(this.props,h))}}])}(O.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 O.isValidElement(e)?r=O.cloneElement(e,t):me(e)?r=e(t):r=O.createElement(Ou,Wu({},t,{className:"recharts-reference-area-rect"})),r});function Ny(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 rL(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return X9(n,r)}function nL(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 aL(e,t){return Ny(e,t+1)}function iL(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:Ny(n,c)};var g=l,h,b=function(){return h===void 0&&(h=r(v,g)),h},S=v.coordinate,x=l===0||vs(e,S,b,u,s);x||(l=0,u=o,c+=1),x&&(u=S+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 My(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?My(Object(r),!0).forEach(function(n){oL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):My(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oL(e,t,r){return t=sL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sL(e){var t=lL(e,"string");return pi(t)=="symbol"?t:t+""}function lL(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 cL(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,c=function(d){var m=i[d],v,g=function(){return v===void 0&&(v=r(m,d)),v};if(d===o-1){var h=e*(m.coordinate+e*g()/2-l);i[d]=m=ot(ot({},m),{},{tickCoord:h>0?m.coordinate-h*e:m.coordinate})}else i[d]=m=ot(ot({},m),{},{tickCoord:m.coordinate});var b=vs(e,m.tickCoord,g,s,l);b&&(l=m.tickCoord-e*(g()/2+a),i[d]=ot(ot({},m),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return i}function uL(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 m=vs(e,u.tickCoord,function(){return f},l,c);m&&(c=u.tickCoord-e*(f/2+a),o[s-1]=ot(ot({},u),{},{isShow:!0}))}for(var v=i?s-1:s,g=function(S){var x=o[S],T,y=function(){return T===void 0&&(T=r(x,S)),T};if(S===0){var w=e*(x.coordinate-e*y()/2-l);o[S]=x=ot(ot({},x),{},{tickCoord:w<0?x.coordinate-w*e:x.coordinate})}else o[S]=x=ot(ot({},x),{},{tickCoord:x.coordinate});var A=vs(e,x.tickCoord,y,l,c);A&&(l=x.tickCoord+e*(y()/2+a),o[S]=ot(ot({},x),{},{isShow:!0}))},h=0;h<v;h++)g(h);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(re(l)||vr.isSsr)return aL(a,typeof l=="number"&&re(l)?l:0);var d=[],m=s==="top"||s==="bottom"?"width":"height",v=u&&m==="width"?Ta(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(x,T){var y=me(c)?c(x.value,T):x.value;return m==="width"?rL(Ta(y,{fontSize:t,letterSpacing:r}),v,f):Ta(y,{fontSize:t,letterSpacing:r})[m]},h=a.length>=2?Nt(a[1].coordinate-a[0].coordinate):1,b=nL(i,h,m);return l==="equidistantPreserveStart"?iL(h,b,g,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=uL(h,b,g,a,o,l==="preserveStartEnd"):d=cL(h,b,g,a,o),d.filter(function(S){return S.isShow}))}var fL=["viewBox"],dL=["viewBox"],pL=["ticks"];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)}function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gn.apply(this,arguments)}function 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 et(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){qu(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 Gu(e,t){if(e==null)return{};var r=hL(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 hL(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 mL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iy(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 gL(e,t,r){return t&&Iy(e.prototype,t),r&&Iy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vL(e,t,r){return t=ys(t),yL(e,Ly()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function yL(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 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 Ly(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ly=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function xL(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=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=wL(e,"string");return Vn(t)=="symbol"?t:t+""}function wL(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)}var Hn=function(e){function t(r){var n;return mL(this,t),n=vL(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return xL(t,e),gL(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Gu(n,fL),s=this.props,l=s.viewBox,c=Gu(s,dL);return!fn(i,l)||!fn(o,c)||!fn(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,m,v,g,h,b,S,x=f?-1:1,T=n.tickSize||u,y=re(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":m=v=n.coordinate,h=o+ +!f*l,g=h-x*T,S=g-x*d,b=y;break;case"left":g=h=n.coordinate,v=i+ +!f*s,m=v-x*T,b=m-x*d,S=y;break;case"right":g=h=n.coordinate,v=i+ +f*s,m=v+x*T,b=m+x*d,S=y;break;default:m=v=n.coordinate,h=o+ +f*l,g=h+x*T,S=g+x*d,b=y;break}return{line:{x1:m,y1:g,x2:v,y2:h},tick:{x:b,y:S}}}},{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({},he(this.props,!1)),he(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 m=+(l==="left"&&!c||l==="right"&&c);f=et(et({},f),{},{x1:a+m*o,y1:i,x2:a+m*o,y2:i+s})}return O.createElement("line",Gn({},f,{className:ve("recharts-cartesian-axis-line",Ot(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,m=Vu(et(et({},this.props),{},{ticks:n}),a,i),v=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),h=he(this.props,!1),b=he(u,!1),S=et(et({},h),{},{fill:"none"},he(l,!1)),x=m.map(function(T,y){var w=o.getTickLineCoord(T),A=w.line,P=w.tick,$=et(et(et(et({textAnchor:v,verticalAnchor:g},h),{},{stroke:"none",fill:c},b),P),{},{index:y,payload:T,visibleTicksCount:m.length,tickFormatter:f});return O.createElement(we,Gn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},ga(o.props,T,y)),l&&O.createElement("line",Gn({},S,A,{className:ve("recharts-cartesian-axis-tick-line",Ot(l,"className"))})),u&&t.renderTickItem(u,$,"".concat(me(f)?f(T.value,y):T.value).concat(d||"")))});return O.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,m=Gu(f,pL),v=d;return me(l)&&(v=d&&d.length>0?l(this.props):l(m)),o<=0||s<=0||!v||!v.length?null:O.createElement(we,{className:ve("recharts-cartesian-axis",c),ref:function(h){n.layerReference=h}},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 O.isValidElement(n)?o=O.cloneElement(n,et(et({},a),{},{className:s})):me(n)?o=n(et(et({},a),{},{className:s})):o=O.createElement(po,Gn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(O.Component);qu(Hn,"displayName","CartesianAxis"),qu(Hn,"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 OL=["x1","y1","x2","y2","key"],SL=["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 By(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?By(Object(r),!0).forEach(function(n){AL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):By(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AL(e,t,r){return t=TL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TL(e){var t=jL(e,"string");return Kr(t)=="symbol"?t:t+""}function jL(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 Fy(e,t){if(e==null)return{};var r=PL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var _L=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 O.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Uy(e,t){var r;if(O.isValidElement(e))r=O.cloneElement(e,t);else if(me(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Fy(t,OL),c=he(l,!1);c.offset;var u=Fy(c,SL);r=O.createElement("line",Yr({},u,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function EL(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 Uy(a,c)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function CL(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 Uy(a,c)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function $L(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,m){return d-m});a!==u[0]&&u.unshift(0);var f=u.map(function(d,m){var v=!u[m+1],g=v?a+o-d:u[m+1]-d;if(g<=0)return null;var h=m%t.length;return O.createElement("rect",{key:"react-".concat(m),y:d,x:n,height:g,width:i,stroke:"none",fill:t[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function kL(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,m){return d-m});i!==u[0]&&u.unshift(0);var f=u.map(function(d,m){var v=!u[m+1],g=v?i+s-d:u[m+1]-d;if(g<=0)return null;var h=m%n.length;return O.createElement("rect",{key:"react-".concat(m),x:d,y:o,width:g,height:l,stroke:"none",fill:n[h],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var NL=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return Ag(Vu(st(st(st({},Hn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},ML=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return Ag(Vu(st(st(st({},Hn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},qn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Wy(e){var t,r,n,a,i,o,s=Mu(),l=Du(),c=w7(),u=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:qn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:qn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:qn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:qn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:qn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:qn.verticalFill,x:re(e.x)?e.x:c.left,y:re(e.y)?e.y:c.top,width:re(e.width)?e.width:c.width,height:re(e.height)?e.height:c.height}),f=u.x,d=u.y,m=u.width,v=u.height,g=u.syncWithTicks,h=u.horizontalValues,b=u.verticalValues,S=y7(),x=b7();if(!re(m)||m<=0||!re(v)||v<=0||!re(f)||f!==+f||!re(d)||d!==+d)return null;var T=u.verticalCoordinatesGenerator||NL,y=u.horizontalCoordinatesGenerator||ML,w=u.horizontalPoints,A=u.verticalPoints;if((!w||!w.length)&&me(y)){var P=h&&h.length,$=y({yAxis:x?st(st({},x),{},{ticks:P?h:x.ticks}):void 0,width:s,height:l,offset:c},P?!0:g);tr(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Kr($),"]")),Array.isArray($)&&(w=$)}if((!A||!A.length)&&me(T)){var R=b&&b.length,j=T({xAxis:S?st(st({},S),{},{ticks:R?b:S.ticks}):void 0,width:s,height:l,offset:c},R?!0:g);tr(Array.isArray(j),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(j),"]")),Array.isArray(j)&&(A=j)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(_L,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),O.createElement(EL,Yr({},u,{offset:c,horizontalPoints:w,xAxis:S,yAxis:x})),O.createElement(CL,Yr({},u,{offset:c,verticalPoints:A,xAxis:S,yAxis:x})),O.createElement($L,Yr({},u,{horizontalPoints:w})),O.createElement(kL,Yr({},u,{verticalPoints:A})))}Wy.displayName="CartesianGrid";var DL=["type","layout","connectNulls","ref"],IL=["key"];function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function zy(e,t){if(e==null)return{};var r=LL(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 LL(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 Vy(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?Vy(Object(r),!0).forEach(function(n){Bt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yn(e){return UL(e)||FL(e)||BL(e)||RL()}function RL(){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 BL(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 FL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UL(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 WL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gy(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 zL(e,t,r){return t&&Gy(e.prototype,t),r&&Gy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function VL(e,t,r){return t=bs(t),GL(e,Hy()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function GL(e,t){if(t&&(Kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HL(e)}function HL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hy=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function qL(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 Bt(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=KL(e,"string");return Kn(t)=="symbol"?t:t+""}function KL(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mi=function(e){function t(){var r;WL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=VL(this,t,[].concat(a)),Bt(r,"state",{isAnimationFinished:!0,totalLength:0}),Bt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Bt(r,"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(b,S){return b+S});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var u=Math.floor(o/c),f=o%c,d=s-o,m=[],v=0,g=0;v<l.length;g+=l[v],++v)if(g+l[v]>f){m=[].concat(Yn(l.slice(0,v)),[f-g]);break}var h=m.length%2===0?[0,d]:[d];return[].concat(Yn(t.repeat(l,u)),Yn(m),h).map(function(b){return"".concat(b,"px")}).join(", ")}),Bt(r,"id",kr("recharts-line-")),Bt(r,"pathRef",function(o){r.mainCurve=o}),Bt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Bt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return qL(t,e),zL(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,kn);if(!f)return null;var d=function(g,h){return{x:g.x,y:g.y,value:g.value,errorVal:Je(g.payload,h)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.createElement(we,m,f.map(function(v){return O.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=he(this.props,!1),d=he(l,!0),m=c.map(function(g,h){var b=bt(bt(bt({key:"dot-".concat(h),r:3},f),d),{},{index:h,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 O.createElement(we,hi({className:"recharts-line-dots",key:"dots"},v),m)}},{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=zy(s,DL),d=bt(bt(bt({},he(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 O.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,m=o.animationId,v=o.animateNewValues,g=o.width,h=o.height,b=this.state,S=b.prevPoints,x=b.totalLength;return O.createElement(Lt,{begin:u,duration:f,isActive:c,easing:d,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var y=T.t;if(S){var w=S.length/s.length,A=s.map(function(C,F){var B=Math.floor(F*w);if(S[B]){var z=S[B],_=ze(z.x,C.x),L=ze(z.y,C.y);return bt(bt({},C),{},{x:_(y),y:L(y)})}if(v){var V=ze(g*2,C.x),G=ze(h/2,C.y);return bt(bt({},C),{},{x:V(y),y:G(y)})}return bt(bt({},C),{},{x:C.x,y:C.y})});return i.renderCurveStatically(A,n,a)}var P=ze(0,x),$=P(y),R;if(l){var j="".concat(l).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});R=i.getStrokeDasharray($,x,j)}else R=i.generateSimpleStrokeDasharray(x,$);return i.renderCurveStatically(s,n,a,{strokeDasharray:R})})}},{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,m=a.width,v=a.height,g=a.isAnimationActive,h=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,S=s.length===1,x=ve("recharts-line",l),T=c&&c.allowDataOverflow,y=u&&u.allowDataOverflow,w=T||y,A=pe(h)?this.id:h,P=(n=he(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,R=$===void 0?3:$,j=P.strokeWidth,C=j===void 0?2:j,F=gd(o)?o:{},B=F.clipDot,z=B===void 0?!0:B,_=R*2+C;return O.createElement(we,{className:x},T||y?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(A)},O.createElement("rect",{x:T?d:d-m/2,y:y?f:f-v/2,width:T?m:m*2,height:y?v:v*2})),!z&&O.createElement("clipPath",{id:"clipPath-dots-".concat(A)},O.createElement("rect",{x:d-_/2,y:f-_/2,width:m+_,height:v+_}))):null,!S&&this.renderCurve(w,A),this.renderErrorBar(w,A),(S||o)&&this.renderDots(w,z,A),(!g||b)&&Ht.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(Yn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Yn(o),Yn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(O.isValidElement(n))i=O.cloneElement(n,a);else if(me(n))i=n(a);else{var o=a.key,s=zy(a,IL),l=ve("recharts-line-dot",typeof n!="boolean"?n.className:"");i=O.createElement(Jo,hi({key:o},s,{className:l}))}return i}}])}(O.PureComponent);Bt(mi,"displayName","Line"),Bt(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}),Bt(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,m){var v=Je(d,o);return u==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:m}),y:pe(v)?null:n.scale(v),value:v,payload:d}:{x:pe(v)?null:r.scale(v),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:m}),value:v,payload:d}});return bt({points:f,layout:u},c)});var YL=["layout","type","stroke","connectNulls","isRange","ref"],XL=["key"],Ky;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 Yy(e,t){if(e==null)return{};var r=ZL(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 ZL(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 Xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xy(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qy(n.key),n)}}function QL(e,t,r){return t&&Zy(e.prototype,t),r&&Zy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eR(e,t,r){return t=xs(t),tR(e,Jy()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function tR(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 rR(e)}function rR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jy=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function nR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Kt(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=aR(e,"string");return Xn(t)=="symbol"?t:t+""}function aR(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 String(e)}var jr=function(e){function t(){var r;JL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=eR(this,t,[].concat(a)),Kt(r,"state",{isAnimationFinished:!0}),Kt(r,"id",kr("recharts-area-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),me(o)&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),me(o)&&o()}),r}return nR(t,e),QL(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=he(this.props,!1),m=he(c,!0),v=u.map(function(h,b){var S=Tr(Tr(Tr({key:"dot-".concat(b),r:3},d),m),{},{index:b,cx:h.x,cy:h.y,dataKey:f,value:h.value,payload:h.payload,points:u});return t.renderDotItem(c,S)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.createElement(we,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 re(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)),re(f)?O.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 re(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)),re(f)?O.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 m=Yy(s,YL);return O.createElement(we,{clipPath:i?"url(#clipPath-".concat(o,")"):null},O.createElement(Hr,Xr({},he(m,!0),{points:n,connectNulls:f,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&O.createElement(Hr,Xr({},he(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:n})),u!=="none"&&d&&O.createElement(Hr,Xr({},he(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,m=o.animationId,v=this.state,g=v.prevPoints,h=v.prevBaseLine;return O.createElement(Lt,{begin:u,duration:f,isActive:c,easing:d,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var S=b.t;if(g){var x=g.length/s.length,T=s.map(function(P,$){var R=Math.floor($*x);if(g[R]){var j=g[R],C=ze(j.x,P.x),F=ze(j.y,P.y);return Tr(Tr({},P),{},{x:C(S),y:F(S)})}return P}),y;if(re(l)&&typeof l=="number"){var w=ze(h,l);y=w(S)}else if(pe(l)||un(l)){var A=ze(h,0);y=A(S)}else y=l.map(function(P,$){var R=Math.floor($*x);if(h[R]){var j=h[R],C=ze(j.x,P.x),F=ze(j.y,P.y);return Tr(Tr({},P),{},{x:C(S),y:F(S)})}return P});return i.renderAreaStatically(T,y,n,a)}return O.createElement(we,null,O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(S))),O.createElement(we,{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,m=a.width,v=a.height,g=a.isAnimationActive,h=a.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,S=s.length===1,x=ve("recharts-area",l),T=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,w=T||y,A=pe(h)?this.id:h,P=(n=he(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,R=$===void 0?3:$,j=P.strokeWidth,C=j===void 0?2:j,F=gd(o)?o:{},B=F.clipDot,z=B===void 0?!0:B,_=R*2+C;return O.createElement(we,{className:x},T||y?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(A)},O.createElement("rect",{x:T?u:u-m/2,y:y?c:c-v/2,width:T?m:m*2,height:y?v:v*2})),!z&&O.createElement("clipPath",{id:"clipPath-dots-".concat(A)},O.createElement("rect",{x:u-_/2,y:c-_/2,width:m+_,height:v+_}))):null,S?null:this.renderArea(w,A),(o||S)&&this.renderDots(w,z,A),(!g||b)&&Ht.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}}])}(O.PureComponent);Ky=jr,Kt(jr,"displayName","Area"),Kt(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"}),Kt(jr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(re(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return s==="dataMin"?f:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]}),Kt(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,m=t.layout,v=c&&c.length,g=Ky.getBaseValue(t,r,n,a),h=m==="horizontal",b=!1,S=f.map(function(T,y){var w;v?w=c[u+y]:(w=Je(T,l),Array.isArray(w)?b=!0:w=[g,w]);var A=w[1]==null||v&&Je(T,l)==null;return h?{x:Mn({axis:n,ticks:i,bandSize:s,entry:T,index:y}),y:A?null:a.scale(w[1]),value:w,payload:T}:{x:A?null:n.scale(w[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:T,index:y}),value:w,payload:T}}),x;return v||b?x=S.map(function(T){var y=Array.isArray(T.value)?T.value[0]:null;return h?{x:T.x,y:y!=null&&T.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:T.y}}):x=h?a.scale(g):n.scale(g),Tr({points:S,baseLine:x,layout:m,isRange:b},d)}),Kt(jr,"renderDotItem",function(e,t){var r;if(O.isValidElement(e))r=O.cloneElement(e,t);else if(me(e))r=e(t);else{var n=ve("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Yy(t,XL);r=O.createElement(Jo,Xr({},i,{key:a,className:n}))}return r});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 iR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oR(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 sR(e,t,r){return t&&oR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lR(e,t,r){return t=ws(t),cR(e,e0()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function cR(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 uR(e)}function uR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e0=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function fR(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 t0(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=dR(e,"string");return Zn(t)=="symbol"?t:t+""}function dR(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 Os=function(e){function t(){return iR(this,t),lR(this,t,arguments)}return fR(t,e),sR(t,[{key:"render",value:function(){return null}}])}(wt.Component);t0(Os,"displayName","ZAxis"),t0(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var pR=["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 hR(e,t){if(e==null)return{};var r=mR(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 mR(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 gR(e){var t=e.option,r=e.isActive,n=hR(e,pR);return typeof t=="string"?wt.createElement(Tu,gi({option:wt.createElement(Xi,gi({type:t},n)),isActive:r,shapeType:"symbols"},n)):wt.createElement(Tu,gi({option:t,isActive:r,shapeType:"symbols"},n))}function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function 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 n0(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?n0(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a0(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 yR(e,t,r){return t&&a0(e.prototype,t),r&&a0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bR(e,t,r){return t=Ss(t),xR(e,i0()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function xR(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 wR(e)}function wR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i0=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function OR(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=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=SR(e,"string");return Jn(t)=="symbol"?t:t+""}function SR(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var As=function(e){function t(){var r;vR(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=bR(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 OR(t,e),yR(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,c=he(this.props,!1);return n.map(function(u,f){var d=l===f,m=d?s:o,v=Et(Et({},c),u);return O.createElement(we,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"}),O.createElement(gR,vi({option:m,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 O.createElement(Lt,{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 m=d.t,v=i.map(function(g,h){var b=f&&f[h];if(b){var S=ze(b.cx,g.cx),x=ze(b.cy,g.cy),T=ze(b.size,g.size);return Et(Et({},g),{},{cx:S(m),cy:x(m),size:T(m)})}var y=ze(0,g.size);return Et(Et({},g),{},{size:y(m)})});return O.createElement(we,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,kn);return c?c.map(function(u,f){var d=u.props,m=d.direction,v=d.dataKey;return O.cloneElement(u,{key:"".concat(m,"-").concat(v,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(h,b){return{x:h.cx,y:h.cy,value:m==="x"?+h.node.x:+h.node.y,errorVal:Je(h,b)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=he(this.props,!1),c=he(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=K2(a),m=d.xmin,v=d.xmax,g=d.a,h=d.b,b=function(T){return g*T+h};u=[{x:m,y:b(m)},{x:v,y:b(v)}]}var S=Et(Et(Et({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return O.isValidElement(i)?f=O.cloneElement(i,S):me(i)?f=i(S):f=O.createElement(Hr,vi({},S,{type:s})),O.createElement(we,{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,m=n.height,v=n.id,g=n.isAnimationActive;if(a||!i||!i.length)return null;var h=this.state.isAnimationFinished,b=ve("recharts-scatter",s),S=l&&l.allowDataOverflow,x=c&&c.allowDataOverflow,T=S||x,y=pe(v)?this.id:v;return O.createElement(we,{className:b,clipPath:T?"url(#clipPath-".concat(y,")"):null},S||x?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(y)},O.createElement("rect",{x:S?u:u-d/2,y:x?f:f-m/2,width:S?d:d*2,height:x?m:m*2}))):null,o&&this.renderLine(),this.renderErrorBar(),O.createElement(we,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!g||h)&&Ht.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}}])}(O.PureComponent);Pr(As,"displayName","Scatter"),Pr(As,"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(As,"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=pe(t.dataKey)?a.props.dataKey:t.dataKey,d=pe(r.dataKey)?a.props.dataKey:r.dataKey,m=n&&n.dataKey,v=n?n.range:Os.defaultProps.range,g=v&&v[0],h=t.scale.bandwidth?t.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0,S=i.map(function(x,T){var y=Je(x,f),w=Je(x,d),A=!pe(m)&&Je(x,m)||"-",P=[{name:pe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:x,dataKey:f,type:c},{name:pe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:d,type:c}];A!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:A,payload:x,dataKey:m,type:c});var $=Mn({axis:t,ticks:o,bandSize:h,entry:x,index:T,dataKey:f}),R=Mn({axis:r,ticks:s,bandSize:b,entry:x,index:T,dataKey:d}),j=A!=="-"?n.scale(A):g,C=Math.sqrt(Math.max(j,0)/Math.PI);return Et(Et({},x),{},{cx:$,cy:R,x:$-C,y:R-C,xAxis:t,yAxis:r,zAxis:n,width:2*C,height:2*C,size:j,node:{x:y,y:w,z:A},tooltipPayload:P,tooltipPosition:{x:$,y:R},payload:x},u&&u[T]&&u[T].props)});return Et({points:S},l)});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 AR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TR(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 jR(e,t,r){return t&&TR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PR(e,t,r){return t=Ts(t),_R(e,s0()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function _R(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 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 s0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s0=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(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&&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 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=$R(e,"string");return Qn(t)=="symbol"?t:t+""}function $R(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 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 kR(e){var t=e.xAxisId,r=Mu(),n=Du(),a=yy(t);return a==null?null:wt.createElement(Hn,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 ur(o,!0)}}))}var js=function(e){function t(){return AR(this,t),PR(this,t,arguments)}return CR(t,e),jR(t,[{key:"render",value:function(){return wt.createElement(kR,this.props)}}])}(wt.Component);l0(js,"displayName","XAxis"),l0(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 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 NR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MR(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 DR(e,t,r){return t&&MR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IR(e,t,r){return t=Ps(t),LR(e,u0()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function LR(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 RR(e)}function RR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u0=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function BR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 f0(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=FR(e,"string");return ea(t)=="symbol"?t:t+""}function FR(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 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 UR=function(t){var r=t.yAxisId,n=Mu(),a=Du(),i=by(r);return i==null?null:wt.createElement(Hn,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 ur(s,!0)}}))},_s=function(e){function t(){return NR(this,t),IR(this,t,arguments)}return BR(t,e),DR(t,[{key:"render",value:function(){return wt.createElement(UR,this.props)}}])}(wt.Component);f0(_s,"displayName","YAxis"),f0(_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 p0(e){return GR(e)||VR(e)||zR(e)||WR()}function WR(){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 zR(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 VR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GR(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(p0(o),p0(s)),c=dt(t,gs),u="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(g,h){if(h.props[u]===n&&qt(h.props,"extendDomain")&&re(h.props[f])){var b=h.props[f];return[Math.min(g[0],b),Math.max(g[1],b)]}return g},d)),c.length){var m="".concat(f,"1"),v="".concat(f,"2");d=c.reduce(function(g,h){if(h.props[u]===n&&qt(h.props,"extendDomain")&&re(h.props[m])&&re(h.props[v])){var b=h.props[m],S=h.props[v];return[Math.min(g[0],b,S),Math.max(g[1],b,S)]}return g},d)}return i&&i.length&&(d=i.reduce(function(g,h){return re(h)?[Math.min(g[0],h),Math.max(g[1],h)]:g},d)),d},h0={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 m=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],m]:l._events[v].push(m):(l._events[v]=m,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,m=f.length,v=new Array(m);d<m;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,m,v){var g=r?r+c:c;if(!this._events[g])return!1;var h=this._events[g],b=arguments.length,S,x;if(h.fn){switch(h.once&&this.removeListener(c,h.fn,void 0,!0),b){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,u),!0;case 3:return h.fn.call(h.context,u,f),!0;case 4:return h.fn.call(h.context,u,f,d),!0;case 5:return h.fn.call(h.context,u,f,d,m),!0;case 6:return h.fn.call(h.context,u,f,d,m,v),!0}for(x=1,S=new Array(b-1);x<b;x++)S[x-1]=arguments[x];h.fn.apply(h.context,S)}else{var T=h.length,y;for(x=0;x<T;x++)switch(h[x].once&&this.removeListener(c,h[x].fn,void 0,!0),b){case 1:h[x].fn.call(h[x].context);break;case 2:h[x].fn.call(h[x].context,u);break;case 3:h[x].fn.call(h[x].context,u,f);break;case 4:h[x].fn.call(h[x].context,u,f,d);break;default:if(!S)for(y=1,S=new Array(b-1);y<b;y++)S[y-1]=arguments[y];h[x].fn.apply(h[x].context,S)}}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 m=r?r+c:c;if(!this._events[m])return this;if(!u)return o(this,m),this;var v=this._events[m];if(v.fn)v.fn===u&&(!d||v.once)&&(!f||v.context===f)&&o(this,m);else{for(var g=0,h=[],b=v.length;g<b;g++)(v[g].fn!==u||d&&!v[g].once||f&&v[g].context!==f)&&h.push(v[g]);h.length?this._events[m]=h.length===1?h[0]:h:o(this,m)}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})(h0);var HR=h0.exports;const qR=De(HR);var of=new qR,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 KR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YR(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,m0(n.key),n)}}function XR(e,t,r){return t&&YR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t,r){return t=m0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m0(e){var t=ZR(e,"string");return yi(t)=="symbol"?t:t+""}function ZR(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 JR=function(){function e(){KR(this,e),lf(this,"activeIndex",0),lf(this,"coordinateList",[]),lf(this,"layout","horizontal")}return XR(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,m=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=m??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 QR(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&&re(n)&&re(a))return!0}return!1}function eB(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 g0(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 tB(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),m=nt(s,l,u,f);n=d.x,a=d.y,i=m.x,o=m.y}else return g0(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 v0(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?v0(Object(r),!0).forEach(function(n){rB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rB(e,t,r){return t=nB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nB(e){var t=aB(e,"string");return bi(t)=="symbol"?t:t+""}function aB(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 iB(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,m=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!m||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var v,g=Hr;if(d==="ScatterChart")v=o,g=CD;else if(d==="BarChart")v=eB(f,o,l,u),g=Ou;else if(f==="radial"){var h=g0(o),b=h.cx,S=h.cy,x=h.radius,T=h.startAngle,y=h.endAngle;v={cx:b,cy:S,startAngle:T,endAngle:y,innerRadius:x,outerRadius:x},g=zg}else v={points:tB(f,o,l)},g=Hr;var w=Es(Es(Es(Es({stroke:"#ccc",pointerEvents:"none"},l),v),he(m,!1)),{},{payload:s,payloadIndex:c,className:ve("recharts-tooltip-cursor",m.className)});return O.isValidElement(m)?O.cloneElement(m,w):O.createElement(g,w)}var oB=["item"],sB=["children","className","width","height","style","compact","title","desc"];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 ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ra.apply(this,arguments)}function y0(e,t){return uB(e)||cB(e,t)||w0(e,t)||lB()}function lB(){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 cB(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 uB(e){if(Array.isArray(e))return e}function b0(e,t){if(e==null)return{};var r=fB(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 fB(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 dB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pB(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,S0(n.key),n)}}function hB(e,t,r){return t&&pB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mB(e,t,r){return t=Cs(t),gB(e,x0()?Reflect.construct(t,r||[],Cs(e).constructor):t.apply(e,r))}function gB(e,t){if(t&&(ta(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vB(e)}function vB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x0=function(){return!!e})()}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}function yB(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 na(e){return wB(e)||xB(e)||w0(e)||bB()}function bB(){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 w0(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 xB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wB(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 O0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O0(Object(r),!0).forEach(function(n){ue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ue(e,t,r){return t=S0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S0(e){var t=OB(e,"string");return ta(t)=="symbol"?t:t+""}function OB(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 SB={xAxis:["bottom","top"],yAxis:["left","right"]},AB={width:"100%",height:"100%"},A0={x:0,y:0};function $s(e){return e}var TB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},jB=function(t,r,n,a){var i=r.find(function(u){return u&&u.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return Z(Z(Z({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return Z(Z(Z({},a),nt(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return A0},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(na(s),na(c)):s},[]);return o.length>0?o:t&&t.length&&re(a)&&re(i)?t.slice(a,i+1):[]};function T0(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 m=f===void 0?s:f;d=Ri(m,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(na(l),[$g(c,d)]):l},[])},j0=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=TB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=s4(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,d=ff(t,r,u,f),m=jB(n,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:m}}return null},PB=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,m=Sg(u,i);return n.reduce(function(v,g){var h,b=g.type.defaultProps!==void 0?Z(Z({},g.type.defaultProps),g.props):g.props,S=b.type,x=b.dataKey,T=b.allowDataOverflow,y=b.allowDuplicatedCategory,w=b.scale,A=b.ticks,P=b.includeHidden,$=b[o];if(v[$])return v;var R=ks(t.data,{graphicalItems:a.filter(function(W){var K,D=o in W.props?W.props[o]:(K=W.type.defaultProps)===null||K===void 0?void 0:K[o];return D===$}),dataStartIndex:l,dataEndIndex:c}),j=R.length,C,F,B;QR(b.domain,T,S)&&(C=Qc(b.domain,null,T),m&&(S==="number"||w!=="auto")&&(B=Ga(R,x,"category")));var z=T0(S);if(!C||C.length===0){var _,L=(_=b.domain)!==null&&_!==void 0?_:z;if(x){if(C=Ga(R,x,S),S==="category"&&m){var V=q2(C);y&&V?(F=C,C=ns(0,j)):y||(C=Cg(L,C,g).reduce(function(W,K){return W.indexOf(K)>=0?W:[].concat(na(W),[K])},[]))}else if(S==="category")y?C=C.filter(function(W){return W!==""&&!pe(W)}):C=Cg(L,C,g).reduce(function(W,K){return W.indexOf(K)>=0||K===""||pe(K)?W:[].concat(na(W),[K])},[]);else if(S==="number"){var G=d4(R,a.filter(function(W){var K,D,H=o in W.props?W.props[o]:(K=W.type.defaultProps)===null||K===void 0?void 0:K[o],Y="hide"in W.props?W.props.hide:(D=W.type.defaultProps)===null||D===void 0?void 0:D.hide;return H===$&&(P||!Y)}),x,i,u);G&&(C=G)}m&&(S==="number"||w!=="auto")&&(B=Ga(R,x,"category"))}else m?C=ns(0,j):s&&s[$]&&s[$].hasStack&&S==="number"?C=d==="expand"?[0,1]:Pg(s[$].stackGroups,l,c):C=Og(R,a.filter(function(W){var K=o in W.props?W.props[o]:W.type.defaultProps[o],D="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return K===$&&(P||!D)}),S,u,!0);if(S==="number")C=af(f,C,$,i,A),L&&(C=Qc(L,C,T));else if(S==="category"&&L){var E=L,M=C.every(function(W){return E.indexOf(W)>=0});M&&(C=E)}}return Z(Z({},v),{},ue({},$,Z(Z({},b),{},{axisType:i,domain:C,categoricalDomain:B,duplicateDomain:F,originalDomain:(h=b.domain)!==null&&h!==void 0?h:z,isCategorical:m,layout:u})))},{})},_B=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}),m=d.length,v=Sg(u,i),g=-1;return n.reduce(function(h,b){var S=b.type.defaultProps!==void 0?Z(Z({},b.type.defaultProps),b.props):b.props,x=S[o],T=T0("number");if(!h[x]){g++;var y;return v?y=ns(0,m):s&&s[x]&&s[x].hasStack?(y=Pg(s[x].stackGroups,l,c),y=af(f,y,x,i)):(y=Qc(T,Og(d,n.filter(function(w){var A,P,$=o in w.props?w.props[o]:(A=w.type.defaultProps)===null||A===void 0?void 0:A[o],R="hide"in w.props?w.props.hide:(P=w.type.defaultProps)===null||P===void 0?void 0:P.hide;return $===x&&!R}),"number",u),a.defaultProps.allowDataOverflow),y=af(f,y,x,i)),Z(Z({},h),{},ue({},x,Z(Z({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ot(SB,"".concat(i,".").concat(g%2),null),domain:y,originalDomain:T,isCategorical:v,layout:u})))}return h},{})},EB=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),m={};return d&&d.length?m=PB(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(m=_B(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},CB=function(t){var r=mr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Hl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},P0=function(t){var r=t.children,n=t.defaultShowTooltip,a=gt(r,Ln),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}},$B=function(t){return!t||!t.length?!1:t.some(function(r){var n=er(r&&r.type);return n&&n.indexOf("Bar")>=0})},_0=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"}},kB=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||{},m=gt(f,Ln),v=gt(f,yn),g=Object.keys(l).reduce(function(y,w){var A=l[w],P=A.orientation;return!A.mirror&&!A.hide?Z(Z({},y),{},ue({},P,y[P]+A.width)):y},{left:d.left||0,right:d.right||0}),h=Object.keys(o).reduce(function(y,w){var A=o[w],P=A.orientation;return!A.mirror&&!A.hide?Z(Z({},y),{},ue({},P,Ot(y,"".concat(P))+A.height)):y},{top:d.top||0,bottom:d.bottom||0}),b=Z(Z({},h),g),S=b.bottom;m&&(b.bottom+=m.props.height||Ln.defaultProps.height),v&&r&&(b=u4(b,a,n,r));var x=c-b.left-b.right,T=u-b.top-b.bottom;return Z(Z({brushBottom:S},b),{},{width:Math.max(x,0),height:Math.max(T,0)})},NB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},MB=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,S){var x=S.graphicalItems,T=S.stackGroups,y=S.offset,w=S.updateId,A=S.dataStartIndex,P=S.dataEndIndex,$=b.barSize,R=b.layout,j=b.barGap,C=b.barCategoryGap,F=b.maxBarSize,B=_0(R),z=B.numericAxisName,_=B.cateAxisName,L=$B(x),V=[];return x.forEach(function(G,E){var M=ks(b.data,{graphicalItems:[G],dataStartIndex:A,dataEndIndex:P}),W=G.type.defaultProps!==void 0?Z(Z({},G.type.defaultProps),G.props):G.props,K=W.dataKey,D=W.maxBarSize,H=W["".concat(z,"Id")],Y=W["".concat(_,"Id")],te={},I=l.reduce(function(Ge,ct){var Pi,_i,sa=S["".concat(ct.axisType,"Map")],Ei=W["".concat(ct.axisType,"Id")];sa&&sa[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=G==null||(_i=G.type)===null||_i===void 0?void 0:_i.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ci=sa[Ei];return Z(Z({},Ge),{},ue(ue({},ct.axisType,Ci),"".concat(ct.axisType,"Ticks"),ur(Ci)))},te),U=I[_],q=I["".concat(_,"Ticks")],J=T&&T[H]&&T[H].hasStack&&A4(G,T[H].stackGroups),k=er(G.type).indexOf("Bar")>=0,Q=Fo(U,q),X=[],se=L&&l4({barSize:$,stackGroups:T,totalSize:NB(I,_)});if(k){var ne,fe,ce=pe(D)?F:D,Ee=(ne=(fe=Fo(U,q,!0))!==null&&fe!==void 0?fe:ce)!==null&&ne!==void 0?ne:0;X=c4({barGap:j,barCategoryGap:C,bandSize:Ee!==Q?Ee:Q,sizeList:se[Y],maxBarSize:ce}),Ee!==Q&&(X=X.map(function(Ge){return Z(Z({},Ge),{},{position:Z(Z({},Ge.position),{},{offset:Ge.position.offset-Ee/2})})}))}var Oe=G&&G.type&&G.type.getComposedData;Oe&&V.push({props:Z(Z({},Oe(Z(Z({},I),{},{displayedData:M,props:b,dataKey:K,item:G,bandSize:Q,barPosition:X,offset:y,stackedData:J,layout:R,dataStartIndex:A,dataEndIndex:P}))),{},ue(ue(ue({key:G.key||"item-".concat(E)},z,I[z]),_,I[_]),"animationId",w)),childIndex:oO(G,b.children),item:G})}),V},m=function(b,S){var x=b.props,T=b.dataStartIndex,y=b.dataEndIndex,w=b.updateId;if(!md({props:x}))return null;var A=x.children,P=x.layout,$=x.stackOffset,R=x.data,j=x.reverseStackOrder,C=_0(P),F=C.numericAxisName,B=C.cateAxisName,z=dt(A,n),_=w4(R,z,"".concat(F,"Id"),"".concat(B,"Id"),$,j),L=l.reduce(function(W,K){var D="".concat(K.axisType,"Map");return Z(Z({},W),{},ue({},D,EB(x,Z(Z({},K),{},{graphicalItems:z,stackGroups:K.axisType===F&&_,dataStartIndex:T,dataEndIndex:y}))))},{}),V=kB(Z(Z({},L),{},{props:x,graphicalItems:z}),S==null?void 0:S.legendBBox);Object.keys(L).forEach(function(W){L[W]=u(x,L[W],V,W.replace("Map",""),r)});var G=L["".concat(B,"Map")],E=CB(G),M=d(x,Z(Z({},L),{},{dataStartIndex:T,dataEndIndex:y,updateId:w,graphicalItems:z,stackGroups:_,offset:V}));return Z(Z({formattedGraphicalItems:M,graphicalItems:z,offset:V,stackGroups:_},E),L)},v=function(h){function b(S){var x,T,y;return dB(this,b),y=mB(this,b,[S]),ue(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(y,"accessibilityManager",new JR),ue(y,"handleLegendBBoxUpdate",function(w){if(w){var A=y.state,P=A.dataStartIndex,$=A.dataEndIndex,R=A.updateId;y.setState(Z({legendBBox:w},m({props:y.props,dataStartIndex:P,dataEndIndex:$,updateId:R},Z(Z({},y.state),{},{legendBBox:w}))))}}),ue(y,"handleReceiveSyncEvent",function(w,A,P){if(y.props.syncId===w){if(P===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(A)}}),ue(y,"handleBrushChange",function(w){var A=w.startIndex,P=w.endIndex;if(A!==y.state.dataStartIndex||P!==y.state.dataEndIndex){var $=y.state.updateId;y.setState(function(){return Z({dataStartIndex:A,dataEndIndex:P},m({props:y.props,dataStartIndex:A,dataEndIndex:P,updateId:$},y.state))}),y.triggerSyncEvent({dataStartIndex:A,dataEndIndex:P})}}),ue(y,"handleMouseEnter",function(w){var A=y.getMouseInfo(w);if(A){var P=Z(Z({},A),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var $=y.props.onMouseEnter;me($)&&$(P,w)}}),ue(y,"triggeredAfterMouseMove",function(w){var A=y.getMouseInfo(w),P=A?Z(Z({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(P),y.triggerSyncEvent(P);var $=y.props.onMouseMove;me($)&&$(P,w)}),ue(y,"handleItemMouseEnter",function(w){y.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ue(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),ue(y,"handleMouseMove",function(w){w.persist(),y.throttleTriggeredAfterMouseMove(w)}),ue(y,"handleMouseLeave",function(w){y.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var P=y.props.onMouseLeave;me(P)&&P(A,w)}),ue(y,"handleOuterEvent",function(w){var A=iO(w),P=Ot(y.props,"".concat(A));if(A&&me(P)){var $,R;/.*touch.*/i.test(A)?R=y.getMouseInfo(w.changedTouches[0]):R=y.getMouseInfo(w),P(($=R)!==null&&$!==void 0?$:{},w)}}),ue(y,"handleClick",function(w){var A=y.getMouseInfo(w);if(A){var P=Z(Z({},A),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var $=y.props.onClick;me($)&&$(P,w)}}),ue(y,"handleMouseDown",function(w){var A=y.props.onMouseDown;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ue(y,"handleMouseUp",function(w){var A=y.props.onMouseUp;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ue(y,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ue(y,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseDown(w.changedTouches[0])}),ue(y,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseUp(w.changedTouches[0])}),ue(y,"handleDoubleClick",function(w){var A=y.props.onDoubleClick;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ue(y,"handleContextMenu",function(w){var A=y.props.onContextMenu;if(me(A)){var P=y.getMouseInfo(w);A(P,w)}}),ue(y,"triggerSyncEvent",function(w){y.props.syncId!==void 0&&of.emit(sf,y.props.syncId,w,y.eventEmitterSymbol)}),ue(y,"applySyncEvent",function(w){var A=y.props,P=A.layout,$=A.syncMethod,R=y.state.updateId,j=w.dataStartIndex,C=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)y.setState(Z({dataStartIndex:j,dataEndIndex:C},m({props:y.props,dataStartIndex:j,dataEndIndex:C,updateId:R},y.state)));else if(w.activeTooltipIndex!==void 0){var F=w.chartX,B=w.chartY,z=w.activeTooltipIndex,_=y.state,L=_.offset,V=_.tooltipTicks;if(!L)return;if(typeof $=="function")z=$(V,w);else if($==="value"){z=-1;for(var G=0;G<V.length;G++)if(V[G].value===w.activeLabel){z=G;break}}var E=Z(Z({},L),{},{x:L.left,y:L.top}),M=Math.min(F,E.x+E.width),W=Math.min(B,E.y+E.height),K=V[z]&&V[z].value,D=ff(y.state,y.props.data,z),H=V[z]?{x:P==="horizontal"?V[z].coordinate:M,y:P==="horizontal"?W:V[z].coordinate}:A0;y.setState(Z(Z({},w),{},{activeLabel:K,activeCoordinate:H,activePayload:D,activeTooltipIndex:z}))}else y.setState(w)}),ue(y,"renderCursor",function(w){var A,P=y.state,$=P.isTooltipActive,R=P.activeCoordinate,j=P.activePayload,C=P.offset,F=P.activeTooltipIndex,B=P.tooltipAxisBandSize,z=y.getTooltipEventType(),_=(A=w.props.active)!==null&&A!==void 0?A:$,L=y.props.layout,V=w.key||"_recharts-cursor";return O.createElement(iB,{key:V,activeCoordinate:R,activePayload:j,activeTooltipIndex:F,chartName:r,element:w,isActive:_,layout:L,offset:C,tooltipAxisBandSize:B,tooltipEventType:z})}),ue(y,"renderPolarAxis",function(w,A,P){var $=Ot(w,"type.axisType"),R=Ot(y.state,"".concat($,"Map")),j=w.type.defaultProps,C=j!==void 0?Z(Z({},j),w.props):w.props,F=R&&R[C["".concat($,"Id")]];return O.cloneElement(w,Z(Z({},F),{},{className:ve($,F.className),key:w.key||"".concat(A,"-").concat(P),ticks:ur(F,!0)}))}),ue(y,"renderPolarGrid",function(w){var A=w.props,P=A.radialLines,$=A.polarAngles,R=A.polarRadius,j=y.state,C=j.radiusAxisMap,F=j.angleAxisMap,B=mr(C),z=mr(F),_=z.cx,L=z.cy,V=z.innerRadius,G=z.outerRadius;return O.cloneElement(w,{polarAngles:Array.isArray($)?$:ur(z,!0).map(function(E){return E.coordinate}),polarRadius:Array.isArray(R)?R:ur(B,!0).map(function(E){return E.coordinate}),cx:_,cy:L,innerRadius:V,outerRadius:G,key:w.key||"polar-grid",radialLines:P})}),ue(y,"renderLegend",function(){var w=y.state.formattedGraphicalItems,A=y.props,P=A.children,$=A.width,R=A.height,j=y.props.margin||{},C=$-(j.left||0)-(j.right||0),F=yg({children:P,formattedGraphicalItems:w,legendWidth:C,legendContent:c});if(!F)return null;var B=F.item,z=b0(F,oB);return O.cloneElement(B,Z(Z({},z),{},{chartWidth:$,chartHeight:R,margin:j,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ue(y,"renderTooltip",function(){var w,A=y.props,P=A.children,$=A.accessibilityLayer,R=gt(P,Wt);if(!R)return null;var j=y.state,C=j.isTooltipActive,F=j.activeCoordinate,B=j.activePayload,z=j.activeLabel,_=j.offset,L=(w=R.props.active)!==null&&w!==void 0?w:C;return O.cloneElement(R,{viewBox:Z(Z({},_),{},{x:_.left,y:_.top}),active:L,label:z,payload:L?B:[],coordinate:F,accessibilityLayer:$})}),ue(y,"renderBrush",function(w){var A=y.props,P=A.margin,$=A.data,R=y.state,j=R.offset,C=R.dataStartIndex,F=R.dataEndIndex,B=R.updateId;return O.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,w.props.onChange),data:$,x:re(w.props.x)?w.props.x:j.left,y:re(w.props.y)?w.props.y:j.top+j.height+j.brushBottom-(P.bottom||0),width:re(w.props.width)?w.props.width:j.width,startIndex:C,endIndex:F,updateId:"brush-".concat(B)})}),ue(y,"renderReferenceElement",function(w,A,P){if(!w)return null;var $=y,R=$.clipPathId,j=y.state,C=j.xAxisMap,F=j.yAxisMap,B=j.offset,z=w.type.defaultProps||{},_=w.props,L=_.xAxisId,V=L===void 0?z.xAxisId:L,G=_.yAxisId,E=G===void 0?z.yAxisId:G;return O.cloneElement(w,{key:w.key||"".concat(A,"-").concat(P),xAxis:C[V],yAxis:F[E],viewBox:{x:B.left,y:B.top,width:B.width,height:B.height},clipPathId:R})}),ue(y,"renderActivePoints",function(w){var A=w.item,P=w.activePoint,$=w.basePoint,R=w.childIndex,j=w.isRange,C=[],F=A.props.key,B=A.item.type.defaultProps!==void 0?Z(Z({},A.item.type.defaultProps),A.item.props):A.item.props,z=B.activeDot,_=B.dataKey,L=Z(Z({index:R,dataKey:_,cx:P.x,cy:P.y,r:4,fill:Zc(A.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},he(z,!1)),Bi(z));return C.push(b.renderActiveDot(z,L,"".concat(F,"-activePoint-").concat(R))),$?C.push(b.renderActiveDot(z,Z(Z({},L),{},{cx:$.x,cy:$.y}),"".concat(F,"-basePoint-").concat(R))):j&&C.push(null),C}),ue(y,"renderGraphicChild",function(w,A,P){var $=y.filterFormatItem(w,A,P);if(!$)return null;var R=y.getTooltipEventType(),j=y.state,C=j.isTooltipActive,F=j.tooltipAxis,B=j.activeTooltipIndex,z=j.activeLabel,_=y.props.children,L=gt(_,Wt),V=$.props,G=V.points,E=V.isRange,M=V.baseLine,W=$.item.type.defaultProps!==void 0?Z(Z({},$.item.type.defaultProps),$.item.props):$.item.props,K=W.activeDot,D=W.hide,H=W.activeBar,Y=W.activeShape,te=!!(!D&&C&&L&&(K||H||Y)),I={};R!=="axis"&&L&&L.props.trigger==="click"?I={onClick:Bo(y.handleItemMouseEnter,w.props.onClick)}:R!=="axis"&&(I={onMouseLeave:Bo(y.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,w.props.onMouseEnter)});var U=O.cloneElement(w,Z(Z({},$.props),I));function q(ct){return typeof F.dataKey=="function"?F.dataKey(ct.payload):null}if(te)if(B>=0){var J,k;if(F.dataKey&&!F.allowDuplicatedCategory){var Q=typeof F.dataKey=="function"?q:"payload.".concat(F.dataKey.toString());J=Ri(G,Q,z),k=E&&M&&Ri(M,Q,z)}else J=G==null?void 0:G[B],k=E&&M&&M[B];if(Y||H){var X=w.props.activeIndex!==void 0?w.props.activeIndex:B;return[O.cloneElement(w,Z(Z(Z({},$.props),I),{},{activeIndex:X})),null,null]}if(!pe(J))return[U].concat(na(y.renderActivePoints({item:$,activePoint:J,basePoint:k,childIndex:B,isRange:E})))}else{var se,ne=(se=y.getItemByXY(y.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:U},fe=ne.graphicalItem,ce=fe.item,Ee=ce===void 0?w:ce,Oe=fe.childIndex,Ge=Z(Z(Z({},$.props),I),{},{activeIndex:Oe});return[O.cloneElement(Ee,Ge),null,null]}return E?[U,null,null]:[U,null]}),ue(y,"renderCustomized",function(w,A,P){return O.cloneElement(w,Z(Z({key:"recharts-customized-".concat(P)},y.props),y.state))}),ue(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=S.id)!==null&&x!==void 0?x:kr("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=mh(y.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),y.state={},y}return yB(b,h),hB(b,[{key:"componentDidMount",value:function(){var x,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,T=x.children,y=x.data,w=x.height,A=x.layout,P=gt(T,Wt);if(P){var $=P.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,j=ff(this.state,y,$,R),C=this.state.tooltipTicks[$].coordinate,F=(this.state.offset.top+w)/2,B=A==="horizontal",z=B?{x:C,y:F}:{y:C,x:F},_=this.state.formattedGraphicalItems.find(function(V){var G=V.item;return G.type.name==="Scatter"});_&&(z=Z(Z({},z),_.props.points[$].tooltipPosition),j=_.props.points[$].tooltipPayload);var L={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:R,activePayload:j,activeCoordinate:z};this.setState(L),this.renderCursor(P),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.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([gt(x.children,Wt)],[gt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=gt(this.props.children,Wt);if(x&&typeof x.props.shared=="boolean"){var T=x.props.shared?"axis":"item";return s.indexOf(T)>=0?T:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var T=this.container,y=T.getBoundingClientRect(),w=M3(y),A={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},P=y.width/T.offsetWidth||1,$=this.inRange(A.chartX,A.chartY,P);if(!$)return null;var R=this.state,j=R.xAxisMap,C=R.yAxisMap,F=this.getTooltipEventType(),B=j0(this.state,this.props.data,this.props.layout,$);if(F!=="axis"&&j&&C){var z=mr(j).scale,_=mr(C).scale,L=z&&z.invert?z.invert(A.chartX):null,V=_&&_.invert?_.invert(A.chartY):null;return Z(Z({},A),{},{xValue:L,yValue:V},B)}return B?Z(Z({},A),B):null}},{key:"inRange",value:function(x,T){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,A=x/y,P=T/y;if(w==="horizontal"||w==="vertical"){var $=this.state.offset,R=A>=$.left&&A<=$.left+$.width&&P>=$.top&&P<=$.top+$.height;return R?{x:A,y:P}:null}var j=this.state,C=j.angleAxisMap,F=j.radiusAxisMap;if(C&&F){var B=mr(C);return Mg({x:A,y:P},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,T=this.getTooltipEventType(),y=gt(x,Wt),w={};y&&T==="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 A=Bi(this.props,this.handleOuterEvent);return Z(Z({},A),w)}},{key:"addListener",value:function(){of.on(sf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){of.removeListener(sf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,T,y){for(var w=this.state.formattedGraphicalItems,A=0,P=w.length;A<P;A++){var $=w[A];if($.item===x||$.props.key===x.key||T===er($.item.type)&&y===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,T=this.state.offset,y=T.left,w=T.top,A=T.height,P=T.width;return O.createElement("defs",null,O.createElement("clipPath",{id:x},O.createElement("rect",{x:y,y:w,height:A,width:P})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],P=w[1];return Z(Z({},T),{},ue({},A,P.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],P=w[1];return Z(Z({},T),{},ue({},A,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[x])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(x){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[x])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(x){var T=this.state,y=T.formattedGraphicalItems,w=T.activeItem;if(y&&y.length)for(var A=0,P=y.length;A<P;A++){var $=y[A],R=$.props,j=$.item,C=j.type.defaultProps!==void 0?Z(Z({},j.type.defaultProps),j.props):j.props,F=er(j.type);if(F==="Bar"){var B=(R.data||[]).find(function(V){return xD(x,V)});if(B)return{graphicalItem:$,payload:B}}else if(F==="RadialBar"){var z=(R.data||[]).find(function(V){return Mg(x,V)});if(z)return{graphicalItem:$,payload:z}}else if(ts($,w)||rs($,w)||ci($,w)){var _=OI({graphicalItem:$,activeTooltipItem:w,itemData:C.data}),L=C.activeIndex===void 0?_:C.activeIndex;return{graphicalItem:Z(Z({},$),{},{childIndex:L}),payload:ci($,w)?C.data[_]:$.props.data[_]}}}return null}},{key:"render",value:function(){var x=this;if(!md(this))return null;var T=this.props,y=T.children,w=T.className,A=T.width,P=T.height,$=T.style,R=T.compact,j=T.title,C=T.desc,F=b0(T,sB),B=he(F,!1);if(R)return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement(pl,ra({},B,{width:A,height:P,title:j,desc:C}),this.renderClipPath(),yd(y,this.renderMap)));if(this.props.accessibilityLayer){var z,_;B.tabIndex=(z=this.props.tabIndex)!==null&&z!==void 0?z:0,B.role=(_=this.props.role)!==null&&_!==void 0?_:"application",B.onKeyDown=function(V){x.accessibilityManager.keyboardEvent(V)},B.onFocus=function(){x.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement("div",ra({className:ve("recharts-wrapper",w),style:Z({position:"relative",cursor:"default",width:A,height:P},$)},L,{ref:function(G){x.container=G}}),O.createElement(pl,ra({},B,{width:A,height:P,title:j,desc:C,style:AB}),this.renderClipPath(),yd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(O.Component);ue(v,"displayName",r),ue(v,"defaultProps",Z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ue(v,"getDerivedStateFromProps",function(h,b){var S=h.dataKey,x=h.data,T=h.children,y=h.width,w=h.height,A=h.layout,P=h.stackOffset,$=h.margin,R=b.dataStartIndex,j=b.dataEndIndex;if(b.updateId===void 0){var C=P0(h);return Z(Z(Z({},C),{},{updateId:0},m(Z(Z({props:h},C),{},{updateId:0}),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:P,prevMargin:$,prevChildren:T})}if(S!==b.prevDataKey||x!==b.prevData||y!==b.prevWidth||w!==b.prevHeight||A!==b.prevLayout||P!==b.prevStackOffset||!fn($,b.prevMargin)){var F=P0(h),B={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},z=Z(Z({},j0(b,x,A)),{},{updateId:b.updateId+1}),_=Z(Z(Z({},F),B),z);return Z(Z(Z({},_),m(Z({props:h},_),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:P,prevMargin:$,prevChildren:T})}if(!fl(T,b.prevChildren)){var L,V,G,E,M=gt(T,Ln),W=M&&(L=(V=M.props)===null||V===void 0?void 0:V.startIndex)!==null&&L!==void 0?L:R,K=M&&(G=(E=M.props)===null||E===void 0?void 0:E.endIndex)!==null&&G!==void 0?G:j,D=W!==R||K!==j,H=!pe(x),Y=H&&!D?b.updateId:b.updateId+1;return Z(Z({updateId:Y},m(Z(Z({props:h},b),{},{updateId:Y,dataStartIndex:W,dataEndIndex:K}),b)),{},{prevChildren:T,dataStartIndex:W,dataEndIndex:K})}return null}),ue(v,"renderActiveDot",function(h,b,S){var x;return O.isValidElement(h)?x=O.cloneElement(h,b):me(h)?x=h(b):x=O.createElement(Jo,b),O.createElement(we,{className:"recharts-active-dot",key:S},x)});var g=O.forwardRef(function(b,S){return O.createElement(v,ra({},b,{ref:S}))});return g.displayName=v.displayName,g},DB=MB({chartName:"ComposedChart",GraphicalChild:[mi,jr,Fn,As],axisComponents:[{axisType:"xAxis",AxisComp:js},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:q9});const aa=({className:e,width:t,height:r,rounded:n=!1})=>p.jsx("div",{className:le("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:le("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(aa,{className:"h-[16px] w-[64px]"}),p.jsx(aa,{className:"h-[16px] w-[16px]",rounded:!0})]}),p.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[p.jsx(aa,{className:"h-[32px] w-[80px]"}),p.jsx(aa,{className:"h-[24px] w-[48px] rounded-md"})]})]}),E0=({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,m=c.x+(u.x-c.x)*.6,v=u.y;s+=` C ${f} ${d} ${m} ${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((h,b)=>p.jsx(aa,{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),m=f[f.length-1],v=f[0],g=`${d} L ${m.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((h,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:le("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"})]})]})]})})},IB=({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:le("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:le("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:le("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),p.jsx("span",{className:le("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},C0=({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,m=(A=>{if(!A||A.length===0)return[];const P=[...A].sort((B,z)=>{const _=new Date(B.date),L=new Date(z.date);return _.getTime()-L.getTime()});let $,R;l!=null&&l.start&&(l!=null&&l.end)?($=new Date(l.start),R=new Date(l.end)):($=new Date(P[0].date),R=new Date(P[P.length-1].date));const j=new Map;P.forEach(B=>{j.set(B.date,B)});const C=[],F=new Date($);for(;F<=R;){const B=F.toISOString().split("T")[0];if(j.has(B))C.push(j.get(B));else{const z={date:B,users:0,sessions:0,messages:0,totalTokens:0,inputTokens:0,outputTokens:0,agentRuns:0,toolRuns:0,modelRuns:0,codeTools:0,workflowTools:0,knowledgeTools:0,mcpTools:0,value:0,count:0};if(P.length>0){const _=P[0];Object.keys(_).forEach(L=>{typeof _[L]=="number"&&!(L in z)&&(z[L]=0)})}C.push(z)}F.setDate(F.getDate()+1)}return C})(a),v=A=>{const P=new Date(A);return isNaN(P.getTime())?A:P.toLocaleDateString("en-US",{month:"short",day:"numeric"})},g=()=>{if(!m||m.length===0)return 0;const A=m.length;return A<=20?0:A<=31?1:A<=61?2:Math.floor(A/7)-1},h=A=>b()&&!Number.isInteger(A)?"":A>=1e3?`${Math.floor(A/1e3)}k`:Math.floor(A).toString(),b=()=>{const A=["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&&A.some(P=>c.toLowerCase().includes(P.toLowerCase()))||i&&A.some(P=>i.toLowerCase().includes(P.toLowerCase()))||e.title&&A.some(P=>e.title.toLowerCase().includes(P.toLowerCase()))||s&&s.some(P=>P.label&&A.some($=>P.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(E0,{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:le("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 T=A=>{var $;if(!n||!A||!A.activePayload)return;const P=($=A.activePayload[0])==null?void 0:$.payload;P&&P.date&&(console.log("Chart data point clicked:",{date:P.date,data:P}),n(P,P.date))};return console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart original data length:",a==null?void 0:a.length),console.log("AnalyticsChart filled data length:",m.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",m.length>0?{first:(y=m[0])==null?void 0:y.date,last:(w=m[m.length-1])==null?void 0:w.date,totalDays:m.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",x),console.log("Sample filled data points:",m.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),p.jsxs("div",{className:le("w-full",t),children:[p.jsx("div",{className:"relative bg-gray-50/30",children:p.jsx(P3,{width:"100%",height:u,children:p.jsxs(DB,{data:m,onClick:T,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:x.map((A,P)=>p.jsxs("linearGradient",{id:`gradient-${A.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:A.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:A.color,stopOpacity:.01})]},`gradient-${P}`))}),p.jsx(Wy,{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:h,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(Wt,{content:A=>p.jsx(IB,{...A,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(A=>p.jsx(jr,{type:"monotone",dataKey:A.dataKey,stroke:"none",fill:`url(#gradient-${A.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${A.dataKey}`)),x.map(A=>p.jsx(mi,{type:"monotone",dataKey:A.dataKey,stroke:A.color,strokeWidth:2.5,strokeDasharray:A.strokeDasharray,dot:!1,activeDot:{r:5,fill:A.color,stroke:A.color,strokeWidth:2},name:A.label},A.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(A=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:A.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:A.label})]},A.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]=O.useState(o.defaultSort||null),[u,f]=O.useState(""),[d,m]=O.useState(1),v=O.useMemo(()=>{let y=[...n];return s.searchable&&u&&(y=y.filter(w=>a.some(A=>{const P=w[A.key];return P==null?void 0:P.toString().toLowerCase().includes(u.toLowerCase())}))),l&&y.sort((w,A)=>{const P=w[l.key],$=A[l.key];if(typeof P=="number"&&typeof $=="number")return l.order==="asc"?P-$:$-P;const R=(P==null?void 0:P.toString())||"",j=($==null?void 0:$.toString())||"",C=R.localeCompare(j);return l.order==="asc"?C:-C}),y},[n,a,u,l,s.searchable]),g=i.enabled?Math.ceil(v.length/i.pageSize):1,h=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"})},S=y=>{f(y),m(1)},x=(y,w,A)=>w.render?w.render(y,A):w.formatter?w.formatter(y,A):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",T=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?p.jsx(jf,{className:"w-[16px] h-[16px]"}):p.jsx(fr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(jf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(fr,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return p.jsxs("div",{className:le("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(Nf,{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=>S(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:le("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}),T(y)]})},y.key))})}),p.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:h.map((y,w)=>p.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(A=>p.jsx("td",{className:le("px-[16px] py-[12px] text-xs text-gray-900",A.align==="center"&&"text-center",A.align==="right"&&"text-right"),children:x(y[A.key],A,y)},A.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:()=>m(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 A=Math.max(1,Math.min(g-4,d-2))+w;return A>g?null:p.jsx("button",{onClick:()=>m(A),className:le("px-[12px] py-[4px] text-xs border rounded",d===A?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:A},A)}),p.jsx("button",{onClick:()=>m(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"})]})]}),h.length===0&&p.jsx("div",{className:"text-center py-[32px] text-gray-500",children:u?"No results found for your search.":"No data available."})]})},df=window.location.protocol+"//"+window.location.host,LB=(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"}},RB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},BB=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=LB(e.type||"human",t);return`${df}/agenticai/assets/${r}/${e.name.replace("agent","avatar")}.svg`},k0=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"},FB={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"},Ft={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)">
284
+ 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},wN=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},ON={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({},ON),t),n=O.useRef(),a=O.useState(-1),i=pN(a,2),o=i[0],s=i[1];O.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&s(T)}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,S=r.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var x=ve("recharts-rectangle",h);return S?O.createElement(Lt,{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:S},function(T){var y=T.width,w=T.height,A=T.x,j=T.y;return O.createElement(Lt,{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},O.createElement("path",Zo({},he(r,!0),{className:x,d:Mv(A,j,y,w,d),ref:n})))}):O.createElement("path",Zo({},he(r,!0),{className:x,d:Mv(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?wt.createElement("circle",Su({},he(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 SN=["x","y","top","left","width","height","className"];function Au(){return Au=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},Au.apply(this,arguments)}function kv(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 AN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kv(Object(r),!0).forEach(function(n){TN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TN(e,t,r){return t=jN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jN(e){var t=PN(e,"string");return oi(t)=="symbol"?t:t+""}function PN(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 _N(e,t){if(e==null)return{};var r=CN(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 CN(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 EN=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},$N=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=_N(t,SN),m=AN({x:n,y:i,top:s,left:c,width:f,height:h},g);return!re(n)||!re(i)||!re(f)||!re(h)||!re(s)||!re(c)?null:O.createElement("path",Au({},he(m,!0),{className:ve("recharts-cross",v),d:EN(n,i,f,h,s,c)}))},MN=mp,kN=MN(Object.getPrototypeOf,Object),NN=kN,IN=Jt,DN=NN,LN=Qt,RN="[object Object]",BN=Function.prototype,FN=Object.prototype,Nv=BN.toString,UN=FN.hasOwnProperty,WN=Nv.call(Object);function zN(e){if(!LN(e)||IN(e)!=RN)return!1;var t=DN(e);if(t===null)return!0;var r=UN.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Nv.call(r)==WN}var VN=zN;const HN=De(VN);var GN=Jt,qN=Qt,KN="[object Boolean]";function YN(e){return e===!0||e===!1||qN(e)&&GN(e)==KN}var XN=YN;const ZN=De(XN);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 JN(e,t){return r7(e)||t7(e,t)||e7(e,t)||QN()}function QN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
285
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e7(e,t){if(e){if(typeof e=="string")return Iv(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 Iv(e,t)}}function Iv(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 t7(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 r7(e){if(Array.isArray(e))return 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 Lv(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){n7(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 n7(e,t,r){return t=a7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a7(e){var t=i7(e,"string");return si(t)=="symbol"?t:t+""}function i7(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 Rv=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},o7={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},s7=function(t){var r=Lv(Lv({},o7),t),n=O.useRef(),a=O.useState(-1),i=JN(a,2),o=i[0],s=i[1];O.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 S=ve("recharts-trapezoid",h);return b?O.createElement(Lt,{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 T=x.upperWidth,y=x.lowerWidth,w=x.height,A=x.x,j=x.y;return O.createElement(Lt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:v},O.createElement("path",Qo({},he(r,!0),{className:S,d:Rv(A,j,T,y,w),ref:n})))}):O.createElement("g",null,O.createElement("path",Qo({},he(r,!0),{className:S,d:Rv(l,c,u,f,d)})))},l7=["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 c7(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 Bv(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?Bv(Object(r),!0).forEach(function(n){f7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f7(e,t,r){return t=d7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d7(e){var t=p7(e,"string");return li(t)=="symbol"?t:t+""}function p7(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 h7(e,t){return es(es({},t),e)}function m7(e,t){return e==="symbols"}function Fv(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return O.createElement(Ou,r);case"trapezoid":return O.createElement(s7,r);case"sector":return O.createElement(zg,r);case"symbols":if(m7(t))return O.createElement(Xi,r);break;default:return null}}function g7(e){return O.isValidElement(e)?e.props:e}function Tu(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?h7:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=c7(e,l7),c;if(O.isValidElement(t))c=O.cloneElement(t,es(es({},l),g7(t)));else if(me(t))c=t(l);else if(HN(t)&&!ZN(t)){var u=a(t,l);c=O.createElement(Fv,{shapeType:r,elementProps:u})}else{var f=l;c=O.createElement(Fv,{shapeType:r,elementProps:f})}return s?O.createElement(Oe,{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 v7(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 y7(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function b7(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function x7(e,t){var r;return ts(e,t)?r=v7:rs(e,t)?r=y7:ci(e,t)&&(r=b7),r}function w7(e,t){var r;return ts(e,t)?r="trapezoids":rs(e,t)?r="sectors":ci(e,t)&&(r="points"),r}function O7(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 S7(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=w7(r,t),i=O7(r,t),o=n.filter(function(l,c){var u=Ur(i,l),f=r.props[a].filter(function(v){var g=x7(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 A7=Math.ceil,T7=Math.max;function j7(e,t,r,n){for(var a=-1,i=T7(A7((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var P7=j7,_7=ph,Uv=1/0,C7=17976931348623157e292;function E7(e){if(!e)return e===0?e:0;if(e=_7(e),e===Uv||e===-Uv){var t=e<0?-1:1;return t*C7}return e===e?e:0}var Wv=E7,$7=P7,M7=io,ju=Wv;function k7(e){return function(t,r,n){return n&&typeof n!="number"&&M7(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),$7(t,r,n,e)}}var N7=k7,I7=N7,D7=I7(),L7=D7;const ns=De(L7);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 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 Vv(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){Hv(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 Hv(e,t,r){return t=R7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R7(e){var t=B7(e,"string");return ui(t)=="symbol"?t:t+""}function B7(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 F7=["Webkit","Moz","O","ms"],U7=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=F7.reduce(function(i,o){return Vv(Vv({},i),{},Hv({},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 Gv(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?Gv(Object(r),!0).forEach(function(n){yt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function W7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qv(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,Yv(n.key),n)}}function z7(e,t,r){return t&&qv(e.prototype,t),r&&qv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V7(e,t,r){return t=is(t),H7(e,Kv()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function H7(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 G7(e)}function G7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kv=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(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&&_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=Yv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yv(e){var t=K7(e,"string");return Dn(t)=="symbol"?t:t+""}function K7(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 Y7=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=Ea().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}},Xv=function(t){return t.changedTouches&&!!t.changedTouches.length},Ln=function(e){function t(r){var n;return W7(this,t),n=V7(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=Xv(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 q7(t,e),z7(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 me(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=Xv(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},S=n.pageX-i;S>0?S=Math.min(S,f+d-h-c):S<0&&(S=Math.max(S,f-c)),b[o]=c+S;var x=this.getIndex(b),T=x.startIndex,y=x.endIndex,w=function(){var j=m.length-1;return o==="startX"&&(s>l?T%g===0:y%g===0)||s<l&&y===j||o==="endX"&&(s>l?y%g===0:T%g===0)||s>l&&y===j};this.setState(yt(yt({},o,c+S),"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 O.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=O.Children.only(c);return f?O.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),S=Pu(Pu({},he(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 O.createElement(Oe,{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,S))}},{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 O.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill: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 O.createElement(Oe,{className:"recharts-brush-texts"},O.createElement(po,as({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},v),this.getTextOfTick(a)),O.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,S=d.isTravellerFocused;if(!a||!a.length||!re(s)||!re(l)||!re(c)||!re(u)||c<=0||u<=0)return null;var x=ve("recharts-brush",i),T=O.Children.count(o)===1,y=U7("userSelect","none");return O.createElement(Oe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(h,v),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(v,"endX"),(g||m||b||S||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 O.createElement(O.Fragment,null,O.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),O.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),O.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 O.isValidElement(n)?i=O.cloneElement(n,a):me(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?Y7({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}}])}(O.PureComponent);yt(Ln,"displayName","Brush"),yt(Ln,"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 X7=Vl;function Z7(e,t){var r;return X7(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var J7=Z7,Q7=ep,eI=gr,tI=J7,rI=ft,nI=io;function aI(e,t,r){var n=rI(e)?Q7:tI;return r&&nI(e,t,r)&&(t=void 0),n(e,eI(t))}var iI=aI;const oI=De(iI);var qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Zv=Xp;function sI(e,t,r){t=="__proto__"&&Zv?Zv(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var lI=sI,cI=lI,uI=Gp,fI=gr;function dI(e,t){var r={};return t=fI(t),uI(e,function(n,a,i){cI(r,a,t(n,a,i))}),r}var pI=dI;const hI=De(pI);function mI(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 gI=mI,vI=Vl;function yI(e,t){var r=!0;return vI(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var bI=yI,xI=gI,wI=bI,OI=gr,SI=ft,AI=io;function TI(e,t,r){var n=SI(e)?xI:wI;return r&&AI(e,t,r)&&(t=void 0),n(e,OI(t))}var jI=TI;const Jv=De(jI);var PI=["x","y"];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 Cu(){return Cu=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},Cu.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 fi(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){_I(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 _I(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=EI(e,"string");return Rn(t)=="symbol"?t:t+""}function EI(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)}function $I(e,t){if(e==null)return{};var r=MI(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 MI(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 kI(e,t){var r=e.x,n=e.y,a=$I(e,PI),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 ey(e){return O.createElement(Tu,Cu({shapeType:"rectangle",propTransformer:kI,activeClassName:"recharts-active-bar"},e))}var NI=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=re(n)||G2(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(Rn(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},II=["value","background"],ty;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 DI(e,t){if(e==null)return{};var r=LI(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 LI(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 ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(n){Ar(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RI(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 BI(e,t,r){return t&&ny(e.prototype,t),r&&ny(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function FI(e,t,r){return t=ss(t),UI(e,ay()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function UI(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 WI(e)}function WI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ay(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ay=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function zI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eu(e,t)}function Eu(e,t){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Eu(e,t)}function Ar(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=VI(e,"string");return Bn(t)=="symbol"?t:t+""}function VI(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(t==="string"?String:Number)(e)}var Fn=function(e){function t(){var r;RI(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=FI(this,t,[].concat(a)),Ar(r,"state",{isAnimationFinished:!1}),Ar(r,"id",Mr("recharts-bar-")),Ar(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ar(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return zI(t,e),BI(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=he(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 O.createElement(Oe,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)}),O.createElement(ey,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 O.createElement(Lt,{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 S=d&&d[b];if(S){var x=Ve(S.x,m.x),T=Ve(S.y,m.y),y=Ve(S.width,m.width),w=Ve(S.height,m.height);return Ke(Ke({},m),{},{x:x(v),y:T(v),width:y(v),height:w(v)})}if(o==="horizontal"){var A=Ve(0,m.height),j=A(v);return Ke(Ke({},m),{},{y:m.y+m.height-j,height:j})}var $=Ve(0,m.width),U=$(v);return Ke(Ke({},m),{},{width:U})});return O.createElement(Oe,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=he(this.props.background,!1);return i.map(function(c,u){c.value;var f=c.background,d=DI(c,II);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 O.createElement(ey,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,Mn);if(!f)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(m,b){var S=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:S,errorVal:Je(m,b)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.createElement(Oe,v,f.map(function(g){return O.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),S=s&&s.allowDataOverflow,x=l&&l.allowDataOverflow,T=S||x,y=pe(g)?this.id:g;return O.createElement(Oe,{className:b},S||x?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(y)},O.createElement("rect",{x:S?c:c-f/2,y:x?u:u-d/2,width:S?f:f*2,height:x?d:d*2}))):null,O.createElement(Oe,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(y,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,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}}])}(O.PureComponent);ty=Fn,Ar(Fn,"displayName","Bar"),Ar(Fn,"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"}),Ar(Fn,"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=g$(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,S=m.children,x=m.minPointSize,T=v==="horizontal"?o:i,y=c?T.scale.domain():null,w=A$({numericAxis:T}),A=dt(S,ec),j=f.map(function($,U){var P,_,R,F,z,C;c?P=v$(c[u+U],y):(P=Je($,b),Array.isArray(P)||(P=[w,P]));var D=NI(x,ty.defaultProps.minPointSize)(P[1],U);if(v==="horizontal"){var H,V=[o.scale(P[0]),o.scale(P[1])],E=V[0],N=V[1];_=jg({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:$,index:U}),R=(H=N??E)!==null&&H!==void 0?H:void 0,F=h.size;var W=E-N;if(z=Number.isNaN(W)?0:W,C={x:_,y:o.y,width:F,height:o.height},Math.abs(D)>0&&Math.abs(z)<Math.abs(D)){var q=kt(z||D)*(Math.abs(D)-Math.abs(z));R-=q,z+=q}}else{var J=[i.scale(P[0]),i.scale(P[1])],L=J[0],G=J[1];if(_=L,R=jg({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:$,index:U}),F=G-L,z=h.size,C={x:i.x,y:R,width:i.width,height:z},Math.abs(D)>0&&Math.abs(F)<Math.abs(D)){var Q=kt(F||D)*(Math.abs(D)-Math.abs(F));F+=Q}}return Ke(Ke(Ke({},$),{},{x:_,y:R,width:F,height:z,value:c?P:P[1],payload:$,background:C},A&&A[U]&&A[U].props),{},{tooltipPayload:[$g(r,$)],tooltipPosition:{x:_+F/2,y:R+z/2}})});return Ke({data:j,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 HI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oy(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,ly(n.key),n)}}function GI(e,t,r){return t&&oy(e.prototype,t),r&&oy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sy(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ls(e,t,r){return t=ly(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ly(e){var t=qI(e,"string");return di(t)=="symbol"?t:t+""}function qI(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 KI=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,Fn);return u.reduce(function(h,v){var g=r[v],m=g.orientation,b=g.domain,S=g.padding,x=S===void 0?{}:S,T=g.mirror,y=g.reversed,w="".concat(m).concat(T?"Mirror":""),A,j,$,U,P;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var _=b[1]-b[0],R=1/0,F=g.categoricalDomain.sort(X2);if(F.forEach(function(J,L){L>0&&(R=Math.min((J||0)-(F[L-1]||0),R))}),Number.isFinite(R)){var z=R/_,C=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(A=z*C/2),g.padding==="no-gap"){var D=kr(t.barCategoryGap,z*C),H=z*C/2;A=H-D-(H-D)/C*D}}}a==="xAxis"?j=[n.left+(x.left||0)+(A||0),n.left+n.width-(x.right||0)-(A||0)]:a==="yAxis"?j=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(A||0),n.top+n.height-(x.bottom||0)-(A||0)]:j=g.range,y&&(j=[j[1],j[0]]);var V=h$(g,i,d),E=V.scale,N=V.realScaleType;E.domain(b).range(j),m$(E);var W=S$(E,Rt(Rt({},g),{},{realScaleType:N}));a==="xAxis"?(P=m==="top"&&!T||m==="bottom"&&T,$=n.left,U=f[w]-P*g.height):a==="yAxis"&&(P=m==="left"&&!T||m==="right"&&T,$=f[w]-P*g.width,U=n.top);var q=Rt(Rt(Rt({},g),W),{},{realScaleType:N,x:$,y:U,scale:E,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return q.bandSize=Fo(q,W),!g.hide&&a==="xAxis"?f[w]+=(P?-1:1)*q.height:g.hide||(f[w]+=(P?-1:1)*q.width),Rt(Rt({},h),{},ls({},v,q))},{})},cy=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)}},YI=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return cy({x:r,y:n},{x:a,y:i})},uy=function(){function e(t){HI(this,e),this.scale=t}return GI(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(uy,"EPS",1e-4);var $u=function(t){var r=Object.keys(t).reduce(function(n,a){return Rt(Rt({},n),{},ls({},a,uy.create(t[a])))},{});return Rt(Rt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return hI(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Jv(a,function(i,o){return r[o].isInRange(i)})}})};function XI(e){return(e%180+180)%180}var ZI=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=XI(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)},JI=gr,QI=ba,eD=to;function tD(e){return function(t,r,n){var a=Object(t);if(!QI(t)){var i=JI(r);t=eD(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 rD=tD,nD=Wv;function aD(e){var t=nD(e),r=t%1;return t===t?r?t-r:t:0}var iD=aD,oD=Np,sD=gr,lD=iD,cD=Math.max;function uD(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:lD(r);return a<0&&(a=cD(n+a,0)),oD(e,sD(t),a)}var fD=uD,dD=rD,pD=fD,hD=dD(pD),mD=hD;const gD=De(mD);var vD=Jw(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 Mu=O.createContext(void 0),ku=O.createContext(void 0),fy=O.createContext(void 0),dy=O.createContext({}),py=O.createContext(void 0),hy=O.createContext(0),my=O.createContext(0),gy=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=vD(i);return O.createElement(Mu.Provider,{value:n},O.createElement(ku.Provider,{value:a},O.createElement(dy.Provider,{value:i},O.createElement(fy.Provider,{value:u},O.createElement(py.Provider,{value:o},O.createElement(hy.Provider,{value:c},O.createElement(my.Provider,{value:l},s)))))))},yD=function(){return O.useContext(py)};function vy(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var yy=function(t){var r=O.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 xAxis by id "'.concat(t,'" [').concat(cs(t),"]. ").concat(vy(r))):ht()),n},bD=function(){var t=O.useContext(Mu);return mr(t)},xD=function(){var t=O.useContext(ku),r=gD(t,function(n){return Jv(n.domain,Number.isFinite)});return r||mr(t)},by=function(t){var r=O.useContext(ku);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(cs(t),"]. ").concat(vy(r))):ht()),n},wD=function(){var t=O.useContext(fy);return t},OD=function(){return O.useContext(dy)},Nu=function(){return O.useContext(my)},Iu=function(){return O.useContext(hy)};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 SD(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,Sy(n.key),n)}}function TD(e,t,r){return t&&AD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jD(e,t,r){return t=us(t),PD(e,xy()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function PD(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 _D(e)}function _D(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 us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function CD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Du(e,t)}function Du(e,t){return Du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Du(e,t)}function 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){Lu(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 Lu(e,t,r){return t=Sy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sy(e){var t=ED(e,"string");return Un(t)=="symbol"?t:t+""}function ED(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)}function $D(e,t){return ID(e)||ND(e,t)||kD(e,t)||MD()}function MD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
286
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kD(e,t){if(e){if(typeof e=="string")return Ay(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 Ay(e,t)}}function Ay(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 ND(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 ID(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 DD=function(t,r){var n;return O.isValidElement(t)?n=O.cloneElement(t,r):me(t)?n=t(r):n=O.createElement("line",Ru({},r,{className:"recharts-reference-line-line"})),n},LD=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(qt(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,S=t.x.apply(b,{position:o});if(qt(c,"discard")&&!t.x.isInRange(S))return null;var x=[{x:S,y:f+h},{x:S,y:f}];return s==="top"?x.reverse():x}if(a){var T=c.segment,y=T.map(function(w){return t.apply(w,{position:o})});return qt(c,"discard")&&oI(y,function(w){return!t.isInRange(w)})?null:y}return null};function RD(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=yD(),u=yy(a),f=by(i),d=wD();if(!c||!d)return null;tr(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=LD(h,v,g,m,d,e.position,u.orientation,f.orientation,e);if(!b)return null;var S=$D(b,2),x=S[0],T=x.x,y=x.y,w=S[1],A=w.x,j=w.y,$=qt(e,"hidden")?"url(#".concat(c,")"):void 0,U=Oy(Oy({clipPath:$},he(e,!0)),{},{x1:T,y1:y,x2:A,y2:j});return O.createElement(Oe,{className:ve("recharts-reference-line",s)},DD(o,U),it.renderCallByParent(e,YI({x1:T,y1:y,x2:A,y2:j})))}var Bu=function(e){function t(){return SD(this,t),jD(this,t,arguments)}return CD(t,e),TD(t,[{key:"render",value:function(){return O.createElement(RD,this.props)}}])}(O.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 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 Ty(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?Ty(Object(r),!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FD(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 UD(e,t,r){return t&&FD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WD(e,t,r){return t=fs(t),zD(e,Py()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function zD(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 VD(e)}function VD(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 fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}function HD(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=_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=GD(e,"string");return Wn(t)=="symbol"?t:t+""}function GD(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 qD=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 qt(t,"discard")&&!o.isInRange(s)?null:s},ps=function(e){function t(){return BD(this,t),WD(this,t,arguments)}return HD(t,e),UD(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(tr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=qD(this.props);if(!f)return null;var d=f.x,h=f.y,v=this.props,g=v.shape,m=v.className,b=qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,S=jy(jy({clipPath:b},he(this.props,!0)),{},{cx:d,cy:h});return O.createElement(Oe,{className:ve("recharts-reference-dot",m)},t.renderDot(g,S),it.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(O.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 O.isValidElement(e)?r=O.cloneElement(e,t):me(e)?r=e(t):r=O.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 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 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 Ey(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){ms(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 KD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YD(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,My(n.key),n)}}function XD(e,t,r){return t&&YD(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZD(e,t,r){return t=hs(t),JD(e,$y()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function JD(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 QD(e)}function QD(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 eL(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=My(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function My(e){var t=tL(e,"string");return zn(t)=="symbol"?t:t+""}function tL(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 rL=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 qt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(v))?null:cy(h,v)},gs=function(e){function t(){return KD(this,t),ZD(this,t,arguments)}return eL(t,e),XD(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;tr(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=rL(f,d,h,v,this.props);if(!m&&!g)return null;var b=qt(this.props,"hidden")?"url(#".concat(u,")"):void 0;return O.createElement(Oe,{className:ve("recharts-reference-area",l)},t.renderRect(g,Ey(Ey({clipPath:b},he(this.props,!0)),m)),it.renderCallByParent(this.props,m))}}])}(O.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 O.isValidElement(e)?r=O.cloneElement(e,t):me(e)?r=e(t):r=O.createElement(Ou,Wu({},t,{className:"recharts-reference-area-rect"})),r});function ky(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 nL(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return ZI(n,r)}function aL(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 iL(e,t){return ky(e,t+1)}function oL(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:ky(n,c)};var g=l,m,b=function(){return m===void 0&&(m=r(v,g)),m},S=v.coordinate,x=l===0||vs(e,S,b,u,s);x||(l=0,u=o,c+=1),x&&(u=S+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 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 ot(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){sL(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 sL(e,t,r){return t=lL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lL(e){var t=cL(e,"string");return pi(t)=="symbol"?t:t+""}function cL(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 uL(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=vs(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 fL(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 v=i?s-1:s,g=function(S){var x=o[S],T,y=function(){return T===void 0&&(T=r(x,S)),T};if(S===0){var w=e*(x.coordinate-e*y()/2-l);o[S]=x=ot(ot({},x),{},{tickCoord:w<0?x.coordinate-w*e:x.coordinate})}else o[S]=x=ot(ot({},x),{},{tickCoord:x.coordinate});var A=vs(e,x.tickCoord,y,l,c);A&&(l=x.tickCoord+e*(y()/2+a),o[S]=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(re(l)||vr.isSsr)return iL(a,typeof l=="number"&&re(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",v=u&&h==="width"?Ta(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(x,T){var y=me(c)?c(x.value,T):x.value;return h==="width"?nL(Ta(y,{fontSize:t,letterSpacing:r}),v,f):Ta(y,{fontSize:t,letterSpacing:r})[h]},m=a.length>=2?kt(a[1].coordinate-a[0].coordinate):1,b=aL(i,m,h);return l==="equidistantPreserveStart"?oL(m,b,g,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=fL(m,b,g,a,o,l==="preserveStartEnd"):d=uL(m,b,g,a,o),d.filter(function(S){return S.isShow}))}var dL=["viewBox"],pL=["viewBox"],hL=["ticks"];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)}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hn.apply(this,arguments)}function 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 et(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){qu(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 Hu(e,t){if(e==null)return{};var r=mL(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 mL(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 gL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dy(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 vL(e,t,r){return t&&Dy(e.prototype,t),r&&Dy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yL(e,t,r){return t=ys(t),bL(e,Ly()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function bL(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 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 Ly(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ly=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(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&&Gu(e,t)}function Gu(e,t){return Gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gu(e,t)}function qu(e,t,r){return t=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=OL(e,"string");return Vn(t)=="symbol"?t:t+""}function OL(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)}var Gn=function(e){function t(r){var n;return gL(this,t),n=yL(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return wL(t,e),vL(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Hu(n,dL),s=this.props,l=s.viewBox,c=Hu(s,pL);return!fn(i,l)||!fn(o,c)||!fn(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,S,x=f?-1:1,T=n.tickSize||u,y=re(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=v=n.coordinate,m=o+ +!f*l,g=m-x*T,S=g-x*d,b=y;break;case"left":g=m=n.coordinate,v=i+ +!f*s,h=v-x*T,b=h-x*d,S=y;break;case"right":g=m=n.coordinate,v=i+ +f*s,h=v+x*T,b=h+x*d,S=y;break;default:h=v=n.coordinate,m=o+ +f*l,g=m+x*T,S=g+x*d,b=y;break}return{line:{x1:h,y1:g,x2:v,y2:m},tick:{x:b,y:S}}}},{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({},he(this.props,!1)),he(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 O.createElement("line",Hn({},f,{className:ve("recharts-cartesian-axis-line",Ot(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=he(this.props,!1),b=he(u,!1),S=et(et({},m),{},{fill:"none"},he(l,!1)),x=h.map(function(T,y){var w=o.getTickLineCoord(T),A=w.line,j=w.tick,$=et(et(et(et({textAnchor:v,verticalAnchor:g},m),{},{stroke:"none",fill:c},b),j),{},{index:y,payload:T,visibleTicksCount:h.length,tickFormatter:f});return O.createElement(Oe,Hn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},ga(o.props,T,y)),l&&O.createElement("line",Hn({},S,A,{className:ve("recharts-cartesian-axis-tick-line",Ot(l,"className"))})),u&&t.renderTickItem(u,$,"".concat(me(f)?f(T.value,y):T.value).concat(d||"")))});return O.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=Hu(f,hL),v=d;return me(l)&&(v=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!v||!v.length?null:O.createElement(Oe,{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 O.isValidElement(n)?o=O.cloneElement(n,et(et({},a),{},{className:s})):me(n)?o=n(et(et({},a),{},{className:s})):o=O.createElement(po,Hn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(O.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 SL=["x1","y1","x2","y2","key"],AL=["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 By(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?By(Object(r),!0).forEach(function(n){TL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):By(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TL(e,t,r){return t=jL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jL(e){var t=PL(e,"string");return Kr(t)=="symbol"?t:t+""}function PL(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 Fy(e,t){if(e==null)return{};var r=_L(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 _L(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 CL=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 O.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Uy(e,t){var r;if(O.isValidElement(e))r=O.cloneElement(e,t);else if(me(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Fy(t,SL),c=he(l,!1);c.offset;var u=Fy(c,AL);r=O.createElement("line",Yr({},u,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function EL(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 Uy(a,c)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function $L(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 Uy(a,c)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function ML(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 O.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 O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function kL(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 O.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 O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var NL=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return Ag(Vu(st(st(st({},Gn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},IL=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return Ag(Vu(st(st(st({},Gn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},qn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Wy(e){var t,r,n,a,i,o,s=Nu(),l=Iu(),c=OD(),u=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:qn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:qn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:qn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:qn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:qn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:qn.verticalFill,x:re(e.x)?e.x:c.left,y:re(e.y)?e.y:c.top,width:re(e.width)?e.width:c.width,height:re(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,S=bD(),x=xD();if(!re(h)||h<=0||!re(v)||v<=0||!re(f)||f!==+f||!re(d)||d!==+d)return null;var T=u.verticalCoordinatesGenerator||NL,y=u.horizontalCoordinatesGenerator||IL,w=u.horizontalPoints,A=u.verticalPoints;if((!w||!w.length)&&me(y)){var j=m&&m.length,$=y({yAxis:x?st(st({},x),{},{ticks:j?m:x.ticks}):void 0,width:s,height:l,offset:c},j?!0:g);tr(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Kr($),"]")),Array.isArray($)&&(w=$)}if((!A||!A.length)&&me(T)){var U=b&&b.length,P=T({xAxis:S?st(st({},S),{},{ticks:U?b:S.ticks}):void 0,width:s,height:l,offset:c},U?!0:g);tr(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Kr(P),"]")),Array.isArray(P)&&(A=P)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(CL,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),O.createElement(EL,Yr({},u,{offset:c,horizontalPoints:w,xAxis:S,yAxis:x})),O.createElement($L,Yr({},u,{offset:c,verticalPoints:A,xAxis:S,yAxis:x})),O.createElement(ML,Yr({},u,{horizontalPoints:w})),O.createElement(kL,Yr({},u,{verticalPoints:A})))}Wy.displayName="CartesianGrid";var DL=["type","layout","connectNulls","ref"],LL=["key"];function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function zy(e,t){if(e==null)return{};var r=RL(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 RL(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 Vy(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?Vy(Object(r),!0).forEach(function(n){Bt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yn(e){return WL(e)||UL(e)||FL(e)||BL()}function BL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
287
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FL(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 UL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WL(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 zL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hy(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 VL(e,t,r){return t&&Hy(e.prototype,t),r&&Hy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function HL(e,t,r){return t=bs(t),GL(e,Gy()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function GL(e,t){if(t&&(Kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qL(e)}function qL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gy=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function KL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Bt(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=YL(e,"string");return Kn(t)=="symbol"?t:t+""}function YL(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mi=function(e){function t(){var r;zL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=HL(this,t,[].concat(a)),Bt(r,"state",{isAnimationFinished:!0,totalLength:0}),Bt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Bt(r,"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(b,S){return b+S});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(Yn(l.slice(0,v)),[f-g]);break}var m=h.length%2===0?[0,d]:[d];return[].concat(Yn(t.repeat(l,u)),Yn(h),m).map(function(b){return"".concat(b,"px")}).join(", ")}),Bt(r,"id",Mr("recharts-line-")),Bt(r,"pathRef",function(o){r.mainCurve=o}),Bt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Bt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return KL(t,e),VL(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,Mn);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 O.createElement(Oe,h,f.map(function(v){return O.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=he(this.props,!1),d=he(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 O.createElement(Oe,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=zy(s,DL),d=bt(bt(bt({},he(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 O.createElement(Gr,hi({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,c=o.isAnimationActive,u=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,v=o.animateNewValues,g=o.width,m=o.height,b=this.state,S=b.prevPoints,x=b.totalLength;return O.createElement(Lt,{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(T){var y=T.t;if(S){var w=S.length/s.length,A=s.map(function(_,R){var F=Math.floor(R*w);if(S[F]){var z=S[F],C=Ve(z.x,_.x),D=Ve(z.y,_.y);return bt(bt({},_),{},{x:C(y),y:D(y)})}if(v){var H=Ve(g*2,_.x),V=Ve(m/2,_.y);return bt(bt({},_),{},{x:H(y),y:V(y)})}return bt(bt({},_),{},{x:_.x,y:_.y})});return i.renderCurveStatically(A,n,a)}var j=Ve(0,x),$=j(y),U;if(l){var P="".concat(l).split(/[,\s]+/gim).map(function(_){return parseFloat(_)});U=i.getStrokeDasharray($,x,P)}else U=i.generateSimpleStrokeDasharray(x,$);return i.renderCurveStatically(s,n,a,{strokeDasharray:U})})}},{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,S=s.length===1,x=ve("recharts-line",l),T=c&&c.allowDataOverflow,y=u&&u.allowDataOverflow,w=T||y,A=pe(m)?this.id:m,j=(n=he(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=j.r,U=$===void 0?3:$,P=j.strokeWidth,_=P===void 0?2:P,R=gd(o)?o:{},F=R.clipDot,z=F===void 0?!0:F,C=U*2+_;return O.createElement(Oe,{className:x},T||y?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(A)},O.createElement("rect",{x:T?d:d-h/2,y:y?f:f-v/2,width:T?h:h*2,height:y?v:v*2})),!z&&O.createElement("clipPath",{id:"clipPath-dots-".concat(A)},O.createElement("rect",{x:d-C/2,y:f-C/2,width:h+C,height:v+C}))):null,!S&&this.renderCurve(w,A),this.renderErrorBar(w,A),(S||o)&&this.renderDots(w,z,A),(!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(Yn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Yn(o),Yn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(O.isValidElement(n))i=O.cloneElement(n,a);else if(me(n))i=n(a);else{var o=a.key,s=zy(a,LL),l=ve("recharts-line-dot",typeof n!="boolean"?n.className:"");i=O.createElement(Jo,hi({key:o},s,{className:l}))}return i}}])}(O.PureComponent);Bt(mi,"displayName","Line"),Bt(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}),Bt(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:Nn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:pe(v)?null:n.scale(v),value:v,payload:d}:{x:pe(v)?null:r.scale(v),y:Nn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:v,payload:d}});return bt({points:f,layout:u},c)});var XL=["layout","type","stroke","connectNulls","isRange","ref"],ZL=["key"],Ky;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 Yy(e,t){if(e==null)return{};var r=JL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function 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 Xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xy(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qy(n.key),n)}}function eR(e,t,r){return t&&Zy(e.prototype,t),r&&Zy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tR(e,t,r){return t=xs(t),rR(e,Jy()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function rR(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 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 Jy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jy=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function aR(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 Kt(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=iR(e,"string");return Xn(t)=="symbol"?t:t+""}function iR(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 String(e)}var jr=function(e){function t(){var r;QL(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=tR(this,t,[].concat(a)),Kt(r,"state",{isAnimationFinished:!0}),Kt(r,"id",Mr("recharts-area-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),me(o)&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),me(o)&&o()}),r}return aR(t,e),eR(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=he(this.props,!1),h=he(c,!0),v=u.map(function(m,b){var S=Tr(Tr(Tr({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,S)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.createElement(Oe,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 re(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)),re(f)?O.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 re(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)),re(f)?O.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=Yy(s,XL);return O.createElement(Oe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},O.createElement(Gr,Xr({},he(h,!0),{points:n,connectNulls:f,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),u!=="none"&&O.createElement(Gr,Xr({},he(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:n})),u!=="none"&&d&&O.createElement(Gr,Xr({},he(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 O.createElement(Lt,{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 S=b.t;if(g){var x=g.length/s.length,T=s.map(function(j,$){var U=Math.floor($*x);if(g[U]){var P=g[U],_=Ve(P.x,j.x),R=Ve(P.y,j.y);return Tr(Tr({},j),{},{x:_(S),y:R(S)})}return j}),y;if(re(l)&&typeof l=="number"){var w=Ve(m,l);y=w(S)}else if(pe(l)||un(l)){var A=Ve(m,0);y=A(S)}else y=l.map(function(j,$){var U=Math.floor($*x);if(m[U]){var P=m[U],_=Ve(P.x,j.x),R=Ve(P.y,j.y);return Tr(Tr({},j),{},{x:_(S),y:R(S)})}return j});return i.renderAreaStatically(T,y,n,a)}return O.createElement(Oe,null,O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(S))),O.createElement(Oe,{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,S=s.length===1,x=ve("recharts-area",l),T=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,w=T||y,A=pe(m)?this.id:m,j=(n=he(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=j.r,U=$===void 0?3:$,P=j.strokeWidth,_=P===void 0?2:P,R=gd(o)?o:{},F=R.clipDot,z=F===void 0?!0:F,C=U*2+_;return O.createElement(Oe,{className:x},T||y?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(A)},O.createElement("rect",{x:T?u:u-h/2,y:y?c:c-v/2,width:T?h:h*2,height:y?v:v*2})),!z&&O.createElement("clipPath",{id:"clipPath-dots-".concat(A)},O.createElement("rect",{x:u-C/2,y:c-C/2,width:h+C,height:v+C}))):null,S?null:this.renderArea(w,A),(o||S)&&this.renderDots(w,z,A),(!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}}])}(O.PureComponent);Ky=jr,Kt(jr,"displayName","Area"),Kt(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"}),Kt(jr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(re(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return s==="dataMin"?f:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]}),Kt(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=Ky.getBaseValue(t,r,n,a),m=h==="horizontal",b=!1,S=f.map(function(T,y){var w;v?w=c[u+y]:(w=Je(T,l),Array.isArray(w)?b=!0:w=[g,w]);var A=w[1]==null||v&&Je(T,l)==null;return m?{x:Nn({axis:n,ticks:i,bandSize:s,entry:T,index:y}),y:A?null:a.scale(w[1]),value:w,payload:T}:{x:A?null:n.scale(w[1]),y:Nn({axis:a,ticks:o,bandSize:s,entry:T,index:y}),value:w,payload:T}}),x;return v||b?x=S.map(function(T){var y=Array.isArray(T.value)?T.value[0]:null;return m?{x:T.x,y:y!=null&&T.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:T.y}}):x=m?a.scale(g):n.scale(g),Tr({points:S,baseLine:x,layout:h,isRange:b},d)}),Kt(jr,"renderDotItem",function(e,t){var r;if(O.isValidElement(e))r=O.cloneElement(e,t);else if(me(e))r=e(t);else{var n=ve("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Yy(t,ZL);r=O.createElement(Jo,Xr({},i,{key:a,className:n}))}return r});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 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,r0(n.key),n)}}function lR(e,t,r){return t&&sR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cR(e,t,r){return t=ws(t),uR(e,e0()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function uR(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 fR(e)}function fR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(e0=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(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&&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 t0(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=pR(e,"string");return Zn(t)=="symbol"?t:t+""}function pR(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 Os=function(e){function t(){return oR(this,t),cR(this,t,arguments)}return dR(t,e),lR(t,[{key:"render",value:function(){return null}}])}(wt.Component);t0(Os,"displayName","ZAxis"),t0(Os,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var hR=["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 mR(e,t){if(e==null)return{};var r=gR(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 gR(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 vR(e){var t=e.option,r=e.isActive,n=mR(e,hR);return typeof t=="string"?wt.createElement(Tu,gi({option:wt.createElement(Xi,gi({type:t},n)),isActive:r,shapeType:"symbols"},n)):wt.createElement(Tu,gi({option:t,isActive:r,shapeType:"symbols"},n))}function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function 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 n0(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 Ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n0(Object(r),!0).forEach(function(n){Pr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a0(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 bR(e,t,r){return t&&a0(e.prototype,t),r&&a0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function xR(e,t,r){return t=Ss(t),wR(e,i0()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function wR(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 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 i0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i0=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(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&&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=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=AR(e,"string");return Jn(t)=="symbol"?t:t+""}function AR(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var As=function(e){function t(){var r;yR(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=xR(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",Mr("recharts-scatter-")),r}return SR(t,e),bR(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,c=he(this.props,!1);return n.map(function(u,f){var d=l===f,h=d?s:o,v=Ct(Ct({},c),u);return O.createElement(Oe,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"}),O.createElement(vR,vi({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 O.createElement(Lt,{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 S=Ve(b.cx,g.cx),x=Ve(b.cy,g.cy),T=Ve(b.size,g.size);return Ct(Ct({},g),{},{cx:S(h),cy:x(h),size:T(h)})}var y=Ve(0,g.size);return Ct(Ct({},g),{},{size:y(h)})});return O.createElement(Oe,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,Mn);return c?c.map(function(u,f){var d=u.props,h=d.direction,v=d.dataKey;return O.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=he(this.props,!1),c=he(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=Y2(a),h=d.xmin,v=d.xmax,g=d.a,m=d.b,b=function(T){return g*T+m};u=[{x:h,y:b(h)},{x:v,y:b(v)}]}var S=Ct(Ct(Ct({},l),{},{fill:"none",stroke:l&&l.fill},c),{},{points:u});return O.isValidElement(i)?f=O.cloneElement(i,S):me(i)?f=i(S):f=O.createElement(Gr,vi({},S,{type:s})),O.createElement(Oe,{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),S=l&&l.allowDataOverflow,x=c&&c.allowDataOverflow,T=S||x,y=pe(v)?this.id:v;return O.createElement(Oe,{className:b,clipPath:T?"url(#clipPath-".concat(y,")"):null},S||x?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(y)},O.createElement("rect",{x:S?u:u-d/2,y:x?f:f-h/2,width:S?d:d*2,height:x?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),O.createElement(Oe,{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}}])}(O.PureComponent);Pr(As,"displayName","Scatter"),Pr(As,"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(As,"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=pe(t.dataKey)?a.props.dataKey:t.dataKey,d=pe(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,S=i.map(function(x,T){var y=Je(x,f),w=Je(x,d),A=!pe(h)&&Je(x,h)||"-",j=[{name:pe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:x,dataKey:f,type:c},{name:pe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:w,payload:x,dataKey:d,type:c}];A!=="-"&&j.push({name:n.name||n.dataKey,unit:n.unit||"",value:A,payload:x,dataKey:h,type:c});var $=Nn({axis:t,ticks:o,bandSize:m,entry:x,index:T,dataKey:f}),U=Nn({axis:r,ticks:s,bandSize:b,entry:x,index:T,dataKey:d}),P=A!=="-"?n.scale(A):g,_=Math.sqrt(Math.max(P,0)/Math.PI);return Ct(Ct({},x),{},{cx:$,cy:U,x:$-_,y:U-_,xAxis:t,yAxis:r,zAxis:n,width:2*_,height:2*_,size:P,node:{x:y,y:w,z:A},tooltipPayload:j,tooltipPosition:{x:$,y:U},payload:x},u&&u[T]&&u[T].props)});return Ct({points:S},l)});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 TR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jR(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 PR(e,t,r){return t&&jR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _R(e,t,r){return t=Ts(t),CR(e,s0()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function CR(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 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 s0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s0=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(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 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=MR(e,"string");return Qn(t)=="symbol"?t:t+""}function MR(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 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 kR(e){var t=e.xAxisId,r=Nu(),n=Iu(),a=yy(t);return a==null?null:wt.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 ur(o,!0)}}))}var js=function(e){function t(){return TR(this,t),_R(this,t,arguments)}return $R(t,e),PR(t,[{key:"render",value:function(){return wt.createElement(kR,this.props)}}])}(wt.Component);l0(js,"displayName","XAxis"),l0(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 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 NR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(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 DR(e,t,r){return t&&IR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LR(e,t,r){return t=Ps(t),RR(e,u0()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function RR(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 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 u0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u0=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function FR(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 f0(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=UR(e,"string");return ea(t)=="symbol"?t:t+""}function UR(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 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 WR=function(t){var r=t.yAxisId,n=Nu(),a=Iu(),i=by(r);return i==null?null:wt.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 ur(s,!0)}}))},_s=function(e){function t(){return NR(this,t),LR(this,t,arguments)}return FR(t,e),DR(t,[{key:"render",value:function(){return wt.createElement(WR,this.props)}}])}(wt.Component);f0(_s,"displayName","YAxis"),f0(_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 p0(e){return GR(e)||HR(e)||VR(e)||zR()}function zR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
288
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VR(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 HR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GR(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(p0(o),p0(s)),c=dt(t,gs),u="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(g,m){if(m.props[u]===n&&qt(m.props,"extendDomain")&&re(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&&qt(m.props,"extendDomain")&&re(m.props[h])&&re(m.props[v])){var b=m.props[h],S=m.props[v];return[Math.min(g[0],b,S),Math.max(g[1],b,S)]}return g},d)}return i&&i.length&&(d=i.reduce(function(g,m){return re(m)?[Math.min(g[0],m),Math.max(g[1],m)]:g},d)),d},h0={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,S,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,S=new Array(b-1);x<b;x++)S[x-1]=arguments[x];m.fn.apply(m.context,S)}else{var T=m.length,y;for(x=0;x<T;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(!S)for(y=1,S=new Array(b-1);y<b;y++)S[y-1]=arguments[y];m[x].fn.apply(m[x].context,S)}}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})(h0);var qR=h0.exports;const KR=De(qR);var of=new KR,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 YR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XR(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,m0(n.key),n)}}function ZR(e,t,r){return t&&XR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lf(e,t,r){return t=m0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m0(e){var t=JR(e,"string");return yi(t)=="symbol"?t:t+""}function JR(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 QR=function(){function e(){YR(this,e),lf(this,"activeIndex",0),lf(this,"coordinateList",[]),lf(this,"layout","horizontal")}return ZR(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 eB(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&&re(n)&&re(a))return!0}return!1}function tB(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 g0(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 rB(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 g0(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 v0(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 Cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(r),!0).forEach(function(n){nB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nB(e,t,r){return t=aB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aB(e){var t=iB(e,"string");return bi(t)=="symbol"?t:t+""}function iB(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 oB(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=Gr;if(d==="ScatterChart")v=o,g=$N;else if(d==="BarChart")v=tB(f,o,l,u),g=Ou;else if(f==="radial"){var m=g0(o),b=m.cx,S=m.cy,x=m.radius,T=m.startAngle,y=m.endAngle;v={cx:b,cy:S,startAngle:T,endAngle:y,innerRadius:x,outerRadius:x},g=zg}else v={points:rB(f,o,l)},g=Gr;var w=Cs(Cs(Cs(Cs({stroke:"#ccc",pointerEvents:"none"},l),v),he(h,!1)),{},{payload:s,payloadIndex:c,className:ve("recharts-tooltip-cursor",h.className)});return O.isValidElement(h)?O.cloneElement(h,w):O.createElement(g,w)}var sB=["item"],lB=["children","className","width","height","style","compact","title","desc"];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 ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ra.apply(this,arguments)}function y0(e,t){return fB(e)||uB(e,t)||w0(e,t)||cB()}function cB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
289
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uB(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 fB(e){if(Array.isArray(e))return e}function b0(e,t){if(e==null)return{};var r=dB(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 dB(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 pB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hB(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,S0(n.key),n)}}function mB(e,t,r){return t&&hB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gB(e,t,r){return t=Es(t),vB(e,x0()?Reflect.construct(t,r||[],Es(e).constructor):t.apply(e,r))}function vB(e,t){if(t&&(ta(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yB(e)}function yB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x0=function(){return!!e})()}function Es(e){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Es(e)}function bB(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 na(e){return OB(e)||wB(e)||w0(e)||xB()}function xB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
290
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w0(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 wB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OB(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 O0(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 X(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O0(Object(r),!0).forEach(function(n){ue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ue(e,t,r){return t=S0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S0(e){var t=SB(e,"string");return ta(t)=="symbol"?t:t+""}function SB(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 AB={xAxis:["bottom","top"],yAxis:["left","right"]},TB={width:"100%",height:"100%"},A0={x:0,y:0};function $s(e){return e}var jB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},PB=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 X(X(X({},a),nt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return X(X(X({},a),nt(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return A0},Ms=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(na(s),na(c)):s},[]);return o.length>0?o:t&&t.length&&re(a)&&re(i)?t.slice(a,i+1):[]};function T0(e){return e==="number"?[0,"auto"]:void 0}var ff=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Ms(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(na(l),[$g(c,d)]):l},[])},j0=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=jB(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=l$(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,d=ff(t,r,u,f),h=PB(n,s,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},_B=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=Sg(u,i);return n.reduce(function(v,g){var m,b=g.type.defaultProps!==void 0?X(X({},g.type.defaultProps),g.props):g.props,S=b.type,x=b.dataKey,T=b.allowDataOverflow,y=b.allowDuplicatedCategory,w=b.scale,A=b.ticks,j=b.includeHidden,$=b[o];if(v[$])return v;var U=Ms(t.data,{graphicalItems:a.filter(function(W){var q,J=o in W.props?W.props[o]:(q=W.type.defaultProps)===null||q===void 0?void 0:q[o];return J===$}),dataStartIndex:l,dataEndIndex:c}),P=U.length,_,R,F;eB(b.domain,T,S)&&(_=Qc(b.domain,null,T),h&&(S==="number"||w!=="auto")&&(F=Ha(U,x,"category")));var z=T0(S);if(!_||_.length===0){var C,D=(C=b.domain)!==null&&C!==void 0?C:z;if(x){if(_=Ha(U,x,S),S==="category"&&h){var H=K2(_);y&&H?(R=_,_=ns(0,P)):y||(_=Eg(D,_,g).reduce(function(W,q){return W.indexOf(q)>=0?W:[].concat(na(W),[q])},[]))}else if(S==="category")y?_=_.filter(function(W){return W!==""&&!pe(W)}):_=Eg(D,_,g).reduce(function(W,q){return W.indexOf(q)>=0||q===""||pe(q)?W:[].concat(na(W),[q])},[]);else if(S==="number"){var V=p$(U,a.filter(function(W){var q,J,L=o in W.props?W.props[o]:(q=W.type.defaultProps)===null||q===void 0?void 0:q[o],G="hide"in W.props?W.props.hide:(J=W.type.defaultProps)===null||J===void 0?void 0:J.hide;return L===$&&(j||!G)}),x,i,u);V&&(_=V)}h&&(S==="number"||w!=="auto")&&(F=Ha(U,x,"category"))}else h?_=ns(0,P):s&&s[$]&&s[$].hasStack&&S==="number"?_=d==="expand"?[0,1]:Pg(s[$].stackGroups,l,c):_=Og(U,a.filter(function(W){var q=o in W.props?W.props[o]:W.type.defaultProps[o],J="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return q===$&&(j||!J)}),S,u,!0);if(S==="number")_=af(f,_,$,i,A),D&&(_=Qc(D,_,T));else if(S==="category"&&D){var E=D,N=_.every(function(W){return E.indexOf(W)>=0});N&&(_=E)}}return X(X({},v),{},ue({},$,X(X({},b),{},{axisType:i,domain:_,categoricalDomain:F,duplicateDomain:R,originalDomain:(m=b.domain)!==null&&m!==void 0?m:z,isCategorical:h,layout:u})))},{})},CB=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=Ms(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),h=d.length,v=Sg(u,i),g=-1;return n.reduce(function(m,b){var S=b.type.defaultProps!==void 0?X(X({},b.type.defaultProps),b.props):b.props,x=S[o],T=T0("number");if(!m[x]){g++;var y;return v?y=ns(0,h):s&&s[x]&&s[x].hasStack?(y=Pg(s[x].stackGroups,l,c),y=af(f,y,x,i)):(y=Qc(T,Og(d,n.filter(function(w){var A,j,$=o in w.props?w.props[o]:(A=w.type.defaultProps)===null||A===void 0?void 0:A[o],U="hide"in w.props?w.props.hide:(j=w.type.defaultProps)===null||j===void 0?void 0:j.hide;return $===x&&!U}),"number",u),a.defaultProps.allowDataOverflow),y=af(f,y,x,i)),X(X({},m),{},ue({},x,X(X({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ot(AB,"".concat(i,".").concat(g%2),null),domain:y,originalDomain:T,isCategorical:v,layout:u})))}return m},{})},EB=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=_B(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(h=CB(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},$B=function(t){var r=mr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Gl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Fo(r,n)}},P0=function(t){var r=t.children,n=t.defaultShowTooltip,a=gt(r,Ln),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}},MB=function(t){return!t||!t.length?!1:t.some(function(r){var n=er(r&&r.type);return n&&n.indexOf("Bar")>=0})},_0=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"}},kB=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,Ln),v=gt(f,yn),g=Object.keys(l).reduce(function(y,w){var A=l[w],j=A.orientation;return!A.mirror&&!A.hide?X(X({},y),{},ue({},j,y[j]+A.width)):y},{left:d.left||0,right:d.right||0}),m=Object.keys(o).reduce(function(y,w){var A=o[w],j=A.orientation;return!A.mirror&&!A.hide?X(X({},y),{},ue({},j,Ot(y,"".concat(j))+A.height)):y},{top:d.top||0,bottom:d.bottom||0}),b=X(X({},m),g),S=b.bottom;h&&(b.bottom+=h.props.height||Ln.defaultProps.height),v&&r&&(b=f$(b,a,n,r));var x=c-b.left-b.right,T=u-b.top-b.bottom;return X(X({brushBottom:S},b),{},{width:Math.max(x,0),height:Math.max(T,0)})},NB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},IB=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,S){var x=S.graphicalItems,T=S.stackGroups,y=S.offset,w=S.updateId,A=S.dataStartIndex,j=S.dataEndIndex,$=b.barSize,U=b.layout,P=b.barGap,_=b.barCategoryGap,R=b.maxBarSize,F=_0(U),z=F.numericAxisName,C=F.cateAxisName,D=MB(x),H=[];return x.forEach(function(V,E){var N=Ms(b.data,{graphicalItems:[V],dataStartIndex:A,dataEndIndex:j}),W=V.type.defaultProps!==void 0?X(X({},V.type.defaultProps),V.props):V.props,q=W.dataKey,J=W.maxBarSize,L=W["".concat(z,"Id")],G=W["".concat(C,"Id")],Q={},I=l.reduce(function(ke,ct){var Pi,_i,sa=S["".concat(ct.axisType,"Map")],Ci=W["".concat(ct.axisType,"Id")];sa&&sa[Ci]||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=V==null||(_i=V.type)===null||_i===void 0?void 0:_i.displayName)!==null&&Pi!==void 0?Pi:"")):ht());var Ei=sa[Ci];return X(X({},ke),{},ue(ue({},ct.axisType,Ei),"".concat(ct.axisType,"Ticks"),ur(Ei)))},Q),B=I[C],Y=I["".concat(C,"Ticks")],Z=T&&T[L]&&T[L].hasStack&&T$(V,T[L].stackGroups),M=er(V.type).indexOf("Bar")>=0,ee=Fo(B,Y),K=[],oe=D&&c$({barSize:$,stackGroups:T,totalSize:NB(I,C)});if(M){var ne,fe,Se=pe(J)?R:J,ce=(ne=(fe=Fo(B,Y,!0))!==null&&fe!==void 0?fe:Se)!==null&&ne!==void 0?ne:0;K=u$({barGap:P,barCategoryGap:_,bandSize:ce!==ee?ce:ee,sizeList:oe[G],maxBarSize:Se}),ce!==ee&&(K=K.map(function(ke){return X(X({},ke),{},{position:X(X({},ke.position),{},{offset:ke.position.offset-ce/2})})}))}var Ce=V&&V.type&&V.type.getComposedData;Ce&&H.push({props:X(X({},Ce(X(X({},I),{},{displayedData:N,props:b,dataKey:q,item:V,bandSize:ee,barPosition:K,offset:y,stackedData:Z,layout:U,dataStartIndex:A,dataEndIndex:j}))),{},ue(ue(ue({key:V.key||"item-".concat(E)},z,I[z]),C,I[C]),"animationId",w)),childIndex:sO(V,b.children),item:V})}),H},h=function(b,S){var x=b.props,T=b.dataStartIndex,y=b.dataEndIndex,w=b.updateId;if(!md({props:x}))return null;var A=x.children,j=x.layout,$=x.stackOffset,U=x.data,P=x.reverseStackOrder,_=_0(j),R=_.numericAxisName,F=_.cateAxisName,z=dt(A,n),C=O$(U,z,"".concat(R,"Id"),"".concat(F,"Id"),$,P),D=l.reduce(function(W,q){var J="".concat(q.axisType,"Map");return X(X({},W),{},ue({},J,EB(x,X(X({},q),{},{graphicalItems:z,stackGroups:q.axisType===R&&C,dataStartIndex:T,dataEndIndex:y}))))},{}),H=kB(X(X({},D),{},{props:x,graphicalItems:z}),S==null?void 0:S.legendBBox);Object.keys(D).forEach(function(W){D[W]=u(x,D[W],H,W.replace("Map",""),r)});var V=D["".concat(F,"Map")],E=$B(V),N=d(x,X(X({},D),{},{dataStartIndex:T,dataEndIndex:y,updateId:w,graphicalItems:z,stackGroups:C,offset:H}));return X(X({formattedGraphicalItems:N,graphicalItems:z,offset:H,stackGroups:C},E),D)},v=function(m){function b(S){var x,T,y;return pB(this,b),y=gB(this,b,[S]),ue(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(y,"accessibilityManager",new QR),ue(y,"handleLegendBBoxUpdate",function(w){if(w){var A=y.state,j=A.dataStartIndex,$=A.dataEndIndex,U=A.updateId;y.setState(X({legendBBox:w},h({props:y.props,dataStartIndex:j,dataEndIndex:$,updateId:U},X(X({},y.state),{},{legendBBox:w}))))}}),ue(y,"handleReceiveSyncEvent",function(w,A,j){if(y.props.syncId===w){if(j===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(A)}}),ue(y,"handleBrushChange",function(w){var A=w.startIndex,j=w.endIndex;if(A!==y.state.dataStartIndex||j!==y.state.dataEndIndex){var $=y.state.updateId;y.setState(function(){return X({dataStartIndex:A,dataEndIndex:j},h({props:y.props,dataStartIndex:A,dataEndIndex:j,updateId:$},y.state))}),y.triggerSyncEvent({dataStartIndex:A,dataEndIndex:j})}}),ue(y,"handleMouseEnter",function(w){var A=y.getMouseInfo(w);if(A){var j=X(X({},A),{},{isTooltipActive:!0});y.setState(j),y.triggerSyncEvent(j);var $=y.props.onMouseEnter;me($)&&$(j,w)}}),ue(y,"triggeredAfterMouseMove",function(w){var A=y.getMouseInfo(w),j=A?X(X({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(j),y.triggerSyncEvent(j);var $=y.props.onMouseMove;me($)&&$(j,w)}),ue(y,"handleItemMouseEnter",function(w){y.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ue(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),ue(y,"handleMouseMove",function(w){w.persist(),y.throttleTriggeredAfterMouseMove(w)}),ue(y,"handleMouseLeave",function(w){y.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var j=y.props.onMouseLeave;me(j)&&j(A,w)}),ue(y,"handleOuterEvent",function(w){var A=oO(w),j=Ot(y.props,"".concat(A));if(A&&me(j)){var $,U;/.*touch.*/i.test(A)?U=y.getMouseInfo(w.changedTouches[0]):U=y.getMouseInfo(w),j(($=U)!==null&&$!==void 0?$:{},w)}}),ue(y,"handleClick",function(w){var A=y.getMouseInfo(w);if(A){var j=X(X({},A),{},{isTooltipActive:!0});y.setState(j),y.triggerSyncEvent(j);var $=y.props.onClick;me($)&&$(j,w)}}),ue(y,"handleMouseDown",function(w){var A=y.props.onMouseDown;if(me(A)){var j=y.getMouseInfo(w);A(j,w)}}),ue(y,"handleMouseUp",function(w){var A=y.props.onMouseUp;if(me(A)){var j=y.getMouseInfo(w);A(j,w)}}),ue(y,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ue(y,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseDown(w.changedTouches[0])}),ue(y,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&y.handleMouseUp(w.changedTouches[0])}),ue(y,"handleDoubleClick",function(w){var A=y.props.onDoubleClick;if(me(A)){var j=y.getMouseInfo(w);A(j,w)}}),ue(y,"handleContextMenu",function(w){var A=y.props.onContextMenu;if(me(A)){var j=y.getMouseInfo(w);A(j,w)}}),ue(y,"triggerSyncEvent",function(w){y.props.syncId!==void 0&&of.emit(sf,y.props.syncId,w,y.eventEmitterSymbol)}),ue(y,"applySyncEvent",function(w){var A=y.props,j=A.layout,$=A.syncMethod,U=y.state.updateId,P=w.dataStartIndex,_=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)y.setState(X({dataStartIndex:P,dataEndIndex:_},h({props:y.props,dataStartIndex:P,dataEndIndex:_,updateId:U},y.state)));else if(w.activeTooltipIndex!==void 0){var R=w.chartX,F=w.chartY,z=w.activeTooltipIndex,C=y.state,D=C.offset,H=C.tooltipTicks;if(!D)return;if(typeof $=="function")z=$(H,w);else if($==="value"){z=-1;for(var V=0;V<H.length;V++)if(H[V].value===w.activeLabel){z=V;break}}var E=X(X({},D),{},{x:D.left,y:D.top}),N=Math.min(R,E.x+E.width),W=Math.min(F,E.y+E.height),q=H[z]&&H[z].value,J=ff(y.state,y.props.data,z),L=H[z]?{x:j==="horizontal"?H[z].coordinate:N,y:j==="horizontal"?W:H[z].coordinate}:A0;y.setState(X(X({},w),{},{activeLabel:q,activeCoordinate:L,activePayload:J,activeTooltipIndex:z}))}else y.setState(w)}),ue(y,"renderCursor",function(w){var A,j=y.state,$=j.isTooltipActive,U=j.activeCoordinate,P=j.activePayload,_=j.offset,R=j.activeTooltipIndex,F=j.tooltipAxisBandSize,z=y.getTooltipEventType(),C=(A=w.props.active)!==null&&A!==void 0?A:$,D=y.props.layout,H=w.key||"_recharts-cursor";return O.createElement(oB,{key:H,activeCoordinate:U,activePayload:P,activeTooltipIndex:R,chartName:r,element:w,isActive:C,layout:D,offset:_,tooltipAxisBandSize:F,tooltipEventType:z})}),ue(y,"renderPolarAxis",function(w,A,j){var $=Ot(w,"type.axisType"),U=Ot(y.state,"".concat($,"Map")),P=w.type.defaultProps,_=P!==void 0?X(X({},P),w.props):w.props,R=U&&U[_["".concat($,"Id")]];return O.cloneElement(w,X(X({},R),{},{className:ve($,R.className),key:w.key||"".concat(A,"-").concat(j),ticks:ur(R,!0)}))}),ue(y,"renderPolarGrid",function(w){var A=w.props,j=A.radialLines,$=A.polarAngles,U=A.polarRadius,P=y.state,_=P.radiusAxisMap,R=P.angleAxisMap,F=mr(_),z=mr(R),C=z.cx,D=z.cy,H=z.innerRadius,V=z.outerRadius;return O.cloneElement(w,{polarAngles:Array.isArray($)?$:ur(z,!0).map(function(E){return E.coordinate}),polarRadius:Array.isArray(U)?U:ur(F,!0).map(function(E){return E.coordinate}),cx:C,cy:D,innerRadius:H,outerRadius:V,key:w.key||"polar-grid",radialLines:j})}),ue(y,"renderLegend",function(){var w=y.state.formattedGraphicalItems,A=y.props,j=A.children,$=A.width,U=A.height,P=y.props.margin||{},_=$-(P.left||0)-(P.right||0),R=yg({children:j,formattedGraphicalItems:w,legendWidth:_,legendContent:c});if(!R)return null;var F=R.item,z=b0(R,sB);return O.cloneElement(F,X(X({},z),{},{chartWidth:$,chartHeight:U,margin:P,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ue(y,"renderTooltip",function(){var w,A=y.props,j=A.children,$=A.accessibilityLayer,U=gt(j,Wt);if(!U)return null;var P=y.state,_=P.isTooltipActive,R=P.activeCoordinate,F=P.activePayload,z=P.activeLabel,C=P.offset,D=(w=U.props.active)!==null&&w!==void 0?w:_;return O.cloneElement(U,{viewBox:X(X({},C),{},{x:C.left,y:C.top}),active:D,label:z,payload:D?F:[],coordinate:R,accessibilityLayer:$})}),ue(y,"renderBrush",function(w){var A=y.props,j=A.margin,$=A.data,U=y.state,P=U.offset,_=U.dataStartIndex,R=U.dataEndIndex,F=U.updateId;return O.cloneElement(w,{key:w.key||"_recharts-brush",onChange:Bo(y.handleBrushChange,w.props.onChange),data:$,x:re(w.props.x)?w.props.x:P.left,y:re(w.props.y)?w.props.y:P.top+P.height+P.brushBottom-(j.bottom||0),width:re(w.props.width)?w.props.width:P.width,startIndex:_,endIndex:R,updateId:"brush-".concat(F)})}),ue(y,"renderReferenceElement",function(w,A,j){if(!w)return null;var $=y,U=$.clipPathId,P=y.state,_=P.xAxisMap,R=P.yAxisMap,F=P.offset,z=w.type.defaultProps||{},C=w.props,D=C.xAxisId,H=D===void 0?z.xAxisId:D,V=C.yAxisId,E=V===void 0?z.yAxisId:V;return O.cloneElement(w,{key:w.key||"".concat(A,"-").concat(j),xAxis:_[H],yAxis:R[E],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:U})}),ue(y,"renderActivePoints",function(w){var A=w.item,j=w.activePoint,$=w.basePoint,U=w.childIndex,P=w.isRange,_=[],R=A.props.key,F=A.item.type.defaultProps!==void 0?X(X({},A.item.type.defaultProps),A.item.props):A.item.props,z=F.activeDot,C=F.dataKey,D=X(X({index:U,dataKey:C,cx:j.x,cy:j.y,r:4,fill:Zc(A.item),strokeWidth:2,stroke:"#fff",payload:j.payload,value:j.value},he(z,!1)),Bi(z));return _.push(b.renderActiveDot(z,D,"".concat(R,"-activePoint-").concat(U))),$?_.push(b.renderActiveDot(z,X(X({},D),{},{cx:$.x,cy:$.y}),"".concat(R,"-basePoint-").concat(U))):P&&_.push(null),_}),ue(y,"renderGraphicChild",function(w,A,j){var $=y.filterFormatItem(w,A,j);if(!$)return null;var U=y.getTooltipEventType(),P=y.state,_=P.isTooltipActive,R=P.tooltipAxis,F=P.activeTooltipIndex,z=P.activeLabel,C=y.props.children,D=gt(C,Wt),H=$.props,V=H.points,E=H.isRange,N=H.baseLine,W=$.item.type.defaultProps!==void 0?X(X({},$.item.type.defaultProps),$.item.props):$.item.props,q=W.activeDot,J=W.hide,L=W.activeBar,G=W.activeShape,Q=!!(!J&&_&&D&&(q||L||G)),I={};U!=="axis"&&D&&D.props.trigger==="click"?I={onClick:Bo(y.handleItemMouseEnter,w.props.onClick)}:U!=="axis"&&(I={onMouseLeave:Bo(y.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:Bo(y.handleItemMouseEnter,w.props.onMouseEnter)});var B=O.cloneElement(w,X(X({},$.props),I));function Y(ct){return typeof R.dataKey=="function"?R.dataKey(ct.payload):null}if(Q)if(F>=0){var Z,M;if(R.dataKey&&!R.allowDuplicatedCategory){var ee=typeof R.dataKey=="function"?Y:"payload.".concat(R.dataKey.toString());Z=Ri(V,ee,z),M=E&&N&&Ri(N,ee,z)}else Z=V==null?void 0:V[F],M=E&&N&&N[F];if(G||L){var K=w.props.activeIndex!==void 0?w.props.activeIndex:F;return[O.cloneElement(w,X(X(X({},$.props),I),{},{activeIndex:K})),null,null]}if(!pe(Z))return[B].concat(na(y.renderActivePoints({item:$,activePoint:Z,basePoint:M,childIndex:F,isRange:E})))}else{var oe,ne=(oe=y.getItemByXY(y.state.activeCoordinate))!==null&&oe!==void 0?oe:{graphicalItem:B},fe=ne.graphicalItem,Se=fe.item,ce=Se===void 0?w:Se,Ce=fe.childIndex,ke=X(X(X({},$.props),I),{},{activeIndex:Ce});return[O.cloneElement(ce,ke),null,null]}return E?[B,null,null]:[B,null]}),ue(y,"renderCustomized",function(w,A,j){return O.cloneElement(w,X(X({key:"recharts-customized-".concat(j)},y.props),y.state))}),ue(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=S.id)!==null&&x!==void 0?x:Mr("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=mh(y.triggeredAfterMouseMove,(T=S.throttleDelay)!==null&&T!==void 0?T:1e3/60),y.state={},y}return bB(b,m),mB(b,[{key:"componentDidMount",value:function(){var x,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,T=x.children,y=x.data,w=x.height,A=x.layout,j=gt(T,Wt);if(j){var $=j.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,P=ff(this.state,y,$,U),_=this.state.tooltipTicks[$].coordinate,R=(this.state.offset.top+w)/2,F=A==="horizontal",z=F?{x:_,y:R}:{y:_,x:R},C=this.state.formattedGraphicalItems.find(function(H){var V=H.item;return V.type.name==="Scatter"});C&&(z=X(X({},z),C.props.points[$].tooltipPosition),P=C.props.points[$].tooltipPayload);var D={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:U,activePayload:P,activeCoordinate:z};this.setState(D),this.renderCursor(j),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.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([gt(x.children,Wt)],[gt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=gt(this.props.children,Wt);if(x&&typeof x.props.shared=="boolean"){var T=x.props.shared?"axis":"item";return s.indexOf(T)>=0?T:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var T=this.container,y=T.getBoundingClientRect(),w=IP(y),A={chartX:Math.round(x.pageX-w.left),chartY:Math.round(x.pageY-w.top)},j=y.width/T.offsetWidth||1,$=this.inRange(A.chartX,A.chartY,j);if(!$)return null;var U=this.state,P=U.xAxisMap,_=U.yAxisMap,R=this.getTooltipEventType(),F=j0(this.state,this.props.data,this.props.layout,$);if(R!=="axis"&&P&&_){var z=mr(P).scale,C=mr(_).scale,D=z&&z.invert?z.invert(A.chartX):null,H=C&&C.invert?C.invert(A.chartY):null;return X(X({},A),{},{xValue:D,yValue:H},F)}return F?X(X({},A),F):null}},{key:"inRange",value:function(x,T){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,A=x/y,j=T/y;if(w==="horizontal"||w==="vertical"){var $=this.state.offset,U=A>=$.left&&A<=$.left+$.width&&j>=$.top&&j<=$.top+$.height;return U?{x:A,y:j}:null}var P=this.state,_=P.angleAxisMap,R=P.radiusAxisMap;if(_&&R){var F=mr(_);return Ng({x:A,y:j},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,T=this.getTooltipEventType(),y=gt(x,Wt),w={};y&&T==="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 A=Bi(this.props,this.handleOuterEvent);return X(X({},A),w)}},{key:"addListener",value:function(){of.on(sf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){of.removeListener(sf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,T,y){for(var w=this.state.formattedGraphicalItems,A=0,j=w.length;A<j;A++){var $=w[A];if($.item===x||$.props.key===x.key||T===er($.item.type)&&y===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,T=this.state.offset,y=T.left,w=T.top,A=T.height,j=T.width;return O.createElement("defs",null,O.createElement("clipPath",{id:x},O.createElement("rect",{x:y,y:w,height:A,width:j})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],j=w[1];return X(X({},T),{},ue({},A,j.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(T,y){var w=y0(y,2),A=w[0],j=w[1];return X(X({},T),{},ue({},A,j.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[x])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(x){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[x])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(x){var T=this.state,y=T.formattedGraphicalItems,w=T.activeItem;if(y&&y.length)for(var A=0,j=y.length;A<j;A++){var $=y[A],U=$.props,P=$.item,_=P.type.defaultProps!==void 0?X(X({},P.type.defaultProps),P.props):P.props,R=er(P.type);if(R==="Bar"){var F=(U.data||[]).find(function(H){return wN(x,H)});if(F)return{graphicalItem:$,payload:F}}else if(R==="RadialBar"){var z=(U.data||[]).find(function(H){return Ng(x,H)});if(z)return{graphicalItem:$,payload:z}}else if(ts($,w)||rs($,w)||ci($,w)){var C=S7({graphicalItem:$,activeTooltipItem:w,itemData:_.data}),D=_.activeIndex===void 0?C:_.activeIndex;return{graphicalItem:X(X({},$),{},{childIndex:D}),payload:ci($,w)?_.data[C]:$.props.data[C]}}}return null}},{key:"render",value:function(){var x=this;if(!md(this))return null;var T=this.props,y=T.children,w=T.className,A=T.width,j=T.height,$=T.style,U=T.compact,P=T.title,_=T.desc,R=b0(T,lB),F=he(R,!1);if(U)return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement(pl,ra({},F,{width:A,height:j,title:P,desc:_}),this.renderClipPath(),yd(y,this.renderMap)));if(this.props.accessibilityLayer){var z,C;F.tabIndex=(z=this.props.tabIndex)!==null&&z!==void 0?z:0,F.role=(C=this.props.role)!==null&&C!==void 0?C:"application",F.onKeyDown=function(H){x.accessibilityManager.keyboardEvent(H)},F.onFocus=function(){x.accessibilityManager.focus()}}var D=this.parseEventsOfWrapper();return O.createElement(gy,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement("div",ra({className:ve("recharts-wrapper",w),style:X({position:"relative",cursor:"default",width:A,height:j},$)},D,{ref:function(V){x.container=V}}),O.createElement(pl,ra({},F,{width:A,height:j,title:P,desc:_,style:TB}),this.renderClipPath(),yd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(O.Component);ue(v,"displayName",r),ue(v,"defaultProps",X({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ue(v,"getDerivedStateFromProps",function(m,b){var S=m.dataKey,x=m.data,T=m.children,y=m.width,w=m.height,A=m.layout,j=m.stackOffset,$=m.margin,U=b.dataStartIndex,P=b.dataEndIndex;if(b.updateId===void 0){var _=P0(m);return X(X(X({},_),{},{updateId:0},h(X(X({props:m},_),{},{updateId:0}),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:j,prevMargin:$,prevChildren:T})}if(S!==b.prevDataKey||x!==b.prevData||y!==b.prevWidth||w!==b.prevHeight||A!==b.prevLayout||j!==b.prevStackOffset||!fn($,b.prevMargin)){var R=P0(m),F={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},z=X(X({},j0(b,x,A)),{},{updateId:b.updateId+1}),C=X(X(X({},R),F),z);return X(X(X({},C),h(X({props:m},C),b)),{},{prevDataKey:S,prevData:x,prevWidth:y,prevHeight:w,prevLayout:A,prevStackOffset:j,prevMargin:$,prevChildren:T})}if(!fl(T,b.prevChildren)){var D,H,V,E,N=gt(T,Ln),W=N&&(D=(H=N.props)===null||H===void 0?void 0:H.startIndex)!==null&&D!==void 0?D:U,q=N&&(V=(E=N.props)===null||E===void 0?void 0:E.endIndex)!==null&&V!==void 0?V:P,J=W!==U||q!==P,L=!pe(x),G=L&&!J?b.updateId:b.updateId+1;return X(X({updateId:G},h(X(X({props:m},b),{},{updateId:G,dataStartIndex:W,dataEndIndex:q}),b)),{},{prevChildren:T,dataStartIndex:W,dataEndIndex:q})}return null}),ue(v,"renderActiveDot",function(m,b,S){var x;return O.isValidElement(m)?x=O.cloneElement(m,b):me(m)?x=m(b):x=O.createElement(Jo,b),O.createElement(Oe,{className:"recharts-active-dot",key:S},x)});var g=O.forwardRef(function(b,S){return O.createElement(v,ra({},b,{ref:S}))});return g.displayName=v.displayName,g},DB=IB({chartName:"ComposedChart",GraphicalChild:[mi,jr,Fn,As],axisComponents:[{axisType:"xAxis",AxisComp:js},{axisType:"yAxis",AxisComp:_s},{axisType:"zAxis",AxisComp:Os}],formatAxisMap:KI});const aa=({className:e,width:t,height:r,rounded:n=!1})=>p.jsx("div",{className:le("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:le("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(aa,{className:"h-[16px] w-[64px]"}),p.jsx(aa,{className:"h-[16px] w-[16px]",rounded:!0})]}),p.jsxs("div",{className:"flex items-baseline gap-[12px]",children:[p.jsx(aa,{className:"h-[32px] w-[80px]"}),p.jsx(aa,{className:"h-[24px] w-[48px] rounded-md"})]})]}),C0=({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(aa,{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:le("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"})]})]})]})})},LB=({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:le("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:le("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:le("text-xs",i?"text-gray-300":"text-gray-600"),children:s.name})]}),p.jsx("span",{className:le("font-medium text-xs",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},E0=({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=(A=>{if(!A||A.length===0)return[];const j=[...A].sort((F,z)=>{const C=new Date(F.date),D=new Date(z.date);return C.getTime()-D.getTime()});let $,U;l!=null&&l.start&&(l!=null&&l.end)?($=new Date(l.start),U=new Date(l.end)):($=new Date(j[0].date),U=new Date(j[j.length-1].date));const P=new Map;j.forEach(F=>{P.set(F.date,F)});const _=[],R=new Date($);for(;R<=U;){const F=R.toISOString().split("T")[0];if(P.has(F))_.push(P.get(F));else{const z={date:F,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 C=j[0];Object.keys(C).forEach(D=>{typeof C[D]=="number"&&!(D in z)&&(z[D]=0)})}_.push(z)}R.setDate(R.getDate()+1)}return _})(a),v=A=>{const j=new Date(A);return isNaN(j.getTime())?A:j.toLocaleDateString("en-US",{month:"short",day:"numeric"})},g=()=>{if(!h||h.length===0)return 0;const A=h.length;return A<=20?0:A<=31?1:A<=61?2:Math.floor(A/7)-1},m=A=>b()&&!Number.isInteger(A)?"":A>=1e3?`${Math.floor(A/1e3)}k`:Math.floor(A).toString(),b=()=>{const A=["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&&A.some(j=>c.toLowerCase().includes(j.toLowerCase()))||i&&A.some(j=>i.toLowerCase().includes(j.toLowerCase()))||e.title&&A.some(j=>e.title.toLowerCase().includes(j.toLowerCase()))||s&&s.some(j=>j.label&&A.some($=>j.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(C0,{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:le("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 T=A=>{var $;if(!n||!A||!A.activePayload)return;const j=($=A.activePayload[0])==null?void 0:$.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:(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:le("w-full",t),children:[p.jsx("div",{className:"relative bg-gray-50/30",children:p.jsx(_P,{width:"100%",height:u,children:p.jsxs(DB,{data:h,onClick:T,margin:{top:20,right:30,left:20,bottom:20},children:[p.jsx("defs",{children:x.map((A,j)=>p.jsxs("linearGradient",{id:`gradient-${A.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:A.color,stopOpacity:.08}),p.jsx("stop",{offset:"95%",stopColor:A.color,stopOpacity:.01})]},`gradient-${j}`))}),p.jsx(Wy,{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(Wt,{content:A=>p.jsx(LB,{...A,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),x.map(A=>p.jsx(jr,{type:"monotone",dataKey:A.dataKey,stroke:"none",fill:`url(#gradient-${A.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${A.dataKey}`)),x.map(A=>p.jsx(mi,{type:"monotone",dataKey:A.dataKey,stroke:A.color,strokeWidth:2.5,strokeDasharray:A.strokeDasharray,dot:!1,activeDot:{r:5,fill:A.color,stroke:A.color,strokeWidth:2},name:A.label},A.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(A=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-[8px] h-[8px] rounded-full",style:{backgroundColor:A.color}}),p.jsx("span",{className:"text-xs text-gray-600",children:A.label})]},A.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]=O.useState(o.defaultSort||null),[u,f]=O.useState(""),[d,h]=O.useState(1),v=O.useMemo(()=>{let y=[...n];return s.searchable&&u&&(y=y.filter(w=>a.some(A=>{const j=w[A.key];return j==null?void 0:j.toString().toLowerCase().includes(u.toLowerCase())}))),l&&y.sort((w,A)=>{const j=w[l.key],$=A[l.key];if(typeof j=="number"&&typeof $=="number")return l.order==="asc"?j-$:$-j;const U=(j==null?void 0:j.toString())||"",P=($==null?void 0:$.toString())||"",_=U.localeCompare(P);return l.order==="asc"?_:-_}),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"})},S=y=>{f(y),h(1)},x=(y,w,A)=>w.render?w.render(y,A):w.formatter?w.formatter(y,A):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",T=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?p.jsx(jf,{className:"w-[16px] h-[16px]"}):p.jsx(fr,{className:"w-[16px] h-[16px]"}):p.jsxs("div",{className:"flex flex-col",children:[p.jsx(jf,{className:"w-[12px] h-[12px] opacity-30"}),p.jsx(fr,{className:"w-[12px] h-[12px] opacity-30 -mt-1"})]});return p.jsxs("div",{className:le("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(kf,{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=>S(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:le("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}),T(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(A=>p.jsx("td",{className:le("px-[16px] py-[12px] text-xs text-gray-900",A.align==="center"&&"text-center",A.align==="right"&&"text-right"),children:x(y[A.key],A,y)},A.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 A=Math.max(1,Math.min(g-4,d-2))+w;return A>g?null:p.jsx("button",{onClick:()=>h(A),className:le("px-[12px] py-[4px] text-xs border rounded",d===A?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:A},A)}),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."})]})},df=window.location.protocol+"//"+window.location.host,RB=(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"}},BB=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},FB=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;if(t==="model")return"";const r=RB(e.type||"human",t);return`${df}/agenticai/assets/${r}/${e.name.replace("agent","avatar")}.svg`},M0=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"},UB={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"},WB=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
291
+ <path d="M11.1369 12.756L11.4432 13.7079L12.0888 13.0622L11.1369 12.756ZM12.2381 9.33333L13.19 9.02706L11.2862 9.02706L12.2381 9.33333ZM13.3393 12.756L12.3873 13.0622L13.033 13.7079L13.3393 12.756ZM16.7619 13.8571L17.0682 14.8091V12.9052L16.7619 13.8571ZM13.3393 14.9583L13.033 14.0064L12.3873 14.6521L13.3393 14.9583ZM12.2381 18.381L11.2862 18.6872H13.19L12.2381 18.381ZM11.1369 14.9583L12.0888 14.6521L11.4432 14.0064L11.1369 14.9583ZM7.71429 13.8571L7.40801 12.9052L7.40801 14.8091L7.71429 13.8571ZM19.4762 8.42857H18.4762L18.4762 8.43262L19.4762 8.42857ZM19.3837 6.8213L20.3496 6.56248V6.56248L19.3837 6.8213ZM15.8571 3.80952C15.3049 3.80952 14.8571 4.25724 14.8571 4.80952C14.8571 5.36181 15.3049 5.80952 15.8571 5.80952V3.80952ZM17.4644 4.90201L17.2056 5.86794H17.2056L17.4644 4.90201ZM5.29584 19.6132L6.18685 19.1592L6.18685 19.1592L5.29584 19.6132ZM6.48203 20.7994L6.02803 21.6904H6.02804L6.48203 20.7994ZM8.61905 5.80952C9.17133 5.80952 9.61905 5.36181 9.61905 4.80952C9.61905 4.25724 9.17133 3.80952 8.61905 3.80952V5.80952ZM7.01178 4.90201L7.2706 5.86794L7.01178 4.90201ZM5.09249 6.8213L6.05841 7.08012H6.05841L5.09249 6.8213ZM9.11306 6.52043L9.56705 5.62943L9.11306 6.52043ZM8.71766 6.12504L9.60867 5.67105L8.71766 6.12504ZM15.7585 6.12504L14.8675 5.67105L15.7585 6.12504ZM15.3631 6.52043L14.9091 5.62943L15.3631 6.52043ZM15.3631 3.09861L14.9091 3.98962L15.3631 3.09861ZM15.7585 3.49401L14.8675 3.948L15.7585 3.49401ZM9.11306 3.09861L9.56705 3.98962L9.11306 3.09861ZM8.71766 3.49401L9.60867 3.948L8.71766 3.49401ZM11.5 22.0952H12.5V20.0952H11.5V22.0952ZM18.4988 14.004L18.5028 15.004L20.5028 14.9959L20.4987 13.996L18.4988 14.004ZM16.7619 18.381L17.2658 19.2447L17.4931 19.1121L17.6257 18.8848L16.7619 18.381ZM17.4987 17.1178L18.3625 16.6139L17.4987 15.1332L16.635 16.6139L17.4987 17.1178ZM18.2356 18.381L17.3718 18.8848L17.5044 19.1121L17.7317 19.2447L18.2356 18.381ZM19.4987 19.1178L20.0026 19.9816L21.4834 19.1178L20.0026 18.254L19.4987 19.1178ZM18.2356 19.8546L17.7317 18.9909L17.5044 19.1235L17.3718 19.3508L18.2356 19.8546ZM17.4987 21.1178L16.635 21.6217L17.4987 23.1024L18.3625 21.6217L17.4987 21.1178ZM16.7619 19.8546L17.6257 19.3508L17.4931 19.1235L17.2658 18.9909L16.7619 19.8546ZM15.4987 19.1178L14.9949 18.254L13.5141 19.1178L14.9949 19.9816L15.4987 19.1178ZM12.0888 13.0622L13.19 9.63961L11.2862 9.02706L10.185 12.4497L12.0888 13.0622ZM11.2862 9.63961L12.3873 13.0622L14.2912 12.4497L13.19 9.02706L11.2862 9.63961ZM13.033 13.7079L16.4556 14.8091L17.0682 12.9052L13.6456 11.804L13.033 13.7079ZM16.4556 12.9052L13.033 14.0064L13.6456 15.9103L17.0682 14.8091L16.4556 12.9052ZM12.3873 14.6521L11.2862 18.0747L13.19 18.6872L14.2912 15.2646L12.3873 14.6521ZM13.19 18.0747L12.0888 14.6521L10.185 15.2646L11.2862 18.6872L13.19 18.0747ZM11.4432 14.0064L8.02056 12.9052L7.40801 14.8091L10.8306 15.9103L11.4432 14.0064ZM8.02056 14.8091L11.4432 13.7079L10.8306 11.804L7.40801 12.9052L8.02056 14.8091ZM6 16.7524V8.42857H4V16.7524H6ZM20.4762 8.42857C20.4762 7.65155 20.4848 7.06687 20.3496 6.56248L18.4178 7.08012C18.4676 7.26606 18.4762 7.52279 18.4762 8.42857H20.4762ZM15.8571 5.80952C16.7629 5.80952 17.0196 5.81811 17.2056 5.86794L17.7232 3.93609C17.2188 3.80093 16.6342 3.80952 15.8571 3.80952V5.80952ZM20.3496 6.56248C20.0062 5.28071 19.005 4.27953 17.7232 3.93609L17.2056 5.86794C17.7972 6.02645 18.2593 6.48853 18.4178 7.08012L20.3496 6.56248ZM4 16.7524C4 17.496 3.99922 18.1138 4.0403 18.6166C4.08233 19.131 4.17311 19.6124 4.40483 20.0672L6.18685 19.1592C6.12273 19.0334 6.06559 18.8445 6.03366 18.4537C6.00078 18.0512 6 17.529 6 16.7524H4ZM9.34286 20.0952C8.56628 20.0952 8.044 20.0945 7.64155 20.0616C7.25078 20.0297 7.06186 19.9725 6.93602 19.9084L6.02804 21.6904C6.48281 21.9221 6.96423 22.0129 7.47869 22.0549C7.98147 22.096 8.59929 22.0952 9.34286 22.0952V20.0952ZM4.40483 20.0672C4.76093 20.7661 5.32915 21.3343 6.02803 21.6904L6.93602 19.9084C6.61345 19.744 6.3512 19.4818 6.18685 19.1592L4.40483 20.0672ZM8.61905 3.80952C7.84203 3.80952 7.25735 3.80093 6.75296 3.93609L7.2706 5.86794C7.45654 5.81811 7.71326 5.80952 8.61905 5.80952V3.80952ZM6 8.42857C6 7.52279 6.00859 7.26606 6.05841 7.08012L4.12656 6.56248C3.99141 7.06687 4 7.65155 4 8.42857H6ZM6.75296 3.93609C5.47119 4.27953 4.47001 5.28071 4.12656 6.56248L6.05841 7.08012C6.21693 6.48853 6.67901 6.02645 7.2706 5.86794L6.75296 3.93609ZM10.0667 4H14.4095V2H10.0667V4ZM14.8571 4.44762V5.17143H16.8571V4.44762H14.8571ZM14.4095 5.61905H10.0667V7.61905H14.4095V5.61905ZM9.61905 5.17143V4.44762H7.61905V5.17143H9.61905ZM10.0667 5.61905C9.79681 5.61905 9.65456 5.61827 9.55385 5.61004C9.46482 5.60277 9.49935 5.59493 9.56705 5.62943L8.65907 7.41144C8.9203 7.54455 9.17828 7.58602 9.39099 7.6034C9.59203 7.61983 9.82981 7.61905 10.0667 7.61905V5.61905ZM7.61905 5.17143C7.61905 5.40829 7.61827 5.64607 7.6347 5.84711C7.65207 6.05982 7.69355 6.31779 7.82665 6.57903L9.60867 5.67105C9.64316 5.73875 9.63533 5.77327 9.62805 5.68424C9.61983 5.58354 9.61905 5.44129 9.61905 5.17143H7.61905ZM9.56705 5.62943C9.58497 5.63856 9.59954 5.65313 9.60867 5.67105L7.82665 6.57903C8.00927 6.93743 8.30066 7.22883 8.65907 7.41144L9.56705 5.62943ZM14.8571 5.17143C14.8571 5.44129 14.8564 5.58354 14.8481 5.68424C14.8409 5.77327 14.833 5.73875 14.8675 5.67105L16.6495 6.57903C16.7826 6.31779 16.8241 6.05982 16.8415 5.84711C16.8579 5.64607 16.8571 5.40829 16.8571 5.17143H14.8571ZM14.4095 7.61905C14.6464 7.61905 14.8842 7.61983 15.0852 7.6034C15.2979 7.58602 15.5559 7.54455 15.8171 7.41144L14.9091 5.62943C14.9768 5.59493 15.0114 5.60277 14.9223 5.61004C14.8216 5.61827 14.6794 5.61905 14.4095 5.61905V7.61905ZM14.8675 5.67105C14.8767 5.65313 14.8912 5.63856 14.9091 5.62943L15.8171 7.41144C16.1755 7.22882 16.4669 6.93743 16.6495 6.57903L14.8675 5.67105ZM14.4095 4C14.6794 4 14.8216 4.00078 14.9223 4.00901C15.0114 4.01628 14.9768 4.02411 14.9091 3.98962L15.8171 2.20761C15.5559 2.0745 15.2979 2.03303 15.0852 2.01565C14.8842 1.99922 14.6464 2 14.4095 2V4ZM16.8571 4.44762C16.8571 4.21076 16.8579 3.97298 16.8415 3.77194C16.8241 3.55923 16.7826 3.30126 16.6495 3.04002L14.8675 3.948C14.833 3.8803 14.8409 3.84578 14.8481 3.93481C14.8564 4.03551 14.8571 4.17776 14.8571 4.44762H16.8571ZM14.9091 3.98962C14.8912 3.98049 14.8767 3.96592 14.8675 3.948L16.6495 3.04002C16.4669 2.68162 16.1755 2.39022 15.8171 2.20761L14.9091 3.98962ZM10.0667 2C9.82981 2 9.59203 1.99922 9.39099 2.01565C9.17828 2.03303 8.9203 2.0745 8.65907 2.20761L9.56705 3.98962C9.49935 4.02411 9.46482 4.01628 9.55385 4.00901C9.65456 4.00078 9.79681 4 10.0667 4V2ZM9.61905 4.44762C9.61905 4.17776 9.61983 4.03551 9.62805 3.93481C9.63533 3.84578 9.64316 3.8803 9.60867 3.948L7.82665 3.04002C7.69355 3.30126 7.65207 3.55923 7.6347 3.77194C7.61827 3.97298 7.61905 4.21076 7.61905 4.44762H9.61905ZM8.65907 2.20761C8.30066 2.39022 8.00927 2.68161 7.82665 3.04002L9.60867 3.948C9.59954 3.96592 9.58497 3.98049 9.56705 3.98962L8.65907 2.20761ZM11.5 20.0952H9.34286V22.0952H11.5V20.0952ZM18.4762 8.43262L18.4988 14.004L20.4987 13.996L20.4762 8.42452L18.4762 8.43262ZM17.6257 18.8848L18.3625 17.6217L16.635 16.6139L15.8981 17.8771L17.6257 18.8848ZM16.635 17.6217L17.3718 18.8848L19.0994 17.8771L18.3625 16.6139L16.635 17.6217ZM17.7317 19.2447L18.9949 19.9816L20.0026 18.254L18.7395 17.5172L17.7317 19.2447ZM18.9949 18.254L17.7317 18.9909L18.7395 20.7184L20.0026 19.9816L18.9949 18.254ZM17.3718 19.3508L16.635 20.6139L18.3625 21.6217L19.0994 20.3585L17.3718 19.3508ZM18.3625 20.6139L17.6257 19.3508L15.8981 20.3585L16.635 21.6217L18.3625 20.6139ZM17.2658 18.9909L16.0026 18.254L14.9949 19.9816L16.258 20.7184L17.2658 18.9909ZM16.0026 19.9816L17.2658 19.2447L16.258 17.5172L14.9949 18.254L16.0026 19.9816Z" fill="#101828"/>
292
+ </svg>`,zB=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
293
+ <path d="M7.95308 19.3837C5.20882 17.923 3.47632 14.9791 3.63905 11.7894L3.65435 11.574M3.65435 11.574C4.04637 11.6215 4.41038 11.3536 4.47669 10.9615C4.54492 10.558 4.27201 10.1758 3.86712 10.1078C3.46223 10.0398 3.07869 10.3118 3.01046 10.7153C2.94222 11.1188 3.21513 11.501 3.62002 11.569C3.63148 11.571 3.64293 11.5726 3.65435 11.574ZM4.29489 8.06912C5.71757 5.31173 8.64409 3.53937 11.8468 3.65173L12.0632 3.66361M12.0632 3.66361C12.0216 4.05499 12.2961 4.41353 12.6905 4.47348C13.0964 4.53517 13.4756 4.25725 13.5375 3.85273C13.5994 3.44821 13.3206 3.07027 12.9147 3.00857C12.5088 2.94688 12.1295 3.2248 12.0676 3.62932C12.0659 3.64077 12.0644 3.6522 12.0632 3.66361ZM15.7767 4.24717C18.5661 5.62025 20.3916 8.50779 20.3306 11.701L20.3222 11.9168M20.3222 11.9168C19.9288 11.8817 19.5736 12.161 19.5198 12.555C19.4645 12.9604 19.7494 13.3338 20.1563 13.389C20.5631 13.4441 20.9378 13.1602 20.9931 12.7547C21.0485 12.3492 20.7635 11.9758 20.3567 11.9207C20.3451 11.9191 20.3336 11.9178 20.3222 11.9168ZM19.5 16C17.9493 18.688 15.1511 20.6545 11.9572 20.3927L11.7416 20.3708M11.7416 20.3708C11.8015 19.9818 11.5442 19.6108 11.1531 19.5325C10.7505 19.4519 10.3586 19.7119 10.2778 20.113C10.1969 20.5142 10.4577 20.9048 10.8603 20.9854C11.2628 21.0659 11.6547 20.806 11.7356 20.4048C11.7379 20.3935 11.7399 20.3821 11.7416 20.3708ZM9.44666 9.33708H14.6508V12.049C14.6508 12.9142 14.2715 13.7362 13.6124 14.2992L12.0487 15.6349L10.4851 14.2992C9.82601 13.7362 9.44666 12.9142 9.44666 12.049V9.33708Z" stroke="#101828" stroke-width="2"/>
294
+ </svg>`,Ft={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)">
286
295
  <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>
287
296
  <defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
288
297
  </svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -291,10 +300,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
291
300
  <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"/>
292
301
  </svg>`,MCP:`<svg width="14" height="14" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
293
302
  <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"/>
294
- </svg>`,fallback:'<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M3 3L5.25 5.25M3 3H1.5L1 1.5L1.5 1L3 1.5V3ZM9.6295 1.37041L8.3157 2.68421C8.1177 2.88221 8.0227 2.97721 7.9816 3.09539C7.94898 3.19582 7.94898 3.30399 7.9816 3.40442C8.0227 3.5226 8.1177 3.6176 8.3157 3.8156L8.4343 3.9342C8.6323 4.1322 8.7273 4.2272 8.8277 4.25982C8.92813 4.29244 9.0363 4.29244 9.13673 4.25982C9.23717 4.2272 9.33217 4.1322 9.53017 3.9342L10.795 2.66941C10.927 2.82734 11 3.0201 11 3.25C11 5.26868 9.26868 7 7.25 7C7.06688 7 6.88596 6.982 6.715 6.958C6.4718 6.922 6.3503 6.902 6.2566 6.9106C6.1483 6.9211 6.0994 6.937 6.0103 6.987C5.92498 7.0349 5.8395 7.1204 5.6285 7.3314L2.75 10.21C2.2358 10.7242 1.16422 10.7242 0.65 10.21C0.13578 9.69578 0.13578 8.6242 0.65 8.11L3.52835 5.23165C3.73935 5.02065 3.83485 4.92515 3.88275 4.83983C3.93275 4.75024 3.94867 4.70134 3.95657 4.59304C3.96497 4.49163 3.945 4.37009 3.90905 4.12702C3.88591 3.91193 3.875 3.69301 3.875 3.5C3.875 1.48132 5.60632 -0.25 7.625 -0.25C8.15274 -0.25 8.824 0.13482 9.6295 1.37041ZM6 7.5L8.75 10.25C9.2642 10.7642 10.3358 10.7642 10.85 10.25C11.3642 9.73578 11.3642 8.6642 10.85 8.15L7.9877 5.2877C7.82754 5.27138 7.67136 5.24752 7.5204 5.22006C7.32588 5.18466 7.11246 5.21742 6.96984 5.36004L6 6.33Z" stroke="#667085" stroke-width="0.72" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},UB=(e,t)=>{const r=e.toLowerCase();if(r.includes("code")||r.includes("inline")||r==="inlinetool")return Ft.inlineTool;if(r.includes("workflow")||r.includes("library")||r==="toollibrary")return Ft.toolLibrary;if(r.includes("knowledge")||r==="knowledge")return Ft.KNOWLEDGE;if(r.includes("mcp")||r==="mcp")return Ft.MCP;if(Ft[e])return Ft[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")||n.includes("processing")?Ft.inlineTool:n.includes("library")||n.includes("workflow")?Ft.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Ft.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Ft.MCP:Ft.fallback},Zr=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,c]=O.useState(!1),[u,f]=O.useState(!1),[d,m]=O.useState(!1),v=RB(e),g=FB[r];if(t==="tool"){const S=UB(i||"fallback",a);return p.jsx("div",{className:`${g} rounded-[8px] flex items-center justify-center bg-gray-100 ${n}`,children:p.jsx("div",{dangerouslySetInnerHTML:{__html:S}})})}if(t==="model"){const b=k0(o),S=()=>{m(!0)};if(d){const x=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:x})})}return p.jsx("img",{src:b,alt:s||a,className:`${g} rounded-[8px] p-[4px] ${n}`,onError:S})}if(v!=null&&v.name&&v.name!=="fallback"&&!l){const b=BB(v,t),S=()=>{c(!0)};return p.jsx("img",{src:b,alt:a,className:`${g} rounded-[8px] p-[4px] object-cover ${n}`,onError:S})}if(l&&!u&&t==="agent"){const b=`${df}/agenticai/assets/agent-avatars/avatar1.svg`,S=()=>{f(!0)};return p.jsx("img",{src:b,alt:a,className:`${g} rounded-[8px] p-[4px] object-cover ${n}`,onError:S})}if(t==="model"){const b=k0(o),S=()=>{m(!0)};if(d){const x=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:x})})}return p.jsx("img",{src:b,alt:s||a,className:`${g} rounded-[8px] p-[4px] ${n}`,onError:S})}const h=`${df}/agenticai/assets/agent-avatars/avatar1.svg`;return p.jsx("img",{src:h,alt:a,className:`${g} rounded-[8px] p-[4px] object-cover ${n}`})},N0=({data:e,className:t})=>{const[r,n]=O.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:le("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(Zr,{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 WB(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 zB(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 M0=({data:e,className:t})=>{const[r,n]=O.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:le("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(Zr,{icon:o.icon,iconSource:"tool",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:le("inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",WB(o.toolType||o.type||"Default")),children:zB(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"})})]})},VB=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"},GB=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)},HB=({provider:e})=>{const[t,r]=O.useState(!1),n=VB(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})},D0=({data:e,className:t})=>{const[r,n]=O.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:le("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(HB,{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:GB(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"})})]})},qB=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"}}},KB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),I0=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var w;const s=qB(n),[l,c]=O.useState(10),[u,f]=O.useState("all"),[d,m]=O.useState(!1),v=[{label:`All ${s.entityName}`,value:"all"},...a.map(A=>({label:A.name,value:A.id}))],g=u==="all"?a:a.filter(A=>A.id===u),h=()=>{f("all"),m(!1),c(10),t()};O.useEffect(()=>{const A=$=>{$.key==="Escape"&&h()},P=$=>{d&&($.target.closest(".filter-dropdown")||m(!1))};return e&&(document.addEventListener("keydown",A),document.addEventListener("mousedown",P),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",A),document.removeEventListener("mousedown",P),document.body.style.overflow="unset"}},[e,d,h]),O.useEffect(()=>{e&&(f("all"),m(!1),c(10))},[e]);const b=A=>new Date(A).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),S=()=>{c(A=>Math.min(A+10,g.length))},x=A=>{f(A),m(!1),c(10)};if(!e)return null;const T=g.slice(0,l),y=((w=v.find(A=>A.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:h}),p.jsxs("div",{className:le("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:h,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:p.jsx(Mf,{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:()=>m(!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(A=>p.jsx("button",{onClick:()=>x(A.value),className:le("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",u===A.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:A.label},A.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:T.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:[T.map((A,P)=>p.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",children:[p.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(Zr,{icon:A.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"tool":"model",size:"small",name:A.name,toolType:A.toolType||A.type,provider:A.provider,modelName:A.modelName})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:A.name}),n==="modelRuns"&&A.provider&&p.jsx("div",{className:"text-xs text-[#475467] truncate",children:A.provider})]})]}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:KB(A.runs)})}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:A.responseTime})})]},A.id||P)),l<g.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:S,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 L0{constructor(t=""){kt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");kt(this,"baseUrl","");kt(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 R0{constructor(t){kt(this,"endpointsService");kt(this,"defaultHeaders");kt(this,"timeout");this.endpointsService=new L0(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 Yt{constructor(t){kt(this,"apiInvoker");kt(this,"projectId");kt(this,"environment");kt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new R0(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||Yt.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,_id:i._id}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||Yt.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||Yt.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||Yt.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"}],n=a=>{if(!a)return"assets/icons/models/custom-api.svg";const i=a.toLowerCase(),o={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(o[i])return`assets/icons/models/${o[i]}`;for(const[s,l]of Object.entries(o))if(i.includes(s)||s.includes(i))return`assets/icons/models/${l}`;return"assets/icons/models/custom-api.svg"};return t.forEach(a=>{a.modelName&&r.push({label:a.modelName,value:a.modelName.replace(/[-\.]/g,""),icon:n(a.provider),type:a.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=m=>m>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:m=>`${Math.floor(m/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:m=>`${Math.floor(m/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:m=>`${Math.floor(m/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:m=>`${Math.floor(m/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:m=>`${Math.floor(m/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 h=g.count||0,b=(g.toolType||g.tool_type||"").toLowerCase(),S=(g.toolName||g.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:S,count:h});const x=b.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(b)||["inlinetool","tool","code","codetool","event"].includes(x)?c+=h:["toollibrary","toolLibrary","workflow","tool"].includes(b)||["toollibrary","workflow","tool"].includes(x)?u+=h:["knowledge","KNOWLEDGE","knowledgetool"].includes(b)||["knowledge","knowledgetool"].includes(x)?f+=h:["mcp","MCP","mcptool","mcpTool"].includes(b)||["mcp","mcptool"].includes(x)?d+=h:(console.log(`Unknown tool type '${b}' for tool '${S}', defaulting to code tools`),c+=h)}),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 m={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}:`,m),m});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(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),23,59,59,999)),a=new Date(n);return a.setUTCDate(n.getUTCDate()-t+1),a.setUTCHours(0,0,0,0),{fromTimestamp:a.toISOString(),toTimestamp:n.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()),m=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:m,timeDiffInMs:v,isVeryClose:g,fromStartOfDay:d.toISOString(),recommended:f||m||g||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||m||g||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const B0=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,c]=O.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),u=(g,h)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:g,date:h,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 S=g.listView||[];console.log("ListView data for clicked date:",S);const T=new Yt({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(S,b),y=g[b]||g.count||0;console.log("Opening slider with data:",{date:h,metricType:b,sliderData:T,totalRuns:y}),c({isOpen:!0,date:h,metricType:b,data:T,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(C0,{config:i,isLoading:r,onDataPointClick:u})})):null,m=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(N0,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(M0,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(D0,{data:o.data})}):p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx($0,{config:o})}):null,v=()=>{switch(a){case"chart":return d();case"table":return m();case"mixed":return p.jsxs("div",{className:le("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[d(),m()]});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:le("w-full",t),children:v()}),p.jsx(I0,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},Ns=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=O.useState(!1),[l,c]=O.useState(t||""),u=O.useRef(null),f=e.find(v=>v.value===l);O.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))},m=()=>{i||s(!o)};return p.jsxs("div",{ref:u,className:le("relative",a),children:[p.jsxs("button",{type:"button",className:le("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:m,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:le("truncate w-full",!f&&"text-gray-700 font-medium text-sm"),children:f?f.label:r})]}),p.jsx(fr,{className:le("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:le("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)})})]})},F0=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,iconSource:l="app",maxItems:c=100,maxLabelLength:u=30})=>{const[f,d]=O.useState(!1),[m,v]=O.useState(""),[g,h]=O.useState(()=>{const j=t||r;return a?Array.isArray(j)?j:j?[j]:[]:j?[Array.isArray(j)?j[0]:j]:[]}),b=O.useRef(null);O.useEffect(()=>{const j=C=>{b.current&&!b.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const S=(j,C=u)=>j.length<=C?j:j.substring(0,C)+"...",x=i?e.filter(j=>j.label.toLowerCase().includes(m.toLowerCase())):e,T=x.slice(0,c),y=x.length>c,w=j=>{let C;if(a){if(j==="all"){P();return}if(g.includes(j))C=g.filter(B=>B!==j),C=C.filter(B=>B!=="all");else{C=g.filter(_=>_!=="all"),C=[...C,j];const B=x.filter(_=>_.value!=="all").map(_=>_.value),z=C.filter(_=>_!=="all");z.length===B.length&&(C=["all",...z])}}else C=[j],d(!1);h(C);const F=a?C:C[0]||"";o==null||o(F)},A=()=>{if(!a)return{checked:!1,indeterminate:!1};const j=x.filter(F=>F.value!=="all").map(F=>F.value),C=g.filter(F=>F!=="all"&&j.includes(F));return g.includes("all")&&C.length===0?{checked:!1,indeterminate:!1}:C.length===0?{checked:!1,indeterminate:!1}:C.length===j.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},P=()=>{if(!a)return;const j=A(),C=x.filter(F=>F.value!=="all").map(F=>F.value);if(j.checked)h(["all"]),o==null||o(["all"]);else{const F=["all",...C];h(F),o==null||o(F)}},$=()=>{h(["all"]),o==null||o(a?["all"]:"all")},R=()=>{if(!a){if(g.length===0)return n;const B=e.find(z=>z.value===g[0]);return(B==null?void 0:B.label)||n}const j=g.filter(B=>B!=="all"),C=g.includes("all");if(j.length===0)return n;if(j.length===1){const B=e.find(z=>z.value===j[0]);return(B==null?void 0:B.label)||n}const F=e.filter(B=>B.value!=="all").length;return j.length===F?"All selected":`${j.length} selected`};return p.jsxs("div",{className:le("relative",s),ref:b,children:[p.jsxs("button",{type:"button",onClick:()=>d(!f),className:le("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.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[!a&&g.length>0&&g[0]!=="all"&&(()=>{const j=e.find(C=>C.value===g[0]);return j!=null&&j.avatar||j!=null&&j.icon?p.jsx("div",{className:"mr-3 flex-shrink-0",children:p.jsx(Zr,{icon:j.icon,iconSource:l,size:"xs",name:j.label,toolType:j.type,provider:j.type,modelName:j.label})}):null})(),p.jsx("span",{className:le("truncate",g.length===0&&"text-gray-500"),children:R()})]}),p.jsx(fr,{className:le("w-[16px] h-[16px] text-gray-400 transition-transform duration-150 flex-shrink-0",f&&"transform rotate-180")})]}),f&&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(Nf,{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:m,onChange:j=>v(j.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:P,className:"flex items-center text-xs font-medium text-gray-700 hover:text-gray-900",children:[p.jsx("div",{className:le("flex items-center justify-center w-[16px] h-[16px] mr-[8px] border transition-colors duration-150",(()=>{const j=A();return j.indeterminate||j.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const j=A();return j.indeterminate?p.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):j.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:$,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:[T.length===0?p.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):T.map(j=>{let C;return j.value==="all"?null:(C=g.includes(j.value),p.jsxs("div",{className:"relative group",children:[p.jsxs("div",{onClick:()=>w(j.value),className:le("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",C&&"bg-gray-50"),children:[a?p.jsx("div",{className:le("flex items-center justify-center w-[16px] h-[16px] mr-[12px] border","transition-colors duration-150",C?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:C&&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:le("w-[16px] h-[16px] mr-[12px] rounded-full border-2 transition-colors duration-150",C?"border-blue-600 bg-blue-600":"border-gray-300"),children:C&&p.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),(j.avatar||j.icon)&&p.jsx("div",{className:"mr-3 flex-shrink-0",children:p.jsx(Zr,{icon:j.icon,iconSource:l,size:"xs",name:j.label,toolType:j.type,provider:j.type,modelName:j.label})}),p.jsx("span",{className:le("flex-1 text-xs whitespace-nowrap truncate",C?"font-medium text-gray-700":"text-gray-500"),children:S(j.label)})]}),j.label.length>u&&p.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:p.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-[12px] py-[8px] shadow-lg max-w-xs break-words whitespace-normal",children:[j.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"})]})})]},j.value))}),y&&p.jsxs("div",{className:"px-[12px] py-[8px] text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[p.jsxs("div",{className:"text-center font-medium",children:["+",x.length-c," more items"]}),i&&p.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},U0=({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")?"tool":c.includes("model")?"model":"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:le("flex items-center gap-3",t),children:[r&&p.jsx(p.Fragment,{children:r.multiSelect?p.jsx(F0,{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(Ns,{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:le("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:le("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(Ab,{className:"w-[16px] h-[16px]"})}),p.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:le("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(Db,{className:"w-[16px] h-[16px]"})})]})]})},W0=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var G;const{id:i,title:o,description:s,metrics:l,view:c,controls:u,layout:f}=e,[d,m]=O.useState(c.type),[v,g]=O.useState("chart"),h=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,S]=O.useState(h()),[x,T]=O.useState("all"),y=E=>{var W,K,D,H,Y;const M=P();(W=M==null?void 0:M.controls)!=null&&W.toggle?(g(E),(D=(K=M.controls.toggle).onToggle)==null||D.call(K,E)):(m(E),(Y=(H=u==null?void 0:u.toggle)==null?void 0:H.onToggle)==null||Y.call(H,E))},w=E=>{var K,D;const M=E.metricType||E.title.toLowerCase();S(M);const W=l.find(H=>(H.metricType||H.title.toLowerCase())===M);(D=(K=W==null?void 0:W.controls)==null?void 0:K.dropdown)!=null&&D.multiSelect?T(["all"]):T("all"),a==null||a(E)},A=E=>{var W,K,D;T(E);const M=l.find(H=>(H.metricType||H.title.toLowerCase())===b);(D=(K=(W=M==null?void 0:M.controls)==null?void 0:W.dropdown)==null?void 0:K.onChange)==null||D.call(K,E)},P=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===b)||null,$=E=>Array.isArray(E)?E.filter(W=>W!=="all").length>0:E!=="all",R=E=>Array.isArray(E)?E.filter(M=>M!=="all"):E!=="all"?[E]:[],j=E=>{var D,H,Y,te,I,U,q,J,k;const M=((H=(D=E.view)==null?void 0:D.chart)==null?void 0:H.data)||((Y=c.chart)==null?void 0:Y.data)||[];if(!$(x))return M;const W=E.metricType,K=R(x);if(K.length===1){const Q=K[0],X=P(),se=(U=(I=(te=X==null?void 0:X.controls)==null?void 0:te.dropdown)==null?void 0:I.options)==null?void 0:U.find(fe=>fe.value===Q),ne=se==null?void 0:se.label;return console.log("🔍 Filtering chart data:",{metricType:W,singleFilter:Q,selectedLabel:ne,baseDataSample:M[0]}),M.map(fe=>{let ce=0;return fe.listView&&Array.isArray(fe.listView)&&(ce=fe.listView.filter(Ge=>W==="agentRuns"&&Ge.agentName?Ge.agentName===ne||Ge.agentName.toLowerCase()===(ne==null?void 0:ne.toLowerCase()):W==="toolRuns"&&Ge.toolName?Ge.toolName===ne||Ge.toolName.toLowerCase()===(ne==null?void 0:ne.toLowerCase()):W==="modelRuns"&&Ge.modelName?Ge.modelName===ne||Ge.modelName.toLowerCase()===(ne==null?void 0:ne.toLowerCase()):!1).reduce((Ge,ct)=>Ge+(ct.count||0),0)),console.log("📊 Filtered value for",ne,":",ce),{...fe,[W]:ce}})}if(K.length>1){const Q=P(),se=(((k=(J=(q=Q==null?void 0:Q.controls)==null?void 0:q.dropdown)==null?void 0:J.options)==null?void 0:k.filter(ne=>K.includes(ne.value)))||[]).map(ne=>ne.label);return M.map(ne=>{let fe=0;return ne.listView&&Array.isArray(ne.listView)&&(fe=ne.listView.filter(Ee=>W==="agentRuns"&&Ee.agentName?se.some(Oe=>Ee.agentName===Oe||Ee.agentName.toLowerCase()===(Oe==null?void 0:Oe.toLowerCase())):W==="toolRuns"&&Ee.toolName?se.some(Oe=>Ee.toolName===Oe||Ee.toolName.toLowerCase()===(Oe==null?void 0:Oe.toLowerCase())):W==="modelRuns"&&Ee.modelName?se.some(Oe=>Ee.modelName===Oe||Ee.modelName.toLowerCase()===(Oe==null?void 0:Oe.toLowerCase())):!1).reduce((Ee,Oe)=>Ee+(Oe.count||0),0)),{...ne,[W]:fe}})}return M},C=E=>{var D;if(!((D=E.view)!=null&&D.chart))return null;const M=j(E),W=()=>{var Y,te,I,U,q,J;if(!$(x)||!((Y=E.controls)!=null&&Y.dropdown))return((I=(te=E.view)==null?void 0:te.chart)==null?void 0:I.title)||E.title;const H=R(x);if(H.length===1){const k=(U=E.controls.dropdown.options)==null?void 0:U.find(Q=>Q.value===H[0]);return k?`${k.label}`:((J=(q=E.view)==null?void 0:q.chart)==null?void 0:J.title)||E.title}return`${H.length} selected`},K=R(x);return E.metricType==="toolRuns"&&K.length===1?{...E.view.chart,data:M,title:W(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&K.length===1?{...E.view.chart,data:M,title:W(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:M,title:W()}},F=(E,M)=>{if(!$(x))return E;const W=R(x);if(W.length===1){const K=W[0];if(i==="runs"&&M==="agentRuns")return E.map(D=>({...D,agentRuns:D[K]||0}));if(i==="runs"&&M==="toolRuns")return E.map(D=>({...D,toolRuns:D[K.replace(/[-]/g,"")]||0}));if(i==="runs"&&M==="modelRuns")return E.map(D=>({...D,modelRuns:D[K.replace(/[-\.]/g,"")]||0}))}return E},B=E=>{var D;const M=((D=c.chart)==null?void 0:D.data)||[],W=F(M,E),K=H=>{var te,I;if(!$(x))return H;const Y=R(x);if(Y.length===1){const U=(I=(te=u==null?void 0:u.dropdown)==null?void 0:te.options)==null?void 0:I.find(q=>q.value===Y[0]);return U?`${U.label}`:H}return`${Y.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:M,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:M,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:M,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:M,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:K("Agent Runs"),data:W,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 R(x).length===1?{type:"line",title:K("Tool Runs"),data:F(M,"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:W,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 R(x).length===1?{type:"line",title:K("Model Runs"),data:F(M,"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:K("Model Runs"),data:W,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}},z=(()=>{const E=P();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:A}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:v==="chart",tableView:v==="table",onToggle:y}:void 0}:u?{...u,dropdown:u.dropdown?{...u.dropdown,onChange:A}:void 0,toggle:u.toggle?{...u.toggle,chartView:d==="chart",tableView:d==="table",onToggle:y}:void 0}:void 0})(),L=(()=>{var W,K,D,H,Y,te,I,U,q,J;const E=P();if(E!=null&&E.view){if((W=E.controls)!=null&&W.toggle){if(v==="table"&&E.view.table){let Q=E.view.table.data;if(E.metricType==="agentRuns"&&$(x)){const X=R(x);if(X.length>0){const se=((H=(D=(K=E.controls)==null?void 0:K.dropdown)==null?void 0:D.options)==null?void 0:H.filter(ne=>X.includes(ne.value)))||[];se.length>0&&(Q=Q.filter(ne=>se.some(fe=>ne.name===fe.label||ne.name&&ne.name.toLowerCase().includes(fe.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&$(x)){const X=R(x);if(X.length>0){const se=((I=(te=(Y=E.controls)==null?void 0:Y.dropdown)==null?void 0:te.options)==null?void 0:I.filter(ne=>X.includes(ne.value)))||[];se.length>0&&(Q=Q.filter(ne=>se.some(fe=>ne.name===fe.label||ne.name&&ne.name.toLowerCase().includes(fe.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&$(x)){const X=R(x);if(X.length>0){const se=((J=(q=(U=E.controls)==null?void 0:U.dropdown)==null?void 0:q.options)==null?void 0:J.filter(ne=>X.includes(ne.value)))||[];se.length>0&&(Q=Q.filter(ne=>se.some(fe=>ne.name===fe.label||ne.name&&ne.name.toLowerCase().includes(fe.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:Q}}}else if(v==="chart"&&E.view.chart)return{type:"chart",chart:C(E)||E.view.chart}}const k=C(E);return k?{...E.view,chart:k}:E.view}const M=B(b);return M?{type:"chart",chart:M}:{...c,type:d}})(),V=()=>l.map(E=>{const M=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||M===b}});return p.jsxs("div",{className:le("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,{})})]}):V().map((E,M)=>p.jsx("div",{className:"flex-1",children:p.jsx(zf,{data:E,onClick:w,isFirst:M===0})},`${i}-metric-${M}`))}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:P()&&p.jsx("h3",{className:"text-md font-medium text-gray-700",children:(G=P())==null?void 0:G.title})}),z&&p.jsx(U0,{config:z})]}),p.jsx(B0,{config:L,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},pf=O.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:le(o,s[t],l[r],e),ref:i,...a,children:n})});pf.displayName="Button";function Ms(e){"@babel/helpers - typeof";return Ms=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},Ms(e)}function Ct(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 Le(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ve(e){Le(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ms(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 YB(e,t){Le(2,arguments);var r=Ve(e),n=Ct(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function hf(e,t){Le(2,arguments);var r=Ve(e),n=Ct(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 XB(e,t){Le(2,arguments);var r=Ve(e).getTime(),n=Ct(t);return new Date(r+n)}var ZB={};function wi(){return ZB}function JB(e,t){var r,n,a,i,o,s;Le(1,arguments);var l=wi(),c=Ct((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 QB(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 ia(e){Le(1,arguments);var t=Ve(e);return t.setHours(0,0,0,0),t}function Oi(e,t){Le(2,arguments);var r=ia(e),n=ia(t);return r.getTime()===n.getTime()}function eF(e){return Le(1,arguments),e instanceof Date||Ms(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function tF(e){if(Le(1,arguments),!eF(e)&&typeof e!="number")return!1;var t=Ve(e);return!isNaN(Number(t))}function rF(e){Le(1,arguments);var t=Ve(e);return t.setHours(23,59,59,999),t}function nF(e){Le(1,arguments);var t=Ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function aF(e,t){Le(2,arguments);var r=Ct(t);return XB(e,-r)}var iF=864e5;function oF(e){Le(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/iF)+1}function Ds(e){Le(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 z0(e){Le(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 sF(e){Le(1,arguments);var t=z0(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Ds(r);return n}var lF=6048e5;function cF(e){Le(1,arguments);var t=Ve(e),r=Ds(t).getTime()-sF(t).getTime();return Math.round(r/lF)+1}function Is(e,t){var r,n,a,i,o,s,l,c;Le(1,arguments);var u=wi(),f=Ct((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),m=d.getUTCDay(),v=(m<f?7:0)+m-f;return d.setUTCDate(d.getUTCDate()-v),d.setUTCHours(0,0,0,0),d}function V0(e,t){var r,n,a,i,o,s,l,c;Le(1,arguments);var u=Ve(e),f=u.getUTCFullYear(),d=wi(),m=Ct((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(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,m),v.setUTCHours(0,0,0,0);var g=Is(v,t),h=new Date(0);h.setUTCFullYear(f,0,m),h.setUTCHours(0,0,0,0);var b=Is(h,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=b.getTime()?f:f-1}function uF(e,t){var r,n,a,i,o,s,l,c;Le(1,arguments);var u=wi(),f=Ct((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=V0(e,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var v=Is(m,t);return v}var fF=6048e5;function dF(e,t){Le(1,arguments);var r=Ve(e),n=Is(r,t).getTime()-uF(r,t).getTime();return Math.round(n/fF)+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)}},oa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pF={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=V0(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=z0(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=dF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):$e(i,r.length)},I:function(t,r,n){var a=cF(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=oF(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=oa.noon:a===0?i=oa.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=oa.evening:a>=12?i=oa.afternoon:a>=4?i=oa.morning:i=oa.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 H0(o);case"XXXX":case"XX":return Jr(o);case"XXXXX":case"XXX":default:return Jr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return H0(o);case"xxxx":case"xx":return Jr(o);case"xxxxx":case"xxx":default:return Jr(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"+G0(o,":");case"OOOO":default:return"GMT"+Jr(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"+G0(o,":");case"zzzz":default:return"GMT"+Jr(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 G0(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 H0(e,t){if(e%60===0){var r=e>0?"-":"+";return r+$e(Math.abs(e)/60,2)}return Jr(e,t)}function Jr(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 q0=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"})}},K0=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"})}},hF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return q0(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}}",q0(a,r)).replace("{{time}}",K0(i,r))},mF={p:K0,P:hF},gF=["D","DD"],vF=["YY","YYYY"];function yF(e){return gF.indexOf(e)!==-1}function bF(e){return vF.indexOf(e)!==-1}function Y0(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 xF={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"}},wF=function(t,r,n){var a,i=xF[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 mf(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 OF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TF={date:mf({formats:OF,defaultWidth:"full"}),time:mf({formats:SF,defaultWidth:"full"}),dateTime:mf({formats:AF,defaultWidth:"full"})},jF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},PF=function(t,r,n,a){return jF[t]};function Si(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 _F={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},EF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CF={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"]},kF={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"}},NF={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"},DF={ordinalNumber:MF,era:Si({values:_F,defaultWidth:"wide"}),quarter:Si({values:EF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Si({values:CF,defaultWidth:"wide"}),day:Si({values:$F,defaultWidth:"wide"}),dayPeriod:Si({values:kF,defaultWidth:"wide",formattingValues:NF,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)?LF(s,function(f){return f.test(o)}):IF(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 IF(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function LF(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function RF(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 BF=/^(\d+)(th|st|nd|rd)?/i,FF=/\d+/i,UF={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},WF={any:[/^b/i,/^(a|c)/i]},zF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},VF={any:[/1/i,/2/i,/3/i,/4/i]},GF={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},HF={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]},qF={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},KF={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]},YF={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},XF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ZF={ordinalNumber:RF({matchPattern:BF,parsePattern:FF,valueCallback:function(t){return parseInt(t,10)}}),era:Ai({matchPatterns:UF,defaultMatchWidth:"wide",parsePatterns:WF,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:zF,defaultMatchWidth:"wide",parsePatterns:VF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ai({matchPatterns:GF,defaultMatchWidth:"wide",parsePatterns:HF,defaultParseWidth:"any"}),day:Ai({matchPatterns:qF,defaultMatchWidth:"wide",parsePatterns:KF,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:YF,defaultMatchWidth:"any",parsePatterns:XF,defaultParseWidth:"any"})},JF={code:"en-US",formatDistance:wF,formatLong:TF,formatRelative:PF,localize:DF,match:ZF,options:{weekStartsOn:0,firstWeekContainsDate:1}},QF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tU=/^'([^]*?)'?$/,rU=/''/g,nU=/[a-zA-Z]/;function Ls(e,t,r){var n,a,i,o,s,l,c,u,f,d,m,v,g,h;Le(2,arguments);var b=String(t),S=wi(),x=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:JF,T=Ct((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(c=S.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=Ct((f=(d=(m=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&m!==void 0?m:S.weekStartsOn)!==null&&d!==void 0?d:(g=S.locale)===null||g===void 0||(h=g.options)===null||h===void 0?void 0:h.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(!tF(w))throw new RangeError("Invalid time value");var A=QB(w),P=aF(w,A),$={firstWeekContainsDate:T,weekStartsOn:y,locale:x,_originalDate:w},R=b.match(eU).map(function(j){var C=j[0];if(C==="p"||C==="P"){var F=mF[C];return F(j,x.formatLong)}return j}).join("").match(QF).map(function(j){if(j==="''")return"'";var C=j[0];if(C==="'")return aU(j);var F=pF[C];if(F)return bF(j)&&Y0(j,t,String(e)),yF(j)&&Y0(j,t,String(e)),F(P,j,x.localize,$);if(C.match(nU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return j}).join("");return R}function aU(e){var t=e.match(tU);return t?t[1].replace(rU,"'"):e}function X0(e,t){Le(2,arguments);var r=Ve(e),n=Ve(t);return r.getTime()<n.getTime()}function iU(e,t){Le(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){Le(2,arguments);var r=Ct(t);return YB(e,-r)}function oU(e,t){Le(2,arguments);var r=Ct(t);return hf(e,-r)}const gf=({children:e})=>{const[t,r]=O.useState(!1);return O.useEffect(()=>(r(!0),()=>r(!1)),[]),t?tn.createPortal(e,document.body):null};function Z0({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:ia(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:ia(Rs(new Date,1)),to:rF(Rs(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:JB(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:ia(Rs(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:nF(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:ia(Rs(new Date,29)),to:new Date}}],a=t?n.find(_=>_.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(_=>_.value),foundPreset:!!a});const[i,o]=O.useState(a==null?void 0:a.dateRange),[s,l]=O.useState(a==null?void 0:a.dateRange),[c,u]=O.useState(!1),[f,d]=O.useState((a==null?void 0:a.label)||null),[m,v]=O.useState((a==null?void 0:a.label)||null),[g,h]=O.useState(new Date),[b,S]=O.useState(null),[x,T]=O.useState({top:0,left:0}),y=O.useRef(null),w=O.useRef(null);O.useEffect(()=>{var _,L;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:(_=a.dateRange.from)==null?void 0:_.toLocaleDateString(),to:(L=a.dateRange.to)==null?void 0:L.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(V=>`${V.value}:${V.label}`)})},[]),O.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 A=()=>{if(!w.current)return;const _=w.current.getBoundingClientRect(),L=window.scrollY,V=window.scrollX,G=window.innerWidth,E=window.innerHeight,M=720,W=450;let K=_.bottom+L+8,D=_.left+V;D+M>G&&(D=_.right+V-M),D+M>G&&(D=G-M-20),K+W>E&&(K=_.top+L-W-8),D<20&&(D=20),K<20&&(K=20),T({top:K,left:D})};O.useEffect(()=>{const _=()=>{c&&A()};return c&&(window.addEventListener("resize",_),window.addEventListener("scroll",_)),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_)}},[c]);const P=(_,L)=>{if(l(_),v(L),S(null),_.from){const V=new Date(_.from.getFullYear(),_.from.getMonth(),1);h(V)}},$=_=>{if(!b)S(_),l({from:_,to:_}),v(null);else{const L=X0(_,b)?_:b,V=X0(_,b)?b:_;l({from:L,to:V}),S(null),v(null)}},R=()=>{o(s),d(m),r==null||r(s),u(!1),S(null)},j=()=>{l(void 0),v(null),o(void 0),d(null),r==null||r(void 0),u(!1),S(null)},C=_=>{_?(l(i),v(f),S(null),setTimeout(A,0)):(l(i),v(f),S(null)),u(_)},F=(_,L)=>(console.log("📅 formatDateRange called with:",{presetLabel:L,hasDateRange:!!(_!=null&&_.from)}),L||(_!=null&&_.from?!_.to||Oi(_.from,_.to)?Ls(_.from,"MMM dd, yyyy"):`${Ls(_.from,"MMM dd, yyyy")} - ${Ls(_.to,"MMM dd, yyyy")}`:"Pick a date range")),B=(_=0)=>{const L=hf(g,_),V=L.getFullYear(),G=L.getMonth(),E=new Date(V,G,1),W=new Date(V,G+1,0).getDate(),K=E.getDay(),D=["January","February","March","April","May","June","July","August","September","October","November","December"],H=["Su","Mo","Tu","We","Th","Fr","Sa"],Y=[],I=new Date(V,G-1,0).getDate();for(let J=K-1;J>=0;J--){const k=I-J,Q=new Date(V,G-1,k);Y.push(p.jsx("button",{onClick:()=>$(Q),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:k},`prev-${k}`))}for(let J=1;J<=W;J++){const k=new Date(V,G,J),Q=Oi(k,new Date),X=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&iU(k,{start:s.from,end:s.to}),se=(s==null?void 0:s.from)&&Oi(k,s.from),ne=(s==null?void 0:s.to)&&Oi(k,s.to),fe=b&&Oi(k,b);let ce="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 ";Q&&(ce+="font-semibold "),fe||se||ne?ce+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":X&&(ce+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),Y.push(p.jsx("button",{onClick:()=>$(k),className:ce,children:J},`current-${J}`))}const q=Math.ceil((K+W)/7)*7-K-W;for(let J=1;J<=q;J++){const k=new Date(V,G+1,J);Y.push(p.jsx("button",{onClick:()=>$(k),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:J},`next-${J}`))}return p.jsxs("div",{className:"p-[12px]",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[_===0&&p.jsx("button",{onClick:()=>h(oU(g,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(jb,{className:"h-[16px] w-[16px]"})}),p.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[D[G]," ",V]}),_===1&&p.jsx("button",{onClick:()=>h(hf(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:H.map(J=>p.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:J},J))}),p.jsx("div",{className:"grid grid-cols-7 gap-1",children:Y})]})},z=()=>"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:()=>C(!c),className:`min-w-[200px] px-[12px] py-[8px] text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[p.jsx(Tf,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const _=F(i,f);return console.log("📅 Button display text:",{displayText:_,date:i,selectedPresetLabel:f}),_})()]}),c&&p.jsxs(gf,{children:[p.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>C(!1)}),p.jsxs("div",{ref:y,className:z(),style:{top:x.top,left:x.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:_=>_.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(_=>p.jsx("button",{onClick:()=>P(_.dateRange,_.label),className:`text-left px-[12px] py-[8px] text-sm text-gray-900 rounded hover:bg-gray-100 transition-colors ${m===_.label?"bg-gray-100 medium":""}`,children:_.label},_.label))]}),p.jsxs("div",{className:"flex flex-1",children:[B(0),B(1)]})]}),p.jsxs("div",{className:"border-t border-gray-200 bg-gray-50 p-[12px] flex justify-end gap-2",children:[p.jsx("button",{onClick:j,className:"px-[12px] py-[8px] text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),p.jsx("button",{onClick:R,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 sU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var z;const{title:o,subtitle:s,sections:l,globalControls:c,layout:u={columns:12,gap:24,responsive:!0}}=e,[f,d]=O.useState(!1),[m,v]=O.useState({}),[g,h]=O.useState(l),[b,S]=O.useState([]),[x,T]=O.useState(!1),[y,w]=O.useState("draft"),A=O.useRef(null);O.useEffect(()=>{if(t)try{A.current=new Yt(t),P(),$()}catch(_){console.error("Failed to initialize API service:",_)}},[t]);const P=async()=>{if(!(!A.current||!t)){T(!0);try{const _=await A.current.fetchEnvironments();S(_),console.log("🌍 Environments loaded:",_.map(E=>({_id:E._id,envName:E.envName})));let L="draft";if(t.environment){const E=_.find(M=>M._id===t.environment);if(E)L=E._id,console.log("✅ Found environment by _id:",E.envName,"(_id:",E._id,")");else{const M=_.find(W=>W.envName===t.environment);if(M)L=M._id,console.log("✅ Found environment by envName:",M.envName,"(_id:",M._id,")");else{const W=_.find(K=>K.envName==="draft");W?(L=W._id,console.log("✅ Using draft environment as fallback:",W._id)):console.log('⚠️ No matching environment found, using default "draft"')}}}else{const E=_.find(M=>M.envName==="draft");E&&(L=E._id,console.log("✅ Using draft environment as default:",E._id))}w(L);const V=L==="draft"?"draft":L,G={...t,environment:V};A.current.updateConfig(G),console.log("🔄 Updated API config with environment:",V,"(original _id:",L,")")}catch(_){console.error("Error loading environments:",_)}finally{T(!1)}}},$=async()=>{if(!(!A.current||!t)){d(!0);try{const _=A.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:_.fromTimestamp,toTimestamp:_.toTimestamp,fromDate:new Date(_.fromTimestamp).toLocaleDateString(),toDate:new Date(_.toTimestamp).toLocaleDateString()});const L=await A.current.fetchAllCardsDataWithEnhancedViews(_.fromTimestamp,_.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",L),console.log("📈 Data covers period:",{from:new Date(_.fromTimestamp).toLocaleDateString(),to:new Date(_.toTimestamp).toLocaleDateString()});const V=l.map(G=>G.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...G,metrics:L.usageAnalytics}):G.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...G,metrics:L.runs}):G);h(V)}catch(_){console.error("Error loading initial data:",_),h(l)}finally{d(!1)}}},R=async(_,L)=>{if(!(!A.current||!t||!L.metricType)){h(V=>V.map(G=>G.id===_?{...G,metrics:G.metrics.map(E=>({...E,highlighted:E.metricType===L.metricType}))}:G)),v(V=>({...V,[_]:!0}));try{const V=t.defaultTimeRange||Yt.getDateRange(7);let G,E;if(["users","sessions","messages","tokens"].includes(L.metricType))G="usage-analytics",E=L.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(L.metricType))G="runs",E=L.metricType==="agentRuns"?"agent-runs":L.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const M=await A.current.fetchTimeSeriesData(E,G,V.fromTimestamp,V.toTimestamp),W=A.current.transformTimeSeriesDataForMetric(M,L.metricType);console.log("Time series response for",L.title,":",M),console.log("Transformed data for",L.title,":",W),console.log("Metric type used for transformation:",L.metricType);const D=(H=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[H]||"count")(L.metricType||"count");console.log("Using dataKey for metric",L.metricType,":",D),h(H=>H.map(Y=>{if(Y.id===_){const te={...Y,view:{...Y.view,chart:Y.view.chart?{...Y.view.chart,data:W,dataKey:D,lines:[{dataKey:D,color:Y.view.chart.color||"#3b82f6",label:L.title,strokeWidth:2}]}:{type:"line",data:W,dataKey:D,lines:[{dataKey:D,color:"#3b82f6",label:L.title,strokeWidth:2}],yAxisLabel:L.title}}};return console.log("Updated section for",_,":",te),console.log("Chart config set:",te.view.chart),te}return Y}))}catch(V){console.error("Error loading metric data:",V)}finally{v(V=>({...V,[_]:!1}))}}},j=_=>{var L,V;if(console.log("🔄 Environment change requested:",_),w(_),(V=(L=c==null?void 0:c.draft)==null?void 0:L.onChange)==null||V.call(L,_),a==null||a(_),t&&A.current){const G=_==="draft"?"draft":_,E={...t,environment:G};A.current.updateConfig(E),console.log("🔄 Updated API config with environment:",G,"(original _id:",_,")"),$()}},C=_=>{var L,V;if(console.log("🗓️ Time range change requested:",_),typeof _=="string"&&((V=(L=c==null?void 0:c.timeRange)==null?void 0:L.onChange)==null||V.call(L,_)),i==null||i(_),t&&A.current){let G=null;if(typeof _=="object"&&_.from&&_.to){const E=_.from,M=_.to,W=new Date(Date.UTC(E.getFullYear(),E.getMonth(),E.getDate(),0,0,0,0)),K=new Date(Date.UTC(M.getFullYear(),M.getMonth(),M.getDate(),23,59,59,999));G={fromTimestamp:W.toISOString(),toTimestamp:K.toISOString()},console.log("📅 Converting DateRange to API format:",{selectedDates:{from:E.toLocaleDateString(),to:M.toLocaleDateString()},utcTimestamps:G})}else if(typeof _=="string"){const M={"24h":1,"7d":7,"30d":30,"90d":90}[_];M&&(G=Yt.getDateRange(M),console.log(`📅 Converting preset "${_}" (${M} days) to API format:`,G))}if(G){const E=y==="draft"?"draft":y,M={...t,defaultTimeRange:G,environment:E};console.log("🔄 Updating API configuration with new date range:",M.defaultTimeRange),console.log("🔄 Preserving selected environment:",E,"(original _id:",y,")"),A.current.updateConfig(M),console.log("🚀 Reloading dashboard data with new date range..."),$()}else console.warn("⚠️ Unable to convert time range value to API format:",_)}},F=(_="csv")=>{var L,V;(V=(L=c==null?void 0:c.export)==null?void 0:L.onExport)==null||V.call(L,_),n==null||n()},B=Object.values(m).some(_=>_);return p.jsxs("div",{className:le("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||B)&&p.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[p.jsx(Nb,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),c&&p.jsxs(p.Fragment,{children:[c.draft&&p.jsx(Ns,{options:b.length>0?b.map(_=>({label:_.envName.charAt(0).toUpperCase()+_.envName.slice(1),value:_._id})):c.draft.options,value:y,placeholder:x?"Loading environments...":"Draft",onChange:j,className:"min-w-[200px]",disabled:f||B||x}),c.timeRange&&(c.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",c.timeRange.defaultValue),p.jsx(Z0,{defaultValue:c.timeRange.defaultValue,onDateRangeChange:_=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",_),_&&C(_)}})):p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Tf,{className:"h-4 w-4 text-gray-500"}),p.jsx(Ns,{options:c.timeRange.options||[],value:c.timeRange.defaultValue,placeholder:c.timeRange.label,onChange:C,className:"min-w-[200px]",disabled:f||B})]})),((z=c.export)==null?void 0:z.enabled)&&p.jsxs(pf,{variant:"outline",onClick:()=>F(),className:"gap-2",disabled:f||B,children:[p.jsx(Pb,{className:"h-4 w-4"}),"Export"]})]})]})]})]}),p.jsx("div",{className:le("grid gap-6 p-[24px] pt-[8px] overflow-y-auto",u.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:u.responsive?void 0:`repeat(${u.columns}, minmax(0, 1fr))`,gap:u.gap?`${u.gap}px`:void 0},children:g.map(_=>{var L,V,G,E;return p.jsx(W0,{section:_,isLoading:f,isChartLoading:m[_.id]||!1,onMetricClick:M=>R(_.id,M),className:le(u.responsive&&((L=_.layout)==null?void 0:L.span)===12&&"lg:col-span-12",u.responsive&&((V=_.layout)==null?void 0:V.span)===6&&"lg:col-span-6",u.responsive&&((G=_.layout)==null?void 0:G.span)===4&&"lg:col-span-4",u.responsive&&((E=_.layout)==null?void 0:E.span)===3&&"lg:col-span-3")},_.id)})})]})};class J0{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(h=>{const b=`${h.data.id}|${h.data.name}|${h.data.toolName}`;n.has(b)||n.set(b,{});const S=n.get(b);h.type==="node_started"?S.started=h:h.type==="node_completed"&&(S.completed=h)});const a=[];for(const[,h]of n.entries()){const b=h.started,S=h.completed;if(!b)continue;const x=this.createTreeNodeFromEvents(b,S,t);a.push(x)}const i=this.buildNodeHierarchy(a),o=r.filter(h=>h.runId===t),s=Math.min(...o.map(h=>new Date(h.data.timestamp).getTime())),l=o.filter(h=>h.type==="node_completed"),c=l.length>0?Math.max(...l.map(h=>new Date(h.data.timestamp).getTime())):void 0,u=this.calculateRunStatus(o),f=c&&s?c-s:void 0,d=this.calculateRunTokens(o),m=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:m,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"||s.data.type==="Agent"||s.data.type==="External Orchestrator"||s.data.type==="ProxyWorker",c=l?t.data.input:void 0;let u,f;r&&(l&&(u=r.data.output),f=r.data.error);const d=this.extractLLMUsage(u,r==null?void 0:r.data.metadata),{toolInvocations:m,isResponse:v}=this.extractToolInvocations(u);console.log("toolInvocations",m),console.log("isResponse",v);const 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,error:f,children:[],level:0,isExpanded:!1,llmUsage:d,toolInvocations:m,isResponse:v,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,m,v,g;const r=t.filter(h=>h.type==="node_completed"&&h.data.error&&(h.data.status==="errored"||h.data.status==="failed"));if(r.length>0){const h=r.sort((b,S)=>new Date(S.timestamp).getTime()-new Date(b.timestamp).getTime());return typeof h[0].data.error=="string"?h[0].data.error:JSON.stringify(h[0].data.error)}const n=t.filter(h=>h.type==="node_completed"&&h.data.type==="tool"&&(h.data.name==="route_to_user"||h.data.toolName==="route_to_user")),a=t.filter(h=>h.type==="node_completed"&&h.data.type==="llm"&&h.data.output&&this.containsRouteToUserTool(h.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((h,b)=>new Date(h.timestamp).getTime()-new Date(b.timestamp).getTime()),i.length>0){const h=i[i.length-1];if(h.data.type==="llm")return this.extractMessageFromLLMOutput(h.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 S=b.find(x=>x&&typeof x=="object"&&(x.name==="route_to_user"||x.toolName==="route_to_user"));if(S){if((o=S.args)!=null&&o.message)return console.log("Found message in array format: routeToUserTool.args.message"),S.args.message;if(S.message)return console.log("Found message in array format: routeToUserTool.message"),S.message;if((s=S.output)!=null&&s.message)return console.log("Found message in array format: routeToUserTool.output.message"),S.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((m=b.data)!=null&&m.message)return console.log("Found message at: output.data.message"),b.data.message;if((v=b.result)!=null&&v.message)return console.log("Found message at: output.result.message"),b.result.message;if(typeof b=="string")try{const S=JSON.parse(b);if((g=S.args)!=null&&g.message)return console.log("Found message in parsed string: parsed.args.message"),S.args.message;if(S.message)return console.log("Found message in parsed string: parsed.message"),S.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 Q0=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=O.useState(e),[c,u]=O.useState(!1),[f,d]=O.useState(!1),m=O.useRef(null);O.useEffect(()=>{l(e)},[e]);function v(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function g(x){const T=x.target.value;l(T),t==null||t(T)}const h=()=>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(_f,{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(Cb,{size:16}):p.jsx(kf,{size:16})})]})]}),b=()=>p.jsx("textarea",{ref:m,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}),S=p.jsxs("div",{className:le("flex flex-col h-full w-full border rounded-md bg-background",i),style:{minHeight:"200px"},children:[p.jsx(h,{}),p.jsx(b,{})]});return c?p.jsx(gf,{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:S})})}):S};Q0.displayName="CodeEditor";const eb=O.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));eb.displayName="Avatar";const tb=O.forwardRef(({className:e,...t},r)=>p.jsx("img",{ref:r,className:le("aspect-square h-full w-full",e),...t}));tb.displayName="AvatarImage";const rb=O.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:le("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));rb.displayName="AvatarFallback";const nb=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r,children:t}));nb.displayName="Card";const lU=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:le("flex flex-col space-y-1.5 p-6",e),...r,children:t}));lU.displayName="CardHeader";const cU=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("h3",{ref:n,className:le("text-2xl font-semibold leading-none tracking-tight",e),...r,children:t}));cU.displayName="CardTitle";const uU=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:le("p-6 pt-0",e),...r,children:t}));uU.displayName="CardContent";const Ti=({text:e,className:t="",iconClassName:r="",title:n="Copy to clipboard",onCopySuccess:a,onCopyError:i,tooltipText:o="Copied!",tooltipPosition:s="bottom",size:l="md"})=>{const[c,u]=O.useState(!1),f=()=>{switch(l){case"sm":return{button:"p-1",icon:"w-3 h-3",tooltip:"text-xs py-1 px-2"};case"lg":return{button:"p-2",icon:"w-5 h-5",tooltip:"text-sm py-2 px-3"};default:return{button:"p-1.5",icon:"w-4 h-4",tooltip:"text-xs py-1 px-2"}}},d=()=>{const h="absolute bg-gray-800 text-white rounded whitespace-nowrap z-50";switch(s){case"bottom":return`${h} top-full mt-1 left-1/2 -translate-x-1/2`;case"left":return`${h} right-full mr-1 top-1/2 -translate-y-1/2`;case"right":return`${h} left-full ml-1 top-1/2 -translate-y-1/2`;default:return`${h} bottom-full mb-1 left-1/2 -translate-x-1/2`}},m=f(),v=O.useCallback(()=>{u(!0),setTimeout(()=>u(!1),1e3)},[]),g=O.useCallback(async()=>{try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(e),v(),a==null||a();return}const h=document.createElement("textarea");h.value=e,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();try{document.execCommand("copy"),v(),a==null||a()}catch(b){const S=b instanceof Error?b:new Error("Copy failed");console.warn("Copy to clipboard failed:",S),i==null||i(S)}finally{document.body.removeChild(h)}}catch(h){const b=h instanceof Error?h:new Error("Copy failed");console.warn("Copy to clipboard failed:",b),i==null||i(b)}},[e,v,a,i]);return p.jsxs("div",{className:"relative inline-flex",children:[p.jsx("button",{onClick:g,className:`${m.button} hover:bg-gray-100 rounded transition-colors ${t}`,title:n,children:p.jsx(_f,{className:`${m.icon} text-gray-400 ${r}`})}),p.jsx("div",{className:`${d()} ${m.tooltip} transition-opacity duration-150 ${c?"opacity-100 animate-fade-in":"opacity-0 pointer-events-none"}`,style:{visibility:c?"visible":"hidden"},children:o})]})},fU=({isOpen:e,onClose:t,title:r,data:n,initialViewMode:a="plain"})=>{const[i,o]=O.useState(a),s=O.useMemo(()=>{if(n==null)return!1;if(typeof n=="string")try{return JSON.parse(n),!0}catch{return!1}return typeof n=="object"},[n]);O.useEffect(()=>{const c=u=>{u.key==="Escape"&&e&&t()};return e&&document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[e,t]);const l=c=>{c.target===c.currentTarget&&t()};return e?p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-90 z-50 flex",onClick:l,children:p.jsxs("div",{className:"bg-gray-900 w-full h-full flex flex-col",children:[p.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",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-100",children:r})]}),s&&p.jsxs("div",{className:"flex items-center gap-1 ml-4 pl-4 border-l border-gray-700",children:[p.jsx("button",{onClick:()=>o("plain"),className:`p-1.5 hover:bg-gray-700 rounded transition-colors ${i==="plain"?"bg-gray-700":""}`,title:"Plain JSON view",children:p.jsx(Sf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>o("interactive"),className:`p-1.5 hover:bg-gray-700 rounded transition-colors ${i==="interactive"?"bg-gray-700":""}`,title:"Interactive JSON view (fold/unfold)",children:p.jsx(Cf,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ti,{text:typeof n=="string"?n:JSON.stringify(n,null,2),title:"Copy content",className:"p-2 rounded-lg hover:bg-gray-700",iconClassName:"w-4 h-4 text-gray-400"}),p.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-700 rounded-lg transition-colors",title:"Close",children:p.jsx(Mf,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsx("div",{className:"flex-1 overflow-hidden bg-gray-800",children:p.jsx(xt,{data:n,showHeader:!1,className:"h-full border-0 !bg-gray-800",defaultExpanded:!0,viewMode:i,onViewModeChange:o,padding:"p-4",darkMode:!0})})]})}):null},dU=({data:e,level:t=0,expandedKeys:r=new Set,onToggleKey:n,keyPath:a="",darkMode:i=!1})=>{const o=t*16,s=(l,c,u)=>{const f=u?`${u}.${c}`:c||"";if(l===null)return p.jsx("span",{className:`${i?"text-gray-500":"text-gray-400"} italic`,children:"null"});if(l===void 0)return p.jsx("span",{className:`${i?"text-gray-500":"text-gray-400"} italic`,children:"undefined"});if(typeof l=="boolean")return p.jsx("span",{className:`${i?"text-purple-400":"text-purple-600"} font-medium`,children:String(l)});if(typeof l=="number")return p.jsx("span",{className:`${i?"text-blue-400":"text-blue-600"} font-medium`,children:l});if(typeof l=="string"){const d=l.length>100,m=d&&!r.has(`${f}._string`)?`${l.substring(0,100)}...`:l;return p.jsxs("div",{className:"inline",children:[p.jsxs("span",{className:i?"text-green-400":"text-green-600",children:['"',m,'"']}),d&&p.jsx("button",{onClick:()=>n==null?void 0:n(`${f}._string`),className:`ml-2 text-xs underline ${i?"text-blue-400 hover:text-blue-300":"text-blue-500 hover:text-blue-700"}`,children:r.has(`${f}._string`)?"Show less":"Show more"})]})}if(Array.isArray(l)){const d=r.has(f);return l.length===0?p.jsx("span",{className:i?"text-gray-400":"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(f),className:`flex items-center gap-1 p-1 rounded transition-colors ${i?"hover:bg-gray-700":"hover:bg-gray-100"}`,children:[d?p.jsx(fr,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}):p.jsx(ki,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}),p.jsxs("span",{className:`text-xs ${i?"text-gray-300":"text-gray-600"}`,children:["Array[",l.length,"]"]})]}),!d&&p.jsx("span",{className:`ml-2 ${i?"text-gray-500":"text-gray-400"}`,children:"[...]"})]}),d&&p.jsx("div",{className:"ml-4 mt-1",children:l.map((v,g)=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${o}px`},children:[p.jsxs("span",{className:`text-xs mt-0.5 min-w-[20px] ${i?"text-gray-500":"text-gray-400"}`,children:[g,":"]}),p.jsx("div",{className:"flex-1",children:s(v,String(g),`${f}[${g}]`)})]},g))})]})}if(typeof l=="object"){const d=Object.keys(l),m=r.has(f);return d.length===0?p.jsx("span",{className:i?"text-gray-400":"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(f),className:`flex items-center gap-1 p-1 rounded transition-colors ${i?"hover:bg-gray-700":"hover:bg-gray-100"}`,children:[m?p.jsx(fr,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}):p.jsx(ki,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}),p.jsxs("span",{className:`text-xs ${i?"text-gray-300":"text-gray-600"}`,children:["Object ","{",d.length," ",d.length===1?"key":"keys","}"]})]}),!m&&p.jsx("span",{className:`ml-2 ${i?"text-gray-500":"text-gray-400"}`,children:"{ ... }"})]}),m&&p.jsx("div",{className:"ml-4 mt-1",children:d.map(g=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${o}px`},children:[p.jsxs("span",{className:`text-xs mt-0.5 font-medium min-w-fit ${i?"text-blue-400":"text-blue-700"}`,children:['"',g,'":']}),p.jsx("div",{className:"flex-1",children:s(l[g],g,f)})]},g))})]})}return p.jsx("span",{className:i?"text-gray-300":"text-gray-600",children:String(l)})};return p.jsx("div",{className:"text-xs",children:s(e,"",a)})},ab=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},xt=({data:e,padding:t="p-3",title:r="Data",className:n="",maxHeight:a="300px",showHeader:i=!0,defaultExpanded:o=!1,defaultViewMode:s="plain",viewMode:l,onViewModeChange:c,darkMode:u=!1})=>{const[f,d]=O.useState(!1),[m,v]=O.useState(s),g=O.useMemo(()=>o?new Set([""]):new Set(ab(e)),[e,o]),[h,b]=O.useState(g);O.useEffect(()=>{o||b(new Set(ab(e)))},[e,o]);const S=l!==void 0,x=S?l:m,T=R=>{S?c==null||c(R):v(R)},{isValidJson:y,displayContent:w}=O.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]),A=O.useCallback(R=>{b(j=>{const C=new Set(j);return C.has(R)?C.delete(R):C.add(R),C})},[]),P=O.useCallback(()=>{d(!0)},[]),$=O.useCallback(()=>{d(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`${u?"bg-gray-800 border-gray-700":"bg-white border-gray-200"} border 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:()=>T("plain"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${x==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(Sf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>T("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(Cf,{className:"w-4 h-4 text-gray-400"})})]}),p.jsx("div",{className:"flex-1"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:P,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Expand to full screen",children:p.jsx(kf,{className:"w-4 h-4 text-gray-400"})}),p.jsx(Ti,{text:y?JSON.stringify(w,null,2):w,title:"Copy content",className:"p-1",iconClassName:"w-4 h-4 text-gray-400"})]})]}),p.jsxs("div",{className:`${t||"p-3"} overflow-auto ${u?"bg-gray-800":"bg-white"}`,style:{maxHeight:a},children:[y?x==="interactive"?p.jsx(dU,{data:w,expandedKeys:h,onToggleKey:A,keyPath:"",darkMode:u}):p.jsx("div",{className:`text-xs whitespace-pre ${u?"text-gray-300":"text-gray-700"}`,children:JSON.stringify(w,null,2)}):p.jsx("div",{className:`text-xs whitespace-pre-wrap ${u?"text-gray-300":"text-gray-700"}`,children:w}),!w&&w!==0&&w!==!1&&p.jsx("div",{className:`text-center text-sm py-8 ${u?"text-gray-500":"text-gray-400"}`,children:"No data available"})]})]}),p.jsx(fU,{isOpen:f,onClose:$,title:r,data:w,initialViewMode:x})]})};class ib{constructor(t){kt(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,m)=>new Date(d.startTime).getTime()-new Date(m.startTime).getTime());return console.log("📊 Sorted observations:",f.length,"total"),f}catch(i){return console.error("❌ Error fetching trace data:",i),null}}matchNodeToObservationById(t,r){console.log("🔍 Matching node to observation by ID:",{nodeId:t,totalObservations:r.length});const n=r.find(a=>{let i=a.metadata;if(typeof i=="string")try{i=JSON.parse(i)}catch(s){return console.warn("Failed to parse metadata string:",s),!1}if(!(i!=null&&i.pipeTraceId)||(i==null?void 0:i._pipeSeq)===void 0)return!1;const o=`${i.pipeTraceId}.${i._pipeSeq}`;return console.log("Comparing:",{nodeId:t,observationNodeId:o,match:t===o}),t===o});if(!n){const a=t.split("_");if(a.length===2){const[,i]=a,o=parseInt(i,10);if(!isNaN(o)){const s=r.find(l=>{let c=l.metadata;if(typeof c=="string")try{c=JSON.parse(c)}catch(u){return console.warn("Failed to parse metadata string in fallback:",u),!1}return(c==null?void 0:c._pipeSeq)===o});if(s){let l=s.metadata;if(typeof l=="string")try{l=JSON.parse(l)}catch{}return console.log("✅ Matched observation by sequence:",{id:s.id,name:s.name,type:s.type,_pipeSeq:l==null?void 0:l._pipeSeq}),s}}}}if(n){let a=n.metadata;if(typeof a=="string")try{a=JSON.parse(a)}catch{}console.log("✅ Matched observation:",{id:n.id,name:n.name,type:n.type,pipeTraceId:a==null?void 0:a.pipeTraceId,_pipeSeq:a==null?void 0:a._pipeSeq})}else console.log("✅ Matched observation: No match found");return n||null}sleep(t){return new Promise(r=>setTimeout(r,t))}async getObservationForNode(t,r,n,a=5,i=2e3){console.log("🔄 Getting observation for node by ID with retry logic:",{nodeId:t,traceId:r,projectId:n,maxRetries:a,retryDelay:i});let o=null;for(let s=1;s<=a;s++)try{console.log(`📊 Attempt ${s}/${a} for node ${t}`);const l=await this.getTraceById({traceId:r,projectId:n});if(!l||l.length===0){if(console.log(`❌ Attempt ${s}: No observations found for trace`),o=new Error("No observations found for trace"),s<a){console.log(`⏳ Waiting ${i}ms before retry...`),await this.sleep(i);continue}return null}const c=this.matchNodeToObservationById(t,l);if(!c){if(console.log(`❌ Attempt ${s}: No matching observation found for node ID: ${t}`),o=new Error(`No matching observation found for node ID: ${t}`),s<a){console.log(`⏳ Waiting ${i}ms before retry...`),await this.sleep(i);continue}return null}const u=await this.getObservationById({observationId:c.id,traceId:r,projectId:n});if(u)return console.log(`✅ Success on attempt ${s}: Found observation data for node ${t}`),u;if(o=new Error("No detailed data returned"),s<a){console.log(`⏳ No data returned, waiting ${i}ms before retry...`),await this.sleep(i);continue}}catch(l){if(o=l,console.error(`❌ Attempt ${s} failed:`,l),s<a){console.log(`⏳ Waiting ${i}ms before retry...`),await this.sleep(i);continue}}return console.error("❌ All retries exhausted. Last error:",o),null}updateConfig(t){this.config=t}getConfig(){return this.config}}function ob({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a,showDetailView:i=!0,apiConfig:o,projectId:s,nodeIndex:l=0}){const c=O.useMemo(()=>{var I;return e.type==="GuardrailsInputScan"||e.type==="GuardrailsOutputScan"||((I=e.name)==null?void 0:I.toLowerCase().includes("guardrail"))},[e.type,e.name]),u=O.useMemo(()=>c?["summary","response"]:e.type==="ProxyWorker"?["request","response"]:e.type==="llm"?["summary","request","response"]:e.type==="tool"?["request","response","logs"]:[],[e.type,c]),[f,d]=O.useState(u[0]),m=a?a.has(e.id):!1,v=e.children&&e.children.length>0,[g,h]=O.useState(null),[b,S]=O.useState(!1),[x,T]=O.useState(null),[y,w]=O.useState(!1),[A,P]=O.useState(!1),$=["llm"],R=5,j=2e3;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 C=O.useMemo(()=>(console.log("🔧 DebugCard - Creating ApiService:",{hasApiConfig:!!o,willCreateService:!!o}),o?new ib(o):null),[o]),F=O.useMemo(()=>$.includes(e.type),[e.type]),B=O.useCallback(async()=>{if(!F){console.log("🔍 DebugCard - Node type not API-enabled:",e.type);return}if(!C||!s||y){console.log("🔍 DebugCard - API call skipped:",{hasApiService:!!C,hasProjectId:!!s,hasLoadedApi:y,isApiEnabledNode:F,nodeType:e.type,reason:C?s?"Already loaded":"No project ID":"No API service"});return}S(!0),T(null),P(!1);try{const I=await C.getObservationForNode(e.id,e.runId,s,R,j);if(I){const U={...I};try{typeof I.input=="string"?U.input=JSON.parse(I.input):I.input&&typeof I.input=="object"&&(U.input=JSON.parse(JSON.stringify(I.input,null,2)))}catch{U.input=I.input||{}}try{typeof I.output=="string"?U.output=JSON.parse(I.output):I.output&&typeof I.output=="object"&&(U.output=JSON.parse(JSON.stringify(I.output,null,2)))}catch{U.output=I.output||{}}h(U),w(!0),P(!1)}else console.log("📊 All API retries exhausted, using fallback node data"),T("API data unavailable after retries, showing local data"),P(!0),w(!0)}catch(I){console.error("Error fetching observation data:",I),T("API data unavailable, showing local data"),P(!0),w(!0)}finally{S(!1)}},[C,s,e.id,e.runId,F]);O.useEffect(()=>{u.includes(f)||d(u[0])},[u,f]),O.useEffect(()=>{h(null),S(!1),T(null),w(!1),P(!1)},[e.id]);const z=O.useCallback(I=>{d(I),console.log("🔍 DebugCard - Tab clicked:",{nodeId:e.id,nodeName:e.name,nodeType:e.type,clickedTab:I,isApiEnabledNode:F,hasApiService:!!C,hasProjectId:!!s,hasLoadedApi:y,isLoadingApi:b}),(I==="request"||I==="response")&&F&&C&&s&&!y&&!b&&(console.log("🚀 DebugCard - Triggering API call for API-enabled node:",e.id),B())},[C,s,y,b,B,e.id,F]),_=I=>{I.stopPropagation(),t&&t(e.id)},L=()=>{u.length===0&&v&&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":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"})}},G=()=>{var U,q;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 I="agent";switch(e.type){case"Agent":I="agent";break;case"llm":I="model";break;case"tool":I="tool";break;case"ProxyWorker":I="app";break;default:I="agent"}return p.jsx(Zr,{icon:e.icon,iconSource:I,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"?(q=e.metadata)==null?void 0:q.provider:void 0,modelName:e.type==="llm"?e.name:void 0})},E=I=>I?I<1e3?`${I}ms`:`${(I/1e3).toFixed(2)}s`:"",M=I=>{if(!I)return"Tool";switch(I){case"route_to_user":return"Response to User";default:return I.split("_").map(U=>U.charAt(0).toUpperCase()+U.slice(1)).join(" ")}},W=()=>u,K=()=>{var J,k;let I=e.toolInvocations||[];e.type==="llm"&&Array.isArray(e.output)&&(I=e.output.filter(Q=>Q&&typeof Q=="object"&&Q.name&&Q.tool_call_id));const U=I.length>0||e.children&&e.children.length>0,q=e.isResponse||I.length>0&&I[0].name==="route_to_user";return U?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:q?"Responded":"Invoked"}),I.length>0&&I.map((Q,X)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[Q.isAgentHandoff?p.jsx(Af,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}):p.jsx(Vs,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:M(Q.name||Q.toolName)})]},Q.tool_call_id||X)),I.length===0&&e.children&&e.children.length>0&&e.children.map((Q,X)=>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(Af,{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||X))]}),I.length>0&&((k=(J=I[0])==null?void 0:J.args)==null?void 0:k.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:I[0].args.reason})]})]}):e.output&&!U?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(Mb,{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"})},D=I=>{var U,q,J,k;if(!(!I||typeof I!="object")){if(Array.isArray(I)){const Q=I.find(X=>X&&typeof X=="object"&&(X.name==="route_to_user"||X.toolName==="route_to_user"));if(Q)return((U=Q.args)==null?void 0:U.message)||Q.message||((q=Q.output)==null?void 0:q.message)}else if(I.name==="route_to_user"||I.toolName==="route_to_user")return((J=I.args)==null?void 0:J.message)||I.message||((k=I.output)==null?void 0:k.message);if(I.message&&typeof I.message=="string")return I.message;if(I.content&&typeof I.content=="string")return I.content;if(I.text&&typeof I.text=="string")return I.text}},H=()=>{if(!e.output)return null;const I=D(e.output);return p.jsx(xt,{padding:"py-1",data:I||e.output,title:"",showHeader:!1,maxHeight:"120px",defaultExpanded:!0,className:"border-0"})},Y=()=>{if(!c||!e.output)return null;const I=e.error?e.error:e.output,U=I.scannersData,q=I.endFlow,J=I.endFlowMsg;return U?p.jsxs("div",{className:"space-y-3",children:[q&&J&&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:J})]})]}),p.jsx("div",{className:"space-y-1",children:Object.entries(U).map(([k,Q])=>{if(k==="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})})]},k);if(Q.scannerOutput){const X=Q.scannerOutput.Validity,se=Q.scannerOutput.RiskScore,ne=Q.scannerOutput.Duration;let fe="text-gray-500",ce="bg-gray-100";return se!==void 0&&(se===0?(fe="text-green-600",ce="bg-green-50"):se<=3?(fe="text-yellow-600",ce="bg-yellow-50"):se<=6?(fe="text-orange-600",ce="bg-orange-50"):(fe="text-red-600",ce="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:[X?p.jsx(Tb,{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:k.replace(/([A-Z])/g," $1").trim()})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[se!==void 0&&p.jsxs("div",{className:`px-2 py-0.5 rounded text-xs font-medium ${ce} ${fe}`,children:["Risk: ",se]}),p.jsx("span",{className:"text-xs text-gray-500",children:ne})]})]},k)}return null})})]}):null},te=()=>{var I;switch(f){case"summary":if(c)return 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(xt,{padding:"py-1",data:e.input,title:"",showHeader:!1,maxHeight:"150px",defaultExpanded:!0,className:"border-0"})]}),(e.output||e.error)&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Result"}),e.error&&!c?typeof e.error=="string"?p.jsx("div",{className:"text-xs text-gray-600",children:e.error}):p.jsx(xt,{padding:"py-1",data:e.error,title:"",showHeader:!1,maxHeight:"120px",defaultExpanded:!0,className:"border-0"}):Y()]})]});let U=!1;return e.type==="llm"&&Array.isArray(e.output)&&(U=e.output.some(q=>q&&typeof q=="object"&&q.name&&q.tool_call_id)),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(xt,{padding:"py-1",data:e.input,title:"",showHeader:!1,maxHeight:"120px",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"}),K()]}),e.output&&!U&&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"}),H()]}),e.error&&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:"Error"}),typeof e.error=="string"?p.jsx("div",{className:"text-xs text-red-600",children:e.error}):p.jsx(xt,{padding:"py-1",data:e.error,title:"",showHeader:!1,maxHeight:"120px",defaultExpanded:!0,className:"border-0"})]})]});case"request":if(F&&C){if(b)return p.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[p.jsx($f,{className:"w-5 h-5 animate-spin text-blue-500 mb-2 mx-auto"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Loading request data from API..."}),p.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Trace data may take a few seconds to be available"})]});if(x&&!A)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:B,className:"mt-2 px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})});if(!A&&(g!=null&&g.input))return p.jsx(xt,{data:g.input,title:"Request Data (API)",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"})}return p.jsx(xt,{data:e.input,title:A?"Request Data (Fallback)":"Request Data",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"});case"response":if(F&&C){if(b)return p.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[p.jsx($f,{className:"w-5 h-5 animate-spin text-blue-500 mb-2 mx-auto"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Loading response data from API..."}),p.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Trace data may take a few seconds to be available"})]});if(x&&!A)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:B,className:"mt-2 px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})});if(!A&&(g!=null&&g.output))return p.jsx(xt,{data:g.output,title:"Response Data (API)",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"})}return c&&(e.output||e.error)?p.jsx(xt,{data:e.error||e.output,title:e.error?"Error Output":"Full Scanner Output",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"}):p.jsx(xt,{data:e.output,title:A?"Response Data (Fallback)":"Response Data",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"});case"logs":return p.jsx(xt,{data:((I=e.metadata)==null?void 0:I.logs)||{},title:"Execution Logs",maxHeight:"250px",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:L,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:I=>{I.stopPropagation(),v?_(I):n&&n(e)},title:v?r?"Collapse":"Expand":"Show details",children:p.jsx(ki,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${v&&r||m&&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:G()}),p.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",title:e.type==="llm"?e.name:void 0,children:c?e.type==="GuardrailsInputScan"?"Input Guardrails Scanner":"Output Guardrails Scanner":e.type==="llm"?"AI Model Call":e.type==="tool"?M(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 I=(U=e.children)==null?void 0:U.find(q=>q.type==="llm");return I!=null&&I.name?p.jsx("span",{className:"text-[10px] text-gray-500 truncate max-w-[100px]",title:I.name,children:I.name}):null})(),(e.type==="Agent"||e.type==="llm"||c)&&(()=>{var U,q,J;let I=e.llmUsage;if(e.type==="Agent"&&e.children){const k=e.children.filter(Q=>Q.type==="llm");k.length>0&&(I=k.reduce((Q,X)=>X.llmUsage?{input_tokens:((Q==null?void 0:Q.input_tokens)||0)+(X.llmUsage.input_tokens||0),output_tokens:((Q==null?void 0:Q.output_tokens)||0)+(X.llmUsage.output_tokens||0),total_tokens:((Q==null?void 0:Q.total_tokens)||0)+(X.llmUsage.total_tokens||0)}:Q,null))}return I!=null&&I.total_tokens?p.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap cursor-help",title:`Input: ${((U=I.input_tokens)==null?void 0:U.toLocaleString())||0} tokens
296
- Output: ${((q=I.output_tokens)==null?void 0:q.toLocaleString())||0} tokens
297
- Total: ${((J=I.total_tokens)==null?void 0:J.toLocaleString())||0} tokens`,children:[I.total_tokens.toLocaleString()," Tokens"]}):null})(),e.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Pf,{className:"w-[12px] h-[12px]"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:E(e.duration)})]})]}),p.jsx("div",{className:"flex-shrink-0",children:V()})]})]})}),m&&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:W().map(I=>p.jsx("button",{onClick:()=>z(I),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===I?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:I.charAt(0).toUpperCase()+I.slice(1)},I))}),p.jsx("div",{className:"px-[4px]",children:te()})]})]}),r&&v&&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((I,U)=>p.jsx(ob,{node:I,onToggle:t,isExpanded:I.isExpanded,onNodeClick:n,selectedNodeIds:a,showDetailView:i,apiConfig:o,projectId:s,nodeIndex:U},I.id))]})]})}const sb=O.forwardRef(({executionEvents:e,sessionId:t,config:r={},onNodeExpand:n,onNodeCollapse:a,className:i=""},o)=>{const[s,l]=O.useState(new Set),[c,u]=O.useState(new Set),[f,d]=O.useState(new Set),{expansionMode:m="none",showExpansionControls:v=!1,defaultDetailView:g=!0,apiConfig:h}=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 b=O.useCallback(D=>!(h!=null&&h.tracingUrl)||!(h!=null&&h.projectId)?null:`${h.tracingUrl.replace(/\/(api|trace-api).*$/,"")}/project/${h.projectId}/sessions/${D}`,[h]),S=O.useCallback(D=>!(h!=null&&h.tracingUrl)||!(h!=null&&h.projectId)?null:`${h.tracingUrl.replace(/\/(api|trace-api).*$/,"")}/project/${h.projectId}/traces/${D}`,[h]),[x,T]=O.useState(m),[y,w]=O.useState(e),A=O.useRef(e.length);O.useEffect(()=>{w(e),e.length===0?(l(new Set),u(new Set),d(new Set),R.current=!1,A.current=0):(e.length>A.current&&(R.current=!0),A.current=e.length)},[e,g]);const P=O.useRef(0),$=O.useRef(null),R=O.useRef(!1);O.useImperativeHandle(o,()=>({addEvent:D=>{w(H=>[...H,D]),R.current=!0},addEvents:D=>{w(H=>[...H,...D]),R.current=!0},clearEvents:()=>{w([]),l(new Set),u(new Set),d(new Set),R.current=!1}}),[]);const j=O.useMemo(()=>{const D=J0.buildSessionTree(y,t);return $.current=D,D},[y,t]),C=D=>{const H=[],Y=te=>{H.push(te.id),te.children.forEach(I=>Y(I))};return D.runs.forEach(te=>{te.rootNodes.forEach(I=>Y(I))}),H},F=O.useCallback(()=>{const D=C(j);l(new Set(D));const H=j.runs.map(Y=>Y.runId);d(new Set(H))},[j]),B=O.useCallback(()=>{if(x==="none"){const D=new Set;j.runs.forEach(H=>{H.rootNodes.forEach(Y=>{D.add(Y.id)})}),l(D)}else l(new Set)},[x,j]),z=O.useCallback(()=>{if(j.runs.length>0){const D=j.runs[j.runs.length-1];if(D.rootNodes.length>0){const H=D.rootNodes[D.rootNodes.length-1],Y=[],te=I=>{if(Y.push(I.id),I.children.length>0){const U=I.children[I.children.length-1];te(U)}};te(H),l(new Set(Y)),d(I=>{const U=new Set(I);return U.add(D.runId),U})}}},[j]),_=O.useCallback(D=>{const H=j.runs.find(q=>q.runId===D);if(!H)return;const Y=new Set,te=q=>{Y.add(q.id),q.children.forEach(J=>te(J))};H.rootNodes.forEach(q=>te(q));const I=Array.from(Y).filter(q=>{const J=k=>{if(k.id===q)return k;for(const Q of k.children){const X=J(Q);if(X)return X}return null};for(const k of H.rootNodes){const Q=J(k);if(Q&&(Q.type==="llm"||Q.type==="tool"||Q.type==="GuardrailsInputScan"||Q.type==="GuardrailsOutputScan"||Q.type==="ProxyWorker"))return!0}return!1});I.some(q=>c.has(q))?u(q=>{const J=new Set(q);return Y.forEach(k=>J.delete(k)),J}):(l(q=>{const J=new Set(q);return Y.forEach(k=>J.add(k)),J}),u(q=>{const J=new Set(q);return I.forEach(k=>J.add(k)),J}))},[j,s,c]);O.useEffect(()=>{if(x==="none"&&j.runs.length>0){const D=C(j);l(new Set(D))}},[x,j]);const L=O.useRef(null);O.useEffect(()=>{y.length>P.current&&L.current&&setTimeout(()=>{L.current&&L.current.scrollTo({top:L.current.scrollHeight,behavior:"smooth"})},100),P.current=y.length},[y.length]),O.useEffect(()=>{if(y.length>0&&j.runs.length>0){if(R.current){switch(x){case"all":const D=C(j);l(new Set(D));break;case"last":z();break;case"none":if(s.size===0){const H=C(j);l(new Set(H))}break}R.current=!1}d(D=>{const H=new Set(D);return j.runs.forEach(Y=>{H.has(Y.runId)||H.add(Y.runId)}),H})}},[j,x,z,s.size]);const V=O.useCallback(D=>{l(H=>{const Y=new Set(H);return Y.has(D)?(Y.delete(D),a==null||a(D)):(Y.add(D),n==null||n(D)),Y})},[n,a]),G=O.useCallback(D=>{u(H=>{const Y=new Set(H);return Y.has(D.id)?Y.delete(D.id):Y.add(D.id),Y})},[]),E=O.useCallback(D=>{d(H=>{const Y=new Set(H);return Y.has(D)?Y.delete(D):Y.add(D),Y})},[]),M=O.useCallback(D=>({...D,isExpanded:s.has(D.id),children:D.children.map(Y=>M(Y))}),[s]),W=D=>D?D<1e3?`${D}ms`:`${(D/1e3).toFixed(2)}s`:"",K=D=>D?D>=1e6?`${(D/1e6).toFixed(1)}M tokens`:D>=1e3?`${(D/1e3).toFixed(1)}K tokens`:`${D} tokens`:"";return j.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:L,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:j.sessionId}),p.jsx(Ti,{text:j.sessionId,title:"Copy session ID",size:"sm",className:"p-[4px]",iconClassName:"w-[12px] h-[12px]"}),b(j.sessionId)&&p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",title:"Open session in external viewer",onClick:()=>{const D=b(j.sessionId);D&&window.open(D,"_blank")},children:p.jsx(Ef,{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: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:"Expand all nodes",children:[p.jsx(kb,{className:"w-3 h-3"}),"Expand All"]}),p.jsxs("button",{onClick:z,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(_b,{className:"w-3 h-3"}),"Expand Last"]}),p.jsxs("button",{onClick:B,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($b,{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:x,onChange:D=>T(D.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"})]})]})]}),j.runs.map(D=>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 truncate",onClick:()=>E(D.runId),title:D.userInput,children:p.jsx("span",{className:"text-xs text-gray-900 truncate",children:D.userInput||`Run ${D.runId}`})}),p.jsx("button",{onClick:H=>{H.stopPropagation(),_(D.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:(()=>{const H=new Set,Y=I=>{H.add(I.id),I.children.forEach(U=>Y(U))};return D.rootNodes.forEach(I=>Y(I)),Array.from(H).some(I=>c.has(I))?"Hide all node details in this run":"Show all node details in this run"})(),children:(()=>{const H=new Set,Y=I=>{H.add(I.id),I.children.forEach(U=>Y(U))};return D.rootNodes.forEach(I=>Y(I)),Array.from(H).some(I=>c.has(I))?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("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("button",{onClick:H=>{H.stopPropagation(),E(D.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:f.has(D.runId)?"Collapse run":"Expand run",children:p.jsx(fr,{className:`w-[16px] h-[16px] text-gray-400 transition-transform ${f.has(D.runId)?"rotate-180":""}`})})]})}),f.has(D.runId)&&p.jsx("div",{className:"bg-white w-full flex flex-col",children:D.rootNodes&&D.rootNodes.map((H,Y)=>{var te;return p.jsx("div",{className:"w-full",children:p.jsx(ob,{node:M(H),onToggle:V,isExpanded:s.has(H.id),onNodeClick:G,selectedNodeIds:c,showDetailView:!0,apiConfig:r.apiConfig,projectId:(te=r.apiConfig)==null?void 0:te.projectId,nodeIndex:Y})},H.id)})}),(()=>{const H=I=>{let U,q;const J=k=>{var Q,X,se,ne,fe;for(const ce of k){if(ce.type==="tool"&&(ce.name==="route_to_user"||ce.name==="route_to_user")&&ce.output&&(typeof ce.output=="string"?q=ce.output:(Q=ce.output)!=null&&Q.message?q=ce.output.message:(X=ce.output)!=null&&X.result&&(q=ce.output.result)),ce.type==="llm"&&Array.isArray(ce.output)){const Ee=ce.output.find(Oe=>(Oe==null?void 0:Oe.name)==="route_to_user"||(Oe==null?void 0:Oe.toolName)==="route_to_user");Ee&&((se=Ee.args)!=null&&se.message?q=Ee.args.message:Ee.message&&(q=Ee.message))}ce.output&&!q&&(typeof ce.output=="string"?U=ce.output:Array.isArray(ce.output)||((ne=ce.output)!=null&&ne.message?U=ce.output.message:(fe=ce.output)!=null&&fe.result?U=ce.output.result:typeof ce.output=="object"&&!ce.output.name&&!ce.output.toolName&&(U=JSON.stringify(ce.output)))),ce.children&&ce.children.length>0&&J(ce.children)}};return J(I),q||U},te=(D.rootNodes?H(D.rootNodes):void 0)||D.finalOutput;return te?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:te,children:te}),p.jsxs("div",{className:"flex items-center gap-[8px] flex-shrink-0",children:[D.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Pf,{className:"w-[12px] h-[12px] text-gray-400"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:W(D.duration)})]}),D.totalTokens&&p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:K(D.totalTokens)})]})]}):null})()]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[p.jsx("span",{className:"text-xs text-gray-400",children:D.runId}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ti,{text:D.runId,title:"Copy run ID",size:"sm",className:"p-1",iconClassName:"w-3 h-3"}),S(D.runId)&&p.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",title:"Open trace in external viewer",onClick:()=>{const H=S(D.runId);H&&window.open(H,"_blank")},children:p.jsx(Ef,{className:"w-3 h-3 text-gray-400"})})]})]})]},D.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"})})})});sb.displayName="DebugPanel";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"],pU=(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),m=Math.floor(d*12+Math.random()*500),v=Math.floor(d*8+Math.random()*300),g=Math.floor(m*.3+Math.random()*100),h=Math.floor(m*.25+Math.random()*80),b=Math.floor(m*.2+Math.random()*60),S=Math.floor(m*.15+Math.random()*50),x={};Bs.forEach(w=>{const A=w.replace(/\s+/g,"").toLowerCase(),P=Math.floor(d/Bs.length);x[A]=Math.floor(P+Math.random()*(P*.5))});const T={};Fs.forEach(w=>{const A=w.replace(/[-]/g,""),P=Math.floor(m/Fs.length);T[A]=Math.floor(P+Math.random()*(P*.8))});const y={};Us.forEach(w=>{const A=w.replace(/[-\.]/g,""),P=Math.floor(v/Us.length);y[A]=Math.floor(P+Math.random()*(P*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:c,inputTokens:u,outputTokens:f,agentRuns:d,toolRuns:m,modelRuns:v,codeTools:g,workflowTools:h,knowledgeTools:b,mcpTools:S,...x,...T,...y,value:o})}return t},hU=()=>{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},mU=()=>{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]}))},gU=()=>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()})),Qr=pU(),vU=hU(),yU=mU(),bU=gU(),xU={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review key metrics to track your agentic app’s usage and performance.",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:Qr,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:Qr,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:Qr,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:Qr,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:Qr,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:vU,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:Qr,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:yU,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:Qr,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:bU,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}}]},Xt={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"]}},wU={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"}},OU={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"}},SU={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"}},lb=(e,t)=>e.primary[t%e.primary.length],ji=(e,t)=>e.semantic[t],AU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},cb=(e,t=Xt)=>e.map((r,n)=>({...r,color:lb(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),m=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:m,modelRuns:v,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:cb([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Xt),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(Xt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:ji(Xt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:ji(Xt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:ji(Xt,"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}}]},jU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Xt.primary,semanticColors:Xt.semantic,gradientColors:Xt.gradients},PU={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},_U={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review key metrics to track your agentic app’s usage and performance.",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}},EU=`
303
+ </svg>`,fallback:'<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M3 3L5.25 5.25M3 3H1.5L1 1.5L1.5 1L3 1.5V3ZM9.6295 1.37041L8.3157 2.68421C8.1177 2.88221 8.0227 2.97721 7.9816 3.09539C7.94898 3.19582 7.94898 3.30399 7.9816 3.40442C8.0227 3.5226 8.1177 3.6176 8.3157 3.8156L8.4343 3.9342C8.6323 4.1322 8.7273 4.2272 8.8277 4.25982C8.92813 4.29244 9.0363 4.29244 9.13673 4.25982C9.23717 4.2272 9.33217 4.1322 9.53017 3.9342L10.795 2.66941C10.927 2.82734 11 3.0201 11 3.25C11 5.26868 9.26868 7 7.25 7C7.06688 7 6.88596 6.982 6.715 6.958C6.4718 6.922 6.3503 6.902 6.2566 6.9106C6.1483 6.9211 6.0994 6.937 6.0103 6.987C5.92498 7.0349 5.8395 7.1204 5.6285 7.3314L2.75 10.21C2.2358 10.7242 1.16422 10.7242 0.65 10.21C0.13578 9.69578 0.13578 8.6242 0.65 8.11L3.52835 5.23165C3.73935 5.02065 3.83485 4.92515 3.88275 4.83983C3.93275 4.75024 3.94867 4.70134 3.95657 4.59304C3.96497 4.49163 3.945 4.37009 3.90905 4.12702C3.88591 3.91193 3.875 3.69301 3.875 3.5C3.875 1.48132 5.60632 -0.25 7.625 -0.25C8.15274 -0.25 8.824 0.13482 9.6295 1.37041ZM6 7.5L8.75 10.25C9.2642 10.7642 10.3358 10.7642 10.85 10.25C11.3642 9.73578 11.3642 8.6642 10.85 8.15L7.9877 5.2877C7.82754 5.27138 7.67136 5.24752 7.5204 5.22006C7.32588 5.18466 7.11246 5.21742 6.96984 5.36004L6 6.33Z" stroke="#667085" stroke-width="0.72" stroke-linecap="round" stroke-linejoin="round"></path></svg>'},VB=(e,t)=>{const r=e.toLowerCase();if(r.includes("code")||r.includes("inline")||r==="inlinetool")return Ft.inlineTool;if(r.includes("workflow")||r.includes("library")||r==="toollibrary")return Ft.toolLibrary;if(r.includes("knowledge")||r==="knowledge")return Ft.KNOWLEDGE;if(r.includes("mcp")||r==="mcp")return Ft.MCP;if(Ft[e])return Ft[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")||n.includes("processing")?Ft.inlineTool:n.includes("library")||n.includes("workflow")?Ft.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Ft.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Ft.MCP:Ft.fallback},Zr=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i,provider:o,modelName:s})=>{const[l,c]=O.useState(!1),[u,f]=O.useState(!1),[d,h]=O.useState(!1),v=BB(e),g=UB[r];if(t==="GuardrailsInputScan"||t==="GuardrailsOutputScan")return p.jsx("div",{className:`${g} rounded-[8px] flex items-center justify-center bg-gray-100 ${n}`,role:"img","aria-label":"Input Scanner",children:p.jsx("div",{dangerouslySetInnerHTML:{__html:zB}})});if(t==="event")return p.jsx("div",{className:`${g} rounded-[8px] flex items-center justify-center bg-gray-100 ${n}`,role:"img","aria-label":"Event Scanner",style:{aspectRatio:"1 / 1"},children:p.jsx("div",{dangerouslySetInnerHTML:{__html:WB}})});if(t==="tool"){const S=VB(i||"fallback",a);return p.jsx("div",{className:`${g} rounded-[8px] flex items-center justify-center bg-gray-100 ${n}`,children:p.jsx("div",{dangerouslySetInnerHTML:{__html:S}})})}if(t==="model"){const b=M0(o),S=()=>{h(!0)};if(d){const x=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:x})})}return p.jsx("img",{src:b,alt:s||a,className:`${g} rounded-[8px] p-[4px] ${n}`,onError:S})}if(v!=null&&v.name&&v.name!=="fallback"&&!l){const b=FB(v,t),S=()=>{c(!0)};return p.jsx("img",{src:b,alt:a,className:`${g} rounded-[8px] p-[4px] object-cover ${n}`,onError:S})}if(l&&!u&&t==="agent"){const b=`${df}/agenticai/assets/agent-avatars/avatar1.svg`,S=()=>{f(!0)};return p.jsx("img",{src:b,alt:a,className:`${g} rounded-[8px] p-[4px] object-cover ${n}`,onError:S})}if(t==="model"){const b=M0(o),S=()=>{h(!0)};if(d){const x=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:x})})}return p.jsx("img",{src:b,alt:s||a,className:`${g} rounded-[8px] p-[4px] ${n}`,onError:S})}const m=`${df}/agenticai/assets/agent-avatars/avatar1.svg`;return p.jsx("img",{src:m,alt:a,className:`${g} rounded-[8px] p-[4px] object-cover ${n}`})},k0=({data:e,className:t})=>{const[r,n]=O.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:le("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(Zr,{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 HB(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 GB(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 N0=({data:e,className:t})=>{const[r,n]=O.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:le("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(Zr,{icon:o.icon,iconSource:"tool",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:le("inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",HB(o.toolType||o.type||"Default")),children:GB(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"})})]})},qB=e=>{if(!e)return"/assets/icons/models/custom-api.svg";const t=e.toLowerCase(),r={openai:"Open AI.svg","open ai":"Open AI.svg",chatopenai:"Open AI.svg",gpt:"Open AI.svg",anthropic:"Anthropic.svg",claude:"Anthropic.svg",google:"Google.svg",gemini:"Google.svg",chatgooglegenerativeai:"Google.svg",googlegenerativeai:"Google.svg",palm:"Google.svg",azurechatopenai:"Azure Open AI.svg","azure open ai":"Azure Open AI.svg",azureopenai:"Azure Open AI.svg","azure openai":"Azure Open AI.svg",azure:"Azure Open AI.svg",aws:"AWS Bedrock.svg",bedrock:"AWS Bedrock.svg","aws bedrock":"AWS Bedrock.svg",awsbedrock:"AWS Bedrock.svg",amazon:"AWS Bedrock.svg",cohere:"Cohere.svg",api:"API.svg",custom:"custom-api.svg","custom-api":"custom-api.svg",customapi:"custom-api.svg"};if(r[t])return`assets/icons/models/${r[t]}`;for(const[n,a]of Object.entries(r))if(t.includes(n)||n.includes(t))return`assets/icons/models/${a}`;return"assets/icons/models/custom-api.svg"},KB=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)},YB=({provider:e})=>{const[t,r]=O.useState(!1),n=qB(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})},I0=({data:e,className:t})=>{const[r,n]=O.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:le("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(YB,{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:KB(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"})})]})},XB=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"}}},ZB=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),D0=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var w;const s=XB(n),[l,c]=O.useState(10),[u,f]=O.useState("all"),[d,h]=O.useState(!1),v=[{label:`All ${s.entityName}`,value:"all"},...a.map(A=>({label:A.name,value:A.id}))],g=u==="all"?a:a.filter(A=>A.id===u),m=()=>{f("all"),h(!1),c(10),t()};O.useEffect(()=>{const A=$=>{$.key==="Escape"&&m()},j=$=>{d&&($.target.closest(".filter-dropdown")||h(!1))};return e&&(document.addEventListener("keydown",A),document.addEventListener("mousedown",j),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",A),document.removeEventListener("mousedown",j),document.body.style.overflow="unset"}},[e,d,m]),O.useEffect(()=>{e&&(f("all"),h(!1),c(10))},[e]);const b=A=>new Date(A).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),S=()=>{c(A=>Math.min(A+10,g.length))},x=A=>{f(A),h(!1),c(10)};if(!e)return null;const T=g.slice(0,l),y=((w=v.find(A=>A.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:le("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(Nf,{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(A=>p.jsx("button",{onClick:()=>x(A.value),className:le("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",u===A.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:A.label},A.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:T.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:[T.map((A,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(Zr,{icon:A.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"tool":"model",size:"small",name:A.name,toolType:A.toolType||A.type,provider:A.provider,modelName:A.modelName})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:A.name}),n==="modelRuns"&&A.provider&&p.jsx("div",{className:"text-xs text-[#475467] truncate",children:A.provider})]})]}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:ZB(A.runs)})}),p.jsx("div",{className:"flex justify-center",children:p.jsx("div",{className:"text-xs font-medium text-[#475467]",children:A.responseTime})})]},A.id||j)),l<g.length&&p.jsx("div",{className:"flex justify-center",children:p.jsx("button",{onClick:S,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 L0{constructor(t=""){Mt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Mt(this,"baseUrl","");Mt(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 R0{constructor(t){Mt(this,"endpointsService");Mt(this,"defaultHeaders");Mt(this,"timeout");this.endpointsService=new L0(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 Yt{constructor(t){Mt(this,"apiInvoker");Mt(this,"projectId");Mt(this,"environment");Mt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new R0(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||Yt.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,_id:i._id}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||Yt.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||Yt.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||Yt.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.connectionName?`${r.modelName} - ${r.connectionName}`: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"}],n=a=>{if(!a)return"assets/icons/models/custom-api.svg";const i=a.toLowerCase(),o={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(o[i])return`assets/icons/models/${o[i]}`;for(const[s,l]of Object.entries(o))if(i.includes(s)||s.includes(i))return`assets/icons/models/${l}`;return"assets/icons/models/custom-api.svg"};return t.forEach(a=>{a.modelName&&r.push({label:a.modelName,value:a.modelName.replace(/[-\.]/g,""),icon:n(a.provider),type:a.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(),S=(g.toolName||g.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:b,toolName:S,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","tool"].includes(b)||["toollibrary","workflow","tool"].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 '${S}', 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(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),23,59,59,999)),a=new Date(n);return a.setUTCDate(n.getUTCDate()-t+1),a.setUTCHours(0,0,0,0),{fromTimestamp:a.toISOString(),toTimestamp:n.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 B0=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,c]=O.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 S=g.listView||[];console.log("ListView data for clicked date:",S);const T=new Yt({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(S,b),y=g[b]||g.count||0;console.log("Opening slider with data:",{date:m,metricType:b,sliderData:T,totalRuns:y}),c({isOpen:!0,date:m,metricType:b,data:T,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(E0,{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(k0,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(N0,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx(I0,{data:o.data})}):p.jsx("div",{className:"flex-1 min-h-[380px]",children:p.jsx($0,{config:o})}):null,v=()=>{switch(a){case"chart":return d();case"table":return h();case"mixed":return p.jsxs("div",{className:le("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:le("w-full",t),children:v()}),p.jsx(D0,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},ks=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=O.useState(!1),[l,c]=O.useState(t||""),u=O.useRef(null),f=e.find(v=>v.value===l);O.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:le("relative",a),children:[p.jsxs("button",{type:"button",className:le("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:le("truncate w-full",!f&&"text-gray-700 font-medium text-sm"),children:f?f.label:r})]}),p.jsx(fr,{className:le("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:le("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)})})]})},F0=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,iconSource:l="app",maxItems:c=100,maxLabelLength:u=30})=>{const[f,d]=O.useState(!1),[h,v]=O.useState(""),[g,m]=O.useState(()=>{const P=t||r;return a?Array.isArray(P)?P:P?[P]:[]:P?[Array.isArray(P)?P[0]:P]:[]}),b=O.useRef(null);O.useEffect(()=>{const P=_=>{b.current&&!b.current.contains(_.target)&&d(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[]);const S=(P,_=u)=>P.length<=_?P:P.substring(0,_)+"...",x=i?e.filter(P=>P.label.toLowerCase().includes(h.toLowerCase())):e,T=x.slice(0,c),y=x.length>c,w=P=>{let _;if(a){if(P==="all"){j();return}if(g.includes(P))_=g.filter(F=>F!==P),_=_.filter(F=>F!=="all");else{_=g.filter(C=>C!=="all"),_=[..._,P];const F=x.filter(C=>C.value!=="all").map(C=>C.value),z=_.filter(C=>C!=="all");z.length===F.length&&(_=["all",...z])}}else _=[P],d(!1);m(_);const R=a?_:_[0]||"";o==null||o(R)},A=()=>{if(!a)return{checked:!1,indeterminate:!1};const P=x.filter(R=>R.value!=="all").map(R=>R.value),_=g.filter(R=>R!=="all"&&P.includes(R));return g.includes("all")&&_.length===0?{checked:!1,indeterminate:!1}:_.length===0?{checked:!1,indeterminate:!1}:_.length===P.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},j=()=>{if(!a)return;const P=A(),_=x.filter(R=>R.value!=="all").map(R=>R.value);if(P.checked)m(["all"]),o==null||o(["all"]);else{const R=["all",..._];m(R),o==null||o(R)}},$=()=>{m(["all"]),o==null||o(a?["all"]:"all")},U=()=>{if(!a){if(g.length===0)return n;const F=e.find(z=>z.value===g[0]);return(F==null?void 0:F.label)||n}const P=g.filter(F=>F!=="all"),_=g.includes("all");if(P.length===0)return n;if(P.length===1){const F=e.find(z=>z.value===P[0]);return(F==null?void 0:F.label)||n}const R=e.filter(F=>F.value!=="all").length;return P.length===R?"All selected":`${P.length} selected`};return p.jsxs("div",{className:le("relative",s),ref:b,children:[p.jsxs("button",{type:"button",onClick:()=>d(!f),className:le("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.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[!a&&g.length>0&&g[0]!=="all"&&(()=>{const P=e.find(_=>_.value===g[0]);return P!=null&&P.avatar||P!=null&&P.icon?p.jsx("div",{className:"mr-3 flex-shrink-0",children:p.jsx(Zr,{icon:P.icon,iconSource:l,size:"xs",name:P.label,toolType:P.type,provider:P.type,modelName:P.label})}):null})(),p.jsx("span",{className:le("truncate",g.length===0&&"text-gray-500"),children:U()})]}),p.jsx(fr,{className:le("w-[16px] h-[16px] text-gray-400 transition-transform duration-150 flex-shrink-0",f&&"transform rotate-180")})]}),f&&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(kf,{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:h,onChange:P=>v(P.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:j,className:"flex items-center text-xs font-medium text-gray-700 hover:text-gray-900",children:[p.jsx("div",{className:le("flex items-center justify-center w-[16px] h-[16px] mr-[8px] border transition-colors duration-150",(()=>{const P=A();return P.indeterminate||P.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const P=A();return P.indeterminate?p.jsx("div",{className:"w-[8px] h-[4px] bg-white rounded"}):P.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:$,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:[T.length===0?p.jsx("div",{className:"px-[12px] py-[16px] text-sm text-gray-500 text-center",children:"No options found"}):T.map(P=>{let _;return P.value==="all"?null:(_=g.includes(P.value),p.jsxs("div",{className:"relative group",children:[p.jsxs("div",{onClick:()=>w(P.value),className:le("flex items-center px-[12px] py-[8px] cursor-pointer hover:bg-gray-50","transition-colors duration-150",_&&"bg-gray-50"),children:[a?p.jsx("div",{className:le("flex items-center justify-center w-[16px] h-[16px] mr-[12px] border","transition-colors duration-150",_?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:_&&p.jsx("svg",{className:"w-[12px] h-[12px]",fill:"currentColor",viewBox:"0 0 20 20",children:p.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):p.jsx("div",{className:le("w-[16px] h-[16px] mr-[12px] rounded-full border-2 transition-colors duration-150",_?"border-blue-600 bg-blue-600":"border-gray-300"),children:_&&p.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),(P.avatar||P.icon)&&p.jsx("div",{className:"mr-3 flex-shrink-0",children:p.jsx(Zr,{icon:P.icon,iconSource:l,size:"xs",name:P.label,toolType:P.type,provider:P.type,modelName:P.label})}),p.jsx("span",{className:le("flex-1 text-xs whitespace-nowrap truncate",_?"font-medium text-gray-700":"text-gray-500"),children:S(P.label)})]}),P.label.length>u&&p.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:p.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-[12px] py-[8px] shadow-lg max-w-xs break-words whitespace-normal",children:[P.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"})]})})]},P.value))}),y&&p.jsxs("div",{className:"px-[12px] py-[8px] text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[p.jsxs("div",{className:"text-center font-medium",children:["+",x.length-c," more items"]}),i&&p.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},U0=({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")?"tool":c.includes("model")?"model":"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:le("flex items-center gap-3",t),children:[r&&p.jsx(p.Fragment,{children:r.multiSelect?p.jsx(F0,{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(ks,{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:le("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:le("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(Ab,{className:"w-[16px] h-[16px]"})}),p.jsx("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:le("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(Db,{className:"w-[16px] h-[16px]"})})]})]})},W0=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var V;const{id:i,title:o,description:s,metrics:l,view:c,controls:u,layout:f}=e,[d,h]=O.useState(c.type),[v,g]=O.useState("chart"),m=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[b,S]=O.useState(m()),[x,T]=O.useState("all"),y=E=>{var W,q,J,L,G;const N=j();(W=N==null?void 0:N.controls)!=null&&W.toggle?(g(E),(J=(q=N.controls.toggle).onToggle)==null||J.call(q,E)):(h(E),(G=(L=u==null?void 0:u.toggle)==null?void 0:L.onToggle)==null||G.call(L,E))},w=E=>{var q,J;const N=E.metricType||E.title.toLowerCase();S(N);const W=l.find(L=>(L.metricType||L.title.toLowerCase())===N);(J=(q=W==null?void 0:W.controls)==null?void 0:q.dropdown)!=null&&J.multiSelect?T(["all"]):T("all"),a==null||a(E)},A=E=>{var W,q,J;T(E);const N=l.find(L=>(L.metricType||L.title.toLowerCase())===b);(J=(q=(W=N==null?void 0:N.controls)==null?void 0:W.dropdown)==null?void 0:q.onChange)==null||J.call(q,E)},j=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===b)||null,$=E=>Array.isArray(E)?E.filter(W=>W!=="all").length>0:E!=="all",U=E=>Array.isArray(E)?E.filter(N=>N!=="all"):E!=="all"?[E]:[],P=E=>{var J,L,G,Q,I,B,Y,Z,M;const N=((L=(J=E.view)==null?void 0:J.chart)==null?void 0:L.data)||((G=c.chart)==null?void 0:G.data)||[];if(!$(x))return N;const W=E.metricType,q=U(x);if(q.length===1){const ee=q[0],K=j(),oe=(B=(I=(Q=K==null?void 0:K.controls)==null?void 0:Q.dropdown)==null?void 0:I.options)==null?void 0:B.find(fe=>fe.value===ee),ne=oe==null?void 0:oe.label;return console.log("🔍 Filtering chart data:",{metricType:W,singleFilter:ee,selectedLabel:ne,baseDataSample:N[0]}),N.map(fe=>{let Se=0;return fe.listView&&Array.isArray(fe.listView)&&(Se=fe.listView.filter(ke=>W==="agentRuns"&&ke.agentName?ke.agentName===ne||ke.agentName.toLowerCase()===(ne==null?void 0:ne.toLowerCase()):W==="toolRuns"&&ke.toolName?ke.toolName===ne||ke.toolName.toLowerCase()===(ne==null?void 0:ne.toLowerCase()):W==="modelRuns"&&ke.modelName?ke.modelName===ne||ke.modelName.toLowerCase()===(ne==null?void 0:ne.toLowerCase()):!1).reduce((ke,ct)=>ke+(ct.count||0),0)),console.log("📊 Filtered value for",ne,":",Se),{...fe,[W]:Se}})}if(q.length>1){const ee=j(),oe=(((M=(Z=(Y=ee==null?void 0:ee.controls)==null?void 0:Y.dropdown)==null?void 0:Z.options)==null?void 0:M.filter(ne=>q.includes(ne.value)))||[]).map(ne=>ne.label);return N.map(ne=>{let fe=0;return ne.listView&&Array.isArray(ne.listView)&&(fe=ne.listView.filter(ce=>W==="agentRuns"&&ce.agentName?oe.some(Ce=>ce.agentName===Ce||ce.agentName.toLowerCase()===(Ce==null?void 0:Ce.toLowerCase())):W==="toolRuns"&&ce.toolName?oe.some(Ce=>ce.toolName===Ce||ce.toolName.toLowerCase()===(Ce==null?void 0:Ce.toLowerCase())):W==="modelRuns"&&ce.modelName?oe.some(Ce=>ce.modelName===Ce||ce.modelName.toLowerCase()===(Ce==null?void 0:Ce.toLowerCase())):!1).reduce((ce,Ce)=>ce+(Ce.count||0),0)),{...ne,[W]:fe}})}return N},_=E=>{var J;if(!((J=E.view)!=null&&J.chart))return null;const N=P(E),W=()=>{var G,Q,I,B,Y,Z;if(!$(x)||!((G=E.controls)!=null&&G.dropdown))return((I=(Q=E.view)==null?void 0:Q.chart)==null?void 0:I.title)||E.title;const L=U(x);if(L.length===1){const M=(B=E.controls.dropdown.options)==null?void 0:B.find(ee=>ee.value===L[0]);return M?`${M.label}`:((Z=(Y=E.view)==null?void 0:Y.chart)==null?void 0:Z.title)||E.title}return`${L.length} selected`},q=U(x);return E.metricType==="toolRuns"&&q.length===1?{...E.view.chart,data:N,title:W(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&q.length===1?{...E.view.chart,data:N,title:W(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:N,title:W()}},R=(E,N)=>{if(!$(x))return E;const W=U(x);if(W.length===1){const q=W[0];if(i==="runs"&&N==="agentRuns")return E.map(J=>({...J,agentRuns:J[q]||0}));if(i==="runs"&&N==="toolRuns")return E.map(J=>({...J,toolRuns:J[q.replace(/[-]/g,"")]||0}));if(i==="runs"&&N==="modelRuns")return E.map(J=>({...J,modelRuns:J[q.replace(/[-\.]/g,"")]||0}))}return E},F=E=>{var J;const N=((J=c.chart)==null?void 0:J.data)||[],W=R(N,E),q=L=>{var Q,I;if(!$(x))return L;const G=U(x);if(G.length===1){const B=(I=(Q=u==null?void 0:u.dropdown)==null?void 0:Q.options)==null?void 0:I.find(Y=>Y.value===G[0]);return B?`${B.label}`:L}return`${G.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:N,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:N,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:N,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:N,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:q("Agent Runs"),data:W,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 U(x).length===1?{type:"line",title:q("Tool Runs"),data:R(N,"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:W,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 U(x).length===1?{type:"line",title:q("Model Runs"),data:R(N,"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:q("Model Runs"),data:W,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}},z=(()=>{const E=j();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:A}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:v==="chart",tableView:v==="table",onToggle:y}:void 0}:u?{...u,dropdown:u.dropdown?{...u.dropdown,onChange:A}:void 0,toggle:u.toggle?{...u.toggle,chartView:d==="chart",tableView:d==="table",onToggle:y}:void 0}:void 0})(),D=(()=>{var W,q,J,L,G,Q,I,B,Y,Z;const E=j();if(E!=null&&E.view){if((W=E.controls)!=null&&W.toggle){if(v==="table"&&E.view.table){let ee=E.view.table.data;if(E.metricType==="agentRuns"&&$(x)){const K=U(x);if(K.length>0){const oe=((L=(J=(q=E.controls)==null?void 0:q.dropdown)==null?void 0:J.options)==null?void 0:L.filter(ne=>K.includes(ne.value)))||[];oe.length>0&&(ee=ee.filter(ne=>oe.some(fe=>ne.name===fe.label||ne.name&&ne.name.toLowerCase().includes(fe.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&$(x)){const K=U(x);if(K.length>0){const oe=((I=(Q=(G=E.controls)==null?void 0:G.dropdown)==null?void 0:Q.options)==null?void 0:I.filter(ne=>K.includes(ne.value)))||[];oe.length>0&&(ee=ee.filter(ne=>oe.some(fe=>ne.name===fe.label||ne.name&&ne.name.toLowerCase().includes(fe.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&$(x)){const K=U(x);if(K.length>0){const oe=((Z=(Y=(B=E.controls)==null?void 0:B.dropdown)==null?void 0:Y.options)==null?void 0:Z.filter(ne=>K.includes(ne.value)))||[];oe.length>0&&(ee=ee.filter(ne=>oe.some(fe=>ne.name===fe.label||ne.name&&ne.name.toLowerCase().includes(fe.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:ee}}}else if(v==="chart"&&E.view.chart)return{type:"chart",chart:_(E)||E.view.chart}}const M=_(E);return M?{...E.view,chart:M}:E.view}const N=F(b);return N?{type:"chart",chart:N}:{...c,type:d}})(),H=()=>l.map(E=>{const N=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||N===b}});return p.jsxs("div",{className:le("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((E,N)=>p.jsx("div",{className:"flex-1",children:p.jsx(zf,{data:E,onClick:w,isFirst:N===0})},`${i}-metric-${N}`))}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:j()&&p.jsx("h3",{className:"text-md font-medium text-gray-700",children:(V=j())==null?void 0:V.title})}),z&&p.jsx(U0,{config:z})]}),p.jsx(B0,{config:D,isLoading:r||n,context:{sectionId:i,metricType:b}})]})},pf=O.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:le(o,s[t],l[r],e),ref:i,...a,children:n})});pf.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 Re(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function He(e){Re(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 JB(e,t){Re(2,arguments);var r=He(e),n=Et(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function hf(e,t){Re(2,arguments);var r=He(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){Re(2,arguments);var r=He(e).getTime(),n=Et(t);return new Date(r+n)}var eF={};function wi(){return eF}function tF(e,t){var r,n,a,i,o,s;Re(1,arguments);var l=wi(),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=He(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 rF(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 ia(e){Re(1,arguments);var t=He(e);return t.setHours(0,0,0,0),t}function Oi(e,t){Re(2,arguments);var r=ia(e),n=ia(t);return r.getTime()===n.getTime()}function nF(e){return Re(1,arguments),e instanceof Date||Ns(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function aF(e){if(Re(1,arguments),!nF(e)&&typeof e!="number")return!1;var t=He(e);return!isNaN(Number(t))}function iF(e){Re(1,arguments);var t=He(e);return t.setHours(23,59,59,999),t}function oF(e){Re(1,arguments);var t=He(e);return t.setDate(1),t.setHours(0,0,0,0),t}function sF(e,t){Re(2,arguments);var r=Et(t);return QB(e,-r)}var lF=864e5;function cF(e){Re(1,arguments);var t=He(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/lF)+1}function Is(e){Re(1,arguments);var t=1,r=He(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 z0(e){Re(1,arguments);var t=He(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Is(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Is(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function uF(e){Re(1,arguments);var t=z0(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Is(r);return n}var fF=6048e5;function dF(e){Re(1,arguments);var t=He(e),r=Is(t).getTime()-uF(t).getTime();return Math.round(r/fF)+1}function Ds(e,t){var r,n,a,i,o,s,l,c;Re(1,arguments);var u=wi(),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=He(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 V0(e,t){var r,n,a,i,o,s,l,c;Re(1,arguments);var u=He(e),f=u.getUTCFullYear(),d=wi(),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=Ds(v,t),m=new Date(0);m.setUTCFullYear(f,0,h),m.setUTCHours(0,0,0,0);var b=Ds(m,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=b.getTime()?f:f-1}function pF(e,t){var r,n,a,i,o,s,l,c;Re(1,arguments);var u=wi(),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=V0(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var v=Ds(h,t);return v}var hF=6048e5;function mF(e,t){Re(1,arguments);var r=He(e),n=Ds(r,t).getTime()-pF(r,t).getTime();return Math.round(n/hF)+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)}},oa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gF={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=V0(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=z0(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=mF(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):$e(i,r.length)},I:function(t,r,n){var a=dF(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=cF(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=oa.noon:a===0?i=oa.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=oa.evening:a>=12?i=oa.afternoon:a>=4?i=oa.morning:i=oa.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 G0(o);case"XXXX":case"XX":return Jr(o);case"XXXXX":case"XXX":default:return Jr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return G0(o);case"xxxx":case"xx":return Jr(o);case"xxxxx":case"xxx":default:return Jr(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"+H0(o,":");case"OOOO":default:return"GMT"+Jr(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"+H0(o,":");case"zzzz":default:return"GMT"+Jr(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 H0(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 G0(e,t){if(e%60===0){var r=e>0?"-":"+";return r+$e(Math.abs(e)/60,2)}return Jr(e,t)}function Jr(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 q0=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"})}},K0=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"})}},vF=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return q0(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}}",q0(a,r)).replace("{{time}}",K0(i,r))},yF={p:K0,P:vF},bF=["D","DD"],xF=["YY","YYYY"];function wF(e){return bF.indexOf(e)!==-1}function OF(e){return xF.indexOf(e)!==-1}function Y0(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 SF={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"}},AF=function(t,r,n){var a,i=SF[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 mf(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 TF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},PF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_F={date:mf({formats:TF,defaultWidth:"full"}),time:mf({formats:jF,defaultWidth:"full"}),dateTime:mf({formats:PF,defaultWidth:"full"})},CF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EF=function(t,r,n,a){return CF[t]};function Si(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 $F={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kF={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"]},NF={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"]},IF={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"}},DF={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"}},LF=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"},RF={ordinalNumber:LF,era:Si({values:$F,defaultWidth:"wide"}),quarter:Si({values:MF,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Si({values:kF,defaultWidth:"wide"}),day:Si({values:NF,defaultWidth:"wide"}),dayPeriod:Si({values:IF,defaultWidth:"wide",formattingValues:DF,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)?FF(s,function(f){return f.test(o)}):BF(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 BF(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function FF(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function UF(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 WF=/^(\d+)(th|st|nd|rd)?/i,zF=/\d+/i,VF={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},HF={any:[/^b/i,/^(a|c)/i]},GF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qF={any:[/1/i,/2/i,/3/i,/4/i]},KF={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},YF={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]},XF={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},ZF={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]},JF={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}},eU={ordinalNumber:UF({matchPattern:WF,parsePattern:zF,valueCallback:function(t){return parseInt(t,10)}}),era:Ai({matchPatterns:VF,defaultMatchWidth:"wide",parsePatterns:HF,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:GF,defaultMatchWidth:"wide",parsePatterns:qF,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ai({matchPatterns:KF,defaultMatchWidth:"wide",parsePatterns:YF,defaultParseWidth:"any"}),day:Ai({matchPatterns:XF,defaultMatchWidth:"wide",parsePatterns:ZF,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:JF,defaultMatchWidth:"any",parsePatterns:QF,defaultParseWidth:"any"})},tU={code:"en-US",formatDistance:AF,formatLong:_F,formatRelative:EF,localize:RF,match:eU,options:{weekStartsOn:0,firstWeekContainsDate:1}},rU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aU=/^'([^]*?)'?$/,iU=/''/g,oU=/[a-zA-Z]/;function Ls(e,t,r){var n,a,i,o,s,l,c,u,f,d,h,v,g,m;Re(2,arguments);var b=String(t),S=wi(),x=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:tU,T=Et((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(c=S.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(T>=1&&T<=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:S.weekStartsOn)!==null&&d!==void 0?d:(g=S.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=He(e);if(!aF(w))throw new RangeError("Invalid time value");var A=rF(w),j=sF(w,A),$={firstWeekContainsDate:T,weekStartsOn:y,locale:x,_originalDate:w},U=b.match(nU).map(function(P){var _=P[0];if(_==="p"||_==="P"){var R=yF[_];return R(P,x.formatLong)}return P}).join("").match(rU).map(function(P){if(P==="''")return"'";var _=P[0];if(_==="'")return sU(P);var R=gF[_];if(R)return OF(P)&&Y0(P,t,String(e)),wF(P)&&Y0(P,t,String(e)),R(j,P,x.localize,$);if(_.match(oU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return P}).join("");return U}function sU(e){var t=e.match(aU);return t?t[1].replace(iU,"'"):e}function X0(e,t){Re(2,arguments);var r=He(e),n=He(t);return r.getTime()<n.getTime()}function lU(e,t){Re(2,arguments);var r=He(e).getTime(),n=He(t.start).getTime(),a=He(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Rs(e,t){Re(2,arguments);var r=Et(t);return JB(e,-r)}function cU(e,t){Re(2,arguments);var r=Et(t);return hf(e,-r)}const gf=({children:e})=>{const[t,r]=O.useState(!1);return O.useEffect(()=>(r(!0),()=>r(!1)),[]),t?tn.createPortal(e,document.body):null};function Z0({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:ia(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:ia(Rs(new Date,1)),to:iF(Rs(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:tF(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:ia(Rs(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:oF(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:ia(Rs(new Date,29)),to:new Date}}],a=t?n.find(C=>C.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(C=>C.value),foundPreset:!!a});const[i,o]=O.useState(a==null?void 0:a.dateRange),[s,l]=O.useState(a==null?void 0:a.dateRange),[c,u]=O.useState(!1),[f,d]=O.useState((a==null?void 0:a.label)||null),[h,v]=O.useState((a==null?void 0:a.label)||null),[g,m]=O.useState(new Date),[b,S]=O.useState(null),[x,T]=O.useState({top:0,left:0}),y=O.useRef(null),w=O.useRef(null);O.useEffect(()=>{var C,D;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:(C=a.dateRange.from)==null?void 0:C.toLocaleDateString(),to:(D=a.dateRange.to)==null?void 0:D.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}`)})},[]),O.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 A=()=>{if(!w.current)return;const C=w.current.getBoundingClientRect(),D=window.scrollY,H=window.scrollX,V=window.innerWidth,E=window.innerHeight,N=720,W=450;let q=C.bottom+D+8,J=C.left+H;J+N>V&&(J=C.right+H-N),J+N>V&&(J=V-N-20),q+W>E&&(q=C.top+D-W-8),J<20&&(J=20),q<20&&(q=20),T({top:q,left:J})};O.useEffect(()=>{const C=()=>{c&&A()};return c&&(window.addEventListener("resize",C),window.addEventListener("scroll",C)),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C)}},[c]);const j=(C,D)=>{if(l(C),v(D),S(null),C.from){const H=new Date(C.from.getFullYear(),C.from.getMonth(),1);m(H)}},$=C=>{if(!b)S(C),l({from:C,to:C}),v(null);else{const D=X0(C,b)?C:b,H=X0(C,b)?b:C;l({from:D,to:H}),S(null),v(null)}},U=()=>{o(s),d(h),r==null||r(s),u(!1),S(null)},P=()=>{l(void 0),v(null),o(void 0),d(null),r==null||r(void 0),u(!1),S(null)},_=C=>{C?(l(i),v(f),S(null),setTimeout(A,0)):(l(i),v(f),S(null)),u(C)},R=(C,D)=>(console.log("📅 formatDateRange called with:",{presetLabel:D,hasDateRange:!!(C!=null&&C.from)}),D||(C!=null&&C.from?!C.to||Oi(C.from,C.to)?Ls(C.from,"MMM dd, yyyy"):`${Ls(C.from,"MMM dd, yyyy")} - ${Ls(C.to,"MMM dd, yyyy")}`:"Pick a date range")),F=(C=0)=>{const D=hf(g,C),H=D.getFullYear(),V=D.getMonth(),E=new Date(H,V,1),W=new Date(H,V+1,0).getDate(),q=E.getDay(),J=["January","February","March","April","May","June","July","August","September","October","November","December"],L=["Su","Mo","Tu","We","Th","Fr","Sa"],G=[],I=new Date(H,V-1,0).getDate();for(let Z=q-1;Z>=0;Z--){const M=I-Z,ee=new Date(H,V-1,M);G.push(p.jsx("button",{onClick:()=>$(ee),className:"h-[32px] w-[32px] text-xs text-gray-400 hover:bg-gray-100 rounded-full flex items-center justify-center",children:M},`prev-${M}`))}for(let Z=1;Z<=W;Z++){const M=new Date(H,V,Z),ee=Oi(M,new Date),K=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&lU(M,{start:s.from,end:s.to}),oe=(s==null?void 0:s.from)&&Oi(M,s.from),ne=(s==null?void 0:s.to)&&Oi(M,s.to),fe=b&&Oi(M,b);let Se="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 ";ee&&(Se+="font-semibold "),fe||oe||ne?Se+="!bg-blue-500 !text-white !hover:bg-blue-500 !hover:text-white font-semibold":K&&(Se+="bg-blue-100 text-blue-900 hover:bg-blue-100 hover:text-blue-900 font-semibold"),G.push(p.jsx("button",{onClick:()=>$(M),className:Se,children:Z},`current-${Z}`))}const Y=Math.ceil((q+W)/7)*7-q-W;for(let Z=1;Z<=Y;Z++){const M=new Date(H,V+1,Z);G.push(p.jsx("button",{onClick:()=>$(M),className:"h-[32px] w-[32px] text-sm text-gray-500 hover:bg-gray-100 rounded-full flex items-center justify-center",children:Z},`next-${Z}`))}return p.jsxs("div",{className:"p-[12px]",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[C===0&&p.jsx("button",{onClick:()=>m(cU(g,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(jb,{className:"h-[16px] w-[16px]"})}),p.jsxs("div",{className:"font-semibold text-sm text-gray-700",children:[J[V]," ",H]}),C===1&&p.jsx("button",{onClick:()=>m(hf(g,1)),className:"p-[4px] hover:bg-gray-100 rounded",children:p.jsx(Mi,{className:"h-[16px] w-[16px]"})})]}),p.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:L.map(Z=>p.jsx("div",{className:"h-[32px] flex items-center justify-center text-xs font-medium text-gray-700 w-full text-center",children:Z},Z))}),p.jsx("div",{className:"grid grid-cols-7 gap-1",children:G})]})},z=()=>"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:()=>_(!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(Tf,{className:"mr-2 h-[16px] w-[16px]"}),(()=>{const C=R(i,f);return console.log("📅 Button display text:",{displayText:C,date:i,selectedPresetLabel:f}),C})()]}),c&&p.jsxs(gf,{children:[p.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>_(!1)}),p.jsxs("div",{ref:y,className:z(),style:{top:x.top,left:x.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:C=>C.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(C=>p.jsx("button",{onClick:()=>j(C.dateRange,C.label),className:`text-left px-[12px] py-[8px] text-sm text-gray-900 rounded hover:bg-gray-100 transition-colors ${h===C.label?"bg-gray-100 medium":""}`,children:C.label},C.label))]}),p.jsxs("div",{className:"flex flex-1",children:[F(0),F(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:U,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 uU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var z;const{title:o,subtitle:s,sections:l,globalControls:c,layout:u={columns:12,gap:24,responsive:!0}}=e,[f,d]=O.useState(!1),[h,v]=O.useState({}),[g,m]=O.useState(l),[b,S]=O.useState([]),[x,T]=O.useState(!1),[y,w]=O.useState("draft"),A=O.useRef(null);O.useEffect(()=>{if(t)try{A.current=new Yt(t),j(),$()}catch(C){console.error("Failed to initialize API service:",C)}},[t]);const j=async()=>{if(!(!A.current||!t)){T(!0);try{const C=await A.current.fetchEnvironments();S(C),console.log("🌍 Environments loaded:",C.map(V=>({_id:V._id,envName:V.envName})));let D="draft";if(t.environment){const V=C.find(E=>E._id===t.environment);if(V)D=V.envName==="draft"?"draft":V._id,console.log("✅ Found environment by _id:",V.envName,"(_id:",V._id,")");else{const E=C.find(N=>N.envName===t.environment);E?(D=E.envName==="draft"?"draft":E._id,console.log("✅ Found environment by envName:",E.envName,"(_id:",E._id,")")):C.find(W=>W.envName==="draft")?(D="draft",console.log("✅ Using draft environment as fallback")):console.log('⚠️ No matching environment found, using default "draft"')}}else C.find(E=>E.envName==="draft")&&(D="draft",console.log("✅ Using draft environment as default"));w(D);const H={...t,environment:D};A.current.updateConfig(H),console.log("🔄 Updated API config with environment:",D)}catch(C){console.error("Error loading environments:",C)}finally{T(!1)}}},$=async()=>{if(!(!A.current||!t)){d(!0);try{const C=A.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:C.fromTimestamp,toTimestamp:C.toTimestamp,fromDate:new Date(C.fromTimestamp).toLocaleDateString(),toDate:new Date(C.toTimestamp).toLocaleDateString()});const D=await A.current.fetchAllCardsDataWithEnhancedViews(C.fromTimestamp,C.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date(C.fromTimestamp).toLocaleDateString(),to:new Date(C.toTimestamp).toLocaleDateString()});const H=l.map(V=>V.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...V,metrics:D.usageAnalytics}):V.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...V,metrics:D.runs}):V);m(H)}catch(C){console.error("Error loading initial data:",C),m(l)}finally{d(!1)}}},U=async(C,D)=>{if(!(!A.current||!t||!D.metricType)){m(H=>H.map(V=>V.id===C?{...V,metrics:V.metrics.map(E=>({...E,highlighted:E.metricType===D.metricType}))}:V)),v(H=>({...H,[C]:!0}));try{const H=t.defaultTimeRange||Yt.getDateRange(7);let V,E;if(["users","sessions","messages","tokens"].includes(D.metricType))V="usage-analytics",E=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))V="runs",E=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const N=await A.current.fetchTimeSeriesData(E,V,H.fromTimestamp,H.toTimestamp),W=A.current.transformTimeSeriesDataForMetric(N,D.metricType);console.log("Time series response for",D.title,":",N),console.log("Transformed data for",D.title,":",W),console.log("Metric type used for transformation:",D.metricType);const J=(L=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[L]||"count")(D.metricType||"count");console.log("Using dataKey for metric",D.metricType,":",J),m(L=>L.map(G=>{if(G.id===C){const Q={...G,view:{...G.view,chart:G.view.chart?{...G.view.chart,data:W,dataKey:J,lines:[{dataKey:J,color:G.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:W,dataKey:J,lines:[{dataKey:J,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",C,":",Q),console.log("Chart config set:",Q.view.chart),Q}return G}))}catch(H){console.error("Error loading metric data:",H)}finally{v(H=>({...H,[C]:!1}))}}},P=C=>{var D,H;if(console.log("🔄 Environment change requested:",C),w(C),(H=(D=c==null?void 0:c.draft)==null?void 0:D.onChange)==null||H.call(D,C),a==null||a(C),t&&A.current){const V={...t,environment:C};A.current.updateConfig(V),console.log("🔄 Updated API config with environment:",C),$()}},_=C=>{var D,H;if(console.log("🗓️ Time range change requested:",C),typeof C=="string"&&((H=(D=c==null?void 0:c.timeRange)==null?void 0:D.onChange)==null||H.call(D,C)),i==null||i(C),t&&A.current){let V=null;if(typeof C=="object"&&C.from&&C.to){const E=C.from,N=C.to,W=new Date(Date.UTC(E.getFullYear(),E.getMonth(),E.getDate(),0,0,0,0)),q=new Date(Date.UTC(N.getFullYear(),N.getMonth(),N.getDate(),23,59,59,999));V={fromTimestamp:W.toISOString(),toTimestamp:q.toISOString()},console.log("📅 Converting DateRange to API format:",{selectedDates:{from:E.toLocaleDateString(),to:N.toLocaleDateString()},utcTimestamps:V})}else if(typeof C=="string"){const N={"24h":1,"7d":7,"30d":30,"90d":90}[C];N&&(V=Yt.getDateRange(N),console.log(`📅 Converting preset "${C}" (${N} days) to API format:`,V))}if(V){const E={...t,defaultTimeRange:V,environment:y};console.log("🔄 Updating API configuration with new date range:",E.defaultTimeRange),console.log("🔄 Preserving selected environment:",y),A.current.updateConfig(E),console.log("🚀 Reloading dashboard data with new date range..."),$()}else console.warn("⚠️ Unable to convert time range value to API format:",C)}},R=(C="csv")=>{var D,H;(H=(D=c==null?void 0:c.export)==null?void 0:D.onExport)==null||H.call(D,C),n==null||n()},F=Object.values(h).some(C=>C);return p.jsxs("div",{className:le("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||F)&&p.jsxs("div",{className:"flex items-center gap-2 text-sm medium text-gray-500",children:[p.jsx(Nb,{className:"h-[16px] w-[16px] animate-spin"}),"Loading..."]}),c&&p.jsxs(p.Fragment,{children:[c.draft&&p.jsx(ks,{options:b.length>0?b.map(C=>({label:C.envName.charAt(0).toUpperCase()+C.envName.slice(1),value:C.envName==="draft"?"draft":C._id})):c.draft.options,value:y,placeholder:x?"Loading environments...":"Draft",onChange:P,className:"min-w-[200px]",disabled:f||F||x}),c.timeRange&&(c.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",c.timeRange.defaultValue),p.jsx(Z0,{defaultValue:c.timeRange.defaultValue,onDateRangeChange:C=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",C),C&&_(C)}})):p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Tf,{className:"h-4 w-4 text-gray-500"}),p.jsx(ks,{options:c.timeRange.options||[],value:c.timeRange.defaultValue,placeholder:c.timeRange.label,onChange:_,className:"min-w-[200px]",disabled:f||F})]})),((z=c.export)==null?void 0:z.enabled)&&p.jsxs(pf,{variant:"outline",onClick:()=>R(),className:"gap-2",disabled:f||F,children:[p.jsx(Pb,{className:"h-4 w-4"}),"Export"]})]})]})]})]}),p.jsx("div",{className:le("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(C=>{var D,H,V,E;return p.jsx(W0,{section:C,isLoading:f,isChartLoading:h[C.id]||!1,onMetricClick:N=>U(C.id,N),className:le(u.responsive&&((D=C.layout)==null?void 0:D.span)===12&&"lg:col-span-12",u.responsive&&((H=C.layout)==null?void 0:H.span)===6&&"lg:col-span-6",u.responsive&&((V=C.layout)==null?void 0:V.span)===4&&"lg:col-span-4",u.responsive&&((E=C.layout)==null?void 0:E.span)===3&&"lg:col-span-3")},C.id)})})]})};class J0{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 S=n.get(b);m.type==="node_started"?S.started=m:m.type==="node_completed"&&(S.completed=m)});const a=[];for(const[,m]of n.entries()){const b=m.started,S=m.completed;if(!b)continue;const x=this.createTreeNodeFromEvents(b,S,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"||s.data.type==="Agent"||s.data.type==="External Orchestrator"||s.data.type==="ProxyWorker"||s.data.type==="event",c=l?t.data.input:void 0;let u,f;r&&(l&&(u=r.data.output),f=r.data.error);const d=this.extractLLMUsage(u,r==null?void 0:r.data.metadata),{toolInvocations:h,isResponse:v}=this.extractToolInvocations(u);console.log("toolInvocations",h),console.log("isResponse",v);const 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,error:f,children:[],level:0,isExpanded:!1,llmUsage:d,toolInvocations:h,isResponse:v,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,v,g;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,S)=>new Date(S.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 S=b.find(x=>x&&typeof x=="object"&&(x.name==="route_to_user"||x.toolName==="route_to_user"));if(S){if((o=S.args)!=null&&o.message)return console.log("Found message in array format: routeToUserTool.args.message"),S.args.message;if(S.message)return console.log("Found message in array format: routeToUserTool.message"),S.message;if((s=S.output)!=null&&s.message)return console.log("Found message in array format: routeToUserTool.output.message"),S.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((v=b.result)!=null&&v.message)return console.log("Found message at: output.result.message"),b.result.message;if(typeof b=="string")try{const S=JSON.parse(b);if((g=S.args)!=null&&g.message)return console.log("Found message in parsed string: parsed.args.message"),S.args.message;if(S.message)return console.log("Found message in parsed string: parsed.message"),S.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 Q0=({value:e,onChange:t,language:r="text",readOnly:n=!1,placeholder:a="",className:i,autoFocus:o=!1})=>{const[s,l]=O.useState(e),[c,u]=O.useState(!1),[f,d]=O.useState(!1),h=O.useRef(null);O.useEffect(()=>{l(e)},[e]);function v(){navigator.clipboard.writeText(s).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})}function g(x){const T=x.target.value;l(T),t==null||t(T)}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(_f,{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(Mf,{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}),S=p.jsxs("div",{className:le("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(gf,{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:S})})}):S};Q0.displayName="CodeEditor";const eb=O.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));eb.displayName="Avatar";const tb=O.forwardRef(({className:e,...t},r)=>p.jsx("img",{ref:r,className:le("aspect-square h-full w-full",e),...t}));tb.displayName="AvatarImage";const rb=O.forwardRef(({className:e,...t},r)=>p.jsx("span",{ref:r,className:le("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));rb.displayName="AvatarFallback";const nb=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r,children:t}));nb.displayName="Card";const fU=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:le("flex flex-col space-y-1.5 p-6",e),...r,children:t}));fU.displayName="CardHeader";const dU=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("h3",{ref:n,className:le("text-2xl font-semibold leading-none tracking-tight",e),...r,children:t}));dU.displayName="CardTitle";const pU=O.forwardRef(({className:e,children:t,...r},n)=>p.jsx("div",{ref:n,className:le("p-6 pt-0",e),...r,children:t}));pU.displayName="CardContent";const Ti=({text:e,className:t="",iconClassName:r="",title:n="Copy to clipboard",onCopySuccess:a,onCopyError:i,tooltipText:o="Copied!",tooltipPosition:s="bottom",size:l="md"})=>{const[c,u]=O.useState(!1),f=()=>{switch(l){case"sm":return{button:"p-1",icon:"w-3 h-3",tooltip:"text-xs py-1 px-2"};case"lg":return{button:"p-2",icon:"w-5 h-5",tooltip:"text-sm py-2 px-3"};default:return{button:"p-1.5",icon:"w-4 h-4",tooltip:"text-xs py-1 px-2"}}},d=()=>{const m="absolute bg-gray-800 text-white rounded whitespace-nowrap z-50";switch(s){case"bottom":return`${m} top-full mt-1 left-1/2 -translate-x-1/2`;case"left":return`${m} right-full mr-1 top-1/2 -translate-y-1/2`;case"right":return`${m} left-full ml-1 top-1/2 -translate-y-1/2`;default:return`${m} bottom-full mb-1 left-1/2 -translate-x-1/2`}},h=f(),v=O.useCallback(()=>{u(!0),setTimeout(()=>u(!1),1e3)},[]),g=O.useCallback(async()=>{try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(e),v(),a==null||a();return}const m=document.createElement("textarea");m.value=e,m.style.position="fixed",m.style.left="-999999px",m.style.top="-999999px",document.body.appendChild(m),m.focus(),m.select();try{document.execCommand("copy"),v(),a==null||a()}catch(b){const S=b instanceof Error?b:new Error("Copy failed");console.warn("Copy to clipboard failed:",S),i==null||i(S)}finally{document.body.removeChild(m)}}catch(m){const b=m instanceof Error?m:new Error("Copy failed");console.warn("Copy to clipboard failed:",b),i==null||i(b)}},[e,v,a,i]);return p.jsxs("div",{className:"relative inline-flex",children:[p.jsx("button",{onClick:g,className:`${h.button} hover:bg-gray-100 rounded transition-colors ${t}`,title:n,children:p.jsx(_f,{className:`${h.icon} text-gray-400 ${r}`})}),p.jsx("div",{className:`${d()} ${h.tooltip} transition-opacity duration-150 ${c?"opacity-100 animate-fade-in":"opacity-0 pointer-events-none"}`,style:{visibility:c?"visible":"hidden"},children:o})]})},hU=({isOpen:e,onClose:t,title:r,data:n,initialViewMode:a="plain"})=>{const[i,o]=O.useState(a),s=O.useMemo(()=>{if(n==null)return!1;if(typeof n=="string")try{return JSON.parse(n),!0}catch{return!1}return typeof n=="object"},[n]);O.useEffect(()=>{const c=u=>{u.key==="Escape"&&e&&t()};return e&&document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[e,t]);const l=c=>{c.target===c.currentTarget&&t()};return e?p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-90 z-50 flex",onClick:l,children:p.jsxs("div",{className:"bg-gray-900 w-full h-full flex flex-col",children:[p.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-700",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-100",children:r})]}),s&&p.jsxs("div",{className:"flex items-center gap-1 ml-4 pl-4 border-l border-gray-700",children:[p.jsx("button",{onClick:()=>o("plain"),className:`p-1.5 hover:bg-gray-700 rounded transition-colors ${i==="plain"?"bg-gray-700":""}`,title:"Plain JSON view",children:p.jsx(Sf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>o("interactive"),className:`p-1.5 hover:bg-gray-700 rounded transition-colors ${i==="interactive"?"bg-gray-700":""}`,title:"Interactive JSON view (fold/unfold)",children:p.jsx(Ef,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ti,{text:typeof n=="string"?n:JSON.stringify(n,null,2),title:"Copy content",className:"p-2 rounded-lg hover:bg-gray-700",iconClassName:"w-4 h-4 text-gray-400"}),p.jsx("button",{onClick:t,className:"p-2 hover:bg-gray-700 rounded-lg transition-colors",title:"Close",children:p.jsx(Nf,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsx("div",{className:"flex-1 overflow-hidden bg-gray-800",children:p.jsx(xt,{data:n,showHeader:!1,className:"h-full border-0 !bg-gray-800",defaultExpanded:!0,viewMode:i,onViewModeChange:o,padding:"p-4",darkMode:!0})})]})}):null},mU=({data:e,level:t=0,expandedKeys:r=new Set,onToggleKey:n,keyPath:a="",darkMode:i=!1})=>{const o=t*16,s=(l,c,u)=>{const f=u?`${u}.${c}`:c||"";if(l===null)return p.jsx("span",{className:`${i?"text-gray-500":"text-gray-400"} italic`,children:"null"});if(l===void 0)return p.jsx("span",{className:`${i?"text-gray-500":"text-gray-400"} italic`,children:"undefined"});if(typeof l=="boolean")return p.jsx("span",{className:`${i?"text-purple-400":"text-purple-600"} font-medium`,children:String(l)});if(typeof l=="number")return p.jsx("span",{className:`${i?"text-blue-400":"text-blue-600"} font-medium`,children:l});if(typeof l=="string"){const d=l.length>100,h=d&&!r.has(`${f}._string`)?`${l.substring(0,100)}...`:l;return p.jsxs("div",{className:"inline",children:[p.jsxs("span",{className:i?"text-green-400":"text-green-600",children:['"',h,'"']}),d&&p.jsx("button",{onClick:()=>n==null?void 0:n(`${f}._string`),className:`ml-2 text-xs underline ${i?"text-blue-400 hover:text-blue-300":"text-blue-500 hover:text-blue-700"}`,children:r.has(`${f}._string`)?"Show less":"Show more"})]})}if(Array.isArray(l)){const d=r.has(f);return l.length===0?p.jsx("span",{className:i?"text-gray-400":"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(f),className:`flex items-center gap-1 p-1 rounded transition-colors ${i?"hover:bg-gray-700":"hover:bg-gray-100"}`,children:[d?p.jsx(fr,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}):p.jsx(Mi,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}),p.jsxs("span",{className:`text-xs ${i?"text-gray-300":"text-gray-600"}`,children:["Array[",l.length,"]"]})]}),!d&&p.jsx("span",{className:`ml-2 ${i?"text-gray-500":"text-gray-400"}`,children:"[...]"})]}),d&&p.jsx("div",{className:"ml-4 mt-1",children:l.map((v,g)=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${o}px`},children:[p.jsxs("span",{className:`text-xs mt-0.5 min-w-[20px] ${i?"text-gray-500":"text-gray-400"}`,children:[g,":"]}),p.jsx("div",{className:"flex-1",children:s(v,String(g),`${f}[${g}]`)})]},g))})]})}if(typeof l=="object"){const d=Object.keys(l),h=r.has(f);return d.length===0?p.jsx("span",{className:i?"text-gray-400":"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(f),className:`flex items-center gap-1 p-1 rounded transition-colors ${i?"hover:bg-gray-700":"hover:bg-gray-100"}`,children:[h?p.jsx(fr,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}):p.jsx(Mi,{className:`w-3 h-3 ${i?"text-gray-500":"text-gray-400"}`}),p.jsxs("span",{className:`text-xs ${i?"text-gray-300":"text-gray-600"}`,children:["Object ","{",d.length," ",d.length===1?"key":"keys","}"]})]}),!h&&p.jsx("span",{className:`ml-2 ${i?"text-gray-500":"text-gray-400"}`,children:"{ ... }"})]}),h&&p.jsx("div",{className:"ml-4 mt-1",children:d.map(g=>p.jsxs("div",{className:"flex items-start gap-2 py-1",style:{marginLeft:`${o}px`},children:[p.jsxs("span",{className:`text-xs mt-0.5 font-medium min-w-fit ${i?"text-blue-400":"text-blue-700"}`,children:['"',g,'":']}),p.jsx("div",{className:"flex-1",children:s(l[g],g,f)})]},g))})]})}return p.jsx("span",{className:i?"text-gray-300":"text-gray-600",children:String(l)})};return p.jsx("div",{className:"text-xs",children:s(e,"",a)})},ab=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},xt=({data:e,padding:t="p-3",title:r="Data",className:n="",maxHeight:a="300px",showHeader:i=!0,defaultExpanded:o=!1,defaultViewMode:s="plain",viewMode:l,onViewModeChange:c,darkMode:u=!1})=>{const[f,d]=O.useState(!1),[h,v]=O.useState(s),g=O.useMemo(()=>o?new Set([""]):new Set(ab(e)),[e,o]),[m,b]=O.useState(g);O.useEffect(()=>{o||b(new Set(ab(e)))},[e,o]);const S=l!==void 0,x=S?l:h,T=U=>{S?c==null||c(U):v(U)},{isValidJson:y,displayContent:w}=O.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]),A=O.useCallback(U=>{b(P=>{const _=new Set(P);return _.has(U)?_.delete(U):_.add(U),_})},[]),j=O.useCallback(()=>{d(!0)},[]),$=O.useCallback(()=>{d(!1)},[]);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`${u?"bg-gray-800 border-gray-700":"bg-white border-gray-200"} border 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:()=>T("plain"),className:`p-1 hover:bg-gray-200 rounded transition-colors ${x==="plain"?"bg-gray-200":""}`,title:"Plain JSON view",children:p.jsx(Sf,{className:"w-4 h-4 text-gray-400"})}),p.jsx("button",{onClick:()=>T("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(Ef,{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:j,className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Expand to full screen",children:p.jsx(Mf,{className:"w-4 h-4 text-gray-400"})}),p.jsx(Ti,{text:y?JSON.stringify(w,null,2):w,title:"Copy content",className:"p-1",iconClassName:"w-4 h-4 text-gray-400"})]})]}),p.jsxs("div",{className:`${t||"p-3"} overflow-auto ${u?"bg-gray-800":"bg-white"}`,style:{maxHeight:a},children:[y?x==="interactive"?p.jsx(mU,{data:w,expandedKeys:m,onToggleKey:A,keyPath:"",darkMode:u}):p.jsx("div",{className:`text-xs whitespace-pre ${u?"text-gray-300":"text-gray-700"}`,children:JSON.stringify(w,null,2)}):p.jsx("div",{className:`text-xs whitespace-pre-wrap ${u?"text-gray-300":"text-gray-700"}`,children:w}),!w&&w!==0&&w!==!1&&p.jsx("div",{className:`text-center text-sm py-8 ${u?"text-gray-500":"text-gray-400"}`,children:"No data available"})]})]}),p.jsx(hU,{isOpen:f,onClose:$,title:r,data:w,initialViewMode:x})]})};class ib{constructor(t){Mt(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}}matchNodeToObservationById(t,r){console.log("🔍 Matching node to observation by ID:",{nodeId:t,totalObservations:r.length});const n=r.find(a=>{let i=a.metadata;if(typeof i=="string")try{i=JSON.parse(i)}catch(s){return console.warn("Failed to parse metadata string:",s),!1}if(!(i!=null&&i.pipeTraceId)||(i==null?void 0:i._pipeSeq)===void 0)return!1;const o=`${i.pipeTraceId}.${i._pipeSeq}`;return console.log("Comparing:",{nodeId:t,observationNodeId:o,match:t===o}),t===o});if(!n){const a=t.split("_");if(a.length===2){const[,i]=a,o=parseInt(i,10);if(!isNaN(o)){const s=r.find(l=>{let c=l.metadata;if(typeof c=="string")try{c=JSON.parse(c)}catch(u){return console.warn("Failed to parse metadata string in fallback:",u),!1}return(c==null?void 0:c._pipeSeq)===o});if(s){let l=s.metadata;if(typeof l=="string")try{l=JSON.parse(l)}catch{}return console.log("✅ Matched observation by sequence:",{id:s.id,name:s.name,type:s.type,_pipeSeq:l==null?void 0:l._pipeSeq}),s}}}}if(n){let a=n.metadata;if(typeof a=="string")try{a=JSON.parse(a)}catch{}console.log("✅ Matched observation:",{id:n.id,name:n.name,type:n.type,pipeTraceId:a==null?void 0:a.pipeTraceId,_pipeSeq:a==null?void 0:a._pipeSeq})}else console.log("✅ Matched observation: No match found");return n||null}sleep(t){return new Promise(r=>setTimeout(r,t))}async getObservationForNode(t,r,n,a=5,i=2e3){console.log("🔄 Getting observation for node by ID with retry logic:",{nodeId:t,traceId:r,projectId:n,maxRetries:a,retryDelay:i});let o=null;for(let s=1;s<=a;s++)try{console.log(`📊 Attempt ${s}/${a} for node ${t}`);const l=await this.getTraceById({traceId:r,projectId:n});if(!l||l.length===0){if(console.log(`❌ Attempt ${s}: No observations found for trace`),o=new Error("No observations found for trace"),s<a){console.log(`⏳ Waiting ${i}ms before retry...`),await this.sleep(i);continue}return null}const c=this.matchNodeToObservationById(t,l);if(!c){if(console.log(`❌ Attempt ${s}: No matching observation found for node ID: ${t}`),o=new Error(`No matching observation found for node ID: ${t}`),s<a){console.log(`⏳ Waiting ${i}ms before retry...`),await this.sleep(i);continue}return null}const u=await this.getObservationById({observationId:c.id,traceId:r,projectId:n});if(u)return console.log(`✅ Success on attempt ${s}: Found observation data for node ${t}`),u;if(o=new Error("No detailed data returned"),s<a){console.log(`⏳ No data returned, waiting ${i}ms before retry...`),await this.sleep(i);continue}}catch(l){if(o=l,console.error(`❌ Attempt ${s} failed:`,l),s<a){console.log(`⏳ Waiting ${i}ms before retry...`),await this.sleep(i);continue}}return console.error("❌ All retries exhausted. Last error:",o),null}updateConfig(t){this.config=t}getConfig(){return this.config}}function ob({node:e,onToggle:t,isExpanded:r=!1,onNodeClick:n,selectedNodeIds:a,showDetailView:i=!0,apiConfig:o,projectId:s,nodeIndex:l=0}){const c=O.useMemo(()=>{var I;return e.type==="GuardrailsInputScan"||e.type==="GuardrailsOutputScan"||((I=e.name)==null?void 0:I.toLowerCase().includes("guardrail"))},[e.type,e.name]),u=O.useMemo(()=>{switch(e.type){case"event":return["summary"];case"ProxyWorker":return["request","response"];case"llm":return["summary","request","response"];case"tool":return["request","response","logs"];default:if(c)return["summary","response"];break}return[]},[e.type,c]),[f,d]=O.useState(u[0]),h=a?a.has(e.id):!1,v=e.children&&e.children.length>0,[g,m]=O.useState(null),[b,S]=O.useState(!1),[x,T]=O.useState(null),[y,w]=O.useState(!1),[A,j]=O.useState(!1),$=["llm"],U=5,P=2e3;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 _=O.useMemo(()=>(console.log("🔧 DebugCard - Creating ApiService:",{hasApiConfig:!!o,willCreateService:!!o}),o?new ib(o):null),[o]),R=O.useMemo(()=>$.includes(e.type),[e.type]),F=O.useCallback(async()=>{if(!R){console.log("🔍 DebugCard - Node type not API-enabled:",e.type);return}if(!_||!s||y){console.log("🔍 DebugCard - API call skipped:",{hasApiService:!!_,hasProjectId:!!s,hasLoadedApi:y,isApiEnabledNode:R,nodeType:e.type,reason:_?s?"Already loaded":"No project ID":"No API service"});return}S(!0),T(null),j(!1);try{const I=await _.getObservationForNode(e.id,e.runId,s,U,P);if(I){const B={...I};try{typeof I.input=="string"?B.input=JSON.parse(I.input):I.input&&typeof I.input=="object"&&(B.input=JSON.parse(JSON.stringify(I.input,null,2)))}catch{B.input=I.input||{}}try{typeof I.output=="string"?B.output=JSON.parse(I.output):I.output&&typeof I.output=="object"&&(B.output=JSON.parse(JSON.stringify(I.output,null,2)))}catch{B.output=I.output||{}}m(B),w(!0),j(!1)}else console.log("📊 All API retries exhausted, using fallback node data"),T("API data unavailable after retries, showing local data"),j(!0),w(!0)}catch(I){console.error("Error fetching observation data:",I),T("API data unavailable, showing local data"),j(!0),w(!0)}finally{S(!1)}},[_,s,e.id,e.runId,R]);O.useEffect(()=>{u.includes(f)||d(u[0])},[u,f]),O.useEffect(()=>{m(null),S(!1),T(null),w(!1),j(!1)},[e.id]);const z=O.useCallback(I=>{d(I),console.log("🔍 DebugCard - Tab clicked:",{nodeId:e.id,nodeName:e.name,nodeType:e.type,clickedTab:I,isApiEnabledNode:R,hasApiService:!!_,hasProjectId:!!s,hasLoadedApi:y,isLoadingApi:b}),(I==="request"||I==="response")&&R&&_&&s&&!y&&!b&&(console.log("🚀 DebugCard - Triggering API call for API-enabled node:",e.id),F())},[_,s,y,b,F,e.id,R]),C=I=>{I.stopPropagation(),t&&t(e.id)},D=()=>{u.length===0&&v&&t?t(e.id):n&&i&&n(e)},H=()=>{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"})}},V=()=>{var B,Y;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 I="agent";switch(e.type){case"Agent":I="agent";break;case"llm":I="model";break;case"tool":I="tool";break;case"ProxyWorker":I="app";break;default:I=e.type}return p.jsx(Zr,{icon:e.icon,iconSource:I,size:"small",name:e.name,className:"w-[24px] h-[24px]",toolType:e.type==="tool"?(B=e.metadata)==null?void 0:B.type:void 0,provider:e.type==="llm"?(Y=e.metadata)==null?void 0:Y.provider:void 0,modelName:e.type==="llm"?e.name:void 0})},E=I=>I?I<1e3?`${I}ms`:`${(I/1e3).toFixed(2)}s`:"",N=I=>{if(!I)return"Tool";switch(I){case"route_to_user":return"Response to User";default:return I.split("_").map(B=>B.charAt(0).toUpperCase()+B.slice(1)).join(" ")}},W=()=>u,q=()=>{var Z,M;let I=e.toolInvocations||[];e.type==="llm"&&Array.isArray(e.output)&&(I=e.output.filter(ee=>ee&&typeof ee=="object"&&ee.name&&ee.tool_call_id));const B=I.length>0||e.children&&e.children.length>0,Y=e.isResponse||I.length>0&&I[0].name==="route_to_user";return B?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:Y?"Responded":"Invoked"}),I.length>0&&I.map((ee,K)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[ee.isAgentHandoff?p.jsx(Af,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}):p.jsx(Vs,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:N(ee.name||ee.toolName)})]},ee.tool_call_id||K)),I.length===0&&e.children&&e.children.length>0&&e.children.map((ee,K)=>p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[2px] border border-gray-300 rounded-[4px] text-xs",children:[ee.type==="tool"?p.jsx(Vs,{className:"w-[12px] h-[12px] text-green-500 flex-shrink-0"}):p.jsx(Af,{className:"w-[12px] h-[12px] text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"text-gray-600 truncate",children:ee.name||"Unknown"})]},ee.id||K))]}),I.length>0&&((M=(Z=I[0])==null?void 0:Z.args)==null?void 0:M.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:I[0].args.reason})]})]}):e.type==="event"?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:"Custom Message"}),p.jsxs("div",{className:"flex items-center gap-[4px] px-[8px] py-[4px] border border-gray-200 rounded text-xs",children:[p.jsx(Eb,{className:"w-[12px] h-[12px] text-purple-500"}),p.jsx("span",{className:"text-gray-600",children:"Triggered"})]})]})}):e.output&&!B?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(Ib,{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=I=>{var B,Y,Z,M;if(!(!I||typeof I!="object")){if(Array.isArray(I)){const ee=I.find(K=>K&&typeof K=="object"&&(K.name==="route_to_user"||K.toolName==="route_to_user"));if(ee)return((B=ee.args)==null?void 0:B.message)||ee.message||((Y=ee.output)==null?void 0:Y.message)}else if(I.name==="route_to_user"||I.toolName==="route_to_user")return((Z=I.args)==null?void 0:Z.message)||I.message||((M=I.output)==null?void 0:M.message);if(I.message&&typeof I.message=="string")return I.message;if(I.content&&typeof I.content=="string")return I.content;if(I.text&&typeof I.text=="string")return I.text}},L=()=>{if(!e.output)return null;const I=J(e.output);return p.jsx(xt,{padding:"py-1",data:I||e.output,title:"",showHeader:!1,maxHeight:"120px",defaultExpanded:!0,className:"border-0"})},G=()=>{if(!c||!e.output)return null;const I=e.error?e.error:e.output,B=I.scannersData,Y=I.endFlow,Z=I.endFlowMsg;return B?p.jsxs("div",{className:"space-y-3",children:[Y&&Z&&p.jsxs("div",{className:"flex items-start gap-2 p-3 bg-red-50 border border-red-200 rounded-md",children:[p.jsx(Hs,{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:Z})]})]}),p.jsx("div",{className:"space-y-1",children:Object.entries(B).map(([M,ee])=>{if(M==="error"&&ee.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(Hs,{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:ee.scannerOutput.Duration})})]},M);if(ee.scannerOutput){const K=ee.scannerOutput.Validity,oe=ee.scannerOutput.RiskScore,ne=ee.scannerOutput.Duration;let fe="text-gray-500",Se="bg-gray-100";return oe!==void 0&&(oe===0?(fe="text-green-600",Se="bg-green-50"):oe<=3?(fe="text-yellow-600",Se="bg-yellow-50"):oe<=6?(fe="text-orange-600",Se="bg-orange-50"):(fe="text-red-600",Se="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(Tb,{className:"w-4 h-4 text-green-500 flex-shrink-0"}):p.jsx(Hs,{className:"w-4 h-4 text-red-500 flex-shrink-0"}),p.jsx("span",{className:"text-xs text-gray-700",children:M.replace(/([A-Z])/g," $1").trim()})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[oe!==void 0&&p.jsxs("div",{className:`px-2 py-0.5 rounded text-xs font-medium ${Se} ${fe}`,children:["Risk: ",oe]}),p.jsx("span",{className:"text-xs text-gray-500",children:ne})]})]},M)}return null})})]}):null},Q=()=>{var I;switch(f){case"summary":if(c)return 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(xt,{padding:"py-1",data:e.input,title:"",showHeader:!1,maxHeight:"150px",defaultExpanded:!0,className:"border-0"})]}),(e.output||e.error)&&p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-gray-400 mb-[8px]",children:"Result"}),e.error&&!c?typeof e.error=="string"?p.jsx("div",{className:"text-xs text-gray-600",children:e.error}):p.jsx(xt,{padding:"py-1",data:e.error,title:"",showHeader:!1,maxHeight:"120px",defaultExpanded:!0,className:"border-0"}):G()]})]});let B=!1;return e.type==="llm"&&Array.isArray(e.output)&&(B=e.output.some(Y=>Y&&typeof Y=="object"&&Y.name&&Y.tool_call_id)),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(xt,{padding:"py-1",data:e.input,title:"",showHeader:!1,maxHeight:"120px",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"}),q()]}),e.output&&!B&&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"}),L()]}),e.error&&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:"Error"}),typeof e.error=="string"?p.jsx("div",{className:"text-xs text-red-600",children:e.error}):p.jsx(xt,{padding:"py-1",data:e.error,title:"",showHeader:!1,maxHeight:"120px",defaultExpanded:!0,className:"border-0"})]})]});case"request":if(R&&_){if(b)return p.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[p.jsx($f,{className:"w-5 h-5 animate-spin text-blue-500 mb-2 mx-auto"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Loading request data from API..."}),p.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Trace data may take a few seconds to be available"})]});if(x&&!A)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:F,className:"mt-2 px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})});if(!A&&(g!=null&&g.input))return p.jsx(xt,{data:g.input,title:"Request Data (API)",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"})}return p.jsx(xt,{data:e.input,title:A?"Request Data (Fallback)":"Request Data",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"});case"response":if(R&&_){if(b)return p.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[p.jsx($f,{className:"w-5 h-5 animate-spin text-blue-500 mb-2 mx-auto"}),p.jsx("div",{className:"text-sm text-gray-600",children:"Loading response data from API..."}),p.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Trace data may take a few seconds to be available"})]});if(x&&!A)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:F,className:"mt-2 px-3 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})});if(!A&&(g!=null&&g.output))return p.jsx(xt,{data:g.output,title:"Response Data (API)",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"})}return c&&(e.output||e.error)?p.jsx(xt,{data:e.error||e.output,title:e.error?"Error Output":"Full Scanner Output",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"}):p.jsx(xt,{data:e.output,title:A?"Response Data (Fallback)":"Response Data",maxHeight:"250px",defaultExpanded:!1,defaultViewMode:"plain"});case"logs":return p.jsx(xt,{data:((I=e.metadata)==null?void 0:I.logs)||{},title:"Execution Logs",maxHeight:"250px",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
304
+ `,onClick:D,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:I=>{I.stopPropagation(),v?C(I):n&&n(e)},title:v?r?"Collapse":"Expand":"Show details",children:p.jsx(Mi,{className:`w-[12px] h-[12px] text-gray-600 transition-transform ${v&&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:V()}),p.jsx("span",{className:"font-semibold text-gray-900 text-xs truncate w-full",title:e.type==="llm"?e.name:void 0,children:c?e.type==="GuardrailsInputScan"?"Input Guardrails Scanner":"Output Guardrails Scanner":e.type==="llm"?"AI Model Call":e.type==="tool"?N(e.name):e.name}),p.jsxs("div",{className:"flex items-center gap-[12px] text-[10px] text-gray-500",children:[e.type==="Agent"&&(()=>{var B;const I=(B=e.children)==null?void 0:B.find(Y=>Y.type==="llm");return I!=null&&I.name?p.jsx("span",{className:"text-[10px] text-gray-500 truncate max-w-[100px]",title:I.name,children:I.name}):null})(),(e.type==="Agent"||e.type==="llm"||c)&&(()=>{var B,Y,Z;let I=e.llmUsage;if(e.type==="Agent"&&e.children){const M=e.children.filter(ee=>ee.type==="llm");M.length>0&&(I=M.reduce((ee,K)=>K.llmUsage?{input_tokens:((ee==null?void 0:ee.input_tokens)||0)+(K.llmUsage.input_tokens||0),output_tokens:((ee==null?void 0:ee.output_tokens)||0)+(K.llmUsage.output_tokens||0),total_tokens:((ee==null?void 0:ee.total_tokens)||0)+(K.llmUsage.total_tokens||0)}:ee,null))}return I!=null&&I.total_tokens?p.jsxs("span",{className:"text-[10px] text-gray-500 whitespace-nowrap cursor-help",title:`Input: ${((B=I.input_tokens)==null?void 0:B.toLocaleString())||0} tokens
305
+ Output: ${((Y=I.output_tokens)==null?void 0:Y.toLocaleString())||0} tokens
306
+ Total: ${((Z=I.total_tokens)==null?void 0:Z.toLocaleString())||0} tokens`,children:[I.total_tokens.toLocaleString()," Tokens"]}):null})(),e.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Pf,{className:"w-[12px] h-[12px]"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:E(e.duration)})]})]}),p.jsx("div",{className:"flex-shrink-0",children:H()})]})]})}),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:W().map(I=>p.jsx("button",{onClick:()=>z(I),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===I?"bg-white text-gray-900 shadow-tab":"text-gray-500 hover:text-gray-700 hover:bg-white"}`,children:I.charAt(0).toUpperCase()+I.slice(1)},I))}),p.jsx("div",{className:"px-[4px]",children:Q()})]})]}),r&&v&&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((I,B)=>p.jsx(ob,{node:I,onToggle:t,isExpanded:I.isExpanded,onNodeClick:n,selectedNodeIds:a,showDetailView:i,apiConfig:o,projectId:s,nodeIndex:B},I.id))]})]})}const sb=O.forwardRef(({executionEvents:e,sessionId:t,config:r={},onNodeExpand:n,onNodeCollapse:a,onOpenUrl:i,className:o=""},s)=>{const[l,c]=O.useState(new Set),[u,f]=O.useState(new Set),[d,h]=O.useState(new Set),{expansionMode:v="none",showExpansionControls:g=!1,defaultDetailView:m=!0,apiConfig:b}=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 S=O.useCallback(L=>!(b!=null&&b.tracingUrl)||!(b!=null&&b.projectId)?null:`${b.tracingUrl.replace(/\/(api|trace-api).*$/,"")}/project/${b.projectId}/sessions/${L}`,[b]),x=O.useCallback(L=>!(b!=null&&b.tracingUrl)||!(b!=null&&b.projectId)?null:`${b.tracingUrl.replace(/\/(api|trace-api).*$/,"")}/project/${b.projectId}/traces/${L}`,[b]),[T,y]=O.useState(v),[w,A]=O.useState(e),j=O.useRef(e.length);O.useEffect(()=>{A(e),e.length===0?(c(new Set),f(new Set),h(new Set),P.current=!1,j.current=0):(e.length>j.current&&(P.current=!0),j.current=e.length)},[e,m]);const $=O.useRef(0),U=O.useRef(null),P=O.useRef(!1);O.useImperativeHandle(s,()=>({addEvent:L=>{A(G=>[...G,L]),P.current=!0},addEvents:L=>{A(G=>[...G,...L]),P.current=!0},clearEvents:()=>{A([]),c(new Set),f(new Set),h(new Set),P.current=!1}}),[]);const _=O.useMemo(()=>{const L=J0.buildSessionTree(w,t);return U.current=L,L},[w,t]),R=L=>{const G=[],Q=I=>{G.push(I.id),I.children.forEach(B=>Q(B))};return L.runs.forEach(I=>{I.rootNodes.forEach(B=>Q(B))}),G},F=O.useCallback(()=>{const L=R(_);c(new Set(L));const G=_.runs.map(Q=>Q.runId);h(new Set(G))},[_]),z=O.useCallback(()=>{if(T==="none"){const L=new Set;_.runs.forEach(G=>{G.rootNodes.forEach(Q=>{L.add(Q.id)})}),c(L)}else c(new Set)},[T,_]),C=O.useCallback(()=>{if(_.runs.length>0){const L=_.runs[_.runs.length-1];if(L.rootNodes.length>0){const G=L.rootNodes[L.rootNodes.length-1],Q=[],I=B=>{if(Q.push(B.id),B.children.length>0){const Y=B.children[B.children.length-1];I(Y)}};I(G),c(new Set(Q)),h(B=>{const Y=new Set(B);return Y.add(L.runId),Y})}}},[_]),D=O.useCallback(L=>{const G=_.runs.find(Z=>Z.runId===L);if(!G)return;const Q=new Set,I=Z=>{Q.add(Z.id),Z.children.forEach(M=>I(M))};G.rootNodes.forEach(Z=>I(Z));const B=Array.from(Q).filter(Z=>{const M=ee=>{if(ee.id===Z)return ee;for(const K of ee.children){const oe=M(K);if(oe)return oe}return null};for(const ee of G.rootNodes){const K=M(ee);if(K&&(K.type==="llm"||K.type==="tool"||K.type==="GuardrailsInputScan"||K.type==="GuardrailsOutputScan"||K.type==="ProxyWorker"))return!0}return!1});B.some(Z=>u.has(Z))?f(Z=>{const M=new Set(Z);return Q.forEach(ee=>M.delete(ee)),M}):(c(Z=>{const M=new Set(Z);return Q.forEach(ee=>M.add(ee)),M}),f(Z=>{const M=new Set(Z);return B.forEach(ee=>M.add(ee)),M}))},[_,l,u]);O.useEffect(()=>{if(T==="none"&&_.runs.length>0){const L=R(_);c(new Set(L))}},[T,_]);const H=O.useRef(null);O.useEffect(()=>{w.length>$.current&&H.current&&setTimeout(()=>{H.current&&H.current.scrollTo({top:H.current.scrollHeight,behavior:"smooth"})},100),$.current=w.length},[w.length]),O.useEffect(()=>{if(w.length>0&&_.runs.length>0){if(P.current){switch(T){case"all":const L=R(_);c(new Set(L));break;case"last":C();break;case"none":if(l.size===0){const G=R(_);c(new Set(G))}break}P.current=!1}h(L=>{const G=new Set(L);return _.runs.forEach(Q=>{G.has(Q.runId)||G.add(Q.runId)}),G})}},[_,T,C,l.size]);const V=O.useCallback(L=>{c(G=>{const Q=new Set(G);return Q.has(L)?(Q.delete(L),a==null||a(L)):(Q.add(L),n==null||n(L)),Q})},[n,a]),E=O.useCallback(L=>{f(G=>{const Q=new Set(G);return Q.has(L.id)?Q.delete(L.id):Q.add(L.id),Q})},[]),N=O.useCallback(L=>{h(G=>{const Q=new Set(G);return Q.has(L)?Q.delete(L):Q.add(L),Q})},[]),W=O.useCallback(L=>({...L,isExpanded:l.has(L.id),children:L.children.map(Q=>W(Q))}),[l]),q=L=>L?L<1e3?`${L}ms`:`${(L/1e3).toFixed(2)}s`:"",J=L=>L?L>=1e6?`${(L/1e6).toFixed(1)}M tokens`:L>=1e3?`${(L/1e3).toFixed(1)}K tokens`:`${L} tokens`:"";return _.runs.length?p.jsx("div",{className:`flex flex-col h-full bg-white ${o}`,children:p.jsxs("div",{className:"flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden",ref:H,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:_.sessionId}),p.jsx(Ti,{text:_.sessionId,title:"Copy session ID",size:"sm",className:"p-[4px]",iconClassName:"w-[12px] h-[12px]"}),S(_.sessionId)&&p.jsx("button",{className:"p-[4px] hover:bg-gray-100 rounded transition-colors",title:"Open session in external viewer",onClick:()=>{const L=S(_.sessionId);L&&(i?i(L,"session",_.sessionId):window.open(L,"_blank"))},children:p.jsx(Cf,{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: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:"Expand all nodes",children:[p.jsx(kb,{className:"w-3 h-3"}),"Expand All"]}),p.jsxs("button",{onClick:C,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(_b,{className:"w-3 h-3"}),"Expand Last"]}),p.jsxs("button",{onClick:z,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(Mb,{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:T,onChange:L=>y(L.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"})]})]})]}),_.runs.map(L=>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 truncate",onClick:()=>N(L.runId),title:L.userInput,children:p.jsx("span",{className:"text-xs text-gray-900 truncate",children:L.userInput||`Run ${L.runId}`})}),p.jsx("button",{onClick:G=>{G.stopPropagation(),D(L.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:(()=>{const G=new Set,Q=B=>{G.add(B.id),B.children.forEach(Y=>Q(Y))};return L.rootNodes.forEach(B=>Q(B)),Array.from(G).some(B=>u.has(B))?"Hide all node details in this run":"Show all node details in this run"})(),children:(()=>{const G=new Set,Q=B=>{G.add(B.id),B.children.forEach(Y=>Q(Y))};return L.rootNodes.forEach(B=>Q(B)),Array.from(G).some(B=>u.has(B))?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("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("button",{onClick:G=>{G.stopPropagation(),N(L.runId)},className:"p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",title:d.has(L.runId)?"Collapse run":"Expand run",children:p.jsx(fr,{className:`w-[16px] h-[16px] text-gray-400 transition-transform ${d.has(L.runId)?"rotate-180":""}`})})]})}),d.has(L.runId)&&p.jsx("div",{className:"bg-white w-full flex flex-col",children:L.rootNodes&&L.rootNodes.map((G,Q)=>{var I;return p.jsx("div",{className:"w-full",children:p.jsx(ob,{node:W(G),onToggle:V,isExpanded:l.has(G.id),onNodeClick:E,selectedNodeIds:u,showDetailView:!0,apiConfig:r.apiConfig,projectId:(I=r.apiConfig)==null?void 0:I.projectId,nodeIndex:Q})},G.id)})}),(()=>{const G=B=>{let Y,Z;const M=ee=>{var K,oe,ne,fe,Se;for(const ce of ee){if(ce.type==="tool"&&(ce.name==="route_to_user"||ce.name==="route_to_user")&&ce.output&&(typeof ce.output=="string"?Z=ce.output:(K=ce.output)!=null&&K.message?Z=ce.output.message:(oe=ce.output)!=null&&oe.result&&(Z=ce.output.result)),ce.type==="llm"&&Array.isArray(ce.output)){const Ce=ce.output.find(ke=>(ke==null?void 0:ke.name)==="route_to_user"||(ke==null?void 0:ke.toolName)==="route_to_user");Ce&&((ne=Ce.args)!=null&&ne.message?Z=Ce.args.message:Ce.message&&(Z=Ce.message))}ce.output&&!Z&&(typeof ce.output=="string"?Y=ce.output:Array.isArray(ce.output)||((fe=ce.output)!=null&&fe.message?Y=ce.output.message:(Se=ce.output)!=null&&Se.result?Y=ce.output.result:typeof ce.output=="object"&&!ce.output.name&&!ce.output.toolName&&(Y=JSON.stringify(ce.output)))),ce.children&&ce.children.length>0&&M(ce.children)}};return M(B),Z||Y},I=(L.rootNodes?G(L.rootNodes):void 0)||L.finalOutput;return I?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,children:I}),p.jsxs("div",{className:"flex items-center gap-[8px] flex-shrink-0",children:[L.duration&&p.jsxs("div",{className:"flex items-center gap-[4px]",children:[p.jsx(Pf,{className:"w-[12px] h-[12px] text-gray-400"}),p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:q(L.duration)})]}),L.totalTokens&&p.jsx("span",{className:"text-[10px] text-gray-500 whitespace-nowrap",children:J(L.totalTokens)})]})]}):null})()]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 py-1",children:[p.jsx("span",{className:"text-xs text-gray-400",children:L.runId}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ti,{text:L.runId,title:"Copy run ID",size:"sm",className:"p-1",iconClassName:"w-3 h-3"}),x(L.runId)&&p.jsx("button",{className:"p-1 hover:bg-gray-100 rounded transition-colors",title:"Open trace in external viewer",onClick:()=>{const G=x(L.runId);G&&(i?i(G,"trace",L.runId):window.open(G,"_blank"))},children:p.jsx(Cf,{className:"w-3 h-3 text-gray-400"})})]})]})]},L.runId))]})}):p.jsx("div",{className:`flex flex-col h-full ${o}`,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"})})})});sb.displayName="DebugPanel";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"],gU=(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),S=Math.floor(h*.15+Math.random()*50),x={};Bs.forEach(w=>{const A=w.replace(/\s+/g,"").toLowerCase(),j=Math.floor(d/Bs.length);x[A]=Math.floor(j+Math.random()*(j*.5))});const T={};Fs.forEach(w=>{const A=w.replace(/[-]/g,""),j=Math.floor(h/Fs.length);T[A]=Math.floor(j+Math.random()*(j*.8))});const y={};Us.forEach(w=>{const A=w.replace(/[-\.]/g,""),j=Math.floor(v/Us.length);y[A]=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:v,codeTools:g,workflowTools:m,knowledgeTools:b,mcpTools:S,...x,...T,...y,value:o})}return t},vU=()=>{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},yU=()=>{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]}))},bU=()=>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()})),Qr=gU(),xU=vU(),wU=yU(),OU=bU(),SU={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review key metrics to track your agentic app’s usage and performance.",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:Qr,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:Qr,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:Qr,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:Qr,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:Qr,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:xU,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:Qr,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:wU,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:Qr,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:OU,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}}]},Xt={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"]}},AU={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"}},TU={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"}},jU={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"}},lb=(e,t)=>e.primary[t%e.primary.length],ji=(e,t)=>e.semantic[t],PU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},cb=(e,t=Xt)=>e.map((r,n)=>({...r,color:lb(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})(),_U={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:cb([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Xt),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(Xt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:ji(Xt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:ji(Xt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:ji(Xt,"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}}]},CU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Xt.primary,semanticColors:Xt.semantic,gradientColors:Xt.gradients},EU={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},$U={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review key metrics to track your agentic app’s usage and performance.",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}},MU=`
298
307
  // In your Angular component (usage-analytics.component.ts)
299
308
  import { Dashboard, apiEnabledDashboardConfig, agenticAppConfig } from '@agentic/ui-libs';
300
309
 
@@ -353,4 +362,4 @@ export class AnalyticsDashboardComponent implements OnInit, AfterViewInit, OnDes
353
362
  }
354
363
  }
355
364
  }
356
- `;oe.AgentListView=N0,oe.AnalyticsChart=C0,oe.AnalyticsTable=$0,oe.ApiInvokerService=R0,oe.ApiService=ib,oe.Avatar=eb,oe.AvatarFallback=rb,oe.AvatarImage=tb,oe.Button=pf,oe.Card=nb,oe.ChartSkeleton=E0,oe.CodeEditor=Q0,oe.CopyButton=Ti,oe.Dashboard=sU,oe.DashboardApiService=Yt,oe.DashboardSection=W0,oe.DataViewer=xt,oe.DateRangePicker=Z0,oe.DebugPanel=sb,oe.EndpointsConfigService=L0,oe.IconPreview=Zr,oe.MetricCard=zf,oe.MetricCardSkeleton=xi,oe.ModelListView=D0,oe.MultiSelect=F0,oe.Portal=gf,oe.RunsSlider=I0,oe.SectionControls=U0,oe.Select=Ns,oe.Skeleton=aa,oe.ToolListView=M0,oe.TreeBuilder=J0,oe.ViewRenderer=B0,oe.agenticAppConfig=PU,oe.angularIntegrationExample=EU,oe.apiEnabledDashboardConfig=_U,oe.autoAssignColors=cb,oe.businessPalette=SU,oe.cn=le,oe.colorExamples=jU,oe.darkPalette=wU,oe.defaultPalette=Xt,oe.enhancedDashboardConfig=TU,oe.getColorFromPalette=lb,oe.getGradientColors=AU,oe.getSemanticColor=ji,oe.lightPalette=OU,oe.sampleDashboardConfig=xU,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
365
+ `;se.AgentListView=k0,se.AnalyticsChart=E0,se.AnalyticsTable=$0,se.ApiInvokerService=R0,se.ApiService=ib,se.Avatar=eb,se.AvatarFallback=rb,se.AvatarImage=tb,se.Button=pf,se.Card=nb,se.ChartSkeleton=C0,se.CodeEditor=Q0,se.CopyButton=Ti,se.Dashboard=uU,se.DashboardApiService=Yt,se.DashboardSection=W0,se.DataViewer=xt,se.DateRangePicker=Z0,se.DebugPanel=sb,se.EndpointsConfigService=L0,se.IconPreview=Zr,se.MetricCard=zf,se.MetricCardSkeleton=xi,se.ModelListView=I0,se.MultiSelect=F0,se.Portal=gf,se.RunsSlider=D0,se.SectionControls=U0,se.Select=ks,se.Skeleton=aa,se.ToolListView=N0,se.TreeBuilder=J0,se.ViewRenderer=B0,se.agenticAppConfig=EU,se.angularIntegrationExample=MU,se.apiEnabledDashboardConfig=$U,se.autoAssignColors=cb,se.businessPalette=jU,se.cn=le,se.colorExamples=CU,se.darkPalette=AU,se.defaultPalette=Xt,se.enhancedDashboardConfig=_U,se.getColorFromPalette=lb,se.getGradientColors=PU,se.getSemanticColor=ji,se.lightPalette=TU,se.sampleDashboardConfig=SU,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});