drizzle-cube 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- import { jsx as i, jsxs as g } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as b } from "react/jsx-runtime";
2
2
  import { useState as G } from "react";
3
- import { ResponsiveContainer as ze, Tooltip as ut, BarChart as ft, CartesianGrid as he, XAxis as ye, YAxis as pe, Legend as _, Bar as mt, Cell as ke, LineChart as xt, Line as ht, AreaChart as yt, Area as pt, PieChart as vt, Pie as gt, ScatterChart as bt, Scatter as Re, RadarChart as wt, PolarGrid as Nt, PolarAngleAxis as At, PolarRadiusAxis as St, Radar as Mt, RadialBarChart as kt, RadialBar as $t, Treemap as Lt } from "recharts";
3
+ import { ResponsiveContainer as ze, Tooltip as ut, BarChart as ft, CartesianGrid as he, XAxis as ye, YAxis as pe, Legend as B, Bar as mt, Cell as ke, LineChart as xt, Line as ht, AreaChart as yt, Area as pt, PieChart as vt, Pie as bt, ScatterChart as gt, Scatter as Re, RadarChart as wt, PolarGrid as Nt, PolarAngleAxis as At, PolarRadiusAxis as St, Radar as Mt, RadialBarChart as kt, RadialBar as $t, Treemap as Lt } from "recharts";
4
4
  import { u as K } from "./providers-B7MVnAAt.js";
5
5
  function U({ children: e, height: t = "100%" }) {
6
6
  try {
7
7
  if (t === "100%")
8
8
  return /* @__PURE__ */ i("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
9
- const r = {
9
+ const n = {
10
10
  height: typeof t == "number" ? `${t}px` : t,
11
11
  width: "100%",
12
12
  minHeight: "200px"
13
13
  };
14
- return /* @__PURE__ */ i("div", { className: "w-full flex flex-col relative", style: { ...r, overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
15
- } catch (r) {
16
- return console.error("ChartContainer ResponsiveContainer error:", r), /* @__PURE__ */ g(
14
+ return /* @__PURE__ */ i("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
15
+ } catch (n) {
16
+ return /* @__PURE__ */ b(
17
17
  "div",
18
18
  {
19
19
  className: "flex flex-col items-center justify-center w-full h-full p-4 text-center border-2 border-dashed border-yellow-300 rounded-lg bg-yellow-50",
20
20
  style: { height: t },
21
21
  children: [
22
22
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold text-yellow-600 mb-1", children: "Chart Container Error" }),
23
- /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: r instanceof Error ? r.message : "Failed to create responsive container" })
23
+ /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: n instanceof Error ? n.message : "Failed to create responsive container" })
24
24
  ]
25
25
  }
26
26
  );
27
27
  }
28
28
  }
29
- function V({ formatter: e, labelFormatter: t }) {
29
+ function q({ formatter: e, labelFormatter: t }) {
30
30
  return /* @__PURE__ */ i(
31
31
  ut,
32
32
  {
@@ -83,15 +83,15 @@ const T = [
83
83
  function we(e, t) {
84
84
  return t[e] || e;
85
85
  }
86
- function D(e, t) {
86
+ function R(e, t) {
87
87
  if (!e) return String(e || "Unknown");
88
- const r = String(e);
89
- if (r.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
90
- let n = r;
91
- r.includes(" ") && (n = r.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !n.endsWith("Z") && !n.includes("+") && (n = n + "Z");
92
- const s = new Date(n);
88
+ const n = String(e);
89
+ if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
90
+ let r = n;
91
+ n.includes(" ") && (r = n.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !r.endsWith("Z") && !r.includes("+") && (r = r + "Z");
92
+ const s = new Date(r);
93
93
  if (isNaN(s.getTime()))
94
- return r;
94
+ return n;
95
95
  const a = s.getUTCFullYear(), l = String(s.getUTCMonth() + 1).padStart(2, "0"), c = String(s.getUTCDate()).padStart(2, "0"), d = s.getUTCHours(), o = s.getUTCMinutes();
96
96
  if (t)
97
97
  switch (t.toLowerCase()) {
@@ -121,73 +121,73 @@ function D(e, t) {
121
121
  }
122
122
  return d === 0 && o === 0 && u === 0 && f === 0 ? `${a}-${l}-${c}` : o === 0 && u === 0 && f === 0 ? `${a}-${l}-${c} ${String(d).padStart(2, "0")}:00` : `${a}-${l}-${c} ${String(d).padStart(2, "0")}:${String(o).padStart(2, "0")}`;
123
123
  }
124
- return r;
124
+ return n;
125
125
  }
126
126
  function O(e, t) {
127
127
  try {
128
128
  if (e != null && e.timeDimensions) {
129
- const n = e.timeDimensions.find((s) => t === s.dimension || t.startsWith(s.dimension.replace(".", "_")) || t === `${s.dimension}_${s.granularity}`);
130
- if (n != null && n.granularity)
131
- return n.granularity;
129
+ const r = e.timeDimensions.find((s) => t === s.dimension || t.startsWith(s.dimension.replace(".", "_")) || t === `${s.dimension}_${s.granularity}`);
130
+ if (r != null && r.granularity)
131
+ return r.granularity;
132
132
  }
133
- const r = t.match(/_([a-z]+)$/);
134
- if (r) {
135
- const n = r[1];
136
- if (["year", "quarter", "month", "week", "day", "hour", "minute", "second"].includes(n))
137
- return n;
133
+ const n = t.match(/_([a-z]+)$/);
134
+ if (n) {
135
+ const r = n[1];
136
+ if (["year", "quarter", "month", "week", "day", "hour", "minute", "second"].includes(r))
137
+ return r;
138
138
  }
139
139
  return;
140
140
  } catch {
141
141
  return;
142
142
  }
143
143
  }
144
- function Ft(e, t, r, n, s = {}) {
144
+ function Ft(e, t, n, r, s = {}) {
145
145
  if (!e || e.length === 0) return [];
146
- const a = O(n, t);
146
+ const a = O(r, t);
147
147
  return e.map((l) => {
148
148
  const c = {
149
- name: D(l[t], a) || l[t] || "Unknown"
149
+ name: R(l[t], a) || l[t] || "Unknown"
150
150
  };
151
- return r.forEach((d) => {
151
+ return n.forEach((d) => {
152
152
  const o = we(d, s);
153
153
  c[o] = typeof l[d] == "string" ? parseFloat(l[d]) : l[d] || 0;
154
154
  }), c;
155
155
  });
156
156
  }
157
- function C(e, t, r, n, s, a = {}) {
158
- var N;
157
+ function C(e, t, n, r, s, a = {}) {
158
+ var w;
159
159
  if (!e || e.length === 0)
160
160
  return { data: [], seriesKeys: [], hasDimensions: !1 };
161
- const l = n || {}, c = [
161
+ const l = r || {}, c = [
162
162
  ...l.dimensions || [],
163
- ...((N = l.timeDimensions) == null ? void 0 : N.map((x) => x.dimension)) || []
164
- ], d = l.measures || [], o = r.filter((x) => d.includes(x)), u = (s || []).filter((x) => c.includes(x));
163
+ ...((w = l.timeDimensions) == null ? void 0 : w.map((x) => x.dimension)) || []
164
+ ], d = l.measures || [], o = n.filter((x) => d.includes(x)), u = (s || []).filter((x) => c.includes(x));
165
165
  if (u.length > 0) {
166
166
  const x = {};
167
167
  e.forEach((S) => {
168
- const $ = O(n, t), h = D(S[t], $) || S[t] || "Unknown";
168
+ const k = O(r, t), h = R(S[t], k) || S[t] || "Unknown";
169
169
  x[h] || (x[h] = { name: String(h) }), o.forEach((y) => {
170
- const b = we(y, a);
171
- x[h][b] = (x[h][b] || 0) + (typeof S[y] == "string" ? parseFloat(S[y]) : S[y] || 0);
170
+ const g = we(y, a);
171
+ x[h][g] = (x[h][g] || 0) + (typeof S[y] == "string" ? parseFloat(S[y]) : S[y] || 0);
172
172
  }), u.forEach((y) => {
173
- const b = S[y];
174
- if (b != null) {
175
- const A = String(b), w = o[0] || d.find(
176
- (k) => k.includes("totalCost") || k.includes("count") || k.includes("sum")
173
+ const g = S[y];
174
+ if (g != null) {
175
+ const N = String(g), A = o[0] || d.find(
176
+ ($) => $.includes("totalCost") || $.includes("count") || $.includes("sum")
177
177
  ) || d[0];
178
- if (w) {
179
- const k = typeof S[w] == "string" ? parseFloat(S[w]) : S[w] || 0;
180
- x[h][A] = (x[h][A] || 0) + k;
178
+ if (A) {
179
+ const $ = typeof S[A] == "string" ? parseFloat(S[A]) : S[A] || 0;
180
+ x[h][N] = (x[h][N] || 0) + $;
181
181
  }
182
182
  }
183
183
  });
184
184
  });
185
185
  const v = Object.values(x), p = Array.from(new Set(
186
186
  e.flatMap(
187
- (S) => u.map(($) => {
188
- const h = S[$];
187
+ (S) => u.map((k) => {
188
+ const h = S[k];
189
189
  return h != null ? String(h) : null;
190
- }).filter(($) => $ !== null)
190
+ }).filter((k) => k !== null)
191
191
  )
192
192
  ));
193
193
  return {
@@ -196,46 +196,46 @@ function C(e, t, r, n, s, a = {}) {
196
196
  hasDimensions: !0
197
197
  };
198
198
  }
199
- const f = Ft(e, t, r, n, a), m = r.map((x) => we(x, a));
199
+ const f = Ft(e, t, n, r, a), m = n.map((x) => we(x, a));
200
200
  return {
201
201
  data: f,
202
202
  seriesKeys: m,
203
203
  hasDimensions: !1
204
204
  };
205
205
  }
206
- function Ur({
206
+ function qn({
207
207
  data: e,
208
208
  chartConfig: t,
209
- displayConfig: r = {},
210
- queryObject: n,
209
+ displayConfig: n = {},
210
+ queryObject: r,
211
211
  height: s = "100%",
212
212
  colorPalette: a
213
213
  }) {
214
214
  const [l, c] = G(null), { labelMap: d, getFieldLabel: o } = K();
215
215
  try {
216
216
  const u = {
217
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
218
- showGrid: (r == null ? void 0 : r.showGrid) ?? !0,
219
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0,
220
- stacked: (r == null ? void 0 : r.stacked) ?? !1
217
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
218
+ showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
219
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
220
+ stacked: (n == null ? void 0 : n.stacked) ?? !1
221
221
  };
222
222
  if (!e || e.length === 0)
223
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
223
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
224
224
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
225
225
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in bar chart" })
226
226
  ] }) });
227
- let f, m, N = [];
227
+ let f, m, w = [];
228
228
  if (t != null && t.xAxis && (t != null && t.yAxis))
229
- f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], N = t.series || [];
229
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
230
230
  else if (t != null && t.x && (t != null && t.y))
231
231
  f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
232
232
  else
233
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
233
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
234
234
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
235
235
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
236
236
  ] }) });
237
237
  if (!f || !m || m.length === 0)
238
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
238
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
239
239
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
240
240
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
241
241
  ] }) });
@@ -243,21 +243,21 @@ function Ur({
243
243
  e,
244
244
  f,
245
245
  m,
246
- n,
247
- N,
246
+ r,
247
+ w,
248
248
  d
249
249
  ), p = u.stacked === !0, S = v.length === 1 && x.some((y) => {
250
- const b = y[v[0]];
251
- return typeof b == "number" && b < 0;
252
- }), $ = u.showLegend, h = {
250
+ const g = y[v[0]];
251
+ return typeof g == "number" && g < 0;
252
+ }), k = u.showLegend, h = {
253
253
  ...ve,
254
254
  left: 40
255
255
  // Increased from 20 to 40 for Y-axis label space
256
256
  };
257
- return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
257
+ return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
258
258
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
259
259
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for bar chart after transformation" })
260
- ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(ft, { data: x, margin: h, children: [
260
+ ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(ft, { data: x, margin: h, children: [
261
261
  u.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
262
262
  /* @__PURE__ */ i(
263
263
  ye,
@@ -276,9 +276,9 @@ function Ur({
276
276
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
277
277
  }
278
278
  ),
279
- u.showTooltip && /* @__PURE__ */ i(V, {}),
280
- $ && /* @__PURE__ */ i(
281
- _,
279
+ u.showTooltip && /* @__PURE__ */ i(q, {}),
280
+ k && /* @__PURE__ */ i(
281
+ B,
282
282
  {
283
283
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
284
284
  iconType: "rect",
@@ -290,22 +290,22 @@ function Ur({
290
290
  onMouseLeave: () => c(null)
291
291
  }
292
292
  ),
293
- v.map((y, b) => /* @__PURE__ */ i(
293
+ v.map((y, g) => /* @__PURE__ */ i(
294
294
  mt,
295
295
  {
296
296
  dataKey: y,
297
297
  stackId: p ? "stack" : void 0,
298
- fill: S ? De : (a == null ? void 0 : a.colors) && a.colors[b % a.colors.length] || T[b % T.length],
298
+ fill: S ? De : (a == null ? void 0 : a.colors) && a.colors[g % a.colors.length] || T[g % T.length],
299
299
  fillOpacity: l ? l === y ? 1 : 0.3 : 1,
300
- children: S && x.map((A, w) => {
301
- const k = A[y], L = typeof k == "number" && k < 0 ? Tt : De;
300
+ children: S && x.map((N, A) => {
301
+ const $ = N[y], L = typeof $ == "number" && $ < 0 ? Tt : De;
302
302
  return /* @__PURE__ */ i(
303
303
  ke,
304
304
  {
305
305
  fill: L,
306
306
  fillOpacity: l ? l === y ? 1 : 0.3 : 1
307
307
  },
308
- `cell-${w}`
308
+ `cell-${A}`
309
309
  );
310
310
  })
311
311
  },
@@ -313,45 +313,45 @@ function Ur({
313
313
  ))
314
314
  ] }) });
315
315
  } catch (u) {
316
- return console.error("BarChart rendering error:", u), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
316
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
317
317
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Bar Chart Error" }),
318
318
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
319
319
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
320
320
  ] }) });
321
321
  }
322
322
  }
323
- function Vr({
323
+ function Vn({
324
324
  data: e,
325
325
  chartConfig: t,
326
- displayConfig: r = {},
327
- queryObject: n,
326
+ displayConfig: n = {},
327
+ queryObject: r,
328
328
  height: s = "100%",
329
329
  colorPalette: a
330
330
  }) {
331
331
  const [l, c] = G(null), { labelMap: d, getFieldLabel: o } = K();
332
332
  try {
333
333
  const u = {
334
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
335
- showGrid: (r == null ? void 0 : r.showGrid) ?? !0,
336
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0
334
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
335
+ showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
336
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
337
337
  };
338
338
  if (!e || e.length === 0)
339
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
339
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
340
340
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
341
341
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in line chart" })
342
342
  ] }) });
343
- let f, m, N = [];
343
+ let f, m, w = [];
344
344
  if (t != null && t.xAxis && (t != null && t.yAxis))
345
- f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], N = t.series || [];
345
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
346
346
  else if (t != null && t.x && (t != null && t.y))
347
347
  f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
348
348
  else
349
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
349
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
350
350
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
351
351
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
352
352
  ] }) });
353
353
  if (!f || !m || m.length === 0)
354
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
354
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
355
355
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
356
356
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
357
357
  ] }) });
@@ -359,18 +359,18 @@ function Vr({
359
359
  e,
360
360
  f,
361
361
  m,
362
- n,
363
- N,
362
+ r,
363
+ w,
364
364
  d
365
365
  ), p = u.showLegend, S = {
366
366
  ...ve,
367
367
  left: 40
368
368
  // Increased from 20 to 40 for Y-axis label space
369
369
  };
370
- return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
370
+ return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
371
371
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
372
372
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for line chart after transformation" })
373
- ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(xt, { data: x, margin: S, children: [
373
+ ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(xt, { data: x, margin: S, children: [
374
374
  u.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
375
375
  /* @__PURE__ */ i(
376
376
  ye,
@@ -389,9 +389,9 @@ function Vr({
389
389
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
390
390
  }
391
391
  ),
392
- u.showTooltip && /* @__PURE__ */ i(V, {}),
392
+ u.showTooltip && /* @__PURE__ */ i(q, {}),
393
393
  p && /* @__PURE__ */ i(
394
- _,
394
+ B,
395
395
  {
396
396
  wrapperStyle: { fontSize: "12px", paddingTop: "25px" },
397
397
  iconType: "line",
@@ -399,65 +399,65 @@ function Vr({
399
399
  layout: "horizontal",
400
400
  align: "center",
401
401
  verticalAlign: "bottom",
402
- onMouseEnter: ($) => c(String($.dataKey || "")),
402
+ onMouseEnter: (k) => c(String(k.dataKey || "")),
403
403
  onMouseLeave: () => c(null)
404
404
  }
405
405
  ),
406
- v.map(($, h) => /* @__PURE__ */ i(
406
+ v.map((k, h) => /* @__PURE__ */ i(
407
407
  ht,
408
408
  {
409
409
  type: "monotone",
410
- dataKey: $,
410
+ dataKey: k,
411
411
  stroke: (a == null ? void 0 : a.colors) && a.colors[h % a.colors.length] || T[h % T.length],
412
412
  strokeWidth: 2,
413
413
  dot: { r: 3 },
414
414
  activeDot: { r: 5 },
415
- strokeOpacity: l ? l === $ ? 1 : 0.3 : 1
415
+ strokeOpacity: l ? l === k ? 1 : 0.3 : 1
416
416
  },
417
- $
417
+ k
418
418
  ))
419
419
  ] }) });
420
420
  } catch (u) {
421
- return console.error("LineChart rendering error:", u), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
421
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
422
422
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Line Chart Error" }),
423
423
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
424
424
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
425
425
  ] }) });
426
426
  }
427
427
  }
428
- function qr({
428
+ function _n({
429
429
  data: e,
430
430
  chartConfig: t,
431
- displayConfig: r = {},
432
- queryObject: n,
431
+ displayConfig: n = {},
432
+ queryObject: r,
433
433
  height: s = "100%",
434
434
  colorPalette: a
435
435
  }) {
436
436
  const [l, c] = G(null), { labelMap: d, getFieldLabel: o } = K();
437
437
  try {
438
438
  const u = {
439
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
440
- showGrid: (r == null ? void 0 : r.showGrid) ?? !0,
441
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0,
442
- stacked: (r == null ? void 0 : r.stacked) ?? !1
439
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
440
+ showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
441
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
442
+ stacked: (n == null ? void 0 : n.stacked) ?? !1
443
443
  };
444
444
  if (!e || e.length === 0)
445
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
445
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
446
446
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
447
447
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in area chart" })
448
448
  ] }) });
