@mx-cartographer/experiences 9.7.118 → 9.7.119

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/cashflow/CashflowMiniWidget.es.js +53 -19
  3. package/dist/cashflow/CashflowMiniWidget.es.js.map +1 -1
  4. package/dist/cashflow/components/CashflowWidgetContent.d.ts +1 -0
  5. package/dist/cashflow/components/CashflowWidgetContent.es.js +173 -137
  6. package/dist/cashflow/components/CashflowWidgetContent.es.js.map +1 -1
  7. package/dist/cashflow/components/RemainingCash.d.ts +1 -0
  8. package/dist/cashflow/components/RemainingCash.es.js +10 -9
  9. package/dist/cashflow/components/RemainingCash.es.js.map +1 -1
  10. package/dist/common/components/InformationTooltip.d.ts +1 -0
  11. package/dist/common/components/InformationTooltip.es.js +16 -16
  12. package/dist/common/components/InformationTooltip.es.js.map +1 -1
  13. package/dist/common/components/MiniWidgetContainer.d.ts +13 -0
  14. package/dist/common/components/MiniWidgetContainer.es.js +63 -55
  15. package/dist/common/components/MiniWidgetContainer.es.js.map +1 -1
  16. package/dist/common/components/charts/LineChart.d.ts +5 -1
  17. package/dist/common/components/charts/LineChart.es.js +124 -122
  18. package/dist/common/components/charts/LineChart.es.js.map +1 -1
  19. package/dist/common/components/charts/linechart/CustomLegend.es.js +53 -46
  20. package/dist/common/components/charts/linechart/CustomLegend.es.js.map +1 -1
  21. package/dist/common/components/charts/linechart/CustomMark.d.ts +2 -0
  22. package/dist/common/components/charts/linechart/CustomMark.es.js +72 -35
  23. package/dist/common/components/charts/linechart/CustomMark.es.js.map +1 -1
  24. package/dist/core/types/localization/CashflowCopy.d.ts +1 -0
  25. package/dist/core/types/localization/TrendsCopy.d.ts +1 -0
  26. package/dist/trends/TrendsMiniWidget.es.js +29 -22
  27. package/dist/trends/TrendsMiniWidget.es.js.map +1 -1
  28. package/dist/trends/components/SpendingChart.es.js +53 -17
  29. package/dist/trends/components/SpendingChart.es.js.map +1 -1
  30. package/dist/trends/utils/SpendingData.d.ts +2 -0
  31. package/dist/trends/utils/SpendingData.es.js +70 -43
  32. package/dist/trends/utils/SpendingData.es.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,59 +1,59 @@
1
- import { formatCurrency as P, generateEqualIntervals as R, roundedAverage as ft } from "../../../core/utils/NumberFormatting.es.js";
2
- import { stripChartSlotProps as ct } from "./chartSlotProps.es.js";
3
- import { getMarkerShape as ht } from "./linechart/utils/markerShapes.es.js";
4
- import yt from "./linechart/CustomLegend.es.js";
5
- import { CustomLine as dt } from "./linechart/CustomLine.es.js";
6
- import { CustomMark as ut } from "./linechart/CustomMark.es.js";
7
- import { CustomTooltip as xt } from "./linechart/CustomTooltip.es.js";
1
+ import { formatCurrency as R, generateEqualIntervals as I, roundedAverage as ut } from "../../../core/utils/NumberFormatting.es.js";
2
+ import { stripChartSlotProps as xt } from "./chartSlotProps.es.js";
3
+ import { getMarkerShape as gt } from "./linechart/utils/markerShapes.es.js";
4
+ import bt from "./linechart/CustomLegend.es.js";
5
+ import { CustomLine as kt } from "./linechart/CustomLine.es.js";
6
+ import { CustomMark as Lt } from "./linechart/CustomMark.es.js";
7
+ import { CustomTooltip as Mt } from "./linechart/CustomTooltip.es.js";
8
8
  import "react";
