@databrainhq/plugin 0.17.9-beta.63 → 0.17.9-beta.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-DYm4go7B.mjs → Accordion-DM0CpE4-.mjs} +1 -1
- package/dist/{CardChartSlot-hXMFFQY6.mjs → CardChartSlot-DFB4zwal.mjs} +6 -6
- package/dist/{Chart-Czvto2Pp.mjs → Chart-D-Sh_Jnl.mjs} +536 -508
- package/dist/{ChartTypePanel-CJpY04Mg.mjs → ChartTypePanel-Ch-xJA_H.mjs} +8 -8
- package/dist/{CreateGlobalFilter-kN5eYLFp.mjs → CreateGlobalFilter-CgVb5I5Q.mjs} +2 -2
- package/dist/{CreateMetricV2-CF1_V6Yy.mjs → CreateMetricV2-BcJY9cBe.mjs} +12 -12
- package/dist/{HorizontalStackTable-DyQUX-6e.mjs → HorizontalStackTable-XnsJR8PD.mjs} +3 -3
- package/dist/{ManageMetricsV2-Byj0Fsqg.mjs → ManageMetricsV2-BUq1jzuL.mjs} +3 -3
- package/dist/{MetricCardV2-BkzP5sRB.mjs → MetricCardV2-mmoeHjUD.mjs} +7 -7
- package/dist/{NoDataFound-_HbTZ7s0.mjs → NoDataFound-BTAax-t-.mjs} +1 -1
- package/dist/{Panel-Bgw85AhA.mjs → Panel-BnIdU74Q.mjs} +1 -1
- package/dist/{PivotTableV2-DVevmkmw.mjs → PivotTableV2-DjItLmBg.mjs} +2 -2
- package/dist/{PivotTableV3-C9nBd6e3.mjs → PivotTableV3-DBwn-gqV.mjs} +4 -4
- package/dist/{Portal-DA-r6Uih.mjs → Portal-CpcoFb_x.mjs} +2 -2
- package/dist/{RadioButton-BtMuXEof.mjs → RadioButton-BexULR0h.mjs} +1 -1
- package/dist/{ScheduleEmail-BwHvhSnf.mjs → ScheduleEmail-CZrmGXUv.mjs} +6 -6
- package/dist/{SearchMetricData-C5HR9WDb.mjs → SearchMetricData-BRw13lOj.mjs} +13 -13
- package/dist/{SortPanel-BVhl25BU.mjs → SortPanel-BOOrmI0v.mjs} +8 -8
- package/dist/{Table-CMzDTi0e.mjs → Table-B7S71HCS.mjs} +6 -6
- package/dist/{TagInputField-CWYspnF2.mjs → TagInputField-qTTVrh2_.mjs} +4 -4
- package/dist/{TextAreaField-yNU82ntB.mjs → TextAreaField-nUy4gj0I.mjs} +2 -2
- package/dist/{TimeSeriesSettings-DbpMSftn.mjs → TimeSeriesSettings-Bk4RVA0N.mjs} +2 -2
- package/dist/{arrayToCsvString-BLjJgdNt.mjs → arrayToCsvString-CvRaxXEY.mjs} +1 -1
- package/dist/{cardQueryError-CdKyVj2S.mjs → cardQueryError-BxOuUw1w.mjs} +10 -10
- package/dist/{charts-D5NaUrmO.mjs → charts-R-SD2ojB.mjs} +2 -2
- package/dist/{conditionalFormatting-CEZpmXXM.mjs → conditionalFormatting-DFbGk4vC.mjs} +1 -1
- package/dist/{createGlobalFilter.module-eKfJ0FD5.mjs → createGlobalFilter.module-wXIo2EA5.mjs} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{echarts-CKu2QOBE.mjs → echarts-BlmDVRLk.mjs} +2 -2
- package/dist/{metric.mutation-KnZ6zmli.mjs → metric.mutation-Bo4Rv4xQ.mjs} +1 -1
- package/dist/{option-CsS-Nz-J.mjs → option-CXFO2qbo.mjs} +201 -196
- package/dist/{permissions-BIjAjFWA.mjs → permissions-a_nGlNM3.mjs} +5 -5
- package/dist/{pluginV3Request-DV0qKIMb.mjs → pluginV3Request-DjyH9pbx.mjs} +1 -1
- package/dist/{renderer-BR9ioduA.mjs → renderer-D1O2kRjV.mjs} +1 -1
- package/dist/{timeseries-BsxjAgJm.mjs → timeseries-DRtMZG1l.mjs} +1243 -1264
- package/dist/{toTasteAppearance-Dmq7r7Lf.mjs → toTasteAppearance-D2kAi7f8.mjs} +4 -4
- package/dist/{useGuesTokenUsageLog-BKRoMStq.mjs → useGuesTokenUsageLog-CnSD-6lW.mjs} +1 -1
- package/dist/{usePublishArchivedMetrics-Dy6GFoJd.mjs → usePublishArchivedMetrics-BcU_rQD-.mjs} +2 -2
- package/dist/{useQuery-CG_0Pgxy.mjs → useQuery-RHy8b20f.mjs} +1 -1
- package/dist/webcomponents.css +1 -1
- package/dist/webcomponents.es.js +908 -894
- package/dist/webcomponents.umd.js +185 -185
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@ import "react";
|
|
|
2
2
|
import "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
4
|
import { a as e, i as t, o as n, r, t as i } from "./rolldown-runtime-C1JUX4Ur.mjs";
|
|
5
|
-
import { Ai as a, Cr as o, Ea as s, Gi as c, H as l, Lr as u, On as d, Qr as f, Sn as p, Sr as m, Va as h, Yt as g, _r as _, a as v, d as y, eo as b, kn as ee, l as x, la as S, mi as C, pi as w, so as T, y as te } from "./Portal-
|
|
6
|
-
import { a as ne, c as E, d as re, h as ie, i as ae, n as oe, o as se, r as D, s as O, t as k, u as ce } from "./toTasteAppearance-
|
|
7
|
-
import { $ as A, A as j, G as M, J as le, O as ue, Q as de, S as N, X as P, Y as fe, Z as pe } from "./option-
|
|
8
|
-
import { g as me, m as he, p as ge, r as _e, t as ve, y as ye } from "./timeseries-
|
|
5
|
+
import { Ai as a, Cr as o, Ea as s, Gi as c, H as l, Lr as u, On as d, Qr as f, Sn as p, Sr as m, Va as h, Yt as g, _r as _, a as v, d as y, eo as b, kn as ee, l as x, la as S, mi as C, pi as w, so as T, y as te } from "./Portal-CpcoFb_x.mjs";
|
|
6
|
+
import { a as ne, c as E, d as re, h as ie, i as ae, n as oe, o as se, r as D, s as O, t as k, u as ce } from "./toTasteAppearance-D2kAi7f8.mjs";
|
|
7
|
+
import { $ as A, A as j, G as M, J as le, O as ue, Q as de, S as N, X as P, Y as fe, Z as pe } from "./option-CXFO2qbo.mjs";
|
|
8
|
+
import { g as me, m as he, p as ge, r as _e, t as ve, y as ye } from "./timeseries-DRtMZG1l.mjs";
|
|
9
9
|
import { n as be } from "./text-CtrvkDIo.mjs";
|
|
10
10
|
import { $ as xe, $r as Se, Ar as Ce, C as we, Cs as Te, D as Ee, Do as De, Dr as Oe, E as ke, Ec as F, Er as I, Fc as Ae, Fs as je, Ft as Me, Gt as Ne, Hi as Pe, Ii as Fe, Ka as Ie, Kr as L, L as Le, Ln as Re, M as ze, Nc as Be, O as Ve, Oo as He, Or as Ue, Pi as We, Qa as Ge, Qr as Ke, Rc as qe, S as Je, So as Ye, T as R, Tc as Xe, Vc as Ze, Vr as Qe, Wa as $e, Wc as et, Xa as tt, Xc as nt, Xn as rt, Xr as it, Ya as at, Yr as z, Za as ot, Zr as st, _ as ct, _r as lt, a as ut, ai as dt, b as ft, bc as pt, bo as mt, br as ht, c as gt, d as _t, dc as vt, dr as yt, ei as bt, el as xt, eo as St, er as Ct, et as wt, f as Tt, fc as Et, fi as Dt, fr as Ot, g as kt, gc as At, go as jt, h as Mt, hc as Nt, ho as Pt, i as Ft, ii as It, it as Lt, jr as Rt, kc as zt, l as Bt, lc as Vt, m as Ht, mo as Ut, n as Wt, ni as Gt, no as Kt, nt as qt, o as Jt, oi as Yt, p as Xt, po as Zt, qn as Qt, qr as $t, r as en, ri as tn, ro as nn, rs as rn, s as an, t as on, ti as sn, tl as cn, u as ln, ur as un, v as dn, vc as fn, vn as pn, vo as mn, vr as hn, w as gn, wc as _n, wo as vn, x as yn, xc as bn, xo as xn, xr as Sn, y as Cn, yo as wn, zc as Tn, zi as En } from "./echarts-CrmHGsP0.mjs";
|
|
11
11
|
import { t as Dn } from "./SeriesData-Bv5A1N4c.mjs";
|
|
@@ -17,13 +17,13 @@ import { n as Fn, t as In } from "./Axis-9fJG6_xT.mjs";
|
|
|
17
17
|
import { n as Ln } from "./axisNiceTicks-CggqNl9O.mjs";
|
|
18
18
|
import { t as Rn } from "./extension-CLVYoN7B.mjs";
|
|
19
19
|
import { c as zn } from "./install-C_kPiY2Z.mjs";
|
|
20
|
-
import { t as B } from "./NoDataFound-
|
|
21
|
-
import { n as Bn, t as Vn } from "./Accordion-
|
|
20
|
+
import { t as B } from "./NoDataFound-BTAax-t-.mjs";
|
|
21
|
+
import { n as Bn, t as Vn } from "./Accordion-DM0CpE4-.mjs";
|
|
22
22
|
import { a as Hn, i as Un } from "./tslib.es6-D6qdqxsl.mjs";
|
|
23
23
|
import { n as Wn, t as Gn } from "./esm-B2ERA78g.mjs";
|
|
24
24
|
import { a as Kn, i as qn, n as Jn, o as Yn, r as Xn, t as Zn } from "./dist-DHNl58qD.mjs";
|
|
25
25
|
import { n as Qn, r as $n } from "./cardActions-DEbl3R_a.mjs";
|
|
26
|
-
import { t as er } from "./conditionalFormatting-
|
|
26
|
+
import { t as er } from "./conditionalFormatting-DFbGk4vC.mjs";
|
|
27
27
|
import { t as tr } from "./Loader-CHJMbWv0.mjs";
|
|
28
28
|
import { t as V } from "./list.module-DmT9azvq.mjs";
|
|
29
29
|
import { n as nr, o as rr } from "./canvasTeardown-CyI2ZHcq.mjs";
|
|
@@ -219,20 +219,45 @@ var Er = /* @__PURE__ */ r({
|
|
|
219
219
|
version: () => Ve,
|
|
220
220
|
zrUtil: () => nt,
|
|
221
221
|
zrender: () => De
|
|
222
|
-
})
|
|
222
|
+
}), Dr = (e) => e.endsWith("center") && e.startsWith("left") ? "dbn:text-left" : e.endsWith("center") && e.startsWith("right") ? "dbn:text-right" : e.endsWith("center") ? "dbn:text-center" : e.endsWith("right") ? "dbn:text-right" : "dbn:text-left", Or = ({ customSettings: e, children: t }) => {
|
|
223
|
+
let n = e?.chartTitle?.trim(), r = e?.chartDesc?.trim();
|
|
224
|
+
if (!e?.enableTitleDesc || !n && !r) return /* @__PURE__ */ q(dr, { children: t });
|
|
225
|
+
let i = e.titlePosition || "top-left", a = /* @__PURE__ */ J("div", {
|
|
226
|
+
className: `dbn:shrink-0 dbn:px-1 dbn:py-1 dbn:break-words ${Dr(i)}`,
|
|
227
|
+
"data-testid": "chart-title-caption",
|
|
228
|
+
children: [n ? /* @__PURE__ */ q("p", {
|
|
229
|
+
className: "dbn:m-0 dbn:text-sm dbn:font-semibold dbn:leading-snug",
|
|
230
|
+
children: n
|
|
231
|
+
}) : null, r ? /* @__PURE__ */ q("p", {
|
|
232
|
+
className: "dbn:m-0 dbn:whitespace-pre-line dbn:text-xs dbn:leading-snug dbn:opacity-70",
|
|
233
|
+
children: r
|
|
234
|
+
}) : null]
|
|
235
|
+
}), o = i.startsWith("bottom");
|
|
236
|
+
return /* @__PURE__ */ J("div", {
|
|
237
|
+
className: "dbn:flex dbn:h-full dbn:w-full dbn:min-h-0 dbn:flex-col",
|
|
238
|
+
children: [
|
|
239
|
+
o ? null : a,
|
|
240
|
+
/* @__PURE__ */ q("div", {
|
|
241
|
+
className: "dbn:min-h-0 dbn:w-full dbn:flex-1",
|
|
242
|
+
children: t
|
|
243
|
+
}),
|
|
244
|
+
o ? a : null
|
|
245
|
+
]
|
|
246
|
+
});
|
|
247
|
+
};
|
|
223
248
|
//#endregion
|
|
224
249
|
//#region src/charts/chartMinHeight.ts
|
|
225
|
-
function
|
|
250
|
+
function kr(e) {
|
|
226
251
|
let t = e ? E[e] : void 0;
|
|
227
252
|
return t ? P(t) : 200;
|
|
228
253
|
}
|
|
229
254
|
//#endregion
|
|
230
255
|
//#region src/charts/echarts6Compatibility.ts
|
|
231
|
-
var
|
|
256
|
+
var Ar = /* @__PURE__ */ new WeakMap(), jr = (e) => typeof e == "object" && !!e && !Array.isArray(e), Mr = (e, t) => Array.isArray(e) ? e.map((e) => jr(e) ? t(e) : e) : jr(e) ? t(e) : e, Nr = (e) => ({
|
|
232
257
|
...e,
|
|
233
258
|
outerBoundsMode: e.outerBoundsMode === void 0 ? "none" : e.outerBoundsMode
|
|
234
|
-
}),
|
|
235
|
-
let t =
|
|
259
|
+
}), Pr = (e) => {
|
|
260
|
+
let t = jr(e.axisLabel) ? e.axisLabel : {};
|
|
236
261
|
return {
|
|
237
262
|
...e,
|
|
238
263
|
containShape: e.containShape !== void 0 && e.containShape,
|
|
@@ -241,21 +266,21 @@ var Or = /* @__PURE__ */ new WeakMap(), kr = (e) => typeof e == "object" && !!e
|
|
|
241
266
|
nameMoveOverlap: t.nameMoveOverlap !== void 0 && t.nameMoveOverlap
|
|
242
267
|
}
|
|
243
268
|
};
|
|
244
|
-
},
|
|
245
|
-
if (!
|
|
246
|
-
let t =
|
|
269
|
+
}, Fr = (e) => {
|
|
270
|
+
if (!jr(e)) return e;
|
|
271
|
+
let t = Ar.get(e);
|
|
247
272
|
if (t !== void 0) return t;
|
|
248
273
|
let n = {
|
|
249
274
|
...e,
|
|
250
275
|
legacyViewCoordSysCenterBase: e.legacyViewCoordSysCenterBase === void 0 || e.legacyViewCoordSysCenterBase,
|
|
251
276
|
richInheritPlainLabel: e.richInheritPlainLabel !== void 0 && e.richInheritPlainLabel
|
|
252
277
|
};
|
|
253
|
-
return e.grid !== void 0 && (n.grid =
|
|
254
|
-
},
|
|
278
|
+
return e.grid !== void 0 && (n.grid = Mr(e.grid, Nr)), e.xAxis !== void 0 && (n.xAxis = Mr(e.xAxis, Pr)), e.yAxis !== void 0 && (n.yAxis = Mr(e.yAxis, Pr)), Ar.set(e, n), n;
|
|
279
|
+
}, Ir = [
|
|
255
280
|
h.pie,
|
|
256
281
|
h.doughnut,
|
|
257
282
|
h.rose
|
|
258
|
-
],
|
|
283
|
+
], Lr = [
|
|
259
284
|
"top-left",
|
|
260
285
|
"top-center",
|
|
261
286
|
"top-right",
|
|
@@ -264,27 +289,27 @@ var Or = /* @__PURE__ */ new WeakMap(), kr = (e) => typeof e == "object" && !!e
|
|
|
264
289
|
"bottom-right",
|
|
265
290
|
"left",
|
|
266
291
|
"right"
|
|
267
|
-
],
|
|
292
|
+
], Rr = (e) => e && Lr.includes(e) ? e : void 0, zr = (e) => e === "horizontal" || e === "vertical" ? e : void 0, Br = (e) => {
|
|
268
293
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
269
294
|
if (typeof e == "string" && e.trim() !== "") {
|
|
270
295
|
let t = Number(e);
|
|
271
296
|
return Number.isFinite(t) ? t : void 0;
|
|
272
297
|
}
|
|
273
|
-
},
|
|
298
|
+
}, Vr = (e) => {
|
|
274
299
|
let t = e.legendAppearance, n = e.legendSettings;
|
|
275
300
|
return {
|
|
276
301
|
show: t?.show ?? n?.show,
|
|
277
|
-
fixedPosition:
|
|
278
|
-
legendAppearance:
|
|
302
|
+
fixedPosition: Rr(t?.fixedPosition ?? n?.fixedPosition),
|
|
303
|
+
legendAppearance: zr(t?.legendAppearance ?? n?.position),
|
|
279
304
|
disableLegendScrolling: t?.disableLegendScrolling ?? n?.disableScroll,
|
|
280
305
|
truncateLegend: t?.truncateLegend ?? n?.truncateLegendValue,
|
|
281
|
-
fontSize:
|
|
306
|
+
fontSize: Br(t?.fontSize) ?? Br(n?.fontSize)
|
|
282
307
|
};
|
|
283
308
|
};
|
|
284
|
-
function
|
|
309
|
+
function Hr(e) {
|
|
285
310
|
let { chartType: t, canvas: n, legendLabels: r } = e;
|
|
286
|
-
if (!t || !
|
|
287
|
-
let i =
|
|
311
|
+
if (!t || !Ir.includes(t) || !n || !(n.width > 0) || !(n.height > 0) || !r || r.length === 0) return null;
|
|
312
|
+
let i = Vr(e);
|
|
288
313
|
if (i.show === !1) return null;
|
|
289
314
|
let a = M({
|
|
290
315
|
labels: r,
|
|
@@ -311,14 +336,14 @@ function Br(e) {
|
|
|
311
336
|
insetRightPx: a.reserveRightPx
|
|
312
337
|
};
|
|
313
338
|
}
|
|
314
|
-
var
|
|
339
|
+
var Ur = /* @__PURE__ */ new Set([
|
|
315
340
|
void 0,
|
|
316
341
|
"outside",
|
|
317
342
|
"outer"
|
|
318
|
-
]),
|
|
343
|
+
]), Wr = (e) => {
|
|
319
344
|
let t = Array.isArray(e) ? e[e.length - 1] : e, n = /^(\d+(?:\.\d+)?)%$/.exec(String(t ?? "").trim());
|
|
320
345
|
return n ? Number(n[1]) / 100 : 0;
|
|
321
|
-
},
|
|
346
|
+
}, Gr = (e) => !!e?.label?.show && Ur.has(e.label.position), Kr = (e) => {
|
|
322
347
|
let t = Array.isArray(e.data) ? e.data : [], n = e.label?.formatter;
|
|
323
348
|
return t.flatMap((e) => {
|
|
324
349
|
let t = e && typeof e == "object" ? e : {}, r = String(t.name ?? "");
|
|
@@ -332,20 +357,20 @@ var Vr = /* @__PURE__ */ new Set([
|
|
|
332
357
|
return r.split("\n");
|
|
333
358
|
});
|
|
334
359
|
};
|
|
335
|
-
function
|
|
360
|
+
function qr(e, t, n) {
|
|
336
361
|
let { chartType: r, canvas: i } = t;
|
|
337
|
-
if (!r || !
|
|
338
|
-
let a = e.filter(
|
|
362
|
+
if (!r || !Ir.includes(r) || !i || !(i.width > 0) || !(i.height > 0)) return null;
|
|
363
|
+
let a = e.filter(Gr);
|
|
339
364
|
if (a.length === 0 || n.centerX !== void 0 && !/%$/.test(n.centerX)) return null;
|
|
340
|
-
let o = Math.max(...e.map((e) =>
|
|
365
|
+
let o = Math.max(...e.map((e) => Wr(e?.radius))), s = a[0], c = N({
|
|
341
366
|
layout: i,
|
|
342
367
|
outerRadius: o * n.scale,
|
|
343
368
|
centerX: n.centerX,
|
|
344
369
|
insetLeftPx: n.insetLeftPx,
|
|
345
370
|
insetRightPx: n.insetRightPx,
|
|
346
|
-
labelLines: a.flatMap(
|
|
347
|
-
fontSizePx:
|
|
348
|
-
leaderPx: (
|
|
371
|
+
labelLines: a.flatMap(Kr),
|
|
372
|
+
fontSizePx: Br(s.label?.fontSize),
|
|
373
|
+
leaderPx: (Br(s.labelLine?.length) ?? 10) + (Br(s.labelLine?.length2) ?? 20)
|
|
349
374
|
});
|
|
350
375
|
return c.mode === "hidden" ? {
|
|
351
376
|
hide: !0,
|
|
@@ -355,21 +380,21 @@ function Gr(e, t, n) {
|
|
|
355
380
|
radiusScale: c.radiusScale
|
|
356
381
|
};
|
|
357
382
|
}
|
|
358
|
-
function
|
|
383
|
+
function Jr(e, t) {
|
|
359
384
|
if (!e) return e;
|
|
360
385
|
let n = e.series;
|
|
361
386
|
if (!Array.isArray(n) || n.length === 0) return e;
|
|
362
|
-
let r = e.legend?.data, i = Array.isArray(r) ? r.flat(2).filter((e) => e != null).map(String) : [], a = i.length > 0 ?
|
|
387
|
+
let r = e.legend?.data, i = Array.isArray(r) ? r.flat(2).filter((e) => e != null).map(String) : [], a = i.length > 0 ? Hr({
|
|
363
388
|
...t,
|
|
364
389
|
legendLabels: i
|
|
365
|
-
}) : null, o = a && !(a.center[0] === "50%" && a.center[1] === "50%" && a.radiusScale >= 1 && (e.legend?.type ?? "scroll") === a.legendType) ? a : null, s = n[0]?.center, c =
|
|
390
|
+
}) : null, o = a && !(a.center[0] === "50%" && a.center[1] === "50%" && a.radiusScale >= 1 && (e.legend?.type ?? "scroll") === a.legendType) ? a : null, s = n[0]?.center, c = qr(n, t, {
|
|
366
391
|
centerX: o ? o.center[0] : Array.isArray(s) ? String(s[0]) : void 0,
|
|
367
392
|
scale: o ? o.radiusScale : 1,
|
|
368
393
|
insetLeftPx: o?.insetLeftPx ?? 0,
|
|
369
394
|
insetRightPx: o?.insetRightPx ?? 0
|
|
370
395
|
});
|
|
371
396
|
if (!o && !c) return e;
|
|
372
|
-
let l = (o?.radiusScale ?? 1) * (c?.radiusScale ?? 1), u = !!c?.hide && e.legend?.show === !1 && n.some((e) => e &&
|
|
397
|
+
let l = (o?.radiusScale ?? 1) * (c?.radiusScale ?? 1), u = !!c?.hide && e.legend?.show === !1 && n.some((e) => e && Gr(e)), d = u ? l * .82 : l;
|
|
373
398
|
return {
|
|
374
399
|
...e,
|
|
375
400
|
...o ? { legend: {
|
|
@@ -390,7 +415,7 @@ function Kr(e, t) {
|
|
|
390
415
|
...o ? { center: o.center } : {},
|
|
391
416
|
...u ? { center: [(o?.center ?? e.center ?? ["50%", "50%"])[0], "44%"] } : {},
|
|
392
417
|
...e.radius !== void 0 && d < 1 ? { radius: j(e.radius, d) } : {},
|
|
393
|
-
...c?.hide &&
|
|
418
|
+
...c?.hide && Gr(e) ? {
|
|
394
419
|
label: {
|
|
395
420
|
...e.label,
|
|
396
421
|
show: !1
|
|
@@ -405,13 +430,13 @@ function Kr(e, t) {
|
|
|
405
430
|
}
|
|
406
431
|
//#endregion
|
|
407
432
|
//#region src/charts/withMetricChartAppearance.ts
|
|
408
|
-
var
|
|
433
|
+
var Yr = [
|
|
409
434
|
"top",
|
|
410
435
|
"left",
|
|
411
436
|
"right",
|
|
412
437
|
"bottom",
|
|
413
438
|
"inside"
|
|
414
|
-
],
|
|
439
|
+
], Xr = [
|
|
415
440
|
"top-left",
|
|
416
441
|
"top-center",
|
|
417
442
|
"top-right",
|
|
@@ -420,7 +445,7 @@ var qr = [
|
|
|
420
445
|
"bottom-left",
|
|
421
446
|
"bottom-center",
|
|
422
447
|
"bottom-right"
|
|
423
|
-
],
|
|
448
|
+
], Zr = [
|
|
424
449
|
"circle",
|
|
425
450
|
"rect",
|
|
426
451
|
"roundRect",
|
|
@@ -428,34 +453,34 @@ var qr = [
|
|
|
428
453
|
"diamond",
|
|
429
454
|
"arrow",
|
|
430
455
|
"none"
|
|
431
|
-
],
|
|
456
|
+
], Qr = (e) => e != null, $r = (e) => {
|
|
432
457
|
let t = e?.position;
|
|
433
|
-
if (t && t !== "hidden" &&
|
|
434
|
-
},
|
|
458
|
+
if (t && t !== "hidden" && Yr.includes(t)) return { position: t };
|
|
459
|
+
}, ei = (e) => {
|
|
435
460
|
if (!e) return;
|
|
436
461
|
let t = f.legendSettings ?? {}, n = {};
|
|
437
|
-
return e.show === !1 && (n.show = !1), e.fixedPosition && e.fixedPosition !== t.fixedPosition &&
|
|
438
|
-
},
|
|
462
|
+
return e.show === !1 && (n.show = !1), e.fixedPosition && e.fixedPosition !== t.fixedPosition && Xr.includes(e.fixedPosition) && (n.fixedPosition = e.fixedPosition), e.position === "vertical" && (n.legendAppearance = "vertical"), e.legendShape && e.legendShape !== t.legendShape && Zr.includes(e.legendShape) && (n.legendShape = e.legendShape), Qr(e.truncateLegendValue) && e.truncateLegendValue !== t.truncateLegendValue && (n.truncateLegend = e.truncateLegendValue), e.disableScroll === !0 && (n.disableLegendScrolling = !0), e.customise === !0 && (n.enableVariablePosition = !0, n.top = e.top, n.left = e.left), Object.keys(n).length ? n : void 0;
|
|
463
|
+
}, ti = (e, t) => {
|
|
439
464
|
if (!t) return e;
|
|
440
465
|
if (!e) return t;
|
|
441
466
|
let n = { ...t };
|
|
442
|
-
for (let [t, r] of Object.entries(e))
|
|
467
|
+
for (let [t, r] of Object.entries(e)) Qr(r) && (n[t] = r);
|
|
443
468
|
return n;
|
|
444
|
-
},
|
|
445
|
-
let n =
|
|
469
|
+
}, ni = (e, t) => {
|
|
470
|
+
let n = ti(e?.chartLabel, $r(t?.labelSettings)), r = ti(e?.chartLegend, ei(t?.legendSettings));
|
|
446
471
|
return n === e?.chartLabel && r === e?.chartLegend ? e : {
|
|
447
472
|
...e,
|
|
448
473
|
...n ? { chartLabel: n } : {},
|
|
449
474
|
...r ? { chartLegend: r } : {}
|
|
450
475
|
};
|
|
451
|
-
},
|
|
452
|
-
function
|
|
476
|
+
}, ri = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, ii = /^[\\/]{2}/;
|
|
477
|
+
function ai(e, t) {
|
|
453
478
|
return t + e.replace(/\\/g, "/");
|
|
454
479
|
}
|
|
455
480
|
function Y(e, t) {
|
|
456
481
|
if (e === !1 || e == null) throw Error(t);
|
|
457
482
|
}
|
|
458
|
-
function
|
|
483
|
+
function oi(e, t) {
|
|
459
484
|
if (!e) {
|
|
460
485
|
typeof console < "u" && console.warn(t);
|
|
461
486
|
try {
|
|
@@ -463,10 +488,10 @@ function ii(e, t) {
|
|
|
463
488
|
} catch {}
|
|
464
489
|
}
|
|
465
490
|
}
|
|
466
|
-
function
|
|
491
|
+
function si({ pathname: e = "/", search: t = "", hash: n = "" }) {
|
|
467
492
|
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
468
493
|
}
|
|
469
|
-
function
|
|
494
|
+
function ci(e) {
|
|
470
495
|
let t = {};
|
|
471
496
|
if (e) {
|
|
472
497
|
let n = e.indexOf("#");
|
|
@@ -476,21 +501,21 @@ function oi(e) {
|
|
|
476
501
|
}
|
|
477
502
|
return t;
|
|
478
503
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
504
|
+
function li(e, t, n = "/") {
|
|
505
|
+
return ui(e, t, n, !1);
|
|
481
506
|
}
|
|
482
|
-
function
|
|
483
|
-
let a =
|
|
507
|
+
function ui(e, t, n, r, i) {
|
|
508
|
+
let a = ki((typeof t == "string" ? ci(t) : t).pathname || "/", n);
|
|
484
509
|
if (a == null) return null;
|
|
485
|
-
let o = i ??
|
|
486
|
-
for (let e = 0; s == null && e < o.length; ++e) s =
|
|
510
|
+
let o = i ?? di(e), s = null, c = Oi(a);
|
|
511
|
+
for (let e = 0; s == null && e < o.length; ++e) s = wi(o[e], c, r);
|
|
487
512
|
return s;
|
|
488
513
|
}
|
|
489
|
-
function
|
|
490
|
-
let t =
|
|
491
|
-
return
|
|
514
|
+
function di(e) {
|
|
515
|
+
let t = fi(e);
|
|
516
|
+
return mi(t), t;
|
|
492
517
|
}
|
|
493
|
-
function
|
|
518
|
+
function fi(e, t = [], n = [], r = "", i = !1) {
|
|
494
519
|
let a = (e, a, o = i, s) => {
|
|
495
520
|
let c = {
|
|
496
521
|
relativePath: s === void 0 ? e.path || "" : s,
|
|
@@ -503,11 +528,11 @@ function ui(e, t = [], n = [], r = "", i = !1) {
|
|
|
503
528
|
Y(c.relativePath.startsWith(r), `Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), c.relativePath = c.relativePath.slice(r.length);
|
|
504
529
|
}
|
|
505
530
|
let l = X([r, c.relativePath]), u = n.concat(c);
|
|
506
|
-
e.children && e.children.length > 0 && (Y(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`),
|
|
531
|
+
e.children && e.children.length > 0 && (Y(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), fi(e.children, t, u, l, o)), (e.path != null || e.index) && t.push({
|
|
507
532
|
path: l,
|
|
508
|
-
score:
|
|
533
|
+
score: Si(l, e.index),
|
|
509
534
|
routesMeta: u.map((e, t) => {
|
|
510
|
-
let [n, r] =
|
|
535
|
+
let [n, r] = Di(e.relativePath, e.caseSensitive, t === u.length - 1);
|
|
511
536
|
return {
|
|
512
537
|
...e,
|
|
513
538
|
matcher: n,
|
|
@@ -518,37 +543,37 @@ function ui(e, t = [], n = [], r = "", i = !1) {
|
|
|
518
543
|
};
|
|
519
544
|
return e.forEach((e, t) => {
|
|
520
545
|
if (e.path === "" || !e.path?.includes("?")) a(e, t);
|
|
521
|
-
else for (let n of
|
|
546
|
+
else for (let n of pi(e.path)) a(e, t, !0, n);
|
|
522
547
|
}), t;
|
|
523
548
|
}
|
|
524
|
-
function
|
|
549
|
+
function pi(e) {
|
|
525
550
|
let t = e.split("/");
|
|
526
551
|
if (t.length === 0) return [];
|
|
527
552
|
let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
|
|
528
553
|
if (r.length === 0) return i ? [a, ""] : [a];
|
|
529
|
-
let o =
|
|
554
|
+
let o = pi(r.join("/")), s = [];
|
|
530
555
|
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
|
|
531
556
|
}
|
|
532
|
-
function
|
|
533
|
-
e.sort((e, t) => e.score === t.score ?
|
|
557
|
+
function mi(e) {
|
|
558
|
+
e.sort((e, t) => e.score === t.score ? Ci(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
|
|
534
559
|
}
|
|
535
|
-
var
|
|
536
|
-
function
|
|
560
|
+
var hi = /^:[\w-]+$/, gi = 3, _i = 2, vi = 1, yi = 10, bi = -2, xi = (e) => e === "*";
|
|
561
|
+
function Si(e, t) {
|
|
537
562
|
let n = e.split("/"), r = n.length;
|
|
538
|
-
return n.some(
|
|
563
|
+
return n.some(xi) && (r += bi), t && (r += _i), n.filter((e) => !xi(e)).reduce((e, t) => e + (hi.test(t) ? gi : t === "" ? vi : yi), r);
|
|
539
564
|
}
|
|
540
|
-
function
|
|
565
|
+
function Ci(e, t) {
|
|
541
566
|
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
|
|
542
567
|
}
|
|
543
|
-
function
|
|
568
|
+
function wi(e, t, n = !1) {
|
|
544
569
|
let { routesMeta: r } = e, i = {}, a = "/", o = [];
|
|
545
570
|
for (let e = 0; e < r.length; ++e) {
|
|
546
571
|
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
|
|
547
572
|
path: s.relativePath,
|
|
548
573
|
caseSensitive: s.caseSensitive,
|
|
549
574
|
end: c
|
|
550
|
-
}, d = s.matcher && s.compiledParams ?
|
|
551
|
-
if (!d && c && n && !r[r.length - 1].route.index && (d =
|
|
575
|
+
}, d = s.matcher && s.compiledParams ? Ei(u, l, s.matcher, s.compiledParams) : Ti(u, l), f = s.route;
|
|
576
|
+
if (!d && c && n && !r[r.length - 1].route.index && (d = Ti({
|
|
552
577
|
path: s.relativePath,
|
|
553
578
|
caseSensitive: s.caseSensitive,
|
|
554
579
|
end: !1
|
|
@@ -556,30 +581,30 @@ function Si(e, t, n = !1) {
|
|
|
556
581
|
Object.assign(i, d.params), o.push({
|
|
557
582
|
params: i,
|
|
558
583
|
pathname: X([a, d.pathname]),
|
|
559
|
-
pathnameBase:
|
|
584
|
+
pathnameBase: Ri(X([a, d.pathnameBase])),
|
|
560
585
|
route: f
|
|
561
586
|
}), d.pathnameBase !== "/" && (a = X([a, d.pathnameBase]));
|
|
562
587
|
}
|
|
563
588
|
return o;
|
|
564
589
|
}
|
|
565
|
-
function
|
|
590
|
+
function Ti(e, t) {
|
|
566
591
|
typeof e == "string" && (e = {
|
|
567
592
|
path: e,
|
|
568
593
|
caseSensitive: !1,
|
|
569
594
|
end: !0
|
|
570
595
|
});
|
|
571
|
-
let [n, r] =
|
|
572
|
-
return
|
|
596
|
+
let [n, r] = Di(e.path, e.caseSensitive, e.end);
|
|
597
|
+
return Ei(e, t, n, r);
|
|
573
598
|
}
|
|
574
|
-
function
|
|
599
|
+
function Ei(e, t, n, r) {
|
|
575
600
|
let i = t.match(n);
|
|
576
601
|
if (!i) return null;
|
|
577
|
-
let a = i[0], o =
|
|
602
|
+
let a = i[0], o = Li(a, 1), s = i.slice(1);
|
|
578
603
|
return {
|
|
579
604
|
params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
|
|
580
605
|
if (t === "*") {
|
|
581
606
|
let e = s[r] || "";
|
|
582
|
-
o =
|
|
607
|
+
o = Li(a.slice(0, a.length - e.length), 1);
|
|
583
608
|
}
|
|
584
609
|
let i = s[r];
|
|
585
610
|
return e[t] = n && !i ? void 0 : (i || "").replace(/%2F/g, "/"), e;
|
|
@@ -589,8 +614,8 @@ function wi(e, t, n, r) {
|
|
|
589
614
|
pattern: e
|
|
590
615
|
};
|
|
591
616
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
617
|
+
function Di(e, t = !1, n = !0) {
|
|
618
|
+
oi(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
|
|
594
619
|
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
|
|
595
620
|
if (r.push({
|
|
596
621
|
paramName: t,
|
|
@@ -603,46 +628,46 @@ function Ti(e, t = !1, n = !0) {
|
|
|
603
628
|
}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
604
629
|
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
|
|
605
630
|
}
|
|
606
|
-
function
|
|
631
|
+
function Oi(e) {
|
|
607
632
|
try {
|
|
608
633
|
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
|
|
609
634
|
} catch (t) {
|
|
610
|
-
return
|
|
635
|
+
return oi(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
|
|
611
636
|
}
|
|
612
637
|
}
|
|
613
|
-
function
|
|
638
|
+
function ki(e, t) {
|
|
614
639
|
if (t === "/") return e;
|
|
615
640
|
if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
|
|
616
641
|
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
|
|
617
642
|
return r && r !== "/" ? null : e.slice(n) || "/";
|
|
618
643
|
}
|
|
619
|
-
function
|
|
620
|
-
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ?
|
|
621
|
-
return n ? (n =
|
|
644
|
+
function Ai(e, t = "/") {
|
|
645
|
+
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? ci(e) : e, a;
|
|
646
|
+
return n ? (n = Ii(n), a = n.startsWith("/") || n.startsWith("\\") ? ji(n.substring(1), "/") : ji(n, t)) : a = t, {
|
|
622
647
|
pathname: a,
|
|
623
|
-
search:
|
|
624
|
-
hash:
|
|
648
|
+
search: zi(r),
|
|
649
|
+
hash: Bi(i)
|
|
625
650
|
};
|
|
626
651
|
}
|
|
627
|
-
function
|
|
628
|
-
let n =
|
|
652
|
+
function ji(e, t) {
|
|
653
|
+
let n = Li(t).split("/");
|
|
629
654
|
return e.split("/").forEach((e) => {
|
|
630
655
|
e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
|
|
631
656
|
}), n.length > 1 ? n.join("/") : "/";
|
|
632
657
|
}
|
|
633
|
-
function
|
|
658
|
+
function Mi(e, t, n, r) {
|
|
634
659
|
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
635
660
|
}
|
|
636
|
-
function
|
|
661
|
+
function Ni(e) {
|
|
637
662
|
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
|
|
638
663
|
}
|
|
639
|
-
function
|
|
640
|
-
let t =
|
|
664
|
+
function Pi(e) {
|
|
665
|
+
let t = Ni(e);
|
|
641
666
|
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
|
|
642
667
|
}
|
|
643
|
-
function
|
|
668
|
+
function Fi(e, t, n, r = !1) {
|
|
644
669
|
let i;
|
|
645
|
-
typeof e == "string" ? i =
|
|
670
|
+
typeof e == "string" ? i = ci(e) : (i = { ...e }, Y(!i.pathname || !i.pathname.includes("?"), Mi("?", "pathname", "search", i)), Y(!i.pathname || !i.pathname.includes("#"), Mi("#", "pathname", "hash", i)), Y(!i.search || !i.search.includes("#"), Mi("#", "search", "hash", i)));
|
|
646
671
|
let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
|
|
647
672
|
if (o == null) s = n;
|
|
648
673
|
else {
|
|
@@ -654,40 +679,40 @@ function Ni(e, t, n, r = !1) {
|
|
|
654
679
|
}
|
|
655
680
|
s = e >= 0 ? t[e] : "/";
|
|
656
681
|
}
|
|
657
|
-
let c =
|
|
682
|
+
let c = Ai(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
|
|
658
683
|
return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
|
|
659
684
|
}
|
|
660
|
-
var
|
|
661
|
-
function
|
|
685
|
+
var Ii = (e) => e.replace(/[\\/]{2,}/g, "/"), X = (e) => Ii(e.join("/"));
|
|
686
|
+
function Li(e, t = 0) {
|
|
662
687
|
let n = e.length;
|
|
663
688
|
for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
|
|
664
689
|
return n === e.length ? e : e.slice(0, n);
|
|
665
690
|
}
|
|
666
|
-
var
|
|
691
|
+
var Ri = (e) => Li(e).replace(/^\/*/, "/"), zi = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Bi = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, Vi = class {
|
|
667
692
|
constructor(e, t, n, r = !1) {
|
|
668
693
|
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
669
694
|
}
|
|
670
695
|
};
|
|
671
|
-
function
|
|
696
|
+
function Hi(e) {
|
|
672
697
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
673
698
|
}
|
|
674
|
-
function
|
|
699
|
+
function Ui(e) {
|
|
675
700
|
return X(e.map((e) => e.route.path).filter(Boolean)) || "/";
|
|
676
701
|
}
|
|
677
|
-
var
|
|
678
|
-
function
|
|
702
|
+
var Wi = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
703
|
+
function Gi(e, t) {
|
|
679
704
|
let n = e;
|
|
680
|
-
if (typeof n != "string" || !
|
|
705
|
+
if (typeof n != "string" || !ri.test(n)) return {
|
|
681
706
|
absoluteURL: void 0,
|
|
682
707
|
isExternal: !1,
|
|
683
708
|
to: n
|
|
684
709
|
};
|
|
685
710
|
let r = n, i = !1;
|
|
686
|
-
if (
|
|
687
|
-
let e = new URL(window.location.href), r =
|
|
711
|
+
if (Wi) try {
|
|
712
|
+
let e = new URL(window.location.href), r = ii.test(n) ? new URL(ai(n, e.protocol)) : new URL(n), a = ki(r.pathname, t);
|
|
688
713
|
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
|
|
689
714
|
} catch {
|
|
690
|
-
|
|
715
|
+
oi(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
|
|
691
716
|
}
|
|
692
717
|
return {
|
|
693
718
|
absoluteURL: r,
|
|
@@ -696,43 +721,43 @@ function Ui(e, t) {
|
|
|
696
721
|
};
|
|
697
722
|
}
|
|
698
723
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
699
|
-
var
|
|
700
|
-
function
|
|
724
|
+
var Ki = new URL("http://localhost");
|
|
725
|
+
function qi(e) {
|
|
701
726
|
if (e.createURL) return e.createURL("/");
|
|
702
727
|
try {
|
|
703
|
-
return new URL(e.createHref("/"),
|
|
728
|
+
return new URL(e.createHref("/"), Ki);
|
|
704
729
|
} catch {
|
|
705
|
-
return
|
|
730
|
+
return Ki;
|
|
706
731
|
}
|
|
707
732
|
}
|
|
708
|
-
function
|
|
733
|
+
function Ji(e, t) {
|
|
709
734
|
return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
|
|
710
735
|
}
|
|
711
|
-
function
|
|
736
|
+
function Yi(e, t) {
|
|
712
737
|
if (e.startsWith("//")) return !0;
|
|
713
738
|
let n = t.protocol.toLowerCase();
|
|
714
739
|
return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
|
|
715
740
|
}
|
|
716
|
-
function
|
|
741
|
+
function Xi(e, t, n, r) {
|
|
717
742
|
let i = null;
|
|
718
743
|
try {
|
|
719
744
|
i = e == null ? null : new URL(e, n);
|
|
720
745
|
} catch {}
|
|
721
|
-
let a = new URL(t, n), o = i != null && !
|
|
746
|
+
let a = new URL(t, n), o = i != null && !Ji(i, n), s = !Ji(a, n);
|
|
722
747
|
if (r === "reject") {
|
|
723
748
|
if (o || s) throw Error("External navigation is not allowed");
|
|
724
|
-
} else if (s && (i == null || !
|
|
749
|
+
} else if (s && (i == null || !Yi(e, i) || !Ji(i, a))) throw Error("External navigation is not allowed");
|
|
725
750
|
}
|
|
726
|
-
var
|
|
751
|
+
var Zi = [
|
|
727
752
|
"POST",
|
|
728
753
|
"PUT",
|
|
729
754
|
"PATCH",
|
|
730
755
|
"DELETE"
|
|
731
756
|
];
|
|
732
|
-
new Set(
|
|
733
|
-
var
|
|
734
|
-
new Set(
|
|
735
|
-
var
|
|
757
|
+
new Set(Zi);
|
|
758
|
+
var Qi = ["GET", ...Zi];
|
|
759
|
+
new Set(Qi);
|
|
760
|
+
var $i = [
|
|
736
761
|
"about:",
|
|
737
762
|
"blob:",
|
|
738
763
|
"chrome:",
|
|
@@ -744,88 +769,88 @@ var Zi = [
|
|
|
744
769
|
"filesystem:",
|
|
745
770
|
"javascript:"
|
|
746
771
|
];
|
|
747
|
-
function
|
|
772
|
+
function ea(e) {
|
|
748
773
|
try {
|
|
749
|
-
return
|
|
774
|
+
return $i.includes(new URL(e).protocol);
|
|
750
775
|
} catch {
|
|
751
776
|
return !1;
|
|
752
777
|
}
|
|
753
778
|
}
|
|
754
|
-
var
|
|
755
|
-
|
|
756
|
-
var
|
|
757
|
-
|
|
758
|
-
var
|
|
759
|
-
function
|
|
760
|
-
return H.useContext(
|
|
779
|
+
var ta = H.createContext(null);
|
|
780
|
+
ta.displayName = "DataRouter";
|
|
781
|
+
var na = H.createContext(null);
|
|
782
|
+
na.displayName = "DataRouterState";
|
|
783
|
+
var ra = H.createContext(!1);
|
|
784
|
+
function ia() {
|
|
785
|
+
return H.useContext(ra);
|
|
761
786
|
}
|
|
762
|
-
var
|
|
763
|
-
|
|
764
|
-
var
|
|
765
|
-
|
|
766
|
-
var
|
|
767
|
-
|
|
787
|
+
var aa = H.createContext({ isTransitioning: !1 });
|
|
788
|
+
aa.displayName = "ViewTransition";
|
|
789
|
+
var oa = H.createContext(/* @__PURE__ */ new Map());
|
|
790
|
+
oa.displayName = "Fetchers";
|
|
791
|
+
var sa = H.createContext(null);
|
|
792
|
+
sa.displayName = "Await";
|
|
768
793
|
var Z = H.createContext(null);
|
|
769
794
|
Z.displayName = "Navigation";
|
|
770
|
-
var
|
|
771
|
-
|
|
772
|
-
var
|
|
795
|
+
var ca = H.createContext(null);
|
|
796
|
+
ca.displayName = "Location";
|
|
797
|
+
var la = H.createContext({
|
|
773
798
|
outlet: null,
|
|
774
799
|
matches: [],
|
|
775
800
|
isDataRoute: !1
|
|
776
801
|
});
|
|
777
|
-
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
var
|
|
781
|
-
function
|
|
782
|
-
if (e.startsWith(`${
|
|
802
|
+
la.displayName = "Route";
|
|
803
|
+
var ua = H.createContext(null);
|
|
804
|
+
ua.displayName = "RouteError";
|
|
805
|
+
var da = "REACT_ROUTER_ERROR", fa = "REDIRECT", pa = "ROUTE_ERROR_RESPONSE";
|
|
806
|
+
function ma(e) {
|
|
807
|
+
if (e.startsWith(`${da}:${fa}:{`)) try {
|
|
783
808
|
let t = JSON.parse(e.slice(28));
|
|
784
809
|
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
|
|
785
810
|
} catch {}
|
|
786
811
|
}
|
|
787
|
-
function
|
|
788
|
-
if (e.startsWith(`${
|
|
812
|
+
function ha(e) {
|
|
813
|
+
if (e.startsWith(`${da}:${pa}:{`)) try {
|
|
789
814
|
let t = JSON.parse(e.slice(40));
|
|
790
|
-
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new
|
|
815
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new Vi(t.status, t.statusText, t.data);
|
|
791
816
|
} catch {}
|
|
792
817
|
}
|
|
793
|
-
function
|
|
794
|
-
Y(
|
|
795
|
-
let { basename: n, navigator: r } = H.useContext(Z), { hash: i, pathname: a, search: o } =
|
|
818
|
+
function ga(e, { relative: t } = {}) {
|
|
819
|
+
Y(_a(), "useHref() may be used only in the context of a <Router> component.");
|
|
820
|
+
let { basename: n, navigator: r } = H.useContext(Z), { hash: i, pathname: a, search: o } = Ca(e, { relative: t }), s = a;
|
|
796
821
|
return n !== "/" && (s = a === "/" ? n : X([n, a])), r.createHref({
|
|
797
822
|
pathname: s,
|
|
798
823
|
search: o,
|
|
799
824
|
hash: i
|
|
800
825
|
});
|
|
801
826
|
}
|
|
802
|
-
function
|
|
803
|
-
return H.useContext(
|
|
827
|
+
function _a() {
|
|
828
|
+
return H.useContext(ca) != null;
|
|
804
829
|
}
|
|
805
|
-
function
|
|
806
|
-
return Y(
|
|
830
|
+
function va() {
|
|
831
|
+
return Y(_a(), "useLocation() may be used only in the context of a <Router> component."), H.useContext(ca).location;
|
|
807
832
|
}
|
|
808
|
-
var
|
|
809
|
-
function
|
|
833
|
+
var ya = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
834
|
+
function ba(e) {
|
|
810
835
|
H.useContext(Z).static || H.useLayoutEffect(e);
|
|
811
836
|
}
|
|
812
|
-
function
|
|
813
|
-
let { isDataRoute: e } = H.useContext(
|
|
814
|
-
return e ?
|
|
837
|
+
function xa() {
|
|
838
|
+
let { isDataRoute: e } = H.useContext(la);
|
|
839
|
+
return e ? za() : Sa();
|
|
815
840
|
}
|
|
816
|
-
function
|
|
817
|
-
Y(
|
|
818
|
-
let e = H.useContext(
|
|
819
|
-
return
|
|
841
|
+
function Sa() {
|
|
842
|
+
Y(_a(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
843
|
+
let e = H.useContext(ta), { basename: t, navigator: n } = H.useContext(Z), { matches: r } = H.useContext(la), { pathname: i } = va(), a = JSON.stringify(Pi(r)), o = H.useRef(!1);
|
|
844
|
+
return ba(() => {
|
|
820
845
|
o.current = !0;
|
|
821
846
|
}), H.useCallback((r, s = {}) => {
|
|
822
|
-
if (
|
|
847
|
+
if (oi(o.current, ya), !o.current) return;
|
|
823
848
|
if (typeof r == "number") {
|
|
824
849
|
n.go(r);
|
|
825
850
|
return;
|
|
826
851
|
}
|
|
827
|
-
let c =
|
|
828
|
-
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : X([t, c.pathname])),
|
|
852
|
+
let c = Fi(r, JSON.parse(a), i, s.relative === "path");
|
|
853
|
+
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : X([t, c.pathname])), Xi(typeof r == "string" ? r : si(r), n.createHref(c), qi(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
|
|
829
854
|
}, [
|
|
830
855
|
t,
|
|
831
856
|
n,
|
|
@@ -835,27 +860,27 @@ function ba() {
|
|
|
835
860
|
]);
|
|
836
861
|
}
|
|
837
862
|
H.createContext(null);
|
|
838
|
-
function
|
|
839
|
-
let { matches: n } = H.useContext(
|
|
840
|
-
return H.useMemo(() =>
|
|
863
|
+
function Ca(e, { relative: t } = {}) {
|
|
864
|
+
let { matches: n } = H.useContext(la), { pathname: r } = va(), i = JSON.stringify(Pi(n));
|
|
865
|
+
return H.useMemo(() => Fi(e, JSON.parse(i), r, t === "path"), [
|
|
841
866
|
e,
|
|
842
867
|
i,
|
|
843
868
|
r,
|
|
844
869
|
t
|
|
845
870
|
]);
|
|
846
871
|
}
|
|
847
|
-
function
|
|
848
|
-
Y(
|
|
849
|
-
let { navigator: r } = H.useContext(Z), { matches: i } = H.useContext(
|
|
872
|
+
function wa(e, t, n) {
|
|
873
|
+
Y(_a(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
874
|
+
let { navigator: r } = H.useContext(Z), { matches: i } = H.useContext(la), a = i[i.length - 1], o = a ? a.params : {}, s = a ? a.pathname : "/", c = a ? a.pathnameBase : "/", l = a && a.route;
|
|
850
875
|
{
|
|
851
876
|
let e = l && l.path || "";
|
|
852
|
-
|
|
877
|
+
Va(s, !l || e.endsWith("*") || e.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
853
878
|
|
|
854
879
|
Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" : `${e}/*`}">.`);
|
|
855
880
|
}
|
|
856
|
-
let u =
|
|
881
|
+
let u = va(), d;
|
|
857
882
|
if (t) {
|
|
858
|
-
let e = typeof t == "string" ?
|
|
883
|
+
let e = typeof t == "string" ? ci(t) : t;
|
|
859
884
|
Y(c === "/" || e.pathname?.startsWith(c), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`), d = e;
|
|
860
885
|
} else d = u;
|
|
861
886
|
let f = d.pathname || "/", p = f;
|
|
@@ -863,14 +888,14 @@ Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" :
|
|
|
863
888
|
let e = c.replace(/^\//, "").split("/");
|
|
864
889
|
p = "/" + f.replace(/^\//, "").split("/").slice(e.length).join("/");
|
|
865
890
|
}
|
|
866
|
-
let m = n && n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) :
|
|
867
|
-
|
|
868
|
-
let h =
|
|
891
|
+
let m = n && n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : li(e, { pathname: p });
|
|
892
|
+
oi(l || m != null, `No routes matched location "${d.pathname}${d.search}${d.hash}" `), oi(m == null || m[m.length - 1].route.element !== void 0 || m[m.length - 1].route.Component !== void 0 || m[m.length - 1].route.lazy !== void 0, `Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
|
|
893
|
+
let h = ja(m && m.map((e) => Object.assign({}, e, {
|
|
869
894
|
params: Object.assign({}, o, e.params),
|
|
870
895
|
pathname: X([c, r.encodeLocation ? r.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
|
|
871
896
|
pathnameBase: e.pathnameBase === "/" ? c : X([c, r.encodeLocation ? r.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
|
|
872
897
|
})), i, n);
|
|
873
|
-
return t && h ? /* @__PURE__ */ H.createElement(
|
|
898
|
+
return t && h ? /* @__PURE__ */ H.createElement(ca.Provider, { value: {
|
|
874
899
|
location: {
|
|
875
900
|
pathname: "/",
|
|
876
901
|
search: "",
|
|
@@ -883,8 +908,8 @@ Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" :
|
|
|
883
908
|
navigationType: "POP"
|
|
884
909
|
} }, h) : h;
|
|
885
910
|
}
|
|
886
|
-
function
|
|
887
|
-
let e =
|
|
911
|
+
function Ta() {
|
|
912
|
+
let e = Ra(), t = Hi(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, r = "rgba(200,200,200, 0.5)", i = {
|
|
888
913
|
padding: "0.5rem",
|
|
889
914
|
backgroundColor: r
|
|
890
915
|
}, a = {
|
|
@@ -893,7 +918,7 @@ function Ca() {
|
|
|
893
918
|
}, o = null;
|
|
894
919
|
return console.error("Error handled by React Router default ErrorBoundary:", e), o = /* @__PURE__ */ H.createElement(H.Fragment, null, /* @__PURE__ */ H.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ H.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ H.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ H.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ H.createElement(H.Fragment, null, /* @__PURE__ */ H.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ H.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ H.createElement("pre", { style: i }, n) : null, o);
|
|
895
920
|
}
|
|
896
|
-
var
|
|
921
|
+
var Ea = /* @__PURE__ */ H.createElement(Ta, null), Da = class extends H.Component {
|
|
897
922
|
constructor(e) {
|
|
898
923
|
super(e), this.state = {
|
|
899
924
|
location: e.location,
|
|
@@ -921,32 +946,32 @@ var wa = /* @__PURE__ */ H.createElement(Ca, null), Ta = class extends H.Compone
|
|
|
921
946
|
render() {
|
|
922
947
|
let e = this.state.error;
|
|
923
948
|
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
924
|
-
let t =
|
|
949
|
+
let t = ha(e.digest);
|
|
925
950
|
t && (e = t);
|
|
926
951
|
}
|
|
927
|
-
let t = e === void 0 ? this.props.children : /* @__PURE__ */ H.createElement(
|
|
952
|
+
let t = e === void 0 ? this.props.children : /* @__PURE__ */ H.createElement(la.Provider, { value: this.props.routeContext }, /* @__PURE__ */ H.createElement(ua.Provider, {
|
|
928
953
|
value: e,
|
|
929
954
|
children: this.props.component
|
|
930
955
|
}));
|
|
931
|
-
return this.context ? /* @__PURE__ */ H.createElement(
|
|
956
|
+
return this.context ? /* @__PURE__ */ H.createElement(ka, { error: e }, t) : t;
|
|
932
957
|
}
|
|
933
958
|
};
|
|
934
|
-
|
|
935
|
-
var
|
|
936
|
-
function
|
|
959
|
+
Da.contextType = ra;
|
|
960
|
+
var Oa = /* @__PURE__ */ new WeakMap();
|
|
961
|
+
function ka({ children: e, error: t }) {
|
|
937
962
|
let { basename: n, navigator: r } = H.useContext(Z);
|
|
938
963
|
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
939
|
-
let e =
|
|
964
|
+
let e = ma(t.digest);
|
|
940
965
|
if (e) {
|
|
941
|
-
let i =
|
|
966
|
+
let i = Oa.get(t);
|
|
942
967
|
if (i) throw i;
|
|
943
|
-
let a =
|
|
944
|
-
if (
|
|
945
|
-
if (
|
|
968
|
+
let a = Gi(e.location, n), o = a.absoluteURL || a.to;
|
|
969
|
+
if (Xi(e.location, o, qi(r), "allow-explicit"), ea(o)) throw Error("Invalid redirect location");
|
|
970
|
+
if (Wi && !Oa.get(t)) {
|
|
946
971
|
if (a.isExternal || e.reloadDocument) window.location.href = o;
|
|
947
972
|
else {
|
|
948
973
|
let n = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(a.to, { replace: e.replace }));
|
|
949
|
-
throw
|
|
974
|
+
throw Oa.set(t, n), n;
|
|
950
975
|
}
|
|
951
976
|
}
|
|
952
977
|
return /* @__PURE__ */ H.createElement("meta", {
|
|
@@ -957,11 +982,11 @@ function Da({ children: e, error: t }) {
|
|
|
957
982
|
}
|
|
958
983
|
return e;
|
|
959
984
|
}
|
|
960
|
-
function
|
|
961
|
-
let r = H.useContext(
|
|
962
|
-
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ H.createElement(
|
|
985
|
+
function Aa({ routeContext: e, match: t, children: n }) {
|
|
986
|
+
let r = H.useContext(ta);
|
|
987
|
+
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ H.createElement(la.Provider, { value: e }, n);
|
|
963
988
|
}
|
|
964
|
-
function
|
|
989
|
+
function ja(e, t = [], n) {
|
|
965
990
|
let r = n?.state;
|
|
966
991
|
if (e == null) {
|
|
967
992
|
if (!r) return null;
|
|
@@ -992,16 +1017,16 @@ function ka(e, t = [], n) {
|
|
|
992
1017
|
c(e, {
|
|
993
1018
|
location: r.location,
|
|
994
1019
|
params: r.matches?.[0]?.params ?? {},
|
|
995
|
-
pattern:
|
|
1020
|
+
pattern: Ui(r.matches),
|
|
996
1021
|
errorInfo: t
|
|
997
1022
|
});
|
|
998
1023
|
} : void 0;
|
|
999
1024
|
return i.reduceRight((e, n, c) => {
|
|
1000
1025
|
let u, d = !1, f = null, p = null;
|
|
1001
|
-
r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement ||
|
|
1026
|
+
r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || Ea, o && (s < 0 && c === 0 ? (Va("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
|
|
1002
1027
|
let m = t.concat(i.slice(0, c + 1)), h = () => {
|
|
1003
1028
|
let t;
|
|
1004
|
-
return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ H.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ H.createElement(
|
|
1029
|
+
return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ H.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ H.createElement(Aa, {
|
|
1005
1030
|
match: n,
|
|
1006
1031
|
routeContext: {
|
|
1007
1032
|
outlet: e,
|
|
@@ -1011,7 +1036,7 @@ function ka(e, t = [], n) {
|
|
|
1011
1036
|
children: t
|
|
1012
1037
|
});
|
|
1013
1038
|
};
|
|
1014
|
-
return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ H.createElement(
|
|
1039
|
+
return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ H.createElement(Da, {
|
|
1015
1040
|
location: r.location,
|
|
1016
1041
|
revalidation: r.revalidation,
|
|
1017
1042
|
component: f,
|
|
@@ -1026,50 +1051,50 @@ function ka(e, t = [], n) {
|
|
|
1026
1051
|
}) : h();
|
|
1027
1052
|
}, null);
|
|
1028
1053
|
}
|
|
1029
|
-
function Aa(e) {
|
|
1030
|
-
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1031
|
-
}
|
|
1032
|
-
function ja(e) {
|
|
1033
|
-
let t = H.useContext($i);
|
|
1034
|
-
return Y(t, Aa(e)), t;
|
|
1035
|
-
}
|
|
1036
1054
|
function Ma(e) {
|
|
1037
|
-
|
|
1038
|
-
return Y(t, Aa(e)), t;
|
|
1055
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1039
1056
|
}
|
|
1040
1057
|
function Na(e) {
|
|
1041
|
-
let t = H.useContext(
|
|
1042
|
-
return Y(t,
|
|
1058
|
+
let t = H.useContext(ta);
|
|
1059
|
+
return Y(t, Ma(e)), t;
|
|
1043
1060
|
}
|
|
1044
1061
|
function Pa(e) {
|
|
1045
|
-
let t =
|
|
1062
|
+
let t = H.useContext(na);
|
|
1063
|
+
return Y(t, Ma(e)), t;
|
|
1064
|
+
}
|
|
1065
|
+
function Fa(e) {
|
|
1066
|
+
let t = H.useContext(la);
|
|
1067
|
+
return Y(t, Ma(e)), t;
|
|
1068
|
+
}
|
|
1069
|
+
function Ia(e) {
|
|
1070
|
+
let t = Fa(e), n = t.matches[t.matches.length - 1];
|
|
1046
1071
|
return Y(n.route.id, `${e} can only be used on routes that contain a unique "id"`), n.route.id;
|
|
1047
1072
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return
|
|
1073
|
+
function La() {
|
|
1074
|
+
return Ia("useRouteId");
|
|
1050
1075
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let e = H.useContext(
|
|
1076
|
+
function Ra() {
|
|
1077
|
+
let e = H.useContext(ua), t = Pa("useRouteError"), n = Ia("useRouteError");
|
|
1053
1078
|
return e === void 0 ? t.errors?.[n] : e;
|
|
1054
1079
|
}
|
|
1055
|
-
function
|
|
1056
|
-
let { router: e } =
|
|
1057
|
-
return
|
|
1080
|
+
function za() {
|
|
1081
|
+
let { router: e } = Na("useNavigate"), t = Ia("useNavigate"), n = H.useRef(!1);
|
|
1082
|
+
return ba(() => {
|
|
1058
1083
|
n.current = !0;
|
|
1059
1084
|
}), H.useCallback(async (r, i = {}) => {
|
|
1060
|
-
|
|
1085
|
+
oi(n.current, ya), n.current && (typeof r == "number" ? await e.navigate(r) : await e.navigate(r, {
|
|
1061
1086
|
fromRouteId: t,
|
|
1062
1087
|
...i
|
|
1063
1088
|
}));
|
|
1064
1089
|
}, [e, t]);
|
|
1065
1090
|
}
|
|
1066
|
-
var
|
|
1067
|
-
function
|
|
1068
|
-
!t && !
|
|
1091
|
+
var Ba = {};
|
|
1092
|
+
function Va(e, t, n) {
|
|
1093
|
+
!t && !Ba[e] && (Ba[e] = !0, oi(!1, n));
|
|
1069
1094
|
}
|
|
1070
|
-
H.memo(
|
|
1071
|
-
function
|
|
1072
|
-
return
|
|
1095
|
+
H.memo(Ha);
|
|
1096
|
+
function Ha({ routes: e, manifest: t, future: n, state: r, isStatic: i, onError: a }) {
|
|
1097
|
+
return wa(e, void 0, {
|
|
1073
1098
|
manifest: t,
|
|
1074
1099
|
state: r,
|
|
1075
1100
|
isStatic: i,
|
|
@@ -1078,60 +1103,60 @@ function Ba({ routes: e, manifest: t, future: n, state: r, isStatic: i, onError:
|
|
|
1078
1103
|
});
|
|
1079
1104
|
}
|
|
1080
1105
|
H.Component;
|
|
1081
|
-
var
|
|
1082
|
-
function Ua(e) {
|
|
1083
|
-
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
1084
|
-
}
|
|
1085
|
-
function Wa(e) {
|
|
1086
|
-
return Ua(e) && e.tagName.toLowerCase() === "button";
|
|
1087
|
-
}
|
|
1106
|
+
var Ua = "get", Wa = "application/x-www-form-urlencoded";
|
|
1088
1107
|
function Ga(e) {
|
|
1089
|
-
return
|
|
1108
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
1090
1109
|
}
|
|
1091
1110
|
function Ka(e) {
|
|
1092
|
-
return
|
|
1111
|
+
return Ga(e) && e.tagName.toLowerCase() === "button";
|
|
1093
1112
|
}
|
|
1094
1113
|
function qa(e) {
|
|
1114
|
+
return Ga(e) && e.tagName.toLowerCase() === "form";
|
|
1115
|
+
}
|
|
1116
|
+
function Ja(e) {
|
|
1117
|
+
return Ga(e) && e.tagName.toLowerCase() === "input";
|
|
1118
|
+
}
|
|
1119
|
+
function Ya(e) {
|
|
1095
1120
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1096
1121
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return e.button === 0 && (!t || t === "_self") && !
|
|
1122
|
+
function Xa(e, t) {
|
|
1123
|
+
return e.button === 0 && (!t || t === "_self") && !Ya(e);
|
|
1099
1124
|
}
|
|
1100
|
-
var
|
|
1101
|
-
function
|
|
1102
|
-
if (
|
|
1103
|
-
new FormData(document.createElement("form"), 0),
|
|
1125
|
+
var Za = null;
|
|
1126
|
+
function Qa() {
|
|
1127
|
+
if (Za === null) try {
|
|
1128
|
+
new FormData(document.createElement("form"), 0), Za = !1;
|
|
1104
1129
|
} catch {
|
|
1105
|
-
|
|
1130
|
+
Za = !0;
|
|
1106
1131
|
}
|
|
1107
|
-
return
|
|
1132
|
+
return Za;
|
|
1108
1133
|
}
|
|
1109
|
-
var
|
|
1134
|
+
var $a = /* @__PURE__ */ new Set([
|
|
1110
1135
|
"application/x-www-form-urlencoded",
|
|
1111
1136
|
"multipart/form-data",
|
|
1112
1137
|
"text/plain"
|
|
1113
1138
|
]);
|
|
1114
|
-
function
|
|
1115
|
-
return e != null &&
|
|
1139
|
+
function eo(e) {
|
|
1140
|
+
return e != null && !$a.has(e) ? (oi(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wa}"`), null) : e;
|
|
1116
1141
|
}
|
|
1117
|
-
function
|
|
1142
|
+
function to(e, t) {
|
|
1118
1143
|
let n, r, i, a, o;
|
|
1119
|
-
if (
|
|
1144
|
+
if (qa(e)) {
|
|
1120
1145
|
let o = e.getAttribute("action");
|
|
1121
|
-
r = o ?
|
|
1122
|
-
} else if (
|
|
1146
|
+
r = o ? ki(o, t) : null, n = e.getAttribute("method") || Ua, i = eo(e.getAttribute("enctype")) || Wa, a = new FormData(e);
|
|
1147
|
+
} else if (Ka(e) || Ja(e) && (e.type === "submit" || e.type === "image")) {
|
|
1123
1148
|
let o = e.form;
|
|
1124
1149
|
if (o == null) throw Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
1125
1150
|
let s = e.getAttribute("formaction") || o.getAttribute("action");
|
|
1126
|
-
if (r = s ?
|
|
1151
|
+
if (r = s ? ki(s, t) : null, n = e.getAttribute("formmethod") || o.getAttribute("method") || Ua, i = eo(e.getAttribute("formenctype")) || eo(o.getAttribute("enctype")) || Wa, a = new FormData(o, e), !Qa()) {
|
|
1127
1152
|
let { name: t, type: n, value: r } = e;
|
|
1128
1153
|
if (n === "image") {
|
|
1129
1154
|
let e = t ? `${t}.` : "";
|
|
1130
1155
|
a.append(`${e}x`, "0"), a.append(`${e}y`, "0");
|
|
1131
1156
|
} else t && a.append(t, r);
|
|
1132
1157
|
}
|
|
1133
|
-
} else if (
|
|
1134
|
-
else n =
|
|
1158
|
+
} else if (Ga(e)) throw Error("Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">");
|
|
1159
|
+
else n = Ua, r = null, i = Wa, o = e;
|
|
1135
1160
|
return a && i === "text/plain" && (o = a, a = void 0), {
|
|
1136
1161
|
action: r,
|
|
1137
1162
|
method: n.toLowerCase(),
|
|
@@ -1141,14 +1166,14 @@ function $a(e, t) {
|
|
|
1141
1166
|
};
|
|
1142
1167
|
}
|
|
1143
1168
|
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1144
|
-
function
|
|
1169
|
+
function no(e, t) {
|
|
1145
1170
|
if (e === !1 || e == null) throw Error(t);
|
|
1146
1171
|
}
|
|
1147
|
-
function
|
|
1172
|
+
function ro(e, t, n, r) {
|
|
1148
1173
|
let i = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
|
|
1149
|
-
return i.pathname = n ? i.pathname.endsWith("/") ? `${i.pathname}_.${r}` : `${i.pathname}.${r}` : i.pathname === "/" ? `_root.${r}` : t &&
|
|
1174
|
+
return i.pathname = n ? i.pathname.endsWith("/") ? `${i.pathname}_.${r}` : `${i.pathname}.${r}` : i.pathname === "/" ? `_root.${r}` : t && ki(i.pathname, t) === "/" ? `${Li(t)}/_root.${r}` : `${Li(i.pathname)}.${r}`, i;
|
|
1150
1175
|
}
|
|
1151
|
-
async function
|
|
1176
|
+
async function io(e, t) {
|
|
1152
1177
|
if (e.id in t) return t[e.id];
|
|
1153
1178
|
try {
|
|
1154
1179
|
let n = await import(
|
|
@@ -1161,21 +1186,21 @@ async function no(e, t) {
|
|
|
1161
1186
|
return console.error(`Error loading route module \`${e.module}\`, reloading page...`), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {});
|
|
1162
1187
|
}
|
|
1163
1188
|
}
|
|
1164
|
-
function
|
|
1189
|
+
function ao(e) {
|
|
1165
1190
|
return e != null && typeof e.page == "string";
|
|
1166
1191
|
}
|
|
1167
|
-
function
|
|
1192
|
+
function oo(e) {
|
|
1168
1193
|
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
1169
1194
|
}
|
|
1170
|
-
async function
|
|
1171
|
-
return
|
|
1195
|
+
async function so(e, t, n) {
|
|
1196
|
+
return po((await Promise.all(e.map(async (e) => {
|
|
1172
1197
|
let r = t.routes[e.route.id];
|
|
1173
1198
|
if (r) {
|
|
1174
|
-
let e = await
|
|
1199
|
+
let e = await io(r, n);
|
|
1175
1200
|
return e.links ? e.links() : [];
|
|
1176
1201
|
}
|
|
1177
1202
|
return [];
|
|
1178
|
-
}))).flat(1).filter(
|
|
1203
|
+
}))).flat(1).filter(oo).filter((e) => e.rel === "stylesheet" || e.rel === "preload").map((e) => e.rel === "stylesheet" ? {
|
|
1179
1204
|
...e,
|
|
1180
1205
|
rel: "prefetch",
|
|
1181
1206
|
as: "style"
|
|
@@ -1184,7 +1209,7 @@ async function ao(e, t, n) {
|
|
|
1184
1209
|
rel: "prefetch"
|
|
1185
1210
|
}));
|
|
1186
1211
|
}
|
|
1187
|
-
function
|
|
1212
|
+
function co(e, t, n, r, i, a) {
|
|
1188
1213
|
let o = (e, t) => !n[t] || e.route.id !== n[t].route.id, s = (e, t) => n[t].pathname !== e.pathname || n[t].route.path?.endsWith("*") && n[t].params["*"] !== e.params["*"];
|
|
1189
1214
|
return a === "assets" ? t.filter((e, t) => o(e, t) || s(e, t)) : a === "data" ? t.filter((t, a) => {
|
|
1190
1215
|
let c = r.routes[t.route.id];
|
|
@@ -1203,49 +1228,49 @@ function oo(e, t, n, r, i, a) {
|
|
|
1203
1228
|
return !0;
|
|
1204
1229
|
}) : [];
|
|
1205
1230
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return
|
|
1231
|
+
function lo(e, t, { includeHydrateFallback: n } = {}) {
|
|
1232
|
+
return uo(e.map((e) => {
|
|
1208
1233
|
let r = t.routes[e.route.id];
|
|
1209
1234
|
if (!r) return [];
|
|
1210
1235
|
let i = [r.module];
|
|
1211
1236
|
return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
|
|
1212
1237
|
}).flat(1));
|
|
1213
1238
|
}
|
|
1214
|
-
function
|
|
1239
|
+
function uo(e) {
|
|
1215
1240
|
return [...new Set(e)];
|
|
1216
1241
|
}
|
|
1217
|
-
function
|
|
1242
|
+
function fo(e) {
|
|
1218
1243
|
let t = {}, n = Object.keys(e).sort();
|
|
1219
1244
|
for (let r of n) t[r] = e[r];
|
|
1220
1245
|
return t;
|
|
1221
1246
|
}
|
|
1222
|
-
function
|
|
1247
|
+
function po(e, t) {
|
|
1223
1248
|
let n = /* @__PURE__ */ new Set(), r = new Set(t);
|
|
1224
1249
|
return e.reduce((e, i) => {
|
|
1225
|
-
if (t && !
|
|
1226
|
-
let a = JSON.stringify(
|
|
1250
|
+
if (t && !ao(i) && i.as === "script" && i.href && r.has(i.href)) return e;
|
|
1251
|
+
let a = JSON.stringify(fo(i));
|
|
1227
1252
|
return n.has(a) || (n.add(a), e.push({
|
|
1228
1253
|
key: a,
|
|
1229
1254
|
link: i
|
|
1230
1255
|
})), e;
|
|
1231
1256
|
}, []);
|
|
1232
1257
|
}
|
|
1233
|
-
function
|
|
1234
|
-
let e = H.useContext(
|
|
1235
|
-
return
|
|
1236
|
-
}
|
|
1237
|
-
function po() {
|
|
1238
|
-
let e = H.useContext(ea);
|
|
1239
|
-
return eo(e, "You must render this element inside a <DataRouterStateContext.Provider> element"), e;
|
|
1258
|
+
function mo() {
|
|
1259
|
+
let e = H.useContext(ta);
|
|
1260
|
+
return no(e, "You must render this element inside a <DataRouterContext.Provider> element"), e;
|
|
1240
1261
|
}
|
|
1241
|
-
var mo = H.createContext(void 0);
|
|
1242
|
-
mo.displayName = "FrameworkContext";
|
|
1243
1262
|
function ho() {
|
|
1244
|
-
let e = H.useContext(
|
|
1245
|
-
return
|
|
1263
|
+
let e = H.useContext(na);
|
|
1264
|
+
return no(e, "You must render this element inside a <DataRouterStateContext.Provider> element"), e;
|
|
1246
1265
|
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1266
|
+
var go = H.createContext(void 0);
|
|
1267
|
+
go.displayName = "FrameworkContext";
|
|
1268
|
+
function _o() {
|
|
1269
|
+
let e = H.useContext(go);
|
|
1270
|
+
return no(e, "You must render this element inside a <HydratedRouter> element"), e;
|
|
1271
|
+
}
|
|
1272
|
+
function vo(e, t) {
|
|
1273
|
+
let n = H.useContext(go), [r, i] = H.useState(!1), [a, o] = H.useState(!1), { onFocus: s, onBlur: c, onMouseEnter: l, onMouseLeave: u, onTouchStart: d } = t, f = H.useRef(null);
|
|
1249
1274
|
H.useEffect(() => {
|
|
1250
1275
|
if (e === "render" && o(!0), e === "viewport") {
|
|
1251
1276
|
let e = new IntersectionObserver((e) => {
|
|
@@ -1276,11 +1301,11 @@ function go(e, t) {
|
|
|
1276
1301
|
a,
|
|
1277
1302
|
f,
|
|
1278
1303
|
{
|
|
1279
|
-
onFocus:
|
|
1280
|
-
onBlur:
|
|
1281
|
-
onMouseEnter:
|
|
1282
|
-
onMouseLeave:
|
|
1283
|
-
onTouchStart:
|
|
1304
|
+
onFocus: yo(s, p),
|
|
1305
|
+
onBlur: yo(c, m),
|
|
1306
|
+
onMouseEnter: yo(l, p),
|
|
1307
|
+
onMouseLeave: yo(u, m),
|
|
1308
|
+
onTouchStart: yo(d, p)
|
|
1284
1309
|
}
|
|
1285
1310
|
] : [
|
|
1286
1311
|
a,
|
|
@@ -1292,13 +1317,13 @@ function go(e, t) {
|
|
|
1292
1317
|
{}
|
|
1293
1318
|
];
|
|
1294
1319
|
}
|
|
1295
|
-
function
|
|
1320
|
+
function yo(e, t) {
|
|
1296
1321
|
return (n) => {
|
|
1297
1322
|
e && e(n), n.defaultPrevented || t(n);
|
|
1298
1323
|
};
|
|
1299
1324
|
}
|
|
1300
|
-
function
|
|
1301
|
-
let n =
|
|
1325
|
+
function bo({ page: e, ...t }) {
|
|
1326
|
+
let n = ia(), { nonce: r } = _o(), { router: i } = mo(), a = H.useMemo(() => li(i.routes, e, i.basename), [
|
|
1302
1327
|
i.routes,
|
|
1303
1328
|
e,
|
|
1304
1329
|
i.basename
|
|
@@ -1306,21 +1331,21 @@ function vo({ page: e, ...t }) {
|
|
|
1306
1331
|
return a ? (t.nonce == null && r && (t = {
|
|
1307
1332
|
...t,
|
|
1308
1333
|
nonce: r
|
|
1309
|
-
}), n ? /* @__PURE__ */ H.createElement(
|
|
1334
|
+
}), n ? /* @__PURE__ */ H.createElement(So, {
|
|
1310
1335
|
page: e,
|
|
1311
1336
|
matches: a,
|
|
1312
1337
|
...t
|
|
1313
|
-
}) : /* @__PURE__ */ H.createElement(
|
|
1338
|
+
}) : /* @__PURE__ */ H.createElement(Co, {
|
|
1314
1339
|
page: e,
|
|
1315
1340
|
matches: a,
|
|
1316
1341
|
...t
|
|
1317
1342
|
})) : null;
|
|
1318
1343
|
}
|
|
1319
|
-
function
|
|
1320
|
-
let { manifest: t, routeModules: n } =
|
|
1344
|
+
function xo(e) {
|
|
1345
|
+
let { manifest: t, routeModules: n } = _o(), [r, i] = H.useState([]);
|
|
1321
1346
|
return H.useEffect(() => {
|
|
1322
1347
|
let r = !1;
|
|
1323
|
-
return
|
|
1348
|
+
return so(e, t, n).then((e) => {
|
|
1324
1349
|
r || i(e);
|
|
1325
1350
|
}), () => {
|
|
1326
1351
|
r = !0;
|
|
@@ -1331,10 +1356,10 @@ function yo(e) {
|
|
|
1331
1356
|
n
|
|
1332
1357
|
]), r;
|
|
1333
1358
|
}
|
|
1334
|
-
function
|
|
1335
|
-
let r =
|
|
1359
|
+
function So({ page: e, matches: t, ...n }) {
|
|
1360
|
+
let r = va(), { future: i } = _o(), { basename: a } = mo(), o = H.useMemo(() => {
|
|
1336
1361
|
if (e === r.pathname + r.search + r.hash) return [];
|
|
1337
|
-
let n =
|
|
1362
|
+
let n = ro(e, a, i.v8_trailingSlashAwareDataRequests, "rsc"), o = !1, s = [];
|
|
1338
1363
|
for (let e of t) typeof e.route.shouldRevalidate == "function" ? o = !0 : s.push(e.route.id);
|
|
1339
1364
|
return o && s.length > 0 && n.searchParams.set("_routes", s.join(",")), [n.pathname + n.search];
|
|
1340
1365
|
}, [
|
|
@@ -1352,14 +1377,14 @@ function bo({ page: e, matches: t, ...n }) {
|
|
|
1352
1377
|
...n
|
|
1353
1378
|
})));
|
|
1354
1379
|
}
|
|
1355
|
-
function
|
|
1356
|
-
let r =
|
|
1380
|
+
function Co({ page: e, matches: t, ...n }) {
|
|
1381
|
+
let r = va(), { future: i, manifest: a, routeModules: o } = _o(), { basename: s } = mo(), { loaderData: c, matches: l } = ho(), u = H.useMemo(() => co(e, t, l, a, r, "data"), [
|
|
1357
1382
|
e,
|
|
1358
1383
|
t,
|
|
1359
1384
|
l,
|
|
1360
1385
|
a,
|
|
1361
1386
|
r
|
|
1362
|
-
]), d = H.useMemo(() =>
|
|
1387
|
+
]), d = H.useMemo(() => co(e, t, l, a, r, "assets"), [
|
|
1363
1388
|
e,
|
|
1364
1389
|
t,
|
|
1365
1390
|
l,
|
|
@@ -1372,7 +1397,7 @@ function xo({ page: e, matches: t, ...n }) {
|
|
|
1372
1397
|
let t = a.routes[e.route.id];
|
|
1373
1398
|
t && t.hasLoader && (!u.some((t) => t.route.id === e.route.id) && e.route.id in c && o[e.route.id]?.shouldRevalidate || t.hasClientLoader ? l = !0 : n.add(e.route.id));
|
|
1374
1399
|
}), n.size === 0) return [];
|
|
1375
|
-
let d =
|
|
1400
|
+
let d = ro(e, s, i.v8_trailingSlashAwareDataRequests, "data");
|
|
1376
1401
|
return l && n.size > 0 && d.searchParams.set("_routes", t.filter((e) => n.has(e.route.id)).map((e) => e.route.id).join(",")), [d.pathname + d.search];
|
|
1377
1402
|
}, [
|
|
1378
1403
|
s,
|
|
@@ -1384,7 +1409,7 @@ function xo({ page: e, matches: t, ...n }) {
|
|
|
1384
1409
|
t,
|
|
1385
1410
|
e,
|
|
1386
1411
|
o
|
|
1387
|
-
]), p = H.useMemo(() =>
|
|
1412
|
+
]), p = H.useMemo(() => lo(d, a), [d, a]), m = xo(d);
|
|
1388
1413
|
return /* @__PURE__ */ H.createElement(H.Fragment, null, f.map((e) => /* @__PURE__ */ H.createElement("link", {
|
|
1389
1414
|
key: e,
|
|
1390
1415
|
rel: "prefetch",
|
|
@@ -1403,7 +1428,7 @@ function xo({ page: e, matches: t, ...n }) {
|
|
|
1403
1428
|
crossOrigin: t.crossOrigin ?? n.crossOrigin
|
|
1404
1429
|
})));
|
|
1405
1430
|
}
|
|
1406
|
-
function
|
|
1431
|
+
function wo(...e) {
|
|
1407
1432
|
return (t) => {
|
|
1408
1433
|
e.forEach((e) => {
|
|
1409
1434
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
@@ -1411,19 +1436,19 @@ function So(...e) {
|
|
|
1411
1436
|
};
|
|
1412
1437
|
}
|
|
1413
1438
|
H.Component;
|
|
1414
|
-
var
|
|
1439
|
+
var To = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
1415
1440
|
try {
|
|
1416
|
-
|
|
1441
|
+
To && (window.__reactRouterVersion = "7.18.4");
|
|
1417
1442
|
} catch {}
|
|
1418
|
-
var
|
|
1419
|
-
let { basename: h, navigator: g, useTransitions: _ } = H.useContext(Z), v = typeof l == "string" &&
|
|
1443
|
+
var Eo = H.forwardRef(function({ onClick: e, discover: t = "render", prefetch: n = "none", relative: r, reloadDocument: i, replace: a, mask: o, state: s, target: c, to: l, preventScrollReset: u, viewTransition: d, defaultShouldRevalidate: f, ...p }, m) {
|
|
1444
|
+
let { basename: h, navigator: g, useTransitions: _ } = H.useContext(Z), v = typeof l == "string" && ri.test(l), y = Gi(l, h);
|
|
1420
1445
|
l = y.to;
|
|
1421
|
-
let b =
|
|
1446
|
+
let b = ga(l, { relative: r }), ee = va(), x = null;
|
|
1422
1447
|
if (o) {
|
|
1423
|
-
let e =
|
|
1448
|
+
let e = Fi(o, [], ee.mask ? ee.mask.pathname : "/", !0);
|
|
1424
1449
|
h !== "/" && (e.pathname = e.pathname === "/" ? h : X([h, e.pathname])), x = g.createHref(e);
|
|
1425
1450
|
}
|
|
1426
|
-
let [S, C, w] =
|
|
1451
|
+
let [S, C, w] = vo(n, p), T = jo(l, {
|
|
1427
1452
|
replace: a,
|
|
1428
1453
|
mask: o,
|
|
1429
1454
|
state: s,
|
|
@@ -1442,16 +1467,16 @@ var wo = H.forwardRef(function({ onClick: e, discover: t = "render", prefetch: n
|
|
|
1442
1467
|
...w,
|
|
1443
1468
|
href: (ne ? x : void 0) || y.absoluteURL || b,
|
|
1444
1469
|
onClick: ne ? te : e,
|
|
1445
|
-
ref:
|
|
1470
|
+
ref: wo(m, C),
|
|
1446
1471
|
target: c,
|
|
1447
1472
|
"data-discover": !v && t === "render" ? "true" : void 0
|
|
1448
1473
|
});
|
|
1449
|
-
return S && !v ? /* @__PURE__ */ H.createElement(H.Fragment, null, E, /* @__PURE__ */ H.createElement(
|
|
1474
|
+
return S && !v ? /* @__PURE__ */ H.createElement(H.Fragment, null, E, /* @__PURE__ */ H.createElement(bo, { page: b })) : E;
|
|
1450
1475
|
});
|
|
1451
|
-
|
|
1452
|
-
var
|
|
1453
|
-
let u =
|
|
1454
|
-
t || (_ = _.toLowerCase(), v = v ? v.toLowerCase() : null, g = g.toLowerCase()), v && m && (v =
|
|
1476
|
+
Eo.displayName = "Link";
|
|
1477
|
+
var Do = H.forwardRef(function({ "aria-current": e = "page", caseSensitive: t = !1, className: n = "", end: r = !1, style: i, to: a, viewTransition: o, children: s, ...c }, l) {
|
|
1478
|
+
let u = Ca(a, { relative: c.relative }), d = va(), f = H.useContext(na), { navigator: p, basename: m } = H.useContext(Z), h = f != null && Io(u) && o === !0, g = p.encodeLocation ? p.encodeLocation(u).pathname : u.pathname, _ = d.pathname, v = f && f.navigation && f.navigation.location ? f.navigation.location.pathname : null;
|
|
1479
|
+
t || (_ = _.toLowerCase(), v = v ? v.toLowerCase() : null, g = g.toLowerCase()), v && m && (v = ki(v, m) || v);
|
|
1455
1480
|
let y = g !== "/" && g.endsWith("/") ? g.length - 1 : g.length, b = _ === g || !r && _.startsWith(g) && _.charAt(y) === "/", ee = v != null && (v === g || !r && v.startsWith(g) && v.charAt(g.length) === "/"), x = {
|
|
1456
1481
|
isActive: b,
|
|
1457
1482
|
isPending: ee,
|
|
@@ -1464,7 +1489,7 @@ var To = H.forwardRef(function({ "aria-current": e = "page", caseSensitive: t =
|
|
|
1464
1489
|
h ? "transitioning" : null
|
|
1465
1490
|
].filter(Boolean).join(" ");
|
|
1466
1491
|
let w = typeof i == "function" ? i(x) : i;
|
|
1467
|
-
return /* @__PURE__ */ H.createElement(
|
|
1492
|
+
return /* @__PURE__ */ H.createElement(Eo, {
|
|
1468
1493
|
...c,
|
|
1469
1494
|
"aria-current": S,
|
|
1470
1495
|
className: C,
|
|
@@ -1474,9 +1499,9 @@ var To = H.forwardRef(function({ "aria-current": e = "page", caseSensitive: t =
|
|
|
1474
1499
|
viewTransition: o
|
|
1475
1500
|
}, typeof s == "function" ? s(x) : s);
|
|
1476
1501
|
});
|
|
1477
|
-
|
|
1478
|
-
var
|
|
1479
|
-
let { useTransitions: h } = H.useContext(Z), g =
|
|
1502
|
+
Do.displayName = "NavLink";
|
|
1503
|
+
var Oo = H.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: n, reloadDocument: r, replace: i, state: a, method: o = Ua, action: s, onSubmit: c, relative: l, preventScrollReset: u, viewTransition: d, defaultShouldRevalidate: f, ...p }, m) => {
|
|
1504
|
+
let { useTransitions: h } = H.useContext(Z), g = Po(), _ = Fo(s, { relative: l }), v = o.toLowerCase() === "get" ? "get" : "post", y = typeof s == "string" && ri.test(s);
|
|
1480
1505
|
return /* @__PURE__ */ H.createElement("form", {
|
|
1481
1506
|
ref: m,
|
|
1482
1507
|
method: v,
|
|
@@ -1501,20 +1526,20 @@ var Eo = H.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: n, rel
|
|
|
1501
1526
|
"data-discover": !y && e === "render" ? "true" : void 0
|
|
1502
1527
|
});
|
|
1503
1528
|
});
|
|
1504
|
-
|
|
1505
|
-
function
|
|
1529
|
+
Oo.displayName = "Form";
|
|
1530
|
+
function ko(e) {
|
|
1506
1531
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1507
1532
|
}
|
|
1508
|
-
function
|
|
1509
|
-
let t = H.useContext(
|
|
1510
|
-
return Y(t,
|
|
1533
|
+
function Ao(e) {
|
|
1534
|
+
let t = H.useContext(ta);
|
|
1535
|
+
return Y(t, ko(e)), t;
|
|
1511
1536
|
}
|
|
1512
|
-
function
|
|
1513
|
-
let u =
|
|
1537
|
+
function jo(e, { target: t, replace: n, mask: r, state: i, preventScrollReset: a, relative: o, viewTransition: s, defaultShouldRevalidate: c, useTransitions: l } = {}) {
|
|
1538
|
+
let u = xa(), d = va(), f = Ca(e, { relative: o });
|
|
1514
1539
|
return H.useCallback((p) => {
|
|
1515
|
-
if (
|
|
1540
|
+
if (Xa(p, t)) {
|
|
1516
1541
|
p.preventDefault();
|
|
1517
|
-
let t = n === void 0 ?
|
|
1542
|
+
let t = n === void 0 ? si(d) === si(f) : n, m = () => u(e, {
|
|
1518
1543
|
replace: t,
|
|
1519
1544
|
mask: r,
|
|
1520
1545
|
state: i,
|
|
@@ -1541,13 +1566,13 @@ function ko(e, { target: t, replace: n, mask: r, state: i, preventScrollReset: a
|
|
|
1541
1566
|
l
|
|
1542
1567
|
]);
|
|
1543
1568
|
}
|
|
1544
|
-
var
|
|
1545
|
-
function
|
|
1546
|
-
let { router: e } =
|
|
1569
|
+
var Mo = 0, No = () => `__${String(++Mo)}__`;
|
|
1570
|
+
function Po() {
|
|
1571
|
+
let { router: e } = Ao("useSubmit"), { basename: t } = H.useContext(Z), n = La(), r = e.fetch, i = e.navigate;
|
|
1547
1572
|
return H.useCallback(async (e, a = {}) => {
|
|
1548
|
-
let { action: o, method: s, encType: c, formData: l, body: u } =
|
|
1573
|
+
let { action: o, method: s, encType: c, formData: l, body: u } = to(e, t);
|
|
1549
1574
|
if (a.navigate === !1) {
|
|
1550
|
-
let e = a.fetcherKey ||
|
|
1575
|
+
let e = a.fetcherKey || No();
|
|
1551
1576
|
await r(e, n, a.action || o, {
|
|
1552
1577
|
defaultShouldRevalidate: a.defaultShouldRevalidate,
|
|
1553
1578
|
preventScrollReset: a.preventScrollReset,
|
|
@@ -1577,10 +1602,10 @@ function Mo() {
|
|
|
1577
1602
|
n
|
|
1578
1603
|
]);
|
|
1579
1604
|
}
|
|
1580
|
-
function
|
|
1581
|
-
let { basename: n } = H.useContext(Z), r = H.useContext(
|
|
1605
|
+
function Fo(e, { relative: t } = {}) {
|
|
1606
|
+
let { basename: n } = H.useContext(Z), r = H.useContext(la);
|
|
1582
1607
|
Y(r, "useFormAction must be used inside a RouteContext");
|
|
1583
|
-
let [i] = r.matches.slice(-1), a = { ...
|
|
1608
|
+
let [i] = r.matches.slice(-1), a = { ...Ca(e || ".", { relative: t }) }, o = va();
|
|
1584
1609
|
if (e == null) {
|
|
1585
1610
|
a.search = o.search;
|
|
1586
1611
|
let e = new URLSearchParams(a.search), t = e.getAll("index");
|
|
@@ -1590,20 +1615,20 @@ function No(e, { relative: t } = {}) {
|
|
|
1590
1615
|
a.search = n ? `?${n}` : "";
|
|
1591
1616
|
}
|
|
1592
1617
|
}
|
|
1593
|
-
return (!e || e === ".") && i.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : X([n, a.pathname])),
|
|
1618
|
+
return (!e || e === ".") && i.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : X([n, a.pathname])), si(a);
|
|
1594
1619
|
}
|
|
1595
|
-
function
|
|
1596
|
-
let n = H.useContext(
|
|
1620
|
+
function Io(e, { relative: t } = {}) {
|
|
1621
|
+
let n = H.useContext(aa);
|
|
1597
1622
|
Y(n != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
1598
|
-
let { basename: r } =
|
|
1623
|
+
let { basename: r } = Ao("useViewTransitionState"), i = Ca(e, { relative: t });
|
|
1599
1624
|
if (!n.isTransitioning) return !1;
|
|
1600
|
-
let a =
|
|
1601
|
-
return
|
|
1625
|
+
let a = ki(n.currentLocation.pathname, r) || n.currentLocation.pathname, o = ki(n.nextLocation.pathname, r) || n.nextLocation.pathname;
|
|
1626
|
+
return Ti(i.pathname, o) != null || Ti(i.pathname, a) != null;
|
|
1602
1627
|
}
|
|
1603
1628
|
//#endregion
|
|
1604
1629
|
//#region src/components/List/index.tsx
|
|
1605
|
-
var
|
|
1606
|
-
let j =
|
|
1630
|
+
var Lo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Data Available", loadMoreText: i = "See More", className: a = "", initialLimit: s = 5, isDataLoading: c = !1, showLogo: l, isShowOptions: u, setValue: d, currentPage: f = 1, isEnableScrollToTop: p, isDisableMoreOption: h, isEnableSelectAll: g, onSelectAll: _, onDeselectAll: ee, isAllSelected: x, parent: S, extraValues: C, extraHeaderText: w, onTourClick: ne, onRowClick: E, onRowHover: re, onMouseOut: ie, buttonContent: ae, noDataSubHeading: oe, isDatasourceList: se, stateKey: D, onCreate: O, isDemoDatasource: k, isOpenInNewTab: ce, noDataProps: A }) => {
|
|
1631
|
+
let j = xa(), [M, le] = K(s), [ue, de] = K(""), [N, P] = K(""), fe = (e) => {
|
|
1607
1632
|
if (S) switch (S) {
|
|
1608
1633
|
case "DASHBOARD":
|
|
1609
1634
|
case "DASHBOARD_CREATE": return `/externalDashboard/${e.id}/?wid=${C?.workspaceId}${C?.dataMartId ? `&dmId=${C?.dataMartId}` : ""}${e?.createdBy ? `&createdByClient=${e?.createdBy}` : ""}`;
|
|
@@ -1633,7 +1658,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
1633
1658
|
subTextGap: "6px",
|
|
1634
1659
|
msgVariant: "sec-heading-4",
|
|
1635
1660
|
isNoDatasourceConnected: !0
|
|
1636
|
-
}), /* @__PURE__ */ q(
|
|
1661
|
+
}), /* @__PURE__ */ q(Do, {
|
|
1637
1662
|
to: "/configuration",
|
|
1638
1663
|
children: /* @__PURE__ */ J("div", {
|
|
1639
1664
|
className: V.createBtn,
|
|
@@ -1961,7 +1986,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
1961
1986
|
">",
|
|
1962
1987
|
" Save"
|
|
1963
1988
|
]
|
|
1964
|
-
}), /* @__PURE__ */ q(
|
|
1989
|
+
}), /* @__PURE__ */ q(Do, {
|
|
1965
1990
|
target: "_blank",
|
|
1966
1991
|
to: "https://docs.usedatabrain.com/guides/onboarding-and-configuration/add-a-data-source",
|
|
1967
1992
|
children: /* @__PURE__ */ q(b, {
|
|
@@ -2029,7 +2054,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2029
2054
|
">",
|
|
2030
2055
|
" Save"
|
|
2031
2056
|
]
|
|
2032
|
-
}), /* @__PURE__ */ q(
|
|
2057
|
+
}), /* @__PURE__ */ q(Do, {
|
|
2033
2058
|
target: "_blank",
|
|
2034
2059
|
to: "https://docs.usedatabrain.com/guides/datasources/create-a-data-app",
|
|
2035
2060
|
children: /* @__PURE__ */ q(b, {
|
|
@@ -2097,7 +2122,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2097
2122
|
">",
|
|
2098
2123
|
" Save"
|
|
2099
2124
|
]
|
|
2100
|
-
}), /* @__PURE__ */ q(
|
|
2125
|
+
}), /* @__PURE__ */ q(Do, {
|
|
2101
2126
|
target: "_blank",
|
|
2102
2127
|
to: "https://docs.usedatabrain.com/guides/datasources/create-a-datamart",
|
|
2103
2128
|
children: /* @__PURE__ */ q(b, {
|
|
@@ -2165,7 +2190,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2165
2190
|
">",
|
|
2166
2191
|
" Save"
|
|
2167
2192
|
]
|
|
2168
|
-
}), /* @__PURE__ */ q(
|
|
2193
|
+
}), /* @__PURE__ */ q(Do, {
|
|
2169
2194
|
target: "_blank",
|
|
2170
2195
|
to: "https://docs.usedatabrain.com/guides/datasources/semantic-layer",
|
|
2171
2196
|
children: /* @__PURE__ */ q(b, {
|
|
@@ -2405,13 +2430,13 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2405
2430
|
"col-view-primary-cell": "_col-view-primary-cell_o1h6j_269",
|
|
2406
2431
|
link: "_link_o1h6j_273",
|
|
2407
2432
|
textLineBreak: "_textLineBreak_o1h6j_277"
|
|
2408
|
-
},
|
|
2433
|
+
}, Ro = qn(), zo = (e, t, n, r) => {
|
|
2409
2434
|
let i = Wn(e.getValue(t), n);
|
|
2410
2435
|
return r({ itemRank: i }), i.passed;
|
|
2411
|
-
},
|
|
2436
|
+
}, Bo = (e, t, n) => {
|
|
2412
2437
|
let r = e.getValue(t);
|
|
2413
2438
|
return String(r)?.toLowerCase().includes(String(n)?.toLowerCase());
|
|
2414
|
-
},
|
|
2439
|
+
}, Vo = (e) => e?.textWrap?.isEnable ? 48 : e?.lineGap === "small" ? 36 : e?.lineGap === "large" ? 44 : 40, Ho = ({ data: e, isLoading: t, error: n, tableSettings: r, className: i = "", onColumnSizingChange: a, onChartReady: o, isExternalChart: s, paginationInfo: c = {
|
|
2415
2440
|
limit: 10,
|
|
2416
2441
|
offset: 0,
|
|
2417
2442
|
totalRecords: 10
|
|
@@ -2474,7 +2499,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2474
2499
|
h
|
|
2475
2500
|
]), se = W(() => oe, [oe]), D = W(() => {
|
|
2476
2501
|
let e = Object.keys(oe[0] || {});
|
|
2477
|
-
return r?.showColumnFilter && (e = y), r?.isEnableViewDetails && (e = [...e, "View Details"]), r?.hiddenColumns?.length && (e = e?.filter((e) => !r?.hiddenColumns?.includes(e))), e?.map((e) =>
|
|
2502
|
+
return r?.showColumnFilter && (e = y), r?.isEnableViewDetails && (e = [...e, "View Details"]), r?.hiddenColumns?.length && (e = e?.filter((e) => !r?.hiddenColumns?.includes(e))), e?.map((e) => Ro.accessor(e, {
|
|
2478
2503
|
header: () => e,
|
|
2479
2504
|
cell: (t) => {
|
|
2480
2505
|
let n = t.row.original[e];
|
|
@@ -2486,8 +2511,8 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2486
2511
|
data: se,
|
|
2487
2512
|
columns: D,
|
|
2488
2513
|
state: { ...E ? { columnSizing: E } : {} },
|
|
2489
|
-
filterFns: { fuzzy:
|
|
2490
|
-
globalFilterFn:
|
|
2514
|
+
filterFns: { fuzzy: zo },
|
|
2515
|
+
globalFilterFn: Bo,
|
|
2491
2516
|
getCoreRowModel: Kn(),
|
|
2492
2517
|
getFilteredRowModel: Yn(),
|
|
2493
2518
|
debugTable: !1,
|
|
@@ -2497,7 +2522,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2497
2522
|
}), k = O.getSortedRowModel().rows, ce = Gn({
|
|
2498
2523
|
count: k.length,
|
|
2499
2524
|
getScrollElement: () => ie.current,
|
|
2500
|
-
estimateSize: () =>
|
|
2525
|
+
estimateSize: () => Vo(r),
|
|
2501
2526
|
overscan: 12
|
|
2502
2527
|
}), A = ce.getVirtualItems(), j = A.length ? A[0].start : 0, M = A.length ? ce.getTotalSize() - A[A.length - 1].end : 0, le = O.getVisibleLeafColumns().length || 1;
|
|
2503
2528
|
U(() => {
|
|
@@ -2672,13 +2697,13 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2672
2697
|
})
|
|
2673
2698
|
})
|
|
2674
2699
|
});
|
|
2675
|
-
},
|
|
2700
|
+
}, Uo = /* @__PURE__ */ i(((e) => {
|
|
2676
2701
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
2677
2702
|
var t = 1;
|
|
2678
2703
|
e.default = function() {
|
|
2679
2704
|
return `${t++}`;
|
|
2680
2705
|
};
|
|
2681
|
-
})),
|
|
2706
|
+
})), Wo = /* @__PURE__ */ i(((e) => {
|
|
2682
2707
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = function(e) {
|
|
2683
2708
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 60, n = null;
|
|
2684
2709
|
return function() {
|
|
@@ -2688,11 +2713,11 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2688
2713
|
}, t);
|
|
2689
2714
|
};
|
|
2690
2715
|
};
|
|
2691
|
-
})),
|
|
2716
|
+
})), Go = /* @__PURE__ */ i(((e) => {
|
|
2692
2717
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.SizeSensorId = e.SensorTabIndex = e.SensorClassName = void 0, e.SizeSensorId = "size-sensor-id", e.SensorClassName = "size-sensor-object", e.SensorTabIndex = "-1";
|
|
2693
|
-
})),
|
|
2718
|
+
})), Ko = /* @__PURE__ */ i(((e) => {
|
|
2694
2719
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.createSensor = void 0;
|
|
2695
|
-
var t = r(
|
|
2720
|
+
var t = r(Wo()), n = Go();
|
|
2696
2721
|
function r(e) {
|
|
2697
2722
|
return e && e.__esModule ? e : { default: e };
|
|
2698
2723
|
}
|
|
@@ -2722,9 +2747,9 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2722
2747
|
}
|
|
2723
2748
|
};
|
|
2724
2749
|
};
|
|
2725
|
-
})),
|
|
2750
|
+
})), qo = /* @__PURE__ */ i(((e) => {
|
|
2726
2751
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.createSensor = void 0;
|
|
2727
|
-
var t =
|
|
2752
|
+
var t = Go(), n = r(Wo());
|
|
2728
2753
|
function r(e) {
|
|
2729
2754
|
return e && e.__esModule ? e : { default: e };
|
|
2730
2755
|
}
|
|
@@ -2751,13 +2776,13 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2751
2776
|
}
|
|
2752
2777
|
};
|
|
2753
2778
|
};
|
|
2754
|
-
})),
|
|
2779
|
+
})), Jo = /* @__PURE__ */ i(((e) => {
|
|
2755
2780
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.createSensor = void 0;
|
|
2756
|
-
var t =
|
|
2781
|
+
var t = Ko(), n = qo();
|
|
2757
2782
|
e.createSensor = typeof ResizeObserver < "u" ? n.createSensor : t.createSensor;
|
|
2758
|
-
})),
|
|
2783
|
+
})), Yo = /* @__PURE__ */ i(((e) => {
|
|
2759
2784
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.removeSensor = e.getSensor = e.Sensors = void 0;
|
|
2760
|
-
var t = i(
|
|
2785
|
+
var t = i(Uo()), n = Jo(), r = Go();
|
|
2761
2786
|
function i(e) {
|
|
2762
2787
|
return e && e.__esModule ? e : { default: e };
|
|
2763
2788
|
}
|
|
@@ -2778,9 +2803,9 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2778
2803
|
var t = e.element.getAttribute(r.SizeSensorId);
|
|
2779
2804
|
e.destroy(), o(t);
|
|
2780
2805
|
};
|
|
2781
|
-
})),
|
|
2806
|
+
})), Xo = /* @__PURE__ */ i(((e) => {
|
|
2782
2807
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ver = e.clear = e.bind = void 0;
|
|
2783
|
-
var t =
|
|
2808
|
+
var t = Yo();
|
|
2784
2809
|
e.bind = function(e, n) {
|
|
2785
2810
|
var r = (0, t.getSensor)(e);
|
|
2786
2811
|
return r.bind(n), function() {
|
|
@@ -2790,7 +2815,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2790
2815
|
var n = (0, t.getSensor)(e);
|
|
2791
2816
|
(0, t.removeSensor)(n);
|
|
2792
2817
|
}, e.ver = "1.0.3";
|
|
2793
|
-
})),
|
|
2818
|
+
})), Zo = /* @__PURE__ */ i(((e) => {
|
|
2794
2819
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.pick = void 0;
|
|
2795
2820
|
function t(e, t) {
|
|
2796
2821
|
var n = {};
|
|
@@ -2799,19 +2824,19 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2799
2824
|
}), n;
|
|
2800
2825
|
}
|
|
2801
2826
|
e.pick = t;
|
|
2802
|
-
})),
|
|
2827
|
+
})), Qo = /* @__PURE__ */ i(((e) => {
|
|
2803
2828
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isFunction = void 0;
|
|
2804
2829
|
function t(e) {
|
|
2805
2830
|
return typeof e == "function";
|
|
2806
2831
|
}
|
|
2807
2832
|
e.isFunction = t;
|
|
2808
|
-
})),
|
|
2833
|
+
})), $o = /* @__PURE__ */ i(((e) => {
|
|
2809
2834
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isString = void 0;
|
|
2810
2835
|
function t(e) {
|
|
2811
2836
|
return typeof e == "string";
|
|
2812
2837
|
}
|
|
2813
2838
|
e.isString = t;
|
|
2814
|
-
})),
|
|
2839
|
+
})), es = /* @__PURE__ */ i(((e, t) => {
|
|
2815
2840
|
t.exports = function e(t, n) {
|
|
2816
2841
|
if (t === n) return !0;
|
|
2817
2842
|
if (t && n && typeof t == "object" && typeof n == "object") {
|
|
@@ -2835,11 +2860,11 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2835
2860
|
}
|
|
2836
2861
|
return t !== t && n !== n;
|
|
2837
2862
|
};
|
|
2838
|
-
})),
|
|
2839
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), t.isEqual = void 0, t.isEqual = (Un(), e(Hn)).__importDefault(
|
|
2840
|
-
})),
|
|
2863
|
+
})), ts = /* @__PURE__ */ i(((t) => {
|
|
2864
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.isEqual = void 0, t.isEqual = (Un(), e(Hn)).__importDefault(es()).default;
|
|
2865
|
+
})), ns = /* @__PURE__ */ n((/* @__PURE__ */ i(((n) => {
|
|
2841
2866
|
Object.defineProperty(n, "__esModule", { value: !0 });
|
|
2842
|
-
var r = (Un(), e(Hn)), i = r.__importStar(t("react")), a =
|
|
2867
|
+
var r = (Un(), e(Hn)), i = r.__importStar(t("react")), a = Xo(), o = Zo(), s = Qo(), c = $o(), l = ts();
|
|
2843
2868
|
n.default = function(e) {
|
|
2844
2869
|
r.__extends(t, e);
|
|
2845
2870
|
function t(t) {
|
|
@@ -2978,7 +3003,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2978
3003
|
}, s));
|
|
2979
3004
|
}, t;
|
|
2980
3005
|
}(i.PureComponent);
|
|
2981
|
-
})))()),
|
|
3006
|
+
})))()), rs = /* @__PURE__ */ new Set([
|
|
2982
3007
|
"serif",
|
|
2983
3008
|
"sans-serif",
|
|
2984
3009
|
"monospace",
|
|
@@ -2992,9 +3017,9 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
2992
3017
|
"inherit",
|
|
2993
3018
|
"initial",
|
|
2994
3019
|
"unset"
|
|
2995
|
-
]),
|
|
3020
|
+
]), is = 5, as = 1200, os = (e) => {
|
|
2996
3021
|
let t = /* @__PURE__ */ new Set(), n = (e, r) => {
|
|
2997
|
-
if (!(!e || typeof e != "object" || r >
|
|
3022
|
+
if (!(!e || typeof e != "object" || r > is)) {
|
|
2998
3023
|
if (Array.isArray(e)) {
|
|
2999
3024
|
for (let t of e) n(t, r + 1);
|
|
3000
3025
|
return;
|
|
@@ -3003,7 +3028,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3003
3028
|
if (i === "fontFamily" && typeof a == "string") {
|
|
3004
3029
|
for (let e of a.split(",")) {
|
|
3005
3030
|
let n = e.trim().replace(/^['"]|['"]$/g, "");
|
|
3006
|
-
n && !
|
|
3031
|
+
n && !rs.has(n.toLowerCase()) && t.add(n);
|
|
3007
3032
|
}
|
|
3008
3033
|
continue;
|
|
3009
3034
|
}
|
|
@@ -3012,20 +3037,20 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3012
3037
|
}
|
|
3013
3038
|
};
|
|
3014
3039
|
return n(e, 0), [...t];
|
|
3015
|
-
},
|
|
3016
|
-
let t =
|
|
3040
|
+
}, ss = /* @__PURE__ */ new Map(), cs = (e) => {
|
|
3041
|
+
let t = ss.get(e);
|
|
3017
3042
|
if (t) return t;
|
|
3018
3043
|
let n = typeof document > "u" ? void 0 : document.fonts, r = typeof n?.load == "function" ? Promise.all([n.load(`12px "${e}"`), n.load(`600 12px "${e}"`)]).catch(() => void 0) : Promise.resolve();
|
|
3019
|
-
return
|
|
3020
|
-
},
|
|
3021
|
-
let t =
|
|
3044
|
+
return ss.set(e, r), r;
|
|
3045
|
+
}, ls = (e) => {
|
|
3046
|
+
let t = os(e);
|
|
3022
3047
|
return t.length ? new Promise((e) => {
|
|
3023
|
-
let n = setTimeout(e,
|
|
3024
|
-
Promise.all(t.map(
|
|
3048
|
+
let n = setTimeout(e, as);
|
|
3049
|
+
Promise.all(t.map(cs)).then(() => {
|
|
3025
3050
|
clearTimeout(n), e();
|
|
3026
3051
|
});
|
|
3027
3052
|
}) : Promise.resolve();
|
|
3028
|
-
},
|
|
3053
|
+
}, us = class extends ns.default {
|
|
3029
3054
|
unmounted = !1;
|
|
3030
3055
|
constructor(e) {
|
|
3031
3056
|
super({
|
|
@@ -3034,7 +3059,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3034
3059
|
});
|
|
3035
3060
|
}
|
|
3036
3061
|
async initEchartsInstance() {
|
|
3037
|
-
await
|
|
3062
|
+
await ls(this.props.option);
|
|
3038
3063
|
let e = this.echarts.init(this.ele, this.props.theme, this.props.opts);
|
|
3039
3064
|
return this.unmounted && setTimeout(() => {
|
|
3040
3065
|
let e = nr(this.ele);
|
|
@@ -3060,10 +3085,10 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3060
3085
|
rr(e);
|
|
3061
3086
|
}
|
|
3062
3087
|
}
|
|
3063
|
-
},
|
|
3088
|
+
}, ds = sr(async () => (await import("./echarts-BlmDVRLk.mjs"), { default: us })), fs = or((e, t) => /* @__PURE__ */ q(x, {
|
|
3064
3089
|
surface: "chart",
|
|
3065
3090
|
fallback: /* @__PURE__ */ q(tr, {}),
|
|
3066
|
-
children: /* @__PURE__ */ q(
|
|
3091
|
+
children: /* @__PURE__ */ q(ds, {
|
|
3067
3092
|
...e,
|
|
3068
3093
|
ref: t
|
|
3069
3094
|
})
|
|
@@ -3089,7 +3114,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3089
3114
|
chartDiv: "_chartDiv_1tjfq_72",
|
|
3090
3115
|
chartUnavailable: "_chartUnavailable_1tjfq_76",
|
|
3091
3116
|
noChart: "_noChart_1tjfq_80"
|
|
3092
|
-
},
|
|
3117
|
+
}, ps = ({ chartType: e, text: t = "This chart is no longer available.", subText: n }) => {
|
|
3093
3118
|
let r = S.flatMap((e) => e.value)?.find((t) => t.name?.toLowerCase() === e)?.disabledIcon;
|
|
3094
3119
|
return /* @__PURE__ */ J("div", {
|
|
3095
3120
|
className: $.chartUnavailable,
|
|
@@ -3110,7 +3135,7 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3110
3135
|
})]
|
|
3111
3136
|
})]
|
|
3112
3137
|
});
|
|
3113
|
-
},
|
|
3138
|
+
}, ms = sr(async () => ({ default: (await import("./Table-B7S71HCS.mjs").then((e) => e.n)).Table })), hs = sr(async () => ({ default: (await import("./HorizontalStackTable-XnsJR8PD.mjs")).HorizontalStackTable })), gs = sr(async () => ({ default: (await import("./PivotTable-5UaGFGcV.mjs")).default })), _s = sr(async () => ({ default: (await import("./PivotTableV2-DjItLmBg.mjs")).PivotTableV2 })), vs = sr(() => import("./PivotTableV3-DBwn-gqV.mjs")), ys = ({ children: e, surface: t }) => /* @__PURE__ */ q(x, {
|
|
3114
3139
|
surface: t,
|
|
3115
3140
|
fallback: /* @__PURE__ */ J("div", {
|
|
3116
3141
|
className: "dbn:flex dbn:h-full dbn:min-h-32 dbn:items-center dbn:justify-center",
|
|
@@ -3123,25 +3148,25 @@ var Fo = ({ headers: e, data: t, variant: n = "primary", noDataText: r = "No Dat
|
|
|
3123
3148
|
]
|
|
3124
3149
|
}),
|
|
3125
3150
|
children: e
|
|
3126
|
-
}),
|
|
3151
|
+
}), bs = (e) => /* @__PURE__ */ q(ys, {
|
|
3127
3152
|
surface: "table",
|
|
3128
|
-
children: /* @__PURE__ */ q(fs, { ...e })
|
|
3129
|
-
}), ys = (e) => /* @__PURE__ */ q(_s, {
|
|
3130
|
-
surface: "stack table",
|
|
3131
|
-
children: /* @__PURE__ */ q(ps, { ...e })
|
|
3132
|
-
}), bs = (e) => /* @__PURE__ */ q(_s, {
|
|
3133
|
-
surface: "pivot table",
|
|
3134
3153
|
children: /* @__PURE__ */ q(ms, { ...e })
|
|
3135
|
-
}), xs = (e) => /* @__PURE__ */ q(
|
|
3136
|
-
surface: "
|
|
3154
|
+
}), xs = (e) => /* @__PURE__ */ q(ys, {
|
|
3155
|
+
surface: "stack table",
|
|
3137
3156
|
children: /* @__PURE__ */ q(hs, { ...e })
|
|
3138
|
-
}), Ss = (e) => /* @__PURE__ */ q(
|
|
3157
|
+
}), Ss = (e) => /* @__PURE__ */ q(ys, {
|
|
3139
3158
|
surface: "pivot table",
|
|
3140
3159
|
children: /* @__PURE__ */ q(gs, { ...e })
|
|
3160
|
+
}), Cs = (e) => /* @__PURE__ */ q(ys, {
|
|
3161
|
+
surface: "pivot table",
|
|
3162
|
+
children: /* @__PURE__ */ q(_s, { ...e })
|
|
3163
|
+
}), ws = (e) => /* @__PURE__ */ q(ys, {
|
|
3164
|
+
surface: "pivot table",
|
|
3165
|
+
children: /* @__PURE__ */ q(vs, { ...e })
|
|
3141
3166
|
});
|
|
3142
3167
|
//#endregion
|
|
3143
3168
|
//#region src/components/Chart/singleValueDelta.ts
|
|
3144
|
-
function
|
|
3169
|
+
function Ts(e) {
|
|
3145
3170
|
if (e == null) return "none";
|
|
3146
3171
|
let t = String(e).trim();
|
|
3147
3172
|
if (!t || /nan|infinity/i.test(t)) return "none";
|
|
@@ -3150,7 +3175,7 @@ function Cs(e) {
|
|
|
3150
3175
|
let r = Number(n[0]);
|
|
3151
3176
|
return Number.isFinite(r) ? r > 0 ? "up" : r < 0 ? "down" : "flat" : "none";
|
|
3152
3177
|
}
|
|
3153
|
-
var
|
|
3178
|
+
var Es = (e, t, n, r, i) => {
|
|
3154
3179
|
let a = n || 30, o = t.clientWidth, s = t.clientHeight, c = i ? Math.max(a, Math.min(i.capPx ?? 96, Math.floor((s > 0 ? s : 0) * i.maxFraction))) : a;
|
|
3155
3180
|
if (r && r.w === o && r.h === s && r.base === a && r.max === c && e.style.fontSize === `${r.px}px`) return {
|
|
3156
3181
|
memo: r,
|
|
@@ -3183,7 +3208,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3183
3208
|
},
|
|
3184
3209
|
wrote: !0
|
|
3185
3210
|
};
|
|
3186
|
-
},
|
|
3211
|
+
}, Ds = ir.memo(({ value: e, settings: t, chartClickConfig: n, hideBorder: r, className: i = "", onChartReady: a, comparisonValue: o, trendLineOptions: s, events: c, originalValue: u, variables: f, language: h, translationDictionary: _, setHoverSubHeader: v, onChartClickWithMetric: y, renderOpts: b }) => {
|
|
3187
3212
|
let [ee, x] = K(""), S = G(null), C = G(null), w = G(null), T = G(null), { valueFont: te, subHeaderFont: ne, changeVariableFont: E, changeIconSize: re } = W(() => {
|
|
3188
3213
|
let e = {
|
|
3189
3214
|
fontSize: `${t?.subHeaderFontSize || 14}px`,
|
|
@@ -3269,7 +3294,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3269
3294
|
_
|
|
3270
3295
|
]), D = G(null), O = G({ maxFraction: .6 }), k = typeof t?.fontSize == "number" && Number.isFinite(t.fontSize) && t.fontSize > 0 ? Math.min(96, Math.max(30, t.fontSize)) : void 0, ce = W(() => t?.subHeaderShow && !!t?.displayText?.trim(), [t?.subHeaderShow, t?.displayText]);
|
|
3271
3296
|
O.current = { maxFraction: ce ? .42 : .6 };
|
|
3272
|
-
let A = W(() =>
|
|
3297
|
+
let A = W(() => Ts(o), [o]), j = A !== "none", M = j && !!s, le = W(() => j ? M ? {
|
|
3273
3298
|
value: "50%",
|
|
3274
3299
|
comparison: "18%",
|
|
3275
3300
|
trend: "32%"
|
|
@@ -3288,7 +3313,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3288
3313
|
D.current = null;
|
|
3289
3314
|
let n = () => {
|
|
3290
3315
|
if (e.clientWidth <= 0 || e.clientHeight <= 0) return;
|
|
3291
|
-
let { memo: n } =
|
|
3316
|
+
let { memo: n } = Es(t, e, 30, D.current, {
|
|
3292
3317
|
...O.current,
|
|
3293
3318
|
capPx: k
|
|
3294
3319
|
});
|
|
@@ -3409,13 +3434,13 @@ var ws = (e, t, n, r, i) => {
|
|
|
3409
3434
|
height: le.trend,
|
|
3410
3435
|
minHeight: 0
|
|
3411
3436
|
},
|
|
3412
|
-
children: /* @__PURE__ */ q(
|
|
3437
|
+
children: /* @__PURE__ */ q(fs, {
|
|
3413
3438
|
ref: T,
|
|
3414
3439
|
style: {
|
|
3415
3440
|
width: "100%",
|
|
3416
3441
|
height: "100%"
|
|
3417
3442
|
},
|
|
3418
|
-
option:
|
|
3443
|
+
option: Fr(s),
|
|
3419
3444
|
theme: "v5",
|
|
3420
3445
|
notMerge: !0,
|
|
3421
3446
|
opts: b
|
|
@@ -3423,11 +3448,11 @@ var ws = (e, t, n, r, i) => {
|
|
|
3423
3448
|
})
|
|
3424
3449
|
]
|
|
3425
3450
|
});
|
|
3426
|
-
}),
|
|
3451
|
+
}), Os = (e, t) => {
|
|
3427
3452
|
if (!e) return "";
|
|
3428
3453
|
let n = e.xAxis?.[0] ?? e.xAxis ?? {}, r = e.yAxis?.[0] ?? e.yAxis ?? {}, i = (Array.isArray(n?.data) ? n.data.length : 0) || (Array.isArray(r?.data) ? r.data.length : 0), a = Array.isArray(e.series) ? e.series.length : 0, o = Array.isArray(e.series?.[0]?.data) ? e.series[0].data.length : 0;
|
|
3429
3454
|
return `${t ?? ""}|${i}|${a}|${o}`;
|
|
3430
|
-
},
|
|
3455
|
+
}, ks = (e) => {
|
|
3431
3456
|
let t = {};
|
|
3432
3457
|
try {
|
|
3433
3458
|
let n = e?.getOption?.()?.dataZoom;
|
|
@@ -3442,9 +3467,9 @@ var ws = (e, t, n, r, i) => {
|
|
|
3442
3467
|
});
|
|
3443
3468
|
} catch {}
|
|
3444
3469
|
return t;
|
|
3445
|
-
},
|
|
3470
|
+
}, As = (e, t, n) => {
|
|
3446
3471
|
if (!e || !Array.isArray(e.dataZoom)) return e;
|
|
3447
|
-
let r =
|
|
3472
|
+
let r = Os(e, t);
|
|
3448
3473
|
return n.shape === r ? Object.keys(n.windows).length ? {
|
|
3449
3474
|
...e,
|
|
3450
3475
|
dataZoom: e.dataZoom.map((e, t) => {
|
|
@@ -3455,13 +3480,13 @@ var ws = (e, t, n, r, i) => {
|
|
|
3455
3480
|
};
|
|
3456
3481
|
})
|
|
3457
3482
|
} : e : (n.shape = r, n.windows = {}, e);
|
|
3458
|
-
},
|
|
3459
|
-
let e = await import("./charts-
|
|
3483
|
+
}, js = /* @__PURE__ */ r({ Chart: () => Ys }), Ms = async () => {
|
|
3484
|
+
let e = await import("./charts-R-SD2ojB.mjs").then((e) => e.t), t = e.DbnChart, { buildAnswerLine: n } = e;
|
|
3460
3485
|
return { default: ({ answerLineInput: e, ...r }) => /* @__PURE__ */ q(t, {
|
|
3461
3486
|
...r,
|
|
3462
3487
|
answerLine: e ? n(e) : null
|
|
3463
3488
|
}) };
|
|
3464
|
-
},
|
|
3489
|
+
}, Ns = null, Ps = null, Fs = sr(() => (Ps ??= Ms().then((e) => (Ns = e.default, e)), Ps)), Is = (e, t) => {
|
|
3465
3490
|
let n = t?.onChartClickWithMetric, r = t?.chartClickConfig?.isEnable ? e?.click : e?.contextmenu;
|
|
3466
3491
|
if (!n && !r) return;
|
|
3467
3492
|
let i = () => {
|
|
@@ -3475,8 +3500,8 @@ var ws = (e, t, n, r, i) => {
|
|
|
3475
3500
|
click: i,
|
|
3476
3501
|
contextmenu: i
|
|
3477
3502
|
};
|
|
3478
|
-
},
|
|
3479
|
-
if (!
|
|
3503
|
+
}, Ls = (e) => typeof e == "object" && !!e && "current" in e, Rs = (e, t) => {
|
|
3504
|
+
if (!Ls(t)) return e;
|
|
3480
3505
|
let n = e?.finished;
|
|
3481
3506
|
return {
|
|
3482
3507
|
...e ?? {},
|
|
@@ -3486,7 +3511,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3486
3511
|
r && (t.current = { getEchartsInstance: () => r.isDisposed?.() ? void 0 : r });
|
|
3487
3512
|
}
|
|
3488
3513
|
};
|
|
3489
|
-
},
|
|
3514
|
+
}, zs = (e) => q(Ns || Fs, { ...e }), Bs = /* @__PURE__ */ new Set([
|
|
3490
3515
|
"echarts",
|
|
3491
3516
|
"option",
|
|
3492
3517
|
"theme",
|
|
@@ -3507,27 +3532,27 @@ var ws = (e, t, n, r, i) => {
|
|
|
3507
3532
|
"tabIndex",
|
|
3508
3533
|
"ref",
|
|
3509
3534
|
"key"
|
|
3510
|
-
]),
|
|
3535
|
+
]), Vs = (e) => e.startsWith("data-") || e.startsWith("aria-"), Hs = (e) => {
|
|
3511
3536
|
if (!e) return { theme: "v5" };
|
|
3512
3537
|
let t = { theme: "v5" };
|
|
3513
|
-
for (let n of Object.keys(e)) (
|
|
3538
|
+
for (let n of Object.keys(e)) (Bs.has(n) || Vs(n)) && (t[n] = e[n]);
|
|
3514
3539
|
return t;
|
|
3515
|
-
},
|
|
3540
|
+
}, Us = (e) => e !== h.treeMap, Ws = (e, t) => {
|
|
3516
3541
|
if (e !== h.treeMap) return e;
|
|
3517
3542
|
try {
|
|
3518
3543
|
return `${e}:${JSON.stringify(t)}`;
|
|
3519
3544
|
} catch {
|
|
3520
3545
|
return e;
|
|
3521
3546
|
}
|
|
3522
|
-
},
|
|
3547
|
+
}, Gs = (e, t, n = 0) => {
|
|
3523
3548
|
if (e === t) return !0;
|
|
3524
3549
|
if (n > 8) return !1;
|
|
3525
3550
|
if (typeof e == "function" && typeof t == "function") return !0;
|
|
3526
3551
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
3527
|
-
if (Array.isArray(e)) return e.length === t.length && e.every((e, r) =>
|
|
3552
|
+
if (Array.isArray(e)) return e.length === t.length && e.every((e, r) => Gs(e, t[r], n + 1));
|
|
3528
3553
|
let r = (e) => (t) => e[t] !== void 0 && typeof e[t] != "function", i = Object.keys(e).filter(r(e)), a = Object.keys(t).filter(r(t));
|
|
3529
|
-
return i.length === a.length && i.every((r) => Object.hasOwn(t, r) &&
|
|
3530
|
-
},
|
|
3554
|
+
return i.length === a.length && i.every((r) => Object.hasOwn(t, r) && Gs(e[r], t[r], n + 1));
|
|
3555
|
+
}, Ks = ({ echartsInstance: e, optionsObj: t, params: n, isGantt: r, chartIds: i }) => {
|
|
3531
3556
|
if (!e || e.isDisposed() || !n?.name) return;
|
|
3532
3557
|
let a = e?.id || "default-chart";
|
|
3533
3558
|
i?.add(a);
|
|
@@ -3564,7 +3589,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3564
3589
|
} catch (e) {
|
|
3565
3590
|
console.error("Failed to update chart options", e);
|
|
3566
3591
|
}
|
|
3567
|
-
},
|
|
3592
|
+
}, qs = (e, t) => {
|
|
3568
3593
|
let n = e?.xAxis, r = t?.[0];
|
|
3569
3594
|
if (!n || !r || typeof r != "object" || n in r) return e;
|
|
3570
3595
|
let i = n.toLowerCase(), a = Object.keys(r).find((e) => e.toLowerCase() === i);
|
|
@@ -3572,30 +3597,30 @@ var ws = (e, t, n, r, i) => {
|
|
|
3572
3597
|
...e,
|
|
3573
3598
|
xAxis: a
|
|
3574
3599
|
} : e;
|
|
3575
|
-
},
|
|
3600
|
+
}, Js = ir.memo(({ chartHeight: e, hasDecreasedHeight: t, config: n, chartOptions: r, options: i, className: a, onEvents: o, chartRef: s, renderOpts: c }) => {
|
|
3576
3601
|
let l = ir.useMemo(() => ({
|
|
3577
3602
|
width: "100%",
|
|
3578
3603
|
height: t && (e || 0) >= 6 ? "100px" : t && !e ? "40%" : "100%"
|
|
3579
|
-
}), [e, t]), u = ir.useMemo(() =>
|
|
3604
|
+
}), [e, t]), u = ir.useMemo(() => Fr(r.customSettings?.chartZoom?.isZoomEnabled ? {
|
|
3580
3605
|
...i,
|
|
3581
3606
|
animation: !0
|
|
3582
3607
|
} : {
|
|
3583
3608
|
...i,
|
|
3584
3609
|
animation: !1
|
|
3585
3610
|
}), [r, i]);
|
|
3586
|
-
return /* @__PURE__ */ ar(
|
|
3611
|
+
return /* @__PURE__ */ ar(fs, {
|
|
3587
3612
|
style: l,
|
|
3588
|
-
...
|
|
3613
|
+
...Hs(n),
|
|
3589
3614
|
option: u,
|
|
3590
3615
|
className: a,
|
|
3591
|
-
key:
|
|
3616
|
+
key: Ws(r.chartType, u),
|
|
3592
3617
|
onEvents: o,
|
|
3593
3618
|
ref: s,
|
|
3594
|
-
notMerge:
|
|
3619
|
+
notMerge: Us(r.chartType),
|
|
3595
3620
|
opts: c
|
|
3596
3621
|
});
|
|
3597
|
-
}, (e, t) => !(e.chartHeight !== t.chartHeight || e.hasDecreasedHeight !== t.hasDecreasedHeight || e.className !== t.className || e.options !== t.options || e.renderOpts !== t.renderOpts || e.onEvents !== t.onEvents || !
|
|
3598
|
-
let F = W(() => ce(
|
|
3622
|
+
}, (e, t) => !(e.chartHeight !== t.chartHeight || e.hasDecreasedHeight !== t.hasDecreasedHeight || e.className !== t.className || e.options !== t.options || e.renderOpts !== t.renderOpts || e.onEvents !== t.onEvents || !Gs(e.config, t.config) || !Gs(e.chartOptions, t.chartOptions))), Ys = ir.memo(({ chartOptions: e, data: t, title: n, events: r, colors: i, areChartColorsExplicit: o, config: l, className: d, isShowFullScreen: f, isShowFullScreenEnabled: p, metricId: m, sortOrder: g, onMaximize: v, onDrillPivotTable: y, pivotDrillState: ee, isPythonMode: S, seriesName: T = "", isSortReversed: te, chartHeight: E, chartAppearance: j, metricCardColor: M, isMetricCard: ue, isDashboard: N, externalGlobalFilter: P, setExternalGlobalFilter: he, variables: _e, language: be, translationDictionary: xe, setHoverSubHeader: Se, drilldownCols: Ce, isEnableDrillDown: we, dateFilter: Te, chartFontSettings: Ee, downloadData: De, isDownloading: Oe, generatingPdf: ke }) => {
|
|
3623
|
+
let F = W(() => ce(qs(e, t), t), [e, t]), [I, Ae] = K(null), [je, Me] = K(null), Ne = ur(A, le, le), Pe = cr((e) => {
|
|
3599
3624
|
Ae((t) => t === e ? t : e);
|
|
3600
3625
|
}, []), [Fe, Ie] = K(() => ie(null));
|
|
3601
3626
|
lr(() => {
|
|
@@ -3612,7 +3637,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3612
3637
|
t
|
|
3613
3638
|
]), Le = L ? ge() : !1, Re = W(() => {
|
|
3614
3639
|
if (!L) return null;
|
|
3615
|
-
let e = ae(
|
|
3640
|
+
let e = ae(ni(j, F), {
|
|
3616
3641
|
...se(F.customSettings),
|
|
3617
3642
|
tooltipSettings: ne(F?.tooltipSettings, Ee?.tooltip),
|
|
3618
3643
|
categoryField: L?.type === "gaugeV2" ? null : F?.xAxis,
|
|
@@ -3733,13 +3758,13 @@ var ws = (e, t, n, r, i) => {
|
|
|
3733
3758
|
});
|
|
3734
3759
|
let t = e.datazoom;
|
|
3735
3760
|
return e.datazoom = (...e) => {
|
|
3736
|
-
let n = e[1], r =
|
|
3761
|
+
let n = e[1], r = ks(n);
|
|
3737
3762
|
Object.keys(r).length && (ht.current.windows = r), t?.(...e);
|
|
3738
3763
|
}, e;
|
|
3739
3764
|
}, [mt]), vt = G(/* @__PURE__ */ new Set()), yt = W(() => ({
|
|
3740
3765
|
..._t,
|
|
3741
3766
|
legendselectchanged: (e, t) => {
|
|
3742
|
-
|
|
3767
|
+
Ks({
|
|
3743
3768
|
echartsInstance: t,
|
|
3744
3769
|
optionsObj: pt.current.options,
|
|
3745
3770
|
params: e,
|
|
@@ -3749,7 +3774,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3749
3774
|
}), [_t]), bt = W(() => ({
|
|
3750
3775
|
..._t,
|
|
3751
3776
|
legendselectchanged: (e, t) => {
|
|
3752
|
-
|
|
3777
|
+
Ks({
|
|
3753
3778
|
echartsInstance: t,
|
|
3754
3779
|
optionsObj: pt.current.advancedOptions,
|
|
3755
3780
|
params: e,
|
|
@@ -3757,7 +3782,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3757
3782
|
chartIds: vt.current
|
|
3758
3783
|
});
|
|
3759
3784
|
}
|
|
3760
|
-
}), [_t]), xt = W(() =>
|
|
3785
|
+
}), [_t]), xt = W(() => Fr(As(ft, F?.chartType, ht.current)), [ft, F?.chartType]), St = W(() => Fr(As(ot ?? z, F?.chartType, ht.current)), [
|
|
3761
3786
|
ot,
|
|
3762
3787
|
z,
|
|
3763
3788
|
F?.chartType
|
|
@@ -3832,7 +3857,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
3832
3857
|
let Ft = W(() => je === null ? null : {
|
|
3833
3858
|
renderer: l?.opts?.renderer || "canvas",
|
|
3834
3859
|
devicePixelRatio: je
|
|
3835
|
-
}, [l?.opts?.renderer, je]), It = W(() =>
|
|
3860
|
+
}, [l?.opts?.renderer, je]), It = W(() => Ws(F.chartType, ft), [ft, F.chartType]);
|
|
3836
3861
|
U(() => {
|
|
3837
3862
|
if (!L && Nt) {
|
|
3838
3863
|
let e = [
|
|
@@ -4065,7 +4090,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4065
4090
|
}
|
|
4066
4091
|
}
|
|
4067
4092
|
} else t = z;
|
|
4068
|
-
e && s.includes(F?.chartType || "") && (t =
|
|
4093
|
+
e && s.includes(F?.chartType || "") && (t = Jr(t, {
|
|
4069
4094
|
chartType: F?.chartType,
|
|
4070
4095
|
canvas: {
|
|
4071
4096
|
width: e.getWidth?.() || 0,
|
|
@@ -4177,7 +4202,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4177
4202
|
]);
|
|
4178
4203
|
let Gt;
|
|
4179
4204
|
if (L) {
|
|
4180
|
-
let e =
|
|
4205
|
+
let e = kr(F.chartType), t = zt && (E || 0) >= 6 ? Math.min(100, e) : typeof E == "number" && E > 0 ? Math.max(e, E * 24) : e;
|
|
4181
4206
|
Gt = /* @__PURE__ */ q("div", {
|
|
4182
4207
|
style: {
|
|
4183
4208
|
width: "100%",
|
|
@@ -4187,30 +4212,33 @@ var ws = (e, t, n, r, i) => {
|
|
|
4187
4212
|
flexDirection: "column",
|
|
4188
4213
|
alignSelf: "stretch"
|
|
4189
4214
|
},
|
|
4190
|
-
children: /* @__PURE__ */ q(
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
"
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4215
|
+
children: /* @__PURE__ */ q(Or, {
|
|
4216
|
+
customSettings: F.customSettings,
|
|
4217
|
+
children: /* @__PURE__ */ q(x, {
|
|
4218
|
+
surface: "chart",
|
|
4219
|
+
fallback: /* @__PURE__ */ q("div", {
|
|
4220
|
+
className: "dbn:w-full dbn:h-full",
|
|
4221
|
+
"aria-hidden": !0
|
|
4222
|
+
}),
|
|
4223
|
+
children: /* @__PURE__ */ q(zs, {
|
|
4224
|
+
type: L.type,
|
|
4225
|
+
data: L.data,
|
|
4226
|
+
answerLineInput: Ve,
|
|
4227
|
+
minHeight: zt ? void 0 : 0,
|
|
4228
|
+
applyDensity: ze,
|
|
4229
|
+
appearance: Re ?? void 0,
|
|
4230
|
+
adminTheme: Ee,
|
|
4231
|
+
colorBy: L.colorBy,
|
|
4232
|
+
valueFormatter: Be,
|
|
4233
|
+
chartColors: o === !1 ? void 0 : i,
|
|
4234
|
+
renderer: l?.opts?.renderer,
|
|
4235
|
+
onEvents: Rs(L.type === "singleValue" ? Is(r, l) : r, l?.ref),
|
|
4236
|
+
className: d
|
|
4237
|
+
})
|
|
4210
4238
|
})
|
|
4211
4239
|
})
|
|
4212
4240
|
});
|
|
4213
|
-
} else Gt = F.chartType === h.radar ? /* @__PURE__ */ q(
|
|
4241
|
+
} else Gt = F.chartType === h.radar ? /* @__PURE__ */ q(ps, {
|
|
4214
4242
|
chartType: F.chartType,
|
|
4215
4243
|
text: Fe ? "Radar needs one category and at least three measures." : "Radar requires the new chart engine."
|
|
4216
4244
|
}) : !z || Ft === null ? null : (() => {
|
|
@@ -4221,10 +4249,10 @@ var ws = (e, t, n, r, i) => {
|
|
|
4221
4249
|
h.geoScatterMap,
|
|
4222
4250
|
h.worldMap
|
|
4223
4251
|
].includes(F.chartType);
|
|
4224
|
-
return e && We ? /* @__PURE__ */ q(
|
|
4252
|
+
return e && We ? /* @__PURE__ */ q(ps, {
|
|
4225
4253
|
chartType: F.chartType,
|
|
4226
4254
|
text: "Could not load the map outline. Check your connection and try again."
|
|
4227
|
-
}) : e && !He ? /* @__PURE__ */ q(tr, {}) : F.chartType === h.singleValue ? /* @__PURE__ */ q(
|
|
4255
|
+
}) : e && !He ? /* @__PURE__ */ q(tr, {}) : F.chartType === h.singleValue ? /* @__PURE__ */ q(Ds, {
|
|
4228
4256
|
...Ut,
|
|
4229
4257
|
value: z.value,
|
|
4230
4258
|
settings: z.settings,
|
|
@@ -4238,7 +4266,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4238
4266
|
translationDictionary: xe,
|
|
4239
4267
|
setHoverSubHeader: Se,
|
|
4240
4268
|
renderOpts: Ft
|
|
4241
|
-
}) : F.chartType === h.horizontalStackTable ? /* @__PURE__ */ q(
|
|
4269
|
+
}) : F.chartType === h.horizontalStackTable ? /* @__PURE__ */ q(xs, {
|
|
4242
4270
|
...Ut,
|
|
4243
4271
|
data: z.data,
|
|
4244
4272
|
rawData: t,
|
|
@@ -4271,7 +4299,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4271
4299
|
].includes(F?.labelSettings?.position) ? F?.labelSettings?.position : "bottom"
|
|
4272
4300
|
},
|
|
4273
4301
|
renderOpts: Ft
|
|
4274
|
-
}) : F.chartType === h.table ? /* @__PURE__ */ q(
|
|
4302
|
+
}) : F.chartType === h.table ? /* @__PURE__ */ q(bs, {
|
|
4275
4303
|
chartFieldFormats: F.customSettings?.chartFieldFormats,
|
|
4276
4304
|
yAxisList: F?.yAxisList || [],
|
|
4277
4305
|
...Ut,
|
|
@@ -4315,7 +4343,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4315
4343
|
isDisableChartActions: !l?.chartClickConfig?.isEnable,
|
|
4316
4344
|
onDownloadData: De,
|
|
4317
4345
|
isDownloading: Oe
|
|
4318
|
-
}) : F.chartType === h.trendAnalyzer ? /* @__PURE__ */ q(
|
|
4346
|
+
}) : F.chartType === h.trendAnalyzer ? /* @__PURE__ */ q(Ho, {
|
|
4319
4347
|
...Ut,
|
|
4320
4348
|
events: r,
|
|
4321
4349
|
data: z.data,
|
|
@@ -4354,12 +4382,12 @@ var ws = (e, t, n, r, i) => {
|
|
|
4354
4382
|
isDisableChartActions: !l?.chartClickConfig?.isEnable,
|
|
4355
4383
|
onDownloadData: De,
|
|
4356
4384
|
isDownloading: Oe
|
|
4357
|
-
}) : F.chartType === h.pivot ? /* @__PURE__ */ q(
|
|
4385
|
+
}) : F.chartType === h.pivot ? /* @__PURE__ */ q(Ss, {
|
|
4358
4386
|
...Ut,
|
|
4359
4387
|
data: t,
|
|
4360
4388
|
pivotTableSettings: z.pivotTableSettings,
|
|
4361
4389
|
tableSettings: z?.tableSettings
|
|
4362
|
-
}) : F.chartType === h.pivotV2 ? /* @__PURE__ */ q(
|
|
4390
|
+
}) : F.chartType === h.pivotV2 ? /* @__PURE__ */ q(Cs, { props: {
|
|
4363
4391
|
columns: z?.pivotTableSettings2?.headers || [],
|
|
4364
4392
|
data: t || [],
|
|
4365
4393
|
rows: z?.pivotTableSettings2?.dimensions || [],
|
|
@@ -4382,7 +4410,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4382
4410
|
isEnableTableSort: F?.tableSettings?.enableSorting,
|
|
4383
4411
|
isEnableAllSort: F?.tableSettings?.isEnableAllSort,
|
|
4384
4412
|
tableSettings: z?.tableSettings
|
|
4385
|
-
} }) : F.chartType === h.pivotV3 ? /* @__PURE__ */ q(
|
|
4413
|
+
} }) : F.chartType === h.pivotV3 ? /* @__PURE__ */ q(ws, { props: {
|
|
4386
4414
|
columns: z?.pivotTableSettings3?.columns || [],
|
|
4387
4415
|
data: t || [],
|
|
4388
4416
|
rows: z?.pivotTableSettings3?.rows || [],
|
|
@@ -4418,26 +4446,26 @@ var ws = (e, t, n, r, i) => {
|
|
|
4418
4446
|
h.area,
|
|
4419
4447
|
h.stackedArea,
|
|
4420
4448
|
h.timeSeries
|
|
4421
|
-
].includes(F.chartType) && F.customSettings?.showDynamicBehaviour && !nt ? /* @__PURE__ */ ar(
|
|
4449
|
+
].includes(F.chartType) && F.customSettings?.showDynamicBehaviour && !nt ? /* @__PURE__ */ ar(fs, {
|
|
4422
4450
|
style: {
|
|
4423
4451
|
width: "100%",
|
|
4424
4452
|
height: "100%"
|
|
4425
4453
|
},
|
|
4426
|
-
...
|
|
4454
|
+
...Hs(l),
|
|
4427
4455
|
option: St,
|
|
4428
4456
|
className: d,
|
|
4429
4457
|
key: It,
|
|
4430
4458
|
ref: l?.ref ?? R,
|
|
4431
4459
|
onEvents: yt,
|
|
4432
|
-
notMerge:
|
|
4460
|
+
notMerge: Us(F.chartType),
|
|
4433
4461
|
opts: Ft
|
|
4434
|
-
}) : F.chartType === h.geoBarMap ? /* @__PURE__ */ q(
|
|
4462
|
+
}) : F.chartType === h.geoBarMap ? /* @__PURE__ */ q(fs, {
|
|
4435
4463
|
style: {
|
|
4436
4464
|
width: "100%",
|
|
4437
4465
|
height: "100%"
|
|
4438
4466
|
},
|
|
4439
|
-
...
|
|
4440
|
-
option:
|
|
4467
|
+
...Hs(l),
|
|
4468
|
+
option: Fr({
|
|
4441
4469
|
...ct || z?.geoOption,
|
|
4442
4470
|
animation: !0
|
|
4443
4471
|
}),
|
|
@@ -4453,7 +4481,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4453
4481
|
].includes(F.chartType) ? /* @__PURE__ */ q("div", {
|
|
4454
4482
|
ref: Ye,
|
|
4455
4483
|
className: "dbn:w-full dbn:h-full dbn:flex dbn:flex-col"
|
|
4456
|
-
}) : F?.chartType === h.gauge ? /* @__PURE__ */ q(
|
|
4484
|
+
}) : F?.chartType === h.gauge ? /* @__PURE__ */ q(ps, {
|
|
4457
4485
|
chartType: F?.chartType,
|
|
4458
4486
|
subText: "Please use the Gauge V2 chart instead."
|
|
4459
4487
|
}) : [h.worldMap, h.indianMap].includes(F.chartType) ? /* @__PURE__ */ J("div", {
|
|
@@ -4464,15 +4492,15 @@ var ws = (e, t, n, r, i) => {
|
|
|
4464
4492
|
onClick: () => Mt(!jt),
|
|
4465
4493
|
className: $.buttonText,
|
|
4466
4494
|
children: ["Go To Geo ", jt ? "Map >" : "Table >"]
|
|
4467
|
-
}) : null, jt ? /* @__PURE__ */ q(
|
|
4495
|
+
}) : null, jt ? /* @__PURE__ */ q(Lo, {
|
|
4468
4496
|
data: kt,
|
|
4469
4497
|
headers: Wt
|
|
4470
|
-
}) : /* @__PURE__ */ q(
|
|
4498
|
+
}) : /* @__PURE__ */ q(fs, {
|
|
4471
4499
|
style: {
|
|
4472
4500
|
width: "100%",
|
|
4473
4501
|
height: zt && (E || 0) >= 6 ? "100px" : zt && !E ? "40%" : "100%"
|
|
4474
4502
|
},
|
|
4475
|
-
...
|
|
4503
|
+
...Hs(l),
|
|
4476
4504
|
option: F.customSettings?.chartZoom?.isZoomEnabled ? {
|
|
4477
4505
|
...xt,
|
|
4478
4506
|
animation: !0
|
|
@@ -4489,7 +4517,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4489
4517
|
}) : /* @__PURE__ */ q("div", {
|
|
4490
4518
|
className: "dbn:w-full dbn:h-full dbn:relative dbn:flex dbn:gap-3 dbn:flex-col dbn:items-end dbn:justify-center",
|
|
4491
4519
|
id: "chartContainer",
|
|
4492
|
-
children: ue ? /* @__PURE__ */ q(
|
|
4520
|
+
children: ue ? /* @__PURE__ */ q(Js, {
|
|
4493
4521
|
chartHeight: E,
|
|
4494
4522
|
hasDecreasedHeight: zt,
|
|
4495
4523
|
config: l,
|
|
@@ -4499,12 +4527,12 @@ var ws = (e, t, n, r, i) => {
|
|
|
4499
4527
|
onEvents: bt,
|
|
4500
4528
|
chartRef: l?.ref ?? R,
|
|
4501
4529
|
renderOpts: Ft
|
|
4502
|
-
}) : /* @__PURE__ */ ar(
|
|
4530
|
+
}) : /* @__PURE__ */ ar(fs, {
|
|
4503
4531
|
style: {
|
|
4504
4532
|
width: "100%",
|
|
4505
4533
|
height: zt && (E || 0) >= 6 ? "100px" : zt && !E ? "40%" : "100%"
|
|
4506
4534
|
},
|
|
4507
|
-
...
|
|
4535
|
+
...Hs(l),
|
|
4508
4536
|
option: F.customSettings?.chartZoom?.isZoomEnabled ? {
|
|
4509
4537
|
...xt,
|
|
4510
4538
|
animation: !0
|
|
@@ -4516,7 +4544,7 @@ var ws = (e, t, n, r, i) => {
|
|
|
4516
4544
|
key: It,
|
|
4517
4545
|
onEvents: bt,
|
|
4518
4546
|
ref: l?.ref ?? R,
|
|
4519
|
-
notMerge:
|
|
4547
|
+
notMerge: Us(F.chartType),
|
|
4520
4548
|
opts: Ft
|
|
4521
4549
|
})
|
|
4522
4550
|
});
|
|
@@ -4535,4 +4563,4 @@ var ws = (e, t, n, r, i) => {
|
|
|
4535
4563
|
});
|
|
4536
4564
|
});
|
|
4537
4565
|
//#endregion
|
|
4538
|
-
export { Sr as a, xr as c, vr as d, fr as f, Tr as i, br as l,
|
|
4566
|
+
export { Sr as a, xr as c, vr as d, fr as f, Tr as i, br as l, js as n, Cr as o, bs as r, wr as s, Ys as t, yr as u };
|