@kaitranntt/ccs 5.16.0-dev.6 → 5.16.0-dev.8
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.
- package/VERSION +1 -1
- package/dist/cliproxy/auth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth-handler.js +4 -2
- package/dist/cliproxy/auth-handler.js.map +1 -1
- package/dist/cliproxy/cliproxy-executor.d.ts.map +1 -1
- package/dist/cliproxy/cliproxy-executor.js +31 -4
- package/dist/cliproxy/cliproxy-executor.js.map +1 -1
- package/dist/cliproxy/config-generator.d.ts.map +1 -1
- package/dist/cliproxy/config-generator.js +3 -1
- package/dist/cliproxy/config-generator.js.map +1 -1
- package/dist/management/doctor.d.ts +6 -2
- package/dist/management/doctor.d.ts.map +1 -1
- package/dist/management/doctor.js +109 -21
- package/dist/management/doctor.js.map +1 -1
- package/dist/ui/assets/{accounts-Bl9qfu_d.js → accounts-BeL69fgi.js} +1 -1
- package/dist/ui/assets/analytics-CAiq9C19.js +64 -0
- package/dist/ui/assets/{api-DoPJHgqb.js → api-CvY-Z9t4.js} +1 -1
- package/dist/ui/assets/{cliproxy-DRxRpTJv.js → cliproxy-DbfUkLCy.js} +1 -1
- package/dist/ui/assets/cliproxy-control-panel-DTiBzA5u.js +1 -0
- package/dist/ui/assets/{code-editor-ek-uxeLN.js → code-editor-xnukAIwJ.js} +1 -1
- package/dist/ui/assets/{health-DBc3-gE9.js → health-D29me3pE.js} +1 -1
- package/dist/ui/assets/icons-Alnq4BWm.js +1 -0
- package/dist/ui/assets/{index-D-zCRwmw.js → index-CVMaabkX.js} +5 -5
- package/dist/ui/assets/{settings-Dh8DSszQ.js → settings-C-IIOnQo.js} +1 -1
- package/dist/ui/assets/{shared-n31ZWpeq.js → shared-DRWHGJPD.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/dist/utils/error-manager.d.ts.map +1 -1
- package/dist/utils/error-manager.js +11 -4
- package/dist/utils/error-manager.js.map +1 -1
- package/dist/utils/platform-commands.d.ts +53 -0
- package/dist/utils/platform-commands.d.ts.map +1 -0
- package/dist/utils/platform-commands.js +189 -0
- package/dist/utils/platform-commands.js.map +1 -0
- package/dist/web-server/data-aggregator.d.ts +11 -1
- package/dist/web-server/data-aggregator.d.ts.map +1 -1
- package/dist/web-server/data-aggregator.js +87 -1
- package/dist/web-server/data-aggregator.js.map +1 -1
- package/dist/web-server/usage-disk-cache.d.ts +3 -2
- package/dist/web-server/usage-disk-cache.d.ts.map +1 -1
- package/dist/web-server/usage-disk-cache.js +4 -3
- package/dist/web-server/usage-disk-cache.js.map +1 -1
- package/dist/web-server/usage-routes.d.ts.map +1 -1
- package/dist/web-server/usage-routes.js +104 -4
- package/dist/web-server/usage-routes.js.map +1 -1
- package/dist/web-server/usage-types.d.ts +13 -0
- package/dist/web-server/usage-types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/ui/assets/analytics-BHnr8pTE.js +0 -64
- package/dist/ui/assets/cliproxy-control-panel-CNpMpeWs.js +0 -1
- package/dist/ui/assets/icons-CqXn5eV0.js +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{j as S}from"./radix-ui-OFtPgiRV.js";import{i as Fi,j as se,r as D,c as P}from"./react-vendor-CjrBBxxX.js";import{c as De,B as Vl,I as Sh,C as Re,a as qe,S as xe,b as J,g as $0,d as Fn,e as Ze,f as At,h as dO,P as hO,i as pO,j as vO}from"./index-CVMaabkX.js";import{z as yO,D as mO,J as k0,N as Xl,O as N0,Q as I0,u as gO,G as bO,T as Ah,U as xO,Z as D0,x as wO,V as Wi,Y as OO,_ as _O,R as SO,$ as AO,a as PO,a0 as jO}from"./icons-Alnq4BWm.js";import{a as Vt,u as TO}from"./tanstack-DMWkeNzM.js";import"./form-utils-DKkU3nz7.js";const R0=6048e5,EO=864e5,Ui=43200,Ph=1440,jh=Symbol.for("constructDateFrom");function gt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&jh in e?e[jh](t):e instanceof Date?new e.constructor(t):new Date(t)}function Oe(e,t){return gt(t||e,e)}function MO(e,t,r){const n=Oe(e,r?.in);return isNaN(t)?gt(e,NaN):(t&&n.setDate(n.getDate()+t),n)}let CO={};function $i(){return CO}function Vn(e,t){const r=$i(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Oe(e,t?.in),a=i.getDay(),o=(a<n?7:0)+a-n;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function ua(e,t){return Vn(e,{...t,weekStartsOn:1})}function q0(e,t){const r=Oe(e,t?.in),n=r.getFullYear(),i=gt(r,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const a=ua(i),o=gt(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const u=ua(o);return r.getTime()>=a.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function sa(e){const t=Oe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function oo(e,...t){const r=gt.bind(null,e||t.find(n=>typeof n=="object"));return t.map(r)}function Th(e,t){const r=Oe(e,t?.in);return r.setHours(0,0,0,0),r}function $O(e,t,r){const[n,i]=oo(r?.in,e,t),a=Th(n),o=Th(i),u=+a-sa(a),s=+o-sa(o);return Math.round((u-s)/EO)}function kO(e,t){const r=q0(e,t),n=gt(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ua(n)}function aa(e,t){const r=+Oe(e)-+Oe(t);return r<0?-1:r>0?1:r}function NO(e){return gt(e,Date.now())}function IO(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function DO(e){return!(!IO(e)&&typeof e!="number"||isNaN(+Oe(e)))}function RO(e,t,r){const[n,i]=oo(r?.in,e,t),a=n.getFullYear()-i.getFullYear(),o=n.getMonth()-i.getMonth();return a*12+o}function qO(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function LO(e,t){return+Oe(e)-+Oe(t)}function BO(e,t){const r=Oe(e,t?.in);return r.setHours(23,59,59,999),r}function FO(e,t){const r=Oe(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function WO(e,t){const r=Oe(e,t?.in);return+BO(r,t)==+FO(r,t)}function UO(e,t,r){const[n,i,a]=oo(r?.in,e,e,t),o=aa(i,a),u=Math.abs(RO(i,a));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-o*u);let s=aa(i,a)===-o;WO(n)&&u===1&&aa(n,a)===1&&(s=!1);const c=o*(u-+s);return c===0?0:c}function zO(e,t,r){const n=LO(e,t)/1e3;return qO(r?.roundingMethod)(n)}function HO(e,t){const r=Oe(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function GO(e,t){const r=Oe(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const KO={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"}},YO=(e,t,r)=>{let n;const i=KO[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Ko(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const VO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},XO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ZO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},QO={date:Ko({formats:VO,defaultWidth:"full"}),time:Ko({formats:XO,defaultWidth:"full"}),dateTime:Ko({formats:ZO,defaultWidth:"full"})},JO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},e_=(e,t,r,n)=>JO[e];function jn(e){return(t,r)=>{const n=r?.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,u=r?.width?String(r.width):o;i=e.formattingValues[u]||e.formattingValues[o]}else{const o=e.defaultWidth,u=r?.width?String(r.width):e.defaultWidth;i=e.values[u]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const t_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},r_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},n_={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"]},i_={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"]},a_={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"}},o_={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"}},u_=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},s_={ordinalNumber:u_,era:jn({values:t_,defaultWidth:"wide"}),quarter:jn({values:r_,defaultWidth:"wide",argumentCallback:e=>e-1}),month:jn({values:n_,defaultWidth:"wide"}),day:jn({values:i_,defaultWidth:"wide"}),dayPeriod:jn({values:a_,defaultWidth:"wide",formattingValues:o_,defaultFormattingWidth:"wide"})};function Tn(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?l_(u,l=>l.test(o)):c_(u,l=>l.test(o));let c;c=e.valueCallback?e.valueCallback(s):s,c=r.valueCallback?r.valueCallback(c):c;const f=t.slice(o.length);return{value:c,rest:f}}}function c_(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function l_(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function f_(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;const u=t.slice(i.length);return{value:o,rest:u}}}const d_=/^(\d+)(th|st|nd|rd)?/i,h_=/\d+/i,p_={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},v_={any:[/^b/i,/^(a|c)/i]},y_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},m_={any:[/1/i,/2/i,/3/i,/4/i]},g_={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},b_={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]},x_={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},w_={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]},O_={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},__={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}},S_={ordinalNumber:f_({matchPattern:d_,parsePattern:h_,valueCallback:e=>parseInt(e,10)}),era:Tn({matchPatterns:p_,defaultMatchWidth:"wide",parsePatterns:v_,defaultParseWidth:"any"}),quarter:Tn({matchPatterns:y_,defaultMatchWidth:"wide",parsePatterns:m_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Tn({matchPatterns:g_,defaultMatchWidth:"wide",parsePatterns:b_,defaultParseWidth:"any"}),day:Tn({matchPatterns:x_,defaultMatchWidth:"wide",parsePatterns:w_,defaultParseWidth:"any"}),dayPeriod:Tn({matchPatterns:O_,defaultMatchWidth:"any",parsePatterns:__,defaultParseWidth:"any"})},L0={code:"en-US",formatDistance:YO,formatLong:QO,formatRelative:e_,localize:s_,match:S_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function A_(e,t){const r=Oe(e,t?.in);return $O(r,GO(r))+1}function P_(e,t){const r=Oe(e,t?.in),n=+ua(r)-+kO(r);return Math.round(n/R0)+1}function B0(e,t){const r=Oe(e,t?.in),n=r.getFullYear(),i=$i(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=gt(t?.in||e,0);o.setFullYear(n+1,0,a),o.setHours(0,0,0,0);const u=Vn(o,t),s=gt(t?.in||e,0);s.setFullYear(n,0,a),s.setHours(0,0,0,0);const c=Vn(s,t);return+r>=+u?n+1:+r>=+c?n:n-1}function j_(e,t){const r=$i(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=B0(e,t),a=gt(t?.in||e,0);return a.setFullYear(i,0,n),a.setHours(0,0,0,0),Vn(a,t)}function T_(e,t){const r=Oe(e,t?.in),n=+Vn(r,t)-+j_(r,t);return Math.round(n/R0)+1}function oe(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Ft={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return oe(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):oe(r+1,2)},d(e,t){return oe(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return oe(e.getHours()%12||12,t.length)},H(e,t){return oe(e.getHours(),t.length)},m(e,t){return oe(e.getMinutes(),t.length)},s(e,t){return oe(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),i=Math.trunc(n*Math.pow(10,r-3));return oe(i,t.length)}},Mr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Eh={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Ft.y(e,t)},Y:function(e,t,r,n){const i=B0(e,n),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return oe(o,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):oe(a,t.length)},R:function(e,t){const r=q0(e);return oe(r,t.length)},u:function(e,t){const r=e.getFullYear();return oe(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return oe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return oe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Ft.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return oe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const i=T_(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):oe(i,t.length)},I:function(e,t,r){const n=P_(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):oe(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ft.d(e,t)},D:function(e,t,r){const n=A_(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):oe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return oe(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const i=e.getDay(),a=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return oe(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return oe(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let i;switch(n===12?i=Mr.noon:n===0?i=Mr.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let i;switch(n>=17?i=Mr.evening:n>=12?i=Mr.afternoon:n>=4?i=Mr.morning:i=Mr.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Ft.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ft.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):oe(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):oe(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ft.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ft.s(e,t)},S:function(e,t){return Ft.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Ch(n);case"XXXX":case"XX":return or(n);case"XXXXX":case"XXX":default:return or(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Ch(n);case"xxxx":case"xx":return or(n);case"xxxxx":case"xxx":default:return or(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mh(n,":");case"OOOO":default:return"GMT"+or(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mh(n,":");case"zzzz":default:return"GMT"+or(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return oe(n,t.length)},T:function(e,t,r){return oe(+e,t.length)}};function Mh(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),a=n%60;return a===0?r+String(i):r+String(i)+t+oe(a,2)}function Ch(e,t){return e%60===0?(e>0?"-":"+")+oe(Math.abs(e)/60,2):or(e,t)}function or(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),i=oe(Math.trunc(n/60),2),a=oe(n%60,2);return r+i+t+a}const $h=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},F0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},E_=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return $h(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",$h(n,t)).replace("{{time}}",F0(i,t))},M_={p:F0,P:E_},C_=/^D+$/,$_=/^Y+$/,k_=["D","DD","YY","YYYY"];function N_(e){return C_.test(e)}function I_(e){return $_.test(e)}function D_(e,t,r){const n=R_(e,t,r);if(console.warn(n),k_.includes(e))throw new RangeError(n)}function R_(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const q_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,B_=/^'([^]*?)'?$/,F_=/''/g,W_=/[a-zA-Z]/;function Wn(e,t,r){const n=$i(),i=n.locale??L0,a=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,u=Oe(e,r?.in);if(!DO(u))throw new RangeError("Invalid time value");let s=t.match(L_).map(f=>{const l=f[0];if(l==="p"||l==="P"){const d=M_[l];return d(f,i.formatLong)}return f}).join("").match(q_).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const l=f[0];if(l==="'")return{isToken:!1,value:U_(f)};if(Eh[l])return{isToken:!0,value:f};if(l.match(W_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:f}});i.localize.preprocessor&&(s=i.localize.preprocessor(u,s));const c={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return s.map(f=>{if(!f.isToken)return f.value;const l=f.value;(I_(l)||N_(l))&&D_(l,t,String(e));const d=Eh[l[0]];return d(u,l,i.localize,c)}).join("")}function U_(e){const t=e.match(B_);return t?t[1].replace(F_,"'"):e}function z_(e,t,r){const n=$i(),i=r?.locale??n.locale??L0,a=2520,o=aa(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const u=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:o}),[s,c]=oo(r?.in,...o>0?[t,e]:[e,t]),f=zO(c,s),l=(sa(c)-sa(s))/1e3,d=Math.round((f-l)/60);let h;if(d<2)return r?.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,u):f<10?i.formatDistance("lessThanXSeconds",10,u):f<20?i.formatDistance("lessThanXSeconds",20,u):f<40?i.formatDistance("halfAMinute",0,u):f<60?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",1,u):d===0?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",d,u);if(d<45)return i.formatDistance("xMinutes",d,u);if(d<90)return i.formatDistance("aboutXHours",1,u);if(d<Ph){const y=Math.round(d/60);return i.formatDistance("aboutXHours",y,u)}else{if(d<a)return i.formatDistance("xDays",1,u);if(d<Ui){const y=Math.round(d/Ph);return i.formatDistance("xDays",y,u)}else if(d<Ui*2)return h=Math.round(d/Ui),i.formatDistance("aboutXMonths",h,u)}if(h=UO(c,s),h<12){const y=Math.round(d/Ui);return i.formatDistance("xMonths",y,u)}else{const y=h%12,v=Math.trunc(h/12);return y<3?i.formatDistance("aboutXYears",v,u):y<9?i.formatDistance("overXYears",v,u):i.formatDistance("almostXYears",v+1,u)}}function Zl(e,t){return z_(e,NO(e),t)}function zi(e,t,r){return MO(e,-t,r)}function H_({value:e,onChange:t,presets:r=[],className:n}){const i=u=>{t(u)},a=u=>{const s=u.target.value?new Date(u.target.value):void 0;t({from:s,to:e?.to})},o=u=>{const s=u.target.value?new Date(u.target.value):void 0;t({from:e?.from,to:s})};return S.jsxs("div",{className:De("flex flex-wrap items-center gap-2",n),children:[r.map((u,s)=>S.jsx(Vl,{variant:G_(e,u.range)?"default":"outline",size:"sm",onClick:()=>i(u.range),children:u.label},s)),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx(yO,{className:"h-4 w-4 text-muted-foreground"}),S.jsx(Sh,{type:"date",value:e?.from?Wn(e.from,"yyyy-MM-dd"):"",onChange:a,placeholder:"From",className:"w-40"})]}),S.jsx("span",{className:"text-muted-foreground",children:"to"}),S.jsx(Sh,{type:"date",value:e?.to?Wn(e.to,"yyyy-MM-dd"):"",onChange:o,placeholder:"To",className:"w-40"})]})]})}function G_(e,t){if(!e||!t)return e===t;const r=e.from?.getTime()??0,n=t.from?.getTime()??0,i=e.to?.getTime()??0,a=t.to?.getTime()??0;return r===n&&i===a}function K_({data:e,isLoading:t}){if(t)return S.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-5 gap-4",children:[1,2,3,4,5].map(a=>S.jsx(Re,{children:S.jsx(qe,{className:"p-6",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsx(xe,{className:"h-4 w-[100px]"}),S.jsx(xe,{className:"h-8 w-[80px]"})]}),S.jsx(xe,{className:"h-8 w-8 rounded-lg"})]})})},a))});const r=(e?.tokenBreakdown?.cacheCreation?.cost??0)+(e?.tokenBreakdown?.cacheRead?.cost??0),n=e?.totalCost?Math.round(r/e.totalCost*100):0,i=[{title:"Total Tokens",value:e?.totalTokens??0,icon:mO,format:a=>Cr(a),color:"text-blue-600",bgColor:"bg-blue-100 dark:bg-blue-900/20",subtitle:`${Cr(e?.totalInputTokens??0)} in / ${Cr(e?.totalOutputTokens??0)} out`},{title:"Total Cost",value:e?.totalCost??0,icon:k0,format:a=>`$${a.toFixed(2)}`,color:"text-green-600",bgColor:"bg-green-100 dark:bg-green-900/20",subtitle:`$${e?.averageCostPerDay?.toFixed(2)??"0.00"}/day avg`},{title:"Cache Tokens",value:e?.totalCacheTokens??0,icon:Xl,format:a=>Cr(a),color:"text-cyan-600",bgColor:"bg-cyan-100 dark:bg-cyan-900/20",subtitle:`$${r.toFixed(2)} (${n}% of cost)`},{title:"Input Cost",value:e?.tokenBreakdown?.input?.cost??0,icon:N0,format:a=>`$${a.toFixed(2)}`,color:"text-purple-600",bgColor:"bg-purple-100 dark:bg-purple-900/20",subtitle:`${Cr(e?.tokenBreakdown?.input?.tokens??0)} tokens`},{title:"Output Cost",value:e?.tokenBreakdown?.output?.cost??0,icon:I0,format:a=>`$${a.toFixed(2)}`,color:"text-orange-600",bgColor:"bg-orange-100 dark:bg-orange-900/20",subtitle:`${Cr(e?.tokenBreakdown?.output?.tokens??0)} tokens`}];return S.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-5 gap-4",children:i.map((a,o)=>{const u=a.icon;return S.jsx(Re,{className:"hover:shadow-md transition-shadow",children:S.jsx(qe,{className:"p-4",children:S.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[S.jsxs("div",{className:"space-y-1 min-w-0",children:[S.jsx("p",{className:"text-xs font-medium text-muted-foreground truncate",children:a.title}),S.jsx("p",{className:"text-xl font-bold truncate",children:a.format(a.value)}),a.subtitle&&S.jsx("p",{className:"text-[10px] text-muted-foreground truncate",children:a.subtitle})]}),S.jsx("div",{className:De("p-2 rounded-lg shrink-0",a.bgColor),children:S.jsx(u,{className:De("h-4 w-4",a.color)})})]})})},o)})})}function Cr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}var Yo,kh;function Ge(){if(kh)return Yo;kh=1;var e=Array.isArray;return Yo=e,Yo}var Vo,Nh;function W0(){if(Nh)return Vo;Nh=1;var e=typeof Fi=="object"&&Fi&&Fi.Object===Object&&Fi;return Vo=e,Vo}var Xo,Ih;function wt(){if(Ih)return Xo;Ih=1;var e=W0(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Xo=r,Xo}var Zo,Dh;function ki(){if(Dh)return Zo;Dh=1;var e=wt(),t=e.Symbol;return Zo=t,Zo}var Qo,Rh;function Y_(){if(Rh)return Qo;Rh=1;var e=ki(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=r.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(u?o[i]=s:delete o[i]),f}return Qo=a,Qo}var Jo,qh;function V_(){if(qh)return Jo;qh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jo=r,Jo}var eu,Lh;function Dt(){if(Lh)return eu;Lh=1;var e=ki(),t=Y_(),r=V_(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return eu=o,eu}var tu,Bh;function Rt(){if(Bh)return tu;Bh=1;function e(t){return t!=null&&typeof t=="object"}return tu=e,tu}var ru,Fh;function gn(){if(Fh)return ru;Fh=1;var e=Dt(),t=Rt(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return ru=n,ru}var nu,Wh;function bd(){if(Wh)return nu;Wh=1;var e=Ge(),t=gn(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return nu=i,nu}var iu,Uh;function Xt(){if(Uh)return iu;Uh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return iu=e,iu}var au,zh;function xd(){if(zh)return au;zh=1;var e=Dt(),t=Xt(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==i||s==r||s==a}return au=o,au}var ou,Hh;function X_(){if(Hh)return ou;Hh=1;var e=wt(),t=e["__core-js_shared__"];return ou=t,ou}var uu,Gh;function Z_(){if(Gh)return uu;Gh=1;var e=X_(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return uu=r,uu}var su,Kh;function U0(){if(Kh)return su;Kh=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return su=r,su}var cu,Yh;function Q_(){if(Yh)return cu;Yh=1;var e=xd(),t=Z_(),r=Xt(),n=U0(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,f=RegExp("^"+s.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(d){if(!r(d)||t(d))return!1;var h=e(d)?f:a;return h.test(n(d))}return cu=l,cu}var lu,Vh;function J_(){if(Vh)return lu;Vh=1;function e(t,r){return t?.[r]}return lu=e,lu}var fu,Xh;function _r(){if(Xh)return fu;Xh=1;var e=Q_(),t=J_();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return fu=r,fu}var du,Zh;function uo(){if(Zh)return du;Zh=1;var e=_r(),t=e(Object,"create");return du=t,du}var hu,Qh;function eS(){if(Qh)return hu;Qh=1;var e=uo();function t(){this.__data__=e?e(null):{},this.size=0}return hu=t,hu}var pu,Jh;function tS(){if(Jh)return pu;Jh=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return pu=e,pu}var vu,ep;function rS(){if(ep)return vu;ep=1;var e=uo(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var u=o[a];return u===t?void 0:u}return n.call(o,a)?o[a]:void 0}return vu=i,vu}var yu,tp;function nS(){if(tp)return yu;tp=1;var e=uo(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return yu=n,yu}var mu,rp;function iS(){if(rp)return mu;rp=1;var e=uo(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return mu=r,mu}var gu,np;function aS(){if(np)return gu;np=1;var e=eS(),t=tS(),r=rS(),n=nS(),i=iS();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,gu=a,gu}var bu,ip;function oS(){if(ip)return bu;ip=1;function e(){this.__data__=[],this.size=0}return bu=e,bu}var xu,ap;function wd(){if(ap)return xu;ap=1;function e(t,r){return t===r||t!==t&&r!==r}return xu=e,xu}var wu,op;function so(){if(op)return wu;op=1;var e=wd();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return wu=t,wu}var Ou,up;function uS(){if(up)return Ou;up=1;var e=so(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var u=a.length-1;return o==u?a.pop():r.call(a,o,1),--this.size,!0}return Ou=n,Ou}var _u,sp;function sS(){if(sp)return _u;sp=1;var e=so();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return _u=t,_u}var Su,cp;function cS(){if(cp)return Su;cp=1;var e=so();function t(r){return e(this.__data__,r)>-1}return Su=t,Su}var Au,lp;function lS(){if(lp)return Au;lp=1;var e=so();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Au=t,Au}var Pu,fp;function co(){if(fp)return Pu;fp=1;var e=oS(),t=uS(),r=sS(),n=cS(),i=lS();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Pu=a,Pu}var ju,dp;function Od(){if(dp)return ju;dp=1;var e=_r(),t=wt(),r=e(t,"Map");return ju=r,ju}var Tu,hp;function fS(){if(hp)return Tu;hp=1;var e=aS(),t=co(),r=Od();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Tu=n,Tu}var Eu,pp;function dS(){if(pp)return Eu;pp=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Eu=e,Eu}var Mu,vp;function lo(){if(vp)return Mu;vp=1;var e=dS();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Mu=t,Mu}var Cu,yp;function hS(){if(yp)return Cu;yp=1;var e=lo();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Cu=t,Cu}var $u,mp;function pS(){if(mp)return $u;mp=1;var e=lo();function t(r){return e(this,r).get(r)}return $u=t,$u}var ku,gp;function vS(){if(gp)return ku;gp=1;var e=lo();function t(r){return e(this,r).has(r)}return ku=t,ku}var Nu,bp;function yS(){if(bp)return Nu;bp=1;var e=lo();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return Nu=t,Nu}var Iu,xp;function _d(){if(xp)return Iu;xp=1;var e=fS(),t=hS(),r=pS(),n=vS(),i=yS();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Iu=a,Iu}var Du,wp;function z0(){if(wp)return Du;wp=1;var e=_d(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,u=i?i.apply(this,o):o[0],s=a.cache;if(s.has(u))return s.get(u);var c=n.apply(this,o);return a.cache=s.set(u,c)||s,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,Du=r,Du}var Ru,Op;function mS(){if(Op)return Ru;Op=1;var e=z0(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return Ru=r,Ru}var qu,_p;function gS(){if(_p)return qu;_p=1;var e=mS(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,u,s,c){a.push(s?c.replace(r,"$1"):u||o)}),a});return qu=n,qu}var Lu,Sp;function Sd(){if(Sp)return Lu;Sp=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return Lu=e,Lu}var Bu,Ap;function bS(){if(Ap)return Bu;Ap=1;var e=ki(),t=Sd(),r=Ge(),n=gn(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(u){if(typeof u=="string")return u;if(r(u))return t(u,o)+"";if(n(u))return a?a.call(u):"";var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return Bu=o,Bu}var Fu,Pp;function H0(){if(Pp)return Fu;Pp=1;var e=bS();function t(r){return r==null?"":e(r)}return Fu=t,Fu}var Wu,jp;function G0(){if(jp)return Wu;jp=1;var e=Ge(),t=bd(),r=gS(),n=H0();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return Wu=i,Wu}var Uu,Tp;function fo(){if(Tp)return Uu;Tp=1;var e=gn();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Uu=t,Uu}var zu,Ep;function Ad(){if(Ep)return zu;Ep=1;var e=G0(),t=fo();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return zu=r,zu}var Hu,Mp;function K0(){if(Mp)return Hu;Mp=1;var e=Ad();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return Hu=t,Hu}var xS=K0();const Qe=se(xS);var Gu,Cp;function wS(){if(Cp)return Gu;Cp=1;function e(t){return t==null}return Gu=e,Gu}var OS=wS();const Z=se(OS);var Ku,$p;function _S(){if($p)return Ku;$p=1;var e=Dt(),t=Ge(),r=Rt(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return Ku=i,Ku}var SS=_S();const mr=se(SS);var AS=xd();const V=se(AS);var PS=Xt();const bn=se(PS);var Yu={exports:{}},ie={};var kp;function jS(){if(kp)return ie;kp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(p){if(typeof p=="object"&&p!==null){var g=p.$$typeof;switch(g){case e:switch(p=p.type,p){case r:case i:case n:case c:case f:return p;default:switch(p=p&&p.$$typeof,p){case u:case o:case s:case d:case l:case a:return p;default:return g}}case t:return g}}}return ie.ContextConsumer=o,ie.ContextProvider=a,ie.Element=e,ie.ForwardRef=s,ie.Fragment=r,ie.Lazy=d,ie.Memo=l,ie.Portal=t,ie.Profiler=i,ie.StrictMode=n,ie.Suspense=c,ie.SuspenseList=f,ie.isAsyncMode=function(){return!1},ie.isConcurrentMode=function(){return!1},ie.isContextConsumer=function(p){return v(p)===o},ie.isContextProvider=function(p){return v(p)===a},ie.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ie.isForwardRef=function(p){return v(p)===s},ie.isFragment=function(p){return v(p)===r},ie.isLazy=function(p){return v(p)===d},ie.isMemo=function(p){return v(p)===l},ie.isPortal=function(p){return v(p)===t},ie.isProfiler=function(p){return v(p)===i},ie.isStrictMode=function(p){return v(p)===n},ie.isSuspense=function(p){return v(p)===c},ie.isSuspenseList=function(p){return v(p)===f},ie.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===i||p===n||p===c||p===f||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===l||p.$$typeof===a||p.$$typeof===o||p.$$typeof===s||p.$$typeof===y||p.getModuleId!==void 0)},ie.typeOf=v,ie}var Np;function TS(){return Np||(Np=1,Yu.exports=jS()),Yu.exports}var ES=TS(),Vu,Ip;function Y0(){if(Ip)return Vu;Ip=1;var e=Dt(),t=Rt(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return Vu=n,Vu}var Xu,Dp;function MS(){if(Dp)return Xu;Dp=1;var e=Y0();function t(r){return e(r)&&r!=+r}return Xu=t,Xu}var CS=MS();const xn=se(CS);var $S=Y0();const kS=se($S);var Le=function(t){return t===0?0:t>0?1:-1},lr=function(t){return mr(t)&&t.indexOf("%")===t.length-1},L=function(t){return kS(t)&&!xn(t)},NS=function(t){return Z(t)},Te=function(t){return L(t)||mr(t)},IS=0,wn=function(t){var r=++IS;return"".concat(t||"").concat(r)},Be=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!L(t)&&!mr(t))return n;var a;if(lr(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xn(a)&&(a=n),i&&a>r&&(a=r),a},Ht=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},DS=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},ze=function(t,r){return L(t)&&L(r)?function(n){return t+n*(r-t)}:function(){return r}};function ca(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Qe(n,t))===r})}var RS=function(t,r){return L(t)&&L(r)?t-r:mr(t)&&mr(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Br(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 Ql(e){"@babel/helpers - typeof";return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}var qS=["viewBox","children"],LS=["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"],Rp=["points","pathLength"],Zu={svg:qS,polygon:Rp,polyline:Rp},Pd=["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"],la=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(D.isValidElement(t)&&(n=t.props),!bn(n))return null;var i={};return Object.keys(n).forEach(function(a){Pd.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},BS=function(t,r,n){return function(i){return t(r,n,i),null}},gr=function(t,r,n){if(!bn(t)||Ql(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];Pd.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=BS(o,r,n))}),i},FS=["children"],WS=["children"];function qp(e,t){if(e==null)return{};var r=US(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function US(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 Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}var Lp={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"},Et=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Bp=null,Qu=null,jd=function e(t){if(t===Bp&&Array.isArray(Qu))return Qu;var r=[];return D.Children.forEach(t,function(n){Z(n)||(ES.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Qu=r,Bp=t,r};function at(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Et(i)}):n=[Et(t)],jd(e).forEach(function(i){var a=Qe(i,"type.displayName")||Qe(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Ve(e,t){var r=at(e,t);return r&&r[0]}var Fp=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!L(n)||n<=0||!L(i)||i<=0)},zS=["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"],HS=function(t){return t&&t.type&&mr(t.type)&&zS.indexOf(t.type)>=0},GS=function(t){return t&&Jl(t)==="object"&&"clipDot"in t},KS=function(t,r,n,i){var a,o=(a=Zu?.[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!V(t)&&(i&&o.includes(r)||LS.includes(r))||n&&Pd.includes(r)},G=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(D.isValidElement(t)&&(i=t.props),!bn(i))return null;var a={};return Object.keys(i).forEach(function(o){var u;KS((u=i)===null||u===void 0?void 0:u[o],o,r,n)&&(a[o]=i[o])}),a},ef=function e(t,r){if(t===r)return!0;var n=D.Children.count(t);if(n!==D.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Wp(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!Wp(a,o))return!1}return!0},Wp=function(t,r){if(Z(t)&&Z(r))return!0;if(!Z(t)&&!Z(r)){var n=t.props||{},i=n.children,a=qp(n,FS),o=r.props||{},u=o.children,s=qp(o,WS);return i&&u?Br(a,s)&&ef(i,u):!i&&!u?Br(a,s):!1}return!1},Up=function(t,r){var n=[],i={};return jd(t).forEach(function(a,o){if(HS(a))n.push(a);else if(a){var u=Et(a.type),s=r[u]||{},c=s.handler,f=s.once;if(c&&(!f||!i[u])){var l=c(a,u,o);n.push(l),i[u]=!0}}}),n},YS=function(t){var r=t&&t.type;return r&&Lp[r]?Lp[r]:null},VS=function(t,r){return jd(r).indexOf(t)},XS=["children","width","height","viewBox","className","style","title","desc"];function tf(){return tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tf.apply(this,arguments)}function ZS(e,t){if(e==null)return{};var r=QS(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QS(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 rf(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,u=e.title,s=e.desc,c=ZS(e,XS),f=i||{width:r,height:n,x:0,y:0},l=J("recharts-surface",a);return P.createElement("svg",tf({},G(c,!0,"svg"),{className:l,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),P.createElement("title",null,u),P.createElement("desc",null,s),t)}var JS=["children","className"];function nf(){return nf=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},nf.apply(this,arguments)}function eA(e,t){if(e==null)return{};var r=tA(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tA(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 te=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=eA(e,JS),a=J("recharts-layer",n);return P.createElement("g",nf({className:a},G(i,!0),{ref:t}),r)}),dt=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},Ju,zp;function rA(){if(zp)return Ju;zp=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return Ju=e,Ju}var es,Hp;function nA(){if(Hp)return es;Hp=1;var e=rA();function t(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:e(r,n,i)}return es=t,es}var ts,Gp;function V0(){if(Gp)return ts;Gp=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",u=RegExp("["+o+e+i+a+"]");function s(c){return u.test(c)}return ts=s,ts}var rs,Kp;function iA(){if(Kp)return rs;Kp=1;function e(t){return t.split("")}return rs=e,rs}var ns,Yp;function aA(){if(Yp)return ns;Yp=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",u="["+i+"]",s="\\ud83c[\\udffb-\\udfff]",c="(?:"+u+"|"+s+")",f="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",y=c+"?",v="["+a+"]?",p="(?:"+h+"(?:"+[f,l,d].join("|")+")"+v+y+")*",g=v+y+p,x="(?:"+[f+u+"?",u,l,d,o].join("|")+")",w=RegExp(s+"(?="+s+")|"+x+g,"g");function O(m){return m.match(w)||[]}return ns=O,ns}var is,Vp;function oA(){if(Vp)return is;Vp=1;var e=iA(),t=V0(),r=aA();function n(i){return t(i)?r(i):e(i)}return is=n,is}var as,Xp;function uA(){if(Xp)return as;Xp=1;var e=nA(),t=V0(),r=oA(),n=H0();function i(a){return function(o){o=n(o);var u=t(o)?r(o):void 0,s=u?u[0]:o.charAt(0),c=u?e(u,1).join(""):o.slice(1);return s[a]()+c}}return as=i,as}var os,Zp;function sA(){if(Zp)return os;Zp=1;var e=uA(),t=e("toUpperCase");return os=t,os}var cA=sA();const ho=se(cA);function fe(e){return function(){return e}}const X0=Math.cos,fa=Math.sin,ht=Math.sqrt,da=Math.PI,po=2*da,af=Math.PI,of=2*af,ur=1e-6,lA=of-ur;function Z0(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function fA(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Z0;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class dA{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Z0:fA(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,s=n-t,c=i-r,f=o-t,l=u-r,d=f*f+l*l;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>ur)if(!(Math.abs(l*s-c*f)>ur)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,y=i-u,v=s*s+c*c,p=h*h+y*y,g=Math.sqrt(v),x=Math.sqrt(d),w=a*Math.tan((af-Math.acos((v+d-p)/(2*g*x)))/2),O=w/x,m=w/g;Math.abs(O-1)>ur&&this._append`L${t+O*f},${r+O*l}`,this._append`A${a},${a},0,0,${+(l*h>f*y)},${this._x1=t+m*s},${this._y1=r+m*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),s=n*Math.sin(i),c=t+u,f=r+s,l=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>ur||Math.abs(this._y1-f)>ur)&&this._append`L${c},${f}`,n&&(d<0&&(d=d%of+of),d>lA?this._append`A${n},${n},0,1,${l},${t-u},${r-s}A${n},${n},0,1,${l},${this._x1=c},${this._y1=f}`:d>ur&&this._append`A${n},${n},0,${+(d>=af)},${l},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Td(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 dA(t)}function Ed(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Q0(e){this._context=e}Q0.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 vo(e){return new Q0(e)}function J0(e){return e[0]}function ex(e){return e[1]}function tx(e,t){var r=fe(!0),n=null,i=vo,a=null,o=Td(u);e=typeof e=="function"?e:e===void 0?J0:fe(e),t=typeof t=="function"?t:t===void 0?ex:fe(t);function u(s){var c,f=(s=Ed(s)).length,l,d=!1,h;for(n==null&&(a=i(h=o())),c=0;c<=f;++c)!(c<f&&r(l=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(l,c,s),+t(l,c,s));if(h)return a=null,h+""||null}return u.x=function(s){return arguments.length?(e=typeof s=="function"?s:fe(+s),u):e},u.y=function(s){return arguments.length?(t=typeof s=="function"?s:fe(+s),u):t},u.defined=function(s){return arguments.length?(r=typeof s=="function"?s:fe(!!s),u):r},u.curve=function(s){return arguments.length?(i=s,n!=null&&(a=i(n)),u):i},u.context=function(s){return arguments.length?(s==null?n=a=null:a=i(n=s),u):n},u}function Hi(e,t,r){var n=null,i=fe(!0),a=null,o=vo,u=null,s=Td(c);e=typeof e=="function"?e:e===void 0?J0:fe(+e),t=typeof t=="function"?t:fe(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?ex:fe(+r);function c(l){var d,h,y,v=(l=Ed(l)).length,p,g=!1,x,w=new Array(v),O=new Array(v);for(a==null&&(u=o(x=s())),d=0;d<=v;++d){if(!(d<v&&i(p=l[d],d,l))===g)if(g=!g)h=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),y=d-1;y>=h;--y)u.point(w[y],O[y]);u.lineEnd(),u.areaEnd()}g&&(w[d]=+e(p,d,l),O[d]=+t(p,d,l),u.point(n?+n(p,d,l):w[d],r?+r(p,d,l):O[d]))}if(x)return u=null,x+""||null}function f(){return tx().defined(i).curve(o).context(a)}return c.x=function(l){return arguments.length?(e=typeof l=="function"?l:fe(+l),n=null,c):e},c.x0=function(l){return arguments.length?(e=typeof l=="function"?l:fe(+l),c):e},c.x1=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:fe(+l),c):n},c.y=function(l){return arguments.length?(t=typeof l=="function"?l:fe(+l),r=null,c):t},c.y0=function(l){return arguments.length?(t=typeof l=="function"?l:fe(+l),c):t},c.y1=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:fe(+l),c):r},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(r)},c.lineX1=function(){return f().x(n).y(t)},c.defined=function(l){return arguments.length?(i=typeof l=="function"?l:fe(!!l),c):i},c.curve=function(l){return arguments.length?(o=l,a!=null&&(u=o(a)),c):o},c.context=function(l){return arguments.length?(l==null?a=u=null:u=o(a=l),c):a},c}class rx{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 hA(e){return new rx(e,!0)}function pA(e){return new rx(e,!1)}const Md={draw(e,t){const r=ht(t/da);e.moveTo(r,0),e.arc(0,0,r,0,po)}},vA={draw(e,t){const r=ht(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()}},nx=ht(1/3),yA=nx*2,mA={draw(e,t){const r=ht(t/yA),n=r*nx;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},gA={draw(e,t){const r=ht(t),n=-r/2;e.rect(n,n,r,r)}},bA=.8908130915292852,ix=fa(da/10)/fa(7*da/10),xA=fa(po/10)*ix,wA=-X0(po/10)*ix,OA={draw(e,t){const r=ht(t*bA),n=xA*r,i=wA*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=po*a/5,u=X0(o),s=fa(o);e.lineTo(s*r,-u*r),e.lineTo(u*n-s*i,s*n+u*i)}e.closePath()}},us=ht(3),_A={draw(e,t){const r=-ht(t/(us*3));e.moveTo(0,r*2),e.lineTo(-us*r,-r),e.lineTo(us*r,-r),e.closePath()}},Je=-.5,et=ht(3)/2,uf=1/ht(12),SA=(uf/2+1)*3,AA={draw(e,t){const r=ht(t/SA),n=r/2,i=r*uf,a=n,o=r*uf+r,u=-a,s=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,s),e.lineTo(Je*n-et*i,et*n+Je*i),e.lineTo(Je*a-et*o,et*a+Je*o),e.lineTo(Je*u-et*s,et*u+Je*s),e.lineTo(Je*n+et*i,Je*i-et*n),e.lineTo(Je*a+et*o,Je*o-et*a),e.lineTo(Je*u+et*s,Je*s-et*u),e.closePath()}};function PA(e,t){let r=null,n=Td(i);e=typeof e=="function"?e:fe(e||Md),t=typeof t=="function"?t:fe(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:fe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:fe(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ha(){}function pa(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 ax(e){this._context=e}ax.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:pa(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:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jA(e){return new ax(e)}function ox(e){this._context=e}ox.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TA(e){return new ox(e)}function ux(e){this._context=e}ux.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:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function EA(e){return new ux(e)}function sx(e){this._context=e}sx.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function MA(e){return new sx(e)}function Qp(e){return e<0?-1:1}function Jp(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(Qp(a)+Qp(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function ev(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ss(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function va(e){this._context=e}va.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:ss(this,this._t0,ev(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,ss(this,ev(this,r=Jp(this,e,t)),r);break;default:ss(this,this._t0,r=Jp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function cx(e){this._context=new lx(e)}(cx.prototype=Object.create(va.prototype)).point=function(e,t){va.prototype.point.call(this,t,e)};function lx(e){this._context=e}lx.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function CA(e){return new va(e)}function $A(e){return new cx(e)}function fx(e){this._context=e}fx.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=tv(e),i=tv(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function tv(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function kA(e){return new fx(e)}function yo(e,t){this._context=e,this._t=t}yo.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 NA(e){return new yo(e,.5)}function IA(e){return new yo(e,0)}function DA(e){return new yo(e,1)}function Hr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function sf(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function RA(e,t){return e[t]}function qA(e){const t=[];return t.key=e,t}function LA(){var e=fe([]),t=sf,r=Hr,n=RA;function i(a){var o=Array.from(e.apply(this,arguments),qA),u,s=o.length,c=-1,f;for(const l of a)for(u=0,++c;u<s;++u)(o[u][c]=[0,+n(l,o[u].key,c,a)]).data=l;for(u=0,f=Ed(t(o));u<s;++u)o[f[u]].index=u;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:fe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:fe(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?sf:typeof a=="function"?a:fe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Hr,i):r},i}function BA(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}Hr(e,t)}}function FA(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}Hr(e,t)}}function WA(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,s=0,c=0;u<o;++u){for(var f=e[t[u]],l=f[n][1]||0,d=f[n-1][1]||0,h=(l-d)/2,y=0;y<u;++y){var v=e[t[y]],p=v[n][1]||0,g=v[n-1][1]||0;h+=p-g}s+=l,c+=h*l}i[n-1][1]+=i[n-1][0]=r,s&&(r-=c/s)}i[n-1][1]+=i[n-1][0]=r,Hr(e,t)}}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}var UA=["type","size","sizeType"];function cf(){return cf=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},cf.apply(this,arguments)}function rv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rv(Object(r),!0).forEach(function(n){zA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zA(e,t,r){return t=HA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HA(e){var t=GA(e,"string");return Xn(t)=="symbol"?t:t+""}function GA(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KA(e,t){if(e==null)return{};var r=YA(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function YA(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 dx={symbolCircle:Md,symbolCross:vA,symbolDiamond:mA,symbolSquare:gA,symbolStar:OA,symbolTriangle:_A,symbolWye:AA},VA=Math.PI/180,XA=function(t){var r="symbol".concat(ho(t));return dx[r]||Md},ZA=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*VA;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},QA=function(t,r){dx["symbol".concat(ho(t))]=r},Cd=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,u=o===void 0?"area":o,s=KA(t,UA),c=nv(nv({},s),{},{type:n,size:a,sizeType:u}),f=function(){var p=XA(n),g=PA().type(p).size(ZA(a,u,n));return g()},l=c.className,d=c.cx,h=c.cy,y=G(c,!0);return d===+d&&h===+h&&a===+a?P.createElement("path",cf({},y,{className:J("recharts-symbols",l),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};Cd.registerSymbol=QA;function Gr(e){"@babel/helpers - typeof";return Gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(e)}function lf(){return lf=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},lf.apply(this,arguments)}function iv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JA(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){Zn(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 eP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tP(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,px(n.key),n)}}function rP(e,t,r){return t&&tP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nP(e,t,r){return t=ya(t),iP(e,hx()?Reflect.construct(t,r||[],ya(e).constructor):t.apply(e,r))}function iP(e,t){if(t&&(Gr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aP(e)}function aP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hx=function(){return!!e})()}function ya(e){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ya(e)}function oP(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&&ff(e,t)}function ff(e,t){return ff=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ff(e,t)}function Zn(e,t,r){return t=px(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function px(e){var t=uP(e,"string");return Gr(t)=="symbol"?t:t+""}function uP(e,t){if(Gr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tt=32,$d=(function(e){function t(){return eP(this,t),nP(this,t,arguments)}return oP(t,e),rP(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=tt/2,o=tt/6,u=tt/3,s=n.inactive?i:n.color;if(n.type==="plainline")return P.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:tt,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return P.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(a,"h").concat(u,`
|
|
2
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*u,",").concat(a,`
|
|
3
|
+
H`).concat(tt,"M").concat(2*u,",").concat(a,`
|
|
4
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(u,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return P.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(tt/8,"h").concat(tt,"v").concat(tt*3/4,"h").concat(-tt,"z"),className:"recharts-legend-icon"});if(P.isValidElement(n.legendIcon)){var c=JA({},n);return delete c.legendIcon,P.cloneElement(n.legendIcon,c)}return P.createElement(Cd,{fill:s,cx:a,cy:a,size:tt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,u=i.layout,s=i.formatter,c=i.inactiveColor,f={x:0,y:0,width:tt,height:tt},l={display:u==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,y){var v=h.formatter||s,p=J(Zn(Zn({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var g=V(h.value)?null:h.value;dt(!V(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=h.inactive?c:h.color;return P.createElement("li",lf({className:p,style:l,key:"legend-item-".concat(y)},gr(n.props,h,y)),P.createElement(rf,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(g,h,y):g))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return P.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(D.PureComponent);Zn($d,"displayName","Legend");Zn($d,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var cs,av;function sP(){if(av)return cs;av=1;var e=co();function t(){this.__data__=new e,this.size=0}return cs=t,cs}var ls,ov;function cP(){if(ov)return ls;ov=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return ls=e,ls}var fs,uv;function lP(){if(uv)return fs;uv=1;function e(t){return this.__data__.get(t)}return fs=e,fs}var ds,sv;function fP(){if(sv)return ds;sv=1;function e(t){return this.__data__.has(t)}return ds=e,ds}var hs,cv;function dP(){if(cv)return hs;cv=1;var e=co(),t=Od(),r=_d(),n=200;function i(a,o){var u=this.__data__;if(u instanceof e){var s=u.__data__;if(!t||s.length<n-1)return s.push([a,o]),this.size=++u.size,this;u=this.__data__=new r(s)}return u.set(a,o),this.size=u.size,this}return hs=i,hs}var ps,lv;function vx(){if(lv)return ps;lv=1;var e=co(),t=sP(),r=cP(),n=lP(),i=fP(),a=dP();function o(u){var s=this.__data__=new e(u);this.size=s.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,ps=o,ps}var vs,fv;function hP(){if(fv)return vs;fv=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return vs=t,vs}var ys,dv;function pP(){if(dv)return ys;dv=1;function e(t){return this.__data__.has(t)}return ys=e,ys}var ms,hv;function yx(){if(hv)return ms;hv=1;var e=_d(),t=hP(),r=pP();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,ms=n,ms}var gs,pv;function mx(){if(pv)return gs;pv=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return gs=e,gs}var bs,vv;function gx(){if(vv)return bs;vv=1;function e(t,r){return t.has(r)}return bs=e,bs}var xs,yv;function bx(){if(yv)return xs;yv=1;var e=yx(),t=mx(),r=gx(),n=1,i=2;function a(o,u,s,c,f,l){var d=s&n,h=o.length,y=u.length;if(h!=y&&!(d&&y>h))return!1;var v=l.get(o),p=l.get(u);if(v&&p)return v==u&&p==o;var g=-1,x=!0,w=s&i?new e:void 0;for(l.set(o,u),l.set(u,o);++g<h;){var O=o[g],m=u[g];if(c)var b=d?c(m,O,g,u,o,l):c(O,m,g,o,u,l);if(b!==void 0){if(b)continue;x=!1;break}if(w){if(!t(u,function(_,A){if(!r(w,A)&&(O===_||f(O,_,s,c,l)))return w.push(A)})){x=!1;break}}else if(!(O===m||f(O,m,s,c,l))){x=!1;break}}return l.delete(o),l.delete(u),x}return xs=a,xs}var ws,mv;function vP(){if(mv)return ws;mv=1;var e=wt(),t=e.Uint8Array;return ws=t,ws}var Os,gv;function yP(){if(gv)return Os;gv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return Os=e,Os}var _s,bv;function kd(){if(bv)return _s;bv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return _s=e,_s}var Ss,xv;function mP(){if(xv)return Ss;xv=1;var e=ki(),t=vP(),r=wd(),n=bx(),i=yP(),a=kd(),o=1,u=2,s="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Map]",d="[object Number]",h="[object RegExp]",y="[object Set]",v="[object String]",p="[object Symbol]",g="[object ArrayBuffer]",x="[object DataView]",w=e?e.prototype:void 0,O=w?w.valueOf:void 0;function m(b,_,A,T,$,j,M){switch(A){case x:if(b.byteLength!=_.byteLength||b.byteOffset!=_.byteOffset)return!1;b=b.buffer,_=_.buffer;case g:return!(b.byteLength!=_.byteLength||!j(new t(b),new t(_)));case s:case c:case d:return r(+b,+_);case f:return b.name==_.name&&b.message==_.message;case h:case v:return b==_+"";case l:var C=i;case y:var E=T&o;if(C||(C=a),b.size!=_.size&&!E)return!1;var k=M.get(b);if(k)return k==_;T|=u,M.set(b,_);var I=n(C(b),C(_),T,$,j,M);return M.delete(b),I;case p:if(O)return O.call(b)==O.call(_)}return!1}return Ss=m,Ss}var As,wv;function xx(){if(wv)return As;wv=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return As=e,As}var Ps,Ov;function gP(){if(Ov)return Ps;Ov=1;var e=xx(),t=Ge();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return Ps=r,Ps}var js,_v;function bP(){if(_v)return js;_v=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var u=t[n];r(u,n,t)&&(o[a++]=u)}return o}return js=e,js}var Ts,Sv;function xP(){if(Sv)return Ts;Sv=1;function e(){return[]}return Ts=e,Ts}var Es,Av;function wP(){if(Av)return Es;Av=1;var e=bP(),t=xP(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(u){return n.call(o,u)}))}:t;return Es=a,Es}var Ms,Pv;function OP(){if(Pv)return Ms;Pv=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Ms=e,Ms}var Cs,jv;function _P(){if(jv)return Cs;jv=1;var e=Dt(),t=Rt(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Cs=n,Cs}var $s,Tv;function Nd(){if(Tv)return $s;Tv=1;var e=_P(),t=Rt(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return $s=a,$s}var qn={exports:{}},ks,Ev;function SP(){if(Ev)return ks;Ev=1;function e(){return!1}return ks=e,ks}qn.exports;var Mv;function wx(){return Mv||(Mv=1,(function(e,t){var r=wt(),n=SP(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,u=o?r.Buffer:void 0,s=u?u.isBuffer:void 0,c=s||n;e.exports=c})(qn,qn.exports)),qn.exports}var Ns,Cv;function Id(){if(Cv)return Ns;Cv=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Ns=r,Ns}var Is,$v;function Dd(){if($v)return Is;$v=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Is=t,Is}var Ds,kv;function AP(){if(kv)return Ds;kv=1;var e=Dt(),t=Dd(),r=Rt(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",u="[object Error]",s="[object Function]",c="[object Map]",f="[object Number]",l="[object Object]",d="[object RegExp]",h="[object Set]",y="[object String]",v="[object WeakMap]",p="[object ArrayBuffer]",g="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",O="[object Int8Array]",m="[object Int16Array]",b="[object Int32Array]",_="[object Uint8Array]",A="[object Uint8ClampedArray]",T="[object Uint16Array]",$="[object Uint32Array]",j={};j[x]=j[w]=j[O]=j[m]=j[b]=j[_]=j[A]=j[T]=j[$]=!0,j[n]=j[i]=j[p]=j[a]=j[g]=j[o]=j[u]=j[s]=j[c]=j[f]=j[l]=j[d]=j[h]=j[y]=j[v]=!1;function M(C){return r(C)&&t(C.length)&&!!j[e(C)]}return Ds=M,Ds}var Rs,Nv;function Ox(){if(Nv)return Rs;Nv=1;function e(t){return function(r){return t(r)}}return Rs=e,Rs}var Ln={exports:{}};Ln.exports;var Iv;function PP(){return Iv||(Iv=1,(function(e,t){var r=W0(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,u=(function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}})();e.exports=u})(Ln,Ln.exports)),Ln.exports}var qs,Dv;function _x(){if(Dv)return qs;Dv=1;var e=AP(),t=Ox(),r=PP(),n=r&&r.isTypedArray,i=n?t(n):e;return qs=i,qs}var Ls,Rv;function jP(){if(Rv)return Ls;Rv=1;var e=OP(),t=Nd(),r=Ge(),n=wx(),i=Id(),a=_x(),o=Object.prototype,u=o.hasOwnProperty;function s(c,f){var l=r(c),d=!l&&t(c),h=!l&&!d&&n(c),y=!l&&!d&&!h&&a(c),v=l||d||h||y,p=v?e(c.length,String):[],g=p.length;for(var x in c)(f||u.call(c,x))&&!(v&&(x=="length"||h&&(x=="offset"||x=="parent")||y&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,g)))&&p.push(x);return p}return Ls=s,Ls}var Bs,qv;function TP(){if(qv)return Bs;qv=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Bs=t,Bs}var Fs,Lv;function Sx(){if(Lv)return Fs;Lv=1;function e(t,r){return function(n){return t(r(n))}}return Fs=e,Fs}var Ws,Bv;function EP(){if(Bv)return Ws;Bv=1;var e=Sx(),t=e(Object.keys,Object);return Ws=t,Ws}var Us,Fv;function MP(){if(Fv)return Us;Fv=1;var e=TP(),t=EP(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&o.push(u);return o}return Us=i,Us}var zs,Wv;function Ni(){if(Wv)return zs;Wv=1;var e=xd(),t=Dd();function r(n){return n!=null&&t(n.length)&&!e(n)}return zs=r,zs}var Hs,Uv;function mo(){if(Uv)return Hs;Uv=1;var e=jP(),t=MP(),r=Ni();function n(i){return r(i)?e(i):t(i)}return Hs=n,Hs}var Gs,zv;function CP(){if(zv)return Gs;zv=1;var e=gP(),t=wP(),r=mo();function n(i){return e(i,r,t)}return Gs=n,Gs}var Ks,Hv;function $P(){if(Hv)return Ks;Hv=1;var e=CP(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,u,s,c,f){var l=u&t,d=e(a),h=d.length,y=e(o),v=y.length;if(h!=v&&!l)return!1;for(var p=h;p--;){var g=d[p];if(!(l?g in o:n.call(o,g)))return!1}var x=f.get(a),w=f.get(o);if(x&&w)return x==o&&w==a;var O=!0;f.set(a,o),f.set(o,a);for(var m=l;++p<h;){g=d[p];var b=a[g],_=o[g];if(s)var A=l?s(_,b,g,o,a,f):s(b,_,g,a,o,f);if(!(A===void 0?b===_||c(b,_,u,s,f):A)){O=!1;break}m||(m=g=="constructor")}if(O&&!m){var T=a.constructor,$=o.constructor;T!=$&&"constructor"in a&&"constructor"in o&&!(typeof T=="function"&&T instanceof T&&typeof $=="function"&&$ instanceof $)&&(O=!1)}return f.delete(a),f.delete(o),O}return Ks=i,Ks}var Ys,Gv;function kP(){if(Gv)return Ys;Gv=1;var e=_r(),t=wt(),r=e(t,"DataView");return Ys=r,Ys}var Vs,Kv;function NP(){if(Kv)return Vs;Kv=1;var e=_r(),t=wt(),r=e(t,"Promise");return Vs=r,Vs}var Xs,Yv;function Ax(){if(Yv)return Xs;Yv=1;var e=_r(),t=wt(),r=e(t,"Set");return Xs=r,Xs}var Zs,Vv;function IP(){if(Vv)return Zs;Vv=1;var e=_r(),t=wt(),r=e(t,"WeakMap");return Zs=r,Zs}var Qs,Xv;function DP(){if(Xv)return Qs;Xv=1;var e=kP(),t=Od(),r=NP(),n=Ax(),i=IP(),a=Dt(),o=U0(),u="[object Map]",s="[object Object]",c="[object Promise]",f="[object Set]",l="[object WeakMap]",d="[object DataView]",h=o(e),y=o(t),v=o(r),p=o(n),g=o(i),x=a;return(e&&x(new e(new ArrayBuffer(1)))!=d||t&&x(new t)!=u||r&&x(r.resolve())!=c||n&&x(new n)!=f||i&&x(new i)!=l)&&(x=function(w){var O=a(w),m=O==s?w.constructor:void 0,b=m?o(m):"";if(b)switch(b){case h:return d;case y:return u;case v:return c;case p:return f;case g:return l}return O}),Qs=x,Qs}var Js,Zv;function RP(){if(Zv)return Js;Zv=1;var e=vx(),t=bx(),r=mP(),n=$P(),i=DP(),a=Ge(),o=wx(),u=_x(),s=1,c="[object Arguments]",f="[object Array]",l="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function y(v,p,g,x,w,O){var m=a(v),b=a(p),_=m?f:i(v),A=b?f:i(p);_=_==c?l:_,A=A==c?l:A;var T=_==l,$=A==l,j=_==A;if(j&&o(v)){if(!o(p))return!1;m=!0,T=!1}if(j&&!T)return O||(O=new e),m||u(v)?t(v,p,g,x,w,O):r(v,p,_,g,x,w,O);if(!(g&s)){var M=T&&h.call(v,"__wrapped__"),C=$&&h.call(p,"__wrapped__");if(M||C){var E=M?v.value():v,k=C?p.value():p;return O||(O=new e),w(E,k,g,x,O)}}return j?(O||(O=new e),n(v,p,g,x,w,O)):!1}return Js=y,Js}var ec,Qv;function Rd(){if(Qv)return ec;Qv=1;var e=RP(),t=Rt();function r(n,i,a,o,u){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,u)}return ec=r,ec}var tc,Jv;function qP(){if(Jv)return tc;Jv=1;var e=vx(),t=Rd(),r=1,n=2;function i(a,o,u,s){var c=u.length,f=c,l=!s;if(a==null)return!f;for(a=Object(a);c--;){var d=u[c];if(l&&d[2]?d[1]!==a[d[0]]:!(d[0]in a))return!1}for(;++c<f;){d=u[c];var h=d[0],y=a[h],v=d[1];if(l&&d[2]){if(y===void 0&&!(h in a))return!1}else{var p=new e;if(s)var g=s(y,v,h,a,o,p);if(!(g===void 0?t(v,y,r|n,s,p):g))return!1}}return!0}return tc=i,tc}var rc,ey;function Px(){if(ey)return rc;ey=1;var e=Xt();function t(r){return r===r&&!e(r)}return rc=t,rc}var nc,ty;function LP(){if(ty)return nc;ty=1;var e=Px(),t=mo();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],u=n[o];i[a]=[o,u,e(u)]}return i}return nc=r,nc}var ic,ry;function jx(){if(ry)return ic;ry=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return ic=e,ic}var ac,ny;function BP(){if(ny)return ac;ny=1;var e=qP(),t=LP(),r=jx();function n(i){var a=t(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return ac=n,ac}var oc,iy;function FP(){if(iy)return oc;iy=1;function e(t,r){return t!=null&&r in Object(t)}return oc=e,oc}var uc,ay;function WP(){if(ay)return uc;ay=1;var e=G0(),t=Nd(),r=Ge(),n=Id(),i=Dd(),a=fo();function o(u,s,c){s=e(s,u);for(var f=-1,l=s.length,d=!1;++f<l;){var h=a(s[f]);if(!(d=u!=null&&c(u,h)))break;u=u[h]}return d||++f!=l?d:(l=u==null?0:u.length,!!l&&i(l)&&n(h,l)&&(r(u)||t(u)))}return uc=o,uc}var sc,oy;function UP(){if(oy)return sc;oy=1;var e=FP(),t=WP();function r(n,i){return n!=null&&t(n,i,e)}return sc=r,sc}var cc,uy;function zP(){if(uy)return cc;uy=1;var e=Rd(),t=K0(),r=UP(),n=bd(),i=Px(),a=jx(),o=fo(),u=1,s=2;function c(f,l){return n(f)&&i(l)?a(o(f),l):function(d){var h=t(d,f);return h===void 0&&h===l?r(d,f):e(l,h,u|s)}}return cc=c,cc}var lc,sy;function On(){if(sy)return lc;sy=1;function e(t){return t}return lc=e,lc}var fc,cy;function HP(){if(cy)return fc;cy=1;function e(t){return function(r){return r?.[t]}}return fc=e,fc}var dc,ly;function GP(){if(ly)return dc;ly=1;var e=Ad();function t(r){return function(n){return e(n,r)}}return dc=t,dc}var hc,fy;function KP(){if(fy)return hc;fy=1;var e=HP(),t=GP(),r=bd(),n=fo();function i(a){return r(a)?e(n(a)):t(a)}return hc=i,hc}var pc,dy;function Ot(){if(dy)return pc;dy=1;var e=BP(),t=zP(),r=On(),n=Ge(),i=KP();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return pc=a,pc}var vc,hy;function Tx(){if(hy)return vc;hy=1;function e(t,r,n,i){for(var a=t.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(t[o],o,t))return o;return-1}return vc=e,vc}var yc,py;function YP(){if(py)return yc;py=1;function e(t){return t!==t}return yc=e,yc}var mc,vy;function VP(){if(vy)return mc;vy=1;function e(t,r,n){for(var i=n-1,a=t.length;++i<a;)if(t[i]===r)return i;return-1}return mc=e,mc}var gc,yy;function XP(){if(yy)return gc;yy=1;var e=Tx(),t=YP(),r=VP();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return gc=n,gc}var bc,my;function ZP(){if(my)return bc;my=1;var e=XP();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return bc=t,bc}var xc,gy;function QP(){if(gy)return xc;gy=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;)if(n(r,t[i]))return!0;return!1}return xc=e,xc}var wc,by;function JP(){if(by)return wc;by=1;function e(){}return wc=e,wc}var Oc,xy;function ej(){if(xy)return Oc;xy=1;var e=Ax(),t=JP(),r=kd(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return Oc=i,Oc}var _c,wy;function tj(){if(wy)return _c;wy=1;var e=yx(),t=ZP(),r=QP(),n=gx(),i=ej(),a=kd(),o=200;function u(s,c,f){var l=-1,d=t,h=s.length,y=!0,v=[],p=v;if(f)y=!1,d=r;else if(h>=o){var g=c?null:i(s);if(g)return a(g);y=!1,d=n,p=new e}else p=c?[]:v;e:for(;++l<h;){var x=s[l],w=c?c(x):x;if(x=f||x!==0?x:0,y&&w===w){for(var O=p.length;O--;)if(p[O]===w)continue e;c&&p.push(w),v.push(x)}else d(p,w,f)||(p!==v&&p.push(w),v.push(x))}return v}return _c=u,_c}var Sc,Oy;function rj(){if(Oy)return Sc;Oy=1;var e=Ot(),t=tj();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return Sc=r,Sc}var nj=rj();const _y=se(nj);function Ex(e,t,r){return t===!0?_y(e,r):V(t)?_y(e,t):e}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)}var ij=["ref"];function Sy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _t(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){go(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 aj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(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,Cx(n.key),n)}}function oj(e,t,r){return t&&Ay(e.prototype,t),r&&Ay(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uj(e,t,r){return t=ma(t),sj(e,Mx()?Reflect.construct(t,r||[],ma(e).constructor):t.apply(e,r))}function sj(e,t){if(t&&(Kr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cj(e)}function cj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mx=function(){return!!e})()}function ma(e){return ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ma(e)}function lj(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&&df(e,t)}function df(e,t){return df=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},df(e,t)}function go(e,t,r){return t=Cx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cx(e){var t=fj(e,"string");return Kr(t)=="symbol"?t:t+""}function fj(e,t){if(Kr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function dj(e,t){if(e==null)return{};var r=hj(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hj(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 pj(e){return e.value}function vj(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var r=dj(t,ij);return P.createElement($d,r)}var Py=1,Fr=(function(e){function t(){var r;aj(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=uj(this,t,[].concat(i)),go(r,"lastBoundingBox",{width:-1,height:-1}),r}return lj(t,e),oj(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>Py||Math.abs(i.height-this.lastBoundingBox.height)>Py)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?_t({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,u=i.verticalAlign,s=i.margin,c=i.chartWidth,f=i.chartHeight,l,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();l={left:((c||0)-h.width)/2}}else l=o==="right"?{right:s&&s.right||0}:{left:s&&s.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var y=this.getBBoxSnapshot();d={top:((f||0)-y.height)/2}}else d=u==="bottom"?{bottom:s&&s.bottom||0}:{top:s&&s.top||0};return _t(_t({},l),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,u=i.height,s=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,l=_t(_t({position:"absolute",width:o||"auto",height:u||"auto"},this.getDefaultPosition(s)),s);return P.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(h){n.wrapperNode=h}},vj(a,_t(_t({},this.props),{},{payload:Ex(f,c,pj)})))}}],[{key:"getWithHeight",value:function(n,i){var a=_t(_t({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&L(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])})(D.PureComponent);go(Fr,"displayName","Legend");go(Fr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ac,jy;function yj(){if(jy)return Ac;jy=1;var e=ki(),t=Nd(),r=Ge(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return Ac=i,Ac}var Pc,Ty;function $x(){if(Ty)return Pc;Ty=1;var e=xx(),t=yj();function r(n,i,a,o,u){var s=-1,c=n.length;for(a||(a=t),u||(u=[]);++s<c;){var f=n[s];i>0&&a(f)?i>1?r(f,i-1,a,o,u):e(u,f):o||(u[u.length]=f)}return u}return Pc=r,Pc}var jc,Ey;function mj(){if(Ey)return jc;Ey=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),u=i(r),s=u.length;s--;){var c=u[t?s:++a];if(n(o[c],c,o)===!1)break}return r}}return jc=e,jc}var Tc,My;function gj(){if(My)return Tc;My=1;var e=mj(),t=e();return Tc=t,Tc}var Ec,Cy;function kx(){if(Cy)return Ec;Cy=1;var e=gj(),t=mo();function r(n,i){return n&&e(n,i,t)}return Ec=r,Ec}var Mc,$y;function bj(){if($y)return Mc;$y=1;var e=Ni();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,u=n?o:-1,s=Object(i);(n?u--:++u<o)&&a(s[u],u,s)!==!1;);return i}}return Mc=t,Mc}var Cc,ky;function qd(){if(ky)return Cc;ky=1;var e=kx(),t=bj(),r=t(e);return Cc=r,Cc}var $c,Ny;function Nx(){if(Ny)return $c;Ny=1;var e=qd(),t=Ni();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(u,s,c){o[++a]=i(u,s,c)}),o}return $c=r,$c}var kc,Iy;function xj(){if(Iy)return kc;Iy=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return kc=e,kc}var Nc,Dy;function wj(){if(Dy)return Nc;Dy=1;var e=gn();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,u=e(r),s=n!==void 0,c=n===null,f=n===n,l=e(n);if(!c&&!l&&!u&&r>n||u&&s&&f&&!c&&!l||a&&s&&f||!i&&f||!o)return 1;if(!a&&!u&&!l&&r<n||l&&i&&o&&!a&&!u||c&&i&&o||!s&&o||!f)return-1}return 0}return Nc=t,Nc}var Ic,Ry;function Oj(){if(Ry)return Ic;Ry=1;var e=wj();function t(r,n,i){for(var a=-1,o=r.criteria,u=n.criteria,s=o.length,c=i.length;++a<s;){var f=e(o[a],u[a]);if(f){if(a>=c)return f;var l=i[a];return f*(l=="desc"?-1:1)}}return r.index-n.index}return Ic=t,Ic}var Dc,qy;function _j(){if(qy)return Dc;qy=1;var e=Sd(),t=Ad(),r=Ot(),n=Nx(),i=xj(),a=Ox(),o=Oj(),u=On(),s=Ge();function c(f,l,d){l.length?l=e(l,function(v){return s(v)?function(p){return t(p,v.length===1?v[0]:v)}:v}):l=[u];var h=-1;l=e(l,a(r));var y=n(f,function(v,p,g){var x=e(l,function(w){return w(v)});return{criteria:x,index:++h,value:v}});return i(y,function(v,p){return o(v,p,d)})}return Dc=c,Dc}var Rc,Ly;function Sj(){if(Ly)return Rc;Ly=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Rc=e,Rc}var qc,By;function Aj(){if(By)return qc;By=1;var e=Sj(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,u=-1,s=t(o.length-i,0),c=Array(s);++u<s;)c[u]=o[i+u];u=-1;for(var f=Array(i+1);++u<i;)f[u]=o[u];return f[i]=a(c),e(n,this,f)}}return qc=r,qc}var Lc,Fy;function Pj(){if(Fy)return Lc;Fy=1;function e(t){return function(){return t}}return Lc=e,Lc}var Bc,Wy;function Ix(){if(Wy)return Bc;Wy=1;var e=_r(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Bc=t,Bc}var Fc,Uy;function jj(){if(Uy)return Fc;Uy=1;var e=Pj(),t=Ix(),r=On(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return Fc=n,Fc}var Wc,zy;function Tj(){if(zy)return Wc;zy=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var u=r(),s=t-(u-o);if(o=u,s>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Wc=n,Wc}var Uc,Hy;function Ej(){if(Hy)return Uc;Hy=1;var e=jj(),t=Tj(),r=t(e);return Uc=r,Uc}var zc,Gy;function Mj(){if(Gy)return zc;Gy=1;var e=On(),t=Aj(),r=Ej();function n(i,a){return r(t(i,a,e),i+"")}return zc=n,zc}var Hc,Ky;function bo(){if(Ky)return Hc;Ky=1;var e=wd(),t=Ni(),r=Id(),n=Xt();function i(a,o,u){if(!n(u))return!1;var s=typeof o;return(s=="number"?t(u)&&r(o,u.length):s=="string"&&o in u)?e(u[o],a):!1}return Hc=i,Hc}var Gc,Yy;function Cj(){if(Yy)return Gc;Yy=1;var e=$x(),t=_j(),r=Mj(),n=bo(),i=r(function(a,o){if(a==null)return[];var u=o.length;return u>1&&n(a,o[0],o[1])?o=[]:u>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Gc=i,Gc}var $j=Cj();const Ld=se($j);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 hf(){return hf=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},hf.apply(this,arguments)}function kj(e,t){return Rj(e)||Dj(e,t)||Ij(e,t)||Nj()}function Nj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ij(e,t){if(e){if(typeof e=="string")return Vy(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 Vy(e,t)}}function Vy(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 Dj(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function Rj(e){if(Array.isArray(e))return e}function Xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kc(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){qj(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 qj(e,t,r){return t=Lj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lj(e){var t=Bj(e,"string");return Qn(t)=="symbol"?t:t+""}function Bj(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fj(e){return Array.isArray(e)&&Te(e[0])&&Te(e[1])?e.join(" ~ "):e}var Wj=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,u=o===void 0?{}:o,s=t.labelStyle,c=s===void 0?{}:s,f=t.payload,l=t.formatter,d=t.itemSorter,h=t.wrapperClassName,y=t.labelClassName,v=t.label,p=t.labelFormatter,g=t.accessibilityLayer,x=g===void 0?!1:g,w=function(){if(f&&f.length){var M={padding:0,margin:0},C=(d?Ld(f,d):f).map(function(E,k){if(E.type==="none")return null;var I=Kc({display:"block",paddingTop:4,paddingBottom:4,color:E.color||"#000"},u),R=E.formatter||l||Fj,B=E.value,F=E.name,H=B,Y=F;if(R&&H!=null&&Y!=null){var U=R(B,F,E,k,f);if(Array.isArray(U)){var X=kj(U,2);H=X[0],Y=X[1]}else H=U}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:I},Te(Y)?P.createElement("span",{className:"recharts-tooltip-item-name"},Y):null,Te(Y)?P.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,P.createElement("span",{className:"recharts-tooltip-item-value"},H),P.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:M},C)}return null},O=Kc({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),m=Kc({margin:0},c),b=!Z(v),_=b?v:"",A=J("recharts-default-tooltip",h),T=J("recharts-tooltip-label",y);b&&p&&f!==void 0&&f!==null&&(_=p(v,f));var $=x?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",hf({className:A,style:O},$),P.createElement("p",{className:T,style:m},P.isValidElement(_)?_:"".concat(_)),w())};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 Gi(e,t,r){return t=Uj(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uj(e){var t=zj(e,"string");return Jn(t)=="symbol"?t:t+""}function zj(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 En="recharts-tooltip-wrapper",Hj={visibility:"hidden"};function Gj(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return J(En,Gi(Gi(Gi(Gi({},"".concat(En,"-right"),L(r)&&t&&L(t.x)&&r>=t.x),"".concat(En,"-left"),L(r)&&t&&L(t.x)&&r<t.x),"".concat(En,"-bottom"),L(n)&&t&&L(t.y)&&n>=t.y),"".concat(En,"-top"),L(n)&&t&&L(t.y)&&n<t.y))}function Zy(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,u=e.tooltipDimension,s=e.viewBox,c=e.viewBoxDimension;if(a&&L(a[n]))return a[n];var f=r[n]-u-i,l=r[n]+i;if(t[n])return o[n]?f:l;if(o[n]){var d=f,h=s[n];return d<h?Math.max(l,s[n]):Math.max(f,s[n])}var y=l+u,v=s[n]+c;return y>v?Math.max(f,s[n]):Math.max(l,s[n])}function Kj(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 Yj(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,u=e.useTranslate3d,s=e.viewBox,c,f,l;return o.height>0&&o.width>0&&r?(f=Zy({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:s,viewBoxDimension:s.width}),l=Zy({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:s,viewBoxDimension:s.height}),c=Kj({translateX:f,translateY:l,useTranslate3d:u})):c=Hj,{cssProperties:c,cssClasses:Gj({translateX:f,translateY:l,coordinate:r})}}function Yr(e){"@babel/helpers - typeof";return Yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yr(e)}function Qy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qy(Object(r),!0).forEach(function(n){vf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xj(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,Rx(n.key),n)}}function Zj(e,t,r){return t&&Xj(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qj(e,t,r){return t=ga(t),Jj(e,Dx()?Reflect.construct(t,r||[],ga(e).constructor):t.apply(e,r))}function Jj(e,t){if(t&&(Yr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eT(e)}function eT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dx=function(){return!!e})()}function ga(e){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(e)}function tT(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&&pf(e,t)}function pf(e,t){return pf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},pf(e,t)}function vf(e,t,r){return t=Rx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rx(e){var t=rT(e,"string");return Yr(t)=="symbol"?t:t+""}function rT(e,t){if(Yr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var em=1,nT=(function(e){function t(){var r;Vj(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Qj(this,t,[].concat(i)),vf(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),vf(r,"handleKeyDown",function(o){if(o.key==="Escape"){var u,s,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(s=r.props.coordinate)===null||s===void 0?void 0:s.x)!==null&&u!==void 0?u:0,y:(c=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),r}return tT(t,e),Zj(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>em||Math.abs(n.height-this.state.lastBoundingBox.height)>em)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,c=i.children,f=i.coordinate,l=i.hasPayload,d=i.isAnimationActive,h=i.offset,y=i.position,v=i.reverseDirection,p=i.useTranslate3d,g=i.viewBox,x=i.wrapperStyle,w=Yj({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:g}),O=w.cssClasses,m=w.cssProperties,b=Jy(Jy({transition:d&&a?"transform ".concat(u,"ms ").concat(s):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&l?"visible":"hidden",position:"absolute",top:0,left:0},x);return P.createElement("div",{tabIndex:-1,className:O,style:b,ref:function(A){n.wrapperNode=A}},c)}}])})(D.PureComponent),iT=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Sr={isSsr:iT()};function Vr(e){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vr(e)}function tm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tm(Object(r),!0).forEach(function(n){Bd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oT(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,Lx(n.key),n)}}function uT(e,t,r){return t&&oT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sT(e,t,r){return t=ba(t),cT(e,qx()?Reflect.construct(t,r||[],ba(e).constructor):t.apply(e,r))}function cT(e,t){if(t&&(Vr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lT(e)}function lT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qx=function(){return!!e})()}function ba(e){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ba(e)}function fT(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&&yf(e,t)}function yf(e,t){return yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yf(e,t)}function Bd(e,t,r){return t=Lx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lx(e){var t=dT(e,"string");return Vr(t)=="symbol"?t:t+""}function dT(e,t){if(Vr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hT(e){return e.dataKey}function pT(e,t){return P.isValidElement(e)?P.cloneElement(e,t):typeof e=="function"?P.createElement(e,t):P.createElement(Wj,t)}var ct=(function(e){function t(){return aT(this,t),sT(this,t,arguments)}return fT(t,e),uT(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,u=i.animationDuration,s=i.animationEasing,c=i.content,f=i.coordinate,l=i.filterNull,d=i.isAnimationActive,h=i.offset,y=i.payload,v=i.payloadUniqBy,p=i.position,g=i.reverseDirection,x=i.useTranslate3d,w=i.viewBox,O=i.wrapperStyle,m=y??[];l&&m.length&&(m=Ex(y.filter(function(_){return _.value!=null&&(_.hide!==!0||n.props.includeHidden)}),v,hT));var b=m.length>0;return P.createElement(nT,{allowEscapeViewBox:o,animationDuration:u,animationEasing:s,isAnimationActive:d,active:a,coordinate:f,hasPayload:b,offset:h,position:p,reverseDirection:g,useTranslate3d:x,viewBox:w,wrapperStyle:O},pT(c,rm(rm({},this.props),{},{payload:m})))}}])})(D.PureComponent);Bd(ct,"displayName","Tooltip");Bd(ct,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Sr.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 Yc,nm;function vT(){if(nm)return Yc;nm=1;var e=wt(),t=function(){return e.Date.now()};return Yc=t,Yc}var Vc,im;function yT(){if(im)return Vc;im=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Vc=t,Vc}var Xc,am;function mT(){if(am)return Xc;am=1;var e=yT(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Xc=r,Xc}var Zc,om;function Bx(){if(om)return Zc;om=1;var e=mT(),t=Xt(),r=gn(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function s(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=t(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var l=a.test(c);return l||o.test(c)?u(c.slice(2),l?2:8):i.test(c)?n:+c}return Zc=s,Zc}var Qc,um;function gT(){if(um)return Qc;um=1;var e=Xt(),t=vT(),r=Bx(),n="Expected a function",i=Math.max,a=Math.min;function o(u,s,c){var f,l,d,h,y,v,p=0,g=!1,x=!1,w=!0;if(typeof u!="function")throw new TypeError(n);s=r(s)||0,e(c)&&(g=!!c.leading,x="maxWait"in c,d=x?i(r(c.maxWait)||0,s):d,w="trailing"in c?!!c.trailing:w);function O(C){var E=f,k=l;return f=l=void 0,p=C,h=u.apply(k,E),h}function m(C){return p=C,y=setTimeout(A,s),g?O(C):h}function b(C){var E=C-v,k=C-p,I=s-E;return x?a(I,d-k):I}function _(C){var E=C-v,k=C-p;return v===void 0||E>=s||E<0||x&&k>=d}function A(){var C=t();if(_(C))return T(C);y=setTimeout(A,b(C))}function T(C){return y=void 0,w&&f?O(C):(f=l=void 0,h)}function $(){y!==void 0&&clearTimeout(y),p=0,f=v=l=y=void 0}function j(){return y===void 0?h:T(t())}function M(){var C=t(),E=_(C);if(f=arguments,l=this,v=C,E){if(y===void 0)return m(v);if(x)return clearTimeout(y),y=setTimeout(A,s),O(v)}return y===void 0&&(y=setTimeout(A,s)),h}return M.cancel=$,M.flush=j,M}return Qc=o,Qc}var Jc,sm;function bT(){if(sm)return Jc;sm=1;var e=gT(),t=Xt(),r="Expected a function";function n(i,a,o){var u=!0,s=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(u="leading"in o?!!o.leading:u,s="trailing"in o?!!o.trailing:s),e(i,a,{leading:u,maxWait:a,trailing:s})}return Jc=n,Jc}var xT=bT();const Fx=se(xT);function ei(e){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(e)}function cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ki(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cm(Object(r),!0).forEach(function(n){wT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wT(e,t,r){return t=OT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OT(e){var t=_T(e,"string");return ei(t)=="symbol"?t:t+""}function _T(e,t){if(ei(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ST(e,t){return TT(e)||jT(e,t)||PT(e,t)||AT()}function AT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PT(e,t){if(e){if(typeof e=="string")return lm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lm(e,t)}}function lm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function TT(e){if(Array.isArray(e))return e}var Wx=D.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,u=e.height,s=u===void 0?"100%":u,c=e.minWidth,f=c===void 0?0:c,l=e.minHeight,d=e.maxHeight,h=e.children,y=e.debounce,v=y===void 0?0:y,p=e.id,g=e.className,x=e.onResize,w=e.style,O=w===void 0?{}:w,m=D.useRef(null),b=D.useRef();b.current=x,D.useImperativeHandle(t,function(){return Object.defineProperty(m.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),m.current},configurable:!0})});var _=D.useState({containerWidth:i.width,containerHeight:i.height}),A=ST(_,2),T=A[0],$=A[1],j=D.useCallback(function(C,E){$(function(k){var I=Math.round(C),R=Math.round(E);return k.containerWidth===I&&k.containerHeight===R?k:{containerWidth:I,containerHeight:R}})},[]);D.useEffect(function(){var C=function(F){var H,Y=F[0].contentRect,U=Y.width,X=Y.height;j(U,X),(H=b.current)===null||H===void 0||H.call(b,U,X)};v>0&&(C=Fx(C,v,{trailing:!0,leading:!1}));var E=new ResizeObserver(C),k=m.current.getBoundingClientRect(),I=k.width,R=k.height;return j(I,R),E.observe(m.current),function(){E.disconnect()}},[j,v]);var M=D.useMemo(function(){var C=T.containerWidth,E=T.containerHeight;if(C<0||E<0)return null;dt(lr(o)||lr(s),`The width(%s) and height(%s) are both fixed numbers,
|
|
7
|
+
maybe you don't need to use a ResponsiveContainer.`,o,s),dt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var k=lr(o)?C:o,I=lr(s)?E:s;r&&r>0&&(k?I=k/r:I&&(k=I*r),d&&I>d&&(I=d)),dt(k>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
8
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
9
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
10
|
+
height and width.`,k,I,o,s,f,l,r);var R=!Array.isArray(h)&&Et(h.type).endsWith("Chart");return P.Children.map(h,function(B){return P.isValidElement(B)?D.cloneElement(B,Ki({width:k,height:I},R?{style:Ki({height:"100%",width:"100%",maxHeight:I,maxWidth:k},B.props.style)}:{})):B})},[r,h,s,d,l,f,T,o]);return P.createElement("div",{id:p?"".concat(p):void 0,className:J("recharts-responsive-container",g),style:Ki(Ki({},O),{},{width:o,height:s,minWidth:f,minHeight:l,maxHeight:d}),ref:m},M)}),xo=function(t){return null};xo.displayName="Cell";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 fm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fm(Object(r),!0).forEach(function(n){ET(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ET(e,t,r){return t=MT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MT(e){var t=CT(e,"string");return ti(t)=="symbol"?t:t+""}function CT(e,t){if(ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $r={widthCache:{},cacheCount:0},$T=2e3,kT={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},dm="recharts_measurement_span";function NT(e){var t=mf({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Un=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Sr.isSsr)return{width:0,height:0};var n=NT(r),i=JSON.stringify({text:t,copyStyle:n});if($r.widthCache[i])return $r.widthCache[i];try{var a=document.getElementById(dm);a||(a=document.createElement("span"),a.setAttribute("id",dm),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=mf(mf({},kT),n);Object.assign(a.style,o),a.textContent="".concat(t);var u=a.getBoundingClientRect(),s={width:u.width,height:u.height};return $r.widthCache[i]=s,++$r.cacheCount>$T&&($r.cacheCount=0,$r.widthCache={}),s}catch{return{width:0,height:0}}},IT=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ri(e){"@babel/helpers - typeof";return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(e)}function xa(e,t){return LT(e)||qT(e,t)||RT(e,t)||DT()}function DT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RT(e,t){if(e){if(typeof e=="string")return hm(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 hm(e,t)}}function hm(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 qT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function LT(e){if(Array.isArray(e))return e}function BT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pm(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,WT(n.key),n)}}function FT(e,t,r){return t&&pm(e.prototype,t),r&&pm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WT(e){var t=UT(e,"string");return ri(t)=="symbol"?t:t+""}function UT(e,t){if(ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vm=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ym=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,zT=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,HT=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ux={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},GT=Object.keys(Ux),Ir="NaN";function KT(e,t){return e*Ux[t]}var Yi=(function(){function e(t,r){BT(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!zT.test(r)&&(this.num=NaN,this.unit=""),GT.includes(r)&&(this.num=KT(t,r),this.unit="px")}return FT(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=HT.exec(r))!==null&&n!==void 0?n:[],a=xa(i,3),o=a[1],u=a[2];return new e(parseFloat(o),u??"")}}])})();function zx(e){if(e.includes(Ir))return Ir;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=vm.exec(t))!==null&&r!==void 0?r:[],i=xa(n,4),a=i[1],o=i[2],u=i[3],s=Yi.parse(a??""),c=Yi.parse(u??""),f=o==="*"?s.multiply(c):s.divide(c);if(f.isNaN())return Ir;t=t.replace(vm,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,d=(l=ym.exec(t))!==null&&l!==void 0?l:[],h=xa(d,4),y=h[1],v=h[2],p=h[3],g=Yi.parse(y??""),x=Yi.parse(p??""),w=v==="+"?g.add(x):g.subtract(x);if(w.isNaN())return Ir;t=t.replace(ym,w.toString())}return t}var mm=/\(([^()]*)\)/;function YT(e){for(var t=e;t.includes("(");){var r=mm.exec(t),n=xa(r,2),i=n[1];t=t.replace(mm,zx(i))}return t}function VT(e){var t=e.replace(/\s+/g,"");return t=YT(t),t=zx(t),t}function XT(e){try{return VT(e)}catch{return Ir}}function el(e){var t=XT(e.slice(5,-1));return t===Ir?"":t}var ZT=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],QT=["dx","dy","angle","className","breakAll"];function gf(){return gf=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},gf.apply(this,arguments)}function gm(e,t){if(e==null)return{};var r=JT(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JT(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 bm(e,t){return nE(e)||rE(e,t)||tE(e,t)||eE()}function eE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
12
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tE(e,t){if(e){if(typeof e=="string")return xm(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 xm(e,t)}}function xm(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 rE(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function nE(e){if(Array.isArray(e))return e}var Hx=/[ \f\n\r\t\v\u2028\u2029]+/,Gx=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Z(r)||(n?a=r.toString().split(""):a=r.toString().split(Hx));var o=a.map(function(s){return{word:s,width:Un(s,i).width}}),u=n?0:Un(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}},iE=function(t,r,n,i,a){var o=t.maxLines,u=t.children,s=t.style,c=t.breakAll,f=L(o),l=u,d=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return k.reduce(function(I,R){var B=R.word,F=R.width,H=I[I.length-1];if(H&&(i==null||a||H.width+F+n<Number(i)))H.words.push(B),H.width+=F+n;else{var Y={words:[B],width:F};I.push(Y)}return I},[])},h=d(r),y=function(k){return k.reduce(function(I,R){return I.width>R.width?I:R})};if(!f)return h;for(var v="…",p=function(k){var I=l.slice(0,k),R=Gx({breakAll:c,style:s,children:I+v}).wordsWithComputedWidth,B=d(R),F=B.length>o||y(B).width>Number(i);return[F,B]},g=0,x=l.length-1,w=0,O;g<=x&&w<=l.length-1;){var m=Math.floor((g+x)/2),b=m-1,_=p(b),A=bm(_,2),T=A[0],$=A[1],j=p(m),M=bm(j,1),C=M[0];if(!T&&!C&&(g=m+1),T&&C&&(x=m-1),!T&&C){O=$;break}w++}return O||h},wm=function(t){var r=Z(t)?[]:t.toString().split(Hx);return[{words:r}]},aE=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,u=t.maxLines;if((r||n)&&!Sr.isSsr){var s,c,f=Gx({breakAll:o,children:i,style:a});if(f){var l=f.wordsWithComputedWidth,d=f.spaceWidth;s=l,c=d}else return wm(i);return iE({breakAll:o,children:i,maxLines:u,style:a},s,c,r,n)}return wm(i)},Om="#808080",br=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,u=o===void 0?"1em":o,s=t.capHeight,c=s===void 0?"0.71em":s,f=t.scaleToFit,l=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,y=t.verticalAnchor,v=y===void 0?"end":y,p=t.fill,g=p===void 0?Om:p,x=gm(t,ZT),w=D.useMemo(function(){return aE({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:l,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,l,x.style,x.width]),O=x.dx,m=x.dy,b=x.angle,_=x.className,A=x.breakAll,T=gm(x,QT);if(!Te(n)||!Te(a))return null;var $=n+(L(O)?O:0),j=a+(L(m)?m:0),M;switch(v){case"start":M=el("calc(".concat(c,")"));break;case"middle":M=el("calc(".concat((w.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:M=el("calc(".concat(w.length-1," * -").concat(u,")"));break}var C=[];if(l){var E=w[0].width,k=x.width;C.push("scale(".concat((L(k)?k/E:1)/E,")"))}return b&&C.push("rotate(".concat(b,", ").concat($,", ").concat(j,")")),C.length&&(T.transform=C.join(" ")),P.createElement("text",gf({},G(T,!0),{x:$,y:j,className:J("recharts-text",_),textAnchor:h,fill:g.includes("url")?Om:g}),w.map(function(I,R){var B=I.words.join(A?"":" ");return P.createElement("tspan",{x:$,dy:R===0?M:u,key:"".concat(B,"-").concat(R)},B)}))};function Yt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function oE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Fd(e){let t,r,n;e.length!==2?(t=Yt,r=(u,s)=>Yt(e(u),s),n=(u,s)=>e(u)-s):(t=e===Yt||e===oE?e:uE,r=e,n=e);function i(u,s,c=0,f=u.length){if(c<f){if(t(s,s)!==0)return f;do{const l=c+f>>>1;r(u[l],s)<0?c=l+1:f=l}while(c<f)}return c}function a(u,s,c=0,f=u.length){if(c<f){if(t(s,s)!==0)return f;do{const l=c+f>>>1;r(u[l],s)<=0?c=l+1:f=l}while(c<f)}return c}function o(u,s,c=0,f=u.length){const l=i(u,s,c,f-1);return l>c&&n(u[l-1],s)>-n(u[l],s)?l-1:l}return{left:i,center:o,right:a}}function uE(){return 0}function Kx(e){return e===null?NaN:+e}function*sE(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const cE=Fd(Yt),Ii=cE.right;Fd(Kx).center;class _m extends Map{constructor(t,r=dE){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Sm(this,t))}has(t){return super.has(Sm(this,t))}set(t,r){return super.set(lE(this,t),r)}delete(t){return super.delete(fE(this,t))}}function Sm({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function lE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function fE({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function dE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function hE(e=Yt){if(e===Yt)return Yx;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 Yx(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const pE=Math.sqrt(50),vE=Math.sqrt(10),yE=Math.sqrt(2);function wa(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=pE?10:a>=vE?5:a>=yE?2:1;let u,s,c;return i<0?(c=Math.pow(10,-i)/o,u=Math.round(e*c),s=Math.round(t*c),u/c<e&&++u,s/c>t&&--s,c=-c):(c=Math.pow(10,i)*o,u=Math.round(e/c),s=Math.round(t/c),u*c<e&&++u,s*c>t&&--s),s<u&&.5<=r&&r<2?wa(e,t,r*2):[u,s,c]}function bf(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?wa(t,e,r):wa(e,t,r);if(!(a>=i))return[];const u=a-i+1,s=new Array(u);if(n)if(o<0)for(let c=0;c<u;++c)s[c]=(a-c)/-o;else for(let c=0;c<u;++c)s[c]=(a-c)*o;else if(o<0)for(let c=0;c<u;++c)s[c]=(i+c)/-o;else for(let c=0;c<u;++c)s[c]=(i+c)*o;return s}function xf(e,t,r){return t=+t,e=+e,r=+r,wa(e,t,r)[2]}function wf(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?xf(t,e,r):xf(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Am(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Pm(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Vx(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?Yx:hE(i);n>r;){if(n-r>600){const s=n-r+1,c=t-r+1,f=Math.log(s),l=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*l*(s-l)/s)*(c-s/2<0?-1:1),h=Math.max(r,Math.floor(t-c*l/s+d)),y=Math.min(n,Math.floor(t+(s-c)*l/s+d));Vx(e,t,h,y,i)}const a=e[t];let o=r,u=n;for(Mn(e,r,t),i(e[n],a)>0&&Mn(e,r,n);o<u;){for(Mn(e,o,u),++o,--u;i(e[o],a)<0;)++o;for(;i(e[u],a)>0;)--u}i(e[r],a)===0?Mn(e,r,u):(++u,Mn(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Mn(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function mE(e,t,r){if(e=Float64Array.from(sE(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Pm(e);if(t>=1)return Am(e);var n,i=(n-1)*t,a=Math.floor(i),o=Am(Vx(e,a).subarray(0,a+1)),u=Pm(e.subarray(a+1));return o+(u-o)*(i-a)}}function gE(e,t,r=Kx){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return o+(u-o)*(i-a)}}function bE(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function ut(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qt(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Of=Symbol("implicit");function Wd(){var e=new _m,t=[],r=[],n=Of;function i(a){let o=e.get(a);if(o===void 0){if(n!==Of)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new _m;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Wd(t,r).unknown(n)},ut.apply(i,arguments),i}function ni(){var e=Wd().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,u=!1,s=0,c=0,f=.5;delete e.unknown;function l(){var d=t().length,h=i<n,y=h?i:n,v=h?n:i;a=(v-y)/Math.max(1,d-s+c*2),u&&(a=Math.floor(a)),y+=(v-y-a*(d-s))*f,o=a*(1-s),u&&(y=Math.round(y),o=Math.round(o));var p=bE(d).map(function(g){return y+a*g});return r(h?p.reverse():p)}return e.domain=function(d){return arguments.length?(t(d),l()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,l()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,u=!0,l()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(u=!!d,l()):u},e.padding=function(d){return arguments.length?(s=Math.min(1,c=+d),l()):s},e.paddingInner=function(d){return arguments.length?(s=Math.min(1,d),l()):s},e.paddingOuter=function(d){return arguments.length?(c=+d,l()):c},e.align=function(d){return arguments.length?(f=Math.max(0,Math.min(1,d)),l()):f},e.copy=function(){return ni(t(),[n,i]).round(u).paddingInner(s).paddingOuter(c).align(f)},ut.apply(l(),arguments)}function Xx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Xx(t())},e}function zn(){return Xx(ni.apply(null,arguments).paddingInner(1))}function Ud(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Zx(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Di(){}var ii=.7,Oa=1/ii,Wr="\\s*([+-]?\\d+)\\s*",ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xE=/^#([0-9a-f]{3,8})$/,wE=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),OE=new RegExp(`^rgb\\(${yt},${yt},${yt}\\)$`),_E=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${ai}\\)$`),SE=new RegExp(`^rgba\\(${yt},${yt},${yt},${ai}\\)$`),AE=new RegExp(`^hsl\\(${ai},${yt},${yt}\\)$`),PE=new RegExp(`^hsla\\(${ai},${yt},${yt},${ai}\\)$`),jm={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};Ud(Di,oi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tm,formatHex:Tm,formatHex8:jE,formatHsl:TE,formatRgb:Em,toString:Em});function Tm(){return this.rgb().formatHex()}function jE(){return this.rgb().formatHex8()}function TE(){return Qx(this).formatHsl()}function Em(){return this.rgb().formatRgb()}function oi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xE.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Mm(t):r===3?new He(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Vi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Vi(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=wE.exec(e))?new He(t[1],t[2],t[3],1):(t=OE.exec(e))?new He(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_E.exec(e))?Vi(t[1],t[2],t[3],t[4]):(t=SE.exec(e))?Vi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=AE.exec(e))?km(t[1],t[2]/100,t[3]/100,1):(t=PE.exec(e))?km(t[1],t[2]/100,t[3]/100,t[4]):jm.hasOwnProperty(e)?Mm(jm[e]):e==="transparent"?new He(NaN,NaN,NaN,0):null}function Mm(e){return new He(e>>16&255,e>>8&255,e&255,1)}function Vi(e,t,r,n){return n<=0&&(e=t=r=NaN),new He(e,t,r,n)}function EE(e){return e instanceof Di||(e=oi(e)),e?(e=e.rgb(),new He(e.r,e.g,e.b,e.opacity)):new He}function _f(e,t,r,n){return arguments.length===1?EE(e):new He(e,t,r,n??1)}function He(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Ud(He,_f,Zx(Di,{brighter(e){return e=e==null?Oa:Math.pow(Oa,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ii:Math.pow(ii,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new He(vr(this.r),vr(this.g),vr(this.b),_a(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:Cm,formatHex:Cm,formatHex8:ME,formatRgb:$m,toString:$m}));function Cm(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}`}function ME(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}${fr((isNaN(this.opacity)?1:this.opacity)*255)}`}function $m(){const e=_a(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function _a(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fr(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function km(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ft(e,t,r,n)}function Qx(e){if(e instanceof ft)return new ft(e.h,e.s,e.l,e.opacity);if(e instanceof Di||(e=oi(e)),!e)return new ft;if(e instanceof ft)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,u=a-i,s=(a+i)/2;return u?(t===a?o=(r-n)/u+(r<n)*6:r===a?o=(n-t)/u+2:o=(t-r)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new ft(o,u,s,e.opacity)}function CE(e,t,r,n){return arguments.length===1?Qx(e):new ft(e,t,r,n??1)}function ft(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ud(ft,CE,Zx(Di,{brighter(e){return e=e==null?Oa:Math.pow(Oa,e),new ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ii:Math.pow(ii,e),new ft(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,i=2*r-n;return new He(tl(e>=240?e-240:e+120,i,n),tl(e,i,n),tl(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ft(Nm(this.h),Xi(this.s),Xi(this.l),_a(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=_a(this.opacity);return`${e===1?"hsl(":"hsla("}${Nm(this.h)}, ${Xi(this.s)*100}%, ${Xi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nm(e){return e=(e||0)%360,e<0?e+360:e}function Xi(e){return Math.max(0,Math.min(1,e||0))}function tl(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 zd=e=>()=>e;function $E(e,t){return function(r){return e+r*t}}function kE(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 NE(e){return(e=+e)==1?Jx:function(t,r){return r-t?kE(t,r,e):zd(isNaN(t)?r:t)}}function Jx(e,t){var r=t-e;return r?$E(e,r):zd(isNaN(e)?t:e)}const Im=(function e(t){var r=NE(t);function n(i,a){var o=r((i=_f(i)).r,(a=_f(a)).r),u=r(i.g,a.g),s=r(i.b,a.b),c=Jx(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=u(f),i.b=s(f),i.opacity=c(f),i+""}}return n.gamma=e,n})(1);function IE(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function DE(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function RE(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=_n(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(u){for(o=0;o<n;++o)a[o]=i[o](u);return a}}function qE(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Sa(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function LE(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=_n(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Sf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rl=new RegExp(Sf.source,"g");function BE(e){return function(){return e}}function FE(e){return function(t){return e(t)+""}}function WE(e,t){var r=Sf.lastIndex=rl.lastIndex=0,n,i,a,o=-1,u=[],s=[];for(e=e+"",t=t+"";(n=Sf.exec(e))&&(i=rl.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),u[o]?u[o]+=a:u[++o]=a),(n=n[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:Sa(n,i)})),r=rl.lastIndex;return r<t.length&&(a=t.slice(r),u[o]?u[o]+=a:u[++o]=a),u.length<2?s[0]?FE(s[0].x):BE(t):(t=s.length,function(c){for(var f=0,l;f<t;++f)u[(l=s[f]).i]=l.x(c);return u.join("")})}function _n(e,t){var r=typeof t,n;return t==null||r==="boolean"?zd(t):(r==="number"?Sa:r==="string"?(n=oi(t))?(t=n,Im):WE:t instanceof oi?Im:t instanceof Date?qE:DE(t)?IE:Array.isArray(t)?RE:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?LE:Sa)(e,t)}function Hd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function UE(e,t){t===void 0&&(t=e,e=_n);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var u=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[u](o-u)}}function zE(e){return function(){return e}}function Aa(e){return+e}var Dm=[0,1];function Fe(e){return e}function Af(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:zE(isNaN(t)?NaN:.5)}function HE(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function GE(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=Af(i,n),a=r(o,a)):(n=Af(n,i),a=r(a,o)),function(u){return a(n(u))}}function KE(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=Af(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(u){var s=Ii(e,u,1,n)-1;return a[s](i[s](u))}}function Ri(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wo(){var e=Dm,t=Dm,r=_n,n,i,a,o=Fe,u,s,c;function f(){var d=Math.min(e.length,t.length);return o!==Fe&&(o=HE(e[0],e[d-1])),u=d>2?KE:GE,s=c=null,l}function l(d){return d==null||isNaN(d=+d)?a:(s||(s=u(e.map(n),t,r)))(n(o(d)))}return l.invert=function(d){return o(i((c||(c=u(t,e.map(n),Sa)))(d)))},l.domain=function(d){return arguments.length?(e=Array.from(d,Aa),f()):e.slice()},l.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},l.rangeRound=function(d){return t=Array.from(d),r=Hd,f()},l.clamp=function(d){return arguments.length?(o=d?!0:Fe,f()):o!==Fe},l.interpolate=function(d){return arguments.length?(r=d,f()):r},l.unknown=function(d){return arguments.length?(a=d,l):a},function(d,h){return n=d,i=h,f()}}function Gd(){return wo()(Fe,Fe)}function YE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Pa(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 Xr(e){return e=Pa(Math.abs(e)),e?e[1]:NaN}function VE(e,t){return function(r,n){for(var i=r.length,a=[],o=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(r.substring(i-=u,i+u)),!((s+=u+1)>n));)u=e[o=(o+1)%e.length];return a.reverse().join(t)}}function XE(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var ZE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ui(e){if(!(t=ZE.exec(e)))throw new Error("invalid format: "+e);var t;return new Kd({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]})}ui.prototype=Kd.prototype;function Kd(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+""}Kd.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 QE(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var ew;function JE(e,t){var r=Pa(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(ew=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Pa(e,Math.max(0,t+a-1))[0]}function Rm(e,t){var r=Pa(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const qm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:YE,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:JE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Lm(e){return e}var Bm=Array.prototype.map,Fm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eM(e){var t=e.grouping===void 0||e.thousands===void 0?Lm:VE(Bm.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Lm:XE(Bm.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function c(l){l=ui(l);var d=l.fill,h=l.align,y=l.sign,v=l.symbol,p=l.zero,g=l.width,x=l.comma,w=l.precision,O=l.trim,m=l.type;m==="n"?(x=!0,m="g"):qm[m]||(w===void 0&&(w=12),O=!0,m="g"),(p||d==="0"&&h==="=")&&(p=!0,d="0",h="=");var b=v==="$"?r:v==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",_=v==="$"?n:/[%p]/.test(m)?o:"",A=qm[m],T=/[defgprs%]/.test(m);w=w===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function $(j){var M=b,C=_,E,k,I;if(m==="c")C=A(j)+C,j="";else{j=+j;var R=j<0||1/j<0;if(j=isNaN(j)?s:A(Math.abs(j),w),O&&(j=QE(j)),R&&+j==0&&y!=="+"&&(R=!1),M=(R?y==="("?y:u:y==="-"||y==="("?"":y)+M,C=(m==="s"?Fm[8+ew/3]:"")+C+(R&&y==="("?")":""),T){for(E=-1,k=j.length;++E<k;)if(I=j.charCodeAt(E),48>I||I>57){C=(I===46?i+j.slice(E+1):j.slice(E))+C,j=j.slice(0,E);break}}}x&&!p&&(j=t(j,1/0));var B=M.length+j.length+C.length,F=B<g?new Array(g-B+1).join(d):"";switch(x&&p&&(j=t(F+j,F.length?g-C.length:1/0),F=""),h){case"<":j=M+j+C+F;break;case"=":j=M+F+j+C;break;case"^":j=F.slice(0,B=F.length>>1)+M+j+C+F.slice(B);break;default:j=F+M+j+C;break}return a(j)}return $.toString=function(){return l+""},$}function f(l,d){var h=c((l=ui(l),l.type="f",l)),y=Math.max(-8,Math.min(8,Math.floor(Xr(d)/3)))*3,v=Math.pow(10,-y),p=Fm[8+y/3];return function(g){return h(v*g)+p}}return{format:c,formatPrefix:f}}var Zi,Yd,tw;tM({thousands:",",grouping:[3],currency:["$",""]});function tM(e){return Zi=eM(e),Yd=Zi.format,tw=Zi.formatPrefix,Zi}function rM(e){return Math.max(0,-Xr(Math.abs(e)))}function nM(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xr(t)/3)))*3-Xr(Math.abs(e)))}function iM(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xr(t)-Xr(e))+1}function rw(e,t,r,n){var i=wf(e,t,r),a;switch(n=ui(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=nM(i,o))&&(n.precision=a),tw(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=iM(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=rM(i))&&(n.precision=a-(n.type==="%")*2);break}}return Yd(n)}function Zt(e){var t=e.domain;return e.ticks=function(r){var n=t();return bf(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return rw(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],u=n[a],s,c,f=10;for(u<o&&(c=o,o=u,u=c,c=i,i=a,a=c);f-- >0;){if(c=xf(o,u,r),c===s)return n[i]=o,n[a]=u,t(n);if(c>0)o=Math.floor(o/c)*c,u=Math.ceil(u/c)*c;else if(c<0)o=Math.ceil(o*c)/c,u=Math.floor(u*c)/c;else break;s=c}return e},e}function ja(){var e=Gd();return e.copy=function(){return Ri(e,ja())},ut.apply(e,arguments),Zt(e)}function nw(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,Aa),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return nw(e).unknown(t)},e=arguments.length?Array.from(e,Aa):[0,1],Zt(r)}function iw(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function Wm(e){return Math.log(e)}function Um(e){return Math.exp(e)}function aM(e){return-Math.log(-e)}function oM(e){return-Math.exp(-e)}function uM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function sM(e){return e===10?uM:e===Math.E?Math.exp:t=>Math.pow(e,t)}function cM(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 zm(e){return(t,r)=>-e(-t,r)}function Vd(e){const t=e(Wm,Um),r=t.domain;let n=10,i,a;function o(){return i=cM(n),a=sM(n),r()[0]<0?(i=zm(i),a=zm(a),e(aM,oM)):e(Wm,Um),t}return t.base=function(u){return arguments.length?(n=+u,o()):n},t.domain=function(u){return arguments.length?(r(u),o()):r()},t.ticks=u=>{const s=r();let c=s[0],f=s[s.length-1];const l=f<c;l&&([c,f]=[f,c]);let d=i(c),h=i(f),y,v;const p=u==null?10:+u;let g=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/a(-d):y*a(d),!(v<c)){if(v>f)break;g.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/a(-d):y*a(d),!(v<c)){if(v>f)break;g.push(v)}g.length*2<p&&(g=bf(c,f,p))}else g=bf(d,h,Math.min(h-d,p)).map(a);return l?g.reverse():g},t.tickFormat=(u,s)=>{if(u==null&&(u=10),s==null&&(s=n===10?"s":","),typeof s!="function"&&(!(n%1)&&(s=ui(s)).precision==null&&(s.trim=!0),s=Yd(s)),u===1/0)return s;const c=Math.max(1,n*u/t.ticks().length);return f=>{let l=f/a(Math.round(i(f)));return l*n<n-.5&&(l*=n),l<=c?s(f):""}},t.nice=()=>r(iw(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function aw(){const e=Vd(wo()).domain([1,10]);return e.copy=()=>Ri(e,aw()).base(e.base()),ut.apply(e,arguments),e}function Hm(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 Xd(e){var t=1,r=e(Hm(t),Gm(t));return r.constant=function(n){return arguments.length?e(Hm(t=+n),Gm(t)):t},Zt(r)}function ow(){var e=Xd(wo());return e.copy=function(){return Ri(e,ow()).constant(e.constant())},ut.apply(e,arguments)}function Km(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function lM(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fM(e){return e<0?-e*e:e*e}function Zd(e){var t=e(Fe,Fe),r=1;function n(){return r===1?e(Fe,Fe):r===.5?e(lM,fM):e(Km(r),Km(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Zt(t)}function Qd(){var e=Zd(wo());return e.copy=function(){return Ri(e,Qd()).exponent(e.exponent())},ut.apply(e,arguments),e}function dM(){return Qd.apply(null,arguments).exponent(.5)}function Ym(e){return Math.sign(e)*e*e}function hM(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uw(){var e=Gd(),t=[0,1],r=!1,n;function i(a){var o=hM(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(Ym(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Aa)).map(Ym)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return uw(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ut.apply(i,arguments),Zt(i)}function sw(){var e=[],t=[],r=[],n;function i(){var o=0,u=Math.max(1,t.length);for(r=new Array(u-1);++o<u;)r[o-1]=gE(e,o/u);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Ii(r,o)]}return a.invertExtent=function(o){var u=t.indexOf(o);return u<0?[NaN,NaN]:[u>0?r[u-1]:e[0],u<r.length?r[u]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let u of o)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Yt),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return sw().domain(e).range(t).unknown(n)},ut.apply(a,arguments)}function cw(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(s){return s!=null&&s<=s?i[Ii(n,s,0,r)]:a}function u(){var s=-1;for(n=new Array(r);++s<r;)n[s]=((s+1)*t-(s-r)*e)/(r+1);return o}return o.domain=function(s){return arguments.length?([e,t]=s,e=+e,t=+t,u()):[e,t]},o.range=function(s){return arguments.length?(r=(i=Array.from(s)).length-1,u()):i.slice()},o.invertExtent=function(s){var c=i.indexOf(s);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return n.slice()},o.copy=function(){return cw().domain([e,t]).range(i).unknown(a)},ut.apply(Zt(o),arguments)}function lw(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Ii(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return lw().domain(e).range(t).unknown(r)},ut.apply(i,arguments)}const nl=new Date,il=new Date;function Ee(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),u=i.ceil(a);return a-o<u-a?o:u},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,u)=>{const s=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<o)||!(u>0))return s;let c;do s.push(c=new Date(+a)),t(a,u),e(a);while(c<a&&a<o);return s},i.filter=a=>Ee(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,u)=>{if(o>=o)if(u<0)for(;++u<=0;)for(;t(o,-1),!a(o););else for(;--u>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(nl.setTime(+a),il.setTime(+o),e(nl),e(il),Math.floor(r(nl,il))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Ta=Ee(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ta.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ee(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ta);Ta.range;const Pt=1e3,it=Pt*60,jt=it*60,$t=jt*24,Jd=$t*7,Vm=$t*30,al=$t*365,dr=Ee(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCSeconds());dr.range;const eh=Ee(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Pt)},(e,t)=>{e.setTime(+e+t*it)},(e,t)=>(t-e)/it,e=>e.getMinutes());eh.range;const th=Ee(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*it)},(e,t)=>(t-e)/it,e=>e.getUTCMinutes());th.range;const rh=Ee(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Pt-e.getMinutes()*it)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getHours());rh.range;const nh=Ee(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*jt)},(e,t)=>(t-e)/jt,e=>e.getUTCHours());nh.range;const qi=Ee(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*it)/$t,e=>e.getDate()-1);qi.range;const Oo=Ee(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$t,e=>e.getUTCDate()-1);Oo.range;const fw=Ee(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$t,e=>Math.floor(e/$t));fw.range;function Ar(e){return Ee(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())*it)/Jd)}const _o=Ar(0),Ea=Ar(1),pM=Ar(2),vM=Ar(3),Zr=Ar(4),yM=Ar(5),mM=Ar(6);_o.range;Ea.range;pM.range;vM.range;Zr.range;yM.range;mM.range;function Pr(e){return Ee(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)/Jd)}const So=Pr(0),Ma=Pr(1),gM=Pr(2),bM=Pr(3),Qr=Pr(4),xM=Pr(5),wM=Pr(6);So.range;Ma.range;gM.range;bM.range;Qr.range;xM.range;wM.range;const ih=Ee(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());ih.range;const ah=Ee(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());ah.range;const kt=Ee(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());kt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ee(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)});kt.range;const Nt=Ee(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());Nt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ee(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)});Nt.range;function dw(e,t,r,n,i,a){const o=[[dr,1,Pt],[dr,5,5*Pt],[dr,15,15*Pt],[dr,30,30*Pt],[a,1,it],[a,5,5*it],[a,15,15*it],[a,30,30*it],[i,1,jt],[i,3,3*jt],[i,6,6*jt],[i,12,12*jt],[n,1,$t],[n,2,2*$t],[r,1,Jd],[t,1,Vm],[t,3,3*Vm],[e,1,al]];function u(c,f,l){const d=f<c;d&&([c,f]=[f,c]);const h=l&&typeof l.range=="function"?l:s(c,f,l),y=h?h.range(c,+f+1):[];return d?y.reverse():y}function s(c,f,l){const d=Math.abs(f-c)/l,h=Fd(([,,p])=>p).right(o,d);if(h===o.length)return e.every(wf(c/al,f/al,l));if(h===0)return Ta.every(Math.max(wf(c,f,l),1));const[y,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return y.every(v)}return[u,s]}const[OM,_M]=dw(Nt,ah,So,fw,nh,th),[SM,AM]=dw(kt,ih,_o,qi,rh,eh);function ol(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 ul(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Cn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function PM(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,u=e.months,s=e.shortMonths,c=$n(i),f=kn(i),l=$n(a),d=kn(a),h=$n(o),y=kn(o),v=$n(u),p=kn(u),g=$n(s),x=kn(s),w={a:R,A:B,b:F,B:H,c:null,d:tg,e:tg,f:VM,g:aC,G:uC,H:GM,I:KM,j:YM,L:hw,m:XM,M:ZM,p:Y,q:U,Q:ig,s:ag,S:QM,u:JM,U:eC,V:tC,w:rC,W:nC,x:null,X:null,y:iC,Y:oC,Z:sC,"%":ng},O={a:X,A:he,b:ge,B:Ke,c:null,d:rg,e:rg,f:dC,g:OC,G:SC,H:cC,I:lC,j:fC,L:vw,m:hC,M:pC,p:er,q:We,Q:ig,s:ag,S:vC,u:yC,U:mC,V:gC,w:bC,W:xC,x:null,X:null,y:wC,Y:_C,Z:AC,"%":ng},m={a:$,A:j,b:M,B:C,c:E,d:Jm,e:Jm,f:WM,g:Qm,G:Zm,H:eg,I:eg,j:qM,L:FM,m:RM,M:LM,p:T,q:DM,Q:zM,s:HM,S:BM,u:CM,U:$M,V:kM,w:MM,W:NM,x:k,X:I,y:Qm,Y:Zm,Z:IM,"%":UM};w.x=b(r,w),w.X=b(n,w),w.c=b(t,w),O.x=b(r,O),O.X=b(n,O),O.c=b(t,O);function b(W,Q){return function(ee){var q=[],ye=-1,re=0,_e=W.length,Se,Ue,Bt;for(ee instanceof Date||(ee=new Date(+ee));++ye<_e;)W.charCodeAt(ye)===37&&(q.push(W.slice(re,ye)),(Ue=Xm[Se=W.charAt(++ye)])!=null?Se=W.charAt(++ye):Ue=Se==="e"?" ":"0",(Bt=Q[Se])&&(Se=Bt(ee,Ue)),q.push(Se),re=ye+1);return q.push(W.slice(re,ye)),q.join("")}}function _(W,Q){return function(ee){var q=Cn(1900,void 0,1),ye=A(q,W,ee+="",0),re,_e;if(ye!=ee.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(Q&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(re=ul(Cn(q.y,0,1)),_e=re.getUTCDay(),re=_e>4||_e===0?Ma.ceil(re):Ma(re),re=Oo.offset(re,(q.V-1)*7),q.y=re.getUTCFullYear(),q.m=re.getUTCMonth(),q.d=re.getUTCDate()+(q.w+6)%7):(re=ol(Cn(q.y,0,1)),_e=re.getDay(),re=_e>4||_e===0?Ea.ceil(re):Ea(re),re=qi.offset(re,(q.V-1)*7),q.y=re.getFullYear(),q.m=re.getMonth(),q.d=re.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),_e="Z"in q?ul(Cn(q.y,0,1)).getUTCDay():ol(Cn(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(_e+5)%7:q.w+q.U*7-(_e+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,ul(q)):ol(q)}}function A(W,Q,ee,q){for(var ye=0,re=Q.length,_e=ee.length,Se,Ue;ye<re;){if(q>=_e)return-1;if(Se=Q.charCodeAt(ye++),Se===37){if(Se=Q.charAt(ye++),Ue=m[Se in Xm?Q.charAt(ye++):Se],!Ue||(q=Ue(W,ee,q))<0)return-1}else if(Se!=ee.charCodeAt(q++))return-1}return q}function T(W,Q,ee){var q=c.exec(Q.slice(ee));return q?(W.p=f.get(q[0].toLowerCase()),ee+q[0].length):-1}function $(W,Q,ee){var q=h.exec(Q.slice(ee));return q?(W.w=y.get(q[0].toLowerCase()),ee+q[0].length):-1}function j(W,Q,ee){var q=l.exec(Q.slice(ee));return q?(W.w=d.get(q[0].toLowerCase()),ee+q[0].length):-1}function M(W,Q,ee){var q=g.exec(Q.slice(ee));return q?(W.m=x.get(q[0].toLowerCase()),ee+q[0].length):-1}function C(W,Q,ee){var q=v.exec(Q.slice(ee));return q?(W.m=p.get(q[0].toLowerCase()),ee+q[0].length):-1}function E(W,Q,ee){return A(W,t,Q,ee)}function k(W,Q,ee){return A(W,r,Q,ee)}function I(W,Q,ee){return A(W,n,Q,ee)}function R(W){return o[W.getDay()]}function B(W){return a[W.getDay()]}function F(W){return s[W.getMonth()]}function H(W){return u[W.getMonth()]}function Y(W){return i[+(W.getHours()>=12)]}function U(W){return 1+~~(W.getMonth()/3)}function X(W){return o[W.getUTCDay()]}function he(W){return a[W.getUTCDay()]}function ge(W){return s[W.getUTCMonth()]}function Ke(W){return u[W.getUTCMonth()]}function er(W){return i[+(W.getUTCHours()>=12)]}function We(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Q=b(W+="",w);return Q.toString=function(){return W},Q},parse:function(W){var Q=_(W+="",!1);return Q.toString=function(){return W},Q},utcFormat:function(W){var Q=b(W+="",O);return Q.toString=function(){return W},Q},utcParse:function(W){var Q=_(W+="",!0);return Q.toString=function(){return W},Q}}}var Xm={"-":"",_:" ",0:"0"},$e=/^\s*\d+/,jM=/^%/,TM=/[\\^$*+?|[\]().{}]/g;function ne(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function EM(e){return e.replace(TM,"\\$&")}function $n(e){return new RegExp("^(?:"+e.map(EM).join("|")+")","i")}function kn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function MM(e,t,r){var n=$e.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function CM(e,t,r){var n=$e.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function $M(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function kM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function NM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Zm(e,t,r){var n=$e.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Qm(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function IM(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 DM(e,t,r){var n=$e.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function RM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Jm(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function qM(e,t,r){var n=$e.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function eg(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function LM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function BM(e,t,r){var n=$e.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function FM(e,t,r){var n=$e.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function WM(e,t,r){var n=$e.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function UM(e,t,r){var n=jM.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zM(e,t,r){var n=$e.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function HM(e,t,r){var n=$e.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function tg(e,t){return ne(e.getDate(),t,2)}function GM(e,t){return ne(e.getHours(),t,2)}function KM(e,t){return ne(e.getHours()%12||12,t,2)}function YM(e,t){return ne(1+qi.count(kt(e),e),t,3)}function hw(e,t){return ne(e.getMilliseconds(),t,3)}function VM(e,t){return hw(e,t)+"000"}function XM(e,t){return ne(e.getMonth()+1,t,2)}function ZM(e,t){return ne(e.getMinutes(),t,2)}function QM(e,t){return ne(e.getSeconds(),t,2)}function JM(e){var t=e.getDay();return t===0?7:t}function eC(e,t){return ne(_o.count(kt(e)-1,e),t,2)}function pw(e){var t=e.getDay();return t>=4||t===0?Zr(e):Zr.ceil(e)}function tC(e,t){return e=pw(e),ne(Zr.count(kt(e),e)+(kt(e).getDay()===4),t,2)}function rC(e){return e.getDay()}function nC(e,t){return ne(Ea.count(kt(e)-1,e),t,2)}function iC(e,t){return ne(e.getFullYear()%100,t,2)}function aC(e,t){return e=pw(e),ne(e.getFullYear()%100,t,2)}function oC(e,t){return ne(e.getFullYear()%1e4,t,4)}function uC(e,t){var r=e.getDay();return e=r>=4||r===0?Zr(e):Zr.ceil(e),ne(e.getFullYear()%1e4,t,4)}function sC(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ne(t/60|0,"0",2)+ne(t%60,"0",2)}function rg(e,t){return ne(e.getUTCDate(),t,2)}function cC(e,t){return ne(e.getUTCHours(),t,2)}function lC(e,t){return ne(e.getUTCHours()%12||12,t,2)}function fC(e,t){return ne(1+Oo.count(Nt(e),e),t,3)}function vw(e,t){return ne(e.getUTCMilliseconds(),t,3)}function dC(e,t){return vw(e,t)+"000"}function hC(e,t){return ne(e.getUTCMonth()+1,t,2)}function pC(e,t){return ne(e.getUTCMinutes(),t,2)}function vC(e,t){return ne(e.getUTCSeconds(),t,2)}function yC(e){var t=e.getUTCDay();return t===0?7:t}function mC(e,t){return ne(So.count(Nt(e)-1,e),t,2)}function yw(e){var t=e.getUTCDay();return t>=4||t===0?Qr(e):Qr.ceil(e)}function gC(e,t){return e=yw(e),ne(Qr.count(Nt(e),e)+(Nt(e).getUTCDay()===4),t,2)}function bC(e){return e.getUTCDay()}function xC(e,t){return ne(Ma.count(Nt(e)-1,e),t,2)}function wC(e,t){return ne(e.getUTCFullYear()%100,t,2)}function OC(e,t){return e=yw(e),ne(e.getUTCFullYear()%100,t,2)}function _C(e,t){return ne(e.getUTCFullYear()%1e4,t,4)}function SC(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Qr(e):Qr.ceil(e),ne(e.getUTCFullYear()%1e4,t,4)}function AC(){return"+0000"}function ng(){return"%"}function ig(e){return+e}function ag(e){return Math.floor(+e/1e3)}var kr,mw,gw;PC({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 PC(e){return kr=PM(e),mw=kr.format,kr.parse,gw=kr.utcFormat,kr.utcParse,kr}function jC(e){return new Date(e)}function TC(e){return e instanceof Date?+e:+new Date(+e)}function oh(e,t,r,n,i,a,o,u,s,c){var f=Gd(),l=f.invert,d=f.domain,h=c(".%L"),y=c(":%S"),v=c("%I:%M"),p=c("%I %p"),g=c("%a %d"),x=c("%b %d"),w=c("%B"),O=c("%Y");function m(b){return(s(b)<b?h:u(b)<b?y:o(b)<b?v:a(b)<b?p:n(b)<b?i(b)<b?g:x:r(b)<b?w:O)(b)}return f.invert=function(b){return new Date(l(b))},f.domain=function(b){return arguments.length?d(Array.from(b,TC)):d().map(jC)},f.ticks=function(b){var _=d();return e(_[0],_[_.length-1],b??10)},f.tickFormat=function(b,_){return _==null?m:c(_)},f.nice=function(b){var _=d();return(!b||typeof b.range!="function")&&(b=t(_[0],_[_.length-1],b??10)),b?d(iw(_,b)):f},f.copy=function(){return Ri(f,oh(e,t,r,n,i,a,o,u,s,c))},f}function EC(){return ut.apply(oh(SM,AM,kt,ih,_o,qi,rh,eh,dr,mw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MC(){return ut.apply(oh(OM,_M,Nt,ah,So,Oo,nh,th,dr,gw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ao(){var e=0,t=1,r,n,i,a,o=Fe,u=!1,s;function c(l){return l==null||isNaN(l=+l)?s:o(i===0?.5:(l=(a(l)-r)*i,u?Math.max(0,Math.min(1,l)):l))}c.domain=function(l){return arguments.length?([e,t]=l,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(l){return arguments.length?(u=!!l,c):u},c.interpolator=function(l){return arguments.length?(o=l,c):o};function f(l){return function(d){var h,y;return arguments.length?([h,y]=d,o=l(h,y),c):[o(0),o(1)]}}return c.range=f(_n),c.rangeRound=f(Hd),c.unknown=function(l){return arguments.length?(s=l,c):s},function(l){return a=l,r=l(e),n=l(t),i=r===n?0:1/(n-r),c}}function Qt(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function bw(){var e=Zt(Ao()(Fe));return e.copy=function(){return Qt(e,bw())},qt.apply(e,arguments)}function xw(){var e=Vd(Ao()).domain([1,10]);return e.copy=function(){return Qt(e,xw()).base(e.base())},qt.apply(e,arguments)}function ww(){var e=Xd(Ao());return e.copy=function(){return Qt(e,ww()).constant(e.constant())},qt.apply(e,arguments)}function uh(){var e=Zd(Ao());return e.copy=function(){return Qt(e,uh()).exponent(e.exponent())},qt.apply(e,arguments)}function CC(){return uh.apply(null,arguments).exponent(.5)}function Ow(){var e=[],t=Fe;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ii(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Yt),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>mE(e,a/n))},r.copy=function(){return Ow(t).domain(e)},qt.apply(r,arguments)}function Po(){var e=0,t=.5,r=1,n=1,i,a,o,u,s,c=Fe,f,l=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+f(v))-a)*(n*v<n*a?u:s),c(l?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,r]=v,i=f(e=+e),a=f(t=+t),o=f(r=+r),u=i===a?0:.5/(a-i),s=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(v){return arguments.length?(l=!!v,h):l},h.interpolator=function(v){return arguments.length?(c=v,h):c};function y(v){return function(p){var g,x,w;return arguments.length?([g,x,w]=p,c=UE(v,[g,x,w]),h):[c(0),c(.5),c(1)]}}return h.range=y(_n),h.rangeRound=y(Hd),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return f=v,i=v(e),a=v(t),o=v(r),u=i===a?0:.5/(a-i),s=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function _w(){var e=Zt(Po()(Fe));return e.copy=function(){return Qt(e,_w())},qt.apply(e,arguments)}function Sw(){var e=Vd(Po()).domain([.1,1,10]);return e.copy=function(){return Qt(e,Sw()).base(e.base())},qt.apply(e,arguments)}function Aw(){var e=Xd(Po());return e.copy=function(){return Qt(e,Aw()).constant(e.constant())},qt.apply(e,arguments)}function sh(){var e=Zd(Po());return e.copy=function(){return Qt(e,sh()).exponent(e.exponent())},qt.apply(e,arguments)}function $C(){return sh.apply(null,arguments).exponent(.5)}const og=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ni,scaleDiverging:_w,scaleDivergingLog:Sw,scaleDivergingPow:sh,scaleDivergingSqrt:$C,scaleDivergingSymlog:Aw,scaleIdentity:nw,scaleImplicit:Of,scaleLinear:ja,scaleLog:aw,scaleOrdinal:Wd,scalePoint:zn,scalePow:Qd,scaleQuantile:sw,scaleQuantize:cw,scaleRadial:uw,scaleSequential:bw,scaleSequentialLog:xw,scaleSequentialPow:uh,scaleSequentialQuantile:Ow,scaleSequentialSqrt:CC,scaleSequentialSymlog:ww,scaleSqrt:dM,scaleSymlog:ow,scaleThreshold:lw,scaleTime:EC,scaleUtc:MC,tickFormat:rw},Symbol.toStringTag,{value:"Module"}));var sl,ug;function jo(){if(ug)return sl;ug=1;var e=gn();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var u=r[a],s=n(u);if(s!=null&&(c===void 0?s===s&&!e(s):i(s,c)))var c=s,f=u}return f}return sl=t,sl}var cl,sg;function Pw(){if(sg)return cl;sg=1;function e(t,r){return t>r}return cl=e,cl}var ll,cg;function kC(){if(cg)return ll;cg=1;var e=jo(),t=Pw(),r=On();function n(i){return i&&i.length?e(i,r,t):void 0}return ll=n,ll}var NC=kC();const Gt=se(NC);var fl,lg;function jw(){if(lg)return fl;lg=1;function e(t,r){return t<r}return fl=e,fl}var dl,fg;function IC(){if(fg)return dl;fg=1;var e=jo(),t=jw(),r=On();function n(i){return i&&i.length?e(i,r,t):void 0}return dl=n,dl}var DC=IC();const To=se(DC);var hl,dg;function RC(){if(dg)return hl;dg=1;var e=Sd(),t=Ot(),r=Nx(),n=Ge();function i(a,o){var u=n(a)?e:r;return u(a,t(o,3))}return hl=i,hl}var pl,hg;function qC(){if(hg)return pl;hg=1;var e=$x(),t=RC();function r(n,i){return e(t(n,i),1)}return pl=r,pl}var LC=qC();const BC=se(LC);var vl,pg;function FC(){if(pg)return vl;pg=1;var e=Rd();function t(r,n){return e(r,n)}return vl=t,vl}var WC=FC();const Jr=se(WC);var Sn=1e9,UC={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},lh,ve=!0,ot="[DecimalError] ",yr=ot+"Invalid argument: ",ch=ot+"Exponent out of range: ",An=Math.floor,sr=Math.pow,zC=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Xe,Me=1e7,pe=7,Tw=9007199254740991,Ca=An(Tw/pe),z={};z.absoluteValue=z.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};z.comparedTo=z.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};z.decimalPlaces=z.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*pe;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};z.dividedBy=z.div=function(e){return Mt(this,new this.constructor(e))};z.dividedToIntegerBy=z.idiv=function(e){var t=this,r=t.constructor;return ce(Mt(t,new r(e),0,1),r.precision)};z.equals=z.eq=function(e){return!this.cmp(e)};z.exponent=function(){return we(this)};z.greaterThan=z.gt=function(e){return this.cmp(e)>0};z.greaterThanOrEqualTo=z.gte=function(e){return this.cmp(e)>=0};z.isInteger=z.isint=function(){return this.e>this.d.length-2};z.isNegative=z.isneg=function(){return this.s<0};z.isPositive=z.ispos=function(){return this.s>0};z.isZero=function(){return this.s===0};z.lessThan=z.lt=function(e){return this.cmp(e)<0};z.lessThanOrEqualTo=z.lte=function(e){return this.cmp(e)<1};z.logarithm=z.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Xe))throw Error(ot+"NaN");if(r.s<1)throw Error(ot+(r.s?"NaN":"-Infinity"));return r.eq(Xe)?new n(0):(ve=!1,t=Mt(si(r,a),si(e,a),a),ve=!0,ce(t,i))};z.minus=z.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Cw(t,e):Ew(t,(e.s=-e.s,e))};z.modulo=z.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ot+"NaN");return r.s?(ve=!1,t=Mt(r,e,0,1).times(e),ve=!0,r.minus(t)):ce(new n(r),i)};z.naturalExponential=z.exp=function(){return Mw(this)};z.naturalLogarithm=z.ln=function(){return si(this)};z.negated=z.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};z.plus=z.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ew(t,e):Cw(t,(e.s=-e.s,e))};z.precision=z.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(yr+e);if(t=we(i)+1,n=i.d.length-1,r=n*pe+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};z.squareRoot=z.sqrt=function(){var e,t,r,n,i,a,o,u=this,s=u.constructor;if(u.s<1){if(!u.s)return new s(0);throw Error(ot+"NaN")}for(e=we(u),ve=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=pt(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=An((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new s(t)):n=new s(i.toString()),r=s.precision,i=o=r+3;;)if(a=n,n=a.plus(Mt(u,a,o+2)).times(.5),pt(a.d).slice(0,o)===(t=pt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ce(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;o+=4}return ve=!0,ce(n,r)};z.times=z.mul=function(e){var t,r,n,i,a,o,u,s,c,f=this,l=f.constructor,d=f.d,h=(e=new l(e)).d;if(!f.s||!e.s)return new l(0);for(e.s*=f.s,r=f.e+e.e,s=d.length,c=h.length,s<c&&(a=d,d=h,h=a,o=s,s=c,c=o),a=[],o=s+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=s+n;i>n;)u=a[i]+h[n]*d[i-n-1]+t,a[i--]=u%Me|0,t=u/Me|0;a[i]=(a[i]+t)%Me|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,ve?ce(e,l.precision):e};z.toDecimalPlaces=z.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(bt(e,0,Sn),t===void 0?t=n.rounding:bt(t,0,8),ce(r,e+we(r)+1,t))};z.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xr(n,!0):(bt(e,0,Sn),t===void 0?t=i.rounding:bt(t,0,8),n=ce(new i(n),e+1,t),r=xr(n,!0,e+1)),r};z.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?xr(i):(bt(e,0,Sn),t===void 0?t=a.rounding:bt(t,0,8),n=ce(new a(i),e+we(i)+1,t),r=xr(n.abs(),!1,e+we(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};z.toInteger=z.toint=function(){var e=this,t=e.constructor;return ce(new t(e),we(e)+1,t.rounding)};z.toNumber=function(){return+this};z.toPower=z.pow=function(e){var t,r,n,i,a,o,u=this,s=u.constructor,c=12,f=+(e=new s(e));if(!e.s)return new s(Xe);if(u=new s(u),!u.s){if(e.s<1)throw Error(ot+"Infinity");return u}if(u.eq(Xe))return u;if(n=s.precision,e.eq(Xe))return ce(u,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=u.s,o){if((r=f<0?-f:f)<=Tw){for(i=new s(Xe),t=Math.ceil(n/pe+4),ve=!1;r%2&&(i=i.times(u),yg(i.d,t)),r=An(r/2),r!==0;)u=u.times(u),yg(u.d,t);return ve=!0,e.s<0?new s(Xe).div(i):ce(i,n)}}else if(a<0)throw Error(ot+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,ve=!1,i=e.times(si(u,n+c)),ve=!0,i=Mw(i),i.s=a,i};z.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=we(i),n=xr(i,r<=a.toExpNeg||r>=a.toExpPos)):(bt(e,1,Sn),t===void 0?t=a.rounding:bt(t,0,8),i=ce(new a(i),e,t),r=we(i),n=xr(i,e<=r||r<=a.toExpNeg,e)),n};z.toSignificantDigits=z.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(bt(e,1,Sn),t===void 0?t=n.rounding:bt(t,0,8)),ce(new n(r),e,t)};z.toString=z.valueOf=z.val=z.toJSON=z[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=we(e),r=e.constructor;return xr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Ew(e,t){var r,n,i,a,o,u,s,c,f=e.constructor,l=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),ve?ce(t,l):t;if(s=e.d,c=t.d,o=e.e,i=t.e,s=s.slice(),a=o-i,a){for(a<0?(n=s,a=-a,u=c.length):(n=c,i=o,u=s.length),o=Math.ceil(l/pe),u=o>u?o+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=s.length,a=c.length,u-a<0&&(a=u,n=c,c=s,s=n),r=0;a;)r=(s[--a]=s[a]+c[a]+r)/Me|0,s[a]%=Me;for(r&&(s.unshift(r),++i),u=s.length;s[--u]==0;)s.pop();return t.d=s,t.e=i,ve?ce(t,l):t}function bt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(yr+e)}function pt(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=pe-n.length,r&&(a+=zt(r)),a+=n;o=e[t],n=o+"",r=pe-n.length,r&&(a+=zt(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Mt=(function(){function e(n,i){var a,o=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+o,n[u]=a%Me|0,o=a/Me|0;return o&&n.unshift(o),n}function t(n,i,a,o){var u,s;if(a!=o)s=a>o?1:-1;else for(u=s=0;u<a;u++)if(n[u]!=i[u]){s=n[u]>i[u]?1:-1;break}return s}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Me+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var u,s,c,f,l,d,h,y,v,p,g,x,w,O,m,b,_,A,T=n.constructor,$=n.s==i.s?1:-1,j=n.d,M=i.d;if(!n.s)return new T(n);if(!i.s)throw Error(ot+"Division by zero");for(s=n.e-i.e,_=M.length,m=j.length,h=new T($),y=h.d=[],c=0;M[c]==(j[c]||0);)++c;if(M[c]>(j[c]||0)&&--s,a==null?x=a=T.precision:o?x=a+(we(n)-we(i))+1:x=a,x<0)return new T(0);if(x=x/pe+2|0,c=0,_==1)for(f=0,M=M[0],x++;(c<m||f)&&x--;c++)w=f*Me+(j[c]||0),y[c]=w/M|0,f=w%M|0;else{for(f=Me/(M[0]+1)|0,f>1&&(M=e(M,f),j=e(j,f),_=M.length,m=j.length),O=_,v=j.slice(0,_),p=v.length;p<_;)v[p++]=0;A=M.slice(),A.unshift(0),b=M[0],M[1]>=Me/2&&++b;do f=0,u=t(M,v,_,p),u<0?(g=v[0],_!=p&&(g=g*Me+(v[1]||0)),f=g/b|0,f>1?(f>=Me&&(f=Me-1),l=e(M,f),d=l.length,p=v.length,u=t(l,v,d,p),u==1&&(f--,r(l,_<d?A:M,d))):(f==0&&(u=f=1),l=M.slice()),d=l.length,d<p&&l.unshift(0),r(v,l,p),u==-1&&(p=v.length,u=t(M,v,_,p),u<1&&(f++,r(v,_<p?A:M,p))),p=v.length):u===0&&(f++,v=[0]),y[c++]=f,u&&v[0]?v[p++]=j[O]||0:(v=[j[O]],p=1);while((O++<m||v[0]!==void 0)&&x--)}return y[0]||y.shift(),h.e=s,ce(h,o?a+we(h)+1:a)}})();function Mw(e,t){var r,n,i,a,o,u,s=0,c=0,f=e.constructor,l=f.precision;if(we(e)>16)throw Error(ch+we(e));if(!e.s)return new f(Xe);for(ve=!1,u=l,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(sr(2,c))/Math.LN10*2+5|0,u+=n,r=i=a=new f(Xe),f.precision=u;;){if(i=ce(i.times(e),u),r=r.times(++s),o=a.plus(Mt(i,r,u)),pt(o.d).slice(0,u)===pt(a.d).slice(0,u)){for(;c--;)a=ce(a.times(a),u);return f.precision=l,t==null?(ve=!0,ce(a,l)):a}a=o}}function we(e){for(var t=e.e*pe,r=e.d[0];r>=10;r/=10)t++;return t}function yl(e,t,r){if(t>e.LN10.sd())throw ve=!0,r&&(e.precision=r),Error(ot+"LN10 precision limit exceeded");return ce(new e(e.LN10),t)}function zt(e){for(var t="";e--;)t+="0";return t}function si(e,t){var r,n,i,a,o,u,s,c,f,l=1,d=10,h=e,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(ot+(h.s?"NaN":"-Infinity"));if(h.eq(Xe))return new v(0);if(t==null?(ve=!1,c=p):c=t,h.eq(10))return t==null&&(ve=!0),yl(v,c);if(c+=d,v.precision=c,r=pt(y),n=r.charAt(0),a=we(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=pt(h.d),n=r.charAt(0),l++;a=we(h),n>1?(h=new v("0."+r),a++):h=new v(n+"."+r.slice(1))}else return s=yl(v,c+2,p).times(a+""),h=si(new v(n+"."+r.slice(1)),c-d).plus(s),v.precision=p,t==null?(ve=!0,ce(h,p)):h;for(u=o=h=Mt(h.minus(Xe),h.plus(Xe),c),f=ce(h.times(h),c),i=3;;){if(o=ce(o.times(f),c),s=u.plus(Mt(o,new v(i),c)),pt(s.d).slice(0,c)===pt(u.d).slice(0,c))return u=u.times(2),a!==0&&(u=u.plus(yl(v,c+2,p).times(a+""))),u=Mt(u,new v(l),c),v.precision=p,t==null?(ve=!0,ce(u,p)):u;u=s,i+=2}}function vg(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=An(r/pe),e.d=[],n=(r+1)%pe,r<0&&(n+=pe),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=pe;n<i;)e.d.push(+t.slice(n,n+=pe));t=t.slice(n),n=pe-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ve&&(e.e>Ca||e.e<-Ca))throw Error(ch+r)}else e.s=0,e.e=0,e.d=[0];return e}function ce(e,t,r){var n,i,a,o,u,s,c,f,l=e.d;for(o=1,a=l[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=pe,i=t,c=l[f=0];else{if(f=Math.ceil((n+1)/pe),a=l.length,f>=a)return e;for(c=a=l[f],o=1;a>=10;a/=10)o++;n%=pe,i=n-pe+o}if(r!==void 0&&(a=sr(10,o-i-1),u=c/a%10|0,s=t<0||l[f+1]!==void 0||c%a,s=r<4?(u||s)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||s||r==6&&(n>0?i>0?c/sr(10,o-i):0:l[f-1])%10&1||r==(e.s<0?8:7))),t<1||!l[0])return s?(a=we(e),l.length=1,t=t-a-1,l[0]=sr(10,(pe-t%pe)%pe),e.e=An(-t/pe)||0):(l.length=1,l[0]=e.e=e.s=0),e;if(n==0?(l.length=f,a=1,f--):(l.length=f+1,a=sr(10,pe-n),l[f]=i>0?(c/sr(10,o-i)%sr(10,i)|0)*a:0),s)for(;;)if(f==0){(l[0]+=a)==Me&&(l[0]=1,++e.e);break}else{if(l[f]+=a,l[f]!=Me)break;l[f--]=0,a=1}for(n=l.length;l[--n]===0;)l.pop();if(ve&&(e.e>Ca||e.e<-Ca))throw Error(ch+we(e));return e}function Cw(e,t){var r,n,i,a,o,u,s,c,f,l,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),ve?ce(t,h):t;if(s=e.d,l=t.d,n=t.e,c=e.e,s=s.slice(),o=c-n,o){for(f=o<0,f?(r=s,o=-o,u=l.length):(r=l,n=c,u=s.length),i=Math.max(Math.ceil(h/pe),u)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=s.length,u=l.length,f=i<u,f&&(u=i),i=0;i<u;i++)if(s[i]!=l[i]){f=s[i]<l[i];break}o=0}for(f&&(r=s,s=l,l=r,t.s=-t.s),u=s.length,i=l.length-u;i>0;--i)s[u++]=0;for(i=l.length;i>o;){if(s[--i]<l[i]){for(a=i;a&&s[--a]===0;)s[a]=Me-1;--s[a],s[i]+=Me}s[i]-=l[i]}for(;s[--u]===0;)s.pop();for(;s[0]===0;s.shift())--n;return s[0]?(t.d=s,t.e=n,ve?ce(t,h):t):new d(0)}function xr(e,t,r){var n,i=we(e),a=pt(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+zt(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+zt(-i-1)+a,r&&(n=r-o)>0&&(a+=zt(n))):i>=o?(a+=zt(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+zt(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=zt(n))),e.s<0?"-"+a:a}function yg(e,t){if(e.length>t)return e.length=t,!0}function $w(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(yr+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return vg(o,a.toString())}else if(typeof a!="string")throw Error(yr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,zC.test(a))vg(o,a);else throw Error(yr+a)}if(i.prototype=z,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=$w,i.config=i.set=HC,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function HC(e){if(!e||typeof e!="object")throw Error(ot+"Object expected");var t,r,n,i=["precision",1,Sn,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(An(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(yr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(yr+r+": "+n);return this}var lh=$w(UC);Xe=new lh(1);const ue=lh;function GC(e){return XC(e)||VC(e)||YC(e)||KC()}function KC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YC(e,t){if(e){if(typeof e=="string")return Pf(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 Pf(e,t)}}function VC(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function XC(e){if(Array.isArray(e))return Pf(e)}function Pf(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 ZC=function(t){return t},kw={},Nw=function(t){return t===kw},mg=function(t){return function r(){return arguments.length===0||arguments.length===1&&Nw(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},QC=function e(t,r){return t===1?r:mg(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(u){return u!==kw}).length;return o>=t?r.apply(void 0,i):e(t-o,mg(function(){for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];var f=i.map(function(l){return Nw(l)?s.shift():l});return r.apply(void 0,GC(f).concat(s))}))})},Eo=function(t){return QC(t.length,t)},jf=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},JC=Eo(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),e$=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return ZC;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(u,s){return s(u)},a.apply(void 0,arguments))}},Tf=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Iw=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(u,s){return u===r[s]})||(r=a,n=t.apply(void 0,a)),n}};function t$(e){var t;return e===0?t=1:t=Math.floor(new ue(e).abs().log(10).toNumber())+1,t}function r$(e,t,r){for(var n=new ue(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var n$=Eo(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),i$=Eo(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),a$=Eo(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Mo={rangeStep:r$,getDigitCount:t$,interpolateNumber:n$,uninterpolateNumber:i$,uninterpolateTruncation:a$};function Ef(e){return s$(e)||u$(e)||Dw(e)||o$()}function o$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u$(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function s$(e){if(Array.isArray(e))return Mf(e)}function ci(e,t){return f$(e)||l$(e,t)||Dw(e,t)||c$()}function c$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dw(e,t){if(e){if(typeof e=="string")return Mf(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 Mf(e,t)}}function Mf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l$(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(s){i=!0,a=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function f$(e){if(Array.isArray(e))return e}function Rw(e){var t=ci(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function qw(e,t,r){if(e.lte(0))return new ue(0);var n=Mo.getDigitCount(e.toNumber()),i=new ue(10).pow(n),a=e.div(i),o=n!==1?.05:.1,u=new ue(Math.ceil(a.div(o).toNumber())).add(r).mul(o),s=u.mul(i);return t?s:new ue(Math.ceil(s))}function d$(e,t,r){var n=1,i=new ue(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ue(10).pow(Mo.getDigitCount(e)-1),i=new ue(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ue(Math.floor(e)))}else e===0?i=new ue(Math.floor((t-1)/2)):r||(i=new ue(Math.floor(e)));var o=Math.floor((t-1)/2),u=e$(JC(function(s){return i.add(new ue(s-o).mul(n)).toNumber()}),jf);return u(0,t)}function Lw(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ue(0),tickMin:new ue(0),tickMax:new ue(0)};var a=qw(new ue(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ue(0):(o=new ue(e).add(t).div(2),o=o.sub(new ue(o).mod(a)));var u=Math.ceil(o.sub(e).div(a).toNumber()),s=Math.ceil(new ue(t).sub(o).div(a).toNumber()),c=u+s+1;return c>r?Lw(e,t,r,n,i+1):(c<r&&(s=t>0?s+(r-c):s,u=t>0?u:u+(r-c)),{step:a,tickMin:o.sub(new ue(u).mul(a)),tickMax:o.add(new ue(s).mul(a))})}function h$(e){var t=ci(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),u=Rw([r,n]),s=ci(u,2),c=s[0],f=s[1];if(c===-1/0||f===1/0){var l=f===1/0?[c].concat(Ef(jf(0,i-1).map(function(){return 1/0}))):[].concat(Ef(jf(0,i-1).map(function(){return-1/0})),[f]);return r>n?Tf(l):l}if(c===f)return d$(c,i,a);var d=Lw(c,f,o,a),h=d.step,y=d.tickMin,v=d.tickMax,p=Mo.rangeStep(y,v.add(new ue(.1).mul(h)),h);return r>n?Tf(p):p}function p$(e,t){var r=ci(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Rw([n,i]),u=ci(o,2),s=u[0],c=u[1];if(s===-1/0||c===1/0)return[n,i];if(s===c)return[s];var f=Math.max(t,2),l=qw(new ue(c).sub(s).div(f-1),a,0),d=[].concat(Ef(Mo.rangeStep(new ue(s),new ue(c).sub(new ue(.99).mul(l)),l)),[c]);return n>i?Tf(d):d}var v$=Iw(h$),y$=Iw(p$),m$="Invariant failed";function wr(e,t){throw new Error(m$)}var g$=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function en(e){"@babel/helpers - typeof";return en=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},en(e)}function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$a.apply(this,arguments)}function b$(e,t){return _$(e)||O$(e,t)||w$(e,t)||x$()}function x$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w$(e,t){if(e){if(typeof e=="string")return gg(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 gg(e,t)}}function gg(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 O$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function _$(e){if(Array.isArray(e))return e}function S$(e,t){if(e==null)return{};var r=A$(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function A$(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 P$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ww(n.key),n)}}function T$(e,t,r){return t&&j$(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function E$(e,t,r){return t=ka(t),M$(e,Bw()?Reflect.construct(t,r||[],ka(e).constructor):t.apply(e,r))}function M$(e,t){if(t&&(en(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 Bw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bw=function(){return!!e})()}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ka(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&&Cf(e,t)}function Cf(e,t){return Cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cf(e,t)}function Fw(e,t,r){return t=Ww(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ww(e){var t=k$(e,"string");return en(t)=="symbol"?t:t+""}function k$(e,t){if(en(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(en(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Co=(function(e){function t(){return P$(this,t),E$(this,t,arguments)}return $$(t,e),T$(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,u=n.dataKey,s=n.data,c=n.dataPointFormatter,f=n.xAxis,l=n.yAxis,d=S$(n,g$),h=G(d,!1);this.props.direction==="x"&&f.type!=="number"&&wr();var y=s.map(function(v){var p=c(v,u),g=p.x,x=p.y,w=p.value,O=p.errorVal;if(!O)return null;var m=[],b,_;if(Array.isArray(O)){var A=b$(O,2);b=A[0],_=A[1]}else b=_=O;if(a==="vertical"){var T=f.scale,$=x+i,j=$+o,M=$-o,C=T(w-b),E=T(w+_);m.push({x1:E,y1:j,x2:E,y2:M}),m.push({x1:C,y1:$,x2:E,y2:$}),m.push({x1:C,y1:j,x2:C,y2:M})}else if(a==="horizontal"){var k=l.scale,I=g+i,R=I-o,B=I+o,F=k(w-b),H=k(w+_);m.push({x1:R,y1:H,x2:B,y2:H}),m.push({x1:I,y1:F,x2:I,y2:H}),m.push({x1:R,y1:F,x2:B,y2:F})}return P.createElement(te,$a({className:"recharts-errorBar",key:"bar-".concat(m.map(function(Y){return"".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))},h),m.map(function(Y){return P.createElement("line",$a({},Y,{key:"line-".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))}))});return P.createElement(te,{className:"recharts-errorBars"},y)}}])})(P.Component);Fw(Co,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Fw(Co,"displayName","ErrorBar");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 bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(r),!0).forEach(function(n){N$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N$(e,t,r){return t=I$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I$(e){var t=D$(e,"string");return li(t)=="symbol"?t:t+""}function D$(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)}var Uw=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Ve(r,Fr);if(!o)return null;var u=Fr.defaultProps,s=u!==void 0?nr(nr({},u),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:a==="children"?c=(n||[]).reduce(function(f,l){var d=l.item,h=l.props,y=h.sectors||h.data||[];return f.concat(y.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):c=(n||[]).map(function(f){var l=f.item,d=l.type.defaultProps,h=d!==void 0?nr(nr({},d),l.props):{},y=h.dataKey,v=h.name,p=h.legendType,g=h.hide;return{inactive:g,dataKey:y,type:s.iconType||p||"square",color:fh(l),value:v||y,payload:h}}),nr(nr(nr({},s),Fr.getWithHeight(o,i)),{},{payload:c,item:o})};function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function xg(e){return B$(e)||L$(e)||q$(e)||R$()}function R$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q$(e,t){if(e){if(typeof e=="string")return $f(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 $f(e,t)}}function L$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B$(e){if(Array.isArray(e))return $f(e)}function $f(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 wg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wg(Object(r),!0).forEach(function(n){Ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ur(e,t,r){return t=F$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F$(e){var t=W$(e,"string");return fi(t)=="symbol"?t:t+""}function W$(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function je(e,t,r){return Z(e)||Z(t)?r:Te(t)?Qe(e,t,r):V(t)?t(e):r}function Hn(e,t,r,n){var i=BC(e,function(u){return je(u,t)});if(r==="number"){var a=i.filter(function(u){return L(u)||parseFloat(u)});return a.length?[To(a),Gt(a)]:[1/0,-1/0]}var o=n?i.filter(function(u){return!Z(u)}):i;return o.map(function(u){return Te(u)||u instanceof Date?u:""})}var U$=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,u=(r=n?.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var s=a.range,c=0;c<u;c++){var f=c>0?i[c-1].coordinate:i[u-1].coordinate,l=i[c].coordinate,d=c>=u-1?i[0].coordinate:i[c+1].coordinate,h=void 0;if(Le(l-f)!==Le(d-l)){var y=[];if(Le(d-l)===Le(s[1]-s[0])){h=d;var v=l+s[1]-s[0];y[0]=Math.min(v,(v+f)/2),y[1]=Math.max(v,(v+f)/2)}else{h=f;var p=d+s[1]-s[0];y[0]=Math.min(l,(p+l)/2),y[1]=Math.max(l,(p+l)/2)}var g=[Math.min(l,(h+l)/2),Math.max(l,(h+l)/2)];if(t>g[0]&&t<=g[1]||t>=y[0]&&t<=y[1]){o=i[c].index;break}}else{var x=Math.min(f,d),w=Math.max(f,d);if(t>(x+l)/2&&t<=(w+l)/2){o=i[c].index;break}}}else for(var O=0;O<u;O++)if(O===0&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O>0&&O<u-1&&t>(n[O].coordinate+n[O-1].coordinate)/2&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O===u-1&&t>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},fh=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?me(me({},t.type.defaultProps),t.props):t.props,o=a.stroke,u=a.fill,s;switch(i){case"Line":s=o;break;case"Area":case"Radar":s=o&&o!=="none"?o:u;break;default:s=u;break}return s},z$=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},u=Object.keys(a),s=0,c=u.length;s<c;s++)for(var f=a[u[s]].stackGroups,l=Object.keys(f),d=0,h=l.length;d<h;d++){var y=f[l[d]],v=y.items,p=y.cateAxisId,g=v.filter(function(_){return Et(_.type).indexOf("Bar")>=0});if(g&&g.length){var x=g[0].type.defaultProps,w=x!==void 0?me(me({},x),g[0].props):g[0].props,O=w.barSize,m=w[p];o[m]||(o[m]=[]);var b=Z(O)?r:O;o[m].push({item:g[0],stackList:g.slice(1),barSize:Z(b)?void 0:Be(b,n,0)})}}return o},H$=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,u=t.maxBarSize,s=o.length;if(s<1)return null;var c=Be(r,i,0,!0),f,l=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/s,y=o.reduce(function(O,m){return O+m.barSize||0},0);y+=(s-1)*c,y>=i&&(y-=(s-1)*c,c=0),y>=i&&h>0&&(d=!0,h*=.9,y=s*h);var v=(i-y)/2>>0,p={offset:v-c,size:0};f=o.reduce(function(O,m){var b={item:m.item,position:{offset:p.offset+p.size+c,size:d?h:m.barSize}},_=[].concat(xg(O),[b]);return p=_[_.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(A){_.push({item:A,position:p})}),_},l)}else{var g=Be(n,i,0,!0);i-2*g-(s-1)*c<=0&&(c=0);var x=(i-2*g-(s-1)*c)/s;x>1&&(x>>=0);var w=u===+u?Math.min(x,u):x;f=o.reduce(function(O,m,b){var _=[].concat(xg(O),[{item:m.item,position:{offset:g+(x+c)*b+(x-w)/2,size:w}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(A){_.push({item:A,position:_[_.length-1].position})}),_},l)}return f},G$=function(t,r,n,i){var a=n.children,o=n.width,u=n.margin,s=o-(u.left||0)-(u.right||0),c=Uw({children:a,legendWidth:s});if(c){var f=i||{},l=f.width,d=f.height,h=c.align,y=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&L(t[h]))return me(me({},t),{},Ur({},h,t[h]+(l||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&L(t[y]))return me(me({},t),{},Ur({},y,t[y]+(d||0)))}return t},K$=function(t,r,n){return Z(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},zw=function(t,r,n,i,a){var o=r.props.children,u=at(o,Co).filter(function(c){return K$(i,a,c.props.direction)});if(u&&u.length){var s=u.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var l=je(f,n);if(Z(l))return c;var d=Array.isArray(l)?[To(l),Gt(l)]:[l,l],h=s.reduce(function(y,v){var p=je(f,v,0),g=d[0]-Math.abs(Array.isArray(p)?p[0]:p),x=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(g,y[0]),Math.max(x,y[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},Y$=function(t,r,n,i,a){var o=r.map(function(u){return zw(t,u,n,a,i)}).filter(function(u){return!Z(u)});return o&&o.length?o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]):null},Hw=function(t,r,n,i,a){var o=r.map(function(s){var c=s.props.dataKey;return n==="number"&&c&&zw(t,s,c,i)||Hn(t,c,n,a)});if(n==="number")return o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);var u={};return o.reduce(function(s,c){for(var f=0,l=c.length;f<l;f++)u[c[f]]||(u[c[f]]=!0,s.push(c[f]));return s},[])},Gw=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Kw=function(t,r,n,i){if(i)return t.map(function(s){return s.coordinate});var a,o,u=t.map(function(s){return s.coordinate===r&&(a=!0),s.coordinate===n&&(o=!0),s.coordinate});return a||u.push(r),o||u.push(n),u},Tt=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,u=t.range,s=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/s:0;if(c=t.axisType==="angleAxis"&&u?.length>=2?Le(u[0]-u[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(l){var d=a?a.indexOf(l):l;return{coordinate:i(d)+c,value:l,offset:c}});return f.filter(function(l){return!xn(l.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(l,d){return{coordinate:i(l)+c,value:l,index:d,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(l){return{coordinate:i(l)+c,value:l,offset:c}}):i.domain().map(function(l,d){return{coordinate:i(l)+c,value:a?a[l]:l,index:d,offset:c}})},ml=new WeakMap,Qi=function(t,r){if(typeof r!="function")return t;ml.has(t)||ml.set(t,new WeakMap);var n=ml.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},Yw=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,u=t.axisType;if(i==="auto")return o==="radial"&&u==="radiusAxis"?{scale:ni(),realScaleType:"band"}:o==="radial"&&u==="angleAxis"?{scale:ja(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:zn(),realScaleType:"point"}:a==="category"?{scale:ni(),realScaleType:"band"}:{scale:ja(),realScaleType:"linear"};if(mr(i)){var s="scale".concat(ho(i));return{scale:(og[s]||zn)(),realScaleType:og[s]?s:"point"}}return V(i)?{scale:i}:{scale:zn(),realScaleType:"point"}},Og=1e-4,Vw=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-Og,o=Math.max(i[0],i[1])+Og,u=t(r[0]),s=t(r[n-1]);(u<a||u>o||s<a||s>o)&&t.domain([r[0],r[n-1]])}},V$=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},X$=function(t,r){if(!r||r.length!==2||!L(r[0])||!L(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!L(t[0])||t[0]<n)&&(a[0]=n),(!L(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Z$=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,u=0;u<r;++u){var s=xn(t[u][n][1])?t[u][n][0]:t[u][n][1];s>=0?(t[u][n][0]=a,t[u][n][1]=a+s,a=t[u][n][1]):(t[u][n][0]=o,t[u][n][1]=o+s,o=t[u][n][1])}},Q$=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var u=xn(t[o][n][1])?t[o][n][0]:t[o][n][1];u>=0?(t[o][n][0]=a,t[o][n][1]=a+u,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},J$={sign:Z$,expand:BA,none:Hr,silhouette:FA,wiggle:WA,positive:Q$},ek=function(t,r,n){var i=r.map(function(u){return u.props.dataKey}),a=J$[n],o=LA().keys(i).value(function(u,s){return+je(u,s,0)}).order(sf).offset(a);return o(t)},tk=function(t,r,n,i,a,o){if(!t)return null;var u=o?r.reverse():r,s={},c=u.reduce(function(l,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?me(me({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return l;var g=y[n],x=l[g]||{hasStack:!1,stackGroups:{}};if(Te(v)){var w=x.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};w.items.push(d),x.hasStack=!0,x.stackGroups[v]=w}else x.stackGroups[wn("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return me(me({},l),{},Ur({},g,x))},s),f={};return Object.keys(c).reduce(function(l,d){var h=c[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var g=h.stackGroups[p];return me(me({},v),{},Ur({},p,{numericAxisId:n,cateAxisId:i,items:g.items,stackedData:ek(t,g.items,a)}))},y)}return me(me({},l),{},Ur({},d,h))},f)},Xw=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,u=r.allowDecimals,s=n||r.scale;if(s!=="auto"&&s!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var f=v$(c,a,u);return t.domain([To(f),Gt(f)]),{niceTicks:f}}if(a&&i==="number"){var l=t.domain(),d=y$(l,a,u);return{niceTicks:d}}return null};function _g(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Z(i[t.dataKey])){var u=ca(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var s=je(i,Z(o)?t.dataKey:o);return Z(s)?null:t.scale(s)}var Sg=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,u=t.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var s=je(o,r.dataKey,r.domain[u]);return Z(s)?null:r.scale(s)-a/2+i},rk=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},nk=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?me(me({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Te(a)){var o=r[a];if(o){var u=o.items.indexOf(t);return u>=0?o.stackedData[u]:null}}return null},ik=function(t){return t.reduce(function(r,n){return[To(n.concat([r[0]]).filter(L)),Gt(n.concat([r[1]]).filter(L))]},[1/0,-1/0])},Zw=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],u=o.stackedData,s=u.reduce(function(c,f){var l=ik(f.slice(r,n+1));return[Math.min(c[0],l[0]),Math.max(c[1],l[1])]},[1/0,-1/0]);return[Math.min(s[0],i[0]),Math.max(s[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Ag=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Pg=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kf=function(t,r,n){if(V(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(L(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(Ag.test(t[0])){var a=+Ag.exec(t[0])[1];i[0]=r[0]-a}else V(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(L(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(Pg.test(t[1])){var o=+Pg.exec(t[1])[1];i[1]=r[1]+o}else V(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Na=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Ld(r,function(l){return l.coordinate}),o=1/0,u=1,s=a.length;u<s;u++){var c=a[u],f=a[u-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},jg=function(t,r,n){return!t||!t.length||Jr(t,Qe(n,"type.defaultProps.domain"))?r:t},Qw=function(t,r){var n=t.type.defaultProps?me(me({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,u=n.formatter,s=n.tooltipType,c=n.chartType,f=n.hide;return me(me({},G(t,!1)),{},{dataKey:i,unit:o,formatter:u,name:a||i,color:fh(t),value:je(r,i),type:s,payload:r,chartType:c,hide:f})};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 Tg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(r),!0).forEach(function(n){Jw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jw(e,t,r){return t=ak(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ak(e){var t=ok(e,"string");return di(t)=="symbol"?t:t+""}function ok(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)}function uk(e,t){return fk(e)||lk(e,t)||ck(e,t)||sk()}function sk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ck(e,t){if(e){if(typeof e=="string")return Eg(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 Eg(e,t)}}function Eg(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 lk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function fk(e){if(Array.isArray(e))return e}var Ia=Math.PI/180,dk=function(t){return t*180/Math.PI},de=function(t,r,n,i){return{x:t+Math.cos(-Ia*i)*n,y:r+Math.sin(-Ia*i)*n}},e1=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},hk=function(t,r,n,i,a){var o=t.width,u=t.height,s=t.startAngle,c=t.endAngle,f=Be(t.cx,o,o/2),l=Be(t.cy,u,u/2),d=e1(o,u,n),h=Be(t.innerRadius,d,0),y=Be(t.outerRadius,d,d*.8),v=Object.keys(r);return v.reduce(function(p,g){var x=r[g],w=x.domain,O=x.reversed,m;if(Z(x.range))i==="angleAxis"?m=[s,c]:i==="radiusAxis"&&(m=[h,y]),O&&(m=[m[1],m[0]]);else{m=x.range;var b=m,_=uk(b,2);s=_[0],c=_[1]}var A=Yw(x,a),T=A.realScaleType,$=A.scale;$.domain(w).range(m),Vw($);var j=Xw($,St(St({},x),{},{realScaleType:T})),M=St(St(St({},x),j),{},{range:m,radius:y,realScaleType:T,scale:$,cx:f,cy:l,innerRadius:h,outerRadius:y,startAngle:s,endAngle:c});return St(St({},p),{},Jw({},g,M))},{})},pk=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},vk=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,u=pk({x:n,y:i},{x:a,y:o});if(u<=0)return{radius:u};var s=(n-a)/u,c=Math.acos(s);return i>o&&(c=2*Math.PI-c),{radius:u,angle:dk(c),angleInRadian:c}},yk=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},mk=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),u=Math.min(a,o);return t+u*360},Mg=function(t,r){var n=t.x,i=t.y,a=vk({x:n,y:i},r),o=a.radius,u=a.angle,s=r.innerRadius,c=r.outerRadius;if(o<s||o>c)return!1;if(o===0)return!0;var f=yk(r),l=f.startAngle,d=f.endAngle,h=u,y;if(l<=d){for(;h>d;)h-=360;for(;h<l;)h+=360;y=h>=l&&h<=d}else{for(;h>l;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=l}return y?St(St({},r),{},{radius:o,angle:mk(h,r)}):null},t1=function(t){return!D.isValidElement(t)&&!V(t)&&typeof t!="boolean"?t.className:""};function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}var gk=["offset"];function bk(e){return _k(e)||Ok(e)||wk(e)||xk()}function xk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
19
|
+
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 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 Ok(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _k(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}function Sk(e,t){if(e==null)return{};var r=Ak(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ak(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 Cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(r),!0).forEach(function(n){Pk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pk(e,t,r){return t=jk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jk(e){var t=Tk(e,"string");return hi(t)=="symbol"?t:t+""}function Tk(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pi(){return pi=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},pi.apply(this,arguments)}var Ek=function(t){var r=t.value,n=t.formatter,i=Z(t.children)?r:t.children;return V(n)?n(i):i},Mk=function(t,r){var n=Le(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Ck=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,u=t.className,s=a,c=s.cx,f=s.cy,l=s.innerRadius,d=s.outerRadius,h=s.startAngle,y=s.endAngle,v=s.clockWise,p=(l+d)/2,g=Mk(h,y),x=g>=0?1:-1,w,O;i==="insideStart"?(w=h+x*o,O=v):i==="insideEnd"?(w=y-x*o,O=!v):i==="end"&&(w=y+x*o,O=v),O=g<=0?O:!O;var m=de(c,f,p,w),b=de(c,f,p,w+(O?1:-1)*359),_="M".concat(m.x,",").concat(m.y,`
|
|
20
|
+
A`).concat(p,",").concat(p,",0,1,").concat(O?0:1,`,
|
|
21
|
+
`).concat(b.x,",").concat(b.y),A=Z(t.id)?wn("recharts-radial-line-"):t.id;return P.createElement("text",pi({},n,{dominantBaseline:"central",className:J("recharts-radial-bar-label",u)}),P.createElement("defs",null,P.createElement("path",{id:A,d:_})),P.createElement("textPath",{xlinkHref:"#".concat(A)},r))},$k=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,u=a.cy,s=a.innerRadius,c=a.outerRadius,f=a.startAngle,l=a.endAngle,d=(f+l)/2;if(i==="outside"){var h=de(o,u,c+n,d),y=h.x,v=h.y;return{x:y,y:v,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:u,textAnchor:"middle",verticalAnchor:"end"};var p=(s+c)/2,g=de(o,u,p,d),x=g.x,w=g.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},kk=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,u=o.x,s=o.y,c=o.width,f=o.height,l=f>=0?1:-1,d=l*i,h=l>0?"end":"start",y=l>0?"start":"end",v=c>=0?1:-1,p=v*i,g=v>0?"end":"start",x=v>0?"start":"end";if(a==="top"){var w={x:u+c/2,y:s-l*i,textAnchor:"middle",verticalAnchor:h};return Pe(Pe({},w),n?{height:Math.max(s-n.y,0),width:c}:{})}if(a==="bottom"){var O={x:u+c/2,y:s+f+d,textAnchor:"middle",verticalAnchor:y};return Pe(Pe({},O),n?{height:Math.max(n.y+n.height-(s+f),0),width:c}:{})}if(a==="left"){var m={x:u-p,y:s+f/2,textAnchor:g,verticalAnchor:"middle"};return Pe(Pe({},m),n?{width:Math.max(m.x-n.x,0),height:f}:{})}if(a==="right"){var b={x:u+c+p,y:s+f/2,textAnchor:x,verticalAnchor:"middle"};return Pe(Pe({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:f}:{})}var _=n?{width:c,height:f}:{};return a==="insideLeft"?Pe({x:u+p,y:s+f/2,textAnchor:x,verticalAnchor:"middle"},_):a==="insideRight"?Pe({x:u+c-p,y:s+f/2,textAnchor:g,verticalAnchor:"middle"},_):a==="insideTop"?Pe({x:u+c/2,y:s+d,textAnchor:"middle",verticalAnchor:y},_):a==="insideBottom"?Pe({x:u+c/2,y:s+f-d,textAnchor:"middle",verticalAnchor:h},_):a==="insideTopLeft"?Pe({x:u+p,y:s+d,textAnchor:x,verticalAnchor:y},_):a==="insideTopRight"?Pe({x:u+c-p,y:s+d,textAnchor:g,verticalAnchor:y},_):a==="insideBottomLeft"?Pe({x:u+p,y:s+f-d,textAnchor:x,verticalAnchor:h},_):a==="insideBottomRight"?Pe({x:u+c-p,y:s+f-d,textAnchor:g,verticalAnchor:h},_):bn(a)&&(L(a.x)||lr(a.x))&&(L(a.y)||lr(a.y))?Pe({x:u+Be(a.x,c),y:s+Be(a.y,f),textAnchor:"end",verticalAnchor:"end"},_):Pe({x:u+c/2,y:s+f/2,textAnchor:"middle",verticalAnchor:"middle"},_)},Nk=function(t){return"cx"in t&&L(t.cx)};function Ce(e){var t=e.offset,r=t===void 0?5:t,n=Sk(e,gk),i=Pe({offset:r},n),a=i.viewBox,o=i.position,u=i.value,s=i.children,c=i.content,f=i.className,l=f===void 0?"":f,d=i.textBreakAll;if(!a||Z(u)&&Z(s)&&!D.isValidElement(c)&&!V(c))return null;if(D.isValidElement(c))return D.cloneElement(c,i);var h;if(V(c)){if(h=D.createElement(c,i),D.isValidElement(h))return h}else h=Ek(i);var y=Nk(a),v=G(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Ck(i,h,v);var p=y?$k(i):kk(i);return P.createElement(br,pi({className:J("recharts-label",l)},v,p,{breakAll:d}),h)}Ce.displayName="Label";var r1=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,u=t.r,s=t.radius,c=t.innerRadius,f=t.outerRadius,l=t.x,d=t.y,h=t.top,y=t.left,v=t.width,p=t.height,g=t.clockWise,x=t.labelViewBox;if(x)return x;if(L(v)&&L(p)){if(L(l)&&L(d))return{x:l,y:d,width:v,height:p};if(L(h)&&L(y))return{x:h,y,width:v,height:p}}return L(l)&&L(d)?{x:l,y:d,width:0,height:0}:L(r)&&L(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:f||s||u||0,clockWise:g}:t.viewBox?t.viewBox:{}},Ik=function(t,r){return t?t===!0?P.createElement(Ce,{key:"label-implicit",viewBox:r}):Te(t)?P.createElement(Ce,{key:"label-implicit",viewBox:r,value:t}):D.isValidElement(t)?t.type===Ce?D.cloneElement(t,{key:"label-implicit",viewBox:r}):P.createElement(Ce,{key:"label-implicit",content:t,viewBox:r}):V(t)?P.createElement(Ce,{key:"label-implicit",content:t,viewBox:r}):bn(t)?P.createElement(Ce,pi({viewBox:r},t,{key:"label-implicit"})):null:null},Dk=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=r1(t),o=at(i,Ce).map(function(s,c){return D.cloneElement(s,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return o;var u=Ik(t.label,r||a);return[u].concat(bk(o))};Ce.parseViewBox=r1;Ce.renderCallByParent=Dk;var gl,$g;function Rk(){if($g)return gl;$g=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return gl=e,gl}var qk=Rk();const Lk=se(qk);function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}var Bk=["valueAccessor"],Fk=["data","dataKey","clockWise","id","textBreakAll"];function Wk(e){return Gk(e)||Hk(e)||zk(e)||Uk()}function Uk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
22
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zk(e,t){if(e){if(typeof e=="string")return If(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 If(e,t)}}function Hk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gk(e){if(Array.isArray(e))return If(e)}function If(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 Da(){return Da=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},Da.apply(this,arguments)}function kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function 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){Kk(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 Kk(e,t,r){return t=Yk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yk(e){var t=Vk(e,"string");return vi(t)=="symbol"?t:t+""}function Vk(e,t){if(vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ig(e,t){if(e==null)return{};var r=Xk(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Zk=function(t){return Array.isArray(t.value)?Lk(t.value):t.value};function Ct(e){var t=e.valueAccessor,r=t===void 0?Zk:t,n=Ig(e,Bk),i=n.data,a=n.dataKey,o=n.clockWise,u=n.id,s=n.textBreakAll,c=Ig(n,Fk);return!i||!i.length?null:P.createElement(te,{className:"recharts-label-list"},i.map(function(f,l){var d=Z(a)?r(f,l):je(f&&f.payload,a),h=Z(u)?{}:{id:"".concat(u,"-").concat(l)};return P.createElement(Ce,Da({},G(f,!0),c,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:s,viewBox:Ce.parseViewBox(Z(o)?f:Ng(Ng({},f),{},{clockWise:o})),key:"label-".concat(l),index:l}))}))}Ct.displayName="LabelList";function Qk(e,t){return e?e===!0?P.createElement(Ct,{key:"labelList-implicit",data:t}):P.isValidElement(e)||V(e)?P.createElement(Ct,{key:"labelList-implicit",data:t,content:e}):bn(e)?P.createElement(Ct,Da({data:t},e,{key:"labelList-implicit"})):null:null}function Jk(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=at(n,Ct).map(function(o,u){return D.cloneElement(o,{data:t,key:"labelList-".concat(u)})});if(!r)return i;var a=Qk(e.label,t);return[a].concat(Wk(i))}Ct.renderCallByParent=Jk;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 Df(){return Df=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},Df.apply(this,arguments)}function Dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rg(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){eN(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 eN(e,t,r){return t=tN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tN(e){var t=rN(e,"string");return yi(t)=="symbol"?t:t+""}function rN(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nN=function(t,r){var n=Le(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Ji=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,u=t.isExternal,s=t.cornerRadius,c=t.cornerIsExternal,f=s*(u?1:-1)+i,l=Math.asin(s/f)/Ia,d=c?a:a+o*l,h=de(r,n,f,d),y=de(r,n,i,d),v=c?a-o*l:a,p=de(r,n,f*Math.cos(l*Ia),v);return{center:h,circleTangency:y,lineTangency:p,theta:l}},n1=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,u=t.endAngle,s=nN(o,u),c=o+s,f=de(r,n,a,o),l=de(r,n,a,c),d="M ".concat(f.x,",").concat(f.y,`
|
|
23
|
+
A `).concat(a,",").concat(a,`,0,
|
|
24
|
+
`).concat(+(Math.abs(s)>180),",").concat(+(o>c),`,
|
|
25
|
+
`).concat(l.x,",").concat(l.y,`
|
|
26
|
+
`);if(i>0){var h=de(r,n,i,o),y=de(r,n,i,c);d+="L ".concat(y.x,",").concat(y.y,`
|
|
27
|
+
A `).concat(i,",").concat(i,`,0,
|
|
28
|
+
`).concat(+(Math.abs(s)>180),",").concat(+(o<=c),`,
|
|
29
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},iN=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,u=t.forceCornerRadius,s=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,l=Le(f-c),d=Ji({cx:r,cy:n,radius:a,angle:c,sign:l,cornerRadius:o,cornerIsExternal:s}),h=d.circleTangency,y=d.lineTangency,v=d.theta,p=Ji({cx:r,cy:n,radius:a,angle:f,sign:-l,cornerRadius:o,cornerIsExternal:s}),g=p.circleTangency,x=p.lineTangency,w=p.theta,O=s?Math.abs(c-f):Math.abs(c-f)-v-w;if(O<0)return u?"M ".concat(y.x,",").concat(y.y,`
|
|
30
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
31
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
32
|
+
`):n1({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:f});var m="M ".concat(y.x,",").concat(y.y,`
|
|
33
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(h.x,",").concat(h.y,`
|
|
34
|
+
A`).concat(a,",").concat(a,",0,").concat(+(O>180),",").concat(+(l<0),",").concat(g.x,",").concat(g.y,`
|
|
35
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(x.x,",").concat(x.y,`
|
|
36
|
+
`);if(i>0){var b=Ji({cx:r,cy:n,radius:i,angle:c,sign:l,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),_=b.circleTangency,A=b.lineTangency,T=b.theta,$=Ji({cx:r,cy:n,radius:i,angle:f,sign:-l,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),j=$.circleTangency,M=$.lineTangency,C=$.theta,E=s?Math.abs(c-f):Math.abs(c-f)-T-C;if(E<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(M.x,",").concat(M.y,`
|
|
37
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(j.x,",").concat(j.y,`
|
|
38
|
+
A`).concat(i,",").concat(i,",0,").concat(+(E>180),",").concat(+(l>0),",").concat(_.x,",").concat(_.y,`
|
|
39
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(l<0),",").concat(A.x,",").concat(A.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},aN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},i1=function(t){var r=Rg(Rg({},aN),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,u=r.cornerRadius,s=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,l=r.endAngle,d=r.className;if(o<a||f===l)return null;var h=J("recharts-sector",d),y=o-a,v=Be(u,y,0,!0),p;return v>0&&Math.abs(f-l)<360?p=iN({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:f,endAngle:l}):p=n1({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:l}),P.createElement("path",Df({},G(r,!0),{className:h,d:p,role:"img"}))};function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}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)}function qg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qg(Object(r),!0).forEach(function(n){oN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oN(e,t,r){return t=uN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uN(e){var t=sN(e,"string");return mi(t)=="symbol"?t:t+""}function sN(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bg={curveBasisClosed:TA,curveBasisOpen:EA,curveBasis:jA,curveBumpX:hA,curveBumpY:pA,curveLinearClosed:MA,curveLinear:vo,curveMonotoneX:CA,curveMonotoneY:$A,curveNatural:kA,curveStep:NA,curveStepAfter:DA,curveStepBefore:IA},ea=function(t){return t.x===+t.x&&t.y===+t.y},Nn=function(t){return t.x},In=function(t){return t.y},cN=function(t,r){if(V(t))return t;var n="curve".concat(ho(t));return(n==="curveMonotone"||n==="curveBump")&&r?Bg["".concat(n).concat(r==="vertical"?"Y":"X")]:Bg[n]||vo},lN=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,u=t.layout,s=t.connectNulls,c=s===void 0?!1:s,f=cN(n,u),l=c?a.filter(function(v){return ea(v)}):a,d;if(Array.isArray(o)){var h=c?o.filter(function(v){return ea(v)}):o,y=l.map(function(v,p){return Lg(Lg({},v),{},{base:h[p]})});return u==="vertical"?d=Hi().y(In).x1(Nn).x0(function(v){return v.base.x}):d=Hi().x(Nn).y1(In).y0(function(v){return v.base.y}),d.defined(ea).curve(f),d(y)}return u==="vertical"&&L(o)?d=Hi().y(In).x1(Nn).x0(o):L(o)?d=Hi().x(Nn).y1(In).y0(o):d=tx().x(Nn).y(In),d.defined(ea).curve(f),d(l)},zr=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?lN(t):i;return D.createElement("path",Rf({},G(t,!1),la(t),{className:J("recharts-curve",r),d:o,ref:a}))},bl={exports:{}},xl,Fg;function fN(){if(Fg)return xl;Fg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xl=e,xl}var wl,Wg;function dN(){if(Wg)return wl;Wg=1;var e=fN();function t(){}function r(){}return r.resetWarningCache=t,wl=function(){function n(o,u,s,c,f,l){if(l!==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 i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},wl}var Ug;function hN(){return Ug||(Ug=1,bl.exports=dN()()),bl.exports}var pN=hN();const ae=se(pN);var vN=Object.getOwnPropertyNames,yN=Object.getOwnPropertySymbols,mN=Object.prototype.hasOwnProperty;function zg(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function ta(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),u=a.get(n);if(o&&u)return o===n&&u===r;a.set(r,n),a.set(n,r);var s=e(r,n,i);return a.delete(r),a.delete(n),s}}function gN(e){return e?.[Symbol.toStringTag]}function Hg(e){return vN(e).concat(yN(e))}var bN=Object.hasOwn||(function(e,t){return mN.call(e,t)});function jr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var xN="__v",wN="__o",ON="_owner",Gg=Object.getOwnPropertyDescriptor,Kg=Object.keys;function _N(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 SN(e,t){return jr(e.getTime(),t.getTime())}function AN(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function PN(e,t){return e===t}function Yg(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,u,s=0;(o=a.next())&&!o.done;){for(var c=t.entries(),f=!1,l=0;(u=c.next())&&!u.done;){if(i[l]){l++;continue}var d=o.value,h=u.value;if(r.equals(d[0],h[0],s,l,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){f=i[l]=!0;break}l++}if(!f)return!1;s++}return!0}var jN=jr;function TN(e,t,r){var n=Kg(e),i=n.length;if(Kg(t).length!==i)return!1;for(;i-- >0;)if(!a1(e,t,r,n[i]))return!1;return!0}function Dn(e,t,r){var n=Hg(e),i=n.length;if(Hg(t).length!==i)return!1;for(var a,o,u;i-- >0;)if(a=n[i],!a1(e,t,r,a)||(o=Gg(e,a),u=Gg(t,a),(o||u)&&(!o||!u||o.configurable!==u.configurable||o.enumerable!==u.enumerable||o.writable!==u.writable)))return!1;return!0}function EN(e,t){return jr(e.valueOf(),t.valueOf())}function MN(e,t){return e.source===t.source&&e.flags===t.flags}function Vg(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,u;(o=a.next())&&!o.done;){for(var s=t.values(),c=!1,f=0;(u=s.next())&&!u.done;){if(!i[f]&&r.equals(o.value,u.value,o.value,u.value,e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1}return!0}function CN(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 $N(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 a1(e,t,r,n){return(n===ON||n===wN||n===xN)&&(e.$$typeof||t.$$typeof)?!0:bN(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var kN="[object Arguments]",NN="[object Boolean]",IN="[object Date]",DN="[object Error]",RN="[object Map]",qN="[object Number]",LN="[object Object]",BN="[object RegExp]",FN="[object Set]",WN="[object String]",UN="[object URL]",zN=Array.isArray,Xg=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,Zg=Object.assign,HN=Object.prototype.toString.call.bind(Object.prototype.toString);function GN(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,u=e.areObjectsEqual,s=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,f=e.areSetsEqual,l=e.areTypedArraysEqual,d=e.areUrlsEqual,h=e.unknownTagComparators;return function(v,p,g){if(v===p)return!0;if(v==null||p==null)return!1;var x=typeof v;if(x!==typeof p)return!1;if(x!=="object")return x==="number"?o(v,p,g):x==="function"?i(v,p,g):!1;var w=v.constructor;if(w!==p.constructor)return!1;if(w===Object)return u(v,p,g);if(zN(v))return t(v,p,g);if(Xg!=null&&Xg(v))return l(v,p,g);if(w===Date)return r(v,p,g);if(w===RegExp)return c(v,p,g);if(w===Map)return a(v,p,g);if(w===Set)return f(v,p,g);var O=HN(v);if(O===IN)return r(v,p,g);if(O===BN)return c(v,p,g);if(O===RN)return a(v,p,g);if(O===FN)return f(v,p,g);if(O===LN)return typeof v.then!="function"&&typeof p.then!="function"&&u(v,p,g);if(O===UN)return d(v,p,g);if(O===DN)return n(v,p,g);if(O===kN)return u(v,p,g);if(O===NN||O===qN||O===WN)return s(v,p,g);if(h){var m=h[O];if(!m){var b=gN(v);b&&(m=h[b])}if(m)return m(v,p,g)}return!1}}function KN(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Dn:_N,areDatesEqual:SN,areErrorsEqual:AN,areFunctionsEqual:PN,areMapsEqual:n?zg(Yg,Dn):Yg,areNumbersEqual:jN,areObjectsEqual:n?Dn:TN,arePrimitiveWrappersEqual:EN,areRegExpsEqual:MN,areSetsEqual:n?zg(Vg,Dn):Vg,areTypedArraysEqual:n?Dn:CN,areUrlsEqual:$N,unknownTagComparators:void 0};if(r&&(i=Zg({},i,r(i))),t){var a=ta(i.areArraysEqual),o=ta(i.areMapsEqual),u=ta(i.areObjectsEqual),s=ta(i.areSetsEqual);i=Zg({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:u,areSetsEqual:s})}return i}function YN(e){return function(t,r,n,i,a,o,u){return e(t,r,u)}}function VN(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(s,c){var f=n(),l=f.cache,d=l===void 0?t?new WeakMap:void 0:l,h=f.meta;return r(s,c,{cache:d,equals:i,meta:h,strict:a})};if(t)return function(s,c){return r(s,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(s,c){return r(s,c,o)}}var XN=Jt();Jt({strict:!0});Jt({circular:!0});Jt({circular:!0,strict:!0});Jt({createInternalComparator:function(){return jr}});Jt({strict:!0,createInternalComparator:function(){return jr}});Jt({circular:!0,createInternalComparator:function(){return jr}});Jt({circular:!0,createInternalComparator:function(){return jr},strict:!0});function Jt(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,u=KN(e),s=GN(u),c=n?n(s):YN(s);return VN({circular:r,comparator:s,createState:i,equals:c,strict:o})}function ZN(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Qg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):ZN(i)};requestAnimationFrame(n)}function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function QN(e){return rI(e)||tI(e)||eI(e)||JN()}function JN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eI(e,t){if(e){if(typeof e=="string")return Jg(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 Jg(e,t)}}function Jg(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 tI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rI(e){if(Array.isArray(e))return e}function nI(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,u=QN(o),s=u[0],c=u.slice(1);if(typeof s=="number"){Qg(i.bind(null,c),s);return}i(s),Qg(i.bind(null,c));return}qf(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function eb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eb(Object(r),!0).forEach(function(n){o1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o1(e,t,r){return t=iI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iI(e){var t=aI(e,"string");return gi(t)==="symbol"?t:String(t)}function aI(e,t){if(gi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oI=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},uI=function(t){return t},sI=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Gn=function(t,r){return Object.keys(r).reduce(function(n,i){return tb(tb({},n),{},o1({},i,t(i,r[i])))},{})},rb=function(t,r,n){return t.map(function(i){return"".concat(sI(i)," ").concat(r,"ms ").concat(n)}).join(",")};function cI(e,t){return dI(e)||fI(e,t)||u1(e,t)||lI()}function lI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
41
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function dI(e){if(Array.isArray(e))return e}function hI(e){return yI(e)||vI(e)||u1(e)||pI()}function pI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
42
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u1(e,t){if(e){if(typeof e=="string")return Lf(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 Lf(e,t)}}function vI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yI(e){if(Array.isArray(e))return Lf(e)}function Lf(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 Ra=1e-4,s1=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},c1=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},nb=function(t,r){return function(n){var i=s1(t,r);return c1(i,n)}},mI=function(t,r){return function(n){var i=s1(t,r),a=[].concat(hI(i.map(function(o,u){return o*u}).slice(1)),[0]);return c1(a,n)}},ib=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],u=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,u=1;break;case"ease":i=.25,a=.1,o=.25,u=1;break;case"ease-in":i=.42,a=0,o=1,u=1;break;case"ease-out":i=.42,a=0,o=.58,u=1;break;case"ease-in-out":i=0,a=0,o=.58,u=1;break;default:{var s=r[0].split("(");if(s[0]==="cubic-bezier"&&s[1].split(")")[0].split(",").length===4){var c=s[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=cI(c,4);i=f[0],a=f[1],o=f[2],u=f[3]}}}var l=nb(i,o),d=nb(a,u),h=mI(i,o),y=function(g){return g>1?1:g<0?0:g},v=function(g){for(var x=g>1?1:g,w=x,O=0;O<8;++O){var m=l(w)-x,b=h(w);if(Math.abs(m-x)<Ra||b<Ra)return d(w);w=y(w-m/b)}return d(w)};return v.isStepper=!1,v},gI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,u=o===void 0?17:o,s=function(f,l,d){var h=-(f-l)*n,y=d*a,v=d+(h-y)*u/1e3,p=d*u/1e3+f;return Math.abs(p-l)<Ra&&Math.abs(v)<Ra?[l,0]:[p,v]};return s.isStepper=!0,s.dt=u,s},bI=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return ib(i);case"spring":return gI();default:if(i.split("(")[0]==="cubic-bezier")return ib(i)}return typeof i=="function"?i:null};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 ab(e){return OI(e)||wI(e)||l1(e)||xI()}function xI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OI(e){if(Array.isArray(e))return Ff(e)}function ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(r),!0).forEach(function(n){Bf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bf(e,t,r){return t=_I(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _I(e){var t=SI(e,"string");return bi(t)==="symbol"?t:String(t)}function SI(e,t){if(bi(e)!=="object"||e===null)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 AI(e,t){return TI(e)||jI(e,t)||l1(e,t)||PI()}function PI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l1(e,t){if(e){if(typeof e=="string")return Ff(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 Ff(e,t)}}function Ff(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 jI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function TI(e){if(Array.isArray(e))return e}var qa=function(t,r,n){return t+(r-t)*n},Wf=function(t){var r=t.from,n=t.to;return r!==n},EI=function e(t,r,n){var i=Gn(function(a,o){if(Wf(o)){var u=t(o.from,o.to,o.velocity),s=AI(u,2),c=s[0],f=s[1];return ke(ke({},o),{},{from:c,velocity:f})}return o},r);return n<1?Gn(function(a,o){return Wf(o)?ke(ke({},o),{},{velocity:qa(o.velocity,i[a].velocity,n),from:qa(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const MI=(function(e,t,r,n,i){var a=oI(e,t),o=a.reduce(function(p,g){return ke(ke({},p),{},Bf({},g,[e[g],t[g]]))},{}),u=a.reduce(function(p,g){return ke(ke({},p),{},Bf({},g,{from:e[g],velocity:0,to:t[g]}))},{}),s=-1,c,f,l=function(){return null},d=function(){return Gn(function(g,x){return x.from},u)},h=function(){return!Object.values(u).filter(Wf).length},y=function(g){c||(c=g);var x=g-c,w=x/r.dt;u=EI(r,u,w),i(ke(ke(ke({},e),t),d())),c=g,h()||(s=requestAnimationFrame(l))},v=function(g){f||(f=g);var x=(g-f)/n,w=Gn(function(m,b){return qa.apply(void 0,ab(b).concat([r(x)]))},o);if(i(ke(ke(ke({},e),t),w)),x<1)s=requestAnimationFrame(l);else{var O=Gn(function(m,b){return qa.apply(void 0,ab(b).concat([r(1)]))},o);i(ke(ke(ke({},e),t),O))}};return l=r.isStepper?y:v,function(){return requestAnimationFrame(l),function(){cancelAnimationFrame(s)}}});function tn(e){"@babel/helpers - typeof";return tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn(e)}var CI=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function $I(e,t){if(e==null)return{};var r=kI(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kI(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Ol(e){return RI(e)||DI(e)||II(e)||NI()}function NI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function II(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 DI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RI(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 ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ub(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bn(e,t,r){return t=f1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LI(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,f1(n.key),n)}}function BI(e,t,r){return t&&LI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f1(e){var t=FI(e,"string");return tn(t)==="symbol"?t:String(t)}function FI(e,t){if(tn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zf(e,t)}function zf(e,t){return zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zf(e,t)}function UI(e){var t=zI();return function(){var n=La(e),i;if(t){var a=La(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Hf(this,i)}}function Hf(e,t){if(t&&(tn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gf(e)}function Gf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zI(){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 La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},La(e)}var xt=(function(e){WI(r,e);var t=UI(r);function r(n,i){var a;qI(this,r),a=t.call(this,n,i);var o=a.props,u=o.isActive,s=o.attributeName,c=o.from,f=o.to,l=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Gf(a)),a.changeStyle=a.changeStyle.bind(Gf(a)),!u||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),Hf(a);if(l&&l.length)a.state={style:l[0].style};else if(c){if(typeof d=="function")return a.state={style:c},Hf(a);a.state={style:s?Bn({},s,c):c}}else a.state={style:{}};return a}return BI(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,u=a.canBegin,s=a.attributeName,c=a.shouldReAnimate,f=a.to,l=a.from,d=this.state.style;if(u){if(!o){var h={style:s?Bn({},s,f):f};this.state&&d&&(s&&d[s]!==f||!s&&d!==f)&&this.setState(h);return}if(!(XN(i.to,f)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||c?l:i.to;if(this.state&&d){var p={style:s?Bn({},s,v):v};(s&&d[s]!==v||!s&&d!==v)&&this.setState(p)}this.runAnimation(st(st({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,u=i.to,s=i.duration,c=i.easing,f=i.begin,l=i.onAnimationEnd,d=i.onAnimationStart,h=MI(o,u,bI(c),s,this.changeStyle),y=function(){a.stopJSAnimation=h()};this.manager.start([d,f,y,s,l])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,u=i.begin,s=i.onAnimationStart,c=o[0],f=c.style,l=c.duration,d=l===void 0?0:l,h=function(v,p,g){if(g===0)return v;var x=p.duration,w=p.easing,O=w===void 0?"ease":w,m=p.style,b=p.properties,_=p.onAnimationEnd,A=g>0?o[g-1]:p,T=b||Object.keys(m);if(typeof O=="function"||O==="spring")return[].concat(Ol(v),[a.runJSAnimation.bind(a,{from:A.style,to:m,duration:x,easing:O}),x]);var $=rb(T,x,O),j=st(st(st({},A.style),m),{},{transition:$});return[].concat(Ol(v),[j,x,_]).filter(uI)};return this.manager.start([s].concat(Ol(o.reduce(h,[f,Math.max(d,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=nI());var a=i.begin,o=i.duration,u=i.attributeName,s=i.to,c=i.easing,f=i.onAnimationStart,l=i.onAnimationEnd,d=i.steps,h=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var v=u?Bn({},u,s):s,p=rb(Object.keys(v),o,c);y.start([f,a,st(st({},v),{},{transition:p}),o,l])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var s=$I(i,CI),c=D.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!u||c===0||o<=0)return a;var l=function(h){var y=h.props,v=y.style,p=v===void 0?{}:v,g=y.className,x=D.cloneElement(h,st(st({},s),{},{style:st(st({},p),f),className:g}));return x};return c===1?l(D.Children.only(a)):P.createElement("div",null,D.Children.map(a,function(d){return l(d)}))}}]),r})(D.PureComponent);xt.displayName="Animate";xt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};xt.propTypes={from:ae.oneOfType([ae.object,ae.string]),to:ae.oneOfType([ae.object,ae.string]),attributeName:ae.string,duration:ae.number,begin:ae.number,easing:ae.oneOfType([ae.string,ae.func]),steps:ae.arrayOf(ae.shape({duration:ae.number.isRequired,style:ae.object.isRequired,easing:ae.oneOfType([ae.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ae.func]),properties:ae.arrayOf("string"),onAnimationEnd:ae.func})),children:ae.oneOfType([ae.node,ae.func]),isActive:ae.bool,canBegin:ae.bool,onAnimationEnd:ae.func,shouldReAnimate:ae.bool,onAnimationStart:ae.func,onAnimationReStart:ae.func};function xi(e){"@babel/helpers - typeof";return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(e)}function Ba(){return Ba=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},Ba.apply(this,arguments)}function HI(e,t){return VI(e)||YI(e,t)||KI(e,t)||GI()}function GI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KI(e,t){if(e){if(typeof e=="string")return sb(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 sb(e,t)}}function sb(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 YI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function VI(e){if(Array.isArray(e))return e}function cb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cb(Object(r),!0).forEach(function(n){XI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XI(e,t,r){return t=ZI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZI(e){var t=QI(e,"string");return xi(t)=="symbol"?t:t+""}function QI(e,t){if(xi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fb=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),u=i>=0?1:-1,s=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var l=[0,0,0,0],d=0,h=4;d<h;d++)l[d]=a[d]>o?o:a[d];f="M".concat(t,",").concat(r+u*l[0]),l[0]>0&&(f+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(c,",").concat(t+s*l[0],",").concat(r)),f+="L ".concat(t+n-s*l[1],",").concat(r),l[1]>0&&(f+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(c,`,
|
|
47
|
+
`).concat(t+n,",").concat(r+u*l[1])),f+="L ".concat(t+n,",").concat(r+i-u*l[2]),l[2]>0&&(f+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(c,`,
|
|
48
|
+
`).concat(t+n-s*l[2],",").concat(r+i)),f+="L ".concat(t+s*l[3],",").concat(r+i),l[3]>0&&(f+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(c,`,
|
|
49
|
+
`).concat(t,",").concat(r+i-u*l[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);f="M ".concat(t,",").concat(r+u*y,`
|
|
50
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+s*y,",").concat(r,`
|
|
51
|
+
L `).concat(t+n-s*y,",").concat(r,`
|
|
52
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+n,",").concat(r+u*y,`
|
|
53
|
+
L `).concat(t+n,",").concat(r+i-u*y,`
|
|
54
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+n-s*y,",").concat(r+i,`
|
|
55
|
+
L `).concat(t+s*y,",").concat(r+i,`
|
|
56
|
+
A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t,",").concat(r+i-u*y," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},JI=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,u=r.width,s=r.height;if(Math.abs(u)>0&&Math.abs(s)>0){var c=Math.min(a,a+u),f=Math.max(a,a+u),l=Math.min(o,o+s),d=Math.max(o,o+s);return n>=c&&n<=f&&i>=l&&i<=d}return!1},eD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},dh=function(t){var r=lb(lb({},eD),t),n=D.useRef(),i=D.useState(-1),a=HI(i,2),o=a[0],u=a[1];D.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&u(O)}catch{}},[]);var s=r.x,c=r.y,f=r.width,l=r.height,d=r.radius,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,g=r.isAnimationActive,x=r.isUpdateAnimationActive;if(s!==+s||c!==+c||f!==+f||l!==+l||f===0||l===0)return null;var w=J("recharts-rectangle",h);return x?P.createElement(xt,{canBegin:o>0,from:{width:f,height:l,x:s,y:c},to:{width:f,height:l,x:s,y:c},duration:v,animationEasing:y,isActive:x},function(O){var m=O.width,b=O.height,_=O.x,A=O.y;return P.createElement(xt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:g,easing:y},P.createElement("path",Ba({},G(r,!0),{className:w,d:fb(_,A,m,b,d),ref:n})))}):P.createElement("path",Ba({},G(r,!0),{className:w,d:fb(s,c,f,l,d)}))},tD=["points","className","baseLinePoints","connectNulls"];function Dr(){return Dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dr.apply(this,arguments)}function rD(e,t){if(e==null)return{};var r=nD(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nD(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){return uD(e)||oD(e)||aD(e)||iD()}function iD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aD(e,t){if(e){if(typeof e=="string")return Kf(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 Kf(e,t)}}function oD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uD(e){if(Array.isArray(e))return Kf(e)}function Kf(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 hb=function(t){return t&&t.x===+t.x&&t.y===+t.y},sD=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){hb(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),hb(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Kn=function(t,r){var n=sD(t);r&&(n=[n.reduce(function(a,o){return[].concat(db(a),db(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,u,s){return"".concat(o).concat(s===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},cD=function(t,r,n){var i=Kn(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Kn(r.reverse(),n).slice(1))},lD=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=rD(t,tD);if(!r||!r.length)return null;var u=J("recharts-polygon",n);if(i&&i.length){var s=o.stroke&&o.stroke!=="none",c=cD(r,i,a);return P.createElement("g",{className:u},P.createElement("path",Dr({},G(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:c})),s?P.createElement("path",Dr({},G(o,!0),{fill:"none",d:Kn(r,a)})):null,s?P.createElement("path",Dr({},G(o,!0),{fill:"none",d:Kn(i,a)})):null)}var f=Kn(r,a);return P.createElement("path",Dr({},G(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:u,d:f}))};function Yf(){return Yf=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},Yf.apply(this,arguments)}var $o=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=J("recharts-dot",a);return r===+r&&n===+n&&i===+i?D.createElement("circle",Yf({},G(t,!1),la(t),{className:o,cx:r,cy:n,r:i})):null};function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}var fD=["x","y","top","left","width","height","className"];function Vf(){return Vf=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},Vf.apply(this,arguments)}function pb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pb(Object(r),!0).forEach(function(n){hD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hD(e,t,r){return t=pD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pD(e){var t=vD(e,"string");return wi(t)=="symbol"?t:t+""}function vD(e,t){if(wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yD(e,t){if(e==null)return{};var r=mD(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var gD=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},bD=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,u=o===void 0?0:o,s=t.left,c=s===void 0?0:s,f=t.width,l=f===void 0?0:f,d=t.height,h=d===void 0?0:d,y=t.className,v=yD(t,fD),p=dD({x:n,y:a,top:u,left:c,width:l,height:h},v);return!L(n)||!L(a)||!L(l)||!L(h)||!L(u)||!L(c)?null:P.createElement("path",Vf({},G(p,!0),{className:J("recharts-cross",y),d:gD(n,a,l,h,u,c)}))},_l,vb;function xD(){if(vb)return _l;vb=1;var e=jo(),t=Pw(),r=Ot();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return _l=n,_l}var wD=xD();const OD=se(wD);var Sl,yb;function _D(){if(yb)return Sl;yb=1;var e=jo(),t=Ot(),r=jw();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return Sl=n,Sl}var SD=_D();const AD=se(SD);var PD=["cx","cy","angle","ticks","axisLine"],jD=["ticks","tick","angle","tickFormatter","stroke"];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 Yn(){return Yn=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},Yn.apply(this,arguments)}function mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(n){ko(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gb(e,t){if(e==null)return{};var r=TD(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ED(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bb(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,h1(n.key),n)}}function MD(e,t,r){return t&&bb(e.prototype,t),r&&bb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CD(e,t,r){return t=Fa(t),$D(e,d1()?Reflect.construct(t,r||[],Fa(e).constructor):t.apply(e,r))}function $D(e,t){if(t&&(rn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kD(e)}function kD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d1=function(){return!!e})()}function Fa(e){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fa(e)}function ND(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&&Xf(e,t)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xf(e,t)}function ko(e,t,r){return t=h1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h1(e){var t=ID(e,"string");return rn(t)=="symbol"?t:t+""}function ID(e,t){if(rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var No=(function(e){function t(){return ED(this,t),CD(this,t,arguments)}return ND(t,e),MD(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,u=a.cx,s=a.cy;return de(u,s,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,u=n.ticks,s=OD(u,function(f){return f.coordinate||0}),c=AD(u,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:c.coordinate||0,outerRadius:s.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,u=n.ticks,s=n.axisLine,c=gb(n,PD),f=u.reduce(function(y,v){return[Math.min(y[0],v.coordinate),Math.max(y[1],v.coordinate)]},[1/0,-1/0]),l=de(i,a,f[0],o),d=de(i,a,f[1],o),h=ir(ir(ir({},G(c,!1)),{},{fill:"none"},G(s,!1)),{},{x1:l.x,y1:l.y,x2:d.x,y2:d.y});return P.createElement("line",Yn({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,u=i.angle,s=i.tickFormatter,c=i.stroke,f=gb(i,jD),l=this.getTickTextAnchor(),d=G(f,!1),h=G(o,!1),y=a.map(function(v,p){var g=n.getTickValueCoord(v),x=ir(ir(ir(ir({textAnchor:l,transform:"rotate(".concat(90-u,", ").concat(g.x,", ").concat(g.y,")")},d),{},{stroke:"none",fill:c},h),{},{index:p},g),{},{payload:v});return P.createElement(te,Yn({className:J("recharts-polar-radius-axis-tick",t1(o)),key:"tick-".concat(v.coordinate)},gr(n.props,v,p)),t.renderTickItem(o,x,s?s(v.value,p):v.value))});return P.createElement(te,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:P.createElement(te,{className:J("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Ce.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):V(n)?o=n(i):o=P.createElement(br,Yn({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])})(D.PureComponent);ko(No,"displayName","PolarRadiusAxis");ko(No,"axisType","radiusAxis");ko(No,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function nn(e){"@babel/helpers - typeof";return nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nn(e)}function cr(){return cr=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},cr.apply(this,arguments)}function xb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xb(Object(r),!0).forEach(function(n){Io(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wb(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,v1(n.key),n)}}function RD(e,t,r){return t&&wb(e.prototype,t),r&&wb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qD(e,t,r){return t=Wa(t),LD(e,p1()?Reflect.construct(t,r||[],Wa(e).constructor):t.apply(e,r))}function LD(e,t){if(t&&(nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BD(e)}function BD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p1=function(){return!!e})()}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wa(e)}function FD(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&&Zf(e,t)}function Zf(e,t){return Zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Zf(e,t)}function Io(e,t,r){return t=v1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v1(e){var t=WD(e,"string");return nn(t)=="symbol"?t:t+""}function WD(e,t){if(nn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UD=Math.PI/180,Ob=1e-5,Do=(function(e){function t(){return DD(this,t),qD(this,t,arguments)}return FD(t,e),RD(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,u=i.radius,s=i.orientation,c=i.tickSize,f=c||8,l=de(a,o,u,n.coordinate),d=de(a,o,u+(s==="inner"?-1:1)*f,n.coordinate);return{x1:l.x,y1:l.y,x2:d.x,y2:d.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*UD),o;return a>Ob?o=i==="outer"?"start":"end":a<-Ob?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,u=n.axisLine,s=n.axisLineType,c=ar(ar({},G(this.props,!1)),{},{fill:"none"},G(u,!1));if(s==="circle")return P.createElement($o,cr({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:o}));var f=this.props.ticks,l=f.map(function(d){return de(i,a,o,d.coordinate)});return P.createElement(lD,cr({className:"recharts-polar-angle-axis-line"},c,{points:l}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,u=i.tickLine,s=i.tickFormatter,c=i.stroke,f=G(this.props,!1),l=G(o,!1),d=ar(ar({},f),{},{fill:"none"},G(u,!1)),h=a.map(function(y,v){var p=n.getTickLineCoord(y),g=n.getTickTextAnchor(y),x=ar(ar(ar({textAnchor:g},f),{},{stroke:"none",fill:c},l),{},{index:v,payload:y,x:p.x2,y:p.y2});return P.createElement(te,cr({className:J("recharts-polar-angle-axis-tick",t1(o)),key:"tick-".concat(y.coordinate)},gr(n.props,y,v)),u&&P.createElement("line",cr({className:"recharts-polar-angle-axis-tick-line"},d,p)),o&&t.renderTickItem(o,x,s?s(y.value,v):y.value))});return P.createElement(te,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:P.createElement(te,{className:J("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):V(n)?o=n(i):o=P.createElement(br,cr({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])})(D.PureComponent);Io(Do,"displayName","PolarAngleAxis");Io(Do,"axisType","angleAxis");Io(Do,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Al,_b;function zD(){if(_b)return Al;_b=1;var e=Sx(),t=e(Object.getPrototypeOf,Object);return Al=t,Al}var Pl,Sb;function HD(){if(Sb)return Pl;Sb=1;var e=Dt(),t=zD(),r=Rt(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,u=a.hasOwnProperty,s=o.call(Object);function c(f){if(!r(f)||e(f)!=n)return!1;var l=t(f);if(l===null)return!0;var d=u.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&o.call(d)==s}return Pl=c,Pl}var GD=HD();const KD=se(GD);var jl,Ab;function YD(){if(Ab)return jl;Ab=1;var e=Dt(),t=Rt(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return jl=n,jl}var VD=YD();const XD=se(VD);function Oi(e){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oi(e)}function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ua.apply(this,arguments)}function ZD(e,t){return tR(e)||eR(e,t)||JD(e,t)||QD()}function QD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JD(e,t){if(e){if(typeof e=="string")return Pb(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 Pb(e,t)}}function Pb(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 eR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function tR(e){if(Array.isArray(e))return e}function jb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Tb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jb(Object(r),!0).forEach(function(n){rR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rR(e,t,r){return t=nR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nR(e){var t=iR(e,"string");return Oi(t)=="symbol"?t:t+""}function iR(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Eb=function(t,r,n,i,a){var o=n-i,u;return u="M ".concat(t,",").concat(r),u+="L ".concat(t+n,",").concat(r),u+="L ".concat(t+n-o/2,",").concat(r+a),u+="L ".concat(t+n-o/2-i,",").concat(r+a),u+="L ".concat(t,",").concat(r," Z"),u},aR={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oR=function(t){var r=Tb(Tb({},aR),t),n=D.useRef(),i=D.useState(-1),a=ZD(i,2),o=a[0],u=a[1];D.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&u(w)}catch{}},[]);var s=r.x,c=r.y,f=r.upperWidth,l=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,g=r.isUpdateAnimationActive;if(s!==+s||c!==+c||f!==+f||l!==+l||d!==+d||f===0&&l===0||d===0)return null;var x=J("recharts-trapezoid",h);return g?P.createElement(xt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:c},to:{upperWidth:f,lowerWidth:l,height:d,x:s,y:c},duration:v,animationEasing:y,isActive:g},function(w){var O=w.upperWidth,m=w.lowerWidth,b=w.height,_=w.x,A=w.y;return P.createElement(xt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},P.createElement("path",Ua({},G(r,!0),{className:x,d:Eb(_,A,O,m,b),ref:n})))}):P.createElement("g",null,P.createElement("path",Ua({},G(r,!0),{className:x,d:Eb(s,c,f,l,d)})))},uR=["option","shapeType","propTransformer","activeClassName","isActive"];function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}function sR(e,t){if(e==null)return{};var r=cR(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cR(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 Mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){lR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lR(e,t,r){return t=fR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fR(e){var t=dR(e,"string");return _i(t)=="symbol"?t:t+""}function dR(e,t){if(_i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hR(e,t){return za(za({},t),e)}function pR(e,t){return e==="symbols"}function Cb(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return P.createElement(dh,r);case"trapezoid":return P.createElement(oR,r);case"sector":return P.createElement(i1,r);case"symbols":if(pR(t))return P.createElement(Cd,r);break;default:return null}}function vR(e){return D.isValidElement(e)?e.props:e}function y1(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?hR:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,u=e.isActive,s=sR(e,uR),c;if(D.isValidElement(t))c=D.cloneElement(t,za(za({},s),vR(t)));else if(V(t))c=t(s);else if(KD(t)&&!XD(t)){var f=i(t,s);c=P.createElement(Cb,{shapeType:r,elementProps:f})}else{var l=s;c=P.createElement(Cb,{shapeType:r,elementProps:l})}return u?P.createElement(te,{className:o},c):c}function Ro(e,t){return t!=null&&"trapezoids"in e.props}function qo(e,t){return t!=null&&"sectors"in e.props}function Si(e,t){return t!=null&&"points"in e.props}function yR(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function mR(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function gR(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function bR(e,t){var r;return Ro(e,t)?r=yR:qo(e,t)?r=mR:Si(e,t)&&(r=gR),r}function xR(e,t){var r;return Ro(e,t)?r="trapezoids":qo(e,t)?r="sectors":Si(e,t)&&(r="points"),r}function wR(e,t){if(Ro(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(qo(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 Si(e,t)?t.payload:{}}function OR(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=xR(r,t),a=wR(r,t),o=n.filter(function(s,c){var f=Jr(a,s),l=r.props[i].filter(function(y){var v=bR(r,t);return v(y,t)}),d=r.props[i].indexOf(l[l.length-1]),h=c===d;return f&&h}),u=n.indexOf(o[o.length-1]);return u}var oa;function an(e){"@babel/helpers - typeof";return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(e)}function Rr(){return Rr=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},Rr.apply(this,arguments)}function $b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(r),!0).forEach(function(n){nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$b(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kb(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,g1(n.key),n)}}function SR(e,t,r){return t&&kb(e.prototype,t),r&&kb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function AR(e,t,r){return t=Ha(t),PR(e,m1()?Reflect.construct(t,r||[],Ha(e).constructor):t.apply(e,r))}function PR(e,t){if(t&&(an(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jR(e)}function jR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m1=function(){return!!e})()}function Ha(e){return Ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ha(e)}function TR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qf(e,t)}function Qf(e,t){return Qf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Qf(e,t)}function nt(e,t,r){return t=g1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g1(e){var t=ER(e,"string");return an(t)=="symbol"?t:t+""}function ER(e,t){if(an(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(an(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Lt=(function(e){function t(r){var n;return _R(this,t),n=AR(this,t,[r]),nt(n,"pieRef",null),nt(n,"sectorRefs",[]),nt(n,"id",wn("recharts-pie-")),nt(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),V(i)&&i()}),nt(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),V(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return TR(t,e),SR(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,u=a.labelLine,s=a.dataKey,c=a.valueKey,f=G(this.props,!1),l=G(o,!1),d=G(u,!1),h=o&&o.offsetRadius||20,y=n.map(function(v,p){var g=(v.startAngle+v.endAngle)/2,x=de(v.cx,v.cy,v.outerRadius+h,g),w=le(le(le(le({},f),v),{},{stroke:"none"},l),{},{index:p,textAnchor:t.getTextAnchor(x.x,v.cx)},x),O=le(le(le(le({},f),v),{},{fill:"none",stroke:v.fill},d),{},{index:p,points:[de(v.cx,v.cy,v.outerRadius,g),x]}),m=s;return Z(s)&&Z(c)?m="value":Z(s)&&(m=c),P.createElement(te,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},u&&t.renderLabelLineItem(u,O,"line"),t.renderLabelItem(o,w,je(v,m)))});return P.createElement(te,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,u=a.blendStroke,s=a.inactiveShape;return n.map(function(c,f){if(c?.startAngle===0&&c?.endAngle===0&&n.length!==1)return null;var l=i.isActiveIndex(f),d=s&&i.hasActiveIndex()?s:null,h=l?o:d,y=le(le({},c),{},{stroke:u?c.fill:c.stroke,tabIndex:-1});return P.createElement(te,Rr({ref:function(p){p&&!i.sectorRefs.includes(p)&&i.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},gr(i.props,c,f),{key:"sector-".concat(c?.startAngle,"-").concat(c?.endAngle,"-").concat(c.midAngle,"-").concat(f)}),P.createElement(y1,Rr({option:h,isActive:l,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,u=i.animationBegin,s=i.animationDuration,c=i.animationEasing,f=i.animationId,l=this.state,d=l.prevSectors,h=l.prevIsAnimationActive;return P.createElement(xt,{begin:u,duration:s,isActive:o,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var v=y.t,p=[],g=a&&a[0],x=g.startAngle;return a.forEach(function(w,O){var m=d&&d[O],b=O>0?Qe(w,"paddingAngle",0):0;if(m){var _=ze(m.endAngle-m.startAngle,w.endAngle-w.startAngle),A=le(le({},w),{},{startAngle:x+b,endAngle:x+_(v)+b});p.push(A),x=A.endAngle}else{var T=w.endAngle,$=w.startAngle,j=ze(0,T-$),M=j(v),C=le(le({},w),{},{startAngle:x+b,endAngle:x+M+b});p.push(C),x=C.endAngle}}),P.createElement(te,null,n.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Jr(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,u=i.className,s=i.label,c=i.cx,f=i.cy,l=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!o||!o.length||!L(c)||!L(f)||!L(l)||!L(d))return null;var v=J("recharts-pie",u);return P.createElement(te,{tabIndex:this.props.rootTabIndex,className:v,ref:function(g){n.pieRef=g}},this.renderSectors(),s&&this.renderLabels(o),Ce.renderCallByParent(this.props,null,!1),(!h||y)&&Ct.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(P.isValidElement(n))return P.cloneElement(n,i);if(V(n))return n(i);var o=J("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return P.createElement(zr,Rr({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(P.isValidElement(n))return P.cloneElement(n,i);var o=a;if(V(n)&&(o=n(i),P.isValidElement(o)))return o;var u=J("recharts-pie-label-text",typeof n!="boolean"&&!V(n)?n.className:"");return P.createElement(br,Rr({},i,{alignmentBaseline:"middle",className:u}),o)}}])})(D.PureComponent);oa=Lt;nt(Lt,"displayName","Pie");nt(Lt,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Sr.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});nt(Lt,"parseDeltaAngle",function(e,t){var r=Le(t-e),n=Math.min(Math.abs(t-e),360);return r*n});nt(Lt,"getRealPieData",function(e){var t=e.data,r=e.children,n=G(e,!1),i=at(r,xo);return t&&t.length?t.map(function(a,o){return le(le(le({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return le(le({},n),a.props)}):[]});nt(Lt,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,o=e1(i,a),u=n+Be(e.cx,i,i/2),s=r+Be(e.cy,a,a/2),c=Be(e.innerRadius,o,0),f=Be(e.outerRadius,o,o*.8),l=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:u,cy:s,innerRadius:c,outerRadius:f,maxRadius:l}});nt(Lt,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?le(le({},t.type.defaultProps),t.props):t.props,i=oa.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,u=n.endAngle,s=n.paddingAngle,c=n.dataKey,f=n.nameKey,l=n.valueKey,d=n.tooltipType,h=Math.abs(n.minAngle),y=oa.parseCoordinateOfPie(n,r),v=oa.parseDeltaAngle(o,u),p=Math.abs(v),g=c;Z(c)&&Z(l)?(dt(!1,`Use "dataKey" to specify the value of pie,
|
|
59
|
+
the props "valueKey" will be deprecated in 1.1.0`),g="value"):Z(c)&&(dt(!1,`Use "dataKey" to specify the value of pie,
|
|
60
|
+
the props "valueKey" will be deprecated in 1.1.0`),g=l);var x=i.filter(function(A){return je(A,g,0)!==0}).length,w=(p>=360?x:x-1)*s,O=p-x*h-w,m=i.reduce(function(A,T){var $=je(T,g,0);return A+(L($)?$:0)},0),b;if(m>0){var _;b=i.map(function(A,T){var $=je(A,g,0),j=je(A,f,T),M=(L($)?$:0)/m,C;T?C=_.endAngle+Le(v)*s*($!==0?1:0):C=o;var E=C+Le(v)*(($!==0?h:0)+M*O),k=(C+E)/2,I=(y.innerRadius+y.outerRadius)/2,R=[{name:j,value:$,payload:A,dataKey:g,type:d}],B=de(y.cx,y.cy,I,k);return _=le(le(le({percent:M,cornerRadius:a,name:j,tooltipPayload:R,midAngle:k,middleRadius:I,tooltipPosition:B},A),y),{},{value:je(A,g),startAngle:C,endAngle:E,payload:A,paddingAngle:Le(v)*s}),_})}return le(le({},y),{},{sectors:b,data:i})});var Tl,Nb;function MR(){if(Nb)return Tl;Nb=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var u=-1,s=t(e((i-n)/(a||1)),0),c=Array(s);s--;)c[o?s:++u]=n,n+=a;return c}return Tl=r,Tl}var El,Ib;function b1(){if(Ib)return El;Ib=1;var e=Bx(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*r}return i===i?i:0}return El=n,El}var Ml,Db;function CR(){if(Db)return Ml;Db=1;var e=MR(),t=bo(),r=b1();function n(i){return function(a,o,u){return u&&typeof u!="number"&&t(a,o,u)&&(o=u=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),u=u===void 0?a<o?1:-1:r(u),e(a,o,u,i)}}return Ml=n,Ml}var Cl,Rb;function $R(){if(Rb)return Cl;Rb=1;var e=CR(),t=e();return Cl=t,Cl}var kR=$R();const Ga=se(kR);function Ai(e){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ai(e)}function qb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qb(Object(r),!0).forEach(function(n){x1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x1(e,t,r){return t=NR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NR(e){var t=IR(e,"string");return Ai(t)=="symbol"?t:t+""}function IR(e,t){if(Ai(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DR=["Webkit","Moz","O","ms"],RR=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=DR.reduce(function(a,o){return Lb(Lb({},a),{},x1({},o+n,r))},{});return i[t]=r,i};function on(e){"@babel/helpers - typeof";return on=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},on(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)}function Bb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(r),!0).forEach(function(n){Ye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O1(n.key),n)}}function LR(e,t,r){return t&&Fb(e.prototype,t),r&&Fb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BR(e,t,r){return t=Ya(t),FR(e,w1()?Reflect.construct(t,r||[],Ya(e).constructor):t.apply(e,r))}function FR(e,t){if(t&&(on(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 w1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w1=function(){return!!e})()}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ya(e)}function UR(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&&Jf(e,t)}function Jf(e,t){return Jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Jf(e,t)}function Ye(e,t,r){return t=O1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O1(e){var t=zR(e,"string");return on(t)=="symbol"?t:t+""}function zR(e,t){if(on(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(on(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HR=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,u=t.travellerWidth;if(!r||!r.length)return{};var s=r.length,c=zn().domain(Ga(0,s)).range([a,a+o-u]),f=c.domain().map(function(l){return c(l)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(i),scale:c,scaleValues:f}},Wb=function(t){return t.changedTouches&&!!t.changedTouches.length},un=(function(e){function t(r){var n;return qR(this,t),n=BR(this,t,[r]),Ye(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Ye(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Ye(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,u=i.startIndex;o?.({endIndex:a,startIndex:u})}),n.detachDragEndListener()}),Ye(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Ye(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Ye(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Ye(n,"handleSlideDragStart",function(i){var a=Wb(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return UR(t,e),LR(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,u=this.props,s=u.gap,c=u.data,f=c.length-1,l=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,l),y=t.getIndexInRange(o,d);return{startIndex:h-h%s,endIndex:y===f?f:y-y%s}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,u=i.dataKey,s=je(a[n],u,n);return V(o)?o(s,n):s}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,u=i.endX,s=this.props,c=s.x,f=s.width,l=s.travellerWidth,d=s.startIndex,h=s.endIndex,y=s.onChange,v=n.pageX-a;v>0?v=Math.min(v,c+f-l-u,c+f-l-o):v<0&&(v=Math.max(v,c-o,c-u));var p=this.getIndex({startX:o+v,endX:u+v});(p.startIndex!==d||p.endIndex!==h)&&y&&y(p),this.setState({startX:o+v,endX:u+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=Wb(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,u=i.endX,s=i.startX,c=this.state[o],f=this.props,l=f.x,d=f.width,h=f.travellerWidth,y=f.onChange,v=f.gap,p=f.data,g={startX:this.state.startX,endX:this.state.endX},x=n.pageX-a;x>0?x=Math.min(x,l+d-h-c):x<0&&(x=Math.max(x,l-c)),g[o]=c+x;var w=this.getIndex(g),O=w.startIndex,m=w.endIndex,b=function(){var A=p.length-1;return o==="startX"&&(u>s?O%v===0:m%v===0)||u<s&&m===A||o==="endX"&&(u>s?m%v===0:O%v===0)||u>s&&m===A};this.setState(Ye(Ye({},o,c+x),"brushMoveStartX",n.pageX),function(){y&&b()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,u=o.scaleValues,s=o.startX,c=o.endX,f=this.state[i],l=u.indexOf(f);if(l!==-1){var d=l+n;if(!(d===-1||d>=u.length)){var h=u[d];i==="startX"&&h>=c||i==="endX"&&h<=s||this.setState(Ye({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,u=n.height,s=n.fill,c=n.stroke;return P.createElement("rect",{stroke:c,fill:s,x:i,y:a,width:o,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,u=n.height,s=n.data,c=n.children,f=n.padding,l=D.Children.only(c);return l?P.cloneElement(l,{x:i,y:a,width:o,height:u,margin:f,compact:!0,data:s}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,u=this,s=this.props,c=s.y,f=s.travellerWidth,l=s.height,d=s.traveller,h=s.ariaLabel,y=s.data,v=s.startIndex,p=s.endIndex,g=Math.max(n,this.props.x),x=$l($l({},G(this.props,!1)),{},{x:g,y:c,width:f,height:l}),w=h||"Min value: ".concat((a=y[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return P.createElement(te,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),u.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,x))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,u=a.height,s=a.stroke,c=a.travellerWidth,f=Math.min(n,i)+c,l=Math.max(Math.abs(i-n)-c,0);return P.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:s,fillOpacity:.2,x:f,y:o,width:l,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,u=n.height,s=n.travellerWidth,c=n.stroke,f=this.state,l=f.startX,d=f.endX,h=5,y={pointerEvents:"none",fill:c};return P.createElement(te,{className:"recharts-brush-texts"},P.createElement(br,Ka({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,d)-h,y:o+u/2},y),this.getTextOfTick(i)),P.createElement(br,Ka({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,d)+s+h,y:o+u/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,u=n.x,s=n.y,c=n.width,f=n.height,l=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,g=d.isTravellerMoving,x=d.isTravellerFocused;if(!i||!i.length||!L(u)||!L(s)||!L(c)||!L(f)||c<=0||f<=0)return null;var w=J("recharts-brush",a),O=P.Children.count(o)===1,m=RR("userSelect","none");return P.createElement(te,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||g||x||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,u=n.height,s=n.stroke,c=Math.floor(a+u/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:i,y:a,width:o,height:u,fill:s,stroke:"none"}),P.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),P.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return P.isValidElement(n)?a=P.cloneElement(n,i):V(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,u=n.x,s=n.travellerWidth,c=n.updateId,f=n.startIndex,l=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return $l({prevData:a,prevTravellerWidth:s,prevUpdateId:c,prevX:u,prevWidth:o},a&&a.length?HR({data:a,width:o,x:u,travellerWidth:s,startIndex:f,endIndex:l}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||u!==i.prevX||s!==i.prevTravellerWidth)){i.scale.range([u,u+o-s]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:s,prevUpdateId:c,prevX:u,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,u=a-1;u-o>1;){var s=Math.floor((o+u)/2);n[s]>i?u=s:o=s}return i>=n[u]?u:o}}])})(D.PureComponent);Ye(un,"displayName","Brush");Ye(un,"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 kl,Ub;function GR(){if(Ub)return kl;Ub=1;var e=qd();function t(r,n){var i;return e(r,function(a,o,u){return i=n(a,o,u),!i}),!!i}return kl=t,kl}var Nl,zb;function KR(){if(zb)return Nl;zb=1;var e=mx(),t=Ot(),r=GR(),n=Ge(),i=bo();function a(o,u,s){var c=n(o)?e:r;return s&&i(o,u,s)&&(u=void 0),c(o,t(u,3))}return Nl=a,Nl}var YR=KR();const VR=se(YR);var mt=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Il,Hb;function XR(){if(Hb)return Il;Hb=1;var e=Ix();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Il=t,Il}var Dl,Gb;function ZR(){if(Gb)return Dl;Gb=1;var e=XR(),t=kx(),r=Ot();function n(i,a){var o={};return a=r(a,3),t(i,function(u,s,c){e(o,s,a(u,s,c))}),o}return Dl=n,Dl}var QR=ZR();const JR=se(QR);var Rl,Kb;function e2(){if(Kb)return Rl;Kb=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(!r(t[n],n,t))return!1;return!0}return Rl=e,Rl}var ql,Yb;function t2(){if(Yb)return ql;Yb=1;var e=qd();function t(r,n){var i=!0;return e(r,function(a,o,u){return i=!!n(a,o,u),i}),i}return ql=t,ql}var Ll,Vb;function r2(){if(Vb)return Ll;Vb=1;var e=e2(),t=t2(),r=Ot(),n=Ge(),i=bo();function a(o,u,s){var c=n(o)?e:t;return s&&i(o,u,s)&&(u=void 0),c(o,r(u,3))}return Ll=a,Ll}var n2=r2();const _1=se(n2);var i2=["x","y"];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 ed(){return ed=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},ed.apply(this,arguments)}function Xb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xb(Object(r),!0).forEach(function(n){a2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a2(e,t,r){return t=o2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o2(e){var t=u2(e,"string");return Pi(t)=="symbol"?t:t+""}function u2(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 s2(e,t){if(e==null)return{};var r=c2(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c2(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 l2(e,t){var r=e.x,n=e.y,i=s2(e,i2),a="".concat(r),o=parseInt(a,10),u="".concat(n),s=parseInt(u,10),c="".concat(t.height||i.height),f=parseInt(c,10),l="".concat(t.width||i.width),d=parseInt(l,10);return Rn(Rn(Rn(Rn(Rn({},t),i),o?{x:o}:{}),s?{y:s}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function Zb(e){return P.createElement(y1,ed({shapeType:"rectangle",propTransformer:l2,activeClassName:"recharts-active-bar"},e))}var f2=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=L(n)||NS(n);return a?t(n,i):(a||wr(),r)}},d2=["value","background"],S1;function sn(e){"@babel/helpers - typeof";return sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(e)}function h2(e,t){if(e==null)return{};var r=p2(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p2(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 Va(){return Va=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},Va.apply(this,arguments)}function Qb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qb(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jb(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,P1(n.key),n)}}function y2(e,t,r){return t&&Jb(e.prototype,t),r&&Jb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m2(e,t,r){return t=Xa(t),g2(e,A1()?Reflect.construct(t,r||[],Xa(e).constructor):t.apply(e,r))}function g2(e,t){if(t&&(sn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b2(e)}function b2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A1=function(){return!!e})()}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xa(e)}function x2(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&&td(e,t)}function td(e,t){return td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},td(e,t)}function Kt(e,t,r){return t=P1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P1(e){var t=w2(e,"string");return sn(t)=="symbol"?t:t+""}function w2(e,t){if(sn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Li=(function(e){function t(){var r;v2(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=m2(this,t,[].concat(i)),Kt(r,"state",{isAnimationFinished:!1}),Kt(r,"id",wn("recharts-bar-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return x2(t,e),y2(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,u=a.dataKey,s=a.activeIndex,c=a.activeBar,f=G(this.props,!1);return n&&n.map(function(l,d){var h=d===s,y=h?c:o,v=be(be(be({},f),l),{},{isActive:h,option:y,index:d,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return P.createElement(te,Va({className:"recharts-bar-rectangle"},gr(i.props,l,d),{key:"rectangle-".concat(l?.x,"-").concat(l?.y,"-").concat(l?.value,"-").concat(d)}),P.createElement(Zb,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,u=i.isAnimationActive,s=i.animationBegin,c=i.animationDuration,f=i.animationEasing,l=i.animationId,d=this.state.prevData;return P.createElement(xt,{begin:s,duration:c,isActive:u,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,v=a.map(function(p,g){var x=d&&d[g];if(x){var w=ze(x.x,p.x),O=ze(x.y,p.y),m=ze(x.width,p.width),b=ze(x.height,p.height);return be(be({},p),{},{x:w(y),y:O(y),width:m(y),height:b(y)})}if(o==="horizontal"){var _=ze(0,p.height),A=_(y);return be(be({},p),{},{y:p.y+p.height-A,height:A})}var T=ze(0,p.width),$=T(y);return be(be({},p),{},{width:$})});return P.createElement(te,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Jr(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,u=i.activeIndex,s=G(this.props.background,!1);return a.map(function(c,f){c.value;var l=c.background,d=h2(c,d2);if(!l)return null;var h=be(be(be(be(be({},d),{},{fill:"#eee"},l),s),gr(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return P.createElement(Zb,Va({key:"background-bar-".concat(f),option:n.props.background,isActive:f===u},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,u=a.xAxis,s=a.yAxis,c=a.layout,f=a.children,l=at(f,Co);if(!l)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,h=function(p,g){var x=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:x,errorVal:je(p,g)}},y={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(te,y,l.map(function(v){return P.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:u,yAxis:s,layout:c,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,u=n.xAxis,s=n.yAxis,c=n.left,f=n.top,l=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(i||!a||!a.length)return null;var p=this.state.isAnimationFinished,g=J("recharts-bar",o),x=u&&u.allowDataOverflow,w=s&&s.allowDataOverflow,O=x||w,m=Z(v)?this.id:v;return P.createElement(te,{className:g},x||w?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(m)},P.createElement("rect",{x:x?c:c-l/2,y:w?f:f-d/2,width:x?l:l*2,height:w?d:d*2}))):null,P.createElement(te,{className:"recharts-bar-rectangles",clipPath:O?"url(#clipPath-".concat(m,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(O,m),(!h||p)&&Ct.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])})(D.PureComponent);S1=Li;Kt(Li,"displayName","Bar");Kt(Li,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Sr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Kt(Li,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,u=e.xAxisTicks,s=e.yAxisTicks,c=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,h=V$(n,r);if(!h)return null;var y=t.layout,v=r.type.defaultProps,p=v!==void 0?be(be({},v),r.props):r.props,g=p.dataKey,x=p.children,w=p.minPointSize,O=y==="horizontal"?o:a,m=c?O.scale.domain():null,b=rk({numericAxis:O}),_=at(x,xo),A=l.map(function(T,$){var j,M,C,E,k,I;c?j=X$(c[f+$],m):(j=je(T,g),Array.isArray(j)||(j=[b,j]));var R=f2(w,S1.defaultProps.minPointSize)(j[1],$);if(y==="horizontal"){var B,F=[o.scale(j[0]),o.scale(j[1])],H=F[0],Y=F[1];M=Sg({axis:a,ticks:u,bandSize:i,offset:h.offset,entry:T,index:$}),C=(B=Y??H)!==null&&B!==void 0?B:void 0,E=h.size;var U=H-Y;if(k=Number.isNaN(U)?0:U,I={x:M,y:o.y,width:E,height:o.height},Math.abs(R)>0&&Math.abs(k)<Math.abs(R)){var X=Le(k||R)*(Math.abs(R)-Math.abs(k));C-=X,k+=X}}else{var he=[a.scale(j[0]),a.scale(j[1])],ge=he[0],Ke=he[1];if(M=ge,C=Sg({axis:o,ticks:s,bandSize:i,offset:h.offset,entry:T,index:$}),E=Ke-ge,k=h.size,I={x:a.x,y:C,width:a.width,height:k},Math.abs(R)>0&&Math.abs(E)<Math.abs(R)){var er=Le(E||R)*(Math.abs(R)-Math.abs(E));E+=er}}return be(be(be({},T),{},{x:M,y:C,width:E,height:k,value:c?j:j[1],payload:T,background:I},_&&_[$]&&_[$].props),{},{tooltipPayload:[Qw(r,T)],tooltipPosition:{x:M+E/2,y:C+k/2}})});return be({data:A,layout:y},d)});function ji(e){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(e)}function O2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j1(n.key),n)}}function _2(e,t,r){return t&&e0(e.prototype,t),r&&e0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function t0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t0(Object(r),!0).forEach(function(n){Lo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lo(e,t,r){return t=j1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j1(e){var t=S2(e,"string");return ji(t)=="symbol"?t:t+""}function S2(e,t){if(ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A2=function(t,r,n,i,a){var o=t.width,u=t.height,s=t.layout,c=t.children,f=Object.keys(r),l={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:u-n.bottom,bottomMirror:u-n.bottom},d=!!Ve(c,Li);return f.reduce(function(h,y){var v=r[y],p=v.orientation,g=v.domain,x=v.padding,w=x===void 0?{}:x,O=v.mirror,m=v.reversed,b="".concat(p).concat(O?"Mirror":""),_,A,T,$,j;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var M=g[1]-g[0],C=1/0,E=v.categoricalDomain.sort(RS);if(E.forEach(function(he,ge){ge>0&&(C=Math.min((he||0)-(E[ge-1]||0),C))}),Number.isFinite(C)){var k=C/M,I=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(_=k*I/2),v.padding==="no-gap"){var R=Be(t.barCategoryGap,k*I),B=k*I/2;_=B-R-(B-R)/I*R}}}i==="xAxis"?A=[n.left+(w.left||0)+(_||0),n.left+n.width-(w.right||0)-(_||0)]:i==="yAxis"?A=s==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(_||0),n.top+n.height-(w.bottom||0)-(_||0)]:A=v.range,m&&(A=[A[1],A[0]]);var F=Yw(v,a,d),H=F.scale,Y=F.realScaleType;H.domain(g).range(A),Vw(H);var U=Xw(H,lt(lt({},v),{},{realScaleType:Y}));i==="xAxis"?(j=p==="top"&&!O||p==="bottom"&&O,T=n.left,$=l[b]-j*v.height):i==="yAxis"&&(j=p==="left"&&!O||p==="right"&&O,T=l[b]-j*v.width,$=n.top);var X=lt(lt(lt({},v),U),{},{realScaleType:Y,x:T,y:$,scale:H,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return X.bandSize=Na(X,U),!v.hide&&i==="xAxis"?l[b]+=(j?-1:1)*X.height:v.hide||(l[b]+=(j?-1:1)*X.width),lt(lt({},h),{},Lo({},y,X))},{})},T1=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},P2=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return T1({x:r,y:n},{x:i,y:a})},E1=(function(){function e(t){O2(this,e),this.scale=t}return _2(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])})();Lo(E1,"EPS",1e-4);var hh=function(t){var r=Object.keys(t).reduce(function(n,i){return lt(lt({},n),{},Lo({},i,E1.create(t[i])))},{});return lt(lt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,u=a.position;return JR(i,function(s,c){return r[c].apply(s,{bandAware:o,position:u})})},isInRange:function(i){return _1(i,function(a,o){return r[o].isInRange(a)})}})};function j2(e){return(e%180+180)%180}var T2=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=j2(i),o=a*Math.PI/180,u=Math.atan(n/r),s=o>u&&o<Math.PI-u?n/Math.sin(o):r/Math.cos(o);return Math.abs(s)},Bl,r0;function E2(){if(r0)return Bl;r0=1;var e=Ot(),t=Ni(),r=mo();function n(i){return function(a,o,u){var s=Object(a);if(!t(a)){var c=e(o,3);a=r(a),o=function(l){return c(s[l],l,s)}}var f=i(a,o,u);return f>-1?s[c?a[f]:f]:void 0}}return Bl=n,Bl}var Fl,n0;function M2(){if(n0)return Fl;n0=1;var e=b1();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Fl=t,Fl}var Wl,i0;function C2(){if(i0)return Wl;i0=1;var e=Tx(),t=Ot(),r=M2(),n=Math.max;function i(a,o,u){var s=a==null?0:a.length;if(!s)return-1;var c=u==null?0:r(u);return c<0&&(c=n(s+c,0)),e(a,t(o,3),c)}return Wl=i,Wl}var Ul,a0;function $2(){if(a0)return Ul;a0=1;var e=E2(),t=C2(),r=e(t);return Ul=r,Ul}var k2=$2();const N2=se(k2);var I2=z0();const D2=se(I2);var R2=D2(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("")}),ph=D.createContext(void 0),vh=D.createContext(void 0),M1=D.createContext(void 0),C1=D.createContext({}),$1=D.createContext(void 0),k1=D.createContext(0),N1=D.createContext(0),o0=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,u=t.children,s=t.width,c=t.height,f=R2(a);return P.createElement(ph.Provider,{value:n},P.createElement(vh.Provider,{value:i},P.createElement(C1.Provider,{value:a},P.createElement(M1.Provider,{value:f},P.createElement($1.Provider,{value:o},P.createElement(k1.Provider,{value:c},P.createElement(N1.Provider,{value:s},u)))))))},q2=function(){return D.useContext($1)},I1=function(t){var r=D.useContext(ph);r==null&&wr();var n=r[t];return n==null&&wr(),n},L2=function(){var t=D.useContext(ph);return Ht(t)},B2=function(){var t=D.useContext(vh),r=N2(t,function(n){return _1(n.domain,Number.isFinite)});return r||Ht(t)},D1=function(t){var r=D.useContext(vh);r==null&&wr();var n=r[t];return n==null&&wr(),n},F2=function(){var t=D.useContext(M1);return t},W2=function(){return D.useContext(C1)},yh=function(){return D.useContext(N1)},mh=function(){return D.useContext(k1)};function cn(e){"@babel/helpers - typeof";return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(e)}function U2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z2(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,q1(n.key),n)}}function H2(e,t,r){return t&&z2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function G2(e,t,r){return t=Za(t),K2(e,R1()?Reflect.construct(t,r||[],Za(e).constructor):t.apply(e,r))}function K2(e,t){if(t&&(cn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y2(e)}function Y2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R1=function(){return!!e})()}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Za(e)}function V2(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&&rd(e,t)}function rd(e,t){return rd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rd(e,t)}function u0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function s0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u0(Object(r),!0).forEach(function(n){gh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gh(e,t,r){return t=q1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q1(e){var t=X2(e,"string");return cn(t)=="symbol"?t:t+""}function X2(e,t){if(cn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Z2(e,t){return tq(e)||eq(e,t)||J2(e,t)||Q2()}function Q2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J2(e,t){if(e){if(typeof e=="string")return c0(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 c0(e,t)}}function c0(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 eq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function tq(e){if(Array.isArray(e))return e}function nd(){return nd=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},nd.apply(this,arguments)}var rq=function(t,r){var n;return P.isValidElement(t)?n=P.cloneElement(t,r):V(t)?n=t(r):n=P.createElement("line",nd({},r,{className:"recharts-reference-line-line"})),n},nq=function(t,r,n,i,a,o,u,s,c){var f=a.x,l=a.y,d=a.width,h=a.height;if(n){var y=c.y,v=t.y.apply(y,{position:o});if(mt(c,"discard")&&!t.y.isInRange(v))return null;var p=[{x:f+d,y:v},{x:f,y:v}];return s==="left"?p.reverse():p}if(r){var g=c.x,x=t.x.apply(g,{position:o});if(mt(c,"discard")&&!t.x.isInRange(x))return null;var w=[{x,y:l+h},{x,y:l}];return u==="top"?w.reverse():w}if(i){var O=c.segment,m=O.map(function(b){return t.apply(b,{position:o})});return mt(c,"discard")&&VR(m,function(b){return!t.isInRange(b)})?null:m}return null};function iq(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,u=e.className,s=e.alwaysShow,c=q2(),f=I1(i),l=D1(a),d=F2();if(!c||!d)return null;dt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=hh({x:f.scale,y:l.scale}),y=Te(t),v=Te(r),p=n&&n.length===2,g=nq(h,y,v,p,d,e.position,f.orientation,l.orientation,e);if(!g)return null;var x=Z2(g,2),w=x[0],O=w.x,m=w.y,b=x[1],_=b.x,A=b.y,T=mt(e,"hidden")?"url(#".concat(c,")"):void 0,$=s0(s0({clipPath:T},G(e,!0)),{},{x1:O,y1:m,x2:_,y2:A});return P.createElement(te,{className:J("recharts-reference-line",u)},rq(o,$),Ce.renderCallByParent(e,P2({x1:O,y1:m,x2:_,y2:A})))}var bh=(function(e){function t(){return U2(this,t),G2(this,t,arguments)}return V2(t,e),H2(t,[{key:"render",value:function(){return P.createElement(iq,this.props)}}])})(P.Component);gh(bh,"displayName","ReferenceLine");gh(bh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function id(){return id=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},id.apply(this,arguments)}function ln(e){"@babel/helpers - typeof";return ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ln(e)}function l0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function f0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(r),!0).forEach(function(n){Bo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oq(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,B1(n.key),n)}}function uq(e,t,r){return t&&oq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sq(e,t,r){return t=Qa(t),cq(e,L1()?Reflect.construct(t,r||[],Qa(e).constructor):t.apply(e,r))}function cq(e,t){if(t&&(ln(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lq(e)}function lq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L1=function(){return!!e})()}function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qa(e)}function fq(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&&ad(e,t)}function ad(e,t){return ad=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ad(e,t)}function Bo(e,t,r){return t=B1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B1(e){var t=dq(e,"string");return ln(t)=="symbol"?t:t+""}function dq(e,t){if(ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hq=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=hh({x:i.scale,y:a.scale}),u=o.apply({x:r,y:n},{bandAware:!0});return mt(t,"discard")&&!o.isInRange(u)?null:u},Fo=(function(e){function t(){return aq(this,t),sq(this,t,arguments)}return fq(t,e),uq(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,u=n.alwaysShow,s=n.clipPathId,c=Te(i),f=Te(a);if(dt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var l=hq(this.props);if(!l)return null;var d=l.x,h=l.y,y=this.props,v=y.shape,p=y.className,g=mt(this.props,"hidden")?"url(#".concat(s,")"):void 0,x=f0(f0({clipPath:g},G(this.props,!0)),{},{cx:d,cy:h});return P.createElement(te,{className:J("recharts-reference-dot",p)},t.renderDot(v,x),Ce.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])})(P.Component);Bo(Fo,"displayName","ReferenceDot");Bo(Fo,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Bo(Fo,"renderDot",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):V(e)?r=e(t):r=P.createElement($o,id({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function od(){return od=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},od.apply(this,arguments)}function fn(e){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(e)}function d0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function h0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d0(Object(r),!0).forEach(function(n){Wo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vq(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,W1(n.key),n)}}function yq(e,t,r){return t&&vq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mq(e,t,r){return t=Ja(t),gq(e,F1()?Reflect.construct(t,r||[],Ja(e).constructor):t.apply(e,r))}function gq(e,t){if(t&&(fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bq(e)}function bq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F1=function(){return!!e})()}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ja(e)}function xq(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&&ud(e,t)}function ud(e,t){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ud(e,t)}function Wo(e,t,r){return t=W1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W1(e){var t=wq(e,"string");return fn(t)=="symbol"?t:t+""}function wq(e,t){if(fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oq=function(t,r,n,i,a){var o=a.x1,u=a.x2,s=a.y1,c=a.y2,f=a.xAxis,l=a.yAxis;if(!f||!l)return null;var d=hh({x:f.scale,y:l.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(u,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(c,{position:"end"}):d.y.rangeMax};return mt(a,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:T1(h,y)},Uo=(function(e){function t(){return pq(this,t),mq(this,t,arguments)}return xq(t,e),yq(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,u=n.y2,s=n.className,c=n.alwaysShow,f=n.clipPathId;dt(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var l=Te(i),d=Te(a),h=Te(o),y=Te(u),v=this.props.shape;if(!l&&!d&&!h&&!y&&!v)return null;var p=Oq(l,d,h,y,this.props);if(!p&&!v)return null;var g=mt(this.props,"hidden")?"url(#".concat(f,")"):void 0;return P.createElement(te,{className:J("recharts-reference-area",s)},t.renderRect(v,h0(h0({clipPath:g},G(this.props,!0)),p)),Ce.renderCallByParent(this.props,p))}}])})(P.Component);Wo(Uo,"displayName","ReferenceArea");Wo(Uo,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Wo(Uo,"renderRect",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):V(e)?r=e(t):r=P.createElement(dh,od({},t,{className:"recharts-reference-area-rect"})),r});function U1(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function _q(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return T2(n,r)}function Sq(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,u=e.height;return t===1?{start:n?i:a,end:n?i+o:a+u}:{start:n?i+o:a+u,end:n?i:a}}function eo(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Aq(e,t){return U1(e,t+1)}function Pq(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,u=t.end,s=0,c=1,f=o,l=function(){var y=n?.[s];if(y===void 0)return{v:U1(n,c)};var v=s,p,g=function(){return p===void 0&&(p=r(y,v)),p},x=y.coordinate,w=s===0||eo(e,x,g,f,u);w||(s=0,f=o,c+=1),w&&(f=x+e*(g()/2+i),s+=c)},d;c<=a.length;)if(d=l(),d)return d.v;return[]}function Ti(e){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(e)}function p0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p0(Object(r),!0).forEach(function(n){jq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jq(e,t,r){return t=Tq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tq(e){var t=Eq(e,"string");return Ti(t)=="symbol"?t:t+""}function Eq(e,t){if(Ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mq(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,u=t.start,s=t.end,c=function(d){var h=a[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=e*(h.coordinate+e*v()/2-s);a[d]=h=Ne(Ne({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate})}else a[d]=h=Ne(Ne({},h),{},{tickCoord:h.coordinate});var g=eo(e,h.tickCoord,v,u,s);g&&(s=h.tickCoord-e*(v()/2+i),a[d]=Ne(Ne({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return a}function Cq(e,t,r,n,i,a){var o=(n||[]).slice(),u=o.length,s=t.start,c=t.end;if(a){var f=n[u-1],l=r(f,u-1),d=e*(f.coordinate+e*l/2-c);o[u-1]=f=Ne(Ne({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=eo(e,f.tickCoord,function(){return l},s,c);h&&(c=f.tickCoord-e*(l/2+i),o[u-1]=Ne(Ne({},f),{},{isShow:!0}))}for(var y=a?u-1:u,v=function(x){var w=o[x],O,m=function(){return O===void 0&&(O=r(w,x)),O};if(x===0){var b=e*(w.coordinate-e*m()/2-s);o[x]=w=Ne(Ne({},w),{},{tickCoord:b<0?w.coordinate-b*e:w.coordinate})}else o[x]=w=Ne(Ne({},w),{},{tickCoord:w.coordinate});var _=eo(e,w.tickCoord,m,s,c);_&&(s=w.tickCoord+e*(m()/2+i),o[x]=Ne(Ne({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function xh(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,u=e.orientation,s=e.interval,c=e.tickFormatter,f=e.unit,l=e.angle;if(!i||!i.length||!n)return[];if(L(s)||Sr.isSsr)return Aq(i,typeof s=="number"&&L(s)?s:0);var d=[],h=u==="top"||u==="bottom"?"width":"height",y=f&&h==="width"?Un(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(w,O){var m=V(c)?c(w.value,O):w.value;return h==="width"?_q(Un(m,{fontSize:t,letterSpacing:r}),y,l):Un(m,{fontSize:t,letterSpacing:r})[h]},p=i.length>=2?Le(i[1].coordinate-i[0].coordinate):1,g=Sq(a,p,h);return s==="equidistantPreserveStart"?Pq(p,g,v,i,o):(s==="preserveStart"||s==="preserveStartEnd"?d=Cq(p,g,v,i,o,s==="preserveStartEnd"):d=Mq(p,g,v,i,o),d.filter(function(x){return x.isShow}))}var $q=["viewBox"],kq=["viewBox"],Nq=["ticks"];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 qr(){return qr=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},qr.apply(this,arguments)}function v0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ae(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){wh(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 zl(e,t){if(e==null)return{};var r=Iq(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Iq(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 Dq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y0(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,H1(n.key),n)}}function Rq(e,t,r){return t&&y0(e.prototype,t),r&&y0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qq(e,t,r){return t=to(t),Lq(e,z1()?Reflect.construct(t,r||[],to(e).constructor):t.apply(e,r))}function Lq(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 Bq(e)}function Bq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z1=function(){return!!e})()}function to(e){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},to(e)}function Fq(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&&sd(e,t)}function sd(e,t){return sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},sd(e,t)}function wh(e,t,r){return t=H1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H1(e){var t=Wq(e,"string");return dn(t)=="symbol"?t:t+""}function Wq(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 Pn=(function(e){function t(r){var n;return Dq(this,t),n=qq(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Fq(t,e),Rq(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=zl(n,$q),u=this.props,s=u.viewBox,c=zl(u,kq);return!Br(a,s)||!Br(o,c)||!Br(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,u=i.width,s=i.height,c=i.orientation,f=i.tickSize,l=i.mirror,d=i.tickMargin,h,y,v,p,g,x,w=l?-1:1,O=n.tickSize||f,m=L(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":h=y=n.coordinate,p=o+ +!l*s,v=p-w*O,x=v-w*d,g=m;break;case"left":v=p=n.coordinate,y=a+ +!l*u,h=y-w*O,g=h-w*d,x=m;break;case"right":v=p=n.coordinate,y=a+ +l*u,h=y+w*O,g=h+w*d,x=m;break;default:h=y=n.coordinate,p=o+ +l*s,v=p+w*O,x=v+w*d,g=m;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x:g,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,u=n.height,s=n.orientation,c=n.mirror,f=n.axisLine,l=Ae(Ae(Ae({},G(this.props,!1)),G(f,!1)),{},{fill:"none"});if(s==="top"||s==="bottom"){var d=+(s==="top"&&!c||s==="bottom"&&c);l=Ae(Ae({},l),{},{x1:i,y1:a+d*u,x2:i+o,y2:a+d*u})}else{var h=+(s==="left"&&!c||s==="right"&&c);l=Ae(Ae({},l),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+u})}return P.createElement("line",qr({},l,{className:J("recharts-cartesian-axis-line",Qe(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,u=this.props,s=u.tickLine,c=u.stroke,f=u.tick,l=u.tickFormatter,d=u.unit,h=xh(Ae(Ae({},this.props),{},{ticks:n}),i,a),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=G(this.props,!1),g=G(f,!1),x=Ae(Ae({},p),{},{fill:"none"},G(s,!1)),w=h.map(function(O,m){var b=o.getTickLineCoord(O),_=b.line,A=b.tick,T=Ae(Ae(Ae(Ae({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:c},g),A),{},{index:m,payload:O,visibleTicksCount:h.length,tickFormatter:l});return P.createElement(te,qr({className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},gr(o.props,O,m)),s&&P.createElement("line",qr({},x,_,{className:J("recharts-cartesian-axis-tick-line",Qe(s,"className"))})),f&&t.renderTickItem(f,T,"".concat(V(l)?l(O.value,m):O.value).concat(d||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,u=i.height,s=i.ticksGenerator,c=i.className,f=i.hide;if(f)return null;var l=this.props,d=l.ticks,h=zl(l,Nq),y=d;return V(s)&&(y=d&&d.length>0?s(this.props):s(h)),o<=0||u<=0||!y||!y.length?null:P.createElement(te,{className:J("recharts-cartesian-axis",c),ref:function(p){n.layerReference=p}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Ce.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,u=J(i.className,"recharts-cartesian-axis-tick-value");return P.isValidElement(n)?o=P.cloneElement(n,Ae(Ae({},i),{},{className:u})):V(n)?o=n(Ae(Ae({},i),{},{className:u})):o=P.createElement(br,qr({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(D.Component);wh(Pn,"displayName","CartesianAxis");wh(Pn,"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 Uq=["x1","y1","x2","y2","key"],zq=["offset"];function Or(e){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(e)}function m0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m0(Object(r),!0).forEach(function(n){Hq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hq(e,t,r){return t=Gq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gq(e){var t=Kq(e,"string");return Or(t)=="symbol"?t:t+""}function Kq(e,t){if(Or(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Or(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hr.apply(this,arguments)}function g0(e,t){if(e==null)return{};var r=Yq(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Yq(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 Vq=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,u=t.height,s=t.ry;return P.createElement("rect",{x:i,y:a,ry:s,width:o,height:u,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function G1(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(V(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,u=t.key,s=g0(t,Uq),c=G(s,!1);c.offset;var f=g0(c,zq);r=P.createElement("line",hr({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:u}))}return r}function Xq(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(u,s){var c=Ie(Ie({},e),{},{x1:t,y1:u,x2:t+r,y2:u,key:"line-".concat(s),index:s});return G1(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Zq(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(u,s){var c=Ie(Ie({},e),{},{x1:u,y1:t,x2:u,y2:t+r,key:"line-".concat(s),index:s});return G1(i,c)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Qq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,u=e.horizontalPoints,s=e.horizontal,c=s===void 0?!0:s;if(!c||!t||!t.length)return null;var f=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?i+o-d:f[h+1]-d;if(v<=0)return null;var p=h%t.length;return P.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:a,stroke:"none",fill:t[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}function Jq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,u=e.width,s=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var f=c.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var l=f.map(function(d,h){var y=!f[h+1],v=y?a+u-d:f[h+1]-d;if(v<=0)return null;var p=h%n.length;return P.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:s,stroke:"none",fill:n[p],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}var eL=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return Kw(xh(Ie(Ie(Ie({},Pn.defaultProps),n),{},{ticks:Tt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},tL=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return Kw(xh(Ie(Ie(Ie({},Pn.defaultProps),n),{},{ticks:Tt(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Nr={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function K1(e){var t,r,n,i,a,o,u=yh(),s=mh(),c=W2(),f=Ie(Ie({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Nr.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Nr.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Nr.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Nr.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Nr.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Nr.verticalFill,x:L(e.x)?e.x:c.left,y:L(e.y)?e.y:c.top,width:L(e.width)?e.width:c.width,height:L(e.height)?e.height:c.height}),l=f.x,d=f.y,h=f.width,y=f.height,v=f.syncWithTicks,p=f.horizontalValues,g=f.verticalValues,x=L2(),w=B2();if(!L(h)||h<=0||!L(y)||y<=0||!L(l)||l!==+l||!L(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||eL,m=f.horizontalCoordinatesGenerator||tL,b=f.horizontalPoints,_=f.verticalPoints;if((!b||!b.length)&&V(m)){var A=p&&p.length,T=m({yAxis:w?Ie(Ie({},w),{},{ticks:A?p:w.ticks}):void 0,width:u,height:s,offset:c},A?!0:v);dt(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Or(T),"]")),Array.isArray(T)&&(b=T)}if((!_||!_.length)&&V(O)){var $=g&&g.length,j=O({xAxis:x?Ie(Ie({},x),{},{ticks:$?g:x.ticks}):void 0,width:u,height:s,offset:c},$?!0:v);dt(Array.isArray(j),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Or(j),"]")),Array.isArray(j)&&(_=j)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(Vq,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),P.createElement(Xq,hr({},f,{offset:c,horizontalPoints:b,xAxis:x,yAxis:w})),P.createElement(Zq,hr({},f,{offset:c,verticalPoints:_,xAxis:x,yAxis:w})),P.createElement(Qq,hr({},f,{horizontalPoints:b})),P.createElement(Jq,hr({},f,{verticalPoints:_})))}K1.displayName="CartesianGrid";var rL=["layout","type","stroke","connectNulls","isRange","ref"],nL=["key"],Y1;function hn(e){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(e)}function V1(e,t){if(e==null)return{};var r=iL(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iL(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 pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pr.apply(this,arguments)}function b0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(r),!0).forEach(function(n){vt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x0(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,Z1(n.key),n)}}function oL(e,t,r){return t&&x0(e.prototype,t),r&&x0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uL(e,t,r){return t=ro(t),sL(e,X1()?Reflect.construct(t,r||[],ro(e).constructor):t.apply(e,r))}function sL(e,t){if(t&&(hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cL(e)}function cL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X1=function(){return!!e})()}function ro(e){return ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ro(e)}function lL(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&&cd(e,t)}function cd(e,t){return cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},cd(e,t)}function vt(e,t,r){return t=Z1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z1(e){var t=fL(e,"string");return hn(t)=="symbol"?t:t+""}function fL(e,t){if(hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var It=(function(e){function t(){var r;aL(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=uL(this,t,[].concat(i)),vt(r,"state",{isAnimationFinished:!0}),vt(r,"id",wn("recharts-area-")),vt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),V(o)&&o()}),vt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),V(o)&&o()}),r}return lL(t,e),oL(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(o&&!u)return null;var s=this.props,c=s.dot,f=s.points,l=s.dataKey,d=G(this.props,!1),h=G(c,!0),y=f.map(function(p,g){var x=Ut(Ut(Ut({key:"dot-".concat(g),r:3},d),h),{},{index:g,cx:p.x,cy:p.y,dataKey:l,value:p.value,payload:p.payload,points:f});return t.renderDotItem(c,x)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return P.createElement(te,pr({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,u=i.strokeWidth,s=o[0].x,c=o[o.length-1].x,f=n*Math.abs(s-c),l=Gt(o.map(function(d){return d.y||0}));return L(a)&&typeof a=="number"?l=Math.max(a,l):a&&Array.isArray(a)&&a.length&&(l=Math.max(Gt(a.map(function(d){return d.y||0})),l)),L(l)?P.createElement("rect",{x:s<c?s:s-f,y:0,width:f,height:Math.floor(l+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,u=i.strokeWidth,s=o[0].y,c=o[o.length-1].y,f=n*Math.abs(s-c),l=Gt(o.map(function(d){return d.x||0}));return L(a)&&typeof a=="number"?l=Math.max(a,l):a&&Array.isArray(a)&&a.length&&(l=Math.max(Gt(a.map(function(d){return d.x||0})),l)),L(l)?P.createElement("rect",{x:0,y:s<c?s:s-f,width:l+(u?parseInt("".concat(u),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var u=this.props,s=u.layout,c=u.type,f=u.stroke,l=u.connectNulls,d=u.isRange;u.ref;var h=V1(u,rL);return P.createElement(te,{clipPath:a?"url(#clipPath-".concat(o,")"):null},P.createElement(zr,pr({},G(h,!0),{points:n,connectNulls:l,type:c,baseLine:i,layout:s,stroke:"none",className:"recharts-area-area"})),f!=="none"&&P.createElement(zr,pr({},G(this.props,!1),{className:"recharts-area-curve",layout:s,type:c,connectNulls:l,fill:"none",points:n})),f!=="none"&&d&&P.createElement(zr,pr({},G(this.props,!1),{className:"recharts-area-curve",layout:s,type:c,connectNulls:l,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,u=o.points,s=o.baseLine,c=o.isAnimationActive,f=o.animationBegin,l=o.animationDuration,d=o.animationEasing,h=o.animationId,y=this.state,v=y.prevPoints,p=y.prevBaseLine;return P.createElement(xt,{begin:f,duration:l,isActive:c,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var x=g.t;if(v){var w=v.length/u.length,O=u.map(function(A,T){var $=Math.floor(T*w);if(v[$]){var j=v[$],M=ze(j.x,A.x),C=ze(j.y,A.y);return Ut(Ut({},A),{},{x:M(x),y:C(x)})}return A}),m;if(L(s)&&typeof s=="number"){var b=ze(p,s);m=b(x)}else if(Z(s)||xn(s)){var _=ze(p,0);m=_(x)}else m=s.map(function(A,T){var $=Math.floor(T*w);if(p[$]){var j=p[$],M=ze(j.x,A.x),C=ze(j.y,A.y);return Ut(Ut({},A),{},{x:M(x),y:C(x)})}return A});return a.renderAreaStatically(O,m,n,i)}return P.createElement(te,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(x))),P.createElement(te,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(u,s,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,u=a.baseLine,s=a.isAnimationActive,c=this.state,f=c.prevPoints,l=c.prevBaseLine,d=c.totalLength;return s&&o&&o.length&&(!f&&d>0||!Jr(f,o)||!Jr(l,u))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,u,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,u=i.points,s=i.className,c=i.top,f=i.left,l=i.xAxis,d=i.yAxis,h=i.width,y=i.height,v=i.isAnimationActive,p=i.id;if(a||!u||!u.length)return null;var g=this.state.isAnimationFinished,x=u.length===1,w=J("recharts-area",s),O=l&&l.allowDataOverflow,m=d&&d.allowDataOverflow,b=O||m,_=Z(p)?this.id:p,A=(n=G(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},T=A.r,$=T===void 0?3:T,j=A.strokeWidth,M=j===void 0?2:j,C=GS(o)?o:{},E=C.clipDot,k=E===void 0?!0:E,I=$*2+M;return P.createElement(te,{className:w},O||m?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(_)},P.createElement("rect",{x:O?f:f-h/2,y:m?c:c-y/2,width:O?h:h*2,height:m?y:y*2})),!k&&P.createElement("clipPath",{id:"clipPath-dots-".concat(_)},P.createElement("rect",{x:f-I/2,y:c-I/2,width:h+I,height:y+I}))):null,x?null:this.renderArea(b,_),(o||x)&&this.renderDots(b,k,_),(!v||g)&&Ct.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(D.PureComponent);Y1=It;vt(It,"displayName","Area");vt(It,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Sr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});vt(It,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,u=o??a;if(L(u)&&typeof u=="number")return u;var s=i==="horizontal"?n:r,c=s.scale.domain();if(s.type==="number"){var f=Math.max(c[0],c[1]),l=Math.min(c[0],c[1]);return u==="dataMin"?l:u==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return u==="dataMin"?c[0]:u==="dataMax"?c[1]:c[0]});vt(It,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,u=e.bandSize,s=e.dataKey,c=e.stackedData,f=e.dataStartIndex,l=e.displayedData,d=e.offset,h=t.layout,y=c&&c.length,v=Y1.getBaseValue(t,r,n,i),p=h==="horizontal",g=!1,x=l.map(function(O,m){var b;y?b=c[f+m]:(b=je(O,s),Array.isArray(b)?g=!0:b=[v,b]);var _=b[1]==null||y&&je(O,s)==null;return p?{x:_g({axis:n,ticks:a,bandSize:u,entry:O,index:m}),y:_?null:i.scale(b[1]),value:b,payload:O}:{x:_?null:n.scale(b[1]),y:_g({axis:i,ticks:o,bandSize:u,entry:O,index:m}),value:b,payload:O}}),w;return y||g?w=x.map(function(O){var m=Array.isArray(O.value)?O.value[0]:null;return p?{x:O.x,y:m!=null&&O.y!=null?i.scale(m):null}:{x:m!=null?n.scale(m):null,y:O.y}}):w=p?i.scale(v):n.scale(v),Ut({points:x,baseLine:w,layout:h,isRange:g},d)});vt(It,"renderDotItem",function(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(V(e))r=e(t);else{var n=J("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=V1(t,nL);r=P.createElement($o,pr({},a,{key:i,className:n}))}return r});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 dL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eO(n.key),n)}}function pL(e,t,r){return t&&hL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vL(e,t,r){return t=no(t),yL(e,Q1()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function yL(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 mL(e)}function mL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q1=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function gL(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&&ld(e,t)}function ld(e,t){return ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ld(e,t)}function J1(e,t,r){return t=eO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eO(e){var t=bL(e,"string");return pn(t)=="symbol"?t:t+""}function bL(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)}function fd(){return fd=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},fd.apply(this,arguments)}function xL(e){var t=e.xAxisId,r=yh(),n=mh(),i=I1(t);return i==null?null:D.createElement(Pn,fd({},i,{className:J("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Tt(o,!0)}}))}var zo=(function(e){function t(){return dL(this,t),vL(this,t,arguments)}return gL(t,e),pL(t,[{key:"render",value:function(){return D.createElement(xL,this.props)}}])})(D.Component);J1(zo,"displayName","XAxis");J1(zo,"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 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 wL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OL(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,nO(n.key),n)}}function _L(e,t,r){return t&&OL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SL(e,t,r){return t=io(t),AL(e,tO()?Reflect.construct(t,r||[],io(e).constructor):t.apply(e,r))}function AL(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 PL(e)}function PL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tO=function(){return!!e})()}function io(e){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},io(e)}function jL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dd(e,t)}function dd(e,t){return dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},dd(e,t)}function rO(e,t,r){return t=nO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nO(e){var t=TL(e,"string");return vn(t)=="symbol"?t:t+""}function TL(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 hd(){return hd=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},hd.apply(this,arguments)}var EL=function(t){var r=t.yAxisId,n=yh(),i=mh(),a=D1(r);return a==null?null:D.createElement(Pn,hd({},a,{className:J("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return Tt(u,!0)}}))},Ei=(function(e){function t(){return wL(this,t),SL(this,t,arguments)}return jL(t,e),_L(t,[{key:"render",value:function(){return D.createElement(EL,this.props)}}])})(D.Component);rO(Ei,"displayName","YAxis");rO(Ei,"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 w0(e){return kL(e)||$L(e)||CL(e)||ML()}function ML(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CL(e,t){if(e){if(typeof e=="string")return pd(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 pd(e,t)}}function $L(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kL(e){if(Array.isArray(e))return pd(e)}function pd(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 vd=function(t,r,n,i,a){var o=at(t,bh),u=at(t,Fo),s=[].concat(w0(o),w0(u)),c=at(t,Uo),f="".concat(i,"Id"),l=i[0],d=r;if(s.length&&(d=s.reduce(function(v,p){if(p.props[f]===n&&mt(p.props,"extendDomain")&&L(p.props[l])){var g=p.props[l];return[Math.min(v[0],g),Math.max(v[1],g)]}return v},d)),c.length){var h="".concat(l,"1"),y="".concat(l,"2");d=c.reduce(function(v,p){if(p.props[f]===n&&mt(p.props,"extendDomain")&&L(p.props[h])&&L(p.props[y])){var g=p.props[h],x=p.props[y];return[Math.min(v[0],g,x),Math.max(v[1],g,x)]}return v},d)}return a&&a.length&&(d=a.reduce(function(v,p){return L(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},Hl={exports:{}},O0;function NL(){return O0||(O0=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(s,c,f){this.fn=s,this.context=c,this.once=f||!1}function a(s,c,f,l,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,l||s,d),y=r?r+c:c;return s._events[y]?s._events[y].fn?s._events[y]=[s._events[y],h]:s._events[y].push(h):(s._events[y]=h,s._eventsCount++),s}function o(s,c){--s._eventsCount===0?s._events=new n:delete s._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var c=[],f,l;if(this._eventsCount===0)return c;for(l in f=this._events)t.call(f,l)&&c.push(r?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},u.prototype.listeners=function(c){var f=r?r+c:c,l=this._events[f];if(!l)return[];if(l.fn)return[l.fn];for(var d=0,h=l.length,y=new Array(h);d<h;d++)y[d]=l[d].fn;return y},u.prototype.listenerCount=function(c){var f=r?r+c:c,l=this._events[f];return l?l.fn?1:l.length:0},u.prototype.emit=function(c,f,l,d,h,y){var v=r?r+c:c;if(!this._events[v])return!1;var p=this._events[v],g=arguments.length,x,w;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),g){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,l),!0;case 4:return p.fn.call(p.context,f,l,d),!0;case 5:return p.fn.call(p.context,f,l,d,h),!0;case 6:return p.fn.call(p.context,f,l,d,h,y),!0}for(w=1,x=new Array(g-1);w<g;w++)x[w-1]=arguments[w];p.fn.apply(p.context,x)}else{var O=p.length,m;for(w=0;w<O;w++)switch(p[w].once&&this.removeListener(c,p[w].fn,void 0,!0),g){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,f);break;case 3:p[w].fn.call(p[w].context,f,l);break;case 4:p[w].fn.call(p[w].context,f,l,d);break;default:if(!x)for(m=1,x=new Array(g-1);m<g;m++)x[m-1]=arguments[m];p[w].fn.apply(p[w].context,x)}}return!0},u.prototype.on=function(c,f,l){return a(this,c,f,l,!1)},u.prototype.once=function(c,f,l){return a(this,c,f,l,!0)},u.prototype.removeListener=function(c,f,l,d){var h=r?r+c:c;if(!this._events[h])return this;if(!f)return o(this,h),this;var y=this._events[h];if(y.fn)y.fn===f&&(!d||y.once)&&(!l||y.context===l)&&o(this,h);else{for(var v=0,p=[],g=y.length;v<g;v++)(y[v].fn!==f||d&&!y[v].once||l&&y[v].context!==l)&&p.push(y[v]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},u.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Hl)),Hl.exports}var IL=NL();const DL=se(IL);var Gl=new DL,Kl="recharts.syncMouseEvents";function Mi(e){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(e)}function RL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qL(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,iO(n.key),n)}}function LL(e,t,r){return t&&qL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yl(e,t,r){return t=iO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iO(e){var t=BL(e,"string");return Mi(t)=="symbol"?t:t+""}function BL(e,t){if(Mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var FL=(function(){function e(){RL(this,e),Yl(this,"activeIndex",0),Yl(this,"coordinateList",[]),Yl(this,"layout","horizontal")}return LL(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,u=o===void 0?null:o,s=r.layout,c=s===void 0?null:s,f=r.offset,l=f===void 0?null:f,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=u??this.container,this.layout=c??this.layout,this.offset=l??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 i=this.container.getBoundingClientRect(),a=i.x,o=i.y,u=i.height,s=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,l=a+s+c,d=o+this.offset.top+u/2+f;this.mouseHandlerCallback({pageX:l,pageY:d})}}}])})();function WL(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],i=e?.[1];if(n&&i&&L(n)&&L(i))return!0}return!1}function UL(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function aO(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=de(t,r,n,i),u=de(t,r,n,a);return{points:[o,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function zL(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var u=t.cx,s=t.cy,c=t.innerRadius,f=t.outerRadius,l=t.angle,d=de(u,s,c,l),h=de(u,s,f,l);n=d.x,i=d.y,a=h.x,o=h.y}else return aO(t);return[{x:n,y:i},{x:a,y:o}]}function Ci(e){"@babel/helpers - typeof";return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(e)}function _0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_0(Object(r),!0).forEach(function(n){HL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HL(e,t,r){return t=GL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GL(e){var t=KL(e,"string");return Ci(t)=="symbol"?t:t+""}function KL(e,t){if(Ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YL(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,u=e.activePayload,s=e.offset,c=e.activeTooltipIndex,f=e.tooltipAxisBandSize,l=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||!a||!o||d!=="ScatterChart"&&i!=="axis")return null;var y,v=zr;if(d==="ScatterChart")y=o,v=bD;else if(d==="BarChart")y=UL(l,o,s,f),v=dh;else if(l==="radial"){var p=aO(o),g=p.cx,x=p.cy,w=p.radius,O=p.startAngle,m=p.endAngle;y={cx:g,cy:x,startAngle:O,endAngle:m,innerRadius:w,outerRadius:w},v=i1}else y={points:zL(l,o,s)},v=zr;var b=ra(ra(ra(ra({stroke:"#ccc",pointerEvents:"none"},s),y),G(h,!1)),{},{payload:u,payloadIndex:c,className:J("recharts-tooltip-cursor",h.className)});return D.isValidElement(h)?D.cloneElement(h,b):D.createElement(v,b)}var VL=["item"],XL=["children","className","width","height","style","compact","title","desc"];function yn(e){"@babel/helpers - typeof";return yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(e)}function Lr(){return Lr=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},Lr.apply(this,arguments)}function S0(e,t){return JL(e)||QL(e,t)||uO(e,t)||ZL()}function ZL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(f){c=!0,i=f}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function JL(e){if(Array.isArray(e))return e}function A0(e,t){if(e==null)return{};var r=eB(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eB(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 tB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rB(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,sO(n.key),n)}}function nB(e,t,r){return t&&rB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iB(e,t,r){return t=ao(t),aB(e,oO()?Reflect.construct(t,r||[],ao(e).constructor):t.apply(e,r))}function aB(e,t){if(t&&(yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oB(e)}function oB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oO=function(){return!!e})()}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ao(e)}function uB(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&&yd(e,t)}function yd(e,t){return yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yd(e,t)}function mn(e){return lB(e)||cB(e)||uO(e)||sB()}function sB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
64
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uO(e,t){if(e){if(typeof e=="string")return md(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 md(e,t)}}function cB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lB(e){if(Array.isArray(e))return md(e)}function md(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 P0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(r),!0).forEach(function(n){K(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K(e,t,r){return t=sO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sO(e){var t=fB(e,"string");return yn(t)=="symbol"?t:t+""}function fB(e,t){if(yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dB={xAxis:["bottom","top"],yAxis:["left","right"]},hB={width:"100%",height:"100%"},cO={x:0,y:0};function na(e){return e}var pB=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},vB=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,u=i.radius;return N(N(N({},i),de(i.cx,i.cy,u,o)),{},{angle:o,radius:u})}var s=a.coordinate,c=i.angle;return N(N(N({},i),de(i.cx,i.cy,s,c)),{},{angle:c,radius:s})}return cO},Ho=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(u,s){var c=s.props.data;return c&&c.length?[].concat(mn(u),mn(c)):u},[]);return o.length>0?o:t&&t.length&&L(i)&&L(a)?t.slice(i,a+1):[]};function lO(e){return e==="number"?[0,"auto"]:void 0}var gd=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,u=Ho(r,t);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(s,c){var f,l=(f=c.props.data)!==null&&f!==void 0?f:r;l&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(l=l.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=l===void 0?u:l;d=ca(h,o.dataKey,i)}else d=l&&l[n]||u[n];return d?[].concat(mn(s),[Qw(c,d)]):s},[])},j0=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=pB(a,n),u=t.orderedTooltipTicks,s=t.tooltipAxis,c=t.tooltipTicks,f=U$(o,u,c,s);if(f>=0&&c){var l=c[f]&&c[f].value,d=gd(t,r,f,l),h=vB(n,u,f,a);return{activeTooltipIndex:f,activeLabel:l,activePayload:d,activeCoordinate:h}}return null},yB=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,u=r.stackGroups,s=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,l=t.children,d=t.stackOffset,h=Gw(f,a);return n.reduce(function(y,v){var p,g=v.type.defaultProps!==void 0?N(N({},v.type.defaultProps),v.props):v.props,x=g.type,w=g.dataKey,O=g.allowDataOverflow,m=g.allowDuplicatedCategory,b=g.scale,_=g.ticks,A=g.includeHidden,T=g[o];if(y[T])return y;var $=Ho(t.data,{graphicalItems:i.filter(function(U){var X,he=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o];return he===T}),dataStartIndex:s,dataEndIndex:c}),j=$.length,M,C,E;WL(g.domain,O,x)&&(M=kf(g.domain,null,O),h&&(x==="number"||b!=="auto")&&(E=Hn($,w,"category")));var k=lO(x);if(!M||M.length===0){var I,R=(I=g.domain)!==null&&I!==void 0?I:k;if(w){if(M=Hn($,w,x),x==="category"&&h){var B=DS(M);m&&B?(C=M,M=Ga(0,j)):m||(M=jg(R,M,v).reduce(function(U,X){return U.indexOf(X)>=0?U:[].concat(mn(U),[X])},[]))}else if(x==="category")m?M=M.filter(function(U){return U!==""&&!Z(U)}):M=jg(R,M,v).reduce(function(U,X){return U.indexOf(X)>=0||X===""||Z(X)?U:[].concat(mn(U),[X])},[]);else if(x==="number"){var F=Y$($,i.filter(function(U){var X,he,ge=o in U.props?U.props[o]:(X=U.type.defaultProps)===null||X===void 0?void 0:X[o],Ke="hide"in U.props?U.props.hide:(he=U.type.defaultProps)===null||he===void 0?void 0:he.hide;return ge===T&&(A||!Ke)}),w,a,f);F&&(M=F)}h&&(x==="number"||b!=="auto")&&(E=Hn($,w,"category"))}else h?M=Ga(0,j):u&&u[T]&&u[T].hasStack&&x==="number"?M=d==="expand"?[0,1]:Zw(u[T].stackGroups,s,c):M=Hw($,i.filter(function(U){var X=o in U.props?U.props[o]:U.type.defaultProps[o],he="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return X===T&&(A||!he)}),x,f,!0);if(x==="number")M=vd(l,M,T,a,_),R&&(M=kf(R,M,O));else if(x==="category"&&R){var H=R,Y=M.every(function(U){return H.indexOf(U)>=0});Y&&(M=H)}}return N(N({},y),{},K({},T,N(N({},g),{},{axisType:a,domain:M,categoricalDomain:E,duplicateDomain:C,originalDomain:(p=g.domain)!==null&&p!==void 0?p:k,isCategorical:h,layout:f})))},{})},mB=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,u=r.stackGroups,s=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,l=t.children,d=Ho(t.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),h=d.length,y=Gw(f,a),v=-1;return n.reduce(function(p,g){var x=g.type.defaultProps!==void 0?N(N({},g.type.defaultProps),g.props):g.props,w=x[o],O=lO("number");if(!p[w]){v++;var m;return y?m=Ga(0,h):u&&u[w]&&u[w].hasStack?(m=Zw(u[w].stackGroups,s,c),m=vd(l,m,w,a)):(m=kf(O,Hw(d,n.filter(function(b){var _,A,T=o in b.props?b.props[o]:(_=b.type.defaultProps)===null||_===void 0?void 0:_[o],$="hide"in b.props?b.props.hide:(A=b.type.defaultProps)===null||A===void 0?void 0:A.hide;return T===w&&!$}),"number",f),i.defaultProps.allowDataOverflow),m=vd(l,m,w,a)),N(N({},p),{},K({},w,N(N({axisType:a},i.defaultProps),{},{hide:!0,orientation:Qe(dB,"".concat(a,".").concat(v%2),null),domain:m,originalDomain:O,isCategorical:y,layout:f})))}return p},{})},gB=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,u=r.stackGroups,s=r.dataStartIndex,c=r.dataEndIndex,f=t.children,l="".concat(i,"Id"),d=at(f,a),h={};return d&&d.length?h=yB(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:l,stackGroups:u,dataStartIndex:s,dataEndIndex:c}):o&&o.length&&(h=mB(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:l,stackGroups:u,dataStartIndex:s,dataEndIndex:c})),h},bB=function(t){var r=Ht(t),n=Tt(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ld(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Na(r,n)}},T0=function(t){var r=t.children,n=t.defaultShowTooltip,i=Ve(r,un),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},xB=function(t){return!t||!t.length?!1:t.some(function(r){var n=Et(r&&r.type);return n&&n.indexOf("Bar")>=0})},E0=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"}},wB=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,u=t.yAxisMap,s=u===void 0?{}:u,c=n.width,f=n.height,l=n.children,d=n.margin||{},h=Ve(l,un),y=Ve(l,Fr),v=Object.keys(s).reduce(function(m,b){var _=s[b],A=_.orientation;return!_.mirror&&!_.hide?N(N({},m),{},K({},A,m[A]+_.width)):m},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(m,b){var _=o[b],A=_.orientation;return!_.mirror&&!_.hide?N(N({},m),{},K({},A,Qe(m,"".concat(A))+_.height)):m},{top:d.top||0,bottom:d.bottom||0}),g=N(N({},p),v),x=g.bottom;h&&(g.bottom+=h.props.height||un.defaultProps.height),y&&r&&(g=G$(g,i,n,r));var w=c-g.left-g.right,O=f-g.top-g.bottom;return N(N({brushBottom:x},g),{},{width:Math.max(w,0),height:Math.max(O,0)})},OB=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},fO=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,u=o===void 0?["axis"]:o,s=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,l=t.defaultProps,d=function(g,x){var w=x.graphicalItems,O=x.stackGroups,m=x.offset,b=x.updateId,_=x.dataStartIndex,A=x.dataEndIndex,T=g.barSize,$=g.layout,j=g.barGap,M=g.barCategoryGap,C=g.maxBarSize,E=E0($),k=E.numericAxisName,I=E.cateAxisName,R=xB(w),B=[];return w.forEach(function(F,H){var Y=Ho(g.data,{graphicalItems:[F],dataStartIndex:_,dataEndIndex:A}),U=F.type.defaultProps!==void 0?N(N({},F.type.defaultProps),F.props):F.props,X=U.dataKey,he=U.maxBarSize,ge=U["".concat(k,"Id")],Ke=U["".concat(I,"Id")],er={},We=s.reduce(function(tr,rr){var Go=x["".concat(rr.axisType,"Map")],Oh=U["".concat(rr.axisType,"Id")];Go&&Go[Oh]||rr.axisType==="zAxis"||wr();var _h=Go[Oh];return N(N({},tr),{},K(K({},rr.axisType,_h),"".concat(rr.axisType,"Ticks"),Tt(_h)))},er),W=We[I],Q=We["".concat(I,"Ticks")],ee=O&&O[ge]&&O[ge].hasStack&&nk(F,O[ge].stackGroups),q=Et(F.type).indexOf("Bar")>=0,ye=Na(W,Q),re=[],_e=R&&z$({barSize:T,stackGroups:O,totalSize:OB(We,I)});if(q){var Se,Ue,Bt=Z(he)?C:he,Er=(Se=(Ue=Na(W,Q,!0))!==null&&Ue!==void 0?Ue:Bt)!==null&&Se!==void 0?Se:0;re=H$({barGap:j,barCategoryGap:M,bandSize:Er!==ye?Er:ye,sizeList:_e[Ke],maxBarSize:Bt}),Er!==ye&&(re=re.map(function(tr){return N(N({},tr),{},{position:N(N({},tr.position),{},{offset:tr.position.offset-Er/2})})}))}var Bi=F&&F.type&&F.type.getComposedData;Bi&&B.push({props:N(N({},Bi(N(N({},We),{},{displayedData:Y,props:g,dataKey:X,item:F,bandSize:ye,barPosition:re,offset:m,stackedData:ee,layout:$,dataStartIndex:_,dataEndIndex:A}))),{},K(K(K({key:F.key||"item-".concat(H)},k,We[k]),I,We[I]),"animationId",b)),childIndex:VS(F,g.children),item:F})}),B},h=function(g,x){var w=g.props,O=g.dataStartIndex,m=g.dataEndIndex,b=g.updateId;if(!Fp({props:w}))return null;var _=w.children,A=w.layout,T=w.stackOffset,$=w.data,j=w.reverseStackOrder,M=E0(A),C=M.numericAxisName,E=M.cateAxisName,k=at(_,n),I=tk($,k,"".concat(C,"Id"),"".concat(E,"Id"),T,j),R=s.reduce(function(U,X){var he="".concat(X.axisType,"Map");return N(N({},U),{},K({},he,gB(w,N(N({},X),{},{graphicalItems:k,stackGroups:X.axisType===C&&I,dataStartIndex:O,dataEndIndex:m}))))},{}),B=wB(N(N({},R),{},{props:w,graphicalItems:k}),x?.legendBBox);Object.keys(R).forEach(function(U){R[U]=f(w,R[U],B,U.replace("Map",""),r)});var F=R["".concat(E,"Map")],H=bB(F),Y=d(w,N(N({},R),{},{dataStartIndex:O,dataEndIndex:m,updateId:b,graphicalItems:k,stackGroups:I,offset:B}));return N(N({formattedGraphicalItems:Y,graphicalItems:k,offset:B,stackGroups:I},H),R)},y=(function(p){function g(x){var w,O,m;return tB(this,g),m=iB(this,g,[x]),K(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),K(m,"accessibilityManager",new FL),K(m,"handleLegendBBoxUpdate",function(b){if(b){var _=m.state,A=_.dataStartIndex,T=_.dataEndIndex,$=_.updateId;m.setState(N({legendBBox:b},h({props:m.props,dataStartIndex:A,dataEndIndex:T,updateId:$},N(N({},m.state),{},{legendBBox:b}))))}}),K(m,"handleReceiveSyncEvent",function(b,_,A){if(m.props.syncId===b){if(A===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(_)}}),K(m,"handleBrushChange",function(b){var _=b.startIndex,A=b.endIndex;if(_!==m.state.dataStartIndex||A!==m.state.dataEndIndex){var T=m.state.updateId;m.setState(function(){return N({dataStartIndex:_,dataEndIndex:A},h({props:m.props,dataStartIndex:_,dataEndIndex:A,updateId:T},m.state))}),m.triggerSyncEvent({dataStartIndex:_,dataEndIndex:A})}}),K(m,"handleMouseEnter",function(b){var _=m.getMouseInfo(b);if(_){var A=N(N({},_),{},{isTooltipActive:!0});m.setState(A),m.triggerSyncEvent(A);var T=m.props.onMouseEnter;V(T)&&T(A,b)}}),K(m,"triggeredAfterMouseMove",function(b){var _=m.getMouseInfo(b),A=_?N(N({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(A),m.triggerSyncEvent(A);var T=m.props.onMouseMove;V(T)&&T(A,b)}),K(m,"handleItemMouseEnter",function(b){m.setState(function(){return{isTooltipActive:!0,activeItem:b,activePayload:b.tooltipPayload,activeCoordinate:b.tooltipPosition||{x:b.cx,y:b.cy}}})}),K(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),K(m,"handleMouseMove",function(b){b.persist(),m.throttleTriggeredAfterMouseMove(b)}),K(m,"handleMouseLeave",function(b){m.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};m.setState(_),m.triggerSyncEvent(_);var A=m.props.onMouseLeave;V(A)&&A(_,b)}),K(m,"handleOuterEvent",function(b){var _=YS(b),A=Qe(m.props,"".concat(_));if(_&&V(A)){var T,$;/.*touch.*/i.test(_)?$=m.getMouseInfo(b.changedTouches[0]):$=m.getMouseInfo(b),A((T=$)!==null&&T!==void 0?T:{},b)}}),K(m,"handleClick",function(b){var _=m.getMouseInfo(b);if(_){var A=N(N({},_),{},{isTooltipActive:!0});m.setState(A),m.triggerSyncEvent(A);var T=m.props.onClick;V(T)&&T(A,b)}}),K(m,"handleMouseDown",function(b){var _=m.props.onMouseDown;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"handleMouseUp",function(b){var _=m.props.onMouseUp;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"handleTouchMove",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(b.changedTouches[0])}),K(m,"handleTouchStart",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&m.handleMouseDown(b.changedTouches[0])}),K(m,"handleTouchEnd",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&m.handleMouseUp(b.changedTouches[0])}),K(m,"handleDoubleClick",function(b){var _=m.props.onDoubleClick;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"handleContextMenu",function(b){var _=m.props.onContextMenu;if(V(_)){var A=m.getMouseInfo(b);_(A,b)}}),K(m,"triggerSyncEvent",function(b){m.props.syncId!==void 0&&Gl.emit(Kl,m.props.syncId,b,m.eventEmitterSymbol)}),K(m,"applySyncEvent",function(b){var _=m.props,A=_.layout,T=_.syncMethod,$=m.state.updateId,j=b.dataStartIndex,M=b.dataEndIndex;if(b.dataStartIndex!==void 0||b.dataEndIndex!==void 0)m.setState(N({dataStartIndex:j,dataEndIndex:M},h({props:m.props,dataStartIndex:j,dataEndIndex:M,updateId:$},m.state)));else if(b.activeTooltipIndex!==void 0){var C=b.chartX,E=b.chartY,k=b.activeTooltipIndex,I=m.state,R=I.offset,B=I.tooltipTicks;if(!R)return;if(typeof T=="function")k=T(B,b);else if(T==="value"){k=-1;for(var F=0;F<B.length;F++)if(B[F].value===b.activeLabel){k=F;break}}var H=N(N({},R),{},{x:R.left,y:R.top}),Y=Math.min(C,H.x+H.width),U=Math.min(E,H.y+H.height),X=B[k]&&B[k].value,he=gd(m.state,m.props.data,k),ge=B[k]?{x:A==="horizontal"?B[k].coordinate:Y,y:A==="horizontal"?U:B[k].coordinate}:cO;m.setState(N(N({},b),{},{activeLabel:X,activeCoordinate:ge,activePayload:he,activeTooltipIndex:k}))}else m.setState(b)}),K(m,"renderCursor",function(b){var _,A=m.state,T=A.isTooltipActive,$=A.activeCoordinate,j=A.activePayload,M=A.offset,C=A.activeTooltipIndex,E=A.tooltipAxisBandSize,k=m.getTooltipEventType(),I=(_=b.props.active)!==null&&_!==void 0?_:T,R=m.props.layout,B=b.key||"_recharts-cursor";return P.createElement(YL,{key:B,activeCoordinate:$,activePayload:j,activeTooltipIndex:C,chartName:r,element:b,isActive:I,layout:R,offset:M,tooltipAxisBandSize:E,tooltipEventType:k})}),K(m,"renderPolarAxis",function(b,_,A){var T=Qe(b,"type.axisType"),$=Qe(m.state,"".concat(T,"Map")),j=b.type.defaultProps,M=j!==void 0?N(N({},j),b.props):b.props,C=$&&$[M["".concat(T,"Id")]];return D.cloneElement(b,N(N({},C),{},{className:J(T,C.className),key:b.key||"".concat(_,"-").concat(A),ticks:Tt(C,!0)}))}),K(m,"renderPolarGrid",function(b){var _=b.props,A=_.radialLines,T=_.polarAngles,$=_.polarRadius,j=m.state,M=j.radiusAxisMap,C=j.angleAxisMap,E=Ht(M),k=Ht(C),I=k.cx,R=k.cy,B=k.innerRadius,F=k.outerRadius;return D.cloneElement(b,{polarAngles:Array.isArray(T)?T:Tt(k,!0).map(function(H){return H.coordinate}),polarRadius:Array.isArray($)?$:Tt(E,!0).map(function(H){return H.coordinate}),cx:I,cy:R,innerRadius:B,outerRadius:F,key:b.key||"polar-grid",radialLines:A})}),K(m,"renderLegend",function(){var b=m.state.formattedGraphicalItems,_=m.props,A=_.children,T=_.width,$=_.height,j=m.props.margin||{},M=T-(j.left||0)-(j.right||0),C=Uw({children:A,formattedGraphicalItems:b,legendWidth:M,legendContent:c});if(!C)return null;var E=C.item,k=A0(C,VL);return D.cloneElement(E,N(N({},k),{},{chartWidth:T,chartHeight:$,margin:j,onBBoxUpdate:m.handleLegendBBoxUpdate}))}),K(m,"renderTooltip",function(){var b,_=m.props,A=_.children,T=_.accessibilityLayer,$=Ve(A,ct);if(!$)return null;var j=m.state,M=j.isTooltipActive,C=j.activeCoordinate,E=j.activePayload,k=j.activeLabel,I=j.offset,R=(b=$.props.active)!==null&&b!==void 0?b:M;return D.cloneElement($,{viewBox:N(N({},I),{},{x:I.left,y:I.top}),active:R,label:k,payload:R?E:[],coordinate:C,accessibilityLayer:T})}),K(m,"renderBrush",function(b){var _=m.props,A=_.margin,T=_.data,$=m.state,j=$.offset,M=$.dataStartIndex,C=$.dataEndIndex,E=$.updateId;return D.cloneElement(b,{key:b.key||"_recharts-brush",onChange:Qi(m.handleBrushChange,b.props.onChange),data:T,x:L(b.props.x)?b.props.x:j.left,y:L(b.props.y)?b.props.y:j.top+j.height+j.brushBottom-(A.bottom||0),width:L(b.props.width)?b.props.width:j.width,startIndex:M,endIndex:C,updateId:"brush-".concat(E)})}),K(m,"renderReferenceElement",function(b,_,A){if(!b)return null;var T=m,$=T.clipPathId,j=m.state,M=j.xAxisMap,C=j.yAxisMap,E=j.offset,k=b.type.defaultProps||{},I=b.props,R=I.xAxisId,B=R===void 0?k.xAxisId:R,F=I.yAxisId,H=F===void 0?k.yAxisId:F;return D.cloneElement(b,{key:b.key||"".concat(_,"-").concat(A),xAxis:M[B],yAxis:C[H],viewBox:{x:E.left,y:E.top,width:E.width,height:E.height},clipPathId:$})}),K(m,"renderActivePoints",function(b){var _=b.item,A=b.activePoint,T=b.basePoint,$=b.childIndex,j=b.isRange,M=[],C=_.props.key,E=_.item.type.defaultProps!==void 0?N(N({},_.item.type.defaultProps),_.item.props):_.item.props,k=E.activeDot,I=E.dataKey,R=N(N({index:$,dataKey:I,cx:A.x,cy:A.y,r:4,fill:fh(_.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},G(k,!1)),la(k));return M.push(g.renderActiveDot(k,R,"".concat(C,"-activePoint-").concat($))),T?M.push(g.renderActiveDot(k,N(N({},R),{},{cx:T.x,cy:T.y}),"".concat(C,"-basePoint-").concat($))):j&&M.push(null),M}),K(m,"renderGraphicChild",function(b,_,A){var T=m.filterFormatItem(b,_,A);if(!T)return null;var $=m.getTooltipEventType(),j=m.state,M=j.isTooltipActive,C=j.tooltipAxis,E=j.activeTooltipIndex,k=j.activeLabel,I=m.props.children,R=Ve(I,ct),B=T.props,F=B.points,H=B.isRange,Y=B.baseLine,U=T.item.type.defaultProps!==void 0?N(N({},T.item.type.defaultProps),T.item.props):T.item.props,X=U.activeDot,he=U.hide,ge=U.activeBar,Ke=U.activeShape,er=!!(!he&&M&&R&&(X||ge||Ke)),We={};$!=="axis"&&R&&R.props.trigger==="click"?We={onClick:Qi(m.handleItemMouseEnter,b.props.onClick)}:$!=="axis"&&(We={onMouseLeave:Qi(m.handleItemMouseLeave,b.props.onMouseLeave),onMouseEnter:Qi(m.handleItemMouseEnter,b.props.onMouseEnter)});var W=D.cloneElement(b,N(N({},T.props),We));function Q(rr){return typeof C.dataKey=="function"?C.dataKey(rr.payload):null}if(er)if(E>=0){var ee,q;if(C.dataKey&&!C.allowDuplicatedCategory){var ye=typeof C.dataKey=="function"?Q:"payload.".concat(C.dataKey.toString());ee=ca(F,ye,k),q=H&&Y&&ca(Y,ye,k)}else ee=F?.[E],q=H&&Y&&Y[E];if(Ke||ge){var re=b.props.activeIndex!==void 0?b.props.activeIndex:E;return[D.cloneElement(b,N(N(N({},T.props),We),{},{activeIndex:re})),null,null]}if(!Z(ee))return[W].concat(mn(m.renderActivePoints({item:T,activePoint:ee,basePoint:q,childIndex:E,isRange:H})))}else{var _e,Se=(_e=m.getItemByXY(m.state.activeCoordinate))!==null&&_e!==void 0?_e:{graphicalItem:W},Ue=Se.graphicalItem,Bt=Ue.item,Er=Bt===void 0?b:Bt,Bi=Ue.childIndex,tr=N(N(N({},T.props),We),{},{activeIndex:Bi});return[D.cloneElement(Er,tr),null,null]}return H?[W,null,null]:[W,null]}),K(m,"renderCustomized",function(b,_,A){return D.cloneElement(b,N(N({key:"recharts-customized-".concat(A)},m.props),m.state))}),K(m,"renderMap",{CartesianGrid:{handler:na,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:na},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:na},YAxis:{handler:na},Brush:{handler:m.renderBrush,once:!0},Bar:{handler:m.renderGraphicChild},Line:{handler:m.renderGraphicChild},Area:{handler:m.renderGraphicChild},Radar:{handler:m.renderGraphicChild},RadialBar:{handler:m.renderGraphicChild},Scatter:{handler:m.renderGraphicChild},Pie:{handler:m.renderGraphicChild},Funnel:{handler:m.renderGraphicChild},Tooltip:{handler:m.renderCursor,once:!0},PolarGrid:{handler:m.renderPolarGrid,once:!0},PolarAngleAxis:{handler:m.renderPolarAxis},PolarRadiusAxis:{handler:m.renderPolarAxis},Customized:{handler:m.renderCustomized}}),m.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:wn("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=Fx(m.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),m.state={},m}return uB(g,p),nB(g,[{key:"componentDidMount",value:function(){var w,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,O=w.children,m=w.data,b=w.height,_=w.layout,A=Ve(O,ct);if(A){var T=A.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,j=gd(this.state,m,T,$),M=this.state.tooltipTicks[T].coordinate,C=(this.state.offset.top+b)/2,E=_==="horizontal",k=E?{x:M,y:C}:{y:M,x:C},I=this.state.formattedGraphicalItems.find(function(B){var F=B.item;return F.type.name==="Scatter"});I&&(k=N(N({},k),I.props.points[T].tooltipPosition),j=I.props.points[T].tooltipPayload);var R={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:$,activePayload:j,activeCoordinate:k};this.setState(R),this.renderCursor(A),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var m,b;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0}})}return null}},{key:"componentDidUpdate",value:function(w){ef([Ve(w.children,ct)],[Ve(this.props.children,ct)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Ve(this.props.children,ct);if(w&&typeof w.props.shared=="boolean"){var O=w.props.shared?"axis":"item";return u.indexOf(O)>=0?O:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var O=this.container,m=O.getBoundingClientRect(),b=IT(m),_={chartX:Math.round(w.pageX-b.left),chartY:Math.round(w.pageY-b.top)},A=m.width/O.offsetWidth||1,T=this.inRange(_.chartX,_.chartY,A);if(!T)return null;var $=this.state,j=$.xAxisMap,M=$.yAxisMap,C=this.getTooltipEventType(),E=j0(this.state,this.props.data,this.props.layout,T);if(C!=="axis"&&j&&M){var k=Ht(j).scale,I=Ht(M).scale,R=k&&k.invert?k.invert(_.chartX):null,B=I&&I.invert?I.invert(_.chartY):null;return N(N({},_),{},{xValue:R,yValue:B},E)}return E?N(N({},_),E):null}},{key:"inRange",value:function(w,O){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,b=this.props.layout,_=w/m,A=O/m;if(b==="horizontal"||b==="vertical"){var T=this.state.offset,$=_>=T.left&&_<=T.left+T.width&&A>=T.top&&A<=T.top+T.height;return $?{x:_,y:A}:null}var j=this.state,M=j.angleAxisMap,C=j.radiusAxisMap;if(M&&C){var E=Ht(M);return Mg({x:_,y:A},E)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,O=this.getTooltipEventType(),m=Ve(w,ct),b={};m&&O==="axis"&&(m.props.trigger==="click"?b={onClick:this.handleClick}:b={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 _=la(this.props,this.handleOuterEvent);return N(N({},_),b)}},{key:"addListener",value:function(){Gl.on(Kl,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gl.removeListener(Kl,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,O,m){for(var b=this.state.formattedGraphicalItems,_=0,A=b.length;_<A;_++){var T=b[_];if(T.item===w||T.props.key===w.key||O===Et(T.item.type)&&m===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,O=this.state.offset,m=O.left,b=O.top,_=O.height,A=O.width;return P.createElement("defs",null,P.createElement("clipPath",{id:w},P.createElement("rect",{x:m,y:b,height:_,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(O,m){var b=S0(m,2),_=b[0],A=b[1];return N(N({},O),{},K({},_,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(O,m){var b=S0(m,2),_=b[0],A=b[1];return N(N({},O),{},K({},_,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(w){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(w){var O=this.state,m=O.formattedGraphicalItems,b=O.activeItem;if(m&&m.length)for(var _=0,A=m.length;_<A;_++){var T=m[_],$=T.props,j=T.item,M=j.type.defaultProps!==void 0?N(N({},j.type.defaultProps),j.props):j.props,C=Et(j.type);if(C==="Bar"){var E=($.data||[]).find(function(B){return JI(w,B)});if(E)return{graphicalItem:T,payload:E}}else if(C==="RadialBar"){var k=($.data||[]).find(function(B){return Mg(w,B)});if(k)return{graphicalItem:T,payload:k}}else if(Ro(T,b)||qo(T,b)||Si(T,b)){var I=OR({graphicalItem:T,activeTooltipItem:b,itemData:M.data}),R=M.activeIndex===void 0?I:M.activeIndex;return{graphicalItem:N(N({},T),{},{childIndex:R}),payload:Si(T,b)?M.data[I]:T.props.data[I]}}}return null}},{key:"render",value:function(){var w=this;if(!Fp(this))return null;var O=this.props,m=O.children,b=O.className,_=O.width,A=O.height,T=O.style,$=O.compact,j=O.title,M=O.desc,C=A0(O,XL),E=G(C,!1);if($)return P.createElement(o0,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(rf,Lr({},E,{width:_,height:A,title:j,desc:M}),this.renderClipPath(),Up(m,this.renderMap)));if(this.props.accessibilityLayer){var k,I;E.tabIndex=(k=this.props.tabIndex)!==null&&k!==void 0?k:0,E.role=(I=this.props.role)!==null&&I!==void 0?I:"application",E.onKeyDown=function(B){w.accessibilityManager.keyboardEvent(B)},E.onFocus=function(){w.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return P.createElement(o0,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",Lr({className:J("recharts-wrapper",b),style:N({position:"relative",cursor:"default",width:_,height:A},T)},R,{ref:function(F){w.container=F}}),P.createElement(rf,Lr({},E,{width:_,height:A,title:j,desc:M,style:hB}),this.renderClipPath(),Up(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(D.Component);K(y,"displayName",r),K(y,"defaultProps",N({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},l)),K(y,"getDerivedStateFromProps",function(p,g){var x=p.dataKey,w=p.data,O=p.children,m=p.width,b=p.height,_=p.layout,A=p.stackOffset,T=p.margin,$=g.dataStartIndex,j=g.dataEndIndex;if(g.updateId===void 0){var M=T0(p);return N(N(N({},M),{},{updateId:0},h(N(N({props:p},M),{},{updateId:0}),g)),{},{prevDataKey:x,prevData:w,prevWidth:m,prevHeight:b,prevLayout:_,prevStackOffset:A,prevMargin:T,prevChildren:O})}if(x!==g.prevDataKey||w!==g.prevData||m!==g.prevWidth||b!==g.prevHeight||_!==g.prevLayout||A!==g.prevStackOffset||!Br(T,g.prevMargin)){var C=T0(p),E={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},k=N(N({},j0(g,w,_)),{},{updateId:g.updateId+1}),I=N(N(N({},C),E),k);return N(N(N({},I),h(N({props:p},I),g)),{},{prevDataKey:x,prevData:w,prevWidth:m,prevHeight:b,prevLayout:_,prevStackOffset:A,prevMargin:T,prevChildren:O})}if(!ef(O,g.prevChildren)){var R,B,F,H,Y=Ve(O,un),U=Y&&(R=(B=Y.props)===null||B===void 0?void 0:B.startIndex)!==null&&R!==void 0?R:$,X=Y&&(F=(H=Y.props)===null||H===void 0?void 0:H.endIndex)!==null&&F!==void 0?F:j,he=U!==$||X!==j,ge=!Z(w),Ke=ge&&!he?g.updateId:g.updateId+1;return N(N({updateId:Ke},h(N(N({props:p},g),{},{updateId:Ke,dataStartIndex:U,dataEndIndex:X}),g)),{},{prevChildren:O,dataStartIndex:U,dataEndIndex:X})}return null}),K(y,"renderActiveDot",function(p,g,x){var w;return D.isValidElement(p)?w=D.cloneElement(p,g):V(p)?w=p(g):w=P.createElement($o,g),P.createElement(te,{className:"recharts-active-dot",key:x},w)});var v=D.forwardRef(function(g,x){return P.createElement(y,Lr({},g,{ref:x}))});return v.displayName=y.displayName,v},_B=fO({chartName:"PieChart",GraphicalChild:Lt,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Do},{axisType:"radiusAxis",AxisComp:No}],formatAxisMap:hk,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),SB=fO({chartName:"AreaChart",GraphicalChild:It,axisComponents:[{axisType:"xAxis",AxisComp:zo},{axisType:"yAxis",AxisComp:Ei}],formatAxisMap:A2});function AB({data:e,isLoading:t,granularity:r="daily",className:n}){const i=D.useMemo(()=>!e||e.length===0?[]:(r==="hourly"?e:[...e].reverse()).map(o=>{const u="hour"in o?o.hour:o.date;return{...o,dateFormatted:PB(u,r),costRounded:Number(o.cost.toFixed(4))}}),[e,r]);return t?S.jsx(xe,{className:De("h-full w-full",n)}):!e||e.length===0?S.jsx("div",{className:De("h-full flex items-center justify-center",n),children:S.jsx("p",{className:"text-muted-foreground",children:r==="hourly"?"No usage data for today":"No usage data available"})}):S.jsx("div",{className:De("w-full h-full",n),children:S.jsx(Wx,{width:"100%",height:"100%",children:S.jsxs(SB,{data:i,margin:{top:5,right:30,left:20,bottom:5},children:[S.jsxs("defs",{children:[S.jsxs("linearGradient",{id:"tokenGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[S.jsx("stop",{offset:"5%",stopColor:"#0080FF",stopOpacity:.8}),S.jsx("stop",{offset:"95%",stopColor:"#0080FF",stopOpacity:.1})]}),S.jsxs("linearGradient",{id:"costGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[S.jsx("stop",{offset:"5%",stopColor:"#00C49F",stopOpacity:.8}),S.jsx("stop",{offset:"95%",stopColor:"#00C49F",stopOpacity:.1})]})]}),S.jsx(K1,{strokeDasharray:"3 3",className:"stroke-muted"}),S.jsx(zo,{dataKey:"dateFormatted",tick:{fontSize:12},tickLine:!1,axisLine:{className:"stroke-muted"}}),S.jsx(Ei,{yAxisId:"left",orientation:"left",tick:{fontSize:12},tickLine:!1,axisLine:{className:"stroke-muted"},tickFormatter:a=>M0(a)}),S.jsx(Ei,{yAxisId:"right",orientation:"right",tick:{fontSize:12},tickLine:!1,axisLine:{className:"stroke-muted"},tickFormatter:a=>`$${a}`}),S.jsx(ct,{content:({active:a,payload:o,label:u})=>{if(!a||!o||!o.length)return null;const s=o[0].payload;return S.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-lg",children:[S.jsx("p",{className:"font-medium mb-2",children:u}),o.map((c,f)=>S.jsxs("p",{className:"text-sm",style:{color:c.color},children:[c.name,":"," ",c.name==="Tokens"?M0(Number(c.value)||0):`$${c.value}`]},f)),"requests"in s&&S.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Requests: ",s.requests]})]})}}),S.jsx(It,{yAxisId:"left",type:"monotone",dataKey:"tokens",stroke:"#0080FF",strokeWidth:2,fillOpacity:1,fill:"url(#tokenGradient)",name:"Tokens"}),S.jsx(It,{yAxisId:"right",type:"monotone",dataKey:"costRounded",stroke:"#00C49F",strokeWidth:2,fillOpacity:1,fill:"url(#costGradient)",name:"Cost"})]})})})}function PB(e,t){if(t==="hourly"){const[n,i]=e.split(" ");if(n&&i){const a=new Date(`${n}T${i}:00Z`);return Wn(a,"HH:mm")}return e}const r=new Date(e);return t==="monthly"?Wn(r,"MMM yyyy"):Wn(r,"MMM dd")}function M0(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function jB({data:e,isLoading:t,className:r}){const n=D.useMemo(()=>!e||e.length===0?[]:e.map(o=>({name:o.model,value:o.tokens,cost:o.cost,percentage:o.percentage,fill:$0(o.model)})),[e]);if(t)return S.jsx(xe,{className:De("h-[300px] w-full",r)});if(!e||e.length===0)return S.jsx("div",{className:De("h-[300px] flex items-center justify-center",r),children:S.jsx("p",{className:"text-muted-foreground",children:"No model data available"})});const i=({active:o,payload:u})=>{if(!o||!u)return null;const s=u;if(!s.length)return null;const c=s[0].payload;return S.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-lg text-xs",children:[S.jsx("p",{className:"font-medium mb-1",children:c.name}),S.jsxs("p",{className:"text-muted-foreground",children:[TB(c.value)," (",c.percentage.toFixed(1),"%)"]}),S.jsxs("p",{className:"text-muted-foreground",children:["$",c.cost.toFixed(4)]})]})},a=o=>o.percentage>5?`${o.percentage.toFixed(1)}%`:"";return S.jsx("div",{className:De("w-full",r),children:S.jsx(Wx,{width:"100%",height:250,children:S.jsxs(_B,{children:[S.jsx(Lt,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:a,innerRadius:50,outerRadius:70,paddingAngle:2,dataKey:"value",children:n.map((o,u)=>S.jsx(xo,{fill:o.fill,strokeWidth:1},`cell-${u}`))}),S.jsx(ct,{content:i})]})})})}function TB(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function EB({model:e}){const t=MB(e.ioRatio);return S.jsxs("div",{className:"space-y-4",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(gO,{className:"h-4 w-4 text-primary shrink-0"}),S.jsx("h4",{className:"font-semibold leading-none truncate",title:e.model,children:e.model})]}),S.jsxs("div",{className:"flex flex-wrap gap-2",children:[S.jsxs(Fn,{variant:"secondary",className:"text-[10px] h-5 px-1.5",children:[e.percentage.toFixed(1),"% usage"]}),S.jsxs(Fn,{variant:t.variant,className:"text-[10px] h-5 px-1.5",children:[e.ioRatio.toFixed(0),":1 I/O"]})]})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsxs("p",{className:"text-lg font-bold",children:["$",e.cost.toFixed(2)]}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Total Cost"})]}),S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsx("p",{className:"text-lg font-bold",children:$B(e.tokens)}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Total Tokens"})]})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h5",{className:"text-[11px] font-medium text-muted-foreground uppercase tracking-wider",children:"Token Breakdown"}),S.jsxs("div",{className:"space-y-1",children:[S.jsx(ia,{label:"Input",tokens:e.inputTokens,cost:e.costBreakdown.input.cost,color:"#335c67",icon:N0}),S.jsx(ia,{label:"Output",tokens:e.outputTokens,cost:e.costBreakdown.output.cost,color:"#fff3b0",icon:I0}),S.jsx(ia,{label:"Cache Write",tokens:e.cacheCreationTokens,cost:e.costBreakdown.cacheCreation.cost,color:"#e09f3e",icon:Xl}),S.jsx(ia,{label:"Cache Read",tokens:e.cacheReadTokens,cost:e.costBreakdown.cacheRead.cost,color:"#9e2a2b",icon:Xl})]})]}),S.jsxs("div",{className:"p-2.5 rounded-md border bg-muted/20 space-y-1.5",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(bO,{className:"h-3.5 w-3.5 text-muted-foreground"}),S.jsx("span",{className:"text-xs font-medium",children:"Input/Output Ratio"})]}),S.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:t.description})]})]})}function ia({label:e,tokens:t,cost:r,color:n,icon:i}){return t===0?null:S.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[S.jsx("div",{className:"w-1 h-6 rounded-full shrink-0",style:{backgroundColor:n}}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"font-medium truncate",children:e}),S.jsxs("span",{className:"font-mono text-muted-foreground",children:["$",r.toFixed(3)]})]}),S.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[S.jsx(i,{className:"h-3 w-3 shrink-0"}),S.jsx("span",{children:CB(t)})]})]})]})}function MB(e){return e>=200?{variant:"destructive",description:"Extended thinking or large context loading. Expected for reasoning models."}:e>=50?{variant:"secondary",description:"More input than output. Typical for analysis tasks."}:e>=5?{variant:"outline",description:"Balanced input/output ratio for typical coding tasks."}:{variant:"default",description:"More output than input. Generation-heavy workload."}}function CB(e){return e.toLocaleString()}function $B(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function kB({data:e,isLoading:t,className:r}){const n=D.useMemo(()=>{if(!e?.sessions||e.sessions.length===0)return null;const i=e.sessions,a=e.total,o=i.reduce((d,h)=>d+(h.inputTokens+h.outputTokens),0),u=Math.round(o/i.length),c=i.reduce((d,h)=>d+h.cost,0)/i.length,f=i[0],l=f?Zl(new Date(f.lastActivity),{addSuffix:!0}):"N/A";return{totalSessions:a,avgTokens:u,avgCost:c,lastActive:l,recentSessions:i.slice(0,3)}},[e]);return t?S.jsxs(Re,{className:De("flex flex-col h-full",r),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsx(xe,{className:"h-5 w-32"})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1",children:S.jsx(xe,{className:"h-full w-full"})})]}):n?S.jsxs(Re,{className:De("flex flex-col h-full shadow-sm",r),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Ah,{className:"w-4 h-4"}),"Session Stats"]})}),S.jsxs(qe,{className:"px-3 pb-3 pt-0 flex-1 flex flex-col gap-4",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-blue-600 dark:text-blue-400",children:[S.jsx(xO,{className:"w-4 h-4"}),S.jsx("span",{className:"text-xl font-bold",children:n.totalSessions})]}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mt-0.5",children:"Total Sessions"})]}),S.jsxs("div",{className:"p-2 rounded-md bg-muted/50 border text-center",children:[S.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-green-600 dark:text-green-400",children:[S.jsx(D0,{className:"w-4 h-4"}),S.jsxs("span",{className:"text-xl font-bold",children:["$",n.avgCost.toFixed(2)]})]}),S.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mt-0.5",children:"Avg Cost/Session"})]})]}),S.jsxs("div",{className:"flex-1 space-y-2",children:[S.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground font-medium mb-1",children:[S.jsx(wO,{className:"w-3 h-3"}),"Recent Activity"]}),S.jsx("div",{className:"space-y-1.5",children:n.recentSessions.map(i=>S.jsxs("div",{className:"flex items-center justify-between text-xs p-1.5 rounded bg-muted/30 hover:bg-muted/50 transition-colors",children:[S.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[S.jsx("span",{className:"font-medium truncate",title:i.projectPath,children:i.projectPath.split("/").pop()}),S.jsx("span",{className:"text-[10px] text-muted-foreground",children:Zl(new Date(i.lastActivity),{addSuffix:!0})})]}),S.jsxs("div",{className:"text-right shrink-0 ml-2",children:[S.jsxs("div",{className:"font-mono",children:["$",i.cost.toFixed(2)]}),S.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[NB(i.inputTokens+i.outputTokens)," toks"]})]})]},i.sessionId))})]})]})]}):S.jsxs(Re,{className:De("flex flex-col h-full",r),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Ah,{className:"w-4 h-4"}),"Session Stats"]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1 flex items-center justify-center",children:S.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"No session data available"})})]})}function NB(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}async function IB(){const e=await fetch("/api/cliproxy/stats");if(!e.ok){const t=await e.json();throw new Error(t.message||"Failed to fetch stats")}return e.json()}async function DB(){const e=await fetch("/api/cliproxy/status");if(!e.ok)throw new Error("Failed to fetch status");return e.json()}function RB(){return Vt({queryKey:["cliproxy-status"],queryFn:DB,refetchInterval:1e4,retry:1})}function qB(e=!0){return Vt({queryKey:["cliproxy-stats"],queryFn:IB,enabled:e,refetchInterval:3e4,retry:1,staleTime:1e4})}function LB({className:e,isLoading:t}){const{data:r,isLoading:n}=RB(),{data:i,isLoading:a,error:o}=qB(r?.running);if(t||n||r?.running&&a)return S.jsxs(Re,{className:De("flex flex-col h-full",e),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4"}),"CLIProxy Stats"]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1",children:S.jsxs("div",{className:"space-y-3",children:[S.jsx(xe,{className:"h-4 w-[100px]"}),S.jsx(xe,{className:"h-16 w-full"})]})})]});if(!r?.running)return S.jsxs(Re,{className:De("flex flex-col h-full border-dashed",e),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4 text-muted-foreground"}),"CLIProxy Stats"]}),S.jsx(Fn,{variant:"secondary",className:"text-[10px] h-5",children:"Offline"})]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1 flex items-center justify-center",children:S.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Start a CLIProxy session (gemini, codex, agy) to collect stats."})})]});if(o)return S.jsxs(Re,{className:De("flex flex-col h-full border-destructive/50",e),children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4"}),"CLIProxy Stats"]}),S.jsx(Fn,{variant:"destructive",className:"text-[10px] h-5",children:"Error"})]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1",children:S.jsx("p",{className:"text-xs text-destructive",children:o.message})})]});const s=i?.totalRequests??0,c=i?.quotaExceededCount??0,f=s-c,l=s>0?Math.round(f/s*100):100,d=i?.tokens?.total??0,h=Object.entries(i?.requestsByModel??{}).sort((v,p)=>p[1]-v[1]).slice(0,4),y=h.length>0?h[0][1]:1;return S.jsxs(Re,{className:De("flex flex-col h-full overflow-hidden",e),children:[S.jsx(Ze,{className:"px-3 py-2 border-b bg-muted/5",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(Wi,{className:"h-4 w-4"}),"CLIProxy Stats"]}),S.jsxs(Fn,{variant:"outline",className:"text-[10px] h-5 text-green-600 border-green-200 bg-green-50 dark:bg-green-900/10 dark:border-green-800",children:[S.jsx(D0,{className:"h-3 w-3 mr-0.5"}),"Running"]})]})}),S.jsx(qe,{className:"p-0 flex-1 min-h-0",children:S.jsx(dO,{className:"h-full",children:S.jsxs("div",{className:"p-3 space-y-3",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[S.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-muted/30",children:[S.jsxs("div",{className:"relative",children:[S.jsxs("svg",{className:"w-10 h-10 -rotate-90",viewBox:"0 0 36 36",children:[S.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-muted/30"}),S.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:`${l*.88} 88`,strokeLinecap:"round",className:l>=90?"text-green-500":"text-amber-500"})]}),S.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-[8px] font-bold",children:[l,"%"]})]}),S.jsxs("div",{className:"min-w-0",children:[S.jsx("div",{className:"text-lg font-bold leading-none",children:C0(s)}),S.jsx("div",{className:"text-[9px] text-muted-foreground mt-0.5",children:c>0?`${c} failed`:"All success"})]})]}),S.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-muted/30",children:[S.jsx("div",{className:"p-1.5 rounded-md bg-purple-100 dark:bg-purple-900/20",children:S.jsx(OO,{className:"h-4 w-4 text-purple-600"})}),S.jsxs("div",{className:"min-w-0",children:[S.jsx("div",{className:"text-lg font-bold leading-none",children:C0(d)}),S.jsx("div",{className:"text-[9px] text-muted-foreground mt-0.5",children:"Total tokens"})]})]})]}),h.length>0&&S.jsxs("div",{className:"space-y-1.5",children:[S.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-medium text-muted-foreground",children:[S.jsx(_O,{className:"h-3 w-3"}),"Models Used"]}),S.jsx("div",{className:"space-y-1",children:h.map(([v,p])=>{const g=Math.round(p/y*100),x=BB(v);return S.jsxs("div",{className:"group",children:[S.jsxs("div",{className:"flex items-center justify-between text-[10px] mb-0.5",children:[S.jsx("span",{className:"truncate font-medium",title:v,children:x}),S.jsx("span",{className:"text-muted-foreground shrink-0 ml-2",children:p})]}),S.jsx("div",{className:"h-1 bg-muted/50 rounded-full overflow-hidden",children:S.jsx("div",{className:"h-full bg-accent/70 rounded-full transition-all",style:{width:`${g}%`}})})]},v)})})]})]})})})]})}function C0(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function BB(e){let t=e.replace(/^gemini-claude-/,"").replace(/^gemini-/,"").replace(/^claude-/,"").replace(/^anthropic\./,"").replace(/-thinking$/," Thinking");return t=t.split(/[-_]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "),t.length>20&&(t=t.slice(0,18)+"..."),t}const FB="/api";function rt(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}${r}${n}`}const Tr={summary:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/summary?${t}`)},trends:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/daily?${t}`)},hourly:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),Wt(`/usage/hourly?${t}`)},models:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/models?${t}`)},sessions:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),e?.limit&&t.append("limit",e.limit.toString()),e?.offset&&t.append("offset",e.offset.toString()),Wt(`/usage/sessions?${t}`)},monthly:(e,t)=>{const r=new URLSearchParams;return e&&r.append("months",e.toString()),t&&r.append("profile",t),Wt(`/usage/monthly?${r}`)},refresh:async()=>{if(!(await fetch(`${FB}/usage/refresh`,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw new Error("Failed to refresh usage cache")},status:()=>Wt("/usage/status"),insights:e=>{const t=new URLSearchParams;return e?.startDate&&t.append("since",rt(e.startDate)),e?.endDate&&t.append("until",rt(e.endDate)),e?.profile&&t.append("profile",e.profile),Wt(`/usage/insights?${t}`)}};async function Wt(e){const r=await fetch(`/api${e}`,{headers:{"Content-Type":"application/json"}});if(!r.ok){const i=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(i.error||r.statusText)}const n=await r.json();return n.data||n}function WB(e){return Vt({queryKey:["usage","summary",e],queryFn:()=>Tr.summary(e),staleTime:60*1e3})}function UB(e){return Vt({queryKey:["usage","trends",e],queryFn:()=>Tr.trends(e),staleTime:60*1e3})}function zB(e){return Vt({queryKey:["usage","hourly",e],queryFn:()=>Tr.hourly(e),staleTime:60*1e3})}function HB(e){return Vt({queryKey:["usage","models",e],queryFn:()=>Tr.models(e),staleTime:60*1e3})}function GB(){const e=TO();return D.useCallback(async()=>{await Tr.refresh(),await e.invalidateQueries({queryKey:["usage"]})},[e])}function KB(){return Vt({queryKey:["usage","status"],queryFn:()=>Tr.status(),staleTime:10*1e3,refetchInterval:30*1e3})}function YB(e){return Vt({queryKey:["usage","sessions",e],queryFn:()=>Tr.sessions(e),staleTime:60*1e3})}function VB(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString()}function rF(){const[e,t]=D.useState({from:zi(new Date,30),to:new Date}),[r,n]=D.useState(!1),[i,a]=D.useState(null),[o,u]=D.useState(null),[s,c]=D.useState("daily"),f=D.useRef(null),l=GB(),d=async()=>{n(!0);try{await l()}finally{n(!1)}},h={startDate:e?.from,endDate:e?.to},{data:y,isLoading:v}=WB(h),{data:p,isLoading:g}=UB(h),{data:x,isLoading:w}=zB(h),{data:O,isLoading:m}=HB(h),{data:b,isLoading:_}=YB({...h,limit:3}),{data:A}=KB(),T=D.useCallback(()=>{const E=new Date;t({from:zi(E,1),to:E}),c("hourly")},[]),$=D.useCallback(E=>{t(E),c("daily")},[]),j=D.useMemo(()=>A?.lastFetch?Zl(new Date(A.lastFetch),{addSuffix:!0}):null,[A?.lastFetch]),M=D.useCallback((E,k)=>{const I=k.currentTarget.getBoundingClientRect();u({x:I.left+I.width/2,y:I.top+I.height/2}),a(E)},[]),C=D.useCallback(()=>{a(null),u(null)},[]);return S.jsxs("div",{className:"flex flex-col h-full overflow-hidden px-4 pt-4 pb-50 gap-4",children:[S.jsxs("div",{className:"flex items-center justify-between shrink-0",children:[S.jsxs("div",{children:[S.jsx("h1",{className:"text-xl font-semibold",children:"Analytics"}),S.jsx("p",{className:"text-sm text-muted-foreground",children:"Track usage & insights"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(Vl,{variant:s==="hourly"?"default":"outline",size:"sm",className:"h-8",onClick:T,children:"24H"}),S.jsx(H_,{value:e,onChange:$,presets:[{label:"7D",range:{from:zi(new Date,7),to:new Date}},{label:"30D",range:{from:zi(new Date,30),to:new Date}},{label:"Month",range:{from:HO(new Date),to:new Date}},{label:"All Time",range:{from:void 0,to:new Date}}]}),j&&S.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:["Updated ",j]}),S.jsx(Vl,{variant:"outline",size:"sm",className:"gap-2 h-8",onClick:d,disabled:r,children:S.jsx(SO,{className:`w-3.5 h-3.5 ${r?"animate-spin":""}`})})]})]}),S.jsx(K_,{data:y,isLoading:v}),S.jsxs("div",{className:"flex-1 flex flex-col min-h-0 gap-4",children:[S.jsxs(Re,{className:"flex flex-col flex-1 min-h-0 max-h-[500px] overflow-hidden shadow-sm",children:[S.jsx(Ze,{className:"px-3 py-2 shrink-0",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(AO,{className:"w-4 h-4"}),s==="hourly"?"Last 24 Hours":"Usage Trends"]})}),S.jsx(qe,{className:"px-3 pb-3 pt-0 flex-1 min-h-0",children:S.jsx(AB,{data:s==="hourly"?x||[]:p||[],isLoading:s==="hourly"?w:g,granularity:s==="hourly"?"hourly":"daily"})})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-10 gap-4 h-auto lg:h-[180px] shrink-0",children:[S.jsxs(Re,{className:"flex flex-col h-full min-h-0 shadow-sm lg:col-span-4",children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(k0,{className:"w-4 h-4"}),"Cost by Model"]})}),S.jsx(qe,{className:"px-2 pb-2 pt-0 flex-1 min-h-0 overflow-y-auto",children:m?S.jsx(xe,{className:"h-full w-full"}):S.jsxs("div",{className:"space-y-0.5",children:[[...O||[]].sort((E,k)=>k.cost-E.cost).map(E=>S.jsxs("button",{className:"group flex items-center text-xs w-full hover:bg-muted/50 rounded px-2 py-1.5 transition-colors cursor-pointer gap-3",onClick:k=>M(E,k),title:"Click for details",children:[S.jsxs("div",{className:"flex items-center gap-2 min-w-0 w-[180px] shrink-0",children:[S.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:$0(E.model)}}),S.jsx("span",{className:"font-medium truncate group-hover:underline underline-offset-2",children:E.model})]}),S.jsx("div",{className:"flex-1 flex items-center gap-1 min-w-0",children:S.jsxs("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden flex",children:[S.jsx("div",{className:"h-full",style:{backgroundColor:"#335c67",width:`${E.cost>0?E.costBreakdown.input.cost/E.cost*100:0}%`},title:`Input: $${E.costBreakdown.input.cost.toFixed(2)}`}),S.jsx("div",{className:"h-full",style:{backgroundColor:"#fff3b0",width:`${E.cost>0?E.costBreakdown.output.cost/E.cost*100:0}%`},title:`Output: $${E.costBreakdown.output.cost.toFixed(2)}`}),S.jsx("div",{className:"h-full",style:{backgroundColor:"#e09f3e",width:`${E.cost>0?E.costBreakdown.cacheCreation.cost/E.cost*100:0}%`},title:`Cache Write: $${E.costBreakdown.cacheCreation.cost.toFixed(2)}`}),S.jsx("div",{className:"h-full",style:{backgroundColor:"#9e2a2b",width:`${E.cost>0?E.costBreakdown.cacheRead.cost/E.cost*100:0}%`},title:`Cache Read: $${E.costBreakdown.cacheRead.cost.toFixed(2)}`})]})}),S.jsx("span",{className:"text-[10px] text-muted-foreground w-14 text-right shrink-0",children:VB(E.tokens)}),S.jsxs("span",{className:"font-mono font-medium w-16 text-right shrink-0",children:["$",E.cost.toFixed(2)]}),S.jsx(PO,{className:"w-3 h-3 opacity-0 group-hover:opacity-50 transition-opacity shrink-0"})]},E.model)),S.jsxs("div",{className:"flex items-center gap-3 pt-2 px-2 text-[10px] text-muted-foreground border-t mt-2",children:[S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#335c67"}}),"Input"]}),S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full border border-muted-foreground/30",style:{backgroundColor:"#fff3b0"}}),"Output"]}),S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#e09f3e"}}),"Cache Write"]}),S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#9e2a2b"}}),"Cache Read"]})]})]})})]}),S.jsxs(Re,{className:"flex flex-col h-full min-h-0 shadow-sm lg:col-span-2",children:[S.jsx(Ze,{className:"px-3 py-2",children:S.jsxs(At,{className:"text-base font-semibold flex items-center gap-2",children:[S.jsx(jO,{className:"w-4 h-4"}),"Model Usage"]})}),S.jsx(qe,{className:"px-2 pb-2 pt-0 flex-1 min-h-0 flex items-center justify-center",children:S.jsx(jB,{data:O||[],isLoading:m,className:"h-full w-full"})})]}),S.jsx(kB,{data:b,isLoading:_,className:"lg:col-span-2"}),S.jsx(LB,{isLoading:v,className:"lg:col-span-2"})]}),S.jsxs(hO,{open:!!i,onOpenChange:E=>!E&&C(),children:[S.jsx(pO,{asChild:!0,children:S.jsx("div",{ref:f,className:"fixed pointer-events-none",style:{left:o?.x??0,top:o?.y??0,width:1,height:1}})}),S.jsx(vO,{className:"w-80 p-3",side:"top",align:"center",children:i&&S.jsx(EB,{model:i})})]})]})]})}function nF(){return S.jsxs("div",{className:"space-y-4 h-full overflow-hidden",children:[S.jsxs(Re,{className:"flex flex-col min-h-[300px]",children:[S.jsx(Ze,{className:"p-4 pb-2",children:S.jsx(xe,{className:"h-4 w-32"})}),S.jsx(qe,{className:"p-4 pt-0 flex-1",children:S.jsx(xe,{className:"h-full w-full"})})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[S.jsxs(Re,{className:"flex flex-col min-h-[250px]",children:[S.jsx(Ze,{className:"p-4 pb-2",children:S.jsx(xe,{className:"h-4 w-28"})}),S.jsx(qe,{className:"p-4 pt-2",children:S.jsx("div",{className:"space-y-3",children:[1,2,3,4,5].map(e=>S.jsxs("div",{className:"flex justify-between items-center",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(xe,{className:"w-2.5 h-2.5 rounded-full"}),S.jsx(xe,{className:"h-3 w-24"})]}),S.jsx(xe,{className:"h-3 w-16"})]},e))})})]}),S.jsxs(Re,{className:"flex flex-col min-h-[250px]",children:[S.jsx(Ze,{className:"p-4 pb-2",children:S.jsx(xe,{className:"h-4 w-28"})}),S.jsx(qe,{className:"p-4 pt-0 flex-1",children:S.jsxs("div",{className:"flex w-full h-full items-center",children:[S.jsx("div",{className:"flex-1 flex justify-center",children:S.jsx(xe,{className:"h-[180px] w-[180px] rounded-full"})}),S.jsx("div",{className:"w-[140px] shrink-0 pl-2 space-y-2",children:[1,2,3,4].map(e=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(xe,{className:"w-2 h-2 rounded-full"}),S.jsx(xe,{className:"h-3 w-20"})]},e))})]})})]})]})]})}export{rF as AnalyticsPage,nF as AnalyticsSkeleton};
|