9
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
10
- import { useTheme as gt } from "@mui/material/styles";
11
- import bt from "@mui/material/Box";
12
- import { BarPlot as kt } from "@mui/x-charts/BarChart";
13
- import { ChartContainer as Lt } from "@mui/x-charts/ChartContainer";
14
- import { ChartsAxisHighlight as Mt } from "@mui/x-charts/ChartsAxisHighlight";
15
- import { ChartsText as I } from "@mui/x-charts/ChartsText";
16
- import { ChartsReferenceLine as vt } from "@mui/x-charts/ChartsReferenceLine";
17
- import { ChartsTooltipContainer as Tt } from "@mui/x-charts/ChartsTooltip";
18
- import { ChartsXAxis as At } from "@mui/x-charts/ChartsXAxis";
19
- import { ChartsYAxis as Ct } from "@mui/x-charts/ChartsYAxis";
20
- import { AreaPlot as Pt, LinePlot as Rt, MarkPlot as It } from "@mui/x-charts/LineChart";
21
- var St = (r) => {
22
- const a = typeof r.text == "string" ? r.text : "", f = Array.from(a.trim())[0] ?? "";
23
- return f ? /* @__PURE__ */ e(I, {
24
- ...r,
25
- "aria-label": a,
9
+ import { jsx as e, jsxs as x } from "react/jsx-runtime";
10
+ import { useTheme as vt } from "@mui/material/styles";
11
+ import Tt from "@mui/material/Box";
12
+ import { BarPlot as At } from "@mui/x-charts/BarChart";
13
+ import { ChartContainer as Ct } from "@mui/x-charts/ChartContainer";
14
+ import { ChartsAxisHighlight as Pt } from "@mui/x-charts/ChartsAxisHighlight";
15
+ import { ChartsText as S } from "@mui/x-charts/ChartsText";
16
+ import { ChartsReferenceLine as Rt } from "@mui/x-charts/ChartsReferenceLine";
17
+ import { ChartsTooltipContainer as It } from "@mui/x-charts/ChartsTooltip";
18
+ import { ChartsXAxis as St } from "@mui/x-charts/ChartsXAxis";
19
+ import { ChartsYAxis as wt } from "@mui/x-charts/ChartsYAxis";
20
+ import { AreaPlot as Ot, LinePlot as _t, MarkPlot as Dt } from "@mui/x-charts/LineChart";
21
+ var Gt = (a) => {
22
+ const f = typeof a.text == "string" ? a.text : "", c = Array.from(f.trim())[0] ?? "";
23
+ return c ? /* @__PURE__ */ e(S, {
24
+ ...a,
25
+ "aria-label": f,
26
26
  role: "img",
27
- text: f
28
- }) : /* @__PURE__ */ e(I, { ...r });
29
- }, wt = { axisTickLabel: St }, Ft = ({ areaColor: r, axisColor: a, baseline: f = "max", chartFor: x, chartXaxisSx: S, chartYaxisSx: w, colors: k, curveType: O = "linear", customLegendVariant: _, customLegendSx: D, customLegendBoxSx: G, customTooltipLabels: N, datasets: c, height: W, isCurrency: X, isGraphClippingXAxis: $ = !1, labels: L, labelBackgroundColor: M, labelFontColor: j, labelFontSize: E, margin: q, markHandlers: z, markStyles: H, minRange: Y, maxRange: B, narrowXAxisLabels: v = !1, showAllXAxisLabels: J = !1, onItemClick: g, peerAverage: K, showArea: T = !1, showAverage: A = !1, showAxisHighlight: Q = !1, showBars: b = !1, showLegend: U = !1, showMark: V = !0, showMarkLabel: Z = !1, showTooltip: F = !1, showXAxis: tt = !1, showXAxisTicks: et = !1, showYAxis: rt = !1, showYAxisTicks: at = !1, title: it, useCustomMark: ot = !1, valueFormatterString: n, width: nt, xAxisScaleType: st }) => {
30
- const i = gt(), lt = c.flat().map((t) => t.x), s = c.flat().map((t) => t.y), C = K || ft(s), l = s.length ? Math.floor(Math.min(...s) / 100) * 100 : 0, m = s.length ? Math.ceil(Math.max(...s) / 100) * 100 : 0, h = c.map((t, d) => ({
31
- type: b ? "bar" : "line",
32
- curve: O,
33
- color: b ? i.palette.chart?.chart6 : k[d] ?? i.palette.primary.main,
34
- data: t.map((o) => o.y),
35
- area: T,
36
- baseline: f,
27
+ text: c
28
+ }) : /* @__PURE__ */ e(S, { ...a });
29
+ }, Nt = { axisTickLabel: Gt }, ie = ({ areaColor: a, areaGradientColor: f, averageLineStyle: c, axisColor: n, baseline: w = "max", chartFor: g, chartXaxisSx: O, chartYaxisSx: _, colors: L, curveType: D = "linear", customLegendVariant: G, customLegendSx: N, customLegendBoxSx: W, customTooltipLabels: X, datasets: h, height: $, isCurrency: j, isGraphClippingXAxis: E = !1, labels: M, labelBackgroundColor: v, labelFontColor: q, labelFontSize: z, margin: H, markHandlers: Y, markVariant: B, markStyles: J, minRange: K, maxRange: Q, narrowXAxisLabels: T = !1, showAllXAxisLabels: U = !1, onItemClick: b, peerAverage: V, showArea: A = !1, showAverage: C = !1, showAxisHighlight: Z = !1, showBars: k = !1, showLegend: F = !1, showMark: tt = !0, showMarkLabel: et = !1, showTooltip: at = !1, showXAxis: rt = !1, showXAxisTicks: it = !1, showYAxis: ot = !1, showYAxisTicks: nt = !1, tickIntervals: st, title: lt, useCustomMark: mt = !1, valueFormatterString: o, width: pt, xAxisScaleType: ft, yAxisValueFormatter: ct }) => {
30
+ const r = vt(), ht = h.flat().map((t) => t.x), s = h.flat().map((t) => t.y), P = V || ut(s), l = s.length ? Math.floor(Math.min(...s) / 100) * 100 : 0, m = s.length ? Math.ceil(Math.max(...s) / 100) * 100 : 0, y = h.map((t, u) => ({
31
+ type: k ? "bar" : "line",
32
+ curve: D,
33
+ color: k ? r.palette.chart?.chart6 : L[u] ?? r.palette.primary.main,
34
+ data: t.map((i) => i.y),
35
+ area: A,
36
+ baseline: w,
37
37
  showMark: !0,
38
- shape: ht(d),
39
- valueFormatter: (o) => n ? P(o || 0, n) : String(o)
40
- })), mt = {
38
+ shape: gt(u),
39
+ valueFormatter: (i) => o ? R(i || 0, o) : String(i)
40
+ })), yt = {
41
41
  top: 60,
42
42
  right: 35,
43
43
  bottom: 25,
44
44
  left: -10,
45
- ...q
45
+ ...H
46
46
  };
47
- let p = Y ?? l, y = B ?? m;
48
- if (x === "networthChart") {
49
- const t = m - l, d = t < m * 0.05 ? 0.25 : 0.2, o = Math.max(t * d, m * 0.015);
50
- p = l - o < 0 ? l : l - o, y = m + o;
47
+ let p = K ?? l, d = Q ?? m;
48
+ if (g === "networthChart") {
49
+ const t = m - l, u = t < m * 0.05 ? 0.25 : 0.2, i = Math.max(t * u, m * 0.015);
50
+ p = l - i < 0 ? l : l - i, d = m + i;
51
51
  }
52
- const pt = () => {
53
- if (x === "creditOverTime") return R(p, 850, 5);
54
- if (x === "networthChart") return R(p, y, 5);
52
+ const dt = () => {
53
+ if (g === "creditOverTime") return I(p, 850, 5);
54
+ if (g === "networthChart") return I(p, d, 5);
55
55
  };
56
- return /* @__PURE__ */ u(bt, {
56
+ return /* @__PURE__ */ x(Tt, {
57
57
  sx: {
58
58
  position: "relative",
59
59
  touchAction: "pan-y",
@@ -63,51 +63,52 @@ var St = (r) => {
63
63
  },
64
64
  "& .recharts-wrapper": { touchAction: "pan-y" }
65
65
  },
66
- children: [/* @__PURE__ */ u(Lt, {
67
- height: W,
66
+ children: [/* @__PURE__ */ x(Ct, {
67
+ height: $,
68
68
  tabIndex: -1,
69
- margin: mt,
70
- series: h,
69
+ margin: yt,
70
+ series: y,
71
71
  sx: {
72
72
  "& .MuiBarLabel-root": {
73
73
  fontSize: 10,
74
74
  fontWeight: 600
75
75
  },
76
76
  "& .MuiAreaElement-root": { opacity: 0.15 },
77
- "& .MuiChartsAxis-tickLabel > tspan": { fontFamily: i.typography.body2.fontFamily },
78
- "& .MuiLineChart-markLabel": { fontFamily: i.typography.body2.fontFamily }
77
+ "& .MuiChartsAxis-tickLabel > tspan": { fontFamily: r.typography.body2.fontFamily },
78
+ "& .MuiLineChart-markLabel": { fontFamily: r.typography.body2.fontFamily }
79
79
  },
80
- width: nt,
80
+ width: pt,
81
81
  xAxis: [{
82
- data: lt,
83
- scaleType: st || (b ? "band" : "point"),
84
- ...(J || v) && { tickLabelInterval: () => !0 }
82
+ data: ht,
83
+ scaleType: ft || (k ? "band" : "point"),
84
+ ...(U || T) && { tickLabelInterval: () => !0 }
85
85
  }],
86
86
  yAxis: [{
87
- tickInterval: pt(),
88
- min: $ ? -22 : p,
89
- max: y || 100,
90
- colorMap: T && h.length < 2 ? {
87
+ tickInterval: st ?? dt(),
88
+ min: E ? -22 : p,
89
+ max: d || 100,
90
+ colorMap: A && y.length < 2 ? {
91
91
  type: "continuous",
92
92
  min: p,
93
- max: y,
94
- color: [i.palette.background.paper, k[0] ?? i.palette.primary.main]
93
+ max: d,
94
+ color: [r.palette.background.paper, f ?? L[0] ?? r.palette.primary.main]
95
95
  } : void 0,
96
- valueFormatter: (t) => n ? P(t, n) : String(t),
96
+ valueFormatter: ct ?? ((t) => o ? R(t, o) : String(t)),
97
97
  width: 62
98
98
  }],
99
99
  children: [
100
- A && /* @__PURE__ */ e(vt, {
100
+ C && /* @__PURE__ */ e(Rt, {
101
101
  lineStyle: {
102
- stroke: M ? i.palette.neutral.main : i.palette.neutral.dark,
102
+ stroke: v ? r.palette.neutral.main : r.palette.neutral.dark,
103
103
  strokeDasharray: "10, 8",
104
- strokeWidth: 2
104
+ strokeWidth: 2,
105
+ ...c
105
106
  },
106
- y: C
107
+ y: P
107
108
  }),
108
- /* @__PURE__ */ e(Pt, {
109
- onItemClick: g,
110
- ...r && { slots: { area: (t) => /* @__PURE__ */ u("g", { children: [/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ u("linearGradient", {
109
+ /* @__PURE__ */ e(Ot, {
110
+ onItemClick: b,
111
+ ...a && { slots: { area: (t) => /* @__PURE__ */ x("g", { children: [/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ x("linearGradient", {
111
112
  id: "customGradient",
112
113
  x1: "0",
113
114
  x2: "0",
@@ -115,93 +116,94 @@ var St = (r) => {
115
116
  y2: "1",
116
117
  children: [/* @__PURE__ */ e("stop", {
117
118
  offset: "0%",
118
- stopColor: r
119
+ stopColor: a
119
120
  }), /* @__PURE__ */ e("stop", {
120
121
  offset: "100%",
121
- stopColor: r,
122
+ stopColor: a,
122
123
  stopOpacity: 0.02
123
124
  })]
124
125
  }) }), /* @__PURE__ */ e("path", {
125
- ...ct(t),
126
+ ...xt(t),
126
127
  fill: "url(#customGradient)"
127
128
  })] }) } }
128
129
  }),
129
- /* @__PURE__ */ e(Rt, {
130
- onItemClick: g,
131
- slots: { line: (t) => /* @__PURE__ */ e(dt, {
130
+ /* @__PURE__ */ e(_t, {
131
+ onItemClick: b,
132
+ slots: { line: (t) => /* @__PURE__ */ e(kt, {
132
133
  ...t,
133
- lineColor: r ?? t.ownerState.color ?? i.palette.primary.main
134
+ lineColor: a ?? t.ownerState.color ?? r.palette.primary.main
134
135
  }) }
135
136
  }),
136
- /* @__PURE__ */ e(It, {
137
- onItemClick: g,
138
- slots: ot ? { mark: (t) => /* @__PURE__ */ e(ut, {
139
- handlers: z,
140
- labelBackgroundColor: M,
141
- labelFontColor: j,
142
- labelFontSize: E,
143
- showLabel: Z,
144
- showMark: V || t.dataIndex === c[0].length - 1,
145
- style: H?.(t.dataIndex) ?? {},
146
- valueFormatterString: n,
137
+ /* @__PURE__ */ e(Dt, {
138
+ onItemClick: b,
139
+ slots: mt ? { mark: (t) => /* @__PURE__ */ e(Lt, {
140
+ handlers: Y,
141
+ labelBackgroundColor: v,
142
+ labelFontColor: q,
143
+ labelFontSize: z,
144
+ showLabel: et,
145
+ showMark: tt || t.dataIndex === h[0].length - 1,
146
+ style: J?.(t.dataIndex) ?? {},
147
+ valueFormatterString: o,
148
+ variant: B,
147
149
  yData: s,
148
150
  ...t
149
151
  }) } : void 0
150
152
  }),
151
- /* @__PURE__ */ e(kt, {
153
+ /* @__PURE__ */ e(At, {
152
154
  barLabel: (t) => Number(t.value) > 0 ? `$${t.value}` : null,
153
155
  borderRadius: 10
154
156
  }),
155
- /* @__PURE__ */ e(At, {
156
- disableLine: !tt,
157
- disableTicks: !et,
158
- slots: v ? wt : void 0,
159
- slotProps: a ? {
160
- axisLine: { style: { stroke: a } },
161
- axisTick: { style: { stroke: a } }
157
+ /* @__PURE__ */ e(St, {
158
+ disableLine: !rt,
159
+ disableTicks: !it,
160
+ slots: T ? Nt : void 0,
161
+ slotProps: n ? {
162
+ axisLine: { style: { stroke: n } },
163
+ axisTick: { style: { stroke: n } }
162
164
  } : {},
163
- sx: { ...S }
165
+ sx: { ...O }
164
166
  }),
165
- /* @__PURE__ */ e(Ct, {
166
- disableLine: !rt,
167
- disableTicks: !at,
168
- slotProps: a ? {
169
- axisLine: { style: { stroke: a } },
170
- axisTick: { style: { stroke: a } }
167
+ /* @__PURE__ */ e(wt, {
168
+ disableLine: !ot,
169
+ disableTicks: !nt,
170
+ slotProps: n ? {
171
+ axisLine: { style: { stroke: n } },
172
+ axisTick: { style: { stroke: n } }
171
173
  } : {},
172
- sx: { ...w }
174
+ sx: { ..._ }
173
175
  }),
174
- Q && /* @__PURE__ */ e(Mt, { x: "line" }),
175
- F && /* @__PURE__ */ e(Tt, {
176
+ Z && /* @__PURE__ */ e(Pt, { x: "line" }),
177
+ at && /* @__PURE__ */ e(It, {
176
178
  trigger: "axis",
177
- children: /* @__PURE__ */ e(xt, {
178
- customLabels: N,
179
- isCurrency: X,
180
- labels: L,
181
- series: h,
182
- valueFormatterString: n
179
+ children: /* @__PURE__ */ e(Mt, {
180
+ customLabels: X,
181
+ isCurrency: j,
182
+ labels: M,
183
+ series: y,
184
+ valueFormatterString: o
183
185
  })
184
186
  })
185
187
  ]
186
- }), U && /* @__PURE__ */ e(yt, {
187
- average: A ? C : void 0,
188
- customLegendBoxSx: G,
189
- customLegendVariant: _,
190
- labels: L,
191
- series: h,
188
+ }), F && /* @__PURE__ */ e(bt, {
189
+ average: C ? P : void 0,
190
+ customLegendBoxSx: W,
191
+ customLegendVariant: G,
192
+ labels: M,
193
+ series: y,
192
194
  style: {
193
195
  position: "absolute",
194
196
  top: 16,
195
197
  left: 16,
196
- ...D
198
+ ...N
197
199
  },
198
- title: it,
199
- valueFormatterString: n
200
+ title: lt,
201
+ valueFormatterString: o
200
202
  })]
201
203
  });
202
204
  };
203
205
  export {
204
- Ft as LineChart
206
+ ie as LineChart
205
207
  };
206
208
 
207
209
  //# sourceMappingURL=LineChart.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.es.js","names":[],"sources":["../../../../src/common/components/charts/LineChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\nimport { useTheme } from '@mui/material/styles'\n\nimport type { AllSeriesType } from '@mui/x-charts'\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer as ResponsiveChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight'\nimport { ChartsText, type ChartsTextProps } from '@mui/x-charts/ChartsText'\nimport { ChartsReferenceLine } from '@mui/x-charts/ChartsReferenceLine'\nimport { ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\nimport { ChartsYAxis } from '@mui/x-charts/ChartsYAxis'\nimport { AreaPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart'\n\nimport { stripChartSlotProps } from './chartSlotProps'\nimport CustomLegend from './linechart/CustomLegend'\nimport { getMarkerShape } from './linechart/utils/markerShapes'\nimport { CustomLine } from './linechart/CustomLine'\nimport { CustomMark, MarkHandlers } from './linechart/CustomMark'\nimport { CustomTooltip } from './linechart/CustomTooltip'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { generateEqualIntervals, roundedAverage } from '../../../core/utils/NumberFormatting'\n\nexport type LineChartDataset = { x: string; y: number }[]\nexport type LineChartLabel = string | { label: string; amount: number }\nexport type TooltipLabel = LineChartLabel & { header?: string }\n\n// X-axis tick that shows only the first letter of the label (e.g. \"J\" for\n// \"Jan\") so all labels fit in small/narrow views. role=\"img\" + aria-label give\n// the tick a reliable accessible name (aria-label alone on a bare SVG <text> is\n// inconsistently announced), so screen readers still get the full label.\nconst NarrowXAxisTickLabel = (props: ChartsTextProps) => {\n const fullLabel = typeof props.text === 'string' ? props.text : ''\n // Array.from keeps surrogate pairs / combining marks intact (non-Latin locales).\n const singleLetter = Array.from(fullLabel.trim())[0] ?? ''\n if (!singleLetter) return <ChartsText {...props} />\n return <ChartsText {...props} aria-label={fullLabel} role=\"img\" text={singleLetter} />\n}\n\nconst NARROW_X_AXIS_SLOTS = { axisTickLabel: NarrowXAxisTickLabel }\n\ntype LineChartCurve =\n | 'catmullRom'\n | 'linear'\n | 'monotoneX'\n | 'monotoneY'\n | 'natural'\n | 'step'\n | 'stepBefore'\n | 'stepAfter'\n | 'bump'\n | 'bumpX'\n | 'bumpY'\n\ninterface LineChartProps {\n areaColor?: string\n axisColor?: string\n baseline?: string\n chartFor?: string\n chartXaxisSx?: SxProps\n chartYaxisSx?: SxProps\n // Because theme chart colors are typed string|undefined\n colors: (string | undefined)[]\n curveType?: LineChartCurve\n customLegendVariant?: string\n customLegendSx?: SxProps\n customLegendBoxSx?: SxProps\n customTooltipLabels?: TooltipLabel[][]\n datasets: LineChartDataset[]\n height?: number\n isCurrency?: boolean\n isGraphClippingXAxis?: boolean\n labels: LineChartLabel[]\n labelBackgroundColor?: string\n labelFontColor?: string\n labelFontSize?: number\n margin?: { top?: number; right?: number; bottom?: number; left?: number }\n markHandlers?: MarkHandlers\n markStyles?: (markIndex: number) => React.CSSProperties & {\n markLabelStyles?: React.CSSProperties\n }\n minRange?: number\n maxRange?: number\n // When true, x-axis labels render as a single letter (with the full label kept\n // as the accessible name), so months don't overlap and get dropped in\n // small/narrow views. Implies showAllXAxisLabels.\n narrowXAxisLabels?: boolean\n onItemClick?: () => void\n // When true, every x-axis tick label is shown instead of letting x-charts drop\n // overlapping ones. Opt-in so it doesn't affect other charts that rely on the\n // default thinning.\n showAllXAxisLabels?: boolean\n peerAverage?: number\n showArea?: boolean\n showAverage?: boolean\n showAxisHighlight?: boolean\n showBars?: boolean\n showLegend?: boolean\n showMark?: boolean\n showMarkLabel?: boolean\n showTooltip?: boolean\n showXAxis?: boolean\n showXAxisTicks?: boolean\n showYAxis?: boolean\n showYAxisTicks?: boolean\n tickIntervals?: any[] | 'auto' | ((value: any, index: number) => boolean) | undefined\n title?: string\n useCustomMark?: boolean\n valueFormatterString?: string\n width?: number\n xAxisScaleType?: 'band' | 'point'\n}\n\n// TODO: Remove negative values and use a proper layout to support X-Charts v8\n\nexport const LineChart: React.FC<LineChartProps> = ({\n areaColor,\n axisColor,\n baseline = 'max',\n chartFor,\n chartXaxisSx,\n chartYaxisSx,\n colors,\n curveType = 'linear',\n customLegendVariant,\n customLegendSx,\n customLegendBoxSx,\n customTooltipLabels,\n datasets,\n height,\n isCurrency,\n isGraphClippingXAxis = false,\n labels,\n labelBackgroundColor,\n labelFontColor,\n labelFontSize,\n margin,\n markHandlers,\n markStyles,\n minRange,\n maxRange,\n narrowXAxisLabels = false,\n showAllXAxisLabels = false,\n onItemClick,\n peerAverage,\n showArea = false,\n showAverage = false,\n showAxisHighlight = false,\n showBars = false,\n showLegend = false,\n showMark = true,\n showMarkLabel = false,\n showTooltip = false,\n showXAxis = false,\n showXAxisTicks = false,\n showYAxis = false,\n showYAxisTicks = false,\n title,\n useCustomMark = false,\n valueFormatterString,\n width,\n xAxisScaleType,\n}) => {\n const theme = useTheme()\n\n // Data for the X axis\n const xData = datasets.flat().map((item) => item.x)\n const yData = datasets.flat().map((item) => item.y)\n\n // Guard the empty-data case: with no points, reduce()/Math.min()/Math.max()\n // produce NaN/±Infinity which flow into the y-axis and make x-charts warn\n // \"the value NaN does not exist in the data of y axis\". Default to 0 so an\n // empty/loading chart renders a valid (flat) axis instead.\n const average = peerAverage || roundedAverage(yData)\n\n // Used for the min and max Y axis values\n const yMin = yData.length ? Math.floor(Math.min(...yData) / 100) * 100 : 0\n const yMax = yData.length ? Math.ceil(Math.max(...yData) / 100) * 100 : 0\n\n const series = datasets.map((data, index) => {\n return {\n type: showBars ? 'bar' : 'line',\n curve: curveType,\n color: showBars ? theme.palette.chart?.chart6 : (colors[index] ?? theme.palette.primary.main),\n data: data.map((item) => item.y),\n area: showArea,\n baseline: baseline,\n showMark: true,\n shape: getMarkerShape(index),\n valueFormatter: (value: number) =>\n valueFormatterString ? formatCurrency(value || 0, valueFormatterString) : String(value),\n }\n })\n\n const defaultMargin = {\n top: 60,\n right: 35,\n bottom: 25,\n left: -10,\n }\n\n // Merge default margin with any provided custom margin\n const chartMargin = {\n ...defaultMargin,\n ...margin,\n }\n\n let rangeMin = minRange ?? yMin\n let rangeMax = maxRange ?? yMax\n if (chartFor === 'networthChart') {\n const valueRange = yMax - yMin\n\n const paddingRatio = valueRange < yMax * 0.05 ? 0.25 : 0.2\n const padding = Math.max(valueRange * paddingRatio, yMax * 0.015)\n rangeMin = yMin - padding < 0 ? yMin : yMin - padding\n rangeMax = yMax + padding\n }\n\n const getTickInterval = () => {\n if (chartFor === 'creditOverTime') {\n return generateEqualIntervals(rangeMin, 850, 5)\n } else if (chartFor === 'networthChart') {\n return generateEqualIntervals(rangeMin, rangeMax, 5)\n }\n return undefined\n }\n return (\n <Box\n sx={{\n position: 'relative',\n touchAction: 'pan-y', // Allow vertical scrolling\n '& svg': {\n touchAction: 'pan-y', // Allow vertical scrolling on SVG\n userSelect: 'none', // Prevent text selection\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y', // For Recharts library specifically\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n // Without this, Chrome adds the chart to the Tab order (MUI X Charts puts focus\n // listeners on the SVG), but the chart has no keyboard actions.\n tabIndex={-1}\n margin={chartMargin}\n series={series as AllSeriesType[]}\n sx={{\n '& .MuiBarLabel-root': {\n fontSize: 10,\n fontWeight: 600,\n },\n '& .MuiAreaElement-root': {\n opacity: 0.15,\n },\n '& .MuiChartsAxis-tickLabel > tspan': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n '& .MuiLineChart-markLabel': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n }}\n width={width}\n xAxis={[\n {\n data: xData,\n scaleType: xAxisScaleType || (showBars ? 'band' : 'point'),\n // Show every tick instead of letting x-charts drop overlapping ones.\n ...((showAllXAxisLabels || narrowXAxisLabels) && { tickLabelInterval: () => true }),\n },\n ]}\n yAxis={[\n {\n tickInterval: getTickInterval(),\n min: isGraphClippingXAxis ? -22 : rangeMin,\n max: rangeMax || 100,\n colorMap:\n showArea && series.length < 2\n ? {\n type: 'continuous',\n min: rangeMin,\n max: rangeMax,\n color: [\n theme.palette.background.paper,\n colors[0] ?? theme.palette.primary.main,\n ],\n }\n : undefined,\n valueFormatter: (value: number) =>\n valueFormatterString ? formatCurrency(value, valueFormatterString) : String(value),\n width: 62,\n },\n ]}\n >\n {/** Provides the average line - positioned first to be behind other elements **/}\n {showAverage && (\n <ChartsReferenceLine\n lineStyle={{\n stroke: labelBackgroundColor\n ? theme.palette.neutral.main\n : theme.palette.neutral.dark,\n strokeDasharray: '10, 8',\n strokeWidth: 2,\n }}\n y={average}\n />\n )}\n\n {/** Area plot provides gradiant below the line **/}\n {/* Note: Must be above the LinePlot for some style rules to work */}\n <AreaPlot\n onItemClick={onItemClick}\n {...(areaColor && {\n slots: {\n area: (props) => {\n return (\n <g>\n <defs>\n <linearGradient id=\"customGradient\" x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={areaColor} />\n <stop offset=\"100%\" stopColor={areaColor} stopOpacity={0.02} />\n </linearGradient>\n </defs>\n <path {...stripChartSlotProps(props)} fill={`url(#customGradient)`} />\n </g>\n )\n },\n },\n })}\n />\n\n {/** Line plot provides the data line **/}\n <LinePlot\n onItemClick={onItemClick}\n slots={{\n line: (props) => (\n <CustomLine\n {...props}\n lineColor={areaColor ?? props.ownerState.color ?? theme.palette.primary.main}\n />\n ),\n }}\n />\n\n {/** Mark plot provides the circles **/}\n <MarkPlot\n onItemClick={onItemClick}\n slots={\n useCustomMark\n ? {\n mark: (props) => {\n return (\n <CustomMark\n handlers={markHandlers}\n labelBackgroundColor={labelBackgroundColor}\n labelFontColor={labelFontColor}\n labelFontSize={labelFontSize}\n showLabel={showMarkLabel}\n showMark={showMark || props.dataIndex === datasets[0].length - 1}\n style={markStyles?.(props.dataIndex) ?? {}}\n valueFormatterString={valueFormatterString}\n yData={yData}\n {...props}\n />\n )\n },\n }\n : undefined\n }\n />\n\n <BarPlot\n barLabel={(item) => (Number(item.value) > 0 ? `$${item.value}` : null)}\n borderRadius={10}\n />\n\n {/** Provides the X axis line and values **/}\n <ChartsXAxis\n disableLine={!showXAxis}\n disableTicks={!showXAxisTicks}\n slots={narrowXAxisLabels ? NARROW_X_AXIS_SLOTS : undefined}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartXaxisSx }}\n />\n\n {/** Provides the Y axis values **/}\n <ChartsYAxis\n disableLine={!showYAxis}\n disableTicks={!showYAxisTicks}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartYaxisSx }}\n />\n\n {/* Add vertical crosshair on hover */}\n {showAxisHighlight && <ChartsAxisHighlight x=\"line\" />}\n\n {showTooltip && (\n <ChartsTooltipContainer trigger=\"axis\">\n <CustomTooltip\n customLabels={customTooltipLabels}\n isCurrency={isCurrency}\n labels={labels}\n series={series}\n valueFormatterString={valueFormatterString}\n />\n </ChartsTooltipContainer>\n )}\n </ResponsiveChartContainer>\n\n {showLegend && (\n <CustomLegend\n average={showAverage ? average : undefined}\n customLegendBoxSx={customLegendBoxSx}\n customLegendVariant={customLegendVariant}\n labels={labels}\n series={series}\n style={{\n position: 'absolute',\n top: 16,\n left: 16,\n ...customLegendSx,\n }}\n title={title}\n valueFormatterString={valueFormatterString}\n />\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,KAAA,CAAwB,MAA2B;AACvD,QAAM,IAAY,OAAO,EAAM,QAAS,WAAW,EAAM,OAAO,IAE1D,IAAe,MAAM,KAAK,EAAU,KAAK,CAAC,EAAE,CAAA,KAAM;AACxD,SAAK,IACE,gBAAA,EAAC,GAAD;AAAA,IAAY,GAAI;AAAA,IAAO,cAAY;AAAA,IAAW,MAAK;AAAA,IAAM,MAAM;AAAA,EAAe,CAAA,IAD3D,gBAAA,EAAC,GAAD,EAAY,GAAI,EAAQ,CAAA;AAEpD,GAEM,KAAsB,EAAE,eAAe,GAAqB,GA4ErD,KAAA,CAAuC,EAClD,WAAA,GACA,WAAA,GACA,UAAA,IAAW,OACX,UAAA,GACA,cAAA,GACA,cAAA,GACA,QAAA,GACA,WAAA,IAAY,UACZ,qBAAA,GACA,gBAAA,GACA,mBAAA,GACA,qBAAA,GACA,UAAA,GACA,QAAA,GACA,YAAA,GACA,sBAAA,IAAuB,IACvB,QAAA,GACA,sBAAA,GACA,gBAAA,GACA,eAAA,GACA,QAAA,GACA,cAAA,GACA,YA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EACL,QAAQ,EACV,EACF;AAAA,UACF,IACA,CAAC;AAAA,UAEP,IAAI,EAAE,GAAG,EAAa;AAAA,QACvB,CAAA;AAAA,QAGA,KAAqB,gBAAA,EAAC,IAAD,EAAqB,GAAE,OAAQ,CAAA;AAAA,QAEpD,KACC,gBAAA,EAAC,IAAD;AAAA,UAAwB,SAAQ;AAAA,UAC9B,UAAA,gBAAA,EAAC,IAAD;AAAA,YACE,cAAc;AAAA,YACF,YAAA;AAAA,YACJ,QAAA;AAAA,YACA,QAAA;AAAA,YACc,sBAAA;AAAA,UACvB,CAAA;AAAA,QACqB,CAAA;AAAA,MAEF;AAAA,IAEzB,CAAA,GAAA,KACC,gBAAA,EAAC,IAAD;AAAA,MACE,SAAS,IAAc,IAAU;AAAA,MACd,mBAAA;AAAA,MACE,qBAAA;AAAA,MACb,QAAA;AAAA,MACA,QAAA;AAAA,MACR,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,GAAG;AAAA,MACL;AAAA,MACO,OAAA;AAAA,MACe,sBAAA;AAAA,IACvB,CAAA,CAEA;AAAA;AAET"}
1
+ {"version":3,"file":"LineChart.es.js","names":[],"sources":["../../../../src/common/components/charts/LineChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport type { SxProps } from '@mui/material/styles'\nimport { useTheme } from '@mui/material/styles'\n\nimport type { AllSeriesType } from '@mui/x-charts'\nimport { BarPlot } from '@mui/x-charts/BarChart'\nimport { ChartContainer as ResponsiveChartContainer } from '@mui/x-charts/ChartContainer'\nimport { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight'\nimport { ChartsText, type ChartsTextProps } from '@mui/x-charts/ChartsText'\nimport { ChartsReferenceLine } from '@mui/x-charts/ChartsReferenceLine'\nimport { ChartsTooltipContainer } from '@mui/x-charts/ChartsTooltip'\nimport { ChartsXAxis } from '@mui/x-charts/ChartsXAxis'\nimport { ChartsYAxis } from '@mui/x-charts/ChartsYAxis'\nimport { AreaPlot, LinePlot, MarkPlot } from '@mui/x-charts/LineChart'\n\nimport { stripChartSlotProps } from './chartSlotProps'\nimport CustomLegend from './linechart/CustomLegend'\nimport { getMarkerShape } from './linechart/utils/markerShapes'\nimport { CustomLine } from './linechart/CustomLine'\nimport { CustomMark, MarkHandlers, type MarkVariant } from './linechart/CustomMark'\nimport { CustomTooltip } from './linechart/CustomTooltip'\nimport { formatCurrency } from '../../../core/utils/NumberFormatting'\nimport { generateEqualIntervals, roundedAverage } from '../../../core/utils/NumberFormatting'\n\nexport type LineChartDataset = { x: string; y: number }[]\nexport type LineChartLabel = string | { label: string; amount: number }\nexport type TooltipLabel = LineChartLabel & { header?: string }\n\n// X-axis tick that shows only the first letter of the label (e.g. \"J\" for\n// \"Jan\") so all labels fit in small/narrow views. role=\"img\" + aria-label give\n// the tick a reliable accessible name (aria-label alone on a bare SVG <text> is\n// inconsistently announced), so screen readers still get the full label.\nconst NarrowXAxisTickLabel = (props: ChartsTextProps) => {\n const fullLabel = typeof props.text === 'string' ? props.text : ''\n // Array.from keeps surrogate pairs / combining marks intact (non-Latin locales).\n const singleLetter = Array.from(fullLabel.trim())[0] ?? ''\n if (!singleLetter) return <ChartsText {...props} />\n return <ChartsText {...props} aria-label={fullLabel} role=\"img\" text={singleLetter} />\n}\n\nconst NARROW_X_AXIS_SLOTS = { axisTickLabel: NarrowXAxisTickLabel }\n\ntype LineChartCurve =\n | 'catmullRom'\n | 'linear'\n | 'monotoneX'\n | 'monotoneY'\n | 'natural'\n | 'step'\n | 'stepBefore'\n | 'stepAfter'\n | 'bump'\n | 'bumpX'\n | 'bumpY'\n\ninterface LineChartProps {\n areaColor?: string\n areaGradientColor?: string\n averageLineStyle?: React.CSSProperties\n axisColor?: string\n baseline?: string\n chartFor?: string\n chartXaxisSx?: SxProps\n chartYaxisSx?: SxProps\n // Because theme chart colors are typed string|undefined\n colors: (string | undefined)[]\n curveType?: LineChartCurve\n customLegendVariant?: string\n customLegendSx?: SxProps\n customLegendBoxSx?: SxProps\n customTooltipLabels?: TooltipLabel[][]\n datasets: LineChartDataset[]\n height?: number\n isCurrency?: boolean\n isGraphClippingXAxis?: boolean\n labels: LineChartLabel[]\n labelBackgroundColor?: string\n labelFontColor?: string\n labelFontSize?: number\n margin?: { top?: number; right?: number; bottom?: number; left?: number }\n markHandlers?: MarkHandlers\n markVariant?: MarkVariant\n markStyles?: (markIndex: number) => React.CSSProperties & {\n markLabelStyles?: React.CSSProperties\n }\n minRange?: number\n maxRange?: number\n // When true, x-axis labels render as a single letter (with the full label kept\n // as the accessible name), so months don't overlap and get dropped in\n // small/narrow views. Implies showAllXAxisLabels.\n narrowXAxisLabels?: boolean\n onItemClick?: () => void\n // When true, every x-axis tick label is shown instead of letting x-charts drop\n // overlapping ones. Opt-in so it doesn't affect other charts that rely on the\n // default thinning.\n showAllXAxisLabels?: boolean\n peerAverage?: number\n showArea?: boolean\n showAverage?: boolean\n showAxisHighlight?: boolean\n showBars?: boolean\n showLegend?: boolean\n showMark?: boolean\n showMarkLabel?: boolean\n showTooltip?: boolean\n showXAxis?: boolean\n showXAxisTicks?: boolean\n showYAxis?: boolean\n showYAxisTicks?: boolean\n tickIntervals?: any[] | 'auto' | ((value: any, index: number) => boolean) | undefined\n title?: string\n useCustomMark?: boolean\n valueFormatterString?: string\n width?: number\n xAxisScaleType?: 'band' | 'point'\n yAxisValueFormatter?: (value: number) => string\n}\n\n// TODO: Remove negative values and use a proper layout to support X-Charts v8\n\nexport const LineChart: React.FC<LineChartProps> = ({\n areaColor,\n areaGradientColor,\n averageLineStyle,\n axisColor,\n baseline = 'max',\n chartFor,\n chartXaxisSx,\n chartYaxisSx,\n colors,\n curveType = 'linear',\n customLegendVariant,\n customLegendSx,\n customLegendBoxSx,\n customTooltipLabels,\n datasets,\n height,\n isCurrency,\n isGraphClippingXAxis = false,\n labels,\n labelBackgroundColor,\n labelFontColor,\n labelFontSize,\n margin,\n markHandlers,\n markVariant,\n markStyles,\n minRange,\n maxRange,\n narrowXAxisLabels = false,\n showAllXAxisLabels = false,\n onItemClick,\n peerAverage,\n showArea = false,\n showAverage = false,\n showAxisHighlight = false,\n showBars = false,\n showLegend = false,\n showMark = true,\n showMarkLabel = false,\n showTooltip = false,\n showXAxis = false,\n showXAxisTicks = false,\n showYAxis = false,\n showYAxisTicks = false,\n tickIntervals,\n title,\n useCustomMark = false,\n valueFormatterString,\n width,\n xAxisScaleType,\n yAxisValueFormatter,\n}) => {\n const theme = useTheme()\n\n // Data for the X axis\n const xData = datasets.flat().map((item) => item.x)\n const yData = datasets.flat().map((item) => item.y)\n\n // Guard the empty-data case: with no points, reduce()/Math.min()/Math.max()\n // produce NaN/±Infinity which flow into the y-axis and make x-charts warn\n // \"the value NaN does not exist in the data of y axis\". Default to 0 so an\n // empty/loading chart renders a valid (flat) axis instead.\n const average = peerAverage || roundedAverage(yData)\n\n // Used for the min and max Y axis values\n const yMin = yData.length ? Math.floor(Math.min(...yData) / 100) * 100 : 0\n const yMax = yData.length ? Math.ceil(Math.max(...yData) / 100) * 100 : 0\n\n const series = datasets.map((data, index) => {\n return {\n type: showBars ? 'bar' : 'line',\n curve: curveType,\n color: showBars ? theme.palette.chart?.chart6 : (colors[index] ?? theme.palette.primary.main),\n data: data.map((item) => item.y),\n area: showArea,\n baseline: baseline,\n showMark: true,\n shape: getMarkerShape(index),\n valueFormatter: (value: number) =>\n valueFormatterString ? formatCurrency(value || 0, valueFormatterString) : String(value),\n }\n })\n\n const defaultMargin = {\n top: 60,\n right: 35,\n bottom: 25,\n left: -10,\n }\n\n // Merge default margin with any provided custom margin\n const chartMargin = {\n ...defaultMargin,\n ...margin,\n }\n\n let rangeMin = minRange ?? yMin\n let rangeMax = maxRange ?? yMax\n if (chartFor === 'networthChart') {\n const valueRange = yMax - yMin\n\n const paddingRatio = valueRange < yMax * 0.05 ? 0.25 : 0.2\n const padding = Math.max(valueRange * paddingRatio, yMax * 0.015)\n rangeMin = yMin - padding < 0 ? yMin : yMin - padding\n rangeMax = yMax + padding\n }\n\n const getTickInterval = () => {\n if (chartFor === 'creditOverTime') {\n return generateEqualIntervals(rangeMin, 850, 5)\n } else if (chartFor === 'networthChart') {\n return generateEqualIntervals(rangeMin, rangeMax, 5)\n }\n return undefined\n }\n return (\n <Box\n sx={{\n position: 'relative',\n touchAction: 'pan-y', // Allow vertical scrolling\n '& svg': {\n touchAction: 'pan-y', // Allow vertical scrolling on SVG\n userSelect: 'none', // Prevent text selection\n },\n '& .recharts-wrapper': {\n touchAction: 'pan-y', // For Recharts library specifically\n },\n }}\n >\n <ResponsiveChartContainer\n height={height}\n // Without this, Chrome adds the chart to the Tab order (MUI X Charts puts focus\n // listeners on the SVG), but the chart has no keyboard actions.\n tabIndex={-1}\n margin={chartMargin}\n series={series as AllSeriesType[]}\n sx={{\n '& .MuiBarLabel-root': {\n fontSize: 10,\n fontWeight: 600,\n },\n '& .MuiAreaElement-root': {\n opacity: 0.15,\n },\n '& .MuiChartsAxis-tickLabel > tspan': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n '& .MuiLineChart-markLabel': {\n fontFamily: theme.typography.body2.fontFamily,\n },\n }}\n width={width}\n xAxis={[\n {\n data: xData,\n scaleType: xAxisScaleType || (showBars ? 'band' : 'point'),\n // Show every tick instead of letting x-charts drop overlapping ones.\n ...((showAllXAxisLabels || narrowXAxisLabels) && { tickLabelInterval: () => true }),\n },\n ]}\n yAxis={[\n {\n tickInterval: tickIntervals ?? getTickInterval(),\n min: isGraphClippingXAxis ? -22 : rangeMin,\n max: rangeMax || 100,\n colorMap:\n showArea && series.length < 2\n ? {\n type: 'continuous',\n min: rangeMin,\n max: rangeMax,\n color: [\n theme.palette.background.paper,\n areaGradientColor ?? colors[0] ?? theme.palette.primary.main,\n ],\n }\n : undefined,\n valueFormatter:\n yAxisValueFormatter ??\n ((value: number) =>\n valueFormatterString ? formatCurrency(value, valueFormatterString) : String(value)),\n width: 62,\n },\n ]}\n >\n {/** Provides the average line - positioned first to be behind other elements **/}\n {showAverage && (\n <ChartsReferenceLine\n lineStyle={{\n stroke: labelBackgroundColor\n ? theme.palette.neutral.main\n : theme.palette.neutral.dark,\n strokeDasharray: '10, 8',\n strokeWidth: 2,\n ...averageLineStyle,\n }}\n y={average}\n />\n )}\n\n {/** Area plot provides gradiant below the line **/}\n {/* Note: Must be above the LinePlot for some style rules to work */}\n <AreaPlot\n onItemClick={onItemClick}\n {...(areaColor && {\n slots: {\n area: (props) => {\n return (\n <g>\n <defs>\n <linearGradient id=\"customGradient\" x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={areaColor} />\n <stop offset=\"100%\" stopColor={areaColor} stopOpacity={0.02} />\n </linearGradient>\n </defs>\n <path {...stripChartSlotProps(props)} fill={`url(#customGradient)`} />\n </g>\n )\n },\n },\n })}\n />\n\n {/** Line plot provides the data line **/}\n <LinePlot\n onItemClick={onItemClick}\n slots={{\n line: (props) => (\n <CustomLine\n {...props}\n lineColor={areaColor ?? props.ownerState.color ?? theme.palette.primary.main}\n />\n ),\n }}\n />\n\n {/** Mark plot provides the circles **/}\n <MarkPlot\n onItemClick={onItemClick}\n slots={\n useCustomMark\n ? {\n mark: (props) => {\n return (\n <CustomMark\n handlers={markHandlers}\n labelBackgroundColor={labelBackgroundColor}\n labelFontColor={labelFontColor}\n labelFontSize={labelFontSize}\n showLabel={showMarkLabel}\n showMark={showMark || props.dataIndex === datasets[0].length - 1}\n style={markStyles?.(props.dataIndex) ?? {}}\n valueFormatterString={valueFormatterString}\n variant={markVariant}\n yData={yData}\n {...props}\n />\n )\n },\n }\n : undefined\n }\n />\n\n <BarPlot\n barLabel={(item) => (Number(item.value) > 0 ? `$${item.value}` : null)}\n borderRadius={10}\n />\n\n {/** Provides the X axis line and values **/}\n <ChartsXAxis\n disableLine={!showXAxis}\n disableTicks={!showXAxisTicks}\n slots={narrowXAxisLabels ? NARROW_X_AXIS_SLOTS : undefined}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartXaxisSx }}\n />\n\n {/** Provides the Y axis values **/}\n <ChartsYAxis\n disableLine={!showYAxis}\n disableTicks={!showYAxisTicks}\n slotProps={\n axisColor\n ? {\n axisLine: {\n style: {\n stroke: axisColor,\n },\n },\n axisTick: {\n style: {\n stroke: axisColor,\n },\n },\n }\n : {}\n }\n sx={{ ...chartYaxisSx }}\n />\n\n {/* Add vertical crosshair on hover */}\n {showAxisHighlight && <ChartsAxisHighlight x=\"line\" />}\n\n {showTooltip && (\n <ChartsTooltipContainer trigger=\"axis\">\n <CustomTooltip\n customLabels={customTooltipLabels}\n isCurrency={isCurrency}\n labels={labels}\n series={series}\n valueFormatterString={valueFormatterString}\n />\n </ChartsTooltipContainer>\n )}\n </ResponsiveChartContainer>\n\n {showLegend && (\n <CustomLegend\n average={showAverage ? average : undefined}\n customLegendBoxSx={customLegendBoxSx}\n customLegendVariant={customLegendVariant}\n labels={labels}\n series={series}\n style={{\n position: 'absolute',\n top: 16,\n left: 16,\n ...customLegendSx,\n }}\n title={title}\n valueFormatterString={valueFormatterString}\n />\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,KAAA,CAAwB,MAA2B;AACvD,QAAM,IAAY,OAAO,EAAM,QAAS,WAAW,EAAM,OAAO,IAE1D,IAAe,MAAM,KAAK,EAAU,KAAK,CAAC,EAAE,CAAA,KAAM;AACxD,SAAK,IACE,gBAAA,EAAC,GAAD;AAAA,IAAY,GAAI;AAAA,IAAO,cAAY;AAAA,IAAW,MAAK;AAAA,IAAM,MAAM;AAAA,EAAe,CAAA,IAD3D,gBAAA,EAAC,GAAD,EAAY,GAAI,EAAQ,CAAA;AAEpD,GAEM,KAAsB,EAAE,eAAe,GAAqB,GAgFrD,KAAA,CAAuC,EAClD,WAAA,GACA,mBAAA,GACA,kBAAA,G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I;AAAA,YACE,UAAU,EACR,OAAO,EACL,QAAQ,EACV,EACF;AAAA,YACA,UAAU,EACR,OAAO,EACL,QAAQ,EACV,EACF;AAAA,UACF,IACA,CAAC;AAAA,UAEP,IAAI,EAAE,GAAG,EAAa;AAAA,QACvB,CAAA;AAAA,QAGD,gBAAA,EAAC,IAAD;AAAA,UACE,aAAa,CAAC;AAAA,UACd,cAAc,CAAC;AAAA,UACf,WACE,IACI;AAAA,YACE,UAAU,EACR,OAAO,EACL,QAAQ,EACV,EACF;AAAA,YACA,UAAU,EACR,OAAO,EACL,QAAQ,EACV,EACF;AAAA,UACF,IACA,CAAC;AAAA,UAEP,IAAI,EAAE,GAAG,EAAa;AAAA,QACvB,CAAA;AAAA,QAGA,KAAqB,gBAAA,EAAC,IAAD,EAAqB,GAAE,OAAQ,CAAA;AAAA,QAEpD,MACC,gBAAA,EAAC,IAAD;AAAA,UAAwB,SAAQ;AAAA,UAC9B,UAAA,gBAAA,EAAC,IAAD;AAAA,YACE,cAAc;AAAA,YACF,YAAA;AAAA,YACJ,QAAA;AAAA,YACA,QAAA;AAAA,YACc,sBAAA;AAAA,UACvB,CAAA;AAAA,QACqB,CAAA;AAAA,MAEF;AAAA,IAEzB,CAAA,GAAA,KACC,gBAAA,EAAC,IAAD;AAAA,MACE,SAAS,IAAc,IAAU;AAAA,MACd,mBAAA;AAAA,MACE,qBAAA;AAAA,MACb,QAAA;AAAA,MACA,QAAA;AAAA,MACR,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,GAAG;AAAA,MACL;AAAA,MACO,OAAA;AAAA,MACe,sBAAA;AAAA,IACvB,CAAA,CAEA;AAAA;AAET"}
@@ -1,47 +1,47 @@
1
- import { useGlobalCopyStore as y } from "../../../context/hooks.es.js";
2
- import { formatCurrency as s } from "../../../../core/utils/NumberFormatting.es.js";
3
- import { MARKER_SHAPE_PATHS as v, getMarkerShape as b } from "./utils/markerShapes.es.js";
4
- import { observer as w } from "mobx-react-lite";
1
+ import { useGlobalCopyStore as v } from "../../../context/hooks.es.js";
2
+ import { formatCurrency as p } from "../../../../core/utils/NumberFormatting.es.js";
3
+ import { MARKER_SHAPE_PATHS as w, getMarkerShape as b } from "./utils/markerShapes.es.js";
4
+ import { observer as k } from "mobx-react-lite";
5
5
  import d from "@mui/material/Stack";
6
- import { Text as e } from "@mxenabled/mxui";
7
- import { Fragment as C, jsx as o, jsxs as i } from "react/jsx-runtime";
8
- import k from "@mui/material/Box";
9
- var A = ({ label: r, customLegendVariant: n }) => {
10
- const t = n || "body2";
11
- return typeof r == "string" ? /* @__PURE__ */ o(e, {
12
- variant: t,
6
+ import { Text as i } from "@mxenabled/mxui";
7
+ import { Fragment as C, jsx as o, jsxs as l } from "react/jsx-runtime";
8
+ import f from "@mui/material/Box";
9
+ var R = ({ label: r, customLegendVariant: n }) => {
10
+ const e = n || "body2";
11
+ return typeof r == "string" ? /* @__PURE__ */ o(i, {
12
+ variant: e,
13
13
  children: r
14
- }) : typeof r == "object" && r.amount !== void 0 && r.label ? /* @__PURE__ */ i(C, { children: [/* @__PURE__ */ o(e, {
15
- variant: t,
14
+ }) : typeof r == "object" && r.amount !== void 0 && r.label ? /* @__PURE__ */ l(C, { children: [/* @__PURE__ */ o(i, {
15
+ variant: e,
16
16
  children: r.label
17
- }), /* @__PURE__ */ o(e, {
17
+ }), /* @__PURE__ */ o(i, {
18
18
  bold: !0,
19
19
  sx: { marginLeft: 8 },
20
- variant: t,
21
- children: s(r.amount, "0,0")
20
+ variant: e,
21
+ children: p(r.amount, "0,0")
22
22
  })] }) : null;
23
- }, R = ({ average: r, customLegendVariant: n, customLegendBoxSx: t, labels: p = [], series: u, style: g, title: h, valueFormatterString: a }) => {
24
- const { common: x } = y(), l = n || "body2";
25
- return /* @__PURE__ */ i(d, {
23
+ }, S = ({ average: r, customLegendVariant: n, customLegendBoxSx: e, labels: u = [], series: g, style: x, title: a, valueFormatterString: c }) => {
24
+ const { common: y } = v(), h = n || "body2";
25
+ return /* @__PURE__ */ l(d, {
26
26
  style: {
27
27
  flexDirection: "row",
28
28
  gap: 24,
29
- ...g
29
+ ...x
30
30
  },
31
- children: [u.map((m, c) => {
32
- const f = p[c];
33
- return f ? /* @__PURE__ */ i(d, {
31
+ children: [g.map((t, m) => {
32
+ const s = u[m];
33
+ return s ? /* @__PURE__ */ l(d, {
34
34
  style: {
35
35
  alignItems: "center",
36
36
  flexDirection: "row",
37
37
  flexWrap: "wrap"
38
38
  },
39
- children: [t !== void 0 ? /* @__PURE__ */ o(k, { sx: {
39
+ children: [e !== void 0 ? /* @__PURE__ */ o(f, { sx: {
40
40
  width: 10,
41
41
  height: 10,
42
- backgroundColor: m.color,
42
+ backgroundColor: t.color,
43
43
  marginRight: 8,
44
- ...t
44
+ ...e
45
45
  } }) : /* @__PURE__ */ o("svg", {
46
46
  "aria-hidden": "true",
47
47
  height: 14,
@@ -52,43 +52,50 @@ var A = ({ label: r, customLegendVariant: n }) => {
52
52
  viewBox: "-6 -6 12 12",
53
53
  width: 14,
54
54
  children: /* @__PURE__ */ o("path", {
55
- d: v[b(c)],
56
- fill: m.color,
57
- stroke: m.color,
55
+ d: w[b(m)],
56
+ fill: t.color,
57
+ stroke: t.color,
58
58
  strokeWidth: 1
59
59
  })
60
- }), /* @__PURE__ */ o(A, {
60
+ }), /* @__PURE__ */ o(R, {
61
61
  customLegendVariant: n,
62
- label: f
62
+ label: s
63
63
  })]
64
- }, c) : null;
65
- }), r !== void 0 && /* @__PURE__ */ i(d, {
64
+ }, m) : null;
65
+ }), r !== void 0 && /* @__PURE__ */ l(d, {
66
66
  sx: {
67
67
  alignItems: "center",
68
68
  flexDirection: "row"
69
69
  },
70
70
  children: [
71
- /* @__PURE__ */ o(e, {
72
- bold: !0,
73
- sx: { marginRight: 8 },
74
- variant: l,
75
- children: "– –"
71
+ /* @__PURE__ */ o(d, {
72
+ "aria-hidden": "true",
73
+ direction: "row",
74
+ gap: 2,
75
+ mr: 8,
76
+ children: [0, 1].map((t) => /* @__PURE__ */ o(f, { sx: {
77
+ bgcolor: "neutral.dark",
78
+ borderRadius: 1,
79
+ height: 2,
80
+ width: 5
81
+ } }, t))
76
82
  }),
77
- /* @__PURE__ */ i(e, {
78
- variant: l,
79
- children: [h || x.average, "  "]
83
+ /* @__PURE__ */ o(i, {
84
+ variant: h,
85
+ children: a || y.average
80
86
  }),
81
- /* @__PURE__ */ o(e, {
87
+ /* @__PURE__ */ o(i, {
82
88
  bold: !0,
83
- variant: l,
84
- children: a ? s(r, a) : r
89
+ sx: { ml: 4 },
90
+ variant: h,
91
+ children: c ? p(r, c) : r
85
92
  })
86
93
  ]
87
94
  })]
88
95
  });
89
- }, M = w(R);
96
+ }, M = k(S);
90
97
  export {
91
- A as CustomLegendLabel,
98
+ R as CustomLegendLabel,
92
99
  M as default
93
100
  };
94
101
 
@@ -1 +1 @@
1
- {"version":3,"file":"CustomLegend.es.js","names":[],"sources":["../../../../../src/common/components/charts/linechart/CustomLegend.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { LineChartLabel } from '../LineChart'\nimport { getMarkerShape, MARKER_SHAPE_PATHS } from './utils/markerShapes'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nexport const CustomLegendLabel = ({\n label,\n customLegendVariant,\n}: {\n label: LineChartLabel\n customLegendVariant?: string\n}) => {\n const variant = (customLegendVariant as any) || 'body2'\n\n if (typeof label === 'string') {\n return <Text variant={variant}>{label}</Text>\n }\n if (typeof label === 'object' && label.amount !== undefined && label.label) {\n return (\n <>\n <Text variant={variant}>{label.label}</Text>\n <Text bold={true} sx={{ marginLeft: 8 }} variant={variant}>\n {formatCurrency(label.amount, '0,0')}\n </Text>\n </>\n )\n }\n return null\n}\n\nconst CustomLegend = ({\n average,\n customLegendVariant,\n customLegendBoxSx,\n labels = [],\n series,\n style,\n title,\n valueFormatterString,\n}: {\n average?: number\n customLegendVariant?: string\n customLegendBoxSx?: SxProps\n labels?: LineChartLabel[]\n series: any[]\n title?: string\n style: any\n valueFormatterString?: string\n}) => {\n const { common: commonCopy } = useGlobalCopyStore()\n const variant = (customLegendVariant as any) || 'body2'\n\n return (\n <Stack style={{ flexDirection: 'row', gap: 24, ...style }}>\n {series.map((s, index) => {\n const label = labels[index]\n // Skip series without a label\n return label ? (\n <Stack\n key={index}\n style={{ alignItems: 'center', flexDirection: 'row', flexWrap: 'wrap' }}\n >\n {customLegendBoxSx !== undefined ? (\n <Box\n sx={{\n width: 10,\n height: 10,\n backgroundColor: s.color,\n marginRight: 8,\n ...customLegendBoxSx,\n }}\n />\n ) : (\n <svg\n aria-hidden=\"true\"\n height={14}\n style={{ marginRight: 8, flexShrink: 0 }}\n viewBox=\"-6 -6 12 12\"\n width={14}\n >\n <path\n d={MARKER_SHAPE_PATHS[getMarkerShape(index)]}\n fill={s.color}\n stroke={s.color}\n strokeWidth={1}\n />\n </svg>\n )}\n <CustomLegendLabel customLegendVariant={customLegendVariant} label={label} />\n </Stack>\n ) : null\n })}\n {average !== undefined && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row' }}>\n <Text bold={true} sx={{ marginRight: 8 }} variant={variant}>\n – –\n </Text>\n <Text variant={variant}>{title ? title : commonCopy.average}&nbsp;&nbsp;</Text>\n <Text bold={true} variant={variant}>\n {valueFormatterString ? formatCurrency(average, valueFormatterString) : average}\n </Text>\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default observer(CustomLegend)\n"],"mappings":";;;;;;;;AAYA,IAAa,IAAA,CAAqB,EAChC,OAAA,GACA,qBAAA,EAAA,MAII;AACJ,QAAM,IAAW,KAA+B;AAEhD,SAAI,OAAO,KAAU,WACZ,gBAAA,EAAC,GAAD;AAAA,IAAe,SAAA;AAAA,IAAU,UAAA;AAAA,EAAY,CA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;AAAA,UAEP,UAAA,gBAAA,EAAC,QAAD;AAAA,YACE,GAAG,EAAmB,EAAe,CAAK,CAAA;AAAA,YAC1C,MAAM,EAAE;AAAA,YACR,QAAQ,EAAE;AAAA,YACV,aAAa;AAAA,UACd,CAAA;AAAA,QACE,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,UAAwC,qBAAA;AAAA,UAA4B,OAAA;AAAA,QAAQ,CAAA,CACvE;AAAA,MA9BA,GAAA,CA8BA,IACL;AAAA,IACN,CAAC,GACA,MAAY,UACX,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,eAAe;AAAA,MAAM;AAAA,MAAxD,UAAA;AAAA,QACE,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAM,IAAI,EAAE,aAAa,EAAE;AAAA,UAAY,SAAA;AAAA,UAAS,UAAA;AAAA,QAEtD,CAAA;AAAA,QACN,gBAAA,EAAC,GAAD;AAAA,UAAe,SAAA;AAAA,UAAf,UAAA,CAAyB,KAAgB,EAAW,SAAQ,IAAkB;AAAA;QAC9E,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAe,SAAA;AAAA,UACxB,UAAA,IAAuB,EAAe,GAAS,CAAoB,IAAI;AAAA,QACpE,CAAA;AAAA,MACD;AAAA,IAEJ,CAAA,CAAA;AAAA;AAEX,GAEA,IAAe,EAAS,CAAY"}
1
+ {"version":3,"file":"CustomLegend.es.js","names":[],"sources":["../../../../../src/common/components/charts/linechart/CustomLegend.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\nimport { Text } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { LineChartLabel } from '../LineChart'\nimport { getMarkerShape, MARKER_SHAPE_PATHS } from './utils/markerShapes'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\nexport const CustomLegendLabel = ({\n label,\n customLegendVariant,\n}: {\n label: LineChartLabel\n customLegendVariant?: string\n}) => {\n const variant = (customLegendVariant as any) || 'body2'\n\n if (typeof label === 'string') {\n return <Text variant={variant}>{label}</Text>\n }\n if (typeof label === 'object' && label.amount !== undefined && label.label) {\n return (\n <>\n <Text variant={variant}>{label.label}</Text>\n <Text bold={true} sx={{ marginLeft: 8 }} variant={variant}>\n {formatCurrency(label.amount, '0,0')}\n </Text>\n </>\n )\n }\n return null\n}\n\nconst CustomLegend = ({\n average,\n customLegendVariant,\n customLegendBoxSx,\n labels = [],\n series,\n style,\n title,\n valueFormatterString,\n}: {\n average?: number\n customLegendVariant?: string\n customLegendBoxSx?: SxProps\n labels?: LineChartLabel[]\n series: any[]\n title?: string\n style: any\n valueFormatterString?: string\n}) => {\n const { common: commonCopy } = useGlobalCopyStore()\n const variant = (customLegendVariant as any) || 'body2'\n\n return (\n <Stack style={{ flexDirection: 'row', gap: 24, ...style }}>\n {series.map((s, index) => {\n const label = labels[index]\n // Skip series without a label\n return label ? (\n <Stack\n key={index}\n style={{ alignItems: 'center', flexDirection: 'row', flexWrap: 'wrap' }}\n >\n {customLegendBoxSx !== undefined ? (\n <Box\n sx={{\n width: 10,\n height: 10,\n backgroundColor: s.color,\n marginRight: 8,\n ...customLegendBoxSx,\n }}\n />\n ) : (\n <svg\n aria-hidden=\"true\"\n height={14}\n style={{ marginRight: 8, flexShrink: 0 }}\n viewBox=\"-6 -6 12 12\"\n width={14}\n >\n <path\n d={MARKER_SHAPE_PATHS[getMarkerShape(index)]}\n fill={s.color}\n stroke={s.color}\n strokeWidth={1}\n />\n </svg>\n )}\n <CustomLegendLabel customLegendVariant={customLegendVariant} label={label} />\n </Stack>\n ) : null\n })}\n {average !== undefined && (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row' }}>\n <Stack aria-hidden=\"true\" direction=\"row\" gap={2} mr={8}>\n {[0, 1].map((dash) => (\n <Box\n key={dash}\n sx={{ bgcolor: 'neutral.dark', borderRadius: 1, height: 2, width: 5 }}\n />\n ))}\n </Stack>\n <Text variant={variant}>{title ? title : commonCopy.average}</Text>\n <Text bold={true} sx={{ ml: 4 }} variant={variant}>\n {valueFormatterString ? formatCurrency(average, valueFormatterString) : average}\n </Text>\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default observer(CustomLegend)\n"],"mappings":";;;;;;;;AAYA,IAAa,IAAA,CAAqB,EAChC,OAAA,GACA,qBAAA,EAAA,MAII;AACJ,QAAM,IAAW,KAA+B;AAEhD,SAAI,OAAO,KAAU,WACZ,gBAAA,EAAC,GAAD;AAAA,IAAe,SAAA;AAAA,IAAU,UAAA;AAAA,EAAY,CAAA,IAE1C,OAAO,KAAU,YAAY,EAAM,WAAW,UAAa,EAAM,QAEjE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IAAe,SAAA;AAAA,IAAU,UAAA,EAAM;AAAA,EAAY,CAAA,GAC3C,gBAAA,EAAC,GAAD;AAAA,IAAM,MAAM;AAAA,IAAM,IAAI,EAAE,YAAY,EAAE;AAAA,IAAY,SAAA;AAAA,IAC/C,UAAA,EAAe,EAAM,QAAQ,KAAK;AAAA,EAC/B,CAAA,CACN,EAAA,CAAA,IAGC;AACT,GAEM,IAAA,CAAgB,EACpB,SAAA,GACA,qBAAA,GACA,mBAAA,GACA,QAAA,IAAS,CAAC,GACV,QAAA,GACA,OAAA,GACA,OAAA,GACA,sBAAA,EAAA,MAUI;AACJ,QAAM,EAAE,QAAQ,EAAA,IAAe,EAAmB,GAC5C,IAAW,KAA+B;AAEhD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,OAAO;AAAA,MAAE,eAAe;AAAA,MAAO,KAAK;AAAA,MAAI,GAAG;AAAA,IAAM;AAAA,IAAxD,UAAA,CACG,EAAO,IAAA,CAAK,GAAG,MAAU;AACxB,YAAM,IAAQ,EAAO,CAAA;AAErB,aAAO,IACL,gBAAA,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