449
- let f, m, N = [];
449
+ let f, m, w = [];
450
450
  if (t != null && t.xAxis && (t != null && t.yAxis))
451
- f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], N = t.series || [];
451
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
452
452
  else if (t != null && t.x && (t != null && t.y))
453
453
  f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
454
454
  else
455
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
455
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
456
456
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
457
457
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
458
458
  ] }) });
459
459
  if (!f || !m || m.length === 0)
460
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
460
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
461
461
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
462
462
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
463
463
  ] }) });
@@ -465,18 +465,18 @@ function qr({
465
465
  e,
466
466
  f,
467
467
  m,
468
- n,
469
- N,
468
+ r,
469
+ w,
470
470
  d
471
471
  ), p = u.showLegend, S = {
472
472
  ...ve,
473
473
  left: 40
474
474
  // Increased from 20 to 40 for Y-axis label space
475
475
  };
476
- return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
476
+ return !x || x.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
477
477
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
478
478
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for area chart after transformation" })
479
- ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(yt, { data: x, margin: S, children: [
479
+ ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(yt, { data: x, margin: S, children: [
480
480
  u.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
481
481
  /* @__PURE__ */ i(
482
482
  ye,
@@ -495,9 +495,9 @@ function qr({
495
495
  label: { value: o(m[0]), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
496
496
  }
497
497
  ),
498
- u.showTooltip && /* @__PURE__ */ i(V, {}),
498
+ u.showTooltip && /* @__PURE__ */ i(q, {}),
499
499
  p && /* @__PURE__ */ i(
500
- _,
500
+ B,
501
501
  {
502
502
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
503
503
  iconType: "rect",
@@ -505,74 +505,74 @@ function qr({
505
505
  layout: "horizontal",
506
506
  align: "center",
507
507
  verticalAlign: "bottom",
508
- onMouseEnter: ($) => c(String($.dataKey || "")),
508
+ onMouseEnter: (k) => c(String(k.dataKey || "")),
509
509
  onMouseLeave: () => c(null)
510
510
  }
511
511
  ),
512
- v.map(($, h) => /* @__PURE__ */ i(
512
+ v.map((k, h) => /* @__PURE__ */ i(
513
513
  pt,
514
514
  {
515
515
  type: "monotone",
516
- dataKey: $,
516
+ dataKey: k,
517
517
  stackId: u.stacked ? "stack" : void 0,
518
518
  stroke: (a == null ? void 0 : a.colors) && a.colors[h % a.colors.length] || T[h % T.length],
519
519
  fill: (a == null ? void 0 : a.colors) && a.colors[h % a.colors.length] || T[h % T.length],
520
- fillOpacity: l ? l === $ ? 0.6 : 0.1 : 0.3,
520
+ fillOpacity: l ? l === k ? 0.6 : 0.1 : 0.3,
521
521
  strokeWidth: 2,
522
- strokeOpacity: l ? l === $ ? 1 : 0.3 : 1
522
+ strokeOpacity: l ? l === k ? 1 : 0.3 : 1
523
523
  },
524
- $
524
+ k
525
525
  ))
526
526
  ] }) });
527
527
  } catch (u) {
528
- return console.error("AreaChart rendering error:", u), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
528
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
529
529
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Area Chart Error" }),
530
530
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: u instanceof Error ? u.message : "Unknown rendering error" }),
531
531
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
532
532
  ] }) });
533
533
  }
534
534
  }
535
- function Br({
535
+ function Bn({
536
536
  data: e,
537
537
  chartConfig: t,
538
- displayConfig: r = {},
539
- queryObject: n,
538
+ displayConfig: n = {},
539
+ queryObject: r,
540
540
  height: s = "100%",
541
541
  colorPalette: a
542
542
  }) {
543
543
  const [l, c] = G(null), { labelMap: d } = K();
544
544
  try {
545
545
  const o = {
546
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
547
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0
546
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
547
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
548
548
  };
549
549
  if (!e || e.length === 0)
550
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
550
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
551
551
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
552
552
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in pie chart" })
553
553
  ] }) });
554
- let u, f, m, N = [];
554
+ let u, f, m, w = [];
555
555
  if (t != null && t.xAxis && (t != null && t.yAxis))
556
- f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], N = t.series || [];
556
+ f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [];
557
557
  else if (t != null && t.x && (t != null && t.y))
558
558
  f = t.x, m = Array.isArray(t.y) ? t.y : [t.y];
559
559
  else
560
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
560
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
561
561
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
562
562
  /* @__PURE__ */ i("div", { className: "text-xs", children: "chartConfig.x/y or chartConfig.xAxis/yAxis required for pie chart" })
563
563
  ] }) });
564
564
  if (!f || !m || m.length === 0)
565
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
565
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
566
566
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
567
567
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
568
568
  ] }) });
569
- if (N.length > 0) {
569
+ if (w.length > 0) {
570
570
  const { data: v } = C(
571
571
  e,
572
572
  f,
573
573
  m,
574
- n,
575
- N,
574
+ r,
575
+ w,
576
576
  d
577
577
  );
578
578
  if (u = [], v.length > 0) {
@@ -585,9 +585,9 @@ function Br({
585
585
  });
586
586
  }
587
587
  } else {
588
- const v = O(n, f);
588
+ const v = O(r, f);
589
589
  u = e.map((p) => {
590
- let S = D(p[f], v) || String(p[f]) || "Unknown";
590
+ let S = R(p[f], v) || String(p[f]) || "Unknown";
591
591
  return typeof p[f] == "boolean" ? S = p[f] ? "Active" : "Inactive" : (S === "true" || S === "false") && (S = S === "true" ? "Active" : "Inactive"), {
592
592
  name: S,
593
593
  value: typeof p[m[0]] == "string" ? parseFloat(p[m[0]]) : p[m[0]] || 0
@@ -597,12 +597,12 @@ function Br({
597
597
  const x = u.length;
598
598
  return u = u.filter(
599
599
  (v) => v.value != null && !isNaN(v.value) && v.value !== 0 && v.value > 0
600
- ), u.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
600
+ ), u.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
601
601
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
602
602
  /* @__PURE__ */ i("div", { className: "text-xs", children: x > 0 ? `Filtered out ${x} data points (zero or invalid values)` : "No data points to display in pie chart" })
603
- ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(vt, { children: [
603
+ ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(vt, { children: [
604
604
  /* @__PURE__ */ i(
605
- gt,
605
+ bt,
606
606
  {
607
607
  data: u,
608
608
  cx: "50%",
@@ -620,9 +620,9 @@ function Br({
620
620
  ))
621
621
  }
622
622
  ),
623
- o.showTooltip && /* @__PURE__ */ i(V, {}),
623
+ o.showTooltip && /* @__PURE__ */ i(q, {}),
624
624
  o.showLegend && /* @__PURE__ */ i(
625
- _,
625
+ B,
626
626
  {
627
627
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
628
628
  iconType: "circle",
@@ -636,30 +636,30 @@ function Br({
636
636
  )
637
637
  ] }) });
638
638
  } catch (o) {
639
- return console.error("PieChart rendering error:", o), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
639
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
640
640
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Pie Chart Error" }),
641
641
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
642
642
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
643
643
  ] }) });
644
644
  }
645
645
  }
646
- function _r({
646
+ function Kn({
647
647
  data: e,
648
648
  chartConfig: t,
649
- displayConfig: r = {},
650
- queryObject: n,
649
+ displayConfig: n = {},
650
+ queryObject: r,
651
651
  height: s = "100%",
652
652
  colorPalette: a
653
653
  }) {
654
654
  const [l, c] = G(null), { getFieldLabel: d } = K();
655
655
  try {
656
656
  const o = {
657
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
658
- showGrid: (r == null ? void 0 : r.showGrid) ?? !0,
659
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0
657
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
658
+ showGrid: (n == null ? void 0 : n.showGrid) ?? !0,
659
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
660
660
  };
661
661
  if (!e || e.length === 0)
662
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
662
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
663
663
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
664
664
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in scatter chart" })
665
665
  ] }) });
@@ -669,52 +669,52 @@ function _r({
669
669
  else if (t != null && t.x && (t != null && t.y))
670
670
  u = t.x, f = Array.isArray(t.y) ? t.y[0] : t.y;
671
671
  else
672
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
672
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
673
673
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
674
674
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Invalid or missing chart axis configuration" })
675
675
  ] }) });
676
676
  if (!u || !f)
677
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
677
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
678
678
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
679
679
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Missing required X-axis or Y-axis fields" })
680
680
  ] }) });
