drizzle-cube 0.2.9 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/client/charts/chartConfigs.d.ts +3 -1
  2. package/dist/client/charts.js +15 -15
  3. package/dist/client/chunks/{chart-activitygridchart-Cz4bEf3V.js → chart-activitygridchart-D17Fxiuf.js} +841 -732
  4. package/dist/client/chunks/chart-activitygridchart-D17Fxiuf.js.map +1 -0
  5. package/dist/client/chunks/{chart-activitygridchart-config-DVH-sdYZ.js → chart-activitygridchart-config-AVBoHdRn.js} +6 -6
  6. package/dist/client/chunks/{chart-activitygridchart-config-DVH-sdYZ.js.map → chart-activitygridchart-config-AVBoHdRn.js.map} +1 -1
  7. package/dist/client/chunks/{chart-areachart-config-C2iwLEgm.js → chart-areachart-config-D9pPUKHZ.js} +16 -3
  8. package/dist/client/chunks/chart-areachart-config-D9pPUKHZ.js.map +1 -0
  9. package/dist/client/chunks/chart-areachart-udSbAzl1.js +239 -0
  10. package/dist/client/chunks/chart-areachart-udSbAzl1.js.map +1 -0
  11. package/dist/client/chunks/chart-axisformatcontrols-DqSa245M.js +196 -0
  12. package/dist/client/chunks/chart-axisformatcontrols-DqSa245M.js.map +1 -0
  13. package/dist/client/chunks/chart-barchart-CDIpqCKS.js +216 -0
  14. package/dist/client/chunks/chart-barchart-CDIpqCKS.js.map +1 -0
  15. package/dist/client/chunks/{chart-barchart-config-CAsUZfHw.js → chart-barchart-config-iniz62ni.js} +16 -3
  16. package/dist/client/chunks/chart-barchart-config-iniz62ni.js.map +1 -0
  17. package/dist/client/chunks/chart-bubblechart-CivK_yfh.js +214 -0
  18. package/dist/client/chunks/chart-bubblechart-CivK_yfh.js.map +1 -0
  19. package/dist/client/chunks/{chart-bubblechart-config-DRuY0m7S.js → chart-bubblechart-config-yLq2oyR3.js} +19 -5
  20. package/dist/client/chunks/{chart-bubblechart-config-DRuY0m7S.js.map → chart-bubblechart-config-yLq2oyR3.js.map} +1 -1
  21. package/dist/client/chunks/{chart-charttooltip-k8soCd2n.js → chart-charttooltip-BVEdz4Q-.js} +4 -4
  22. package/dist/client/chunks/{chart-charttooltip-k8soCd2n.js.map → chart-charttooltip-BVEdz4Q-.js.map} +1 -1
  23. package/dist/client/chunks/chart-datatable-NHE7BTMr.js +283 -0
  24. package/dist/client/chunks/chart-datatable-NHE7BTMr.js.map +1 -0
  25. package/dist/client/chunks/{chart-datatable-config-C0MoGDgo.js → chart-datatable-config-DmEA3A-7.js} +11 -3
  26. package/dist/client/chunks/{chart-datatable-config-C0MoGDgo.js.map → chart-datatable-config-DmEA3A-7.js.map} +1 -1
  27. package/dist/client/chunks/{chart-kpidelta-CTcuIO9G.js → chart-kpidelta-D-FR2o4V.js} +2 -2
  28. package/dist/client/chunks/{chart-kpidelta-CTcuIO9G.js.map → chart-kpidelta-D-FR2o4V.js.map} +1 -1
  29. package/dist/client/chunks/{chart-kpidelta-config-Bq2Ph_Sp.js → chart-kpidelta-config-DtSDG4Kl.js} +2 -2
  30. package/dist/client/chunks/{chart-kpidelta-config-Bq2Ph_Sp.js.map → chart-kpidelta-config-DtSDG4Kl.js.map} +1 -1
  31. package/dist/client/chunks/{chart-kpinumber-slEXt8C-.js → chart-kpinumber-DSH8RJxb.js} +4 -4
  32. package/dist/client/chunks/{chart-kpinumber-slEXt8C-.js.map → chart-kpinumber-DSH8RJxb.js.map} +1 -1
  33. package/dist/client/chunks/{chart-kpinumber-config-OMNhJXdH.js → chart-kpinumber-config-Da2LFeKM.js} +2 -2
  34. package/dist/client/chunks/{chart-kpinumber-config-OMNhJXdH.js.map → chart-kpinumber-config-Da2LFeKM.js.map} +1 -1
  35. package/dist/client/chunks/{chart-kpitext-giq03TOK.js → chart-kpitext-Z9oh0bJq.js} +3 -3
  36. package/dist/client/chunks/{chart-kpitext-giq03TOK.js.map → chart-kpitext-Z9oh0bJq.js.map} +1 -1
  37. package/dist/client/chunks/{chart-kpitext-config-BLiwQIVN.js → chart-kpitext-config-DjvigyfE.js} +2 -2
  38. package/dist/client/chunks/{chart-kpitext-config-BLiwQIVN.js.map → chart-kpitext-config-DjvigyfE.js.map} +1 -1
  39. package/dist/client/chunks/chart-linechart-D4r0uD1j.js +198 -0
  40. package/dist/client/chunks/chart-linechart-D4r0uD1j.js.map +1 -0
  41. package/dist/client/chunks/{chart-linechart-config-CVbDAvCB.js → chart-linechart-config-DLVS2Zxc.js} +18 -5
  42. package/dist/client/chunks/chart-linechart-config-DLVS2Zxc.js.map +1 -0
  43. package/dist/client/chunks/{chart-markdownchart-config-uttA9Th4.js → chart-markdownchart-config-CgOA3YSw.js} +2 -2
  44. package/dist/client/chunks/{chart-markdownchart-config-uttA9Th4.js.map → chart-markdownchart-config-CgOA3YSw.js.map} +1 -1
  45. package/dist/client/chunks/{chart-piechart-CZRDQxeB.js → chart-piechart-BhttUWuH.js} +61 -55
  46. package/dist/client/chunks/chart-piechart-BhttUWuH.js.map +1 -0
  47. package/dist/client/chunks/{chart-piechart-config-J748ISAR.js → chart-piechart-config-DgwOeKHr.js} +13 -5
  48. package/dist/client/chunks/{chart-piechart-config-J748ISAR.js.map → chart-piechart-config-DgwOeKHr.js.map} +1 -1
  49. package/dist/client/chunks/chart-radarchart-DnqlfoGr.js +131 -0
  50. package/dist/client/chunks/chart-radarchart-DnqlfoGr.js.map +1 -0
  51. package/dist/client/chunks/{chart-radarchart-config-CU_MwXOg.js → chart-radarchart-config-BAV8D5PR.js} +13 -5
  52. package/dist/client/chunks/{chart-radarchart-config-CU_MwXOg.js.map → chart-radarchart-config-BAV8D5PR.js.map} +1 -1
  53. package/dist/client/chunks/chart-radialbarchart-BFxxiqLw.js +120 -0
  54. package/dist/client/chunks/chart-radialbarchart-BFxxiqLw.js.map +1 -0
  55. package/dist/client/chunks/{chart-radialbarchart-config-D0eEa2hb.js → chart-radialbarchart-config-CKozBBEC.js} +11 -3
  56. package/dist/client/chunks/{chart-radialbarchart-config-D0eEa2hb.js.map → chart-radialbarchart-config-CKozBBEC.js.map} +1 -1
  57. package/dist/client/chunks/{chart-scatterchart-C83KgqYY.js → chart-scatterchart-MN4SM-w7.js} +86 -84
  58. package/dist/client/chunks/chart-scatterchart-MN4SM-w7.js.map +1 -0
  59. package/dist/client/chunks/{chart-scatterchart-config-Bh0qBq9F.js → chart-scatterchart-config-UdHmbZ3s.js} +19 -5
  60. package/dist/client/chunks/{chart-scatterchart-config-Bh0qBq9F.js.map → chart-scatterchart-config-UdHmbZ3s.js.map} +1 -1
  61. package/dist/client/chunks/chart-treemapchart-Nozh2m26.js +265 -0
  62. package/dist/client/chunks/chart-treemapchart-Nozh2m26.js.map +1 -0
  63. package/dist/client/chunks/{chart-treemapchart-config-Bl0wYGhB.js → chart-treemapchart-config-D17VOwTM.js} +13 -5
  64. package/dist/client/chunks/{chart-treemapchart-config-Bl0wYGhB.js.map → chart-treemapchart-config-D17VOwTM.js.map} +1 -1
  65. package/dist/client/chunks/{charts-BUq4jszb.js → charts-BSDHSv4l.js} +42 -42
  66. package/dist/client/chunks/charts-BSDHSv4l.js.map +1 -0
  67. package/dist/client/chunks/components-CbDovlG-.js +13923 -0
  68. package/dist/client/chunks/components-CbDovlG-.js.map +1 -0
  69. package/dist/client/chunks/{index-CSeLP8gq.js → index-th92_8oL.js} +2 -2
  70. package/dist/client/chunks/{index-CSeLP8gq.js.map → index-th92_8oL.js.map} +1 -1
  71. package/dist/client/components/AnalysisBuilder/AnalysisAIPanel.d.ts +25 -0
  72. package/dist/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +3 -1
  73. package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +2 -5
  74. package/dist/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +9 -0
  75. package/dist/client/components/AnalysisBuilder/SectionHeading.d.ts +17 -0
  76. package/dist/client/components/AnalysisBuilder/types.d.ts +49 -1
  77. package/dist/client/components/PortletAnalysisModal.d.ts +25 -0
  78. package/dist/client/components/charts/AxisFormatControls.d.ts +35 -0
  79. package/dist/client/components.js +3 -3
  80. package/dist/client/hooks.js +10 -10
  81. package/dist/client/icons.js +1 -1
  82. package/dist/client/index.d.ts +1 -0
  83. package/dist/client/index.js +51 -3466
  84. package/dist/client/index.js.map +1 -1
  85. package/dist/client/providers/CubeProvider.d.ts +1 -1
  86. package/dist/client/providers.js +1 -1
  87. package/dist/client/styles.css +1 -1
  88. package/dist/client/types.d.ts +13 -0
  89. package/dist/client/utils/chartUtils.d.ts +20 -0
  90. package/dist/client/utils/pivotUtils.d.ts +11 -1
  91. package/dist/client-bundle-stats.html +1 -1
  92. package/package.json +2 -1
  93. package/dist/client/chunks/chart-activitygridchart-Cz4bEf3V.js.map +0 -1
  94. package/dist/client/chunks/chart-areachart-DLdolSnU.js +0 -204
  95. package/dist/client/chunks/chart-areachart-DLdolSnU.js.map +0 -1
  96. package/dist/client/chunks/chart-areachart-config-C2iwLEgm.js.map +0 -1
  97. package/dist/client/chunks/chart-barchart-Bdjz8DJp.js +0 -171
  98. package/dist/client/chunks/chart-barchart-Bdjz8DJp.js.map +0 -1
  99. package/dist/client/chunks/chart-barchart-config-CAsUZfHw.js.map +0 -1
  100. package/dist/client/chunks/chart-bubblechart-BlQkmqkI.js +0 -210
  101. package/dist/client/chunks/chart-bubblechart-BlQkmqkI.js.map +0 -1
  102. package/dist/client/chunks/chart-datatable-zyVFtRJ_.js +0 -249
  103. package/dist/client/chunks/chart-datatable-zyVFtRJ_.js.map +0 -1
  104. package/dist/client/chunks/chart-linechart-BfnU6L-D.js +0 -155
  105. package/dist/client/chunks/chart-linechart-BfnU6L-D.js.map +0 -1
  106. package/dist/client/chunks/chart-linechart-config-CVbDAvCB.js.map +0 -1
  107. package/dist/client/chunks/chart-piechart-CZRDQxeB.js.map +0 -1
  108. package/dist/client/chunks/chart-radarchart-D5yRnY9j.js +0 -124
  109. package/dist/client/chunks/chart-radarchart-D5yRnY9j.js.map +0 -1
  110. package/dist/client/chunks/chart-radialbarchart-Djtcn7aH.js +0 -109
  111. package/dist/client/chunks/chart-radialbarchart-Djtcn7aH.js.map +0 -1
  112. package/dist/client/chunks/chart-scatterchart-C83KgqYY.js.map +0 -1
  113. package/dist/client/chunks/chart-treemapchart-BDKnKGTz.js +0 -253
  114. package/dist/client/chunks/chart-treemapchart-BDKnKGTz.js.map +0 -1
  115. package/dist/client/chunks/charts-BUq4jszb.js.map +0 -1
  116. package/dist/client/chunks/components-DnhfrXo3.js +0 -9846
  117. package/dist/client/chunks/components-DnhfrXo3.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { jsx as O, jsxs as pt } from "react/jsx-runtime";
2
- import { useState as B, useCallback as Rt, useEffect as bt, useContext as ln, createContext as fn, useMemo as ae, useRef as oe, useLayoutEffect as hn } from "react";
1
+ import { jsx as U, jsxs as yt } from "react/jsx-runtime";
2
+ import { useState as Q, useCallback as Tt, useEffect as bt, useContext as ln, createContext as fn, useMemo as ae, useRef as oe, useLayoutEffect as hn } from "react";
3
3
  class dn {
4
4
  apiUrl;
5
5
  headers;
@@ -36,7 +36,7 @@ class dn {
36
36
  throw new Error(s);
37
37
  }
38
38
  const o = await a.json();
39
- return new Lt(o);
39
+ return new Dt(o);
40
40
  }
41
41
  async meta() {
42
42
  const e = `${this.apiUrl}/meta`, n = await fetch(e, {
@@ -112,12 +112,12 @@ class dn {
112
112
  throw new Error(a);
113
113
  }
114
114
  return (await r.json()).results.map((a) => !a.success && a.error ? {
115
- ...new Lt({ data: [], annotation: {} }),
115
+ ...new Dt({ data: [], annotation: {} }),
116
116
  error: a.error
117
- } : new Lt(a));
117
+ } : new Dt(a));
118
118
  }
119
119
  }
120
- class Lt {
120
+ class Dt {
121
121
  loadResponse;
122
122
  constructor(e) {
123
123
  this.loadResponse = e;
@@ -140,7 +140,7 @@ function mn(t, e = {}) {
140
140
  }
141
141
  const gn = 900 * 1e3;
142
142
  let j = null;
143
- function pn(t) {
143
+ function yn(t) {
144
144
  const e = {};
145
145
  return t.cubes.forEach((n) => {
146
146
  n.measures.forEach((r) => {
@@ -152,26 +152,26 @@ function pn(t) {
152
152
  });
153
153
  }), e;
154
154
  }
155
- function yn() {
155
+ function pn() {
156
156
  return j ? Date.now() - j.timestamp < gn : !1;
157
157
  }
158
158
  function xn(t) {
159
- const [e, n] = B(null), [r, i] = B({}), [a, o] = B(!0), [s, c] = B(null), u = Rt(async () => {
160
- if (yn() && j) {
159
+ const [e, n] = Q(null), [r, i] = Q({}), [a, o] = Q(!0), [s, c] = Q(null), u = Tt(async () => {
160
+ if (pn() && j) {
161
161
  n(j.data), i(j.labelMap), o(!1), c(null);
162
162
  return;
163
163
  }
164
164
  try {
165
165
  o(!0), c(null);
166
- const l = await t.meta(), d = pn(l);
166
+ const l = await t.meta(), h = yn(l);
167
167
  j = {
168
168
  data: l,
169
- labelMap: d,
169
+ labelMap: h,
170
170
  timestamp: Date.now()
171
- }, n(l), i(d);
171
+ }, n(l), i(h);
172
172
  } catch (l) {
173
- const d = l instanceof Error ? l.message : "Failed to fetch metadata";
174
- c(d), console.error("Failed to fetch cube metadata:", l);
173
+ const h = l instanceof Error ? l.message : "Failed to fetch metadata";
174
+ c(h), console.error("Failed to fetch cube metadata:", l);
175
175
  } finally {
176
176
  o(!1);
177
177
  }
@@ -179,7 +179,7 @@ function xn(t) {
179
179
  bt(() => {
180
180
  u();
181
181
  }, [u]);
182
- const f = Rt((l) => r[l] || l, [r]), m = Rt(() => {
182
+ const f = Tt((l) => r[l] || l, [r]), d = Tt(() => {
183
183
  j = null, u();
184
184
  }, [u]);
185
185
  return {
@@ -187,7 +187,7 @@ function xn(t) {
187
187
  labelMap: r,
188
188
  loading: a,
189
189
  error: s,
190
- refetch: m,
190
+ refetch: d,
191
191
  getFieldLabel: f
192
192
  };
193
193
  }
@@ -250,14 +250,14 @@ class wn {
250
250
  this.queue = [], this.flushScheduled = !1;
251
251
  }
252
252
  }
253
- const Ee = fn(null);
253
+ const Ce = fn(null);
254
254
  function ka({
255
255
  cubeApi: t,
256
256
  apiOptions: e,
257
257
  token: n,
258
258
  options: r = {},
259
- features: i = { enableAI: !0, aiEndpoint: "/api/ai/generate", showSchemaDiagram: !1 },
260
- // Default to AI enabled, schema diagram disabled
259
+ features: i = { enableAI: !0, aiEndpoint: "/api/ai/generate", showSchemaDiagram: !1, useAnalysisBuilder: !1 },
260
+ // Default to AI enabled, schema diagram disabled, old portlet edit modal
261
261
  dashboardModes: a = ["rows", "grid"],
262
262
  enableBatching: o = !0,
263
263
  // Default to batching enabled
@@ -265,59 +265,167 @@ function ka({
265
265
  // Default 100ms batch window
266
266
  children: c
267
267
  }) {
268
- const [u, f] = B(null), m = u || {
268
+ const [u, f] = Q(null), d = u || {
269
269
  apiOptions: e || { apiUrl: "/cubejs-api/v1" },
270
270
  token: n
271
- }, l = ae(() => t && !e && !n ? t : mn(m.token, m.apiOptions), [t, e, n, m.apiOptions, m.token]), d = ae(() => {
271
+ }, l = ae(() => t && !e && !n ? t : mn(d.token, d.apiOptions), [t, e, n, d.apiOptions, d.token]), h = ae(() => {
272
272
  if (!o)
273
273
  return null;
274
- const E = (A) => l.batchLoad(A);
275
- return new wn(E, s);
276
- }, [o, l, s]), { meta: M, labelMap: F, loading: $, error: T, getFieldLabel: b, refetch: N } = xn(l), v = {
274
+ const F = (E) => l.batchLoad(E);
275
+ return new wn(F, s);
276
+ }, [o, l, s]), { meta: b, labelMap: A, loading: S, error: R, getFieldLabel: v, refetch: k } = xn(l), M = {
277
277
  cubeApi: l,
278
278
  options: r,
279
- meta: M,
280
- labelMap: F,
281
- metaLoading: $,
282
- metaError: T,
283
- getFieldLabel: b,
284
- refetchMeta: N,
285
- updateApiConfig: (E, A) => {
279
+ meta: b,
280
+ labelMap: A,
281
+ metaLoading: S,
282
+ metaError: R,
283
+ getFieldLabel: v,
284
+ refetchMeta: k,
285
+ updateApiConfig: (F, E) => {
286
286
  f({
287
- apiOptions: E,
288
- token: A
287
+ apiOptions: F,
288
+ token: E
289
289
  });
290
290
  },
291
291
  features: i,
292
- batchCoordinator: d,
292
+ batchCoordinator: h,
293
293
  enableBatching: o,
294
294
  dashboardModes: a
295
295
  };
296
- return /* @__PURE__ */ O(Ee.Provider, { value: v, children: c });
296
+ return /* @__PURE__ */ U(Ce.Provider, { value: M, children: c });
297
297
  }
298
298
  function bn() {
299
- const t = ln(Ee);
299
+ const t = ln(Ce);
300
300
  if (!t)
301
301
  throw new Error("useCubeContext must be used within a CubeProvider");
302
302
  return t;
303
303
  }
304
- function Na(t) {
304
+ function $a(t) {
305
305
  return t != null && !isNaN(Number(t));
306
306
  }
307
- function Pt(t) {
307
+ function It(t) {
308
308
  if (t == null) return null;
309
309
  const e = typeof t == "string" ? parseFloat(t) : Number(t);
310
310
  return isNaN(e) ? null : e;
311
311
  }
312
- function Sa(t) {
312
+ function vn(t) {
313
313
  if (t == null) return "No data";
314
314
  const e = typeof t == "number" ? t : parseFloat(t);
315
315
  return isNaN(e) ? String(t) : Number.isInteger(e) ? e.toLocaleString() : parseFloat(e.toFixed(2)).toLocaleString();
316
316
  }
317
- function Vt(t, e) {
317
+ function Aa(t, e, n) {
318
+ if (t == null)
319
+ return "No data";
320
+ const r = typeof t == "number" ? t : parseFloat(String(t));
321
+ if (isNaN(r))
322
+ return String(t);
323
+ if (!isFinite(r))
324
+ return r > 0 ? "∞" : "-∞";
325
+ const i = typeof navigator < "u" ? navigator.language : "en-US";
326
+ if (!e)
327
+ return vn(t);
328
+ const { unit: a, abbreviate: o = !0, decimals: s, customPrefix: c, customSuffix: u } = e;
329
+ let f = r, d = "";
330
+ if (o) {
331
+ const h = Math.abs(r);
332
+ h >= 1e9 ? (f = r / 1e9, d = "B") : h >= 1e6 ? (f = r / 1e6, d = "M") : h >= 1e3 && (f = r / 1e3, d = "K");
333
+ }
334
+ const l = s !== void 0 ? s : Number.isInteger(f) ? 0 : 2;
335
+ switch (a) {
336
+ case "currency": {
337
+ const h = Mn(i);
338
+ if (o && d) {
339
+ const b = new Intl.NumberFormat(i, {
340
+ style: "currency",
341
+ currency: h,
342
+ minimumFractionDigits: l,
343
+ maximumFractionDigits: l
344
+ }).format(f), A = new Intl.NumberFormat(i, {
345
+ style: "currency",
346
+ currency: h
347
+ }).formatToParts(f);
348
+ return A[A.length - 1]?.type === "currency" ? b.replace(/(\s*[^\d\s]+)$/, d + "$1") : b + d;
349
+ }
350
+ return new Intl.NumberFormat(i, {
351
+ style: "currency",
352
+ currency: h,
353
+ minimumFractionDigits: l,
354
+ maximumFractionDigits: l
355
+ }).format(f);
356
+ }
357
+ case "percent": {
358
+ const h = Math.abs(f) <= 1 && !o ? f * 100 : f;
359
+ return new Intl.NumberFormat(i, {
360
+ minimumFractionDigits: l,
361
+ maximumFractionDigits: l
362
+ }).format(h) + d + "%";
363
+ }
364
+ case "custom": {
365
+ const h = c || "", b = u || "", A = new Intl.NumberFormat(i, {
366
+ minimumFractionDigits: l,
367
+ maximumFractionDigits: l
368
+ }).format(f);
369
+ return h + A + d + b;
370
+ }
371
+ default:
372
+ return new Intl.NumberFormat(i, {
373
+ minimumFractionDigits: l,
374
+ maximumFractionDigits: l
375
+ }).format(f) + d;
376
+ }
377
+ }
378
+ function Mn(t) {
379
+ const n = t.split("-")[1]?.toUpperCase();
380
+ return {
381
+ US: "USD",
382
+ CA: "CAD",
383
+ GB: "GBP",
384
+ UK: "GBP",
385
+ AU: "AUD",
386
+ NZ: "NZD",
387
+ EU: "EUR",
388
+ DE: "EUR",
389
+ FR: "EUR",
390
+ IT: "EUR",
391
+ ES: "EUR",
392
+ NL: "EUR",
393
+ BE: "EUR",
394
+ AT: "EUR",
395
+ IE: "EUR",
396
+ PT: "EUR",
397
+ FI: "EUR",
398
+ JP: "JPY",
399
+ CN: "CNY",
400
+ KR: "KRW",
401
+ IN: "INR",
402
+ BR: "BRL",
403
+ MX: "MXN",
404
+ CH: "CHF",
405
+ SE: "SEK",
406
+ NO: "NOK",
407
+ DK: "DKK",
408
+ PL: "PLN",
409
+ RU: "RUB",
410
+ ZA: "ZAR",
411
+ SG: "SGD",
412
+ HK: "HKD",
413
+ TW: "TWD",
414
+ TH: "THB",
415
+ MY: "MYR",
416
+ PH: "PHP",
417
+ ID: "IDR",
418
+ VN: "VND",
419
+ AE: "AED",
420
+ SA: "SAR",
421
+ IL: "ILS",
422
+ TR: "TRY"
423
+ }[n] || "USD";
424
+ }
425
+ function qt(t, e) {
318
426
  return e[t] || t;
319
427
  }
320
- function Qt(t, e) {
428
+ function Xt(t, e) {
321
429
  if (!t) return String(t || "Unknown");
322
430
  const n = String(t);
323
431
  if (n.match(/^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}/)) {
@@ -345,19 +453,19 @@ function Qt(t, e) {
345
453
  case "minute":
346
454
  return `${a}-${o}-${s} ${String(c).padStart(2, "0")}:${String(u).padStart(2, "0")}`;
347
455
  }
348
- const f = i.getUTCSeconds(), m = i.getUTCMilliseconds();
349
- if (s === "01" && c === 0 && u === 0 && f === 0 && m === 0) {
456
+ const f = i.getUTCSeconds(), d = i.getUTCMilliseconds();
457
+ if (s === "01" && c === 0 && u === 0 && f === 0 && d === 0) {
350
458
  if (o === "01" || o === "04" || o === "07" || o === "10") {
351
459
  const l = Math.floor(i.getUTCMonth() / 3) + 1;
352
460
  return `${a}-Q${l}`;
353
461
  }
354
462
  return `${a}-${o}`;
355
463
  }
356
- return c === 0 && u === 0 && f === 0 && m === 0 ? `${a}-${o}-${s}` : u === 0 && f === 0 && m === 0 ? `${a}-${o}-${s} ${String(c).padStart(2, "0")}:00` : `${a}-${o}-${s} ${String(c).padStart(2, "0")}:${String(u).padStart(2, "0")}`;
464
+ return c === 0 && u === 0 && f === 0 && d === 0 ? `${a}-${o}-${s}` : u === 0 && f === 0 && d === 0 ? `${a}-${o}-${s} ${String(c).padStart(2, "0")}:00` : `${a}-${o}-${s} ${String(c).padStart(2, "0")}:${String(u).padStart(2, "0")}`;
357
465
  }
358
466
  return n;
359
467
  }
360
- function Te(t, e) {
468
+ function Fe(t, e) {
361
469
  try {
362
470
  if (t?.timeDimensions) {
363
471
  const r = t.timeDimensions.find((i) => e === i.dimension || e.startsWith(i.dimension.replace(".", "_")) || e === `${i.dimension}_${i.granularity}`);
@@ -375,74 +483,74 @@ function Te(t, e) {
375
483
  return;
376
484
  }
377
485
  }
378
- function vn(t, e, n, r, i = {}) {
486
+ function _n(t, e, n, r, i = {}) {
379
487
  if (!t || t.length === 0) return [];
380
- const a = Te(r, e);
488
+ const a = Fe(r, e);
381
489
  return t.map((o) => {
382
490
  const s = {
383
- name: Qt(o[e], a) || o[e] || "Unknown"
491
+ name: Xt(o[e], a) || o[e] || "Unknown"
384
492
  };
385
493
  return n.forEach((c) => {
386
- const u = Vt(c, i);
387
- s[u] = Pt(o[c]);
494
+ const u = qt(c, i);
495
+ s[u] = It(o[c]);
388
496
  }), s;
389
497
  });
390
498
  }
391
- function $a(t, e, n, r, i, a = {}) {
499
+ function Ea(t, e, n, r, i, a = {}) {
392
500
  if (!t || t.length === 0)
393
501
  return { data: [], seriesKeys: [], hasDimensions: !1 };
394
502
  const o = r || {}, s = [
395
503
  ...o.dimensions || [],
396
- ...o.timeDimensions?.map((d) => d.dimension) || []
397
- ], c = o.measures || [], u = n.filter((d) => c.includes(d)), f = (i || []).filter((d) => s.includes(d));
504
+ ...o.timeDimensions?.map((h) => h.dimension) || []
505
+ ], c = o.measures || [], u = n.filter((h) => c.includes(h)), f = (i || []).filter((h) => s.includes(h));
398
506
  if (f.length > 0) {
399
- const d = {};
400
- t.forEach(($) => {
401
- const T = Te(r, e), b = Qt($[e], T) || $[e] || "Unknown";
402
- d[b] || (d[b] = { name: String(b) }), u.forEach((N) => {
403
- const C = Vt(N, a), v = Pt($[N]);
404
- if (v !== null) {
405
- const E = d[b][C];
406
- d[b][C] = E == null ? v : E + v;
407
- } else C in d[b] || (d[b][C] = null);
408
- }), f.forEach((N) => {
409
- const C = $[N];
507
+ const h = {};
508
+ t.forEach((S) => {
509
+ const R = Fe(r, e), v = Xt(S[e], R) || S[e] || "Unknown";
510
+ h[v] || (h[v] = { name: String(v) }), u.forEach((k) => {
511
+ const C = qt(k, a), M = It(S[k]);
512
+ if (M !== null) {
513
+ const F = h[v][C];
514
+ h[v][C] = F == null ? M : F + M;
515
+ } else C in h[v] || (h[v][C] = null);
516
+ }), f.forEach((k) => {
517
+ const C = S[k];
410
518
  if (C != null) {
411
- const v = String(C), E = u[0] || c.find(
412
- (A) => A.includes("totalCost") || A.includes("count") || A.includes("sum")
519
+ const M = String(C), F = u[0] || c.find(
520
+ (E) => E.includes("totalCost") || E.includes("count") || E.includes("sum")
413
521
  ) || c[0];
414
- if (E) {
415
- const A = Pt($[E]);
416
- if (A !== null) {
417
- const x = d[b][v];
418
- d[b][v] = x == null ? A : x + A;
419
- } else v in d[b] || (d[b][v] = null);
522
+ if (F) {
523
+ const E = It(S[F]);
524
+ if (E !== null) {
525
+ const x = h[v][M];
526
+ h[v][M] = x == null ? E : x + E;
527
+ } else M in h[v] || (h[v][M] = null);
420
528
  }
421
529
  }
422
530
  });
423
531
  });
424
- const M = Object.values(d), F = Array.from(new Set(
532
+ const b = Object.values(h), A = Array.from(new Set(
425
533
  t.flatMap(
426
- ($) => f.map((T) => {
427
- const b = $[T];
428
- return b != null ? String(b) : null;
429
- }).filter((T) => T !== null)
534
+ (S) => f.map((R) => {
535
+ const v = S[R];
536
+ return v != null ? String(v) : null;
537
+ }).filter((R) => R !== null)
430
538
  )
431
539
  ));
432
540
  return {
433
- data: M,
434
- seriesKeys: F,
541
+ data: b,
542
+ seriesKeys: A,
435
543
  hasDimensions: !0
436
544
  };
437
545
  }
438
- const m = vn(t, e, n, r, a), l = n.map((d) => Vt(d, a));
546
+ const d = _n(t, e, n, r, a), l = n.map((h) => qt(h, a));
439
547
  return {
440
- data: m,
548
+ data: d,
441
549
  seriesKeys: l,
442
550
  hasDimensions: !1
443
551
  };
444
552
  }
445
- const Aa = [
553
+ const Ca = [
446
554
  "#3b82f6",
447
555
  // blue
448
556
  "#10b981",
@@ -459,7 +567,7 @@ const Aa = [
459
567
  // cyan
460
568
  "#84cc16"
461
569
  // lime
462
- ], _n = [
570
+ ], Nn = [
463
571
  "#440154",
464
572
  // dark purple
465
573
  "#414487",
@@ -472,34 +580,34 @@ const Aa = [
472
580
  // green
473
581
  "#fde725"
474
582
  // yellow
475
- ], Ca = "#10b981", Ea = "#ef4444", Ta = {
583
+ ], Fa = "#10b981", Ra = "#ef4444", Ta = {
476
584
  top: 5,
477
585
  right: 30,
478
586
  left: 20,
479
587
  bottom: 5
480
588
  };
481
- function Fa(t) {
589
+ function Da(t) {
482
590
  return typeof window > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(`--dc-${t}`).trim();
483
591
  }
484
- function Mn(t, e) {
592
+ function Sn(t, e) {
485
593
  typeof window > "u" || document.documentElement.style.setProperty(`--dc-${t}`, e);
486
594
  }
487
- function Ra(t) {
595
+ function La(t) {
488
596
  typeof window > "u" || Object.entries(t.colors).forEach(([e, n]) => {
489
597
  if (n) {
490
598
  const r = e.replace(/[A-Z]/g, (i) => `-${i.toLowerCase()}`);
491
- Mn(r, n);
599
+ Sn(r, n);
492
600
  }
493
601
  });
494
602
  }
495
- function La() {
603
+ function Ha() {
496
604
  if (typeof window > "u") return;
497
605
  const t = document.documentElement.style;
498
606
  Array.from(t).forEach((n) => {
499
607
  n.startsWith("--dc-") && t.removeProperty(n);
500
608
  });
501
609
  }
502
- function _t() {
610
+ function Mt() {
503
611
  if (typeof window > "u") return "light";
504
612
  const t = localStorage.getItem("theme");
505
613
  if (t === "dark" || t === "neon" || t === "light")
@@ -507,29 +615,29 @@ function _t() {
507
615
  const e = document.documentElement.getAttribute("data-theme");
508
616
  return e === "dark" || e === "neon" ? e : document.documentElement.classList.contains("dark") || document.body.classList.contains("dark") ? "dark" : document.documentElement.classList.contains("neon") || document.body.classList.contains("neon") ? "neon" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
509
617
  }
510
- function Da(t) {
618
+ function Pa(t) {
511
619
  typeof window > "u" || (document.documentElement.classList.remove("dark", "neon"), document.documentElement.setAttribute("data-theme", t), (t === "dark" || t === "neon") && document.documentElement.classList.add(t), localStorage.setItem("theme", t));
512
620
  }
513
- function Ha() {
514
- const t = _t();
621
+ function Ua() {
622
+ const t = Mt();
515
623
  return t === "dark" || t === "neon";
516
624
  }
517
625
  function kn(t) {
518
626
  if (typeof window > "u") return () => {
519
627
  };
520
628
  const e = new MutationObserver(() => {
521
- t(_t());
629
+ t(Mt());
522
630
  });
523
631
  e.observe(document.documentElement, {
524
632
  attributes: !0,
525
633
  attributeFilter: ["class", "data-theme"]
526
634
  });
527
- const n = window.matchMedia("(prefers-color-scheme: dark)"), r = () => t(_t());
635
+ const n = window.matchMedia("(prefers-color-scheme: dark)"), r = () => t(Mt());
528
636
  return n.addEventListener("change", r), () => {
529
637
  e.disconnect(), n.removeEventListener("change", r);
530
638
  };
531
639
  }
532
- const qa = {
640
+ const Ia = {
533
641
  light: {
534
642
  name: "light",
535
643
  colors: {
@@ -581,18 +689,18 @@ const qa = {
581
689
  function vt(t, e) {
582
690
  return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
583
691
  }
584
- function Nn(t, e) {
692
+ function $n(t, e) {
585
693
  return t == null || e == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
586
694
  }
587
- function Fe(t) {
695
+ function Re(t) {
588
696
  let e, n, r;
589
- t.length !== 2 ? (e = vt, n = (s, c) => vt(t(s), c), r = (s, c) => t(s) - c) : (e = t === vt || t === Nn ? t : Sn, n = t, r = t);
697
+ t.length !== 2 ? (e = vt, n = (s, c) => vt(t(s), c), r = (s, c) => t(s) - c) : (e = t === vt || t === $n ? t : An, n = t, r = t);
590
698
  function i(s, c, u = 0, f = s.length) {
591
699
  if (u < f) {
592
700
  if (e(c, c) !== 0) return f;
593
701
  do {
594
- const m = u + f >>> 1;
595
- n(s[m], c) < 0 ? u = m + 1 : f = m;
702
+ const d = u + f >>> 1;
703
+ n(s[d], c) < 0 ? u = d + 1 : f = d;
596
704
  } while (u < f);
597
705
  }
598
706
  return u;
@@ -601,27 +709,27 @@ function Fe(t) {
601
709
  if (u < f) {
602
710
  if (e(c, c) !== 0) return f;
603
711
  do {
604
- const m = u + f >>> 1;
605
- n(s[m], c) <= 0 ? u = m + 1 : f = m;
712
+ const d = u + f >>> 1;
713
+ n(s[d], c) <= 0 ? u = d + 1 : f = d;
606
714
  } while (u < f);
607
715
  }
608
716
  return u;
609
717
  }
610
718
  function o(s, c, u = 0, f = s.length) {
611
- const m = i(s, c, u, f - 1);
612
- return m > u && r(s[m - 1], c) > -r(s[m], c) ? m - 1 : m;
719
+ const d = i(s, c, u, f - 1);
720
+ return d > u && r(s[d - 1], c) > -r(s[d], c) ? d - 1 : d;
613
721
  }
614
722
  return { left: i, center: o, right: a };
615
723
  }
616
- function Sn() {
724
+ function An() {
617
725
  return 0;
618
726
  }
619
- function $n(t) {
727
+ function En(t) {
620
728
  return t === null ? NaN : +t;
621
729
  }
622
- const An = Fe(vt), Re = An.right;
623
- Fe($n).center;
624
- function Oa(t, e) {
730
+ const Cn = Re(vt), Te = Cn.right;
731
+ Re(En).center;
732
+ function qa(t, e) {
625
733
  let n, r;
626
734
  if (e === void 0)
627
735
  for (const i of t)
@@ -644,37 +752,37 @@ class se extends Map {
644
752
  return super.has(ce(this, e));
645
753
  }
646
754
  set(e, n) {
647
- return super.set(Cn(this, e), n);
755
+ return super.set(Fn(this, e), n);
648
756
  }
649
757
  delete(e) {
650
- return super.delete(En(this, e));
758
+ return super.delete(Rn(this, e));
651
759
  }
652
760
  }
653
761
  function ce({ _intern: t, _key: e }, n) {
654
762
  const r = e(n);
655
763
  return t.has(r) ? t.get(r) : n;
656
764
  }
657
- function Cn({ _intern: t, _key: e }, n) {
765
+ function Fn({ _intern: t, _key: e }, n) {
658
766
  const r = e(n);
659
767
  return t.has(r) ? t.get(r) : (t.set(r, n), n);
660
768
  }
661
- function En({ _intern: t, _key: e }, n) {
769
+ function Rn({ _intern: t, _key: e }, n) {
662
770
  const r = e(n);
663
771
  return t.has(r) && (n = t.get(r), t.delete(r)), n;
664
772
  }
665
773
  function Tn(t) {
666
774
  return t !== null && typeof t == "object" ? t.valueOf() : t;
667
775
  }
668
- const Fn = Math.sqrt(50), Rn = Math.sqrt(10), Ln = Math.sqrt(2);
669
- function Mt(t, e, n) {
670
- const r = (e - t) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), o = a >= Fn ? 10 : a >= Rn ? 5 : a >= Ln ? 2 : 1;
776
+ const Dn = Math.sqrt(50), Ln = Math.sqrt(10), Hn = Math.sqrt(2);
777
+ function _t(t, e, n) {
778
+ const r = (e - t) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), o = a >= Dn ? 10 : a >= Ln ? 5 : a >= Hn ? 2 : 1;
671
779
  let s, c, u;
672
- return i < 0 ? (u = Math.pow(10, -i) / o, s = Math.round(t * u), c = Math.round(e * u), s / u < t && ++s, c / u > e && --c, u = -u) : (u = Math.pow(10, i) * o, s = Math.round(t / u), c = Math.round(e / u), s * u < t && ++s, c * u > e && --c), c < s && 0.5 <= n && n < 2 ? Mt(t, e, n * 2) : [s, c, u];
780
+ return i < 0 ? (u = Math.pow(10, -i) / o, s = Math.round(t * u), c = Math.round(e * u), s / u < t && ++s, c / u > e && --c, u = -u) : (u = Math.pow(10, i) * o, s = Math.round(t / u), c = Math.round(e / u), s * u < t && ++s, c * u > e && --c), c < s && 0.5 <= n && n < 2 ? _t(t, e, n * 2) : [s, c, u];
673
781
  }
674
- function Dn(t, e, n) {
782
+ function Pn(t, e, n) {
675
783
  if (e = +e, t = +t, n = +n, !(n > 0)) return [];
676
784
  if (t === e) return [t];
677
- const r = e < t, [i, a, o] = r ? Mt(e, t, n) : Mt(t, e, n);
785
+ const r = e < t, [i, a, o] = r ? _t(e, t, n) : _t(t, e, n);
678
786
  if (!(a >= i)) return [];
679
787
  const s = a - i + 1, c = new Array(s);
680
788
  if (r)
@@ -684,12 +792,12 @@ function Dn(t, e, n) {
684
792
  else for (let u = 0; u < s; ++u) c[u] = (i + u) * o;
685
793
  return c;
686
794
  }
687
- function zt(t, e, n) {
688
- return e = +e, t = +t, n = +n, Mt(t, e, n)[2];
795
+ function Vt(t, e, n) {
796
+ return e = +e, t = +t, n = +n, _t(t, e, n)[2];
689
797
  }
690
- function Hn(t, e, n) {
798
+ function Un(t, e, n) {
691
799
  e = +e, t = +t, n = +n;
692
- const r = e < t, i = r ? zt(e, t, n) : zt(t, e, n);
800
+ const r = e < t, i = r ? Vt(e, t, n) : Vt(t, e, n);
693
801
  return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
694
802
  }
695
803
  function ue(t, e) {
@@ -716,184 +824,184 @@ function le(t, e) {
716
824
  }
717
825
  return n;
718
826
  }
719
- function qn(t) {
827
+ function In(t) {
720
828
  return t;
721
829
  }
722
- var Dt = 1, Ht = 2, It = 3, ut = 4, fe = 1e-6;
723
- function On(t) {
830
+ var Lt = 1, Ht = 2, Ot = 3, ut = 4, fe = 1e-6;
831
+ function qn(t) {
724
832
  return "translate(" + t + ",0)";
725
833
  }
726
- function Pn(t) {
834
+ function Vn(t) {
727
835
  return "translate(0," + t + ")";
728
836
  }
729
- function Vn(t) {
837
+ function On(t) {
730
838
  return (e) => +t(e);
731
839
  }
732
840
  function zn(t, e) {
733
841
  return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
734
842
  }
735
- function In() {
843
+ function Wn() {
736
844
  return !this.__axis;
737
845
  }
738
- function Le(t, e) {
739
- var n = [], r = null, i = null, a = 6, o = 6, s = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t === Dt || t === ut ? -1 : 1, f = t === ut || t === Ht ? "x" : "y", m = t === Dt || t === It ? On : Pn;
740
- function l(d) {
741
- var M = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), F = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : qn), $ = Math.max(a, 0) + s, T = e.range(), b = +T[0] + c, N = +T[T.length - 1] + c, C = (e.bandwidth ? zn : Vn)(e.copy(), c), v = d.selection ? d.selection() : d, E = v.selectAll(".domain").data([null]), A = v.selectAll(".tick").data(M, e).order(), x = A.exit(), h = A.enter().append("g").attr("class", "tick"), _ = A.select("line"), g = A.select("text");
742
- E = E.merge(E.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), A = A.merge(h), _ = _.merge(h.append("line").attr("stroke", "currentColor").attr(f + "2", u * a)), g = g.merge(h.append("text").attr("fill", "currentColor").attr(f, u * $).attr("dy", t === Dt ? "0em" : t === It ? "0.71em" : "0.32em")), d !== v && (E = E.transition(d), A = A.transition(d), _ = _.transition(d), g = g.transition(d), x = x.transition(d).attr("opacity", fe).attr("transform", function(w) {
743
- return isFinite(w = C(w)) ? m(w + c) : this.getAttribute("transform");
744
- }), h.attr("opacity", fe).attr("transform", function(w) {
745
- var k = this.parentNode.__axis;
746
- return m((k && isFinite(k = k(w)) ? k : C(w)) + c);
747
- })), x.remove(), E.attr("d", t === ut || t === Ht ? o ? "M" + u * o + "," + b + "H" + c + "V" + N + "H" + u * o : "M" + c + "," + b + "V" + N : o ? "M" + b + "," + u * o + "V" + c + "H" + N + "V" + u * o : "M" + b + "," + c + "H" + N), A.attr("opacity", 1).attr("transform", function(w) {
748
- return m(C(w) + c);
749
- }), _.attr(f + "2", u * a), g.attr(f, u * $).text(F), v.filter(In).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Ht ? "start" : t === ut ? "end" : "middle"), v.each(function() {
846
+ function De(t, e) {
847
+ var n = [], r = null, i = null, a = 6, o = 6, s = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, u = t === Lt || t === ut ? -1 : 1, f = t === ut || t === Ht ? "x" : "y", d = t === Lt || t === Ot ? qn : Vn;
848
+ function l(h) {
849
+ var b = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), A = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : In), S = Math.max(a, 0) + s, R = e.range(), v = +R[0] + c, k = +R[R.length - 1] + c, C = (e.bandwidth ? zn : On)(e.copy(), c), M = h.selection ? h.selection() : h, F = M.selectAll(".domain").data([null]), E = M.selectAll(".tick").data(b, e).order(), x = E.exit(), m = E.enter().append("g").attr("class", "tick"), _ = E.select("line"), g = E.select("text");
850
+ F = F.merge(F.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), E = E.merge(m), _ = _.merge(m.append("line").attr("stroke", "currentColor").attr(f + "2", u * a)), g = g.merge(m.append("text").attr("fill", "currentColor").attr(f, u * S).attr("dy", t === Lt ? "0em" : t === Ot ? "0.71em" : "0.32em")), h !== M && (F = F.transition(h), E = E.transition(h), _ = _.transition(h), g = g.transition(h), x = x.transition(h).attr("opacity", fe).attr("transform", function(w) {
851
+ return isFinite(w = C(w)) ? d(w + c) : this.getAttribute("transform");
852
+ }), m.attr("opacity", fe).attr("transform", function(w) {
853
+ var N = this.parentNode.__axis;
854
+ return d((N && isFinite(N = N(w)) ? N : C(w)) + c);
855
+ })), x.remove(), F.attr("d", t === ut || t === Ht ? o ? "M" + u * o + "," + v + "H" + c + "V" + k + "H" + u * o : "M" + c + "," + v + "V" + k : o ? "M" + v + "," + u * o + "V" + c + "H" + k + "V" + u * o : "M" + v + "," + c + "H" + k), E.attr("opacity", 1).attr("transform", function(w) {
856
+ return d(C(w) + c);
857
+ }), _.attr(f + "2", u * a), g.attr(f, u * S).text(A), M.filter(Wn).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Ht ? "start" : t === ut ? "end" : "middle"), M.each(function() {
750
858
  this.__axis = C;
751
859
  });
752
860
  }
753
- return l.scale = function(d) {
754
- return arguments.length ? (e = d, l) : e;
861
+ return l.scale = function(h) {
862
+ return arguments.length ? (e = h, l) : e;
755
863
  }, l.ticks = function() {
756
864
  return n = Array.from(arguments), l;
757
- }, l.tickArguments = function(d) {
758
- return arguments.length ? (n = d == null ? [] : Array.from(d), l) : n.slice();
759
- }, l.tickValues = function(d) {
760
- return arguments.length ? (r = d == null ? null : Array.from(d), l) : r && r.slice();
761
- }, l.tickFormat = function(d) {
762
- return arguments.length ? (i = d, l) : i;
763
- }, l.tickSize = function(d) {
764
- return arguments.length ? (a = o = +d, l) : a;
765
- }, l.tickSizeInner = function(d) {
766
- return arguments.length ? (a = +d, l) : a;
767
- }, l.tickSizeOuter = function(d) {
768
- return arguments.length ? (o = +d, l) : o;
769
- }, l.tickPadding = function(d) {
770
- return arguments.length ? (s = +d, l) : s;
771
- }, l.offset = function(d) {
772
- return arguments.length ? (c = +d, l) : c;
865
+ }, l.tickArguments = function(h) {
866
+ return arguments.length ? (n = h == null ? [] : Array.from(h), l) : n.slice();
867
+ }, l.tickValues = function(h) {
868
+ return arguments.length ? (r = h == null ? null : Array.from(h), l) : r && r.slice();
869
+ }, l.tickFormat = function(h) {
870
+ return arguments.length ? (i = h, l) : i;
871
+ }, l.tickSize = function(h) {
872
+ return arguments.length ? (a = o = +h, l) : a;
873
+ }, l.tickSizeInner = function(h) {
874
+ return arguments.length ? (a = +h, l) : a;
875
+ }, l.tickSizeOuter = function(h) {
876
+ return arguments.length ? (o = +h, l) : o;
877
+ }, l.tickPadding = function(h) {
878
+ return arguments.length ? (s = +h, l) : s;
879
+ }, l.offset = function(h) {
880
+ return arguments.length ? (c = +h, l) : c;
773
881
  }, l;
774
882
  }
775
- function Pa(t) {
776
- return Le(It, t);
777
- }
778
883
  function Va(t) {
779
- return Le(ut, t);
884
+ return De(Ot, t);
885
+ }
886
+ function Oa(t) {
887
+ return De(ut, t);
780
888
  }
781
- var Wt = "http://www.w3.org/1999/xhtml";
889
+ var zt = "http://www.w3.org/1999/xhtml";
782
890
  const he = {
783
891
  svg: "http://www.w3.org/2000/svg",
784
- xhtml: Wt,
892
+ xhtml: zt,
785
893
  xlink: "http://www.w3.org/1999/xlink",
786
894
  xml: "http://www.w3.org/XML/1998/namespace",
787
895
  xmlns: "http://www.w3.org/2000/xmlns/"
788
896
  };
789
- function De(t) {
897
+ function Le(t) {
790
898
  var e = t += "", n = e.indexOf(":");
791
899
  return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), he.hasOwnProperty(e) ? { space: he[e], local: t } : t;
792
900
  }
793
- function Wn(t) {
901
+ function Yn(t) {
794
902
  return function() {
795
903
  var e = this.ownerDocument, n = this.namespaceURI;
796
- return n === Wt && e.documentElement.namespaceURI === Wt ? e.createElement(t) : e.createElementNS(n, t);
904
+ return n === zt && e.documentElement.namespaceURI === zt ? e.createElement(t) : e.createElementNS(n, t);
797
905
  };
798
906
  }
799
- function Un(t) {
907
+ function Bn(t) {
800
908
  return function() {
801
909
  return this.ownerDocument.createElementNS(t.space, t.local);
802
910
  };
803
911
  }
804
912
  function He(t) {
805
- var e = De(t);
806
- return (e.local ? Un : Wn)(e);
913
+ var e = Le(t);
914
+ return (e.local ? Bn : Yn)(e);
807
915
  }
808
- function Yn() {
916
+ function Xn() {
809
917
  }
810
- function qe(t) {
811
- return t == null ? Yn : function() {
918
+ function Pe(t) {
919
+ return t == null ? Xn : function() {
812
920
  return this.querySelector(t);
813
921
  };
814
922
  }
815
- function Xn(t) {
816
- typeof t != "function" && (t = qe(t));
923
+ function Gn(t) {
924
+ typeof t != "function" && (t = Pe(t));
817
925
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
818
926
  for (var a = e[i], o = a.length, s = r[i] = new Array(o), c, u, f = 0; f < o; ++f)
819
927
  (c = a[f]) && (u = t.call(c, c.__data__, f, a)) && ("__data__" in c && (u.__data__ = c.__data__), s[f] = u);
820
- return new I(r, this._parents);
928
+ return new O(r, this._parents);
821
929
  }
822
930
  function Qn(t) {
823
931
  return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
824
932
  }
825
- function Gn() {
933
+ function Kn() {
826
934
  return [];
827
935
  }
828
- function Bn(t) {
829
- return t == null ? Gn : function() {
936
+ function Jn(t) {
937
+ return t == null ? Kn : function() {
830
938
  return this.querySelectorAll(t);
831
939
  };
832
940
  }
833
- function Jn(t) {
941
+ function Zn(t) {
834
942
  return function() {
835
943
  return Qn(t.apply(this, arguments));
836
944
  };
837
945
  }
838
- function Zn(t) {
839
- typeof t == "function" ? t = Jn(t) : t = Bn(t);
946
+ function jn(t) {
947
+ typeof t == "function" ? t = Zn(t) : t = Jn(t);
840
948
  for (var e = this._groups, n = e.length, r = [], i = [], a = 0; a < n; ++a)
841
949
  for (var o = e[a], s = o.length, c, u = 0; u < s; ++u)
842
950
  (c = o[u]) && (r.push(t.call(c, c.__data__, u, o)), i.push(c));
843
- return new I(r, i);
951
+ return new O(r, i);
844
952
  }
845
- function Kn(t) {
953
+ function tr(t) {
846
954
  return function() {
847
955
  return this.matches(t);
848
956
  };
849
957
  }
850
- function Oe(t) {
958
+ function Ue(t) {
851
959
  return function(e) {
852
960
  return e.matches(t);
853
961
  };
854
962
  }
855
- var jn = Array.prototype.find;
856
- function tr(t) {
963
+ var er = Array.prototype.find;
964
+ function nr(t) {
857
965
  return function() {
858
- return jn.call(this.children, t);
966
+ return er.call(this.children, t);
859
967
  };
860
968
  }
861
- function er() {
969
+ function rr() {
862
970
  return this.firstElementChild;
863
971
  }
864
- function nr(t) {
865
- return this.select(t == null ? er : tr(typeof t == "function" ? t : Oe(t)));
972
+ function ir(t) {
973
+ return this.select(t == null ? rr : nr(typeof t == "function" ? t : Ue(t)));
866
974
  }
867
- var rr = Array.prototype.filter;
868
- function ir() {
975
+ var ar = Array.prototype.filter;
976
+ function or() {
869
977
  return Array.from(this.children);
870
978
  }
871
- function ar(t) {
979
+ function sr(t) {
872
980
  return function() {
873
- return rr.call(this.children, t);
981
+ return ar.call(this.children, t);
874
982
  };
875
983
  }
876
- function or(t) {
877
- return this.selectAll(t == null ? ir : ar(typeof t == "function" ? t : Oe(t)));
984
+ function cr(t) {
985
+ return this.selectAll(t == null ? or : sr(typeof t == "function" ? t : Ue(t)));
878
986
  }
879
- function sr(t) {
880
- typeof t != "function" && (t = Kn(t));
987
+ function ur(t) {
988
+ typeof t != "function" && (t = tr(t));
881
989
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
882
990
  for (var a = e[i], o = a.length, s = r[i] = [], c, u = 0; u < o; ++u)
883
991
  (c = a[u]) && t.call(c, c.__data__, u, a) && s.push(c);
884
- return new I(r, this._parents);
992
+ return new O(r, this._parents);
885
993
  }
886
- function Pe(t) {
994
+ function Ie(t) {
887
995
  return new Array(t.length);
888
996
  }
889
- function cr() {
890
- return new I(this._enter || this._groups.map(Pe), this._parents);
997
+ function lr() {
998
+ return new O(this._enter || this._groups.map(Ie), this._parents);
891
999
  }
892
- function kt(t, e) {
1000
+ function Nt(t, e) {
893
1001
  this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
894
1002
  }
895
- kt.prototype = {
896
- constructor: kt,
1003
+ Nt.prototype = {
1004
+ constructor: Nt,
897
1005
  appendChild: function(t) {
898
1006
  return this._parent.insertBefore(t, this._next);
899
1007
  },
@@ -907,91 +1015,91 @@ kt.prototype = {
907
1015
  return this._parent.querySelectorAll(t);
908
1016
  }
909
1017
  };
910
- function ur(t) {
1018
+ function fr(t) {
911
1019
  return function() {
912
1020
  return t;
913
1021
  };
914
1022
  }
915
- function lr(t, e, n, r, i, a) {
1023
+ function hr(t, e, n, r, i, a) {
916
1024
  for (var o = 0, s, c = e.length, u = a.length; o < u; ++o)
917
- (s = e[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new kt(t, a[o]);
1025
+ (s = e[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new Nt(t, a[o]);
918
1026
  for (; o < c; ++o)
919
1027
  (s = e[o]) && (i[o] = s);
920
1028
  }
921
- function fr(t, e, n, r, i, a, o) {
922
- var s, c, u = /* @__PURE__ */ new Map(), f = e.length, m = a.length, l = new Array(f), d;
1029
+ function dr(t, e, n, r, i, a, o) {
1030
+ var s, c, u = /* @__PURE__ */ new Map(), f = e.length, d = a.length, l = new Array(f), h;
923
1031
  for (s = 0; s < f; ++s)
924
- (c = e[s]) && (l[s] = d = o.call(c, c.__data__, s, e) + "", u.has(d) ? i[s] = c : u.set(d, c));
925
- for (s = 0; s < m; ++s)
926
- d = o.call(t, a[s], s, a) + "", (c = u.get(d)) ? (r[s] = c, c.__data__ = a[s], u.delete(d)) : n[s] = new kt(t, a[s]);
1032
+ (c = e[s]) && (l[s] = h = o.call(c, c.__data__, s, e) + "", u.has(h) ? i[s] = c : u.set(h, c));
1033
+ for (s = 0; s < d; ++s)
1034
+ h = o.call(t, a[s], s, a) + "", (c = u.get(h)) ? (r[s] = c, c.__data__ = a[s], u.delete(h)) : n[s] = new Nt(t, a[s]);
927
1035
  for (s = 0; s < f; ++s)
928
1036
  (c = e[s]) && u.get(l[s]) === c && (i[s] = c);
929
1037
  }
930
- function hr(t) {
1038
+ function mr(t) {
931
1039
  return t.__data__;
932
1040
  }
933
- function dr(t, e) {
934
- if (!arguments.length) return Array.from(this, hr);
935
- var n = e ? fr : lr, r = this._parents, i = this._groups;
936
- typeof t != "function" && (t = ur(t));
1041
+ function gr(t, e) {
1042
+ if (!arguments.length) return Array.from(this, mr);
1043
+ var n = e ? dr : hr, r = this._parents, i = this._groups;
1044
+ typeof t != "function" && (t = fr(t));
937
1045
  for (var a = i.length, o = new Array(a), s = new Array(a), c = new Array(a), u = 0; u < a; ++u) {
938
- var f = r[u], m = i[u], l = m.length, d = mr(t.call(f, f && f.__data__, u, r)), M = d.length, F = s[u] = new Array(M), $ = o[u] = new Array(M), T = c[u] = new Array(l);
939
- n(f, m, F, $, T, d, e);
940
- for (var b = 0, N = 0, C, v; b < M; ++b)
941
- if (C = F[b]) {
942
- for (b >= N && (N = b + 1); !(v = $[N]) && ++N < M; ) ;
943
- C._next = v || null;
1046
+ var f = r[u], d = i[u], l = d.length, h = yr(t.call(f, f && f.__data__, u, r)), b = h.length, A = s[u] = new Array(b), S = o[u] = new Array(b), R = c[u] = new Array(l);
1047
+ n(f, d, A, S, R, h, e);
1048
+ for (var v = 0, k = 0, C, M; v < b; ++v)
1049
+ if (C = A[v]) {
1050
+ for (v >= k && (k = v + 1); !(M = S[k]) && ++k < b; ) ;
1051
+ C._next = M || null;
944
1052
  }
945
1053
  }
946
- return o = new I(o, r), o._enter = s, o._exit = c, o;
1054
+ return o = new O(o, r), o._enter = s, o._exit = c, o;
947
1055
  }
948
- function mr(t) {
1056
+ function yr(t) {
949
1057
  return typeof t == "object" && "length" in t ? t : Array.from(t);
950
1058
  }
951
- function gr() {
952
- return new I(this._exit || this._groups.map(Pe), this._parents);
1059
+ function pr() {
1060
+ return new O(this._exit || this._groups.map(Ie), this._parents);
953
1061
  }
954
- function pr(t, e, n) {
1062
+ function xr(t, e, n) {
955
1063
  var r = this.enter(), i = this, a = this.exit();
956
1064
  return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
957
1065
  }
958
- function yr(t) {
1066
+ function wr(t) {
959
1067
  for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, a = r.length, o = Math.min(i, a), s = new Array(i), c = 0; c < o; ++c)
960
- for (var u = n[c], f = r[c], m = u.length, l = s[c] = new Array(m), d, M = 0; M < m; ++M)
961
- (d = u[M] || f[M]) && (l[M] = d);
1068
+ for (var u = n[c], f = r[c], d = u.length, l = s[c] = new Array(d), h, b = 0; b < d; ++b)
1069
+ (h = u[b] || f[b]) && (l[b] = h);
962
1070
  for (; c < i; ++c)
963
1071
  s[c] = n[c];
964
- return new I(s, this._parents);
1072
+ return new O(s, this._parents);
965
1073
  }
966
- function xr() {
1074
+ function br() {
967
1075
  for (var t = this._groups, e = -1, n = t.length; ++e < n; )
968
1076
  for (var r = t[e], i = r.length - 1, a = r[i], o; --i >= 0; )
969
1077
  (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
970
1078
  return this;
971
1079
  }
972
- function wr(t) {
973
- t || (t = br);
974
- function e(m, l) {
975
- return m && l ? t(m.__data__, l.__data__) : !m - !l;
1080
+ function vr(t) {
1081
+ t || (t = Mr);
1082
+ function e(d, l) {
1083
+ return d && l ? t(d.__data__, l.__data__) : !d - !l;
976
1084
  }
977
1085
  for (var n = this._groups, r = n.length, i = new Array(r), a = 0; a < r; ++a) {
978
1086
  for (var o = n[a], s = o.length, c = i[a] = new Array(s), u, f = 0; f < s; ++f)
979
1087
  (u = o[f]) && (c[f] = u);
980
1088
  c.sort(e);
981
1089
  }
982
- return new I(i, this._parents).order();
1090
+ return new O(i, this._parents).order();
983
1091
  }
984
- function br(t, e) {
1092
+ function Mr(t, e) {
985
1093
  return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
986
1094
  }
987
- function vr() {
1095
+ function _r() {
988
1096
  var t = arguments[0];
989
1097
  return arguments[0] = this, t.apply(null, arguments), this;
990
1098
  }
991
- function _r() {
1099
+ function Nr() {
992
1100
  return Array.from(this);
993
1101
  }
994
- function Mr() {
1102
+ function Sr() {
995
1103
  for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
996
1104
  for (var r = t[e], i = 0, a = r.length; i < a; ++i) {
997
1105
  var o = r[i];
@@ -1004,31 +1112,31 @@ function kr() {
1004
1112
  for (const e of this) ++t;
1005
1113
  return t;
1006
1114
  }
1007
- function Nr() {
1115
+ function $r() {
1008
1116
  return !this.node();
1009
1117
  }
1010
- function Sr(t) {
1118
+ function Ar(t) {
1011
1119
  for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
1012
1120
  for (var i = e[n], a = 0, o = i.length, s; a < o; ++a)
1013
1121
  (s = i[a]) && t.call(s, s.__data__, a, i);
1014
1122
  return this;
1015
1123
  }
1016
- function $r(t) {
1124
+ function Er(t) {
1017
1125
  return function() {
1018
1126
  this.removeAttribute(t);
1019
1127
  };
1020
1128
  }
1021
- function Ar(t) {
1129
+ function Cr(t) {
1022
1130
  return function() {
1023
1131
  this.removeAttributeNS(t.space, t.local);
1024
1132
  };
1025
1133
  }
1026
- function Cr(t, e) {
1134
+ function Fr(t, e) {
1027
1135
  return function() {
1028
1136
  this.setAttribute(t, e);
1029
1137
  };
1030
1138
  }
1031
- function Er(t, e) {
1139
+ function Rr(t, e) {
1032
1140
  return function() {
1033
1141
  this.setAttributeNS(t.space, t.local, e);
1034
1142
  };
@@ -1039,51 +1147,51 @@ function Tr(t, e) {
1039
1147
  n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
1040
1148
  };
1041
1149
  }
1042
- function Fr(t, e) {
1150
+ function Dr(t, e) {
1043
1151
  return function() {
1044
1152
  var n = e.apply(this, arguments);
1045
1153
  n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
1046
1154
  };
1047
1155
  }
1048
- function Rr(t, e) {
1049
- var n = De(t);
1156
+ function Lr(t, e) {
1157
+ var n = Le(t);
1050
1158
  if (arguments.length < 2) {
1051
1159
  var r = this.node();
1052
1160
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
1053
1161
  }
1054
- return this.each((e == null ? n.local ? Ar : $r : typeof e == "function" ? n.local ? Fr : Tr : n.local ? Er : Cr)(n, e));
1162
+ return this.each((e == null ? n.local ? Cr : Er : typeof e == "function" ? n.local ? Dr : Tr : n.local ? Rr : Fr)(n, e));
1055
1163
  }
1056
- function Ve(t) {
1164
+ function qe(t) {
1057
1165
  return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
1058
1166
  }
1059
- function Lr(t) {
1167
+ function Hr(t) {
1060
1168
  return function() {
1061
1169
  this.style.removeProperty(t);
1062
1170
  };
1063
1171
  }
1064
- function Dr(t, e, n) {
1172
+ function Pr(t, e, n) {
1065
1173
  return function() {
1066
1174
  this.style.setProperty(t, e, n);
1067
1175
  };
1068
1176
  }
1069
- function Hr(t, e, n) {
1177
+ function Ur(t, e, n) {
1070
1178
  return function() {
1071
1179
  var r = e.apply(this, arguments);
1072
1180
  r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
1073
1181
  };
1074
1182
  }
1075
- function qr(t, e, n) {
1076
- return arguments.length > 1 ? this.each((e == null ? Lr : typeof e == "function" ? Hr : Dr)(t, e, n ?? "")) : Or(this.node(), t);
1183
+ function Ir(t, e, n) {
1184
+ return arguments.length > 1 ? this.each((e == null ? Hr : typeof e == "function" ? Ur : Pr)(t, e, n ?? "")) : qr(this.node(), t);
1077
1185
  }
1078
- function Or(t, e) {
1079
- return t.style.getPropertyValue(e) || Ve(t).getComputedStyle(t, null).getPropertyValue(e);
1186
+ function qr(t, e) {
1187
+ return t.style.getPropertyValue(e) || qe(t).getComputedStyle(t, null).getPropertyValue(e);
1080
1188
  }
1081
- function Pr(t) {
1189
+ function Vr(t) {
1082
1190
  return function() {
1083
1191
  delete this[t];
1084
1192
  };
1085
1193
  }
1086
- function Vr(t, e) {
1194
+ function Or(t, e) {
1087
1195
  return function() {
1088
1196
  this[t] = e;
1089
1197
  };
@@ -1094,19 +1202,19 @@ function zr(t, e) {
1094
1202
  n == null ? delete this[t] : this[t] = n;
1095
1203
  };
1096
1204
  }
1097
- function Ir(t, e) {
1098
- return arguments.length > 1 ? this.each((e == null ? Pr : typeof e == "function" ? zr : Vr)(t, e)) : this.node()[t];
1205
+ function Wr(t, e) {
1206
+ return arguments.length > 1 ? this.each((e == null ? Vr : typeof e == "function" ? zr : Or)(t, e)) : this.node()[t];
1099
1207
  }
1100
- function ze(t) {
1208
+ function Ve(t) {
1101
1209
  return t.trim().split(/^|\s+/);
1102
1210
  }
1103
1211
  function Gt(t) {
1104
- return t.classList || new Ie(t);
1212
+ return t.classList || new Oe(t);
1105
1213
  }
1106
- function Ie(t) {
1107
- this._node = t, this._names = ze(t.getAttribute("class") || "");
1214
+ function Oe(t) {
1215
+ this._node = t, this._names = Ve(t.getAttribute("class") || "");
1108
1216
  }
1109
- Ie.prototype = {
1217
+ Oe.prototype = {
1110
1218
  add: function(t) {
1111
1219
  var e = this._names.indexOf(t);
1112
1220
  e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
@@ -1119,129 +1227,129 @@ Ie.prototype = {
1119
1227
  return this._names.indexOf(t) >= 0;
1120
1228
  }
1121
1229
  };
1122
- function We(t, e) {
1230
+ function ze(t, e) {
1123
1231
  for (var n = Gt(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
1124
1232
  }
1125
- function Ue(t, e) {
1233
+ function We(t, e) {
1126
1234
  for (var n = Gt(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
1127
1235
  }
1128
- function Wr(t) {
1236
+ function Yr(t) {
1129
1237
  return function() {
1130
- We(this, t);
1238
+ ze(this, t);
1131
1239
  };
1132
1240
  }
1133
- function Ur(t) {
1241
+ function Br(t) {
1134
1242
  return function() {
1135
- Ue(this, t);
1243
+ We(this, t);
1136
1244
  };
1137
1245
  }
1138
- function Yr(t, e) {
1246
+ function Xr(t, e) {
1139
1247
  return function() {
1140
- (e.apply(this, arguments) ? We : Ue)(this, t);
1248
+ (e.apply(this, arguments) ? ze : We)(this, t);
1141
1249
  };
1142
1250
  }
1143
- function Xr(t, e) {
1144
- var n = ze(t + "");
1251
+ function Gr(t, e) {
1252
+ var n = Ve(t + "");
1145
1253
  if (arguments.length < 2) {
1146
1254
  for (var r = Gt(this.node()), i = -1, a = n.length; ++i < a; ) if (!r.contains(n[i])) return !1;
1147
1255
  return !0;
1148
1256
  }
1149
- return this.each((typeof e == "function" ? Yr : e ? Wr : Ur)(n, e));
1257
+ return this.each((typeof e == "function" ? Xr : e ? Yr : Br)(n, e));
1150
1258
  }
1151
1259
  function Qr() {
1152
1260
  this.textContent = "";
1153
1261
  }
1154
- function Gr(t) {
1262
+ function Kr(t) {
1155
1263
  return function() {
1156
1264
  this.textContent = t;
1157
1265
  };
1158
1266
  }
1159
- function Br(t) {
1267
+ function Jr(t) {
1160
1268
  return function() {
1161
1269
  var e = t.apply(this, arguments);
1162
1270
  this.textContent = e ?? "";
1163
1271
  };
1164
1272
  }
1165
- function Jr(t) {
1166
- return arguments.length ? this.each(t == null ? Qr : (typeof t == "function" ? Br : Gr)(t)) : this.node().textContent;
1273
+ function Zr(t) {
1274
+ return arguments.length ? this.each(t == null ? Qr : (typeof t == "function" ? Jr : Kr)(t)) : this.node().textContent;
1167
1275
  }
1168
- function Zr() {
1276
+ function jr() {
1169
1277
  this.innerHTML = "";
1170
1278
  }
1171
- function Kr(t) {
1279
+ function ti(t) {
1172
1280
  return function() {
1173
1281
  this.innerHTML = t;
1174
1282
  };
1175
1283
  }
1176
- function jr(t) {
1284
+ function ei(t) {
1177
1285
  return function() {
1178
1286
  var e = t.apply(this, arguments);
1179
1287
  this.innerHTML = e ?? "";
1180
1288
  };
1181
1289
  }
1182
- function ti(t) {
1183
- return arguments.length ? this.each(t == null ? Zr : (typeof t == "function" ? jr : Kr)(t)) : this.node().innerHTML;
1290
+ function ni(t) {
1291
+ return arguments.length ? this.each(t == null ? jr : (typeof t == "function" ? ei : ti)(t)) : this.node().innerHTML;
1184
1292
  }
1185
- function ei() {
1293
+ function ri() {
1186
1294
  this.nextSibling && this.parentNode.appendChild(this);
1187
1295
  }
1188
- function ni() {
1189
- return this.each(ei);
1296
+ function ii() {
1297
+ return this.each(ri);
1190
1298
  }
1191
- function ri() {
1299
+ function ai() {
1192
1300
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
1193
1301
  }
1194
- function ii() {
1195
- return this.each(ri);
1302
+ function oi() {
1303
+ return this.each(ai);
1196
1304
  }
1197
- function ai(t) {
1305
+ function si(t) {
1198
1306
  var e = typeof t == "function" ? t : He(t);
1199
1307
  return this.select(function() {
1200
1308
  return this.appendChild(e.apply(this, arguments));
1201
1309
  });
1202
1310
  }
1203
- function oi() {
1311
+ function ci() {
1204
1312
  return null;
1205
1313
  }
1206
- function si(t, e) {
1207
- var n = typeof t == "function" ? t : He(t), r = e == null ? oi : typeof e == "function" ? e : qe(e);
1314
+ function ui(t, e) {
1315
+ var n = typeof t == "function" ? t : He(t), r = e == null ? ci : typeof e == "function" ? e : Pe(e);
1208
1316
  return this.select(function() {
1209
1317
  return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
1210
1318
  });
1211
1319
  }
1212
- function ci() {
1320
+ function li() {
1213
1321
  var t = this.parentNode;
1214
1322
  t && t.removeChild(this);
1215
1323
  }
1216
- function ui() {
1217
- return this.each(ci);
1324
+ function fi() {
1325
+ return this.each(li);
1218
1326
  }
1219
- function li() {
1327
+ function hi() {
1220
1328
  var t = this.cloneNode(!1), e = this.parentNode;
1221
1329
  return e ? e.insertBefore(t, this.nextSibling) : t;
1222
1330
  }
1223
- function fi() {
1331
+ function di() {
1224
1332
  var t = this.cloneNode(!0), e = this.parentNode;
1225
1333
  return e ? e.insertBefore(t, this.nextSibling) : t;
1226
1334
  }
1227
- function hi(t) {
1228
- return this.select(t ? fi : li);
1335
+ function mi(t) {
1336
+ return this.select(t ? di : hi);
1229
1337
  }
1230
- function di(t) {
1338
+ function gi(t) {
1231
1339
  return arguments.length ? this.property("__data__", t) : this.node().__data__;
1232
1340
  }
1233
- function mi(t) {
1341
+ function yi(t) {
1234
1342
  return function(e) {
1235
1343
  t.call(this, e, this.__data__);
1236
1344
  };
1237
1345
  }
1238
- function gi(t) {
1346
+ function pi(t) {
1239
1347
  return t.trim().split(/^|\s+/).map(function(e) {
1240
1348
  var n = "", r = e.indexOf(".");
1241
1349
  return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
1242
1350
  });
1243
1351
  }
1244
- function pi(t) {
1352
+ function xi(t) {
1245
1353
  return function() {
1246
1354
  var e = this.__on;
1247
1355
  if (e) {
@@ -1251,9 +1359,9 @@ function pi(t) {
1251
1359
  }
1252
1360
  };
1253
1361
  }
1254
- function yi(t, e, n) {
1362
+ function wi(t, e, n) {
1255
1363
  return function() {
1256
- var r = this.__on, i, a = mi(e);
1364
+ var r = this.__on, i, a = yi(e);
1257
1365
  if (r) {
1258
1366
  for (var o = 0, s = r.length; o < s; ++o)
1259
1367
  if ((i = r[o]).type === t.type && i.name === t.name) {
@@ -1264,8 +1372,8 @@ function yi(t, e, n) {
1264
1372
  this.addEventListener(t.type, a, n), i = { type: t.type, name: t.name, value: e, listener: a, options: n }, r ? r.push(i) : this.__on = [i];
1265
1373
  };
1266
1374
  }
1267
- function xi(t, e, n) {
1268
- var r = gi(t + ""), i, a = r.length, o;
1375
+ function bi(t, e, n) {
1376
+ var r = pi(t + ""), i, a = r.length, o;
1269
1377
  if (arguments.length < 2) {
1270
1378
  var s = this.node().__on;
1271
1379
  if (s) {
@@ -1276,90 +1384,90 @@ function xi(t, e, n) {
1276
1384
  }
1277
1385
  return;
1278
1386
  }
1279
- for (s = e ? yi : pi, i = 0; i < a; ++i) this.each(s(r[i], e, n));
1387
+ for (s = e ? wi : xi, i = 0; i < a; ++i) this.each(s(r[i], e, n));
1280
1388
  return this;
1281
1389
  }
1282
1390
  function Ye(t, e, n) {
1283
- var r = Ve(t), i = r.CustomEvent;
1391
+ var r = qe(t), i = r.CustomEvent;
1284
1392
  typeof i == "function" ? i = new i(e, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(e, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
1285
1393
  }
1286
- function wi(t, e) {
1394
+ function vi(t, e) {
1287
1395
  return function() {
1288
1396
  return Ye(this, t, e);
1289
1397
  };
1290
1398
  }
1291
- function bi(t, e) {
1399
+ function Mi(t, e) {
1292
1400
  return function() {
1293
1401
  return Ye(this, t, e.apply(this, arguments));
1294
1402
  };
1295
1403
  }
1296
- function vi(t, e) {
1297
- return this.each((typeof e == "function" ? bi : wi)(t, e));
1404
+ function _i(t, e) {
1405
+ return this.each((typeof e == "function" ? Mi : vi)(t, e));
1298
1406
  }
1299
- function* _i() {
1407
+ function* Ni() {
1300
1408
  for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
1301
1409
  for (var r = t[e], i = 0, a = r.length, o; i < a; ++i)
1302
1410
  (o = r[i]) && (yield o);
1303
1411
  }
1304
- var Mi = [null];
1305
- function I(t, e) {
1412
+ var Si = [null];
1413
+ function O(t, e) {
1306
1414
  this._groups = t, this._parents = e;
1307
1415
  }
1308
1416
  function ki() {
1309
1417
  return this;
1310
1418
  }
1311
- I.prototype = {
1312
- constructor: I,
1313
- select: Xn,
1314
- selectAll: Zn,
1315
- selectChild: nr,
1316
- selectChildren: or,
1317
- filter: sr,
1318
- data: dr,
1319
- enter: cr,
1320
- exit: gr,
1321
- join: pr,
1322
- merge: yr,
1419
+ O.prototype = {
1420
+ constructor: O,
1421
+ select: Gn,
1422
+ selectAll: jn,
1423
+ selectChild: ir,
1424
+ selectChildren: cr,
1425
+ filter: ur,
1426
+ data: gr,
1427
+ enter: lr,
1428
+ exit: pr,
1429
+ join: xr,
1430
+ merge: wr,
1323
1431
  selection: ki,
1324
- order: xr,
1325
- sort: wr,
1326
- call: vr,
1327
- nodes: _r,
1328
- node: Mr,
1432
+ order: br,
1433
+ sort: vr,
1434
+ call: _r,
1435
+ nodes: Nr,
1436
+ node: Sr,
1329
1437
  size: kr,
1330
- empty: Nr,
1331
- each: Sr,
1332
- attr: Rr,
1333
- style: qr,
1334
- property: Ir,
1335
- classed: Xr,
1336
- text: Jr,
1337
- html: ti,
1338
- raise: ni,
1339
- lower: ii,
1340
- append: ai,
1341
- insert: si,
1342
- remove: ui,
1343
- clone: hi,
1344
- datum: di,
1345
- on: xi,
1346
- dispatch: vi,
1347
- [Symbol.iterator]: _i
1438
+ empty: $r,
1439
+ each: Ar,
1440
+ attr: Lr,
1441
+ style: Ir,
1442
+ property: Wr,
1443
+ classed: Gr,
1444
+ text: Zr,
1445
+ html: ni,
1446
+ raise: ii,
1447
+ lower: oi,
1448
+ append: si,
1449
+ insert: ui,
1450
+ remove: fi,
1451
+ clone: mi,
1452
+ datum: gi,
1453
+ on: bi,
1454
+ dispatch: _i,
1455
+ [Symbol.iterator]: Ni
1348
1456
  };
1349
1457
  function ct(t) {
1350
- return typeof t == "string" ? new I([[document.querySelector(t)]], [document.documentElement]) : new I([[t]], Mi);
1458
+ return typeof t == "string" ? new O([[document.querySelector(t)]], [document.documentElement]) : new O([[t]], Si);
1351
1459
  }
1352
- function Bt(t, e, n) {
1460
+ function Qt(t, e, n) {
1353
1461
  t.prototype = e.prototype = n, n.constructor = t;
1354
1462
  }
1355
- function Xe(t, e) {
1463
+ function Be(t, e) {
1356
1464
  var n = Object.create(t.prototype);
1357
1465
  for (var r in e) n[r] = e[r];
1358
1466
  return n;
1359
1467
  }
1360
1468
  function dt() {
1361
1469
  }
1362
- var lt = 0.7, Nt = 1 / lt, it = "\\s*([+-]?\\d+)\\s*", ft = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Y = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ni = /^#([0-9a-f]{3,8})$/, Si = new RegExp(`^rgb\\(${it},${it},${it}\\)$`), $i = new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`), Ai = new RegExp(`^rgba\\(${it},${it},${it},${ft}\\)$`), Ci = new RegExp(`^rgba\\(${Y},${Y},${Y},${ft}\\)$`), Ei = new RegExp(`^hsl\\(${ft},${Y},${Y}\\)$`), Ti = new RegExp(`^hsla\\(${ft},${Y},${Y},${ft}\\)$`), de = {
1470
+ var lt = 0.7, St = 1 / lt, it = "\\s*([+-]?\\d+)\\s*", ft = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Y = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", $i = /^#([0-9a-f]{3,8})$/, Ai = new RegExp(`^rgb\\(${it},${it},${it}\\)$`), Ei = new RegExp(`^rgb\\(${Y},${Y},${Y}\\)$`), Ci = new RegExp(`^rgba\\(${it},${it},${it},${ft}\\)$`), Fi = new RegExp(`^rgba\\(${Y},${Y},${Y},${ft}\\)$`), Ri = new RegExp(`^hsl\\(${ft},${Y},${Y}\\)$`), Ti = new RegExp(`^hsla\\(${ft},${Y},${Y},${ft}\\)$`), de = {
1363
1471
  aliceblue: 15792383,
1364
1472
  antiquewhite: 16444375,
1365
1473
  aqua: 65535,
@@ -1509,7 +1617,7 @@ var lt = 0.7, Nt = 1 / lt, it = "\\s*([+-]?\\d+)\\s*", ft = "\\s*([+-]?(?:\\d*\\
1509
1617
  yellow: 16776960,
1510
1618
  yellowgreen: 10145074
1511
1619
  };
1512
- Bt(dt, ht, {
1620
+ Qt(dt, ht, {
1513
1621
  copy(t) {
1514
1622
  return Object.assign(new this.constructor(), this, t);
1515
1623
  },
@@ -1519,76 +1627,76 @@ Bt(dt, ht, {
1519
1627
  hex: me,
1520
1628
  // Deprecated! Use color.formatHex.
1521
1629
  formatHex: me,
1522
- formatHex8: Fi,
1523
- formatHsl: Ri,
1630
+ formatHex8: Di,
1631
+ formatHsl: Li,
1524
1632
  formatRgb: ge,
1525
1633
  toString: ge
1526
1634
  });
1527
1635
  function me() {
1528
1636
  return this.rgb().formatHex();
1529
1637
  }
1530
- function Fi() {
1638
+ function Di() {
1531
1639
  return this.rgb().formatHex8();
1532
1640
  }
1533
- function Ri() {
1534
- return Qe(this).formatHsl();
1641
+ function Li() {
1642
+ return Xe(this).formatHsl();
1535
1643
  }
1536
1644
  function ge() {
1537
1645
  return this.rgb().formatRgb();
1538
1646
  }
1539
1647
  function ht(t) {
1540
1648
  var e, n;
1541
- return t = (t + "").trim().toLowerCase(), (e = Ni.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? pe(e) : n === 3 ? new P(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? yt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? yt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = Si.exec(t)) ? new P(e[1], e[2], e[3], 1) : (e = $i.exec(t)) ? new P(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = Ai.exec(t)) ? yt(e[1], e[2], e[3], e[4]) : (e = Ci.exec(t)) ? yt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Ei.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, 1) : (e = Ti.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, e[4]) : de.hasOwnProperty(t) ? pe(de[t]) : t === "transparent" ? new P(NaN, NaN, NaN, 0) : null;
1649
+ return t = (t + "").trim().toLowerCase(), (e = $i.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? ye(e) : n === 3 ? new I(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? pt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? pt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = Ai.exec(t)) ? new I(e[1], e[2], e[3], 1) : (e = Ei.exec(t)) ? new I(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = Ci.exec(t)) ? pt(e[1], e[2], e[3], e[4]) : (e = Fi.exec(t)) ? pt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = Ri.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, 1) : (e = Ti.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, e[4]) : de.hasOwnProperty(t) ? ye(de[t]) : t === "transparent" ? new I(NaN, NaN, NaN, 0) : null;
1542
1650
  }
1543
- function pe(t) {
1544
- return new P(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
1651
+ function ye(t) {
1652
+ return new I(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
1545
1653
  }
1546
- function yt(t, e, n, r) {
1547
- return r <= 0 && (t = e = n = NaN), new P(t, e, n, r);
1654
+ function pt(t, e, n, r) {
1655
+ return r <= 0 && (t = e = n = NaN), new I(t, e, n, r);
1548
1656
  }
1549
- function Li(t) {
1550
- return t instanceof dt || (t = ht(t)), t ? (t = t.rgb(), new P(t.r, t.g, t.b, t.opacity)) : new P();
1657
+ function Hi(t) {
1658
+ return t instanceof dt || (t = ht(t)), t ? (t = t.rgb(), new I(t.r, t.g, t.b, t.opacity)) : new I();
1551
1659
  }
1552
- function Ut(t, e, n, r) {
1553
- return arguments.length === 1 ? Li(t) : new P(t, e, n, r ?? 1);
1660
+ function Wt(t, e, n, r) {
1661
+ return arguments.length === 1 ? Hi(t) : new I(t, e, n, r ?? 1);
1554
1662
  }
1555
- function P(t, e, n, r) {
1663
+ function I(t, e, n, r) {
1556
1664
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
1557
1665
  }
1558
- Bt(P, Ut, Xe(dt, {
1666
+ Qt(I, Wt, Be(dt, {
1559
1667
  brighter(t) {
1560
- return t = t == null ? Nt : Math.pow(Nt, t), new P(this.r * t, this.g * t, this.b * t, this.opacity);
1668
+ return t = t == null ? St : Math.pow(St, t), new I(this.r * t, this.g * t, this.b * t, this.opacity);
1561
1669
  },
1562
1670
  darker(t) {
1563
- return t = t == null ? lt : Math.pow(lt, t), new P(this.r * t, this.g * t, this.b * t, this.opacity);
1671
+ return t = t == null ? lt : Math.pow(lt, t), new I(this.r * t, this.g * t, this.b * t, this.opacity);
1564
1672
  },
1565
1673
  rgb() {
1566
1674
  return this;
1567
1675
  },
1568
1676
  clamp() {
1569
- return new P(et(this.r), et(this.g), et(this.b), St(this.opacity));
1677
+ return new I(et(this.r), et(this.g), et(this.b), kt(this.opacity));
1570
1678
  },
1571
1679
  displayable() {
1572
1680
  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;
1573
1681
  },
1574
- hex: ye,
1682
+ hex: pe,
1575
1683
  // Deprecated! Use color.formatHex.
1576
- formatHex: ye,
1577
- formatHex8: Di,
1684
+ formatHex: pe,
1685
+ formatHex8: Pi,
1578
1686
  formatRgb: xe,
1579
1687
  toString: xe
1580
1688
  }));
1581
- function ye() {
1689
+ function pe() {
1582
1690
  return `#${tt(this.r)}${tt(this.g)}${tt(this.b)}`;
1583
1691
  }
1584
- function Di() {
1692
+ function Pi() {
1585
1693
  return `#${tt(this.r)}${tt(this.g)}${tt(this.b)}${tt((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1586
1694
  }
1587
1695
  function xe() {
1588
- const t = St(this.opacity);
1696
+ const t = kt(this.opacity);
1589
1697
  return `${t === 1 ? "rgb(" : "rgba("}${et(this.r)}, ${et(this.g)}, ${et(this.b)}${t === 1 ? ")" : `, ${t})`}`;
1590
1698
  }
1591
- function St(t) {
1699
+ function kt(t) {
1592
1700
  return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
1593
1701
  }
1594
1702
  function et(t) {
@@ -1598,46 +1706,46 @@ function tt(t) {
1598
1706
  return t = et(t), (t < 16 ? "0" : "") + t.toString(16);
1599
1707
  }
1600
1708
  function we(t, e, n, r) {
1601
- return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new W(t, e, n, r);
1709
+ return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new z(t, e, n, r);
1602
1710
  }
1603
- function Qe(t) {
1604
- if (t instanceof W) return new W(t.h, t.s, t.l, t.opacity);
1605
- if (t instanceof dt || (t = ht(t)), !t) return new W();
1606
- if (t instanceof W) return t;
1711
+ function Xe(t) {
1712
+ if (t instanceof z) return new z(t.h, t.s, t.l, t.opacity);
1713
+ if (t instanceof dt || (t = ht(t)), !t) return new z();
1714
+ if (t instanceof z) return t;
1607
1715
  t = t.rgb();
1608
1716
  var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = NaN, s = a - i, c = (a + i) / 2;
1609
- return s ? (e === a ? o = (n - r) / s + (n < r) * 6 : n === a ? o = (r - e) / s + 2 : o = (e - n) / s + 4, s /= c < 0.5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new W(o, s, c, t.opacity);
1717
+ return s ? (e === a ? o = (n - r) / s + (n < r) * 6 : n === a ? o = (r - e) / s + 2 : o = (e - n) / s + 4, s /= c < 0.5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new z(o, s, c, t.opacity);
1610
1718
  }
1611
- function Hi(t, e, n, r) {
1612
- return arguments.length === 1 ? Qe(t) : new W(t, e, n, r ?? 1);
1719
+ function Ui(t, e, n, r) {
1720
+ return arguments.length === 1 ? Xe(t) : new z(t, e, n, r ?? 1);
1613
1721
  }
1614
- function W(t, e, n, r) {
1722
+ function z(t, e, n, r) {
1615
1723
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
1616
1724
  }
1617
- Bt(W, Hi, Xe(dt, {
1725
+ Qt(z, Ui, Be(dt, {
1618
1726
  brighter(t) {
1619
- return t = t == null ? Nt : Math.pow(Nt, t), new W(this.h, this.s, this.l * t, this.opacity);
1727
+ return t = t == null ? St : Math.pow(St, t), new z(this.h, this.s, this.l * t, this.opacity);
1620
1728
  },
1621
1729
  darker(t) {
1622
- return t = t == null ? lt : Math.pow(lt, t), new W(this.h, this.s, this.l * t, this.opacity);
1730
+ return t = t == null ? lt : Math.pow(lt, t), new z(this.h, this.s, this.l * t, this.opacity);
1623
1731
  },
1624
1732
  rgb() {
1625
1733
  var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
1626
- return new P(
1627
- qt(t >= 240 ? t - 240 : t + 120, i, r),
1628
- qt(t, i, r),
1629
- qt(t < 120 ? t + 240 : t - 120, i, r),
1734
+ return new I(
1735
+ Pt(t >= 240 ? t - 240 : t + 120, i, r),
1736
+ Pt(t, i, r),
1737
+ Pt(t < 120 ? t + 240 : t - 120, i, r),
1630
1738
  this.opacity
1631
1739
  );
1632
1740
  },
1633
1741
  clamp() {
1634
- return new W(be(this.h), xt(this.s), xt(this.l), St(this.opacity));
1742
+ return new z(be(this.h), xt(this.s), xt(this.l), kt(this.opacity));
1635
1743
  },
1636
1744
  displayable() {
1637
1745
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1638
1746
  },
1639
1747
  formatHsl() {
1640
- const t = St(this.opacity);
1748
+ const t = kt(this.opacity);
1641
1749
  return `${t === 1 ? "hsl(" : "hsla("}${be(this.h)}, ${xt(this.s) * 100}%, ${xt(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
1642
1750
  }
1643
1751
  }));
@@ -1647,40 +1755,40 @@ function be(t) {
1647
1755
  function xt(t) {
1648
1756
  return Math.max(0, Math.min(1, t || 0));
1649
1757
  }
1650
- function qt(t, e, n) {
1758
+ function Pt(t, e, n) {
1651
1759
  return (t < 60 ? e + (n - e) * t / 60 : t < 180 ? n : t < 240 ? e + (n - e) * (240 - t) / 60 : e) * 255;
1652
1760
  }
1653
- const Jt = (t) => () => t;
1654
- function qi(t, e) {
1761
+ const Kt = (t) => () => t;
1762
+ function Ii(t, e) {
1655
1763
  return function(n) {
1656
1764
  return t + n * e;
1657
1765
  };
1658
1766
  }
1659
- function Oi(t, e, n) {
1767
+ function qi(t, e, n) {
1660
1768
  return t = Math.pow(t, n), e = Math.pow(e, n) - t, n = 1 / n, function(r) {
1661
1769
  return Math.pow(t + r * e, n);
1662
1770
  };
1663
1771
  }
1664
- function Pi(t) {
1772
+ function Vi(t) {
1665
1773
  return (t = +t) == 1 ? Ge : function(e, n) {
1666
- return n - e ? Oi(e, n, t) : Jt(isNaN(e) ? n : e);
1774
+ return n - e ? qi(e, n, t) : Kt(isNaN(e) ? n : e);
1667
1775
  };
1668
1776
  }
1669
1777
  function Ge(t, e) {
1670
1778
  var n = e - t;
1671
- return n ? qi(t, n) : Jt(isNaN(t) ? e : t);
1779
+ return n ? Ii(t, n) : Kt(isNaN(t) ? e : t);
1672
1780
  }
1673
1781
  const ve = (function t(e) {
1674
- var n = Pi(e);
1782
+ var n = Vi(e);
1675
1783
  function r(i, a) {
1676
- var o = n((i = Ut(i)).r, (a = Ut(a)).r), s = n(i.g, a.g), c = n(i.b, a.b), u = Ge(i.opacity, a.opacity);
1784
+ var o = n((i = Wt(i)).r, (a = Wt(a)).r), s = n(i.g, a.g), c = n(i.b, a.b), u = Ge(i.opacity, a.opacity);
1677
1785
  return function(f) {
1678
1786
  return i.r = o(f), i.g = s(f), i.b = c(f), i.opacity = u(f), i + "";
1679
1787
  };
1680
1788
  }
1681
1789
  return r.gamma = t, r;
1682
1790
  })(1);
1683
- function Vi(t, e) {
1791
+ function Oi(t, e) {
1684
1792
  e || (e = []);
1685
1793
  var n = t ? Math.min(e.length, t.length) : 0, r = e.slice(), i;
1686
1794
  return function(a) {
@@ -1691,16 +1799,16 @@ function Vi(t, e) {
1691
1799
  function zi(t) {
1692
1800
  return ArrayBuffer.isView(t) && !(t instanceof DataView);
1693
1801
  }
1694
- function Ii(t, e) {
1802
+ function Wi(t, e) {
1695
1803
  var n = e ? e.length : 0, r = t ? Math.min(n, t.length) : 0, i = new Array(r), a = new Array(n), o;
1696
- for (o = 0; o < r; ++o) i[o] = Zt(t[o], e[o]);
1804
+ for (o = 0; o < r; ++o) i[o] = Jt(t[o], e[o]);
1697
1805
  for (; o < n; ++o) a[o] = e[o];
1698
1806
  return function(s) {
1699
1807
  for (o = 0; o < r; ++o) a[o] = i[o](s);
1700
1808
  return a;
1701
1809
  };
1702
1810
  }
1703
- function Wi(t, e) {
1811
+ function Yi(t, e) {
1704
1812
  var n = /* @__PURE__ */ new Date();
1705
1813
  return t = +t, e = +e, function(r) {
1706
1814
  return n.setTime(t * (1 - r) + e * r), n;
@@ -1711,46 +1819,46 @@ function $t(t, e) {
1711
1819
  return t * (1 - n) + e * n;
1712
1820
  };
1713
1821
  }
1714
- function Ui(t, e) {
1822
+ function Bi(t, e) {
1715
1823
  var n = {}, r = {}, i;
1716
1824
  (t === null || typeof t != "object") && (t = {}), (e === null || typeof e != "object") && (e = {});
1717
1825
  for (i in e)
1718
- i in t ? n[i] = Zt(t[i], e[i]) : r[i] = e[i];
1826
+ i in t ? n[i] = Jt(t[i], e[i]) : r[i] = e[i];
1719
1827
  return function(a) {
1720
1828
  for (i in n) r[i] = n[i](a);
1721
1829
  return r;
1722
1830
  };
1723
1831
  }
1724
- var Yt = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ot = new RegExp(Yt.source, "g");
1725
- function Yi(t) {
1832
+ var Yt = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ut = new RegExp(Yt.source, "g");
1833
+ function Xi(t) {
1726
1834
  return function() {
1727
1835
  return t;
1728
1836
  };
1729
1837
  }
1730
- function Xi(t) {
1838
+ function Gi(t) {
1731
1839
  return function(e) {
1732
1840
  return t(e) + "";
1733
1841
  };
1734
1842
  }
1735
1843
  function Qi(t, e) {
1736
- var n = Yt.lastIndex = Ot.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
1737
- for (t = t + "", e = e + ""; (r = Yt.exec(t)) && (i = Ot.exec(e)); )
1738
- (a = i.index) > n && (a = e.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({ i: o, x: $t(r, i) })), n = Ot.lastIndex;
1739
- return n < e.length && (a = e.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? Xi(c[0].x) : Yi(e) : (e = c.length, function(u) {
1740
- for (var f = 0, m; f < e; ++f) s[(m = c[f]).i] = m.x(u);
1844
+ var n = Yt.lastIndex = Ut.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
1845
+ for (t = t + "", e = e + ""; (r = Yt.exec(t)) && (i = Ut.exec(e)); )
1846
+ (a = i.index) > n && (a = e.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({ i: o, x: $t(r, i) })), n = Ut.lastIndex;
1847
+ return n < e.length && (a = e.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? Gi(c[0].x) : Xi(e) : (e = c.length, function(u) {
1848
+ for (var f = 0, d; f < e; ++f) s[(d = c[f]).i] = d.x(u);
1741
1849
  return s.join("");
1742
1850
  });
1743
1851
  }
1744
- function Zt(t, e) {
1852
+ function Jt(t, e) {
1745
1853
  var n = typeof e, r;
1746
- return e == null || n === "boolean" ? Jt(e) : (n === "number" ? $t : n === "string" ? (r = ht(e)) ? (e = r, ve) : Qi : e instanceof ht ? ve : e instanceof Date ? Wi : zi(e) ? Vi : Array.isArray(e) ? Ii : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? Ui : $t)(t, e);
1854
+ return e == null || n === "boolean" ? Kt(e) : (n === "number" ? $t : n === "string" ? (r = ht(e)) ? (e = r, ve) : Qi : e instanceof ht ? ve : e instanceof Date ? Yi : zi(e) ? Oi : Array.isArray(e) ? Wi : typeof e.valueOf != "function" && typeof e.toString != "function" || isNaN(e) ? Bi : $t)(t, e);
1747
1855
  }
1748
- function Gi(t, e) {
1856
+ function Ki(t, e) {
1749
1857
  return t = +t, e = +e, function(n) {
1750
1858
  return Math.round(t * (1 - n) + e * n);
1751
1859
  };
1752
1860
  }
1753
- function Bi(t) {
1861
+ function Ji(t) {
1754
1862
  return Math.abs(t = Math.round(t)) >= 1e21 ? t.toLocaleString("en").replace(/,/g, "") : t.toString(10);
1755
1863
  }
1756
1864
  function At(t, e) {
@@ -1764,25 +1872,25 @@ function At(t, e) {
1764
1872
  function at(t) {
1765
1873
  return t = At(Math.abs(t)), t ? t[1] : NaN;
1766
1874
  }
1767
- function Ji(t, e) {
1875
+ function Zi(t, e) {
1768
1876
  return function(n, r) {
1769
1877
  for (var i = n.length, a = [], o = 0, s = t[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r)); )
1770
1878
  s = t[o = (o + 1) % t.length];
1771
1879
  return a.reverse().join(e);
1772
1880
  };
1773
1881
  }
1774
- function Zi(t) {
1882
+ function ji(t) {
1775
1883
  return function(e) {
1776
1884
  return e.replace(/[0-9]/g, function(n) {
1777
1885
  return t[+n];
1778
1886
  });
1779
1887
  };
1780
1888
  }
1781
- var Ki = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1782
- function Ct(t) {
1783
- if (!(e = Ki.exec(t))) throw new Error("invalid format: " + t);
1889
+ var ta = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1890
+ function Et(t) {
1891
+ if (!(e = ta.exec(t))) throw new Error("invalid format: " + t);
1784
1892
  var e;
1785
- return new Kt({
1893
+ return new Zt({
1786
1894
  fill: e[1],
1787
1895
  align: e[2],
1788
1896
  sign: e[3],
@@ -1795,14 +1903,14 @@ function Ct(t) {
1795
1903
  type: e[10]
1796
1904
  });
1797
1905
  }
1798
- Ct.prototype = Kt.prototype;
1799
- function Kt(t) {
1906
+ Et.prototype = Zt.prototype;
1907
+ function Zt(t) {
1800
1908
  this.fill = t.fill === void 0 ? " " : t.fill + "", this.align = t.align === void 0 ? ">" : t.align + "", this.sign = t.sign === void 0 ? "-" : t.sign + "", this.symbol = t.symbol === void 0 ? "" : t.symbol + "", this.zero = !!t.zero, this.width = t.width === void 0 ? void 0 : +t.width, this.comma = !!t.comma, this.precision = t.precision === void 0 ? void 0 : +t.precision, this.trim = !!t.trim, this.type = t.type === void 0 ? "" : t.type + "";
1801
1909
  }
1802
- Kt.prototype.toString = function() {
1910
+ Zt.prototype.toString = function() {
1803
1911
  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;
1804
1912
  };
1805
- function ji(t) {
1913
+ function ea(t) {
1806
1914
  t: for (var e = t.length, n = 1, r = -1, i; n < e; ++n)
1807
1915
  switch (t[n]) {
1808
1916
  case ".":
@@ -1818,87 +1926,87 @@ function ji(t) {
1818
1926
  }
1819
1927
  return r > 0 ? t.slice(0, r) + t.slice(i + 1) : t;
1820
1928
  }
1821
- var Be;
1822
- function ta(t, e) {
1929
+ var Qe;
1930
+ function na(t, e) {
1823
1931
  var n = At(t, e);
1824
1932
  if (!n) return t + "";
1825
- var r = n[0], i = n[1], a = i - (Be = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
1933
+ var r = n[0], i = n[1], a = i - (Qe = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
1826
1934
  return a === o ? r : a > o ? r + new Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + At(t, Math.max(0, e + a - 1))[0];
1827
1935
  }
1828
- function _e(t, e) {
1936
+ function Me(t, e) {
1829
1937
  var n = At(t, e);
1830
1938
  if (!n) return t + "";
1831
1939
  var r = n[0], i = n[1];
1832
1940
  return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
1833
1941
  }
1834
- const Me = {
1942
+ const _e = {
1835
1943
  "%": (t, e) => (t * 100).toFixed(e),
1836
1944
  b: (t) => Math.round(t).toString(2),
1837
1945
  c: (t) => t + "",
1838
- d: Bi,
1946
+ d: Ji,
1839
1947
  e: (t, e) => t.toExponential(e),
1840
1948
  f: (t, e) => t.toFixed(e),
1841
1949
  g: (t, e) => t.toPrecision(e),
1842
1950
  o: (t) => Math.round(t).toString(8),
1843
- p: (t, e) => _e(t * 100, e),
1844
- r: _e,
1845
- s: ta,
1951
+ p: (t, e) => Me(t * 100, e),
1952
+ r: Me,
1953
+ s: na,
1846
1954
  X: (t) => Math.round(t).toString(16).toUpperCase(),
1847
1955
  x: (t) => Math.round(t).toString(16)
1848
1956
  };
1849
- function ke(t) {
1957
+ function Ne(t) {
1850
1958
  return t;
1851
1959
  }
1852
- var Ne = Array.prototype.map, Se = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1853
- function ea(t) {
1854
- var e = t.grouping === void 0 || t.thousands === void 0 ? ke : Ji(Ne.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? ke : Zi(Ne.call(t.numerals, String)), o = t.percent === void 0 ? "%" : t.percent + "", s = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
1855
- function u(m) {
1856
- m = Ct(m);
1857
- var l = m.fill, d = m.align, M = m.sign, F = m.symbol, $ = m.zero, T = m.width, b = m.comma, N = m.precision, C = m.trim, v = m.type;
1858
- v === "n" ? (b = !0, v = "g") : Me[v] || (N === void 0 && (N = 12), C = !0, v = "g"), ($ || l === "0" && d === "=") && ($ = !0, l = "0", d = "=");
1859
- var E = F === "$" ? n : F === "#" && /[boxX]/.test(v) ? "0" + v.toLowerCase() : "", A = F === "$" ? r : /[%p]/.test(v) ? o : "", x = Me[v], h = /[defgprs%]/.test(v);
1860
- N = N === void 0 ? 6 : /[gprs]/.test(v) ? Math.max(1, Math.min(21, N)) : Math.max(0, Math.min(20, N));
1960
+ var Se = Array.prototype.map, ke = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1961
+ function ra(t) {
1962
+ var e = t.grouping === void 0 || t.thousands === void 0 ? Ne : Zi(Se.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? Ne : ji(Se.call(t.numerals, String)), o = t.percent === void 0 ? "%" : t.percent + "", s = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
1963
+ function u(d) {
1964
+ d = Et(d);
1965
+ var l = d.fill, h = d.align, b = d.sign, A = d.symbol, S = d.zero, R = d.width, v = d.comma, k = d.precision, C = d.trim, M = d.type;
1966
+ M === "n" ? (v = !0, M = "g") : _e[M] || (k === void 0 && (k = 12), C = !0, M = "g"), (S || l === "0" && h === "=") && (S = !0, l = "0", h = "=");
1967
+ var F = A === "$" ? n : A === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : "", E = A === "$" ? r : /[%p]/.test(M) ? o : "", x = _e[M], m = /[defgprs%]/.test(M);
1968
+ k = k === void 0 ? 6 : /[gprs]/.test(M) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
1861
1969
  function _(g) {
1862
- var w = E, k = A, R, V, ot;
1863
- if (v === "c")
1864
- k = x(g) + k, g = "";
1970
+ var w = F, N = E, T, q, ot;
1971
+ if (M === "c")
1972
+ N = x(g) + N, g = "";
1865
1973
  else {
1866
1974
  g = +g;
1867
- var D = g < 0 || 1 / g < 0;
1868
- if (g = isNaN(g) ? c : x(Math.abs(g), N), C && (g = ji(g)), D && +g == 0 && M !== "+" && (D = !1), w = (D ? M === "(" ? M : s : M === "-" || M === "(" ? "" : M) + w, k = (v === "s" ? Se[8 + Be / 3] : "") + k + (D && M === "(" ? ")" : ""), h) {
1869
- for (R = -1, V = g.length; ++R < V; )
1870
- if (ot = g.charCodeAt(R), 48 > ot || ot > 57) {
1871
- k = (ot === 46 ? i + g.slice(R + 1) : g.slice(R)) + k, g = g.slice(0, R);
1975
+ var L = g < 0 || 1 / g < 0;
1976
+ if (g = isNaN(g) ? c : x(Math.abs(g), k), C && (g = ea(g)), L && +g == 0 && b !== "+" && (L = !1), w = (L ? b === "(" ? b : s : b === "-" || b === "(" ? "" : b) + w, N = (M === "s" ? ke[8 + Qe / 3] : "") + N + (L && b === "(" ? ")" : ""), m) {
1977
+ for (T = -1, q = g.length; ++T < q; )
1978
+ if (ot = g.charCodeAt(T), 48 > ot || ot > 57) {
1979
+ N = (ot === 46 ? i + g.slice(T + 1) : g.slice(T)) + N, g = g.slice(0, T);
1872
1980
  break;
1873
1981
  }
1874
1982
  }
1875
1983
  }
1876
- b && !$ && (g = e(g, 1 / 0));
1877
- var J = w.length + g.length + k.length, z = J < T ? new Array(T - J + 1).join(l) : "";
1878
- switch (b && $ && (g = e(z + g, z.length ? T - k.length : 1 / 0), z = ""), d) {
1984
+ v && !S && (g = e(g, 1 / 0));
1985
+ var K = w.length + g.length + N.length, V = K < R ? new Array(R - K + 1).join(l) : "";
1986
+ switch (v && S && (g = e(V + g, V.length ? R - N.length : 1 / 0), V = ""), h) {
1879
1987
  case "<":
1880
- g = w + g + k + z;
1988
+ g = w + g + N + V;
1881
1989
  break;
1882
1990
  case "=":
1883
- g = w + z + g + k;
1991
+ g = w + V + g + N;
1884
1992
  break;
1885
1993
  case "^":
1886
- g = z.slice(0, J = z.length >> 1) + w + g + k + z.slice(J);
1994
+ g = V.slice(0, K = V.length >> 1) + w + g + N + V.slice(K);
1887
1995
  break;
1888
1996
  default:
1889
- g = z + w + g + k;
1997
+ g = V + w + g + N;
1890
1998
  break;
1891
1999
  }
1892
2000
  return a(g);
1893
2001
  }
1894
2002
  return _.toString = function() {
1895
- return m + "";
2003
+ return d + "";
1896
2004
  }, _;
1897
2005
  }
1898
- function f(m, l) {
1899
- var d = u((m = Ct(m), m.type = "f", m)), M = Math.max(-8, Math.min(8, Math.floor(at(l) / 3))) * 3, F = Math.pow(10, -M), $ = Se[8 + M / 3];
1900
- return function(T) {
1901
- return d(F * T) + $;
2006
+ function f(d, l) {
2007
+ var h = u((d = Et(d), d.type = "f", d)), b = Math.max(-8, Math.min(8, Math.floor(at(l) / 3))) * 3, A = Math.pow(10, -b), S = ke[8 + b / 3];
2008
+ return function(R) {
2009
+ return h(A * R) + S;
1902
2010
  };
1903
2011
  }
1904
2012
  return {
@@ -1906,25 +2014,25 @@ function ea(t) {
1906
2014
  formatPrefix: f
1907
2015
  };
1908
2016
  }
1909
- var wt, Je, Ze;
1910
- na({
2017
+ var wt, Ke, Je;
2018
+ ia({
1911
2019
  thousands: ",",
1912
2020
  grouping: [3],
1913
2021
  currency: ["$", ""]
1914
2022
  });
1915
- function na(t) {
1916
- return wt = ea(t), Je = wt.format, Ze = wt.formatPrefix, wt;
2023
+ function ia(t) {
2024
+ return wt = ra(t), Ke = wt.format, Je = wt.formatPrefix, wt;
1917
2025
  }
1918
- function ra(t) {
2026
+ function aa(t) {
1919
2027
  return Math.max(0, -at(Math.abs(t)));
1920
2028
  }
1921
- function ia(t, e) {
2029
+ function oa(t, e) {
1922
2030
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(at(e) / 3))) * 3 - at(Math.abs(t)));
1923
2031
  }
1924
- function aa(t, e) {
2032
+ function sa(t, e) {
1925
2033
  return t = Math.abs(t), e = Math.abs(e) - t, Math.max(0, at(e) - at(t)) + 1;
1926
2034
  }
1927
- function Et(t, e) {
2035
+ function Ct(t, e) {
1928
2036
  switch (arguments.length) {
1929
2037
  case 0:
1930
2038
  break;
@@ -1938,7 +2046,7 @@ function Et(t, e) {
1938
2046
  return this;
1939
2047
  }
1940
2048
  const $e = /* @__PURE__ */ Symbol("implicit");
1941
- function oa() {
2049
+ function ca() {
1942
2050
  var t = new se(), e = [], n = [], r = $e;
1943
2051
  function i(a) {
1944
2052
  let o = t.get(a);
@@ -1959,116 +2067,116 @@ function oa() {
1959
2067
  }, i.unknown = function(a) {
1960
2068
  return arguments.length ? (r = a, i) : r;
1961
2069
  }, i.copy = function() {
1962
- return oa(e, n).unknown(r);
1963
- }, Et.apply(i, arguments), i;
2070
+ return ca(e, n).unknown(r);
2071
+ }, Ct.apply(i, arguments), i;
1964
2072
  }
1965
- function sa(t) {
2073
+ function ua(t) {
1966
2074
  return function() {
1967
2075
  return t;
1968
2076
  };
1969
2077
  }
1970
- function ca(t) {
2078
+ function la(t) {
1971
2079
  return +t;
1972
2080
  }
1973
2081
  var Ae = [0, 1];
1974
- function U(t) {
2082
+ function W(t) {
1975
2083
  return t;
1976
2084
  }
1977
- function Xt(t, e) {
2085
+ function Bt(t, e) {
1978
2086
  return (e -= t = +t) ? function(n) {
1979
2087
  return (n - t) / e;
1980
- } : sa(isNaN(e) ? NaN : 0.5);
2088
+ } : ua(isNaN(e) ? NaN : 0.5);
1981
2089
  }
1982
- function ua(t, e) {
2090
+ function fa(t, e) {
1983
2091
  var n;
1984
2092
  return t > e && (n = t, t = e, e = n), function(r) {
1985
2093
  return Math.max(t, Math.min(e, r));
1986
2094
  };
1987
2095
  }
1988
- function la(t, e, n) {
2096
+ function ha(t, e, n) {
1989
2097
  var r = t[0], i = t[1], a = e[0], o = e[1];
1990
- return i < r ? (r = Xt(i, r), a = n(o, a)) : (r = Xt(r, i), a = n(a, o)), function(s) {
2098
+ return i < r ? (r = Bt(i, r), a = n(o, a)) : (r = Bt(r, i), a = n(a, o)), function(s) {
1991
2099
  return a(r(s));
1992
2100
  };
1993
2101
  }
1994
- function fa(t, e, n) {
2102
+ function da(t, e, n) {
1995
2103
  var r = Math.min(t.length, e.length) - 1, i = new Array(r), a = new Array(r), o = -1;
1996
2104
  for (t[r] < t[0] && (t = t.slice().reverse(), e = e.slice().reverse()); ++o < r; )
1997
- i[o] = Xt(t[o], t[o + 1]), a[o] = n(e[o], e[o + 1]);
2105
+ i[o] = Bt(t[o], t[o + 1]), a[o] = n(e[o], e[o + 1]);
1998
2106
  return function(s) {
1999
- var c = Re(t, s, 1, r) - 1;
2107
+ var c = Te(t, s, 1, r) - 1;
2000
2108
  return a[c](i[c](s));
2001
2109
  };
2002
2110
  }
2003
- function Ke(t, e) {
2111
+ function Ze(t, e) {
2004
2112
  return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());
2005
2113
  }
2006
2114
  function je() {
2007
- var t = Ae, e = Ae, n = Zt, r, i, a, o = U, s, c, u;
2115
+ var t = Ae, e = Ae, n = Jt, r, i, a, o = W, s, c, u;
2008
2116
  function f() {
2009
2117
  var l = Math.min(t.length, e.length);
2010
- return o !== U && (o = ua(t[0], t[l - 1])), s = l > 2 ? fa : la, c = u = null, m;
2118
+ return o !== W && (o = fa(t[0], t[l - 1])), s = l > 2 ? da : ha, c = u = null, d;
2011
2119
  }
2012
- function m(l) {
2120
+ function d(l) {
2013
2121
  return l == null || isNaN(l = +l) ? a : (c || (c = s(t.map(r), e, n)))(r(o(l)));
2014
2122
  }
2015
- return m.invert = function(l) {
2123
+ return d.invert = function(l) {
2016
2124
  return o(i((u || (u = s(e, t.map(r), $t)))(l)));
2017
- }, m.domain = function(l) {
2018
- return arguments.length ? (t = Array.from(l, ca), f()) : t.slice();
2019
- }, m.range = function(l) {
2125
+ }, d.domain = function(l) {
2126
+ return arguments.length ? (t = Array.from(l, la), f()) : t.slice();
2127
+ }, d.range = function(l) {
2020
2128
  return arguments.length ? (e = Array.from(l), f()) : e.slice();
2021
- }, m.rangeRound = function(l) {
2022
- return e = Array.from(l), n = Gi, f();
2023
- }, m.clamp = function(l) {
2024
- return arguments.length ? (o = l ? !0 : U, f()) : o !== U;
2025
- }, m.interpolate = function(l) {
2129
+ }, d.rangeRound = function(l) {
2130
+ return e = Array.from(l), n = Ki, f();
2131
+ }, d.clamp = function(l) {
2132
+ return arguments.length ? (o = l ? !0 : W, f()) : o !== W;
2133
+ }, d.interpolate = function(l) {
2026
2134
  return arguments.length ? (n = l, f()) : n;
2027
- }, m.unknown = function(l) {
2028
- return arguments.length ? (a = l, m) : a;
2029
- }, function(l, d) {
2030
- return r = l, i = d, f();
2135
+ }, d.unknown = function(l) {
2136
+ return arguments.length ? (a = l, d) : a;
2137
+ }, function(l, h) {
2138
+ return r = l, i = h, f();
2031
2139
  };
2032
2140
  }
2033
- function ha() {
2034
- return je()(U, U);
2141
+ function ma() {
2142
+ return je()(W, W);
2035
2143
  }
2036
- function da(t, e, n, r) {
2037
- var i = Hn(t, e, n), a;
2038
- switch (r = Ct(r ?? ",f"), r.type) {
2144
+ function ga(t, e, n, r) {
2145
+ var i = Un(t, e, n), a;
2146
+ switch (r = Et(r ?? ",f"), r.type) {
2039
2147
  case "s": {
2040
2148
  var o = Math.max(Math.abs(t), Math.abs(e));
2041
- return r.precision == null && !isNaN(a = ia(i, o)) && (r.precision = a), Ze(r, o);
2149
+ return r.precision == null && !isNaN(a = oa(i, o)) && (r.precision = a), Je(r, o);
2042
2150
  }
2043
2151
  case "":
2044
2152
  case "e":
2045
2153
  case "g":
2046
2154
  case "p":
2047
2155
  case "r": {
2048
- r.precision == null && !isNaN(a = aa(i, Math.max(Math.abs(t), Math.abs(e)))) && (r.precision = a - (r.type === "e"));
2156
+ r.precision == null && !isNaN(a = sa(i, Math.max(Math.abs(t), Math.abs(e)))) && (r.precision = a - (r.type === "e"));
2049
2157
  break;
2050
2158
  }
2051
2159
  case "f":
2052
2160
  case "%": {
2053
- r.precision == null && !isNaN(a = ra(i)) && (r.precision = a - (r.type === "%") * 2);
2161
+ r.precision == null && !isNaN(a = aa(i)) && (r.precision = a - (r.type === "%") * 2);
2054
2162
  break;
2055
2163
  }
2056
2164
  }
2057
- return Je(r);
2165
+ return Ke(r);
2058
2166
  }
2059
2167
  function jt(t) {
2060
2168
  var e = t.domain;
2061
2169
  return t.ticks = function(n) {
2062
2170
  var r = e();
2063
- return Dn(r[0], r[r.length - 1], n ?? 10);
2171
+ return Pn(r[0], r[r.length - 1], n ?? 10);
2064
2172
  }, t.tickFormat = function(n, r) {
2065
2173
  var i = e();
2066
- return da(i[0], i[i.length - 1], n ?? 10, r);
2174
+ return ga(i[0], i[i.length - 1], n ?? 10, r);
2067
2175
  }, t.nice = function(n) {
2068
2176
  n == null && (n = 10);
2069
2177
  var r = e(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, u, f = 10;
2070
2178
  for (s < o && (u = o, o = s, s = u, u = i, i = a, a = u); f-- > 0; ) {
2071
- if (u = zt(o, s, n), u === c)
2179
+ if (u = Vt(o, s, n), u === c)
2072
2180
  return r[i] = o, r[a] = s, e(r);
2073
2181
  if (u > 0)
2074
2182
  o = Math.floor(o / u) * u, s = Math.ceil(s / u) * u;
@@ -2081,37 +2189,37 @@ function jt(t) {
2081
2189
  return t;
2082
2190
  }, t;
2083
2191
  }
2084
- function ma() {
2085
- var t = ha();
2192
+ function ya() {
2193
+ var t = ma();
2086
2194
  return t.copy = function() {
2087
- return Ke(t, ma());
2088
- }, Et.apply(t, arguments), jt(t);
2195
+ return Ze(t, ya());
2196
+ }, Ct.apply(t, arguments), jt(t);
2089
2197
  }
2090
- function Ce(t) {
2198
+ function Ee(t) {
2091
2199
  return function(e) {
2092
2200
  return e < 0 ? -Math.pow(-e, t) : Math.pow(e, t);
2093
2201
  };
2094
2202
  }
2095
- function ga(t) {
2203
+ function pa(t) {
2096
2204
  return t < 0 ? -Math.sqrt(-t) : Math.sqrt(t);
2097
2205
  }
2098
- function pa(t) {
2206
+ function xa(t) {
2099
2207
  return t < 0 ? -t * t : t * t;
2100
2208
  }
2101
- function ya(t) {
2102
- var e = t(U, U), n = 1;
2209
+ function wa(t) {
2210
+ var e = t(W, W), n = 1;
2103
2211
  function r() {
2104
- return n === 1 ? t(U, U) : n === 0.5 ? t(ga, pa) : t(Ce(n), Ce(1 / n));
2212
+ return n === 1 ? t(W, W) : n === 0.5 ? t(pa, xa) : t(Ee(n), Ee(1 / n));
2105
2213
  }
2106
2214
  return e.exponent = function(i) {
2107
2215
  return arguments.length ? (n = +i, r()) : n;
2108
2216
  }, jt(e);
2109
2217
  }
2110
2218
  function tn() {
2111
- var t = ya(je());
2219
+ var t = wa(je());
2112
2220
  return t.copy = function() {
2113
- return Ke(t, tn()).exponent(t.exponent());
2114
- }, Et.apply(t, arguments), t;
2221
+ return Ze(t, tn()).exponent(t.exponent());
2222
+ }, Ct.apply(t, arguments), t;
2115
2223
  }
2116
2224
  function za() {
2117
2225
  return tn.apply(null, arguments).exponent(0.5);
@@ -2119,7 +2227,7 @@ function za() {
2119
2227
  function en() {
2120
2228
  var t = 0, e = 1, n = 1, r = [0.5], i = [0, 1], a;
2121
2229
  function o(c) {
2122
- return c != null && c <= c ? i[Re(r, c, 0, n)] : a;
2230
+ return c != null && c <= c ? i[Te(r, c, 0, n)] : a;
2123
2231
  }
2124
2232
  function s() {
2125
2233
  var c = -1;
@@ -2139,9 +2247,9 @@ function en() {
2139
2247
  return r.slice();
2140
2248
  }, o.copy = function() {
2141
2249
  return en().domain([t, e]).range(i).unknown(a);
2142
- }, Et.apply(jt(o), arguments);
2250
+ }, Ct.apply(jt(o), arguments);
2143
2251
  }
2144
- function xa({
2252
+ function ba({
2145
2253
  data: t,
2146
2254
  chartConfig: e,
2147
2255
  displayConfig: n = {},
@@ -2149,206 +2257,206 @@ function xa({
2149
2257
  height: i = "100%",
2150
2258
  colorPalette: a
2151
2259
  }) {
2152
- const o = oe(null), s = oe(null), [c, u] = B({ width: 0, height: 0 }), [f, m] = B(!1), [l, d] = B("light"), { getFieldLabel: M } = bn();
2153
- bt(() => (d(_t()), kn((h) => {
2154
- d(h);
2260
+ const o = oe(null), s = oe(null), [c, u] = Q({ width: 0, height: 0 }), [f, d] = Q(!1), [l, h] = Q("light"), { getFieldLabel: b } = bn();
2261
+ bt(() => (h(Mt()), kn((m) => {
2262
+ h(m);
2155
2263
  })), []);
2156
- const F = {
2264
+ const A = {
2157
2265
  showTooltip: n?.showTooltip ?? !0,
2158
2266
  showLabels: n?.showLabels ?? !0,
2159
2267
  fitToWidth: n?.fitToWidth ?? !1
2160
2268
  };
2161
2269
  hn(() => {
2162
2270
  let x = 0;
2163
- const h = 10;
2271
+ const m = 10;
2164
2272
  let _, g;
2165
2273
  const w = () => {
2166
2274
  if (s.current) {
2167
- const { width: R, height: V } = s.current.getBoundingClientRect();
2168
- if (R > 0 && V > 0)
2169
- return u({ width: R, height: V }), m(!0), !0;
2275
+ const { width: T, height: q } = s.current.getBoundingClientRect();
2276
+ if (T > 0 && q > 0)
2277
+ return u({ width: T, height: q }), d(!0), !0;
2170
2278
  }
2171
2279
  return !1;
2172
2280
  };
2173
- if (!w() && x < h) {
2174
- const R = () => {
2175
- !w() && x < h && (x++, g = setTimeout(() => {
2176
- _ = requestAnimationFrame(R);
2281
+ if (!w() && x < m) {
2282
+ const T = () => {
2283
+ !w() && x < m && (x++, g = setTimeout(() => {
2284
+ _ = requestAnimationFrame(T);
2177
2285
  }, 50 * x));
2178
2286
  };
2179
- _ = requestAnimationFrame(R);
2287
+ _ = requestAnimationFrame(T);
2180
2288
  }
2181
2289
  return () => {
2182
2290
  _ && cancelAnimationFrame(_), g && clearTimeout(g);
2183
2291
  };
2184
2292
  }, []), bt(() => {
2185
2293
  let x = null;
2186
- const h = () => {
2294
+ const m = () => {
2187
2295
  if (s.current) {
2188
2296
  const { width: _, height: g } = s.current.getBoundingClientRect();
2189
- _ > 0 && g > 0 && (u({ width: _, height: g }), f || m(!0));
2297
+ _ > 0 && g > 0 && (u({ width: _, height: g }), f || d(!0));
2190
2298
  }
2191
2299
  };
2192
- return s.current && (x = new ResizeObserver(() => h()), x.observe(s.current), h()), window.addEventListener("resize", h), () => {
2193
- x && x.disconnect(), window.removeEventListener("resize", h);
2300
+ return s.current && (x = new ResizeObserver(() => m()), x.observe(s.current), m()), window.addEventListener("resize", m), () => {
2301
+ x && x.disconnect(), window.removeEventListener("resize", m);
2194
2302
  };
2195
2303
  }, [f]);
2196
- const $ = (x) => Math.floor(x.getMonth() / 3) + 1, T = (x) => x.getMonth() % 3 + 1, b = (x) => {
2197
- const h = x.getDate();
2198
- return Math.floor((h - 1) / 7) + 1;
2199
- }, N = (x) => {
2304
+ const S = (x) => Math.floor(x.getMonth() / 3) + 1, R = (x) => x.getMonth() % 3 + 1, v = (x) => {
2305
+ const m = x.getDate();
2306
+ return Math.floor((m - 1) / 7) + 1;
2307
+ }, k = (x) => {
2200
2308
  switch (x?.toLowerCase()) {
2201
2309
  case "year":
2202
2310
  return null;
2203
2311
  case "quarter":
2204
2312
  return {
2205
- extractX: (h) => h.getFullYear(),
2206
- extractY: (h) => $(h) - 1,
2313
+ extractX: (m) => m.getFullYear(),
2314
+ extractY: (m) => S(m) - 1,
2207
2315
  // 0-3 for indexing
2208
2316
  xLabels: [],
2209
2317
  // Will be determined from data
2210
2318
  yLabels: ["Q1", "Q2", "Q3", "Q4"],
2211
- xFormat: (h) => `'${h.toString().slice(-2)}`,
2319
+ xFormat: (m) => `'${m.toString().slice(-2)}`,
2212
2320
  // '24 instead of 2024
2213
- yFormat: (h) => ["Q1", "Q2", "Q3", "Q4"][h] || "",
2321
+ yFormat: (m) => ["Q1", "Q2", "Q3", "Q4"][m] || "",
2214
2322
  cellWidth: 16,
2215
2323
  cellHeight: 16
2216
2324
  };
2217
2325
  case "month":
2218
2326
  return {
2219
- extractX: (h) => {
2220
- const _ = h.getFullYear(), g = $(h);
2327
+ extractX: (m) => {
2328
+ const _ = m.getFullYear(), g = S(m);
2221
2329
  return _ * 10 + g;
2222
2330
  },
2223
- extractY: (h) => T(h) - 1,
2331
+ extractY: (m) => R(m) - 1,
2224
2332
  // 0-2 for indexing
2225
2333
  xLabels: [],
2226
2334
  // Will be determined from data
2227
2335
  yLabels: ["Month 1", "Month 2", "Month 3"],
2228
- xFormat: (h) => `Q${h % 10}`,
2229
- yFormat: (h) => ["Month 1", "Month 2", "Month 3"][h] || "",
2336
+ xFormat: (m) => `Q${m % 10}`,
2337
+ yFormat: (m) => ["Month 1", "Month 2", "Month 3"][m] || "",
2230
2338
  cellWidth: 16,
2231
2339
  cellHeight: 16,
2232
2340
  hasHierarchicalLabels: !0,
2233
2341
  // Flag to indicate we need special handling
2234
- getYearFromX: (h) => Math.floor(h / 10)
2342
+ getYearFromX: (m) => Math.floor(m / 10)
2235
2343
  // Helper to get year for grouping
2236
2344
  };
2237
2345
  case "week":
2238
2346
  return {
2239
- extractX: (h) => {
2240
- const _ = h.getFullYear(), g = h.getMonth() + 1;
2347
+ extractX: (m) => {
2348
+ const _ = m.getFullYear(), g = m.getMonth() + 1;
2241
2349
  return _ * 100 + g;
2242
2350
  },
2243
- extractY: (h) => b(h) - 1,
2351
+ extractY: (m) => v(m) - 1,
2244
2352
  // 0-5 for indexing
2245
2353
  xLabels: [],
2246
2354
  // Will be determined from data
2247
2355
  yLabels: ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"],
2248
- xFormat: (h) => {
2249
- const _ = h % 100;
2356
+ xFormat: (m) => {
2357
+ const _ = m % 100;
2250
2358
  return ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"][_ - 1] || "";
2251
2359
  },
2252
- yFormat: (h) => ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"][h] || "",
2360
+ yFormat: (m) => ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5"][m] || "",
2253
2361
  cellWidth: 16,
2254
2362
  cellHeight: 16,
2255
2363
  hasHierarchicalLabels: !0,
2256
2364
  // Add hierarchical labels like month view
2257
- getYearFromX: (h) => Math.floor(h / 100)
2365
+ getYearFromX: (m) => Math.floor(m / 100)
2258
2366
  // Helper to get year for grouping
2259
2367
  };
2260
2368
  case "day":
2261
2369
  return {
2262
- extractX: (h) => {
2263
- const { year: _, week: g } = C(h);
2370
+ extractX: (m) => {
2371
+ const { year: _, week: g } = C(m);
2264
2372
  return _ * 100 + g;
2265
2373
  },
2266
- extractY: (h) => h.getDay(),
2374
+ extractY: (m) => m.getDay(),
2267
2375
  // 0-6 (Sun-Sat)
2268
2376
  xLabels: [],
2269
2377
  // Will be determined from data
2270
2378
  yLabels: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
2271
- xFormat: (h) => `${h % 100}`,
2272
- yFormat: (h) => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][h] || "",
2379
+ xFormat: (m) => `${m % 100}`,
2380
+ yFormat: (m) => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][m] || "",
2273
2381
  cellWidth: 16,
2274
2382
  cellHeight: 16,
2275
2383
  hasHierarchicalLabels: !0,
2276
2384
  // Add hierarchical labels
2277
- getYearFromX: (h) => Math.floor(h / 100)
2385
+ getYearFromX: (m) => Math.floor(m / 100)
2278
2386
  // Helper to get year for grouping
2279
2387
  };
2280
2388
  case "hour":
2281
2389
  return {
2282
- extractX: (h) => {
2283
- const _ = h.getFullYear(), g = h.getMonth() + 1, w = h.getDate();
2390
+ extractX: (m) => {
2391
+ const _ = m.getFullYear(), g = m.getMonth() + 1, w = m.getDate();
2284
2392
  return _ * 1e4 + g * 100 + w;
2285
2393
  },
2286
- extractY: (h) => Math.floor(h.getHours() / 3),
2394
+ extractY: (m) => Math.floor(m.getHours() / 3),
2287
2395
  // 0-7 for 8 three-hour blocks
2288
2396
  xLabels: [],
2289
2397
  // Will be determined from data
2290
2398
  yLabels: ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"],
2291
- xFormat: (h) => `${h % 100}`,
2292
- yFormat: (h) => ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"][h] || "",
2399
+ xFormat: (m) => `${m % 100}`,
2400
+ yFormat: (m) => ["00-03", "03-06", "06-09", "09-12", "12-15", "15-18", "18-21", "21-00"][m] || "",
2293
2401
  cellWidth: 16,
2294
2402
  cellHeight: 16,
2295
2403
  hasHierarchicalLabels: !0,
2296
2404
  // Show year/month grouping above
2297
- getYearFromX: (h) => Math.floor(h / 100)
2405
+ getYearFromX: (m) => Math.floor(m / 100)
2298
2406
  // Extract YYYYMM for month grouping
2299
2407
  };
2300
2408
  default:
2301
2409
  return null;
2302
2410
  }
2303
2411
  }, C = (x) => {
2304
- const h = new Date(Date.UTC(x.getFullYear(), x.getMonth(), x.getDate())), _ = h.getUTCDay() || 7;
2305
- h.setUTCDate(h.getUTCDate() + 4 - _);
2306
- const g = h.getUTCFullYear(), w = new Date(Date.UTC(g, 0, 1)), k = Math.ceil(((h.getTime() - w.getTime()) / 864e5 + 1) / 7);
2307
- return { year: g, week: k };
2412
+ const m = new Date(Date.UTC(x.getFullYear(), x.getMonth(), x.getDate())), _ = m.getUTCDay() || 7;
2413
+ m.setUTCDate(m.getUTCDate() + 4 - _);
2414
+ const g = m.getUTCFullYear(), w = new Date(Date.UTC(g, 0, 1)), N = Math.ceil(((m.getTime() - w.getTime()) / 864e5 + 1) / 7);
2415
+ return { year: g, week: N };
2308
2416
  };
2309
2417
  if (bt(() => {
2310
2418
  if (!t || t.length === 0 || !o.current || !f || c.width === 0 || (ct(o.current).selectAll("*").remove(), !e?.dateField || !e?.valueField))
2311
2419
  return;
2312
- const x = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField, h = Array.isArray(e.valueField) ? e.valueField[0] : e.valueField;
2313
- if (!x || !h)
2420
+ const x = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField, m = Array.isArray(e.valueField) ? e.valueField[0] : e.valueField;
2421
+ if (!x || !m)
2314
2422
  return;
2315
2423
  const g = (() => {
2316
2424
  if (!r?.timeDimensions || r.timeDimensions.length === 0)
2317
2425
  return "day";
2318
- const p = r.timeDimensions.find(
2319
- (S) => S.dimension === x || S.dimension.includes(x)
2426
+ const y = r.timeDimensions.find(
2427
+ ($) => $.dimension === x || $.dimension.includes(x)
2320
2428
  );
2321
- if (p && p.granularity)
2322
- return p.granularity;
2323
- const y = r.timeDimensions[0];
2324
- return y && y.granularity ? y.granularity : "day";
2325
- })(), w = N(g);
2429
+ if (y && y.granularity)
2430
+ return y.granularity;
2431
+ const p = r.timeDimensions[0];
2432
+ return p && p.granularity ? p.granularity : "day";
2433
+ })(), w = k(g);
2326
2434
  if (!w)
2327
2435
  return;
2328
- const k = t.map((p) => {
2329
- const y = p[x], S = typeof p[h] == "string" ? parseFloat(p[h]) : p[h] || 0;
2330
- let L;
2331
- if (typeof y == "string") {
2332
- let q = y;
2333
- y.includes(" ") && (q = y.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !q.endsWith("Z") && !q.includes("+") && (q = q + "Z"), L = new Date(q);
2436
+ const N = t.map((y) => {
2437
+ const p = y[x], $ = typeof y[m] == "string" ? parseFloat(y[m]) : y[m] || 0;
2438
+ let D;
2439
+ if (typeof p == "string") {
2440
+ let P = p;
2441
+ p.includes(" ") && (P = p.replace(" ", "T").replace("+00", "Z").replace(/\+\d{2}:\d{2}$/, "Z")), !P.endsWith("Z") && !P.includes("+") && (P = P + "Z"), D = new Date(P);
2334
2442
  } else
2335
- L = new Date(y);
2336
- if (isNaN(L.getTime()))
2443
+ D = new Date(p);
2444
+ if (isNaN(D.getTime()))
2337
2445
  return null;
2338
- const Q = w.extractX(L), G = w.extractY(L);
2446
+ const X = w.extractX(D), G = w.extractY(D);
2339
2447
  return {
2340
- x: Q,
2448
+ x: X,
2341
2449
  y: G,
2342
- value: S,
2343
- date: L,
2344
- label: Qt(y, g)
2450
+ value: $,
2451
+ date: D,
2452
+ label: Xt(p, g)
2345
2453
  };
2346
- }).filter((p) => p !== null);
2347
- if (k.length === 0) return;
2348
- const R = ue(k, (p) => p.y) || 0, V = le(k, (p) => p.y) || 0, D = (() => {
2349
- const p = [...new Set(k.map((y) => y.x))].sort();
2350
- return p;
2351
- })(), J = D.length * w.cellWidth + (D.length - 1) * 4, z = (R - V + 1) * w.cellHeight + (R - V) * 4, X = {
2454
+ }).filter((y) => y !== null);
2455
+ if (N.length === 0) return;
2456
+ const T = ue(N, (y) => y.y) || 0, q = le(N, (y) => y.y) || 0, L = (() => {
2457
+ const y = [...new Set(N.map((p) => p.x))].sort();
2458
+ return y;
2459
+ })(), K = L.length * w.cellWidth + (L.length - 1) * 4, V = (T - q + 1) * w.cellHeight + (T - q) * 4, B = {
2352
2460
  left: 60,
2353
2461
  // Space for Y-axis labels
2354
2462
  bottom: 10,
@@ -2356,157 +2464,158 @@ function xa({
2356
2464
  top: w.hasHierarchicalLabels ? 40 : 25,
2357
2465
  // Extra space for hierarchical labels
2358
2466
  right: 10
2359
- }, Tt = c.width - X.left - X.right, te = c.height - X.top - X.bottom;
2467
+ }, Ft = c.width - B.left - B.right, te = c.height - B.top - B.bottom;
2360
2468
  let H, nt;
2361
- if (F.fitToWidth) {
2362
- const p = Tt / J, y = te / z, S = Math.min(p, y);
2363
- H = w.cellWidth * S, nt = w.cellHeight * S;
2469
+ if (A.fitToWidth) {
2470
+ const y = Ft / K, p = te / V, $ = Math.min(y, p);
2471
+ H = w.cellWidth * $, nt = w.cellHeight * $;
2364
2472
  } else {
2365
- const y = { width: 16, height: 16 }, S = 24, L = Tt / J, Q = te / z, G = Math.min(L, Q);
2366
- H = Math.max(y.width, Math.min(S, w.cellWidth * G)), nt = Math.max(y.height, Math.min(S, w.cellHeight * G)), g === "week" && H < y.width && (H = y.width);
2473
+ const p = { width: 16, height: 16 }, $ = 24, D = Ft / K, X = te / V, G = Math.min(D, X);
2474
+ H = Math.max(p.width, Math.min($, w.cellWidth * G)), nt = Math.max(p.height, Math.min($, w.cellHeight * G)), g === "week" && H < p.width && (H = p.width);
2367
2475
  }
2368
- const ee = D.length * H + (D.length - 1) * 4, nn = ee > Tt ? ee + X.left + X.right : c.width, rt = ct(o.current).attr("width", nn).attr("height", c.height).append("g").attr("transform", `translate(${X.left},${X.top})`), ne = k.map((p) => p.value), rn = le(ne) || 0, an = ue(ne) || 1, on = en().domain([rn, an]).range(a?.gradient || _n), re = /* @__PURE__ */ new Map();
2369
- k.forEach((p) => {
2370
- const y = `${p.x}-${p.y}`;
2371
- re.set(y, p);
2476
+ const ee = L.length * H + (L.length - 1) * 4, nn = ee > Ft ? ee + B.left + B.right : c.width, rt = ct(o.current).attr("width", nn).attr("height", c.height).append("g").attr("transform", `translate(${B.left},${B.top})`), ne = N.map((y) => y.value), rn = le(ne) || 0, an = ue(ne) || 1, on = en().domain([rn, an]).range(a?.gradient || Nn), re = /* @__PURE__ */ new Map();
2477
+ N.forEach((y) => {
2478
+ const p = `${y.x}-${y.y}`;
2479
+ re.set(p, y);
2372
2480
  });
2373
- const Z = (p, y) => getComputedStyle(document.documentElement).getPropertyValue(p).trim() || y, Ft = l !== "light", mt = Ft ? Z("--dc-text-muted", "#cbd5e1") : Z("--dc-text-secondary", "#374151"), sn = Z("--dc-border", "#e5e7eb"), cn = Ft ? Z("--dc-bg-secondary", "#1e293b") : Z("--dc-bg-secondary", "#f3f4f6"), ie = Ft ? Z("--dc-border", "#334155") : Z("--dc-bg", "#ffffff"), gt = ct("body").append("div").attr("class", "activity-grid-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), st = /* @__PURE__ */ new Map();
2374
- D.forEach((p, y) => {
2375
- st.set(p, y);
2481
+ const J = (y, p) => getComputedStyle(document.documentElement).getPropertyValue(y).trim() || p, Rt = l !== "light", mt = Rt ? J("--dc-text-muted", "#cbd5e1") : J("--dc-text-secondary", "#374151"), sn = J("--dc-border", "#e5e7eb"), cn = Rt ? J("--dc-bg-secondary", "#1e293b") : J("--dc-bg-secondary", "#f3f4f6"), ie = Rt ? J("--dc-border", "#334155") : J("--dc-bg", "#ffffff"), gt = ct("body").append("div").attr("class", "activity-grid-tooltip").style("position", "absolute").style("padding", "8px").style("background", "rgba(0, 0, 0, 0.8)").style("color", "white").style("border-radius", "4px").style("font-size", "12px").style("pointer-events", "none").style("opacity", 0).style("z-index", 1e3), st = /* @__PURE__ */ new Map();
2482
+ L.forEach((y, p) => {
2483
+ st.set(y, p);
2376
2484
  });
2377
- for (const p of D)
2378
- for (let y = V; y <= R; y++) {
2379
- const S = `${p}-${y}`, L = re.get(S), Q = st.get(p) || 0, G = rt.append("rect").attr("x", Q * (H + 4)).attr("y", (y - V) * (nt + 4)).attr("width", H).attr("height", nt).attr("rx", 2).attr("ry", 2).style("fill", L ? on(L.value) : cn).style("stroke", ie).style("stroke-width", 1);
2380
- F.showTooltip && G.style("cursor", "pointer").on("mouseover", function(q) {
2381
- if (ct(this).style("stroke", "#000").style("stroke-width", 2), L) {
2382
- const K = [
2383
- `<strong>${L.label}</strong>`,
2384
- `${M(h)}: ${L.value}`
2485
+ for (const y of L)
2486
+ for (let p = q; p <= T; p++) {
2487
+ const $ = `${y}-${p}`, D = re.get($), X = st.get(y) || 0, G = rt.append("rect").attr("x", X * (H + 4)).attr("y", (p - q) * (nt + 4)).attr("width", H).attr("height", nt).attr("rx", 2).attr("ry", 2).style("fill", D ? on(D.value) : cn).style("stroke", ie).style("stroke-width", 1);
2488
+ A.showTooltip && G.style("cursor", "pointer").on("mouseover", function(P) {
2489
+ if (ct(this).style("stroke", "#000").style("stroke-width", 2), D) {
2490
+ const Z = [
2491
+ `<strong>${D.label}</strong>`,
2492
+ `${b(m)}: ${D.value}`
2385
2493
  ].join("<br>");
2386
- gt.html(K).style("left", q.pageX + 10 + "px").style("top", q.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
2494
+ gt.html(Z).style("left", P.pageX + 10 + "px").style("top", P.pageY - 10 + "px").transition().duration(200).style("opacity", 1);
2387
2495
  }
2388
- }).on("mousemove", function(q) {
2389
- gt.style("left", q.pageX + 10 + "px").style("top", q.pageY - 10 + "px");
2496
+ }).on("mousemove", function(P) {
2497
+ gt.style("left", P.pageX + 10 + "px").style("top", P.pageY - 10 + "px");
2390
2498
  }).on("mouseout", function() {
2391
2499
  ct(this).style("stroke", ie).style("stroke-width", 1), gt.transition().duration(200).style("opacity", 0);
2392
2500
  });
2393
2501
  }
2394
- if (F.showLabels) {
2502
+ if (A.showLabels) {
2395
2503
  if (w.hasHierarchicalLabels && w.getYearFromX) {
2396
- const p = /* @__PURE__ */ new Map();
2397
- for (const y of D) {
2398
- const S = w.getYearFromX(y);
2399
- p.has(S) || p.set(S, []), p.get(S).push(y);
2504
+ const y = /* @__PURE__ */ new Map();
2505
+ for (const p of L) {
2506
+ const $ = w.getYearFromX(p);
2507
+ y.has($) || y.set($, []), y.get($).push(p);
2400
2508
  }
2401
- for (const y of D) {
2402
- const S = st.get(y) || 0;
2403
- rt.append("text").attr("x", S * (H + 4) + H / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", mt).text(w.xFormat(y));
2509
+ for (const p of L) {
2510
+ const $ = st.get(p) || 0;
2511
+ rt.append("text").attr("x", $ * (H + 4) + H / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", mt).text(w.xFormat(p));
2404
2512
  }
2405
- for (const [y, S] of p)
2406
- if (S.length > 0) {
2407
- const L = Math.min(...S.map((K) => st.get(K) || 0)), Q = Math.max(...S.map((K) => st.get(K) || 0)), G = (L + Q) / 2;
2408
- let q = "";
2409
- if (y > 9999) {
2410
- const K = Math.floor(y / 100), un = y % 100;
2411
- q = `${["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][un - 1]} '${K.toString().slice(-2)}`;
2513
+ for (const [p, $] of y)
2514
+ if ($.length > 0) {
2515
+ const D = Math.min(...$.map((Z) => st.get(Z) || 0)), X = Math.max(...$.map((Z) => st.get(Z) || 0)), G = (D + X) / 2;
2516
+ let P = "";
2517
+ if (p > 9999) {
2518
+ const Z = Math.floor(p / 100), un = p % 100;
2519
+ P = `${["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][un - 1]} '${Z.toString().slice(-2)}`;
2412
2520
  } else
2413
- q = `'${y.toString().slice(-2)}`;
2414
- rt.append("text").attr("x", G * (H + 4) + H / 2).attr("y", -25).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", mt).text(q), S.length > 1 && rt.append("line").attr("x1", L * (H + 4)).attr("x2", Q * (H + 4) + H).attr("y1", -20).attr("y2", -20).style("stroke", sn).style("stroke-width", 1).style("opacity", 0.3);
2521
+ P = `'${p.toString().slice(-2)}`;
2522
+ rt.append("text").attr("x", G * (H + 4) + H / 2).attr("y", -25).attr("text-anchor", "middle").style("font-size", "12px").style("font-weight", "bold").style("fill", mt).text(P), $.length > 1 && rt.append("line").attr("x1", D * (H + 4)).attr("x2", X * (H + 4) + H).attr("y1", -20).attr("y2", -20).style("stroke", sn).style("stroke-width", 1).style("opacity", 0.3);
2415
2523
  }
2416
2524
  } else {
2417
- const p = Math.max(1, Math.floor(D.length / 10));
2418
- for (let y = 0; y < D.length; y += p) {
2419
- const S = D[y];
2420
- rt.append("text").attr("x", y * (H + 4) + H / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", mt).text(w.xFormat(S));
2525
+ const y = Math.max(1, Math.floor(L.length / 10));
2526
+ for (let p = 0; p < L.length; p += y) {
2527
+ const $ = L[p];
2528
+ rt.append("text").attr("x", p * (H + 4) + H / 2).attr("y", -8).attr("text-anchor", "middle").style("font-size", "10px").style("fill", mt).text(w.xFormat($));
2421
2529
  }
2422
2530
  }
2423
- for (let p = V; p <= R; p++)
2424
- rt.append("text").attr("x", -8).attr("y", (p - V) * (nt + 4) + nt / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", mt).text(w.yFormat(p));
2531
+ for (let y = q; y <= T; y++)
2532
+ rt.append("text").attr("x", -8).attr("y", (y - q) * (nt + 4) + nt / 2).attr("text-anchor", "end").attr("dy", ".35em").style("font-size", "10px").style("fill", mt).text(w.yFormat(y));
2425
2533
  }
2426
2534
  return () => {
2427
2535
  gt.remove();
2428
2536
  };
2429
- }, [t, e, n, r, c, f, F.showTooltip, F.showLabels, a, l]), !t || t.length === 0)
2430
- return /* @__PURE__ */ O(
2537
+ }, [t, e, n, r, c, f, A.showTooltip, A.showLabels, a, l]), !t || t.length === 0)
2538
+ return /* @__PURE__ */ U(
2431
2539
  "div",
2432
2540
  {
2433
2541
  className: "flex items-center justify-center w-full",
2434
2542
  style: { height: i },
2435
- children: /* @__PURE__ */ pt("div", { className: "text-center text-dc-text-muted", children: [
2436
- /* @__PURE__ */ O("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2437
- /* @__PURE__ */ O("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in activity grid" })
2543
+ children: /* @__PURE__ */ yt("div", { className: "text-center text-dc-text-muted", children: [
2544
+ /* @__PURE__ */ U("div", { className: "text-sm font-semibold mb-1", children: "No data available" }),
2545
+ /* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary", children: "No data points to display in activity grid" })
2438
2546
  ] })
2439
2547
  }
2440
2548
  );
2441
2549
  if (!(e?.dateField && e?.valueField))
2442
- return /* @__PURE__ */ O(
2550
+ return /* @__PURE__ */ U(
2443
2551
  "div",
2444
2552
  {
2445
2553
  className: "flex items-center justify-center w-full",
2446
2554
  style: { height: i },
2447
- children: /* @__PURE__ */ pt("div", { className: "text-center text-dc-text-muted", children: [
2448
- /* @__PURE__ */ O("div", { className: "text-sm font-semibold mb-1", children: "Configuration Required" }),
2449
- /* @__PURE__ */ O("div", { className: "text-xs text-dc-text-secondary", children: "Activity grid requires a time dimension and a measure" })
2555
+ children: /* @__PURE__ */ yt("div", { className: "text-center text-dc-text-muted", children: [
2556
+ /* @__PURE__ */ U("div", { className: "text-sm font-semibold mb-1", children: "Configuration Required" }),
2557
+ /* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary", children: "Activity grid requires a time dimension and a measure" })
2450
2558
  ] })
2451
2559
  }
2452
2560
  );
2453
- const E = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField;
2561
+ const F = Array.isArray(e.dateField) ? e.dateField[0] : e.dateField;
2454
2562
  return (r?.timeDimensions?.find(
2455
- (x) => x.dimension === E || x.dimension.includes(E)
2456
- )?.granularity || "day")?.toLowerCase() === "year" ? /* @__PURE__ */ O(
2563
+ (x) => x.dimension === F || x.dimension.includes(F)
2564
+ )?.granularity || "day")?.toLowerCase() === "year" ? /* @__PURE__ */ U(
2457
2565
  "div",
2458
2566
  {
2459
2567
  className: "flex items-center justify-center w-full",
2460
2568
  style: { height: i },
2461
- children: /* @__PURE__ */ pt("div", { className: "text-center text-dc-text-muted", children: [
2462
- /* @__PURE__ */ O("div", { className: "text-sm font-semibold mb-1", children: "Granularity Too High" }),
2463
- /* @__PURE__ */ O("div", { className: "text-xs text-dc-text-secondary", children: "Activity grids work best with hour, day, week, month, or quarter granularity" }),
2464
- /* @__PURE__ */ O("div", { className: "text-xs text-dc-text-secondary mt-1", children: "Please choose a lower granularity for your time dimension" })
2569
+ children: /* @__PURE__ */ yt("div", { className: "text-center text-dc-text-muted", children: [
2570
+ /* @__PURE__ */ U("div", { className: "text-sm font-semibold mb-1", children: "Granularity Too High" }),
2571
+ /* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary", children: "Activity grids work best with hour, day, week, month, or quarter granularity" }),
2572
+ /* @__PURE__ */ U("div", { className: "text-xs text-dc-text-secondary mt-1", children: "Please choose a lower granularity for your time dimension" })
2465
2573
  ] })
2466
2574
  }
2467
- ) : /* @__PURE__ */ O("div", { className: "w-full flex flex-col relative", style: { height: i, minHeight: "250px", overflow: "hidden", width: "100%" }, children: /* @__PURE__ */ pt("div", { ref: s, className: "w-full h-full relative overflow-x-auto", style: { width: "100%" }, children: [
2468
- /* @__PURE__ */ O("svg", { ref: o, className: "h-full" }),
2469
- !f && /* @__PURE__ */ O("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ O("div", { className: "text-dc-text-muted text-sm", children: "Measuring chart dimensions..." }) })
2575
+ ) : /* @__PURE__ */ U("div", { className: "w-full flex flex-col relative", style: { height: i, minHeight: "250px", overflow: "hidden", width: "100%" }, children: /* @__PURE__ */ yt("div", { ref: s, className: "w-full h-full relative overflow-x-auto", style: { width: "100%" }, children: [
2576
+ /* @__PURE__ */ U("svg", { ref: o, className: "h-full" }),
2577
+ !f && /* @__PURE__ */ U("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ U("div", { className: "text-dc-text-muted text-sm", children: "Measuring chart dimensions..." }) })
2470
2578
  ] }) });
2471
2579
  }
2472
- const Ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2580
+ const Wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2473
2581
  __proto__: null,
2474
- default: xa
2582
+ default: ba
2475
2583
  }, Symbol.toStringTag, { value: "Module" }));
2476
2584
  export {
2477
- Da as A,
2478
- Ha as B,
2585
+ Ha as A,
2586
+ Pa as B,
2479
2587
  Ta as C,
2480
- xn as D,
2481
- Ia as E,
2482
- Ea as N,
2483
- Ca as P,
2484
- qa as T,
2485
- Aa as a,
2486
- Te as b,
2487
- Qt as c,
2588
+ Ua as D,
2589
+ xn as E,
2590
+ Wa as F,
2591
+ Ra as N,
2592
+ Fa as P,
2593
+ Ia as T,
2594
+ Ca as a,
2595
+ Fe as b,
2596
+ Xt as c,
2488
2597
  za as d,
2489
- Oa as e,
2490
- Sa as f,
2491
- _t as g,
2492
- _n as h,
2493
- Na as i,
2494
- Pa as j,
2495
- Va as k,
2496
- ma as l,
2598
+ qa as e,
2599
+ Aa as f,
2600
+ Mt as g,
2601
+ Nn as h,
2602
+ $a as i,
2603
+ Va as j,
2604
+ Oa as k,
2605
+ ya as l,
2497
2606
  ue as m,
2498
- ka as n,
2499
- oa as o,
2500
- Pt as p,
2607
+ vn as n,
2608
+ ca as o,
2609
+ It as p,
2501
2610
  en as q,
2502
- mn as r,
2611
+ ka as r,
2503
2612
  ct as s,
2504
- $a as t,
2613
+ Ea as t,
2505
2614
  bn as u,
2506
- Fa as v,
2615
+ mn as v,
2507
2616
  kn as w,
2508
- Mn as x,
2509
- Ra as y,
2617
+ Da as x,
2618
+ Sn as y,
2510
2619
  La as z
2511
2620
  };
2512
- //# sourceMappingURL=chart-activitygridchart-Cz4bEf3V.js.map
2621
+ //# sourceMappingURL=chart-activitygridchart-D17Fxiuf.js.map