681
- let N, x = {};
681
+ let w, x = {};
682
682
  if (m.length > 0) {
683
683
  const h = m[0];
684
- e.forEach((b) => {
685
- const A = String(b[h] || "Default");
686
- x[A] || (x[A] = []);
687
- const w = O(n, u), k = D(b[u], w) || b[u], L = typeof b[f] == "string" ? parseFloat(b[f]) : b[f] || 0;
688
- x[A].push({
689
- x: typeof k == "string" ? parseFloat(k) || 0 : k,
684
+ e.forEach((g) => {
685
+ const N = String(g[h] || "Default");
686
+ x[N] || (x[N] = []);
687
+ const A = O(r, u), $ = R(g[u], A) || g[u], L = typeof g[f] == "string" ? parseFloat(g[f]) : g[f] || 0;
688
+ x[N].push({
689
+ x: typeof $ == "string" ? parseFloat($) || 0 : $,
690
690
  y: L,
691
- name: `${A} (${k}, ${L})`
691
+ name: `${N} (${$}, ${L})`
692
692
  });
693
693
  });
694
694
  const y = Object.keys(x);
695
- N = x[y[0]] || [];
695
+ w = x[y[0]] || [];
696
696
  } else {
697
- const h = O(n, u);
698
- N = e.map((y) => {
699
- const b = D(y[u], h) || y[u], A = typeof y[f] == "string" ? parseFloat(y[f]) : y[f] || 0;
697
+ const h = O(r, u);
698
+ w = e.map((y) => {
699
+ const g = R(y[u], h) || y[u], N = typeof y[f] == "string" ? parseFloat(y[f]) : y[f] || 0;
700
700
  return {
701
- x: typeof b == "string" ? parseFloat(b) || 0 : b,
702
- y: A,
703
- name: `(${b}, ${A})`
701
+ x: typeof g == "string" ? parseFloat(g) || 0 : g,
702
+ y: N,
703
+ name: `(${g}, ${N})`
704
704
  };
705
705
  });
706
706
  }
707
- if (!N || N.length === 0)
708
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
707
+ if (!w || w.length === 0)
708
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
709
709
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
710
710
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for scatter chart after transformation" })
711
711
  ] }) });
712
- const v = Object.keys(x), p = v.length > 1, S = o.showLegend && p, $ = {
712
+ const v = Object.keys(x), p = v.length > 1, S = o.showLegend && p, k = {
713
713
  ...ve,
714
714
  left: 40
715
715
  // Increased from 20 to 40 for Y-axis label space
716
716
  };
717
- return /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(bt, { data: N, margin: $, children: [
717
+ return /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(gt, { data: w, margin: k, children: [
718
718
  o.showGrid && /* @__PURE__ */ i(he, { strokeDasharray: "3 3" }),
719
719
  /* @__PURE__ */ i(
720
720
  ye,
@@ -735,9 +735,9 @@ function _r({
735
735
  label: { value: d(f), angle: -90, position: "left", style: { textAnchor: "middle", fontSize: "12px" } }
736
736
  }
737
737
  ),
738
- o.showTooltip && /* @__PURE__ */ i(V, {}),
738
+ o.showTooltip && /* @__PURE__ */ i(q, {}),
739
739
  S && /* @__PURE__ */ i(
740
- _,
740
+ B,
741
741
  {
742
742
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
743
743
  iconType: "circle",
@@ -767,70 +767,70 @@ function _r({
767
767
  Re,
768
768
  {
769
769
  name: "Data",
770
- data: N,
770
+ data: w,
771
771
  fill: (a == null ? void 0 : a.colors) && a.colors[0] || T[0]
772
772
  }
773
773
  )
774
774
  )
775
775
  ] }) });
776
776
  } catch (o) {
777
- return console.error("ScatterChart rendering error:", o), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
777
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
778
778
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Scatter Chart Error" }),
779
779
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
780
780
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
781
781
  ] }) });
782
782
  }
783
783
  }
784
- function Kr({
784
+ function Yn({
785
785
  data: e,
786
786
  chartConfig: t,
787
- displayConfig: r = {},
788
- queryObject: n,
787
+ displayConfig: n = {},
788
+ queryObject: r,
789
789
  height: s = "100%",
790
790
  colorPalette: a
791
791
  }) {
792
792
  const [l, c] = G(null);
793
793
  try {
794
794
  const d = {
795
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
796
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0,
797
- showGrid: (r == null ? void 0 : r.showGrid) ?? !0
795
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
796
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
797
+ showGrid: (n == null ? void 0 : n.showGrid) ?? !0
798
798
  };
799
799
  if (!e || e.length === 0)
800
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
800
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
801
801
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
802
802
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in radar chart" })
803
803
  ] }) });
804
804
  let o, u = [];
805
805
  if (t != null && t.xAxis && (t != null && t.yAxis)) {
806
- const f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], N = t.series || [], { data: x, seriesKeys: v } = C(
806
+ const f = t.xAxis[0], m = Array.isArray(t.yAxis) ? t.yAxis : [t.yAxis], w = t.series || [], { data: x, seriesKeys: v } = C(
807
807
  e,
808
808
  f,
809
809
  m,
810
- n,
811
- N
810
+ r,
811
+ w
812
812
  );
813
813
  o = x, u = v;
814
814
  } else {
815
- const f = e[0], m = Object.keys(f), N = m.find(
815
+ const f = e[0], m = Object.keys(f), w = m.find(
816
816
  (v) => typeof f[v] == "string" || v.toLowerCase().includes("subject") || v.toLowerCase().includes("name") || v.toLowerCase().includes("category")
817
817
  ) || m[0], x = m.filter(
818
- (v) => typeof f[v] == "number" && v !== N
818
+ (v) => typeof f[v] == "number" && v !== w
819
819
  );
820
820
  if (x.length === 0)
821
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
821
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
822
822
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
823
823
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric fields found for radar chart values" })
824
824
  ] }) });
825
- if (N) {
826
- const v = O(n, N);
825
+ if (w) {
826
+ const v = O(r, w);
827
827
  o = e.map((p) => {
828
828
  const S = {
829
- name: D(p[N], v) || String(p[N]) || "Unknown"
829
+ name: R(p[w], v) || String(p[w]) || "Unknown"
830
830
  };
831
- return x.forEach(($) => {
832
- const h = $.split(".").pop() || $;
833
- S[h] = typeof p[$] == "string" ? parseFloat(p[$]) : p[$] || 0;
831
+ return x.forEach((k) => {
832
+ const h = k.split(".").pop() || k;
833
+ S[h] = typeof p[k] == "string" ? parseFloat(p[k]) : p[k] || 0;
834
834
  }), S;
835
835
  }), u = x.map((p) => p.split(".").pop() || p);
836
836
  } else
@@ -839,10 +839,10 @@ function Kr({
839
839
  value: typeof v[x[0]] == "string" ? parseFloat(v[x[0]]) : v[x[0]] || 0
840
840
  })), u = ["value"];
841
841
  }
842
- return !o || o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
842
+ return !o || o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
843
843
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
844
844
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for radar chart after transformation" })
845
- ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(wt, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
845
+ ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(wt, { data: o, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
846
846
  d.showGrid && /* @__PURE__ */ i(Nt, {}),
847
847
  /* @__PURE__ */ i(
848
848
  At,
@@ -859,9 +859,9 @@ function Kr({
859
859
  className: "text-gray-600"
860
860
  }
861
861
  ),
862
- d.showTooltip && /* @__PURE__ */ i(V, {}),
862
+ d.showTooltip && /* @__PURE__ */ i(q, {}),
863
863
  d.showLegend && u.length > 1 && /* @__PURE__ */ i(
864
- _,
864
+ B,
865
865
  {
866
866
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
867
867
  iconType: "rect",
@@ -888,48 +888,48 @@ function Kr({
888
888
  ))
889
889
  ] }) });
890
890
  } catch (d) {
891
- return console.error("RadarChart rendering error:", d), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
891
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
892
892
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Radar Chart Error" }),
893
893
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
894
894
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
895
895
  ] }) });
896
896
  }
897
897
  }
898
- function Yr({
898
+ function Wn({
899
899
  data: e,
900
900
  chartConfig: t,
901
- displayConfig: r = {},
902
- queryObject: n,
901
+ displayConfig: n = {},
902
+ queryObject: r,
903
903
  height: s = "100%",
904
904
  colorPalette: a
905
905
  }) {
906
906
  const [l, c] = G(null);
907
907
  try {
908
908
  const d = {
909
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0,
910
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0
909
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0,
910
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0
911
911
  };
912
912
  if (!e || e.length === 0)
913
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
913
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
914
914
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
915
915
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in radial bar chart" })
916
916
  ] }) });
917
917
  let o;
918
918
  if (t != null && t.xAxis && (t != null && t.yAxis)) {
919
- const u = t.xAxis[0], f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = O(n, u);
920
- o = e.map((N, x) => ({
921
- name: D(N[u], m) || String(N[u]) || "Unknown",
922
- value: typeof N[f] == "string" ? parseFloat(N[f]) : N[f] || 0,
919
+ const u = t.xAxis[0], f = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis, m = O(r, u);
920
+ o = e.map((w, x) => ({
921
+ name: R(w[u], m) || String(w[u]) || "Unknown",
922
+ value: typeof w[f] == "string" ? parseFloat(w[f]) : w[f] || 0,
923
923
  fill: (a == null ? void 0 : a.colors) && a.colors[x % a.colors.length] || T[x % T.length]
924
924
  }));
925
925
  } else {
926
926
  const u = e[0], f = Object.keys(u), m = f.find(
927
927
  (x) => typeof u[x] == "string" || x.toLowerCase().includes("name") || x.toLowerCase().includes("label") || x.toLowerCase().includes("category")
928
- ) || f[0], N = f.find(
928
+ ) || f[0], w = f.find(
929
929
  (x) => typeof u[x] == "number" && x !== m
930
930
  ) || f[1];
931
- if (!N)
932
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
931
+ if (!w)
932
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
933
933
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
934
934
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric field found for radial bar chart values" })
935
935
  ] }) });
@@ -937,15 +937,15 @@ function Yr({
937
937
  let p = x[m];
938
938
  return typeof p == "boolean" ? p = p ? "Active" : "Inactive" : p === "true" || p === "false" ? p = p === "true" ? "Active" : "Inactive" : p = String(p), {
939
939
  name: p,
940
- value: typeof x[N] == "string" ? parseFloat(x[N]) : x[N] || 0,
940
+ value: typeof x[w] == "string" ? parseFloat(x[w]) : x[w] || 0,
941
941
  fill: (a == null ? void 0 : a.colors) && a.colors[v % a.colors.length] || T[v % T.length]
942
942
  };
943
943
  });
944
944
  }
945
- return o = o.filter((u) => u.value != null && u.value !== 0), o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
945
+ return o = o.filter((u) => u.value != null && u.value !== 0), o.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
946
946
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
947
947
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for radial bar chart after transformation" })
948
- ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ g(
948
+ ] }) }) : /* @__PURE__ */ i(U, { height: s, children: /* @__PURE__ */ b(
949
949
  kt,
950
950
  {
951
951
  data: o,
@@ -953,9 +953,9 @@ function Yr({
953
953
  outerRadius: "80%",
954
954
  margin: { top: 20, right: 30, bottom: 20, left: 30 },
955
955
  children: [
956
- d.showTooltip && /* @__PURE__ */ i(V, {}),
956
+ d.showTooltip && /* @__PURE__ */ i(q, {}),
957
957
  d.showLegend && /* @__PURE__ */ i(
958
- _,
958
+ B,
959
959
  {
960
960
  wrapperStyle: { fontSize: "12px", paddingTop: "10px" },
961
961
  iconType: "circle",
@@ -987,7 +987,7 @@ function Yr({
987
987
  }
988
988
  ) });
989
989
  } catch (d) {
990
- return console.error("RadialBarChart rendering error:", d), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
990
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
991
991
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Radial Bar Chart Error" }),
992
992
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: d instanceof Error ? d.message : "Unknown rendering error" }),
993
993
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
@@ -1001,14 +1001,14 @@ function jt(e, t) {
1001
1001
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1002
1002
  }
1003
1003
  function et(e) {
1004
- let t, r, n;
1005
- e.length !== 2 ? (t = oe, r = (c, d) => oe(e(c), d), n = (c, d) => e(c) - d) : (t = e === oe || e === jt ? e : Et, r = e, n = e);
1004
+ let t, n, r;
1005
+ e.length !== 2 ? (t = oe, n = (c, d) => oe(e(c), d), r = (c, d) => e(c) - d) : (t = e === oe || e === jt ? e : Et, n = e, r = e);
1006
1006
  function s(c, d, o = 0, u = c.length) {
1007
1007
  if (o < u) {
1008
1008
  if (t(d, d) !== 0) return u;
1009
1009
  do {
1010
1010
  const f = o + u >>> 1;
1011
- r(c[f], d) < 0 ? o = f + 1 : u = f;
1011
+ n(c[f], d) < 0 ? o = f + 1 : u = f;
1012
1012
  } while (o < u);
1013
1013
  }
1014
1014
  return o;
@@ -1018,14 +1018,14 @@ function et(e) {
1018
1018
  if (t(d, d) !== 0) return u;
1019
1019
  do {
1020
1020
  const f = o + u >>> 1;
1021
- r(c[f], d) <= 0 ? o = f + 1 : u = f;
1021
+ n(c[f], d) <= 0 ? o = f + 1 : u = f;
1022
1022
  } while (o < u);
1023
1023
  }
1024
1024
  return o;
1025
1025
  }
1026
1026
  function l(c, d, o = 0, u = c.length) {
1027
1027
  const f = s(c, d, o, u - 1);
1028
- return f > o && n(c[f - 1], d) > -n(c[f], d) ? f - 1 : f;
1028
+ return f > o && r(c[f - 1], d) > -r(c[f], d) ? f - 1 : f;
1029
1029
  }
1030
1030
  return { left: s, center: l, right: a };
1031
1031
  }
@@ -1038,8 +1038,8 @@ function zt(e) {
1038
1038
  const Rt = et(oe), tt = Rt.right;
1039
1039
  et(zt).center;
1040
1040
  class He extends Map {
1041
- constructor(t, r = It) {
1042
- if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null) for (const [n, s] of t) this.set(n, s);
1041
+ constructor(t, n = It) {
1042
+ if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, s] of t) this.set(r, s);
1043
1043
  }
1044
1044
  get(t) {
1045
1045
  return super.get(Ie(this, t));
@@ -1047,66 +1047,66 @@ class He extends Map {
1047
1047
  has(t) {
1048
1048
  return super.has(Ie(this, t));
1049
1049
  }
1050
- set(t, r) {
1051
- return super.set(Dt(this, t), r);
1050
+ set(t, n) {
1051
+ return super.set(Dt(this, t), n);
1052
1052
  }
1053
1053
  delete(t) {
1054
1054
  return super.delete(Ht(this, t));
1055
1055
  }
1056
1056
  }
1057
- function Ie({ _intern: e, _key: t }, r) {
1058
- const n = t(r);
1059
- return e.has(n) ? e.get(n) : r;
1057
+ function Ie({ _intern: e, _key: t }, n) {
1058
+ const r = t(n);
1059
+ return e.has(r) ? e.get(r) : n;
1060
1060
  }
1061
- function Dt({ _intern: e, _key: t }, r) {
1062
- const n = t(r);
1063
- return e.has(n) ? e.get(n) : (e.set(n, r), r);
1061
+ function Dt({ _intern: e, _key: t }, n) {
1062
+ const r = t(n);
1063
+ return e.has(r) ? e.get(r) : (e.set(r, n), n);
1064
1064
  }
1065
- function Ht({ _intern: e, _key: t }, r) {
1066
- const n = t(r);
1067
- return e.has(n) && (r = e.get(n), e.delete(n)), r;
1065
+ function Ht({ _intern: e, _key: t }, n) {
1066
+ const r = t(n);
1067
+ return e.has(r) && (n = e.get(r), e.delete(r)), n;
1068
1068
  }
1069
1069
  function It(e) {
1070
1070
  return e !== null && typeof e == "object" ? e.valueOf() : e;
1071
1071
  }
1072
1072
  const Ot = Math.sqrt(50), Gt = Math.sqrt(10), Ut = Math.sqrt(2);
1073
- function ce(e, t, r) {
1074
- const n = (t - e) / Math.max(0, r), s = Math.floor(Math.log10(n)), a = n / Math.pow(10, s), l = a >= Ot ? 10 : a >= Gt ? 5 : a >= Ut ? 2 : 1;
1073
+ function ce(e, t, n) {
1074
+ const r = (t - e) / Math.max(0, n), s = Math.floor(Math.log10(r)), a = r / Math.pow(10, s), l = a >= Ot ? 10 : a >= Gt ? 5 : a >= Ut ? 2 : 1;
1075
1075
  let c, d, o;
1076
- return s < 0 ? (o = Math.pow(10, -s) / l, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, s) * l, c = Math.round(e / o), d = Math.round(t / o), c * o < e && ++c, d * o > t && --d), d < c && 0.5 <= r && r < 2 ? ce(e, t, r * 2) : [c, d, o];
1076
+ return s < 0 ? (o = Math.pow(10, -s) / l, c = Math.round(e * o), d = Math.round(t * o), c / o < e && ++c, d / o > t && --d, o = -o) : (o = Math.pow(10, s) * l, c = Math.round(e / o), d = Math.round(t / o), c * o < e && ++c, d * o > t && --d), d < c && 0.5 <= n && n < 2 ? ce(e, t, n * 2) : [c, d, o];
1077
1077
  }
1078
- function Vt(e, t, r) {
1079
- if (t = +t, e = +e, r = +r, !(r > 0)) return [];
1078
+ function qt(e, t, n) {
1079
+ if (t = +t, e = +e, n = +n, !(n > 0)) return [];
1080
1080
  if (e === t) return [e];
1081
- const n = t < e, [s, a, l] = n ? ce(t, e, r) : ce(e, t, r);
1081
+ const r = t < e, [s, a, l] = r ? ce(t, e, n) : ce(e, t, n);
1082
1082
  if (!(a >= s)) return [];
1083
1083
  const c = a - s + 1, d = new Array(c);
1084
- if (n)
1084
+ if (r)
1085
1085
  if (l < 0) for (let o = 0; o < c; ++o) d[o] = (a - o) / -l;
1086
1086
  else for (let o = 0; o < c; ++o) d[o] = (a - o) * l;
1087
1087
  else if (l < 0) for (let o = 0; o < c; ++o) d[o] = (s + o) / -l;
1088
1088
  else for (let o = 0; o < c; ++o) d[o] = (s + o) * l;
1089
1089
  return d;
1090
1090
  }
1091
- function Ne(e, t, r) {
1092
- return t = +t, e = +e, r = +r, ce(e, t, r)[2];
1091
+ function Ne(e, t, n) {
1092
+ return t = +t, e = +e, n = +n, ce(e, t, n)[2];
1093
1093
  }
1094
- function qt(e, t, r) {
1095
- t = +t, e = +e, r = +r;
1096
- const n = t < e, s = n ? Ne(t, e, r) : Ne(e, t, r);
1097
- return (n ? -1 : 1) * (s < 0 ? 1 / -s : s);
1094
+ function Vt(e, t, n) {
1095
+ t = +t, e = +e, n = +n;
1096
+ const r = t < e, s = r ? Ne(t, e, n) : Ne(e, t, n);
1097
+ return (r ? -1 : 1) * (s < 0 ? 1 / -s : s);
1098
1098
  }
1099
- function $e(e, t, r) {
1100
- e.prototype = t.prototype = r, r.constructor = e;
1099
+ function $e(e, t, n) {
1100
+ e.prototype = t.prototype = n, n.constructor = e;
1101
1101
  }
1102
- function rt(e, t) {
1103
- var r = Object.create(e.prototype);
1104
- for (var n in t) r[n] = t[n];
1105
- return r;
1102
+ function nt(e, t) {
1103
+ var n = Object.create(e.prototype);
1104
+ for (var r in t) n[r] = t[r];
1105
+ return n;
1106
1106
  }
1107
1107
  function ee() {
1108
1108
  }
1109
- var Z = 0.7, de = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", H = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Bt = /^#([0-9a-f]{3,8})$/, _t = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Kt = new RegExp(`^rgb\\(${H},${H},${H}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Wt = new RegExp(`^rgba\\(${H},${H},${H},${J}\\)$`), Xt = new RegExp(`^hsl\\(${J},${H},${H}\\)$`), Qt = new RegExp(`^hsla\\(${J},${H},${H},${J}\\)$`), Oe = {
1109
+ var Z = 0.7, de = 1 / Z, X = "\\s*([+-]?\\d+)\\s*", J = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", D = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", _t = /^#([0-9a-f]{3,8})$/, Bt = new RegExp(`^rgb\\(${X},${X},${X}\\)$`), Kt = new RegExp(`^rgb\\(${D},${D},${D}\\)$`), Yt = new RegExp(`^rgba\\(${X},${X},${X},${J}\\)$`), Wt = new RegExp(`^rgba\\(${D},${D},${D},${J}\\)$`), Xt = new RegExp(`^hsl\\(${J},${D},${D}\\)$`), Qt = new RegExp(`^hsla\\(${J},${D},${D},${J}\\)$`), Oe = {
1110
1110
  aliceblue: 15792383,
1111
1111
  antiquewhite: 16444375,
1112
1112
  aqua: 65535,
@@ -1278,31 +1278,31 @@ function Zt() {
1278
1278
  return this.rgb().formatHex8();
1279
1279
  }
1280
1280
  function Jt() {
1281
- return nt(this).formatHsl();
1281
+ return rt(this).formatHsl();
1282
1282
  }
1283
1283
  function Ue() {
1284
1284
  return this.rgb().formatRgb();
1285
1285
  }
1286
1286
  function P(e) {
1287
- var t, r;
1288
- return e = (e + "").trim().toLowerCase(), (t = Bt.exec(e)) ? (r = t[1].length, t = parseInt(t[1], 16), r === 6 ? Ve(t) : r === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : r === 8 ? ie(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? ie(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 = _t.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Kt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ie(t[1], t[2], t[3], t[4]) : (t = Wt.exec(e)) ? ie(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Xt.exec(e)) ? _e(t[1], t[2] / 100, t[3] / 100, 1) : (t = Qt.exec(e)) ? _e(t[1], t[2] / 100, t[3] / 100, t[4]) : Oe.hasOwnProperty(e) ? Ve(Oe[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
1287
+ var t, n;
1288
+ return e = (e + "").trim().toLowerCase(), (t = _t.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? qe(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ie(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ie(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 = Bt.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = Kt.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Yt.exec(e)) ? ie(t[1], t[2], t[3], t[4]) : (t = Wt.exec(e)) ? ie(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Xt.exec(e)) ? Be(t[1], t[2] / 100, t[3] / 100, 1) : (t = Qt.exec(e)) ? Be(t[1], t[2] / 100, t[3] / 100, t[4]) : Oe.hasOwnProperty(e) ? qe(Oe[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
1289
1289
  }
1290
- function Ve(e) {
1290
+ function qe(e) {
1291
1291
  return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1292
1292
  }
1293
- function ie(e, t, r, n) {
1294
- return n <= 0 && (e = t = r = NaN), new j(e, t, r, n);
1293
+ function ie(e, t, n, r) {
1294
+ return r <= 0 && (e = t = n = NaN), new j(e, t, n, r);
1295
1295
  }
1296
1296
  function Pt(e) {
1297
1297
  return e instanceof ee || (e = P(e)), e ? (e = e.rgb(), new j(e.r, e.g, e.b, e.opacity)) : new j();
1298
1298
  }
1299
- function Ae(e, t, r, n) {
1300
- return arguments.length === 1 ? Pt(e) : new j(e, t, r, n ?? 1);
1299
+ function Ae(e, t, n, r) {
1300
+ return arguments.length === 1 ? Pt(e) : new j(e, t, n, r ?? 1);
1301
1301
  }
1302
- function j(e, t, r, n) {
1303
- this.r = +e, this.g = +t, this.b = +r, this.opacity = +n;
1302
+ function j(e, t, n, r) {
1303
+ this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1304
1304
  }
1305
- $e(j, Ae, rt(ee, {
1305
+ $e(j, Ae, nt(ee, {
1306
1306
  brighter(e) {
1307
1307
  return e = e == null ? de : Math.pow(de, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1308
1308
  },
@@ -1313,55 +1313,55 @@ $e(j, Ae, rt(ee, {
1313
1313
  return this;
1314
1314
  },
1315
1315
  clamp() {
1316
- return new j(B(this.r), B(this.g), B(this.b), ue(this.opacity));
1316
+ return new j(_(this.r), _(this.g), _(this.b), ue(this.opacity));
1317
1317
  },
1318
1318
  displayable() {
1319
1319
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1320
1320
  },
1321
- hex: qe,
1321
+ hex: Ve,
1322
1322
  // Deprecated! Use color.formatHex.
1323
- formatHex: qe,
1323
+ formatHex: Ve,
1324
1324
  formatHex8: Ct,
1325
- formatRgb: Be,
1326
- toString: Be
1325
+ formatRgb: _e,
1326
+ toString: _e
1327
1327
  }));
1328
- function qe() {
1329
- return `#${q(this.r)}${q(this.g)}${q(this.b)}`;
1328
+ function Ve() {
1329
+ return `#${V(this.r)}${V(this.g)}${V(this.b)}`;
1330
1330
  }
1331
1331
  function Ct() {
1332
- return `#${q(this.r)}${q(this.g)}${q(this.b)}${q((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1332
+ return `#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1333
1333
  }
1334
- function Be() {
1334
+ function _e() {
1335
1335
  const e = ue(this.opacity);
1336
- return `${e === 1 ? "rgb(" : "rgba("}${B(this.r)}, ${B(this.g)}, ${B(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1336
+ return `${e === 1 ? "rgb(" : "rgba("}${_(this.r)}, ${_(this.g)}, ${_(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1337
1337
  }
1338
1338
  function ue(e) {
1339
1339
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
1340
1340
  }
1341
- function B(e) {
1341
+ function _(e) {
1342
1342
  return Math.max(0, Math.min(255, Math.round(e) || 0));
1343
1343
  }
1344
- function q(e) {
1345
- return e = B(e), (e < 16 ? "0" : "") + e.toString(16);
1344
+ function V(e) {
1345
+ return e = _(e), (e < 16 ? "0" : "") + e.toString(16);
1346
1346
  }
1347
- function _e(e, t, r, n) {
1348
- return n <= 0 ? e = t = r = NaN : r <= 0 || r >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new z(e, t, r, n);
1347
+ function Be(e, t, n, r) {
1348
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new z(e, t, n, r);
1349
1349
  }
1350
- function nt(e) {
1350
+ function rt(e) {
1351
1351
  if (e instanceof z) return new z(e.h, e.s, e.l, e.opacity);
1352
1352
  if (e instanceof ee || (e = P(e)), !e) return new z();
1353
1353
  if (e instanceof z) return e;
1354
1354
  e = e.rgb();
1355
- var t = e.r / 255, r = e.g / 255, n = e.b / 255, s = Math.min(t, r, n), a = Math.max(t, r, n), l = NaN, c = a - s, d = (a + s) / 2;
1356
- return c ? (t === a ? l = (r - n) / c + (r < n) * 6 : r === a ? l = (n - t) / c + 2 : l = (t - r) / c + 4, c /= d < 0.5 ? a + s : 2 - a - s, l *= 60) : c = d > 0 && d < 1 ? 0 : l, new z(l, c, d, e.opacity);
1355
+ var t = e.r / 255, n = e.g / 255, r = e.b / 255, s = Math.min(t, n, r), a = Math.max(t, n, r), l = NaN, c = a - s, d = (a + s) / 2;
1356
+ return c ? (t === a ? l = (n - r) / c + (n < r) * 6 : n === a ? l = (r - t) / c + 2 : l = (t - n) / c + 4, c /= d < 0.5 ? a + s : 2 - a - s, l *= 60) : c = d > 0 && d < 1 ? 0 : l, new z(l, c, d, e.opacity);
1357
1357
  }
1358
- function er(e, t, r, n) {
1359
- return arguments.length === 1 ? nt(e) : new z(e, t, r, n ?? 1);
1358
+ function en(e, t, n, r) {
1359
+ return arguments.length === 1 ? rt(e) : new z(e, t, n, r ?? 1);
1360
1360
  }
1361
- function z(e, t, r, n) {
1362
- this.h = +e, this.s = +t, this.l = +r, this.opacity = +n;
1361
+ function z(e, t, n, r) {
1362
+ this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1363
1363
  }
1364
- $e(z, er, rt(ee, {
1364
+ $e(z, en, nt(ee, {
1365
1365
  brighter(e) {
1366
1366
  return e = e == null ? de : Math.pow(de, e), new z(this.h, this.s, this.l * e, this.opacity);
1367
1367
  },
@@ -1369,11 +1369,11 @@ $e(z, er, rt(ee, {
1369
1369
  return e = e == null ? Z : Math.pow(Z, e), new z(this.h, this.s, this.l * e, this.opacity);
1370
1370
  },
1371
1371
  rgb() {
1372
- var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, r = this.l, n = r + (r < 0.5 ? r : 1 - r) * t, s = 2 * r - n;
1372
+ var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, s = 2 * n - r;
1373
1373
  return new j(
1374
- ge(e >= 240 ? e - 240 : e + 120, s, n),
1375
- ge(e, s, n),
1376
- ge(e < 120 ? e + 240 : e - 120, s, n),
1374
+ be(e >= 240 ? e - 240 : e + 120, s, r),
1375
+ be(e, s, r),
1376
+ be(e < 120 ? e + 240 : e - 120, s, r),
1377
1377
  this.opacity
1378
1378
  );
1379
1379
  },
@@ -1394,140 +1394,140 @@ function Ke(e) {
1394
1394
  function ae(e) {
1395
1395
  return Math.max(0, Math.min(1, e || 0));
1396
1396
  }
1397
- function ge(e, t, r) {
1398
- return (e < 60 ? t + (r - t) * e / 60 : e < 180 ? r : e < 240 ? t + (r - t) * (240 - e) / 60 : t) * 255;
1397
+ function be(e, t, n) {
1398
+ return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
1399
1399
  }
1400
1400
  const Le = (e) => () => e;
1401
- function tr(e, t) {
1402
- return function(r) {
1403
- return e + r * t;
1401
+ function tn(e, t) {
1402
+ return function(n) {
1403
+ return e + n * t;
1404
1404
  };
1405
1405
  }
1406
- function rr(e, t, r) {
1407
- return e = Math.pow(e, r), t = Math.pow(t, r) - e, r = 1 / r, function(n) {
1408
- return Math.pow(e + n * t, r);
1406
+ function nn(e, t, n) {
1407
+ return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
1408
+ return Math.pow(e + r * t, n);
1409
1409
  };
1410
1410
  }
1411
- function nr(e) {
1412
- return (e = +e) == 1 ? st : function(t, r) {
1413
- return r - t ? rr(t, r, e) : Le(isNaN(t) ? r : t);
1411
+ function rn(e) {
1412
+ return (e = +e) == 1 ? st : function(t, n) {
1413
+ return n - t ? nn(t, n, e) : Le(isNaN(t) ? n : t);
1414
1414
  };
1415
1415
  }
1416
1416
  function st(e, t) {
1417
- var r = t - e;
1418
- return r ? tr(e, r) : Le(isNaN(e) ? t : e);
1417
+ var n = t - e;
1418
+ return n ? tn(e, n) : Le(isNaN(e) ? t : e);
1419
1419
  }
1420
1420
  const Ye = function e(t) {
1421
- var r = nr(t);
1422
- function n(s, a) {
1423
- var l = r((s = Ae(s)).r, (a = Ae(a)).r), c = r(s.g, a.g), d = r(s.b, a.b), o = st(s.opacity, a.opacity);
1421
+ var n = rn(t);
1422
+ function r(s, a) {
1423
+ var l = n((s = Ae(s)).r, (a = Ae(a)).r), c = n(s.g, a.g), d = n(s.b, a.b), o = st(s.opacity, a.opacity);
1424
1424
  return function(u) {
1425
1425
  return s.r = l(u), s.g = c(u), s.b = d(u), s.opacity = o(u), s + "";
1426
1426
  };
1427
1427
  }
1428
- return n.gamma = e, n;
1428
+ return r.gamma = e, r;
1429
1429
  }(1);
1430
- function sr(e, t) {
1430
+ function sn(e, t) {
1431
1431
  t || (t = []);
1432
- var r = e ? Math.min(t.length, e.length) : 0, n = t.slice(), s;
1432
+ var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), s;
1433
1433
  return function(a) {
1434
- for (s = 0; s < r; ++s) n[s] = e[s] * (1 - a) + t[s] * a;
1435
- return n;
1434
+ for (s = 0; s < n; ++s) r[s] = e[s] * (1 - a) + t[s] * a;
1435
+ return r;
1436
1436
  };
1437
1437
  }
1438
- function ir(e) {
1438
+ function an(e) {
1439
1439
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
1440
1440
  }
1441
- function ar(e, t) {
1442
- var r = t ? t.length : 0, n = e ? Math.min(r, e.length) : 0, s = new Array(n), a = new Array(r), l;
1443
- for (l = 0; l < n; ++l) s[l] = Te(e[l], t[l]);
1444
- for (; l < r; ++l) a[l] = t[l];
1441
+ function ln(e, t) {
1442
+ var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, s = new Array(r), a = new Array(n), l;
1443
+ for (l = 0; l < r; ++l) s[l] = Te(e[l], t[l]);
1444
+ for (; l < n; ++l) a[l] = t[l];
1445
1445
  return function(c) {
1446
- for (l = 0; l < n; ++l) a[l] = s[l](c);
1446
+ for (l = 0; l < r; ++l) a[l] = s[l](c);
1447
1447
  return a;
1448
1448
  };
1449
1449
  }
1450
- function lr(e, t) {
1451
- var r = /* @__PURE__ */ new Date();
1452
- return e = +e, t = +t, function(n) {
1453
- return r.setTime(e * (1 - n) + t * n), r;
1450
+ function on(e, t) {
1451
+ var n = /* @__PURE__ */ new Date();
1452
+ return e = +e, t = +t, function(r) {
1453
+ return n.setTime(e * (1 - r) + t * r), n;
1454
1454
  };
1455
1455
  }
1456
1456
  function fe(e, t) {
1457
- return e = +e, t = +t, function(r) {
1458
- return e * (1 - r) + t * r;
1457
+ return e = +e, t = +t, function(n) {
1458
+ return e * (1 - n) + t * n;
1459
1459
  };
1460
1460
  }
1461
- function or(e, t) {
1462
- var r = {}, n = {}, s;
1461
+ function cn(e, t) {
1462
+ var n = {}, r = {}, s;
1463
1463
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
1464
1464
  for (s in t)
1465
- s in e ? r[s] = Te(e[s], t[s]) : n[s] = t[s];
1465
+ s in e ? n[s] = Te(e[s], t[s]) : r[s] = t[s];
1466
1466
  return function(a) {
1467
- for (s in r) n[s] = r[s](a);
1468
- return n;
1467
+ for (s in n) r[s] = n[s](a);
1468
+ return r;
1469
1469
  };
1470
1470
  }
1471
- var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, be = new RegExp(Se.source, "g");
1472
- function cr(e) {
1471
+ var Se = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, ge = new RegExp(Se.source, "g");
1472
+ function dn(e) {
1473
1473
  return function() {
1474
1474
  return e;
1475
1475
  };
1476
1476
  }
1477
- function dr(e) {
1477
+ function un(e) {
1478
1478
  return function(t) {
1479
1479
  return e(t) + "";
1480
1480
  };
1481
1481
  }
1482
- function ur(e, t) {
1483
- var r = Se.lastIndex = be.lastIndex = 0, n, s, a, l = -1, c = [], d = [];
1484
- for (e = e + "", t = t + ""; (n = Se.exec(e)) && (s = be.exec(t)); )
1485
- (a = s.index) > r && (a = t.slice(r, a), c[l] ? c[l] += a : c[++l] = a), (n = n[0]) === (s = s[0]) ? c[l] ? c[l] += s : c[++l] = s : (c[++l] = null, d.push({ i: l, x: fe(n, s) })), r = be.lastIndex;
1486
- return r < t.length && (a = t.slice(r), c[l] ? c[l] += a : c[++l] = a), c.length < 2 ? d[0] ? dr(d[0].x) : cr(t) : (t = d.length, function(o) {
1482
+ function fn(e, t) {
1483
+ var n = Se.lastIndex = ge.lastIndex = 0, r, s, a, l = -1, c = [], d = [];
1484
+ for (e = e + "", t = t + ""; (r = Se.exec(e)) && (s = ge.exec(t)); )
1485
+ (a = s.index) > n && (a = t.slice(n, a), c[l] ? c[l] += a : c[++l] = a), (r = r[0]) === (s = s[0]) ? c[l] ? c[l] += s : c[++l] = s : (c[++l] = null, d.push({ i: l, x: fe(r, s) })), n = ge.lastIndex;
1486
+ return n < t.length && (a = t.slice(n), c[l] ? c[l] += a : c[++l] = a), c.length < 2 ? d[0] ? un(d[0].x) : dn(t) : (t = d.length, function(o) {
1487
1487
  for (var u = 0, f; u < t; ++u) c[(f = d[u]).i] = f.x(o);
1488
1488
  return c.join("");
1489
1489
  });
1490
1490
  }
1491
1491
  function Te(e, t) {
1492
- var r = typeof t, n;
1493
- return t == null || r === "boolean" ? Le(t) : (r === "number" ? fe : r === "string" ? (n = P(t)) ? (t = n, Ye) : ur : t instanceof P ? Ye : t instanceof Date ? lr : ir(t) ? sr : Array.isArray(t) ? ar : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? or : fe)(e, t);
1492
+ var n = typeof t, r;
1493
+ return t == null || n === "boolean" ? Le(t) : (n === "number" ? fe : n === "string" ? (r = P(t)) ? (t = r, Ye) : fn : t instanceof P ? Ye : t instanceof Date ? on : an(t) ? sn : Array.isArray(t) ? ln : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? cn : fe)(e, t);
1494
1494
  }
1495
- function fr(e, t) {
1496
- return e = +e, t = +t, function(r) {
1497
- return Math.round(e * (1 - r) + t * r);
1495
+ function mn(e, t) {
1496
+ return e = +e, t = +t, function(n) {
1497
+ return Math.round(e * (1 - n) + t * n);
1498
1498
  };
1499
1499
  }
1500
- function mr(e) {
1500
+ function xn(e) {
1501
1501
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
1502
1502
  }
1503
1503
  function me(e, t) {
1504
- if ((r = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
1505
- var r, n = e.slice(0, r);
1504
+ if ((n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
1505
+ var n, r = e.slice(0, n);
1506
1506
  return [
1507
- n.length > 1 ? n[0] + n.slice(2) : n,
1508
- +e.slice(r + 1)
1507
+ r.length > 1 ? r[0] + r.slice(2) : r,
1508
+ +e.slice(n + 1)
1509
1509
  ];
1510
1510
  }
1511
1511
  function Q(e) {
1512
1512
  return e = me(Math.abs(e)), e ? e[1] : NaN;
1513
1513
  }
1514
- function xr(e, t) {
1515
- return function(r, n) {
1516
- for (var s = r.length, a = [], l = 0, c = e[0], d = 0; s > 0 && c > 0 && (d + c + 1 > n && (c = Math.max(1, n - d)), a.push(r.substring(s -= c, s + c)), !((d += c + 1) > n)); )
1514
+ function hn(e, t) {
1515
+ return function(n, r) {
1516
+ for (var s = n.length, a = [], l = 0, c = e[0], d = 0; s > 0 && c > 0 && (d + c + 1 > r && (c = Math.max(1, r - d)), a.push(n.substring(s -= c, s + c)), !((d += c + 1) > r)); )
1517
1517
  c = e[l = (l + 1) % e.length];
1518
1518
  return a.reverse().join(t);
1519
1519
  };
1520
1520
  }
1521
- function hr(e) {
1521
+ function yn(e) {
1522
1522
  return function(t) {
1523
- return t.replace(/[0-9]/g, function(r) {
1524
- return e[+r];
1523
+ return t.replace(/[0-9]/g, function(n) {
1524
+ return e[+n];
1525
1525
  });
1526
1526
  };
1527
1527
  }
1528
- var yr = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1528
+ var pn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1529
1529
  function xe(e) {
1530
- if (!(t = yr.exec(e))) throw new Error("invalid format: " + e);
1530
+ if (!(t = pn.exec(e))) throw new Error("invalid format: " + e);
1531
1531
  var t;
1532
1532
  return new Fe({
1533
1533
  fill: t[1],
@@ -1549,47 +1549,47 @@ function Fe(e) {
1549
1549
  Fe.prototype.toString = function() {
1550
1550
  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;
1551
1551
  };
1552
- function pr(e) {
1553
- e: for (var t = e.length, r = 1, n = -1, s; r < t; ++r)
1554
- switch (e[r]) {
1552
+ function vn(e) {
1553
+ e: for (var t = e.length, n = 1, r = -1, s; n < t; ++n)
1554
+ switch (e[n]) {
1555
1555
  case ".":
1556
- n = s = r;
1556
+ r = s = n;
1557
1557
  break;
1558
1558
  case "0":
1559
- n === 0 && (n = r), s = r;
1559
+ r === 0 && (r = n), s = n;
1560
1560
  break;
1561
1561
  default:
1562
- if (!+e[r]) break e;
1563
- n > 0 && (n = 0);
1562
+ if (!+e[n]) break e;
1563
+ r > 0 && (r = 0);
1564
1564
  break;
1565
1565
  }
1566
- return n > 0 ? e.slice(0, n) + e.slice(s + 1) : e;
1566
+ return r > 0 ? e.slice(0, r) + e.slice(s + 1) : e;
1567
1567
  }
1568
1568
  var it;
1569
- function vr(e, t) {
1570
- var r = me(e, t);
1571
- if (!r) return e + "";
1572
- var n = r[0], s = r[1], a = s - (it = Math.max(-8, Math.min(8, Math.floor(s / 3))) * 3) + 1, l = n.length;
1573
- return a === l ? n : a > l ? n + new Array(a - l + 1).join("0") : a > 0 ? n.slice(0, a) + "." + n.slice(a) : "0." + new Array(1 - a).join("0") + me(e, Math.max(0, t + a - 1))[0];
1569
+ function bn(e, t) {
1570
+ var n = me(e, t);
1571
+ if (!n) return e + "";
1572
+ var r = n[0], s = n[1], a = s - (it = Math.max(-8, Math.min(8, Math.floor(s / 3))) * 3) + 1, l = r.length;
1573
+ return a === l ? r : a > l ? r + new Array(a - l + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + me(e, Math.max(0, t + a - 1))[0];
1574
1574
  }
1575
1575
  function We(e, t) {
1576
- var r = me(e, t);
1577
- if (!r) return e + "";
1578
- var n = r[0], s = r[1];
1579
- return s < 0 ? "0." + new Array(-s).join("0") + n : n.length > s + 1 ? n.slice(0, s + 1) + "." + n.slice(s + 1) : n + new Array(s - n.length + 2).join("0");
1576
+ var n = me(e, t);
1577
+ if (!n) return e + "";
1578
+ var r = n[0], s = n[1];
1579
+ return s < 0 ? "0." + new Array(-s).join("0") + r : r.length > s + 1 ? r.slice(0, s + 1) + "." + r.slice(s + 1) : r + new Array(s - r.length + 2).join("0");
1580
1580
  }
1581
1581
  const Xe = {
1582
1582
  "%": (e, t) => (e * 100).toFixed(t),
1583
1583
  b: (e) => Math.round(e).toString(2),
1584
1584
  c: (e) => e + "",
1585
- d: mr,
1585
+ d: xn,
1586
1586
  e: (e, t) => e.toExponential(t),
1587
1587
  f: (e, t) => e.toFixed(t),
1588
1588
  g: (e, t) => e.toPrecision(t),
1589
1589
  o: (e) => Math.round(e).toString(8),
1590
1590
  p: (e, t) => We(e * 100, t),
1591
1591
  r: We,
1592
- s: vr,
1592
+ s: bn,
1593
1593
  X: (e) => Math.round(e).toString(16).toUpperCase(),
1594
1594
  x: (e) => Math.round(e).toString(16)
1595
1595
  };
@@ -1597,22 +1597,22 @@ function Qe(e) {
1597
1597
  return e;
1598
1598
  }
1599
1599
  var Ze = Array.prototype.map, Je = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1600
- function gr(e) {
1601
- var t = e.grouping === void 0 || e.thousands === void 0 ? Qe : xr(Ze.call(e.grouping, Number), e.thousands + ""), r = e.currency === void 0 ? "" : e.currency[0] + "", n = e.currency === void 0 ? "" : e.currency[1] + "", s = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? Qe : hr(Ze.call(e.numerals, String)), l = e.percent === void 0 ? "%" : e.percent + "", c = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1600
+ function gn(e) {
1601
+ var t = e.grouping === void 0 || e.thousands === void 0 ? Qe : hn(Ze.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", s = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? Qe : yn(Ze.call(e.numerals, String)), l = e.percent === void 0 ? "%" : e.percent + "", c = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1602
1602
  function o(f) {
1603
1603
  f = xe(f);
1604
- var m = f.fill, N = f.align, x = f.sign, v = f.symbol, p = f.zero, S = f.width, $ = f.comma, h = f.precision, y = f.trim, b = f.type;
1605
- b === "n" ? ($ = !0, b = "g") : Xe[b] || (h === void 0 && (h = 12), y = !0, b = "g"), (p || m === "0" && N === "=") && (p = !0, m = "0", N = "=");
1606
- var A = v === "$" ? r : v === "#" && /[boxX]/.test(b) ? "0" + b.toLowerCase() : "", w = v === "$" ? n : /[%p]/.test(b) ? l : "", k = Xe[b], L = /[defgprs%]/.test(b);
1607
- h = h === void 0 ? 6 : /[gprs]/.test(b) ? Math.max(1, Math.min(21, h)) : Math.max(0, Math.min(20, h));
1604
+ var m = f.fill, w = f.align, x = f.sign, v = f.symbol, p = f.zero, S = f.width, k = f.comma, h = f.precision, y = f.trim, g = f.type;
1605
+ g === "n" ? (k = !0, g = "g") : Xe[g] || (h === void 0 && (h = 12), y = !0, g = "g"), (p || m === "0" && w === "=") && (p = !0, m = "0", w = "=");
1606
+ var N = v === "$" ? n : v === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "", A = v === "$" ? r : /[%p]/.test(g) ? l : "", $ = Xe[g], L = /[defgprs%]/.test(g);
1607
+ h = h === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, h)) : Math.max(0, Math.min(20, h));
1608
1608
  function F(M) {
1609
- var R = A, E = w, Y, Ee, te;
1610
- if (b === "c")
1611
- E = k(M) + E, M = "";
1609
+ var H = N, E = A, Y, Ee, te;
1610
+ if (g === "c")
1611
+ E = $(M) + E, M = "";
1612
1612
  else {
1613
1613
  M = +M;
1614
- var re = M < 0 || 1 / M < 0;
1615
- if (M = isNaN(M) ? d : k(Math.abs(M), h), y && (M = pr(M)), re && +M == 0 && x !== "+" && (re = !1), R = (re ? x === "(" ? x : c : x === "-" || x === "(" ? "" : x) + R, E = (b === "s" ? Je[8 + it / 3] : "") + E + (re && x === "(" ? ")" : ""), L) {
1614
+ var ne = M < 0 || 1 / M < 0;
1615
+ if (M = isNaN(M) ? d : $(Math.abs(M), h), y && (M = vn(M)), ne && +M == 0 && x !== "+" && (ne = !1), H = (ne ? x === "(" ? x : c : x === "-" || x === "(" ? "" : x) + H, E = (g === "s" ? Je[8 + it / 3] : "") + E + (ne && x === "(" ? ")" : ""), L) {
1616
1616
  for (Y = -1, Ee = M.length; ++Y < Ee; )
1617
1617
  if (te = M.charCodeAt(Y), 48 > te || te > 57) {
1618
1618
  E = (te === 46 ? s + M.slice(Y + 1) : M.slice(Y)) + E, M = M.slice(0, Y);
@@ -1620,20 +1620,20 @@ function gr(e) {
1620
1620
  }
1621
1621
  }
1622
1622
  }
1623
- $ && !p && (M = t(M, 1 / 0));
1624
- var ne = R.length + M.length + E.length, I = ne < S ? new Array(S - ne + 1).join(m) : "";
1625
- switch ($ && p && (M = t(I + M, I.length ? S - E.length : 1 / 0), I = ""), N) {
1623
+ k && !p && (M = t(M, 1 / 0));
1624
+ var re = H.length + M.length + E.length, I = re < S ? new Array(S - re + 1).join(m) : "";
1625
+ switch (k && p && (M = t(I + M, I.length ? S - E.length : 1 / 0), I = ""), w) {
1626
1626
  case "<":
1627
- M = R + M + E + I;
1627
+ M = H + M + E + I;
1628
1628
  break;
1629
1629
  case "=":
1630
- M = R + I + M + E;
1630
+ M = H + I + M + E;
1631
1631
  break;
1632
1632
  case "^":
1633
- M = I.slice(0, ne = I.length >> 1) + R + M + E + I.slice(ne);
1633
+ M = I.slice(0, re = I.length >> 1) + H + M + E + I.slice(re);
1634
1634
  break;
1635
1635
  default:
1636
- M = I + R + M + E;
1636
+ M = I + H + M + E;
1637
1637
  break;
1638
1638
  }
1639
1639
  return a(M);
@@ -1643,9 +1643,9 @@ function gr(e) {
1643
1643
  }, F;
1644
1644
  }
1645
1645
  function u(f, m) {
1646
- var N = o((f = xe(f), f.type = "f", f)), x = Math.max(-8, Math.min(8, Math.floor(Q(m) / 3))) * 3, v = Math.pow(10, -x), p = Je[8 + x / 3];
1646
+ var w = o((f = xe(f), f.type = "f", f)), x = Math.max(-8, Math.min(8, Math.floor(Q(m) / 3))) * 3, v = Math.pow(10, -x), p = Je[8 + x / 3];
1647
1647
  return function(S) {
1648
- return N(v * S) + p;
1648
+ return w(v * S) + p;
1649
1649
  };
1650
1650
  }
1651
1651
  return {
@@ -1654,21 +1654,21 @@ function gr(e) {
1654
1654
  };
1655
1655
  }
1656
1656
  var le, at, lt;
1657
- br({
1657
+ wn({
1658
1658
  thousands: ",",
1659
1659
  grouping: [3],
1660
1660
  currency: ["$", ""]
1661
1661
  });
1662
- function br(e) {
1663
- return le = gr(e), at = le.format, lt = le.formatPrefix, le;
1662
+ function wn(e) {
1663
+ return le = gn(e), at = le.format, lt = le.formatPrefix, le;
1664
1664
  }
1665
- function wr(e) {
1665
+ function Nn(e) {
1666
1666
  return Math.max(0, -Q(Math.abs(e)));
1667
1667
  }
1668
- function Nr(e, t) {
1668
+ function An(e, t) {
1669
1669
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Q(t) / 3))) * 3 - Q(Math.abs(e)));
1670
1670
  }
1671
- function Ar(e, t) {
1671
+ function Sn(e, t) {
1672
1672
  return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Q(t) - Q(e)) + 1;
1673
1673
  }
1674
1674
  function je(e, t) {
@@ -1686,14 +1686,14 @@ function je(e, t) {
1686
1686
  }
1687
1687
  const Pe = Symbol("implicit");
1688
1688
  function ot() {
1689
- var e = new He(), t = [], r = [], n = Pe;
1689
+ var e = new He(), t = [], n = [], r = Pe;
1690
1690
  function s(a) {
1691
1691
  let l = e.get(a);
1692
1692
  if (l === void 0) {
1693
- if (n !== Pe) return n;
1693
+ if (r !== Pe) return r;
1694
1694
  e.set(a, l = t.push(a) - 1);
1695
1695
  }
1696
- return r[l % r.length];
1696
+ return n[l % n.length];
1697
1697
  }
1698
1698
  return s.domain = function(a) {
1699
1699
  if (!arguments.length) return t.slice();
@@ -1702,19 +1702,19 @@ function ot() {
1702
1702
  e.has(l) || e.set(l, t.push(l) - 1);
1703
1703
  return s;
1704
1704
  }, s.range = function(a) {
1705
- return arguments.length ? (r = Array.from(a), s) : r.slice();
1705
+ return arguments.length ? (n = Array.from(a), s) : n.slice();
1706
1706
  }, s.unknown = function(a) {
1707
- return arguments.length ? (n = a, s) : n;
1707
+ return arguments.length ? (r = a, s) : r;
1708
1708
  }, s.copy = function() {
1709
- return ot(t, r).unknown(n);
1709
+ return ot(t, n).unknown(r);
1710
1710
  }, je.apply(s, arguments), s;
1711
1711
  }
1712
- function Sr(e) {
1712
+ function Mn(e) {
1713
1713
  return function() {
1714
1714
  return e;
1715
1715
  };
1716
1716
  }
1717
- function Mr(e) {
1717
+ function kn(e) {
1718
1718
  return +e;
1719
1719
  }
1720
1720
  var Ce = [0, 1];
@@ -1722,101 +1722,101 @@ function W(e) {
1722
1722
  return e;
1723
1723
  }
1724
1724
  function Me(e, t) {
1725
- return (t -= e = +e) ? function(r) {
1726
- return (r - e) / t;
1727
- } : Sr(isNaN(t) ? NaN : 0.5);
1728
- }
1729
- function kr(e, t) {
1730
- var r;
1731
- return e > t && (r = e, e = t, t = r), function(n) {
1732
- return Math.max(e, Math.min(t, n));
1725
+ return (t -= e = +e) ? function(n) {
1726
+ return (n - e) / t;
1727
+ } : Mn(isNaN(t) ? NaN : 0.5);
1728
+ }
1729
+ function $n(e, t) {
1730
+ var n;
1731
+ return e > t && (n = e, e = t, t = n), function(r) {
1732
+ return Math.max(e, Math.min(t, r));
1733
1733
  };
1734
1734
  }
1735
- function $r(e, t, r) {
1736
- var n = e[0], s = e[1], a = t[0], l = t[1];
1737
- return s < n ? (n = Me(s, n), a = r(l, a)) : (n = Me(n, s), a = r(a, l)), function(c) {
1738
- return a(n(c));
1735
+ function Ln(e, t, n) {
1736
+ var r = e[0], s = e[1], a = t[0], l = t[1];
1737
+ return s < r ? (r = Me(s, r), a = n(l, a)) : (r = Me(r, s), a = n(a, l)), function(c) {
1738
+ return a(r(c));
1739
1739
  };
1740
1740
  }
1741
- function Lr(e, t, r) {
1742
- var n = Math.min(e.length, t.length) - 1, s = new Array(n), a = new Array(n), l = -1;
1743
- for (e[n] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++l < n; )
1744
- s[l] = Me(e[l], e[l + 1]), a[l] = r(t[l], t[l + 1]);
1741
+ function Tn(e, t, n) {
1742
+ var r = Math.min(e.length, t.length) - 1, s = new Array(r), a = new Array(r), l = -1;
1743
+ for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++l < r; )
1744
+ s[l] = Me(e[l], e[l + 1]), a[l] = n(t[l], t[l + 1]);
1745
1745
  return function(c) {
1746
- var d = tt(e, c, 1, n) - 1;
1746
+ var d = tt(e, c, 1, r) - 1;
1747
1747
  return a[d](s[d](c));
1748
1748
  };
1749
1749
  }
1750
- function Tr(e, t) {
1750
+ function Fn(e, t) {
1751
1751
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
1752
1752
  }
1753
- function Fr() {
1754
- var e = Ce, t = Ce, r = Te, n, s, a, l = W, c, d, o;
1753
+ function jn() {
1754
+ var e = Ce, t = Ce, n = Te, r, s, a, l = W, c, d, o;
1755
1755
  function u() {
1756
1756
  var m = Math.min(e.length, t.length);
1757
- return l !== W && (l = kr(e[0], e[m - 1])), c = m > 2 ? Lr : $r, d = o = null, f;
1757
+ return l !== W && (l = $n(e[0], e[m - 1])), c = m > 2 ? Tn : Ln, d = o = null, f;
1758
1758
  }
1759
1759
  function f(m) {
1760
- return m == null || isNaN(m = +m) ? a : (d || (d = c(e.map(n), t, r)))(n(l(m)));
1760
+ return m == null || isNaN(m = +m) ? a : (d || (d = c(e.map(r), t, n)))(r(l(m)));
1761
1761
  }
1762
1762
  return f.invert = function(m) {
1763
- return l(s((o || (o = c(t, e.map(n), fe)))(m)));
1763
+ return l(s((o || (o = c(t, e.map(r), fe)))(m)));
1764
1764
  }, f.domain = function(m) {
1765
- return arguments.length ? (e = Array.from(m, Mr), u()) : e.slice();
1765
+ return arguments.length ? (e = Array.from(m, kn), u()) : e.slice();
1766
1766
  }, f.range = function(m) {
1767
1767
  return arguments.length ? (t = Array.from(m), u()) : t.slice();
1768
1768
  }, f.rangeRound = function(m) {
1769
- return t = Array.from(m), r = fr, u();
1769
+ return t = Array.from(m), n = mn, u();
1770
1770
  }, f.clamp = function(m) {
1771
1771
  return arguments.length ? (l = m ? !0 : W, u()) : l !== W;
1772
1772
  }, f.interpolate = function(m) {
1773
- return arguments.length ? (r = m, u()) : r;
1773
+ return arguments.length ? (n = m, u()) : n;
1774
1774
  }, f.unknown = function(m) {
1775
1775
  return arguments.length ? (a = m, f) : a;
1776
- }, function(m, N) {
1777
- return n = m, s = N, u();
1776
+ }, function(m, w) {
1777
+ return r = m, s = w, u();
1778
1778
  };
1779
1779
  }
1780
- function jr() {
1781
- return Fr()(W, W);
1780
+ function En() {
1781
+ return jn()(W, W);
1782
1782
  }
1783
- function Er(e, t, r, n) {
1784
- var s = qt(e, t, r), a;
1785
- switch (n = xe(n ?? ",f"), n.type) {
1783
+ function zn(e, t, n, r) {
1784
+ var s = Vt(e, t, n), a;
1785
+ switch (r = xe(r ?? ",f"), r.type) {
1786
1786
  case "s": {
1787
1787
  var l = Math.max(Math.abs(e), Math.abs(t));
1788
- return n.precision == null && !isNaN(a = Nr(s, l)) && (n.precision = a), lt(n, l);
1788
+ return r.precision == null && !isNaN(a = An(s, l)) && (r.precision = a), lt(r, l);
1789
1789
  }
1790
1790
  case "":
1791
1791
  case "e":
1792
1792
  case "g":
1793
1793
  case "p":
1794
1794
  case "r": {
1795
- n.precision == null && !isNaN(a = Ar(s, Math.max(Math.abs(e), Math.abs(t)))) && (n.precision = a - (n.type === "e"));
1795
+ r.precision == null && !isNaN(a = Sn(s, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
1796
1796
  break;
1797
1797
  }
1798
1798
  case "f":
1799
1799
  case "%": {
1800
- n.precision == null && !isNaN(a = wr(s)) && (n.precision = a - (n.type === "%") * 2);
1800
+ r.precision == null && !isNaN(a = Nn(s)) && (r.precision = a - (r.type === "%") * 2);
1801
1801
  break;
1802
1802
  }
1803
1803
  }
1804
- return at(n);
1804
+ return at(r);
1805
1805
  }
1806
1806
  function ct(e) {
1807
1807
  var t = e.domain;
1808
- return e.ticks = function(r) {
1809
- var n = t();
1810
- return Vt(n[0], n[n.length - 1], r ?? 10);
1811
- }, e.tickFormat = function(r, n) {
1808
+ return e.ticks = function(n) {
1809
+ var r = t();
1810
+ return qt(r[0], r[r.length - 1], n ?? 10);
1811
+ }, e.tickFormat = function(n, r) {
1812
1812
  var s = t();
1813
- return Er(s[0], s[s.length - 1], r ?? 10, n);
1814
- }, e.nice = function(r) {
1815
- r == null && (r = 10);
1816
- var n = t(), s = 0, a = n.length - 1, l = n[s], c = n[a], d, o, u = 10;
1813
+ return zn(s[0], s[s.length - 1], n ?? 10, r);
1814
+ }, e.nice = function(n) {
1815
+ n == null && (n = 10);
1816
+ var r = t(), s = 0, a = r.length - 1, l = r[s], c = r[a], d, o, u = 10;
1817
1817
  for (c < l && (o = l, l = c, c = o, o = s, s = a, a = o); u-- > 0; ) {
1818
- if (o = Ne(l, c, r), o === d)
1819
- return n[s] = l, n[a] = c, t(n);
1818
+ if (o = Ne(l, c, n), o === d)
1819
+ return r[s] = l, r[a] = c, t(r);
1820
1820
  if (o > 0)
1821
1821
  l = Math.floor(l / o) * o, c = Math.ceil(c / o) * o;
1822
1822
  else if (o < 0)
@@ -1828,53 +1828,53 @@ function ct(e) {
1828
1828
  return e;
1829
1829
  }, e;
1830
1830
  }
1831
- function zr() {
1832
- var e = jr();
1831
+ function Rn() {
1832
+ var e = En();
1833
1833
  return e.copy = function() {
1834
- return Tr(e, zr());
1834
+ return Fn(e, Rn());
1835
1835
  }, je.apply(e, arguments), ct(e);
1836
1836
  }
1837
1837
  function dt() {
1838
- var e = 0, t = 1, r = 1, n = [0.5], s = [0, 1], a;
1838
+ var e = 0, t = 1, n = 1, r = [0.5], s = [0, 1], a;
1839
1839
  function l(d) {
1840
- return d != null && d <= d ? s[tt(n, d, 0, r)] : a;
1840
+ return d != null && d <= d ? s[tt(r, d, 0, n)] : a;
1841
1841
  }
1842
1842
  function c() {
1843
1843
  var d = -1;
1844
- for (n = new Array(r); ++d < r; ) n[d] = ((d + 1) * t - (d - r) * e) / (r + 1);
1844
+ for (r = new Array(n); ++d < n; ) r[d] = ((d + 1) * t - (d - n) * e) / (n + 1);
1845
1845
  return l;
1846
1846
  }
1847
1847
  return l.domain = function(d) {
1848
1848
  return arguments.length ? ([e, t] = d, e = +e, t = +t, c()) : [e, t];
1849
1849
  }, l.range = function(d) {
1850
- return arguments.length ? (r = (s = Array.from(d)).length - 1, c()) : s.slice();
1850
+ return arguments.length ? (n = (s = Array.from(d)).length - 1, c()) : s.slice();
1851
1851
  }, l.invertExtent = function(d) {
1852
1852
  var o = s.indexOf(d);
1853
- return o < 0 ? [NaN, NaN] : o < 1 ? [e, n[0]] : o >= r ? [n[r - 1], t] : [n[o - 1], n[o]];
1853
+ return o < 0 ? [NaN, NaN] : o < 1 ? [e, r[0]] : o >= n ? [r[n - 1], t] : [r[o - 1], r[o]];
1854
1854
  }, l.unknown = function(d) {
1855
1855
  return arguments.length && (a = d), l;
1856
1856
  }, l.thresholds = function() {
1857
- return n.slice();
1857
+ return r.slice();
1858
1858
  }, l.copy = function() {
1859
1859
  return dt().domain([e, t]).range(s).unknown(a);
1860
1860
  }, je.apply(ct(l), arguments);
1861
1861
  }
1862
- function Wr({
1862
+ function Xn({
1863
1863
  data: e,
1864
1864
  chartConfig: t,
1865
- displayConfig: r = {},
1866
- queryObject: n,
1865
+ displayConfig: n = {},
1866
+ queryObject: r,
1867
1867
  height: s = "100%",
1868
1868
  colorPalette: a
1869
1869
  }) {
1870
1870
  const [l, c] = G(null), { getFieldLabel: d } = K();
1871
1871
  try {
1872
1872
  const o = {
1873
- showTooltip: (r == null ? void 0 : r.showTooltip) ?? !0,
1874
- showLegend: (r == null ? void 0 : r.showLegend) ?? !0
1873
+ showTooltip: (n == null ? void 0 : n.showTooltip) ?? !0,
1874
+ showLegend: (n == null ? void 0 : n.showLegend) ?? !0
1875
1875
  };
1876
1876
  if (!e || e.length === 0)
1877
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1877
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
1878
1878
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
1879
1879
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data points to display in treemap chart" })
1880
1880
  ] }) });
@@ -1882,94 +1882,82 @@ function Wr({
1882
1882
  if (t != null && t.xAxis && (t != null && t.yAxis)) {
1883
1883
  const h = t.xAxis[0], y = Array.isArray(t.yAxis) ? t.yAxis[0] : t.yAxis;
1884
1884
  m = Array.isArray(t.series) ? t.series[0] : t.series;
1885
- const b = O(n, h);
1885
+ const g = O(r, h);
1886
1886
  if (m) {
1887
- const A = e.map((w) => {
1888
- const k = w[m];
1889
- return typeof k == "string" ? parseFloat(k) : k;
1890
- }).filter((w) => !isNaN(w));
1891
- if (f = A.length === e.length && A.every((w) => typeof w == "number"), console.log("TreeMap Debug:", {
1892
- seriesField: m,
1893
- data: e,
1894
- seriesValues: A,
1895
- isNumericSeries: f,
1896
- rawValues: e.map((w) => w[m])
1897
- }), f) {
1898
- const w = Math.min(...A), k = Math.max(...A), L = dt().domain([w, k]).range(se);
1887
+ const N = e.map((A) => {
1888
+ const $ = A[m];
1889
+ return typeof $ == "string" ? parseFloat($) : $;
1890
+ }).filter((A) => !isNaN(A));
1891
+ if (f = N.length === e.length && N.every((A) => typeof A == "number"), f) {
1892
+ const A = Math.min(...N), $ = Math.max(...N), L = dt().domain([A, $]).range(se);
1899
1893
  u = e.map((F) => {
1900
- const M = typeof F[m] == "string" ? parseFloat(F[m]) : F[m], R = L(M);
1901
- return console.log("TreeMap Color Assignment:", {
1902
- item: F[h],
1903
- seriesValue: M,
1904
- color: R,
1905
- minValue: w,
1906
- maxValue: k
1907
- }), {
1908
- name: D(F[h], b) || String(F[h]) || "Unknown",
1894
+ const M = typeof F[m] == "string" ? parseFloat(F[m]) : F[m], H = L(M);
1895
+ return {
1896
+ name: R(F[h], g) || String(F[h]) || "Unknown",
1909
1897
  size: typeof F[y] == "string" ? parseFloat(F[y]) : F[y] || 0,
1910
- fill: R,
1898
+ fill: H,
1911
1899
  series: String(F[m])
1912
1900
  };
1913
1901
  });
1914
1902
  } else {
1915
- const w = [...new Set(e.map((L) => String(L[m])))], k = ot().domain(w).range((a == null ? void 0 : a.colors) || T);
1903
+ const A = [...new Set(e.map((L) => String(L[m])))], $ = ot().domain(A).range((a == null ? void 0 : a.colors) || T);
1916
1904
  u = e.map((L) => ({
1917
- name: D(L[h], b) || String(L[h]) || "Unknown",
1905
+ name: R(L[h], g) || String(L[h]) || "Unknown",
1918
1906
  size: typeof L[y] == "string" ? parseFloat(L[y]) : L[y] || 0,
1919
- fill: k(String(L[m])),
1907
+ fill: $(String(L[m])),
1920
1908
  series: String(L[m])
1921
1909
  }));
1922
1910
  }
1923
1911
  } else
1924
- u = e.map((A, w) => ({
1925
- name: D(A[h], b) || String(A[h]) || "Unknown",
1926
- size: typeof A[y] == "string" ? parseFloat(A[y]) : A[y] || 0,
1927
- fill: (a == null ? void 0 : a.colors) && a.colors[w % a.colors.length] || T[w % T.length]
1912
+ u = e.map((N, A) => ({
1913
+ name: R(N[h], g) || String(N[h]) || "Unknown",
1914
+ size: typeof N[y] == "string" ? parseFloat(N[y]) : N[y] || 0,
1915
+ fill: (a == null ? void 0 : a.colors) && a.colors[A % a.colors.length] || T[A % T.length]
1928
1916
  }));
1929
1917
  } else {
1930
- const h = e[0], y = Object.keys(h), b = y.find(
1931
- (w) => typeof h[w] == "string" || w.toLowerCase().includes("name") || w.toLowerCase().includes("label") || w.toLowerCase().includes("category")
1932
- ) || y[0], A = y.find((w) => w.toLowerCase().includes("size")) || y.find(
1933
- (w) => typeof h[w] == "number" && w !== b
1918
+ const h = e[0], y = Object.keys(h), g = y.find(
1919
+ (A) => typeof h[A] == "string" || A.toLowerCase().includes("name") || A.toLowerCase().includes("label") || A.toLowerCase().includes("category")
1920
+ ) || y[0], N = y.find((A) => A.toLowerCase().includes("size")) || y.find(
1921
+ (A) => typeof h[A] == "number" && A !== g
1934
1922
  ) || y[1];
1935
- if (!A)
1936
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1923
+ if (!N)
1924
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-yellow-600", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
1937
1925
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "Configuration Error" }),
1938
1926
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No numeric field found for treemap chart size" })
1939
1927
  ] }) });
1940
- u = e.map((w, k) => {
1941
- let L = w[b];
1928
+ u = e.map((A, $) => {
1929
+ let L = A[g];
1942
1930
  return typeof L == "boolean" ? L = L ? "Active" : "Inactive" : L === "true" || L === "false" ? L = L === "true" ? "Active" : "Inactive" : L = String(L), {
1943
1931
  name: L,
1944
- size: typeof w[A] == "string" ? parseFloat(w[A]) : w[A] || 0,
1945
- fill: (a == null ? void 0 : a.colors) && a.colors[k % a.colors.length] || T[k % T.length]
1932
+ size: typeof A[N] == "string" ? parseFloat(A[N]) : A[N] || 0,
1933
+ fill: (a == null ? void 0 : a.colors) && a.colors[$ % a.colors.length] || T[$ % T.length]
1946
1934
  };
1947
1935
  });
1948
1936
  }
1949
1937
  if (u = u.filter((h) => h.size != null && h.size > 0), u.length === 0)
1950
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
1938
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
1951
1939
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1952
1940
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No valid data points for treemap chart after transformation" })
1953
1941
  ] }) });
1954
- const N = (h) => {
1942
+ const w = (h) => {
1955
1943
  var M;
1956
- const { x: y, y: b, width: A, height: w, index: k, name: L, size: F } = h;
1957
- return A < 20 || w < 20 ? null : /* @__PURE__ */ g("g", { children: [
1944
+ const { x: y, y: g, width: N, height: A, index: $, name: L, size: F } = h;
1945
+ return N < 20 || A < 20 ? null : /* @__PURE__ */ b("g", { children: [
1958
1946
  /* @__PURE__ */ i(
1959
1947
  "rect",
1960
1948
  {
1961
1949
  x: y,
1962
- y: b,
1963
- width: A,
1964
- height: w,
1950
+ y: g,
1951
+ width: N,
1952
+ height: A,
1965
1953
  style: {
1966
- fill: ((M = u[k]) == null ? void 0 : M.fill) || (a == null ? void 0 : a.colors) && a.colors[k % a.colors.length] || T[k % T.length],
1967
- fillOpacity: l !== null ? l === k ? 1 : 0.6 : 0.8,
1954
+ fill: ((M = u[$]) == null ? void 0 : M.fill) || (a == null ? void 0 : a.colors) && a.colors[$ % a.colors.length] || T[$ % T.length],
1955
+ fillOpacity: l !== null ? l === $ ? 1 : 0.6 : 0.8,
1968
1956
  stroke: "#fff",
1969
1957
  strokeWidth: 2,
1970
1958
  cursor: "pointer"
1971
1959
  },
1972
- onMouseEnter: () => c(k),
1960
+ onMouseEnter: () => c($),
1973
1961
  onMouseLeave: () => c(null)
1974
1962
  }
1975
1963
  ),
@@ -1977,11 +1965,11 @@ function Wr({
1977
1965
  "foreignObject",
1978
1966
  {
1979
1967
  x: y,
1980
- y: b,
1981
- width: A,
1982
- height: w,
1968
+ y: g,
1969
+ width: N,
1970
+ height: A,
1983
1971
  style: { pointerEvents: "none", overflow: "visible" },
1984
- children: /* @__PURE__ */ g(
1972
+ children: /* @__PURE__ */ b(
1985
1973
  "div",
1986
1974
  {
1987
1975
  style: {
@@ -1999,26 +1987,26 @@ function Wr({
1999
1987
  overflow: "hidden"
2000
1988
  },
2001
1989
  children: [
2002
- A > 40 && w > 30 && /* @__PURE__ */ i(
1990
+ N > 40 && A > 30 && /* @__PURE__ */ i(
2003
1991
  "div",
2004
1992
  {
2005
1993
  style: {
2006
- fontSize: `${Math.max(10, Math.min(A / 8, w / 8, 16))}px`,
1994
+ fontSize: `${Math.max(10, Math.min(N / 8, A / 8, 16))}px`,
2007
1995
  fontWeight: "600",
2008
1996
  textAlign: "center",
2009
1997
  lineHeight: "1.2",
2010
- marginBottom: A > 60 && w > 45 ? "4px" : "0",
1998
+ marginBottom: N > 60 && A > 45 ? "4px" : "0",
2011
1999
  wordBreak: "break-word",
2012
2000
  hyphens: "auto"
2013
2001
  },
2014
2002
  children: L
2015
2003
  }
2016
2004
  ),
2017
- A > 60 && w > 45 && /* @__PURE__ */ i(
2005
+ N > 60 && A > 45 && /* @__PURE__ */ i(
2018
2006
  "div",
2019
2007
  {
2020
2008
  style: {
2021
- fontSize: `${Math.max(8, Math.min(A / 10, w / 10, 14))}px`,
2009
+ fontSize: `${Math.max(8, Math.min(N / 10, A / 10, 14))}px`,
2022
2010
  textAlign: "center",
2023
2011
  opacity: 0.9
2024
2012
  },
@@ -2033,39 +2021,30 @@ function Wr({
2033
2021
  ] });
2034
2022
  }, v = u.some((h) => "series" in h) ? [...new Set(u.map((h) => h.series).filter(Boolean))] : [];
2035
2023
  let p = [];
2036
- if (o.showLegend && m) {
2037
- if (console.log("TreeMap Legend Debug:", {
2038
- showLegend: o.showLegend,
2039
- seriesField: m,
2040
- isNumericSeries: f,
2041
- uniqueSeries: v,
2042
- data: e.slice(0, 2)
2043
- // First 2 items for debugging
2044
- }), f) {
2045
- const h = Math.min(...e.map((b) => {
2046
- const A = b[m];
2047
- return typeof A == "string" ? parseFloat(A) : A;
2048
- })), y = Math.max(...e.map((b) => {
2049
- const A = b[m];
2050
- return typeof A == "string" ? parseFloat(A) : A;
2024
+ if (o.showLegend && m)
2025
+ if (f) {
2026
+ const h = Math.min(...e.map((g) => {
2027
+ const N = g[m];
2028
+ return typeof N == "string" ? parseFloat(N) : N;
2029
+ })), y = Math.max(...e.map((g) => {
2030
+ const N = g[m];
2031
+ return typeof N == "string" ? parseFloat(N) : N;
2051
2032
  }));
2052
- console.log("Creating numeric legend:", { minValue: h, maxValue: y }), p = se.map((b, A) => {
2053
- const w = A / (se.length - 1);
2033
+ p = se.map((g, N) => {
2034
+ const A = N / (se.length - 1);
2054
2035
  return {
2055
- value: (h + (y - h) * w).toFixed(2),
2036
+ value: (h + (y - h) * A).toFixed(2),
2056
2037
  type: "rect",
2057
- color: b
2038
+ color: g
2058
2039
  };
2059
2040
  });
2060
- } else v.length > 1 && (console.log("Creating categorical legend:", v), p = v.map((h, y) => ({
2041
+ } else v.length > 1 && (p = v.map((h, y) => ({
2061
2042
  value: h,
2062
2043
  type: "rect",
2063
2044
  color: T[y % T.length]
2064
2045
  })));
2065
- console.log("Final legendPayload:", p);
2066
- }
2067
- const S = o.showLegend && p.length > 0, $ = S ? typeof s == "string" && s.includes("%") ? s : typeof s == "number" ? s + 60 : `calc(${s} + 60px)` : s;
2068
- return /* @__PURE__ */ g("div", { className: "w-full", style: { height: $ }, children: [
2046
+ const S = o.showLegend && p.length > 0, k = S ? typeof s == "string" && s.includes("%") ? s : typeof s == "number" ? s + 60 : `calc(${s} + 60px)` : s;
2047
+ return /* @__PURE__ */ b("div", { className: "w-full", style: { height: k }, children: [
2069
2048
  /* @__PURE__ */ i(U, { height: S ? "calc(100% - 50px)" : "100%", children: /* @__PURE__ */ i(
2070
2049
  Lt,
2071
2050
  {
@@ -2073,15 +2052,15 @@ function Wr({
2073
2052
  dataKey: "size",
2074
2053
  aspectRatio: 4 / 3,
2075
2054
  stroke: "#fff",
2076
- content: /* @__PURE__ */ i(N, {}),
2077
- children: o.showTooltip && /* @__PURE__ */ i(V, {})
2055
+ content: /* @__PURE__ */ i(w, {}),
2056
+ children: o.showTooltip && /* @__PURE__ */ i(q, {})
2078
2057
  }
2079
2058
  ) }),
2080
2059
  S && /* @__PURE__ */ i("div", { className: "flex justify-center items-center mt-4 pb-2", children: f ? (
2081
2060
  // Gradient legend for numeric series
2082
- /* @__PURE__ */ g("div", { className: "flex flex-col items-center", children: [
2061
+ /* @__PURE__ */ b("div", { className: "flex flex-col items-center", children: [
2083
2062
  /* @__PURE__ */ i("div", { className: "text-xs font-semibold text-gray-700 mb-2", children: m ? d(m) : "" }),
2084
- /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
2063
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
2085
2064
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-600", children: Math.min(...e.map((h) => {
2086
2065
  const y = h[m];
2087
2066
  return typeof y == "string" ? parseFloat(y) : y;
@@ -2104,7 +2083,7 @@ function Wr({
2104
2083
  ] })
2105
2084
  ) : (
2106
2085
  // Discrete legend for categorical series
2107
- /* @__PURE__ */ i("div", { className: "flex flex-wrap justify-center gap-4", children: p.map((h, y) => /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
2086
+ /* @__PURE__ */ i("div", { className: "flex flex-wrap justify-center gap-4", children: p.map((h, y) => /* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
2108
2087
  /* @__PURE__ */ i(
2109
2088
  "div",
2110
2089
  {
@@ -2117,34 +2096,34 @@ function Wr({
2117
2096
  ) })
2118
2097
  ] });
2119
2098
  } catch (o) {
2120
- return console.error("TreeMapChart rendering error:", o), /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2099
+ return /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center w-full text-red-500 p-4", style: { height: s }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
2121
2100
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "TreeMap Chart Error" }),
2122
2101
  /* @__PURE__ */ i("div", { className: "text-xs mb-2", children: o instanceof Error ? o.message : "Unknown rendering error" }),
2123
2102
  /* @__PURE__ */ i("div", { className: "text-xs text-gray-600", children: "Check the data and configuration" })
2124
2103
  ] }) });
2125
2104
  }
2126
2105
  }
2127
- function Xr({
2106
+ function Qn({
2128
2107
  data: e,
2129
2108
  chartConfig: t,
2130
- height: r = 300
2109
+ height: n = 300
2131
2110
  }) {
2132
- const { getFieldLabel: n } = K();
2111
+ const { getFieldLabel: r } = K();
2133
2112
  if (!e || e.length === 0)
2134
- return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: r }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2113
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: n }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
2135
2114
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2136
2115
  /* @__PURE__ */ i("div", { className: "text-xs", children: "No data to display in table" })
2137
2116
  ] }) });
2138
2117
  const s = Object.keys(e[0] || {}), a = t != null && t.xAxis && t.xAxis.length > 0 ? t.xAxis.filter((l) => s.includes(l)) : s;
2139
- return a.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: r }, children: /* @__PURE__ */ g("div", { className: "text-center", children: [
2118
+ return a.length === 0 ? /* @__PURE__ */ i("div", { className: "flex items-center justify-center w-full text-gray-500", style: { height: n }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
2140
2119
  /* @__PURE__ */ i("div", { className: "text-sm font-semibold mb-1", children: "No columns available" }),
2141
2120
  /* @__PURE__ */ i("div", { className: "text-xs", children: "Data structure is invalid" })
2142
- ] }) }) : /* @__PURE__ */ i("div", { className: "w-full overflow-auto", style: { height: r }, children: /* @__PURE__ */ g("table", { className: "min-w-full divide-y divide-gray-200", children: [
2121
+ ] }) }) : /* @__PURE__ */ i("div", { className: "w-full overflow-auto", style: { height: n }, children: /* @__PURE__ */ b("table", { className: "min-w-full divide-y divide-gray-200", children: [
2143
2122
  /* @__PURE__ */ i("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ i("tr", { children: a.map((l) => /* @__PURE__ */ i(
2144
2123
  "th",
2145
2124
  {
2146
2125
  className: "px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",
2147
- children: n(l)
2126
+ children: r(l)
2148
2127
  },
2149
2128
  l
2150
2129
  )) }) }),
@@ -2152,56 +2131,56 @@ function Xr({
2152
2131
  "td",
2153
2132
  {
2154
2133
  className: "px-3 py-2 whitespace-nowrap text-sm text-gray-900",
2155
- children: Rr(l[d])
2134
+ children: Dn(l[d])
2156
2135
  },
2157
2136
  d
2158
2137
  )) }, c)) })
2159
2138
  ] }) });
2160
2139
  }
2161
- function Rr(e) {
2140
+ function Dn(e) {
2162
2141
  return e == null ? "" : typeof e == "number" ? e.toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
2163
2142
  }
2164
- function Qr(e) {
2165
- const t = Dr(e);
2143
+ function Zn(e) {
2144
+ const t = Hn(e);
2166
2145
  return {
2167
2146
  portlets: e,
2168
2147
  layouts: t
2169
2148
  };
2170
2149
  }
2171
- function Dr(e) {
2172
- const t = e.map((r) => ({
2173
- i: r.id,
2174
- x: r.x,
2175
- y: r.y,
2176
- w: r.w,
2177
- h: r.h,
2150
+ function Hn(e) {
2151
+ const t = e.map((n) => ({
2152
+ i: n.id,
2153
+ x: n.x,
2154
+ y: n.y,
2155
+ w: n.w,
2156
+ h: n.h,
2178
2157
  minW: 3,
2179
2158
  minH: 3
2180
2159
  }));
2181
2160
  return {
2182
2161
  lg: t,
2183
- md: t.map((r) => ({ ...r, w: Math.min(r.w, 8) })),
2184
- sm: t.map((r) => ({ ...r, w: Math.min(r.w, 6) })),
2185
- xs: t.map((r) => ({ ...r, w: Math.min(r.w, 4) })),
2186
- xxs: t.map((r) => ({ ...r, w: 2 }))
2162
+ md: t.map((n) => ({ ...n, w: Math.min(n.w, 8) })),
2163
+ sm: t.map((n) => ({ ...n, w: Math.min(n.w, 6) })),
2164
+ xs: t.map((n) => ({ ...n, w: Math.min(n.w, 4) })),
2165
+ xxs: t.map((n) => ({ ...n, w: 2 }))
2187
2166
  };
2188
2167
  }
2189
- function Zr(e, t = {}) {
2190
- const { formatNumbers: r = !0, precision: n = 2 } = t;
2191
- return r ? e.map((s) => {
2168
+ function Jn(e, t = {}) {
2169
+ const { formatNumbers: n = !0, precision: r = 2 } = t;
2170
+ return n ? e.map((s) => {
2192
2171
  const a = {};
2193
2172
  for (const [l, c] of Object.entries(s))
2194
- typeof c == "number" ? a[l] = Number(c.toFixed(n)) : a[l] = c;
2173
+ typeof c == "number" ? a[l] = Number(c.toFixed(r)) : a[l] = c;
2195
2174
  return a;
2196
2175
  }) : e;
2197
2176
  }
2198
- function Jr() {
2177
+ function Pn() {
2199
2178
  return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2200
2179
  }
2201
- function Pr(e, t = 6, r = 4) {
2180
+ function Cn(e, t = 6, n = 4) {
2202
2181
  return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((s) => s.y + s.h)) };
2203
2182
  }
2204
- function Cr(e) {
2183
+ function er(e) {
2205
2184
  try {
2206
2185
  const t = JSON.parse(e);
2207
2186
  return typeof t != "object" || t === null ? { valid: !1, error: "Query must be a JSON object" } : !t.measures && !t.dimensions ? { valid: !1, error: "Query must have at least measures or dimensions" } : { valid: !0, query: t };
@@ -2209,7 +2188,7 @@ function Cr(e) {
2209
2188
  return { valid: !1, error: "Invalid JSON format" };
2210
2189
  }
2211
2190
  }
2212
- function en() {
2191
+ function tr() {
2213
2192
  return {
2214
2193
  title: "Sample Chart",
2215
2194
  query: JSON.stringify({
@@ -2233,37 +2212,37 @@ function en() {
2233
2212
  };
2234
2213
  }
2235
2214
  export {
2236
- qr as A,
2237
- Ur as B,
2215
+ _n as A,
2216
+ qn as B,
2238
2217
  ve as C,
2239
- Xr as D,
2240
- Vr as L,
2218
+ Qn as D,
2219
+ Vn as L,
2241
2220
  Tt as N,
2242
- Br as P,
2243
- Kr as R,
2244
- _r as S,
2245
- Wr as T,
2246
- Yr as a,
2247
- Tr as b,
2248
- Qr as c,
2221
+ Bn as P,
2222
+ Yn as R,
2223
+ Kn as S,
2224
+ Xn as T,
2225
+ Wn as a,
2226
+ Fn as b,
2227
+ Zn as c,
2249
2228
  W as d,
2250
- D as e,
2251
- Zr as f,
2229
+ R as e,
2230
+ Jn as f,
2252
2231
  O as g,
2253
- zr as h,
2232
+ Rn as h,
2254
2233
  je as i,
2255
2234
  se as j,
2256
2235
  T as k,
2257
2236
  ct as l,
2258
2237
  U as m,
2259
- Dr as n,
2238
+ Hn as n,
2260
2239
  ot as o,
2261
- Jr as p,
2240
+ Pn as p,
2262
2241
  dt as q,
2263
- Pr as r,
2264
- en as s,
2265
- Fr as t,
2242
+ Cn as r,
2243
+ tr as s,
2244
+ jn as t,
2266
2245
  De as u,
2267
- Cr as v
2246
+ er as v
2268
2247
  };
2269
- //# sourceMappingURL=charts-Dx3asDBi.js.map
2248
+ //# sourceMappingURL=charts-JUvTF2xT.js.map