@graphysdk/viz-engine 1.9.0-beta.1790339973640 → 1.9.0-beta.1790343746744
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/{annotations-2K7KGchk.js → annotations-BtixnRGl.js} +491 -487
- package/dist/annotations-DVxRgula.cjs +1 -0
- package/dist/{compiler-BvhyWcnf.cjs → compiler-DHqcM9_t.cjs} +1 -1
- package/dist/{compiler-DaqPCohP.js → compiler-VfpbDlQv.js} +69 -69
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.d.ts +2 -0
- package/dist/graph-config.mjs +52 -52
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +24 -13
- package/dist/index.mjs +2518 -2500
- package/dist/{spec-builder-DCZqkzys.cjs → spec-builder-CVcqqdPN.cjs} +1 -1
- package/dist/{spec-builder-C9OJrwo8.js → spec-builder-gfoT7mIu.js} +15 -15
- package/dist/testing.cjs +1 -1
- package/dist/testing.d.ts +2 -0
- package/dist/testing.mjs +2 -2
- package/package.json +1 -1
- package/dist/annotations-DvumkRtN.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { differenceInDays as Rr, isBefore as Cr, isValid as _, isWithinInterval as Dr, parse as se } from "date-fns";
|
|
2
2
|
import { isEqual as Ir, isInteger as Fr, merge as Pr } from "lodash-es";
|
|
3
|
-
var Ue = (e) => e instanceof Date && _(e),
|
|
3
|
+
var Ue = (e) => e instanceof Date && _(e), Zs = (e) => Ue(e) || e === null, ei = (e) => typeof e == "string", L = (e) => typeof e == "number" && !Number.isNaN(e) && Number.isFinite(e), ti = (e) => L(e) || e === null, Y = Math.PI * 2, ri = 8, Or = 1e-9, Nr = [
|
|
4
4
|
0,
|
|
5
5
|
Math.PI / 2,
|
|
6
6
|
Math.PI,
|
|
@@ -9,13 +9,13 @@ var Ue = (e) => e instanceof Date && _(e), Qs = (e) => Ue(e) || e === null, Zs =
|
|
|
9
9
|
if (Br(t, r)) return !0;
|
|
10
10
|
const a = ie(r - t);
|
|
11
11
|
return ie(e - t) <= a;
|
|
12
|
-
},
|
|
12
|
+
}, ai = (e, t) => {
|
|
13
13
|
const r = Math.abs(ie(e) - ie(t));
|
|
14
14
|
return Math.min(r, Y - r);
|
|
15
|
-
},
|
|
15
|
+
}, ni = (e, t) => {
|
|
16
16
|
const r = ie(t - e);
|
|
17
17
|
return r > Math.PI ? r - Y : r;
|
|
18
|
-
},
|
|
18
|
+
}, si = (e, t, r) => e * Y + t + r, Wr = (e, t) => ({
|
|
19
19
|
x: t * Math.sin(e),
|
|
20
20
|
y: t * Math.cos(e)
|
|
21
21
|
}), $ = (e, t) => {
|
|
@@ -46,10 +46,10 @@ var Ue = (e) => e instanceof Date && _(e), Qs = (e) => Ue(e) || e === null, Zs =
|
|
|
46
46
|
x: t >= 1 ? r * 2 * t : r * 2,
|
|
47
47
|
y: t >= 1 ? a * 2 : a * 2 / t
|
|
48
48
|
};
|
|
49
|
-
},
|
|
49
|
+
}, ii = (e, t) => {
|
|
50
50
|
const { x: r, y: a } = zr(e, t);
|
|
51
51
|
return Yr(r, a);
|
|
52
|
-
}, Ft = "\0graphy\0_", m = (e) => `${Ft}${e}`, Pt = { x: m("constantX") },
|
|
52
|
+
}, Ft = "\0graphy\0_", m = (e) => `${Ft}${e}`, Pt = { x: m("constantX") }, oi = {
|
|
53
53
|
bar: m("barSeriesLabel"),
|
|
54
54
|
line: m("lineSeriesLabel")
|
|
55
55
|
}, Ot = {
|
|
@@ -73,7 +73,7 @@ var Ue = (e) => e instanceof Date && _(e), Qs = (e) => Ue(e) || e === null, Zs =
|
|
|
73
73
|
}, he = {
|
|
74
74
|
y: m("ruleY"),
|
|
75
75
|
x: m("ruleX")
|
|
76
|
-
},
|
|
76
|
+
}, li = {
|
|
77
77
|
...Pt,
|
|
78
78
|
...Ot,
|
|
79
79
|
...Ye,
|
|
@@ -81,7 +81,7 @@ var Ue = (e) => e instanceof Date && _(e), Qs = (e) => Ue(e) || e === null, Zs =
|
|
|
81
81
|
...Nt,
|
|
82
82
|
...ce,
|
|
83
83
|
...he
|
|
84
|
-
}, Gr = new Set(Object.values(Ot)), jr = (e) => m(`scaled_${e}`),
|
|
84
|
+
}, Gr = new Set(Object.values(Ot)), jr = (e) => m(`scaled_${e}`), ci = (e) => e.startsWith(Ft), Hr = (e) => Gr.has(e);
|
|
85
85
|
function X(e) {
|
|
86
86
|
return e[b.x];
|
|
87
87
|
}
|
|
@@ -103,7 +103,7 @@ function j(e) {
|
|
|
103
103
|
function $r(e) {
|
|
104
104
|
return e[b.yRaw];
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function ui(e, t) {
|
|
107
107
|
return e[jr(t)];
|
|
108
108
|
}
|
|
109
109
|
var Kr = {
|
|
@@ -171,24 +171,24 @@ var Kr = {
|
|
|
171
171
|
y: a
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
},
|
|
174
|
+
}, di = (e) => Bt(Kr, e), ze = (e) => (Array.isArray(e) ? e : [e]).map((t) => t instanceof Date ? t.toISOString() : String(t ?? "<null>")).join("\0"), hi = (e, t) => e === t ? !0 : Ue(e) && Ue(t) ? e.getTime() === t.getTime() : !1, qr = (e) => e === null ? "null" : e instanceof Date ? `date:${e.getTime()}` : `${typeof e}:${e}`, fi = (e) => e.length > 0;
|
|
175
175
|
function fe(e) {
|
|
176
176
|
return e != null;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function pi(e) {
|
|
179
179
|
if (e === null || typeof e != "object") return !1;
|
|
180
180
|
const t = Object.getPrototypeOf(e);
|
|
181
181
|
return t === Object.prototype || t === null;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function yi(e) {
|
|
184
184
|
const { numeric: t, categorical: r, temporal: a } = e.groupVariableNamesByType();
|
|
185
185
|
return a[0] ?? r[0] ?? t[0] ?? "";
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function gi(e, t) {
|
|
188
188
|
const { categorical: r, temporal: a } = e.groupVariableNamesByType(), n = [...r, ...a];
|
|
189
189
|
return t === "" || n.includes(t) ? n : [t, ...n];
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function mi(e) {
|
|
192
192
|
const t = F(e.x);
|
|
193
193
|
return t === null || t === Pt.x ? "" : t;
|
|
194
194
|
}
|
|
@@ -199,21 +199,21 @@ function Le(e) {
|
|
|
199
199
|
if (!(!fe(e) || typeof e == "string") && "value" in e)
|
|
200
200
|
return e.value;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function bi(e, t) {
|
|
203
203
|
return [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])].every((r) => at(e[r]) === at(t[r]));
|
|
204
204
|
}
|
|
205
205
|
function at(e) {
|
|
206
206
|
const t = F(e);
|
|
207
207
|
if (t !== null) return `variable:${t}`;
|
|
208
208
|
const r = Le(e);
|
|
209
|
-
return r === void 0 ? "" :
|
|
209
|
+
return r === void 0 ? "" : `value:${qr(r)}`;
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var Jr = [
|
|
212
212
|
"stack",
|
|
213
213
|
"dodge",
|
|
214
214
|
"identity",
|
|
215
215
|
"fill"
|
|
216
|
-
],
|
|
216
|
+
], Qr = [
|
|
217
217
|
"solid",
|
|
218
218
|
"dashed",
|
|
219
219
|
"dotted"
|
|
@@ -248,7 +248,7 @@ var qr = [
|
|
|
248
248
|
dashed: [1.5, 3],
|
|
249
249
|
dotted: [0, 2]
|
|
250
250
|
}
|
|
251
|
-
},
|
|
251
|
+
}, vi = (e) => Qr.includes(e);
|
|
252
252
|
function ye(e) {
|
|
253
253
|
return e === "stack" || e === "fill";
|
|
254
254
|
}
|
|
@@ -267,13 +267,13 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
267
267
|
code: e.code ?? "INTERNAL_INVARIANT"
|
|
268
268
|
}), this.kind = "internal";
|
|
269
269
|
}
|
|
270
|
-
}, Wt = (e) => e.type === "lookup",
|
|
270
|
+
}, Wt = (e) => e.type === "lookup", Zr = (e) => e.type === "text", ve = (e) => e.type === "date" || e.type === "datetime" || e.type === "year" || e.type === "month_year" || e.type === "month" || e.type === "day_month" || e.type === "weekly_date_range" || e.type === "weekly_date_range_with_year" || e.type === "quarter" || e.type === "time", ea = (e) => e.type === "decimal" || e.type === "integer" || e.type === "percentage" || e.type === "duration" || e.type === "currency", Ai = (e) => e.type === "currency", Ei = (e) => e.type === "month" || e.type === "day_month" || e.type === "weekly_date_range", Ut = (e) => {
|
|
271
271
|
if (Wt(e)) return Ut(e.fallback);
|
|
272
272
|
if (ve(e)) return "temporal";
|
|
273
|
-
if (
|
|
274
|
-
if (
|
|
273
|
+
if (ea(e)) return "numeric";
|
|
274
|
+
if (Zr(e)) return "categorical";
|
|
275
275
|
throw new R({ message: `No data type found for value format: ${e.type}` });
|
|
276
|
-
},
|
|
276
|
+
}, xi = (e) => Wt(e) ? e.fallback : e, ta = class {
|
|
277
277
|
constructor() {
|
|
278
278
|
this.currentYear = (/* @__PURE__ */ new Date()).getUTCFullYear(), this.previousDate = null, this.previousYear = null;
|
|
279
279
|
}
|
|
@@ -282,7 +282,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
282
282
|
const t = new Date(e.getTime());
|
|
283
283
|
return t.setUTCFullYear(this.previousYear), this.previousDate = t, t;
|
|
284
284
|
}
|
|
285
|
-
},
|
|
285
|
+
}, ra = {
|
|
286
286
|
k: 1e3,
|
|
287
287
|
m: 1e6,
|
|
288
288
|
b: 1e9,
|
|
@@ -292,7 +292,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
292
292
|
"m",
|
|
293
293
|
"b",
|
|
294
294
|
"t"
|
|
295
|
-
],
|
|
295
|
+
], aa = new RegExp(`^-?(\\d{1,3}(,\\d{3})*|\\d+)\\.?\\d*(${$e.join("|")})?$`, "i"), na = /^-?\d{1,3}(?:,\d{3})*(?:\.\d+)?%?$/, Q = (e) => e === null || e instanceof Date || Array.isArray(e) || typeof e == "boolean" ? !1 : typeof e == "string" ? aa.test(e) && !Number.isNaN(Number(e.replace(new RegExp(`[,${$e.join("")}]`, "gi"), ""))) : Number.isFinite(Number(e)), Yt = (e) => Q(e) ? !0 : typeof e == "string" ? na.test(e) : !1, sa = /^\d{4}-\d{2}-\d{2}(T|\s)\d{1,2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|\+00:00)?$/, ia = /^\s*(1[89]\d{2}|2[01]\d{2})\s*$/, oa = [
|
|
296
296
|
[/\bJan\b/i, "January"],
|
|
297
297
|
[/\bFeb\b/i, "February"],
|
|
298
298
|
[/\bMar\b/i, "March"],
|
|
@@ -304,7 +304,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
304
304
|
[/\bOct\b/i, "October"],
|
|
305
305
|
[/\bNov\b/i, "November"],
|
|
306
306
|
[/\bDec\b/i, "December"]
|
|
307
|
-
],
|
|
307
|
+
], la = {
|
|
308
308
|
"en-US": "MDY",
|
|
309
309
|
"en-GB": "DMY",
|
|
310
310
|
"pt-PT": "DMY",
|
|
@@ -499,7 +499,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
499
499
|
["MMMM", "d"],
|
|
500
500
|
["MMMM", "dd"],
|
|
501
501
|
["MMMM", "do"]
|
|
502
|
-
],
|
|
502
|
+
], ca = [
|
|
503
503
|
{
|
|
504
504
|
dateFormat: "MMMM d, yyyy",
|
|
505
505
|
type: "date"
|
|
@@ -516,35 +516,35 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
516
516
|
dateFormat: "yyyy-MM",
|
|
517
517
|
type: "month_year"
|
|
518
518
|
}
|
|
519
|
-
], jt = 1800, Ht = 2199,
|
|
519
|
+
], jt = 1800, Ht = 2199, ua = 3, da = 6, ha = 5, fa = 1, pa = 28, ya = /\s*[–—]\s*|\s-\s/, ga = (e) => typeof e == "number" ? Number.isInteger(e) && e >= jt && e <= Ht : typeof e == "string" ? ia.test(e) : !1, $t = (e, t) => {
|
|
520
520
|
const r = ge(e);
|
|
521
|
-
return !t && Q(r) ?
|
|
521
|
+
return !t && Q(r) ? Aa(r) : typeof r == "string" ? t ? _(se(r, t, /* @__PURE__ */ new Date())) : !!Kt(r) || Re(r) && _(new Date(r)) : _(r);
|
|
522
522
|
}, ge = (e) => {
|
|
523
523
|
if (typeof e != "string") return e;
|
|
524
524
|
let t = e;
|
|
525
|
-
for (const [r, a] of
|
|
525
|
+
for (const [r, a] of oa) t = t.replace(r, a);
|
|
526
526
|
return t;
|
|
527
527
|
}, Kt = (e, t = _e) => {
|
|
528
528
|
const r = ge(e);
|
|
529
|
-
return Re(r) ? { type: "datetime" } : Xt(t).find((a) => !ve(a) || a.type === "month" && r.length <
|
|
530
|
-
}, Re = (e) =>
|
|
529
|
+
return Re(r) ? { type: "datetime" } : Xt(t).find((a) => !ve(a) || a.type === "month" && r.length < ua ? !1 : a.dateFormat && _(se(r, a.dateFormat, /* @__PURE__ */ new Date())));
|
|
530
|
+
}, Re = (e) => sa.test(e.trim()), ma = (e) => {
|
|
531
531
|
if (e instanceof Date) return _(e) ? e : null;
|
|
532
532
|
if (typeof e != "string" || !Re(e)) return null;
|
|
533
533
|
const t = new Date(e.trim());
|
|
534
534
|
return _(t) ? t : null;
|
|
535
|
-
},
|
|
536
|
-
const [r, a] = e.split(
|
|
535
|
+
}, ba = (e, t = _e) => {
|
|
536
|
+
const [r, a] = e.split(ya);
|
|
537
537
|
if (!r || !a) return;
|
|
538
538
|
const n = ge(r).trim(), s = ge(a).trim();
|
|
539
|
-
return
|
|
539
|
+
return va(t).find((i) => {
|
|
540
540
|
if (!ve(i) || !i.dateFormat) return !1;
|
|
541
541
|
const o = se(n, i.dateFormat, /* @__PURE__ */ new Date()), l = se(s, i.dateFormat, /* @__PURE__ */ new Date());
|
|
542
542
|
if (!_(o) || !_(l)) return !1;
|
|
543
|
-
const c = new
|
|
544
|
-
return Dr(new Date(u.getFullYear(),
|
|
543
|
+
const c = new ta(), u = c.incrementYearIfNeeded(o), f = c.incrementYearIfNeeded(l), d = Rr(f, u);
|
|
544
|
+
return Dr(new Date(u.getFullYear(), fa, pa), {
|
|
545
545
|
start: u,
|
|
546
546
|
end: f
|
|
547
|
-
}) && d ===
|
|
547
|
+
}) && d === ha ? !0 : d === da;
|
|
548
548
|
});
|
|
549
549
|
}, Xt = (e) => {
|
|
550
550
|
const t = {
|
|
@@ -555,11 +555,11 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
555
555
|
month: [["MMMM"]],
|
|
556
556
|
quarter: [["QQQ", "yyyy"], ["yyyy", "QQQ"]]
|
|
557
557
|
};
|
|
558
|
-
return [...
|
|
558
|
+
return [...ca, ...Object.entries(t).flatMap(([r, a]) => a.flatMap((n) => zt.map((s) => ({
|
|
559
559
|
dateFormat: n.join(s),
|
|
560
560
|
type: r
|
|
561
561
|
}))))];
|
|
562
|
-
}, qt = (e) =>
|
|
562
|
+
}, qt = (e) => la[e] === "MDY" ? [
|
|
563
563
|
...st,
|
|
564
564
|
...nt,
|
|
565
565
|
...it
|
|
@@ -567,7 +567,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
567
567
|
...nt,
|
|
568
568
|
...st,
|
|
569
569
|
...it
|
|
570
|
-
],
|
|
570
|
+
], va = (e) => {
|
|
571
571
|
const t = {
|
|
572
572
|
weekly_date_range: Gt,
|
|
573
573
|
weekly_date_range_with_year: qt(e)
|
|
@@ -576,7 +576,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
576
576
|
dateFormat: n.join(s),
|
|
577
577
|
type: r
|
|
578
578
|
}))));
|
|
579
|
-
},
|
|
579
|
+
}, Aa = (e) => {
|
|
580
580
|
const t = Number(e);
|
|
581
581
|
if (!Fr(t)) return !1;
|
|
582
582
|
const r = new Date(t), a = /* @__PURE__ */ new Date(t * 1e3), n = (s) => _(s) && s.getFullYear() >= jt && s.getFullYear() <= Ht;
|
|
@@ -619,7 +619,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
619
619
|
return t.length ? Q(t) : !1;
|
|
620
620
|
}
|
|
621
621
|
return Q(e);
|
|
622
|
-
},
|
|
622
|
+
}, Ea = (e) => {
|
|
623
623
|
const t = er(e), r = t ? Jt[t] : void 0;
|
|
624
624
|
if (!r) throw new R({ message: "Could not get currency ISO" });
|
|
625
625
|
return r;
|
|
@@ -634,7 +634,7 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
634
634
|
}, er = (e) => Object.keys(Jt).sort((t, r) => r.length - t.length).find((t) => e.includes(t)), tr = (e) => {
|
|
635
635
|
const t = Object.entries(e);
|
|
636
636
|
return !t.length || !t.some(([, r]) => !le(r));
|
|
637
|
-
}, le = (e) => typeof e == "string" && e.trim() === "" || e === void 0 || e === null || e === "-",
|
|
637
|
+
}, le = (e) => typeof e == "string" && e.trim() === "" || e === void 0 || e === null || e === "-", xa = /\s*[–—]\s*|\s-\s/, rr = (e, t, r) => {
|
|
638
638
|
if (le(e)) return null;
|
|
639
639
|
switch (t.type) {
|
|
640
640
|
case "decimal":
|
|
@@ -642,9 +642,9 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
642
642
|
case "duration":
|
|
643
643
|
return nr(e);
|
|
644
644
|
case "percentage":
|
|
645
|
-
return xa(e);
|
|
646
|
-
case "currency":
|
|
647
645
|
return Ta(e);
|
|
646
|
+
case "currency":
|
|
647
|
+
return Ma(e);
|
|
648
648
|
case "datetime":
|
|
649
649
|
case "date":
|
|
650
650
|
case "year":
|
|
@@ -656,9 +656,9 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
656
656
|
return ar(e, t.dateFormat, r);
|
|
657
657
|
case "weekly_date_range":
|
|
658
658
|
case "weekly_date_range_with_year":
|
|
659
|
-
return
|
|
659
|
+
return wa(e, t.dateFormat, r);
|
|
660
660
|
case "text":
|
|
661
|
-
return
|
|
661
|
+
return Sa(e);
|
|
662
662
|
case "lookup":
|
|
663
663
|
throw new R({ message: "Cannot parse: lookup value formats are produced by transforms, not raw input" });
|
|
664
664
|
default:
|
|
@@ -687,33 +687,33 @@ var _e = "en-GB", Vt = class extends Error {
|
|
|
687
687
|
if (!Q(t)) return null;
|
|
688
688
|
let r = 1;
|
|
689
689
|
for (const a of $e) if (new RegExp(`${a}$`, "i").test(t)) {
|
|
690
|
-
r =
|
|
690
|
+
r = ra[a], t = t.slice(0, -1);
|
|
691
691
|
break;
|
|
692
692
|
}
|
|
693
693
|
return Number(t.split(",").join("")) * r;
|
|
694
|
-
},
|
|
694
|
+
}, Ta = (e) => {
|
|
695
695
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
696
696
|
if (typeof e != "string") return null;
|
|
697
697
|
const t = e.trim();
|
|
698
698
|
if (!Yt(t)) return null;
|
|
699
699
|
const r = Number(t.replace(/%/g, "").replace(/,/g, "")) / 100;
|
|
700
700
|
return Number.isNaN(r) ? null : r;
|
|
701
|
-
},
|
|
701
|
+
}, Ma = (e) => {
|
|
702
702
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
703
703
|
if (typeof e != "string") return null;
|
|
704
704
|
const t = e.trim();
|
|
705
705
|
return Qt(t) ? nr(Zt(t)) : null;
|
|
706
|
-
},
|
|
707
|
-
const a = String(e).trim().split(
|
|
706
|
+
}, wa = (e, t, r) => {
|
|
707
|
+
const a = String(e).trim().split(xa), [n, s] = [a[0]?.trim(), a[1]?.trim()];
|
|
708
708
|
return !n || !s ? null : ar(n, t, r);
|
|
709
|
-
},
|
|
709
|
+
}, Sa = (e) => String(e).trim(), Ie = (e) => new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())), sr = (e, t, r) => {
|
|
710
710
|
if (t.type === "text" && typeof e == "string") return e;
|
|
711
711
|
const a = rr(e, t, r);
|
|
712
|
-
return a !== null || !ve(t) ? a :
|
|
712
|
+
return a !== null || !ve(t) ? a : ma(e);
|
|
713
713
|
}, ae = process.env.NODE_ENV !== "production";
|
|
714
|
-
var Ce = !0,
|
|
714
|
+
var Ce = !0, Ti = (e) => {
|
|
715
715
|
Ce = e;
|
|
716
|
-
},
|
|
716
|
+
}, Mi = () => Ce, wi = () => {
|
|
717
717
|
let e = null;
|
|
718
718
|
const t = {
|
|
719
719
|
hits: 0,
|
|
@@ -736,7 +736,7 @@ var Ce = !0, Ei = (e) => {
|
|
|
736
736
|
e = null;
|
|
737
737
|
}
|
|
738
738
|
});
|
|
739
|
-
},
|
|
739
|
+
}, ka = () => {
|
|
740
740
|
const e = /* @__PURE__ */ new WeakMap(), t = {
|
|
741
741
|
hits: 0,
|
|
742
742
|
misses: 0
|
|
@@ -760,7 +760,7 @@ var Ce = !0, Ei = (e) => {
|
|
|
760
760
|
out: o
|
|
761
761
|
}]), o;
|
|
762
762
|
}, { stats: t });
|
|
763
|
-
},
|
|
763
|
+
}, Si = (...e) => e.reduce((t, r) => ({
|
|
764
764
|
hits: t.hits + r.hits,
|
|
765
765
|
misses: t.misses + r.misses
|
|
766
766
|
}), {
|
|
@@ -770,9 +770,9 @@ var Ce = !0, Ei = (e) => {
|
|
|
770
770
|
if (e.length !== t.length) return !1;
|
|
771
771
|
for (let r = 0; r < e.length; r += 1) if (e[r] !== t[r]) return !1;
|
|
772
772
|
return !0;
|
|
773
|
-
},
|
|
773
|
+
}, La = class {
|
|
774
774
|
constructor() {
|
|
775
|
-
this.memo =
|
|
775
|
+
this.memo = ka(), this.singletonKey = {};
|
|
776
776
|
}
|
|
777
777
|
get stats() {
|
|
778
778
|
return this.memo.stats;
|
|
@@ -783,7 +783,7 @@ var Ce = !0, Ei = (e) => {
|
|
|
783
783
|
key(e) {
|
|
784
784
|
return this.singletonKey;
|
|
785
785
|
}
|
|
786
|
-
},
|
|
786
|
+
}, Ke = (e, t) => e >= 0 && e <= 1 && t >= 0 && t <= 1, ki = ["x", "y"], _a = /* @__PURE__ */ new Set([
|
|
787
787
|
"x",
|
|
788
788
|
"y",
|
|
789
789
|
"ySecondary"
|
|
@@ -793,24 +793,24 @@ var Ce = !0, Ei = (e) => {
|
|
|
793
793
|
"alpha",
|
|
794
794
|
"strokeWidth",
|
|
795
795
|
"lineType"
|
|
796
|
-
]),
|
|
797
|
-
function
|
|
796
|
+
]), Ra = (e) => _a.has(e), Ca = (e) => or.has(e), Li = (e) => Ra(e) || Ca(e);
|
|
797
|
+
function Da(e) {
|
|
798
798
|
return e === "secondary" ? "ySecondary" : "y";
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
return e === "y" ?
|
|
800
|
+
function _i(e, t) {
|
|
801
|
+
return e === "y" ? Da(t) : "x";
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Ri(e) {
|
|
804
804
|
return e === "ySecondary" ? "y" : e;
|
|
805
805
|
}
|
|
806
|
-
var
|
|
806
|
+
var Ia = /* @__PURE__ */ new Set([
|
|
807
807
|
"count",
|
|
808
808
|
"sum",
|
|
809
809
|
"mean",
|
|
810
810
|
"median"
|
|
811
811
|
]);
|
|
812
812
|
function lr(e, t) {
|
|
813
|
-
return
|
|
813
|
+
return Ia.has(e) ? "numeric" : t;
|
|
814
814
|
}
|
|
815
815
|
function cr(e, t, r, a) {
|
|
816
816
|
if (a !== void 0 && a.type !== "numeric" && (e === "sum" || e === "mean" || e === "median")) throw new oe({
|
|
@@ -829,7 +829,7 @@ function cr(e, t, r, a) {
|
|
|
829
829
|
const c = Fe(t, r, l);
|
|
830
830
|
Pe(c) && o.push(c);
|
|
831
831
|
}
|
|
832
|
-
return o.length === 0 ? null : e === "median" ?
|
|
832
|
+
return o.length === 0 ? null : e === "median" ? Oa(o) : Na(o);
|
|
833
833
|
}
|
|
834
834
|
if (e === "sum" || e === "mean") {
|
|
835
835
|
let o = 0, l = 0;
|
|
@@ -843,21 +843,21 @@ function cr(e, t, r, a) {
|
|
|
843
843
|
let i = null;
|
|
844
844
|
for (let o = 0; o < n; o++) {
|
|
845
845
|
const l = Fe(t, r, o);
|
|
846
|
-
Pe(l) && (i === null ||
|
|
846
|
+
Pe(l) && (i === null || Fa(l, i) === s) && (i = l);
|
|
847
847
|
}
|
|
848
848
|
return i;
|
|
849
849
|
}
|
|
850
|
-
var Fe = (e, t, r) => e[t?.[r] ?? r] ?? null, Pe = (e) => e !== null && !(typeof e == "number" && Number.isNaN(e)),
|
|
851
|
-
function
|
|
850
|
+
var Fe = (e, t, r) => e[t?.[r] ?? r] ?? null, Pe = (e) => e !== null && !(typeof e == "number" && Number.isNaN(e)), Fa = (e, t) => e === null || t === null ? 0 : e < t ? -1 : e > t ? 1 : 0, Pa = (e) => e instanceof Date ? e.getTime() : e ?? null;
|
|
851
|
+
function Oa(e) {
|
|
852
852
|
const t = e.map(Number).sort((s, i) => s - i);
|
|
853
853
|
if (t.length === 1) return t[0] ?? 0;
|
|
854
854
|
const r = (t.length - 1) / 2, a = Math.floor(r), n = t[a] ?? 0;
|
|
855
855
|
return n + ((t[a + 1] ?? n) - n) * (r - a);
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Na(e) {
|
|
858
858
|
const t = /* @__PURE__ */ new Map();
|
|
859
859
|
for (const n of e) {
|
|
860
|
-
const s =
|
|
860
|
+
const s = Pa(n), i = t.get(s);
|
|
861
861
|
i === void 0 ? t.set(s, {
|
|
862
862
|
value: n,
|
|
863
863
|
count: 1
|
|
@@ -867,7 +867,7 @@ function Oa(e) {
|
|
|
867
867
|
for (const { value: n, count: s } of t.values()) s > a && (a = s, r = n);
|
|
868
868
|
return r;
|
|
869
869
|
}
|
|
870
|
-
var
|
|
870
|
+
var Ba = (e) => e == null || typeof e == "number" && Number.isNaN(e), Va = (e) => e instanceof Date ? e.getTime() : e ?? null, Ge = class U {
|
|
871
871
|
constructor(t, r, a, n = null) {
|
|
872
872
|
this.rowShape = null, this.names = t, this.columns = r, this.rowCount = a, this.source = n;
|
|
873
873
|
}
|
|
@@ -930,7 +930,7 @@ var Na = (e) => e == null || typeof e == "number" && Number.isNaN(e), Ba = (e) =
|
|
|
930
930
|
const a = this.values(t);
|
|
931
931
|
if (a === void 0) return Array.from({ length: this.rowCount }, (o, l) => l);
|
|
932
932
|
const n = [], s = [];
|
|
933
|
-
for (let o = 0; o < this.rowCount; o++) (
|
|
933
|
+
for (let o = 0; o < this.rowCount; o++) (Ba(a[o]) ? n : s).push(o);
|
|
934
934
|
const i = r === "asc" ? 1 : -1;
|
|
935
935
|
return s.sort((o, l) => {
|
|
936
936
|
const c = a[o], u = a[l];
|
|
@@ -941,7 +941,7 @@ var Na = (e) => e == null || typeof e == "number" && Number.isNaN(e), Ba = (e) =
|
|
|
941
941
|
const r = t.map((s) => this.values(s)).filter((s) => s !== void 0), a = r.length === 1 ? r[0] : void 0, n = /* @__PURE__ */ new Map();
|
|
942
942
|
if (a !== void 0) {
|
|
943
943
|
for (let s = 0; s < this.rowCount; s++) {
|
|
944
|
-
const i =
|
|
944
|
+
const i = Va(a[s]), o = n.get(i);
|
|
945
945
|
o === void 0 ? n.set(i, {
|
|
946
946
|
key: ze(a[s] ?? null),
|
|
947
947
|
indices: [s]
|
|
@@ -1000,7 +1000,7 @@ var Na = (e) => e == null || typeof e == "number" && Number.isNaN(e), Ba = (e) =
|
|
|
1000
1000
|
return new U(this.names, new Map(this.columns), this.rowCount);
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
|
-
var
|
|
1003
|
+
var Wa = "value", pe = {
|
|
1004
1004
|
numeric: { type: "decimal" },
|
|
1005
1005
|
categorical: { type: "text" },
|
|
1006
1006
|
temporal: { type: "datetime" }
|
|
@@ -1153,7 +1153,7 @@ var Va = "value", pe = {
|
|
|
1153
1153
|
return null;
|
|
1154
1154
|
}
|
|
1155
1155
|
groupBy(...t) {
|
|
1156
|
-
return new
|
|
1156
|
+
return new Ua(t, this.table, this.variableMetadata);
|
|
1157
1157
|
}
|
|
1158
1158
|
rollup(t) {
|
|
1159
1159
|
const r = Ge.from(Object.fromEntries(Object.entries(t).map(([n, { variableName: s, aggregation: i }]) => [n, [cr(i, dr(this.table, s, i), void 0, {
|
|
@@ -1169,7 +1169,7 @@ var Va = "value", pe = {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
return k.fromTrusted(r, a);
|
|
1171
1171
|
}
|
|
1172
|
-
reshapeFromWideToLong({ keep: t, reshape: r, keyName: a = "key", valueName: n =
|
|
1172
|
+
reshapeFromWideToLong({ keep: t, reshape: r, keyName: a = "key", valueName: n = Wa } = {}) {
|
|
1173
1173
|
const { numeric: s, categorical: i, temporal: o } = this.groupVariableNamesByType(), l = t ?? [...i, ...o], c = r ?? s.filter((d) => !l.includes(d));
|
|
1174
1174
|
if (l.includes(a) || l.includes(n)) throw new oe({
|
|
1175
1175
|
code: "INVALID_DATA_SHAPE",
|
|
@@ -1209,7 +1209,7 @@ var Va = "value", pe = {
|
|
|
1209
1209
|
valueFormat: { type: "text" }
|
|
1210
1210
|
}, f[n] = {
|
|
1211
1211
|
type: "numeric",
|
|
1212
|
-
valueFormat:
|
|
1212
|
+
valueFormat: Ya(this.variableMetadata, c, a)
|
|
1213
1213
|
}, k.fromTrusted(u, f);
|
|
1214
1214
|
}
|
|
1215
1215
|
print() {
|
|
@@ -1263,7 +1263,7 @@ var Va = "value", pe = {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
return s;
|
|
1265
1265
|
}
|
|
1266
|
-
},
|
|
1266
|
+
}, Ua = class {
|
|
1267
1267
|
constructor(e, t, r) {
|
|
1268
1268
|
this.groupedBy = e, this.table = t, this.variableMetadata = r;
|
|
1269
1269
|
}
|
|
@@ -1300,7 +1300,7 @@ var Va = "value", pe = {
|
|
|
1300
1300
|
return ne.fromTrusted(Ge.from(r), a);
|
|
1301
1301
|
}
|
|
1302
1302
|
};
|
|
1303
|
-
function
|
|
1303
|
+
function Ya(e, t, r) {
|
|
1304
1304
|
const a = t.map((o) => e[o]?.valueFormat ?? { type: "decimal" }), [n, ...s] = a;
|
|
1305
1305
|
if (!n) return { type: "decimal" };
|
|
1306
1306
|
for (const o of a) if (o.type === "lookup") throw new oe({
|
|
@@ -1349,49 +1349,49 @@ var hr = class {
|
|
|
1349
1349
|
has(e) {
|
|
1350
1350
|
return this.items.has(e);
|
|
1351
1351
|
}
|
|
1352
|
-
},
|
|
1352
|
+
}, za = (e, t) => {
|
|
1353
1353
|
const r = typeof e == "string" ? e.trim() : e;
|
|
1354
1354
|
if (Q(r)) return { type: "decimal" };
|
|
1355
1355
|
const a = typeof r == "string" && Kt(r, t);
|
|
1356
1356
|
if (a) return a;
|
|
1357
|
-
const n = typeof r == "string" &&
|
|
1357
|
+
const n = typeof r == "string" && ba(r, t);
|
|
1358
1358
|
return n || ($t(e) ? { type: "date" } : Yt(e) ? { type: "percentage" } : Qt(e) && typeof e == "string" ? {
|
|
1359
1359
|
type: "currency",
|
|
1360
|
-
iso:
|
|
1360
|
+
iso: Ea(e)
|
|
1361
1361
|
} : { type: "text" });
|
|
1362
|
-
},
|
|
1362
|
+
}, Ga = {
|
|
1363
1363
|
type: "year",
|
|
1364
1364
|
dateFormat: "yyyy"
|
|
1365
|
-
},
|
|
1366
|
-
const t = e._metadata?.parsingLocale ?? "en-GB", r = {}, a =
|
|
1365
|
+
}, ja = { type: "text" }, Ha = (e) => {
|
|
1366
|
+
const t = e._metadata?.parsingLocale ?? "en-GB", r = {}, a = Xa(e), n = $a(e), s = a.size > 0;
|
|
1367
1367
|
for (const [i, o] of e.columns.entries()) {
|
|
1368
1368
|
if (o._metadata?.isHidden) continue;
|
|
1369
1369
|
const l = a.get(o.key);
|
|
1370
1370
|
if (le(l) && s) continue;
|
|
1371
|
-
const c = o.valueFormat ?? (le(l) ?
|
|
1372
|
-
r[o.key] =
|
|
1371
|
+
const c = o.valueFormat ?? (le(l) ? ja : i === n ? Ga : za(l, t)), u = Ut(c);
|
|
1372
|
+
r[o.key] = Ka(o.key, e.rows, c, u, t);
|
|
1373
1373
|
}
|
|
1374
1374
|
return new ne(r);
|
|
1375
|
-
},
|
|
1375
|
+
}, Ci = class extends La {
|
|
1376
1376
|
dependencies(e) {
|
|
1377
1377
|
return [e];
|
|
1378
1378
|
}
|
|
1379
1379
|
run(e) {
|
|
1380
|
-
return
|
|
1380
|
+
return Ha(e);
|
|
1381
1381
|
}
|
|
1382
|
-
},
|
|
1382
|
+
}, $a = (e) => {
|
|
1383
1383
|
if (e.columns.some((r) => r.valueFormat?.type === "year")) return -1;
|
|
1384
|
-
const t =
|
|
1384
|
+
const t = qa(e.rows, 5);
|
|
1385
1385
|
return e.columns.findIndex((r) => {
|
|
1386
1386
|
if (r.valueFormat) return !1;
|
|
1387
1387
|
const a = t.map((n) => n[r.key]).filter((n) => !le(n));
|
|
1388
|
-
return a.length >= 2 && a.every(
|
|
1388
|
+
return a.length >= 2 && a.every(ga);
|
|
1389
1389
|
});
|
|
1390
|
-
},
|
|
1390
|
+
}, Ka = (e, t, r, a, n) => ({
|
|
1391
1391
|
type: a,
|
|
1392
1392
|
values: t.reduce((s, i) => (tr(i) || s.push(rr(i[e], r, n)), s), []),
|
|
1393
1393
|
valueFormat: r
|
|
1394
|
-
}),
|
|
1394
|
+
}), Xa = (e) => {
|
|
1395
1395
|
const t = /* @__PURE__ */ new Map(), r = new Set(e.columns.map((a) => a.key));
|
|
1396
1396
|
for (const a of e.rows) {
|
|
1397
1397
|
for (const n of r) {
|
|
@@ -1401,12 +1401,12 @@ var hr = class {
|
|
|
1401
1401
|
if (r.size === 0) break;
|
|
1402
1402
|
}
|
|
1403
1403
|
return t;
|
|
1404
|
-
},
|
|
1404
|
+
}, qa = (e, t) => {
|
|
1405
1405
|
const r = [];
|
|
1406
1406
|
for (const a of e)
|
|
1407
1407
|
if (tr(a) || r.push(a), r.length === t) return r;
|
|
1408
1408
|
return r;
|
|
1409
|
-
},
|
|
1409
|
+
}, Ja = (e, t) => {
|
|
1410
1410
|
if (fe(t.group)) {
|
|
1411
1411
|
const n = F(t.group);
|
|
1412
1412
|
if (n !== null) return [n];
|
|
@@ -1420,7 +1420,7 @@ var hr = class {
|
|
|
1420
1420
|
}, fr = (e, t) => e.hasVariable(Ye.group) ? e.getValues(Ye.group, {
|
|
1421
1421
|
distinct: !0,
|
|
1422
1422
|
skipNulls: !0
|
|
1423
|
-
}).length > 1 :
|
|
1423
|
+
}).length > 1 : Ja(e, t).some((r) => e.getValues(r, {
|
|
1424
1424
|
distinct: !0,
|
|
1425
1425
|
skipNulls: !0
|
|
1426
1426
|
}).length > 1), pr = [
|
|
@@ -1431,14 +1431,14 @@ var hr = class {
|
|
|
1431
1431
|
"lg",
|
|
1432
1432
|
"xl",
|
|
1433
1433
|
"full"
|
|
1434
|
-
],
|
|
1435
|
-
point:
|
|
1436
|
-
line:
|
|
1437
|
-
area:
|
|
1438
|
-
bar:
|
|
1439
|
-
rule:
|
|
1440
|
-
tile:
|
|
1441
|
-
},
|
|
1434
|
+
], Di = {
|
|
1435
|
+
point: Za,
|
|
1436
|
+
line: en,
|
|
1437
|
+
area: tn,
|
|
1438
|
+
bar: rn,
|
|
1439
|
+
rule: an,
|
|
1440
|
+
tile: nn
|
|
1441
|
+
}, Qa = (e) => typeof e == "string" && pr.includes(e);
|
|
1442
1442
|
function ue(e, t) {
|
|
1443
1443
|
return {
|
|
1444
1444
|
type: "layer",
|
|
@@ -1454,62 +1454,62 @@ function ue(e, t) {
|
|
|
1454
1454
|
dataLabels: t.dataLabels
|
|
1455
1455
|
};
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Za(e = {}) {
|
|
1458
1458
|
return ue("point", e);
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function en(e = {}) {
|
|
1461
1461
|
return ue("line", e);
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1463
|
+
function tn(e = {}) {
|
|
1464
1464
|
return ue("area", e);
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function rn(e = {}) {
|
|
1467
1467
|
return ue("bar", e);
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1469
|
+
function an(e = {}) {
|
|
1470
1470
|
return ue("rule", e);
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function nn(e = {}) {
|
|
1473
1473
|
return ue("tile", e);
|
|
1474
1474
|
}
|
|
1475
|
-
var
|
|
1475
|
+
var sn = [
|
|
1476
1476
|
"diagonal",
|
|
1477
1477
|
"dots",
|
|
1478
1478
|
"crosshatch"
|
|
1479
|
-
],
|
|
1479
|
+
], on = ["tile", "stretch"], yr = (e) => typeof e == "object" && e !== null && "gradient" in e, gr = (e) => typeof e == "object" && e !== null && "pattern" in e, ln = (e) => typeof e == "object" && e !== null && "image" in e, Xe = (e) => typeof e != "object" ? e : yr(e) ? e.stops[0]?.color ?? "transparent" : gr(e) ? e.color : e.fallback, Ii = (e) => typeof e == "string" ? e : JSON.stringify(e), cn = [
|
|
1480
1480
|
"topLeft",
|
|
1481
1481
|
"topRight",
|
|
1482
1482
|
"bottomRight",
|
|
1483
1483
|
"bottomLeft"
|
|
1484
|
-
],
|
|
1484
|
+
], Fi = ["dimmed", "hovered"], un = [
|
|
1485
1485
|
"normal",
|
|
1486
1486
|
"italic",
|
|
1487
1487
|
"oblique"
|
|
1488
|
-
],
|
|
1488
|
+
], dn = [
|
|
1489
1489
|
"none",
|
|
1490
1490
|
"uppercase",
|
|
1491
1491
|
"lowercase",
|
|
1492
1492
|
"capitalize"
|
|
1493
|
-
],
|
|
1493
|
+
], hn = [
|
|
1494
1494
|
"none",
|
|
1495
1495
|
"underline",
|
|
1496
1496
|
"line-through"
|
|
1497
|
-
],
|
|
1497
|
+
], fn = [
|
|
1498
1498
|
"butt",
|
|
1499
1499
|
"round",
|
|
1500
1500
|
"square"
|
|
1501
|
-
],
|
|
1501
|
+
], pn = [
|
|
1502
1502
|
"miter",
|
|
1503
1503
|
"round",
|
|
1504
1504
|
"bevel"
|
|
1505
|
-
],
|
|
1505
|
+
], yn = [
|
|
1506
1506
|
"normal",
|
|
1507
1507
|
"multiply",
|
|
1508
1508
|
"screen",
|
|
1509
1509
|
"overlay",
|
|
1510
1510
|
"darken",
|
|
1511
1511
|
"lighten"
|
|
1512
|
-
],
|
|
1512
|
+
], gn = [
|
|
1513
1513
|
"circle",
|
|
1514
1514
|
"square",
|
|
1515
1515
|
"diamond",
|
|
@@ -1517,7 +1517,7 @@ var nn = [
|
|
|
1517
1517
|
"cross",
|
|
1518
1518
|
"star",
|
|
1519
1519
|
"wye"
|
|
1520
|
-
],
|
|
1520
|
+
], Pi = [
|
|
1521
1521
|
"fill",
|
|
1522
1522
|
"stroke",
|
|
1523
1523
|
"alpha",
|
|
@@ -1555,12 +1555,12 @@ var nn = [
|
|
|
1555
1555
|
"margin",
|
|
1556
1556
|
"shadow",
|
|
1557
1557
|
"blendMode"
|
|
1558
|
-
], ct = 1, ut = 1e3, dt = "'none' or a shadow object { offsetX, offsetY, blur, color }", ht = "a non-negative number of pixels, or an object of those per edge",
|
|
1558
|
+
], ct = 1, ut = 1e3, dt = "'none' or a shadow object { offsetX, offsetY, blur, color }", ht = "a non-negative number of pixels, or an object of those per edge", mn = "a non-empty color string, a { light, dark } pair, or a token(...) reference", bn = [
|
|
1559
1559
|
"top",
|
|
1560
1560
|
"right",
|
|
1561
1561
|
"bottom",
|
|
1562
1562
|
"left"
|
|
1563
|
-
], Me = "a color, a { gradient, stops } object, a { pattern, color } object, or an { image, fallback } object", ft = "a number of pixels, or { topLeft, topRight, bottomRight, bottomLeft } in pixels", De = (e) => typeof e == "object" && e !== null && typeof e.light == "string" && typeof e.dark == "string", mr = (e) => typeof e == "object" && e !== null && typeof e.token == "string",
|
|
1563
|
+
], Me = "a color, a { gradient, stops } object, a { pattern, color } object, or an { image, fallback } object", ft = "a number of pixels, or { topLeft, topRight, bottomRight, bottomLeft } in pixels", De = (e) => typeof e == "object" && e !== null && typeof e.light == "string" && typeof e.dark == "string", mr = (e) => typeof e == "object" && e !== null && typeof e.token == "string", vn = (e) => typeof e == "string" ? e.trim().length > 0 : De(e) && e.light.trim().length > 0 && e.dark.trim().length > 0;
|
|
1564
1564
|
function h(e) {
|
|
1565
1565
|
return { token: e };
|
|
1566
1566
|
}
|
|
@@ -1595,7 +1595,7 @@ var pt = (e, t) => {
|
|
|
1595
1595
|
return r === void 0 ? {
|
|
1596
1596
|
status: "unknownToken",
|
|
1597
1597
|
token: e.token
|
|
1598
|
-
} :
|
|
1598
|
+
} : vn(r) ? {
|
|
1599
1599
|
status: "accepted",
|
|
1600
1600
|
value: typeof r == "string" ? r : {
|
|
1601
1601
|
light: r.light,
|
|
@@ -1609,8 +1609,8 @@ var pt = (e, t) => {
|
|
|
1609
1609
|
light: e.light,
|
|
1610
1610
|
dark: e.dark
|
|
1611
1611
|
}
|
|
1612
|
-
} : y(
|
|
1613
|
-
},
|
|
1612
|
+
} : y(mn, e);
|
|
1613
|
+
}, An = (e, t) => {
|
|
1614
1614
|
if (typeof e != "object" || e === null || De(e) || mr(e)) return K(e, t);
|
|
1615
1615
|
const r = e;
|
|
1616
1616
|
if (yr(r)) {
|
|
@@ -1643,7 +1643,7 @@ var pt = (e, t) => {
|
|
|
1643
1643
|
};
|
|
1644
1644
|
}
|
|
1645
1645
|
if (gr(r)) {
|
|
1646
|
-
if (!
|
|
1646
|
+
if (!sn.includes(r.pattern)) return y(Me, e);
|
|
1647
1647
|
const a = K(r.color, t);
|
|
1648
1648
|
if (a.status !== "accepted") return a;
|
|
1649
1649
|
const n = {
|
|
@@ -1664,9 +1664,9 @@ var pt = (e, t) => {
|
|
|
1664
1664
|
value: n
|
|
1665
1665
|
};
|
|
1666
1666
|
}
|
|
1667
|
-
if (
|
|
1667
|
+
if (ln(r)) {
|
|
1668
1668
|
if (typeof r.image != "string" || !r.image.startsWith("data:image/")) return y("an image as a data:image URI", e);
|
|
1669
|
-
if (r.fit !== void 0 && !
|
|
1669
|
+
if (r.fit !== void 0 && !on.includes(r.fit)) return y(Me, e);
|
|
1670
1670
|
if (r.alpha !== void 0 && (!x(r.alpha) || r.alpha < 0 || r.alpha > 1)) return y("an image alpha in [0, 1]", e);
|
|
1671
1671
|
if (r.size !== void 0 && (!x(r.size) || r.size <= 0)) return y("an image size in pixels", e);
|
|
1672
1672
|
const a = K(r.fallback, t);
|
|
@@ -1694,7 +1694,7 @@ var pt = (e, t) => {
|
|
|
1694
1694
|
};
|
|
1695
1695
|
if (typeof e != "object" || e === null) return y(ht, e);
|
|
1696
1696
|
const t = e, r = {};
|
|
1697
|
-
for (const a of
|
|
1697
|
+
for (const a of bn) {
|
|
1698
1698
|
const n = t[a];
|
|
1699
1699
|
if (n !== void 0) {
|
|
1700
1700
|
if (!x(n) || n < 0) return y(ht, e);
|
|
@@ -1705,14 +1705,14 @@ var pt = (e, t) => {
|
|
|
1705
1705
|
status: "accepted",
|
|
1706
1706
|
value: r
|
|
1707
1707
|
};
|
|
1708
|
-
},
|
|
1708
|
+
}, En = (e) => {
|
|
1709
1709
|
if (x(e) && e >= 0) return {
|
|
1710
1710
|
status: "accepted",
|
|
1711
1711
|
value: e
|
|
1712
1712
|
};
|
|
1713
1713
|
if (typeof e != "object" || e === null) return y(ft, e);
|
|
1714
1714
|
const t = e, r = {};
|
|
1715
|
-
for (const a of
|
|
1715
|
+
for (const a of cn) {
|
|
1716
1716
|
const n = t[a];
|
|
1717
1717
|
if (!x(n) || n < 0) return y(ft, e);
|
|
1718
1718
|
r[a] = n;
|
|
@@ -1721,9 +1721,9 @@ var pt = (e, t) => {
|
|
|
1721
1721
|
status: "accepted",
|
|
1722
1722
|
value: r
|
|
1723
1723
|
};
|
|
1724
|
-
},
|
|
1724
|
+
}, Oi = {
|
|
1725
1725
|
color: K,
|
|
1726
|
-
paint:
|
|
1726
|
+
paint: An,
|
|
1727
1727
|
unitInterval: (e) => x(e) && e >= 0 && e <= 1 ? {
|
|
1728
1728
|
status: "accepted",
|
|
1729
1729
|
value: e
|
|
@@ -1732,7 +1732,7 @@ var pt = (e, t) => {
|
|
|
1732
1732
|
status: "accepted",
|
|
1733
1733
|
value: e
|
|
1734
1734
|
} : y("a non-negative number of pixels", e),
|
|
1735
|
-
barRadius: (e) =>
|
|
1735
|
+
barRadius: (e) => Qa(e) || x(e) && e >= 0 ? {
|
|
1736
1736
|
status: "accepted",
|
|
1737
1737
|
value: e
|
|
1738
1738
|
} : y(`a number of pixels or one of ${pr.map((t) => `'${t}'`).join(", ")}`, e),
|
|
@@ -1773,29 +1773,29 @@ var pt = (e, t) => {
|
|
|
1773
1773
|
},
|
|
1774
1774
|
padding: yt,
|
|
1775
1775
|
margin: yt,
|
|
1776
|
-
blendMode: H(
|
|
1776
|
+
blendMode: H(yn),
|
|
1777
1777
|
signedPixels: (e) => x(e) ? {
|
|
1778
1778
|
status: "accepted",
|
|
1779
1779
|
value: e
|
|
1780
1780
|
} : y("a number of pixels, negative allowed", e),
|
|
1781
|
-
fontStyle: H(
|
|
1782
|
-
textTransform: H(
|
|
1783
|
-
textDecoration: H(
|
|
1784
|
-
lineCap: H(
|
|
1785
|
-
lineJoin: H(
|
|
1786
|
-
pointSymbol: H(
|
|
1787
|
-
boxRadius:
|
|
1788
|
-
},
|
|
1781
|
+
fontStyle: H(un),
|
|
1782
|
+
textTransform: H(dn),
|
|
1783
|
+
textDecoration: H(hn),
|
|
1784
|
+
lineCap: H(fn),
|
|
1785
|
+
lineJoin: H(pn),
|
|
1786
|
+
pointSymbol: H(gn),
|
|
1787
|
+
boxRadius: En
|
|
1788
|
+
}, xn = [
|
|
1789
1789
|
"kind",
|
|
1790
1790
|
"edge",
|
|
1791
1791
|
"axis",
|
|
1792
1792
|
"role",
|
|
1793
1793
|
"position",
|
|
1794
1794
|
"part"
|
|
1795
|
-
],
|
|
1795
|
+
], Ni = "#B84737", Tn = 0.4, Bi = "sm", Vi = 2, Wi = 8, Ui = 12, Yi = Object.freeze({
|
|
1796
1796
|
light: "#F5F1E9",
|
|
1797
1797
|
dark: "#1F1E1C"
|
|
1798
|
-
}),
|
|
1798
|
+
}), zi = "#ffffff", Gi = 1, ji = 24, Hi = {
|
|
1799
1799
|
top: 24,
|
|
1800
1800
|
right: 24,
|
|
1801
1801
|
bottom: 24,
|
|
@@ -1824,12 +1824,12 @@ var pt = (e, t) => {
|
|
|
1824
1824
|
stroke: "color",
|
|
1825
1825
|
strokeWidth: "pixels",
|
|
1826
1826
|
cornerRadius: "boxRadius"
|
|
1827
|
-
},
|
|
1827
|
+
}, Mn = {
|
|
1828
1828
|
offsetX: 0,
|
|
1829
1829
|
offsetY: 2,
|
|
1830
1830
|
blur: 4,
|
|
1831
1831
|
color: "rgba(14, 14, 52, 0.12)"
|
|
1832
|
-
},
|
|
1832
|
+
}, wn = {
|
|
1833
1833
|
offsetX: 0,
|
|
1834
1834
|
offsetY: 4,
|
|
1835
1835
|
blur: 6,
|
|
@@ -1850,7 +1850,7 @@ var pt = (e, t) => {
|
|
|
1850
1850
|
contrast: "multiplier",
|
|
1851
1851
|
shadow: "shadow",
|
|
1852
1852
|
blendMode: "blendMode"
|
|
1853
|
-
},
|
|
1853
|
+
}, Sn = 0.3, kn = 10, Ln = 1.5, _n = 24, Rn = 8, w = {
|
|
1854
1854
|
label: {
|
|
1855
1855
|
fontSize: 11.5,
|
|
1856
1856
|
fontWeight: 500,
|
|
@@ -1967,7 +1967,7 @@ var pt = (e, t) => {
|
|
|
1967
1967
|
paddingBlock: "pixels",
|
|
1968
1968
|
shadow: "shadow"
|
|
1969
1969
|
}, vr = /* @__PURE__ */ new Map();
|
|
1970
|
-
var
|
|
1970
|
+
var $i = (e = Object.values(qe)) => {
|
|
1971
1971
|
const t = [], r = [], a = [], n = (s) => {
|
|
1972
1972
|
if (s.rest !== void 0 && t.push({
|
|
1973
1973
|
select: s.select,
|
|
@@ -1988,14 +1988,14 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
1988
1988
|
...r,
|
|
1989
1989
|
...a
|
|
1990
1990
|
];
|
|
1991
|
-
},
|
|
1991
|
+
}, Ki = (e) => {
|
|
1992
1992
|
for (const t of e) {
|
|
1993
1993
|
Object.freeze(t.select);
|
|
1994
1994
|
for (const r of Object.values(t.declarations)) typeof r == "object" && Object.freeze(r);
|
|
1995
1995
|
Object.freeze(t.declarations), t.when !== void 0 && Object.freeze(t.when), Object.freeze(t);
|
|
1996
1996
|
}
|
|
1997
1997
|
return e;
|
|
1998
|
-
},
|
|
1998
|
+
}, Xi = (e) => vr.get(Ar(e)), At = (e, t) => ({
|
|
1999
1999
|
x: {
|
|
2000
2000
|
select: {
|
|
2001
2001
|
target: e,
|
|
@@ -2052,8 +2052,8 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2052
2052
|
shadow: "none",
|
|
2053
2053
|
blendMode: "normal"
|
|
2054
2054
|
},
|
|
2055
|
-
dimmed: { alpha:
|
|
2056
|
-
hovered: { shadow:
|
|
2055
|
+
dimmed: { alpha: Tn },
|
|
2056
|
+
hovered: { shadow: Mn },
|
|
2057
2057
|
acceptsUnknownKinds: !0
|
|
2058
2058
|
},
|
|
2059
2059
|
panelBorder: {
|
|
@@ -2201,9 +2201,9 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2201
2201
|
rest: {
|
|
2202
2202
|
...w.label,
|
|
2203
2203
|
textColor: h("textSecondary"),
|
|
2204
|
-
offset:
|
|
2204
|
+
offset: kn,
|
|
2205
2205
|
textOutlineColor: h("graphBackground"),
|
|
2206
|
-
textOutlineWidth:
|
|
2206
|
+
textOutlineWidth: Ln
|
|
2207
2207
|
},
|
|
2208
2208
|
children: {
|
|
2209
2209
|
...At("tickLabel", te),
|
|
@@ -2440,7 +2440,7 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2440
2440
|
select: { target: "headline" },
|
|
2441
2441
|
vocabulary: re,
|
|
2442
2442
|
rest: {
|
|
2443
|
-
gap:
|
|
2443
|
+
gap: _n,
|
|
2444
2444
|
margin: { bottom: 4 }
|
|
2445
2445
|
}
|
|
2446
2446
|
},
|
|
@@ -2504,7 +2504,10 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2504
2504
|
part: "trend"
|
|
2505
2505
|
},
|
|
2506
2506
|
vocabulary: A,
|
|
2507
|
-
rest: {
|
|
2507
|
+
rest: {
|
|
2508
|
+
fontSize: 12,
|
|
2509
|
+
textColor: h("textSecondary")
|
|
2510
|
+
},
|
|
2508
2511
|
children: {
|
|
2509
2512
|
up: {
|
|
2510
2513
|
select: {
|
|
@@ -2537,7 +2540,7 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2537
2540
|
legend: {
|
|
2538
2541
|
select: { target: "legend" },
|
|
2539
2542
|
vocabulary: re,
|
|
2540
|
-
rest: { gap:
|
|
2543
|
+
rest: { gap: Rn },
|
|
2541
2544
|
children: {
|
|
2542
2545
|
popover: {
|
|
2543
2546
|
select: {
|
|
@@ -2831,7 +2834,7 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2831
2834
|
}
|
|
2832
2835
|
}, Ar = (e) => {
|
|
2833
2836
|
let t = e.target;
|
|
2834
|
-
for (const r of
|
|
2837
|
+
for (const r of xn) {
|
|
2835
2838
|
const a = e[r];
|
|
2836
2839
|
a !== void 0 && (t += `\0${r}:${a}`);
|
|
2837
2840
|
}
|
|
@@ -2841,19 +2844,19 @@ var Hi = (e = Object.values(qe)) => {
|
|
|
2841
2844
|
for (const t of Object.values(e.children)) Er(t);
|
|
2842
2845
|
};
|
|
2843
2846
|
for (const e of Object.values(qe)) Er(e);
|
|
2844
|
-
function
|
|
2847
|
+
function qi(e) {
|
|
2845
2848
|
return e;
|
|
2846
2849
|
}
|
|
2847
|
-
var
|
|
2850
|
+
var Cn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Dn = (e) => e.observation?.sharedPaint === !1 ? { ...e.observation.vocabulary } : {
|
|
2848
2851
|
...br,
|
|
2849
2852
|
...e.observation?.vocabulary
|
|
2850
|
-
},
|
|
2853
|
+
}, Ji = (e, t) => ({
|
|
2851
2854
|
select: {
|
|
2852
2855
|
target: "geom",
|
|
2853
2856
|
kind: e
|
|
2854
2857
|
},
|
|
2855
|
-
vocabulary:
|
|
2856
|
-
aesthetics:
|
|
2858
|
+
vocabulary: Dn(t),
|
|
2859
|
+
aesthetics: Cn(t),
|
|
2857
2860
|
options: t.observation?.options ?? je,
|
|
2858
2861
|
...xt(t.observation),
|
|
2859
2862
|
children: Object.fromEntries(Object.entries(t.parts ?? {}).map(([r, a]) => [r, {
|
|
@@ -2872,7 +2875,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
2872
2875
|
...e?.hovered === void 0 ? {} : { hovered: e.hovered }
|
|
2873
2876
|
}), Z = class {
|
|
2874
2877
|
constructor() {
|
|
2875
|
-
this.positionRoles = [], this.identityKey = "x-group", this.defaultPosition = "identity", this.supportedPositions =
|
|
2878
|
+
this.positionRoles = [], this.identityKey = "x-group", this.defaultPosition = "identity", this.supportedPositions = Jr, this.defaultInteractive = !0, this.aesthetics = [], this.derivedVariables = [], this.highlightStrategy = null, this.supportedCoordTypes = ["cartesian", "flip"], this.spatialKind = "points", this.grid = {}, this.legend = {}, this.dataLabelCoordTypes = [], this.isComposite = !1, this.tooltip = [], this.summaries = {};
|
|
2876
2879
|
}
|
|
2877
2880
|
resolveParams(e) {
|
|
2878
2881
|
return Pr({}, this.defaultParams, e.params);
|
|
@@ -2893,11 +2896,11 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
2893
2896
|
height: e.height
|
|
2894
2897
|
}), Ze = (e) => e === "panel-end" ? "end" : e === "panel-start" ? "start" : e, Ee = ({ box: e, panel: t, orientation: r, placement: a, justify: n, align: s, offset: i, alignOffset: o, labelWidth: l, labelHeight: c }) => {
|
|
2895
2898
|
const u = n === "panel-start" || n === "panel-end", f = (r.valueAxis === "x" ? e.height : e.width) === 0, d = {
|
|
2896
|
-
anchor:
|
|
2899
|
+
anchor: Fn(n, r.valueDirectionSign),
|
|
2897
2900
|
placement: u ? "inside" : a,
|
|
2898
2901
|
offset: i
|
|
2899
2902
|
}, p = {
|
|
2900
|
-
anchor:
|
|
2903
|
+
anchor: Pn(s),
|
|
2901
2904
|
placement: f ? a : "inside",
|
|
2902
2905
|
offset: f ? o ?? i : 0
|
|
2903
2906
|
}, g = u ? t : e, v = r.valueAxis === "x" ? g : e, S = r.valueAxis === "y" ? g : e, D = r.valueAxis === "x" ? d : p, N = r.valueAxis === "x" ? p : d, M = wt(D, {
|
|
@@ -2912,30 +2915,30 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
2912
2915
|
return {
|
|
2913
2916
|
x: M,
|
|
2914
2917
|
y: I,
|
|
2915
|
-
position:
|
|
2918
|
+
position: In(e, M, I, l, c)
|
|
2916
2919
|
};
|
|
2917
|
-
}, Mt = (e, t, r, a) => r - a >= e - Tt && r + a <= t + Tt,
|
|
2920
|
+
}, Mt = (e, t, r, a) => r - a >= e - Tt && r + a <= t + Tt, In = (e, t, r, a, n) => {
|
|
2918
2921
|
if (e.width === 0 && e.height === 0) return "outside";
|
|
2919
2922
|
const s = e.width === 0 || Mt(e.x, e.x + e.width, t, a / 2), i = e.height === 0 || Mt(e.y, e.y + e.height, r, n / 2);
|
|
2920
2923
|
return s && i ? "inside" : "outside";
|
|
2921
|
-
},
|
|
2924
|
+
}, Fn = (e, t) => e === "center" ? "center" : (e === "end" || e === "panel-end") == (t === 1) ? "max" : "min", Pn = (e) => e === "center" ? "center" : e === "start" ? "min" : "max", wt = ({ anchor: e, placement: t, offset: r }, { min: a, max: n, halfExtent: s }) => {
|
|
2922
2925
|
if (e === "center") return (a + n) / 2;
|
|
2923
2926
|
if (t === "inside" && a === n) return a;
|
|
2924
2927
|
const i = r + s;
|
|
2925
2928
|
return e === "min" ? t === "inside" ? a + i : a - i : t === "inside" ? n - i : n + i;
|
|
2926
|
-
},
|
|
2929
|
+
}, On = (e) => {
|
|
2927
2930
|
const t = [];
|
|
2928
2931
|
if (!e.layer.dataLabels.showDataLabels) return {
|
|
2929
2932
|
labels: t,
|
|
2930
2933
|
droppedCount: 0
|
|
2931
2934
|
};
|
|
2932
|
-
const { offset: r } = e.layer.dataLabels, a =
|
|
2935
|
+
const { offset: r } = e.layer.dataLabels, a = Vn(e.layer);
|
|
2933
2936
|
for (const n of e.layer.data) {
|
|
2934
2937
|
const s = X(n), i = j(n) ?? z(n);
|
|
2935
2938
|
if (s === null || i === null || !Ke(s, i)) continue;
|
|
2936
2939
|
const o = e.formatLabel(n);
|
|
2937
2940
|
if (o === "") continue;
|
|
2938
|
-
const { width: l, height: c } = e.measureDataLabel("observation", "outside", o), { box: u, orientation: f } =
|
|
2941
|
+
const { width: l, height: c } = e.measureDataLabel("observation", "outside", o), { box: u, orientation: f } = Bn(i, G(n), s, e.panelRect.width, e.panelRect.height), d = Ee({
|
|
2939
2942
|
box: u,
|
|
2940
2943
|
panel: Ae(e.panelRect),
|
|
2941
2944
|
orientation: f,
|
|
@@ -2960,7 +2963,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
2960
2963
|
labels: t,
|
|
2961
2964
|
droppedCount: 0
|
|
2962
2965
|
};
|
|
2963
|
-
},
|
|
2966
|
+
}, Nn = (e) => e.position === "fill" ? "fill" : ye(e.position) ? "stack" : "none", Bn = (e, t, r, a, n) => {
|
|
2964
2967
|
const s = t ?? e, i = 1 - Math.max(e, s);
|
|
2965
2968
|
return {
|
|
2966
2969
|
box: {
|
|
@@ -2974,7 +2977,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
2974
2977
|
valueDirectionSign: e >= s ? -1 : 1
|
|
2975
2978
|
}
|
|
2976
2979
|
};
|
|
2977
|
-
},
|
|
2980
|
+
}, Vn = (e) => {
|
|
2978
2981
|
const { position: t, justify: r, align: a } = e.dataLabels;
|
|
2979
2982
|
return t === "auto" ? {
|
|
2980
2983
|
placement: "outside",
|
|
@@ -2985,7 +2988,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
2985
2988
|
justify: fr(e.data, e.mapping) ? Ze(r) : r,
|
|
2986
2989
|
align: a
|
|
2987
2990
|
};
|
|
2988
|
-
},
|
|
2991
|
+
}, Wn = class extends Z {
|
|
2989
2992
|
constructor(...e) {
|
|
2990
2993
|
super(...e), this.type = "area", this.styleTarget = { observation: {
|
|
2991
2994
|
vocabulary: {
|
|
@@ -3002,7 +3005,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3002
3005
|
},
|
|
3003
3006
|
rest: {
|
|
3004
3007
|
fill: h("geom"),
|
|
3005
|
-
fillAlpha:
|
|
3008
|
+
fillAlpha: Sn,
|
|
3006
3009
|
strokeWidth: 2,
|
|
3007
3010
|
dashArray: W.line.solid
|
|
3008
3011
|
}
|
|
@@ -3050,7 +3053,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3050
3053
|
], this.summaries = { perGroupHeadline: !0 }, this.dataLabels = {
|
|
3051
3054
|
cartesian: { offset: 8 },
|
|
3052
3055
|
flip: { offset: 8 }
|
|
3053
|
-
}, this.dataLabelCoordTypes = ["cartesian", "flip"], this.resolvePercentageValueStrategy =
|
|
3056
|
+
}, this.dataLabelCoordTypes = ["cartesian", "flip"], this.resolvePercentageValueStrategy = Nn, this.isComposite = !0, this.legend = {
|
|
3054
3057
|
suppressWhenSingleItem: !0,
|
|
3055
3058
|
sidePlacement: "whenCrowded",
|
|
3056
3059
|
directLabelSupport: {
|
|
@@ -3059,7 +3062,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3059
3062
|
identity: !0,
|
|
3060
3063
|
fill: !0
|
|
3061
3064
|
}
|
|
3062
|
-
}, this.highlightStrategy = "overlay-anchor", this.spatialKind = "filled-buckets", this.resolveAnchorPosition = Qe, this.getDataLabelPlacements = (t) =>
|
|
3065
|
+
}, this.highlightStrategy = "overlay-anchor", this.spatialKind = "filled-buckets", this.resolveAnchorPosition = Qe, this.getDataLabelPlacements = (t) => On(t);
|
|
3063
3066
|
}
|
|
3064
3067
|
resolveParams(e) {
|
|
3065
3068
|
const t = super.resolveParams(e);
|
|
@@ -3074,7 +3077,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3074
3077
|
mapping: {}
|
|
3075
3078
|
};
|
|
3076
3079
|
}
|
|
3077
|
-
},
|
|
3080
|
+
}, Un = 0.7, Qi = 0.1, Yn = 0.03, zn = 0.05, Gn = (e) => {
|
|
3078
3081
|
const t = e[Nt.role];
|
|
3079
3082
|
return t ?? "solo";
|
|
3080
3083
|
}, et = (e, t, r) => {
|
|
@@ -3095,12 +3098,12 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3095
3098
|
return n("outside");
|
|
3096
3099
|
}
|
|
3097
3100
|
};
|
|
3098
|
-
}, we = 6,
|
|
3101
|
+
}, we = 6, jn = 0.5, Hn = (e) => {
|
|
3099
3102
|
const t = [];
|
|
3100
3103
|
let r = 0;
|
|
3101
3104
|
const a = ye(e.layer.position), n = e.coordSystem.mainAxis === "y";
|
|
3102
3105
|
if (e.layer.dataLabels.showDataLabels) {
|
|
3103
|
-
const { entries: s, shouldRotate: i } =
|
|
3106
|
+
const { entries: s, shouldRotate: i } = Kn({
|
|
3104
3107
|
layer: e.layer,
|
|
3105
3108
|
mainAxis: e.coordSystem.mainAxis,
|
|
3106
3109
|
panelRect: e.panelRect,
|
|
@@ -3110,7 +3113,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3110
3113
|
isFlipped: n
|
|
3111
3114
|
});
|
|
3112
3115
|
for (const o of s) {
|
|
3113
|
-
const l = e.layer.dataLabels.position === "auto" ?
|
|
3116
|
+
const l = e.layer.dataLabels.position === "auto" ? Jn({
|
|
3114
3117
|
mainAxis: e.coordSystem.mainAxis,
|
|
3115
3118
|
isStacked: a,
|
|
3116
3119
|
isNegativeBar: o.isNegative,
|
|
@@ -3120,7 +3123,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3120
3123
|
panelWidth: e.panelRect.width,
|
|
3121
3124
|
panelHeight: e.panelRect.height,
|
|
3122
3125
|
offset: e.layer.dataLabels.offset
|
|
3123
|
-
}) :
|
|
3126
|
+
}) : Zn(e.layer.dataLabels, e.coordSystem.mainAxis, a, o, Ae(e.panelRect));
|
|
3124
3127
|
if (l === null) {
|
|
3125
3128
|
r += 1;
|
|
3126
3129
|
continue;
|
|
@@ -3140,9 +3143,9 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3140
3143
|
});
|
|
3141
3144
|
}
|
|
3142
3145
|
}
|
|
3143
|
-
if (e.layer.dataLabels.showCategoryLabels) for (const s of
|
|
3146
|
+
if (e.layer.dataLabels.showCategoryLabels) for (const s of es(e, a)) t.push(s);
|
|
3144
3147
|
if (e.layer.dataLabels.showStackTotals) {
|
|
3145
|
-
const s =
|
|
3148
|
+
const s = ns({
|
|
3146
3149
|
layer: e.layer,
|
|
3147
3150
|
mainAxis: e.coordSystem.mainAxis,
|
|
3148
3151
|
panelRect: e.panelRect,
|
|
@@ -3155,7 +3158,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3155
3158
|
labels: t,
|
|
3156
3159
|
droppedCount: r
|
|
3157
3160
|
};
|
|
3158
|
-
},
|
|
3161
|
+
}, $n = (e) => e.position === "fill" ? "fill" : ye(e.position) ? "stack" : "absoluteGrandTotal", Kn = ({ layer: e, mainAxis: t, panelRect: r, measureDataLabel: a, styleReaders: n, formatLabel: s, isFlipped: i }) => {
|
|
3159
3162
|
const o = [];
|
|
3160
3163
|
let l = !1;
|
|
3161
3164
|
const c = e.dataLabels.position === "auto", u = F(e.mapping.y);
|
|
@@ -3204,21 +3207,21 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3204
3207
|
}, Tr = (e, t) => {
|
|
3205
3208
|
const r = q(t), a = J(t), n = G(t), s = j(t) ?? z(t);
|
|
3206
3209
|
return r === null || a === null || n === null || s === null ? null : xr(e, r, a, n, s);
|
|
3207
|
-
},
|
|
3210
|
+
}, Xn = (e, t) => {
|
|
3208
3211
|
const { xMin: r, xMax: a, yMin: n, yMax: s } = t.anchor;
|
|
3209
3212
|
return xr(e, r, a, n, s);
|
|
3210
|
-
},
|
|
3213
|
+
}, qn = (e, t) => e === "x" ? t ? "bottom" : "top" : t ? "left" : "right", He = (e, t, r) => r ? {
|
|
3211
3214
|
width: t,
|
|
3212
3215
|
height: e
|
|
3213
3216
|
} : {
|
|
3214
3217
|
width: e,
|
|
3215
3218
|
height: t
|
|
3216
|
-
},
|
|
3219
|
+
}, Jn = (e) => e.isStacked ? ts({
|
|
3217
3220
|
bounds: e.bounds,
|
|
3218
3221
|
box: e.boxes.inside,
|
|
3219
3222
|
isRotated: e.shouldRotate
|
|
3220
|
-
}) :
|
|
3221
|
-
edge:
|
|
3223
|
+
}) : as({
|
|
3224
|
+
edge: qn(e.mainAxis, e.isNegativeBar),
|
|
3222
3225
|
bounds: e.bounds,
|
|
3223
3226
|
boxes: e.boxes,
|
|
3224
3227
|
isRotated: e.shouldRotate,
|
|
@@ -3231,7 +3234,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3231
3234
|
} : {
|
|
3232
3235
|
valueAxis: "x",
|
|
3233
3236
|
valueDirectionSign: t ? -1 : 1
|
|
3234
|
-
},
|
|
3237
|
+
}, Qn = (e) => e === "panel-start" || e === "panel-end", Zn = (e, t, r, a, n) => {
|
|
3235
3238
|
if (e.position === "auto") return null;
|
|
3236
3239
|
const s = r && e.position === "outside" ? "inside" : e.position, i = a.boxes[s], o = Ee({
|
|
3237
3240
|
box: a.bounds,
|
|
@@ -3244,9 +3247,9 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3244
3247
|
labelWidth: i.width,
|
|
3245
3248
|
labelHeight: i.height
|
|
3246
3249
|
});
|
|
3247
|
-
if (s === "inside" && !
|
|
3250
|
+
if (s === "inside" && !Qn(e.justify)) {
|
|
3248
3251
|
const l = t === "y", c = l ? a.bounds.width : a.bounds.height;
|
|
3249
|
-
return (l ? i.width : i.height) > c +
|
|
3252
|
+
return (l ? i.width : i.height) > c + jn ? null : {
|
|
3250
3253
|
x: o.x,
|
|
3251
3254
|
y: o.y,
|
|
3252
3255
|
isRotated: !1,
|
|
@@ -3259,7 +3262,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3259
3262
|
isRotated: !1,
|
|
3260
3263
|
position: o.position
|
|
3261
3264
|
};
|
|
3262
|
-
},
|
|
3265
|
+
}, es = (e, t) => {
|
|
3263
3266
|
const r = [], { categoryPosition: a, categoryJustify: n, categoryAlign: s, categoryOffset: i } = e.layer.dataLabels, o = t && a === "outside" ? "inside" : a, l = e.coordSystem.mainAxis, c = Ae(e.panelRect), u = F(e.layer.mapping.y);
|
|
3264
3267
|
for (const f of e.layer.data) {
|
|
3265
3268
|
const d = Tr(l, f);
|
|
@@ -3290,7 +3293,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3290
3293
|
});
|
|
3291
3294
|
}
|
|
3292
3295
|
return r;
|
|
3293
|
-
},
|
|
3296
|
+
}, ts = ({ bounds: e, box: t, isRotated: r }) => {
|
|
3294
3297
|
const a = He(t.width, t.height, r);
|
|
3295
3298
|
return a.width > e.width || a.height > e.height ? null : {
|
|
3296
3299
|
x: e.x + e.width / 2,
|
|
@@ -3298,7 +3301,7 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3298
3301
|
isRotated: r,
|
|
3299
3302
|
position: "inside"
|
|
3300
3303
|
};
|
|
3301
|
-
},
|
|
3304
|
+
}, rs = (e, t, r, a) => {
|
|
3302
3305
|
switch (e) {
|
|
3303
3306
|
case "top":
|
|
3304
3307
|
return {
|
|
@@ -3325,8 +3328,8 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3325
3328
|
panelExtent: r
|
|
3326
3329
|
};
|
|
3327
3330
|
}
|
|
3328
|
-
},
|
|
3329
|
-
const o = e === "top" || e === "bottom", l = t.x + t.width / 2, c = t.y + t.height / 2, u = o ? t.height : t.width, f = o ? t.width : t.height, { edgeCoord: d, outwardSign: p, panelExtent: g } =
|
|
3331
|
+
}, as = ({ edge: e, bounds: t, boxes: r, isRotated: a, panelWidth: n, panelHeight: s, offset: i }) => {
|
|
3332
|
+
const o = e === "top" || e === "bottom", l = t.x + t.width / 2, c = t.y + t.height / 2, u = o ? t.height : t.width, f = o ? t.width : t.height, { edgeCoord: d, outwardSign: p, panelExtent: g } = rs(e, t, n, s), v = He(r.inside.width, r.inside.height, a), S = o ? v.height : v.width, D = o ? v.width : v.height, N = S + i < u, M = D <= f;
|
|
3330
3333
|
if (o ? N : N && M) {
|
|
3331
3334
|
if (o && !M) return null;
|
|
3332
3335
|
if (a) return {
|
|
@@ -3360,12 +3363,12 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3360
3363
|
isRotated: a,
|
|
3361
3364
|
position: "outside"
|
|
3362
3365
|
};
|
|
3363
|
-
},
|
|
3366
|
+
}, ns = ({ layer: e, mainAxis: t, panelRect: r, measureDataLabel: a, formatAbsolute: n }) => {
|
|
3364
3367
|
const s = [], i = e.summary.stackTotals;
|
|
3365
3368
|
if (i === void 0 || i.length === 0) return s;
|
|
3366
3369
|
const o = t === "y";
|
|
3367
3370
|
for (const l of i) {
|
|
3368
|
-
const c = tt(
|
|
3371
|
+
const c = tt(Xn(t, l), r), u = n(l.total), { width: f, height: d } = a("aggregate", "outside", u), p = l.anchor.direction === "positive";
|
|
3369
3372
|
let g, v;
|
|
3370
3373
|
o ? (g = p ? c.x + c.width + we + f / 2 : c.x - we - f / 2, v = c.y + c.height / 2) : (g = c.x + c.width / 2, v = p ? c.y - we - d / 2 : c.y + c.height + we + d / 2), s.push({
|
|
3371
3374
|
layerId: e.id,
|
|
@@ -3381,19 +3384,19 @@ var Rn = (e) => e.observation?.aesthetics ?? qe.geom.aesthetics, Cn = (e) => e.o
|
|
|
3381
3384
|
}
|
|
3382
3385
|
return s;
|
|
3383
3386
|
};
|
|
3384
|
-
function
|
|
3387
|
+
function ss(e) {
|
|
3385
3388
|
return {
|
|
3386
3389
|
startAngle: e[b.xMin],
|
|
3387
3390
|
endAngle: e[b.xMax]
|
|
3388
3391
|
};
|
|
3389
3392
|
}
|
|
3390
|
-
function
|
|
3393
|
+
function is(e) {
|
|
3391
3394
|
return {
|
|
3392
3395
|
innerRadius: e[b.yMin],
|
|
3393
3396
|
outerRadius: e[b.yMax] ?? e[b.y]
|
|
3394
3397
|
};
|
|
3395
3398
|
}
|
|
3396
|
-
var
|
|
3399
|
+
var os = " · ", Ve = 2, ls = (e) => {
|
|
3397
3400
|
const t = [];
|
|
3398
3401
|
if (!e.layer.dataLabels.showDataLabels) return {
|
|
3399
3402
|
labels: t,
|
|
@@ -3401,11 +3404,11 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3401
3404
|
};
|
|
3402
3405
|
const { position: r, justify: a, align: n, offset: s, showCategoryLabels: i } = e.layer.dataLabels, o = e.coordSystem.bandAxis === "y" ? "inside" : "outside", l = e.panelRect.width / 2, c = e.panelRect.height / 2, u = Math.min(e.panelRect.width, e.panelRect.height) / 2, f = e.styleReaders;
|
|
3403
3406
|
for (const d of e.layer.data) {
|
|
3404
|
-
const { startAngle: p, endAngle: g } =
|
|
3407
|
+
const { startAngle: p, endAngle: g } = ss(d), { innerRadius: v, outerRadius: S } = is(d);
|
|
3405
3408
|
if (p === null || g === null || S === null) continue;
|
|
3406
3409
|
const D = e.formatLabel(d);
|
|
3407
3410
|
if (D === "") continue;
|
|
3408
|
-
const N = i ? e.formatCategory(d) : null, M = N === null ? D : `${N}${
|
|
3411
|
+
const N = i ? e.formatCategory(d) : null, M = N === null ? D : `${N}${os}${D}`, I = {
|
|
3409
3412
|
startAngle: p,
|
|
3410
3413
|
endAngle: g,
|
|
3411
3414
|
midAngle: (p + g) / 2,
|
|
@@ -3426,7 +3429,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3426
3429
|
labelHeight: T.height
|
|
3427
3430
|
});
|
|
3428
3431
|
const Te = l + Math.sin(E.labelAngle) * E.labelRadius, _r = c - Math.cos(E.labelAngle) * E.labelRadius;
|
|
3429
|
-
if (E.position === "outside" && !
|
|
3432
|
+
if (E.position === "outside" && !ds({
|
|
3430
3433
|
x: Te,
|
|
3431
3434
|
y: _r,
|
|
3432
3435
|
labelWidth: T.width,
|
|
@@ -3447,7 +3450,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3447
3450
|
}
|
|
3448
3451
|
} else {
|
|
3449
3452
|
const de = et(e.measureDataLabel, "observation", M), Te = de[r];
|
|
3450
|
-
E =
|
|
3453
|
+
E = hs({
|
|
3451
3454
|
wedge: I,
|
|
3452
3455
|
placement: r,
|
|
3453
3456
|
justify: Ze(a),
|
|
@@ -3475,15 +3478,15 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3475
3478
|
labels: t,
|
|
3476
3479
|
droppedCount: 0
|
|
3477
3480
|
};
|
|
3478
|
-
},
|
|
3481
|
+
}, cs = () => "absoluteGrandTotal", me = (e, t, r, a) => {
|
|
3479
3482
|
const n = Math.abs(e === "radial" ? Math.sin(t) : Math.cos(t)), s = Math.abs(e === "radial" ? Math.cos(t) : Math.sin(t));
|
|
3480
3483
|
return n * (r / 2) + s * (a / 2);
|
|
3481
|
-
},
|
|
3484
|
+
}, us = ({ wedge: e, labelRadius: t, labelAngle: r, labelWidth: a, labelHeight: n }) => {
|
|
3482
3485
|
const s = me("radial", r, a, n);
|
|
3483
3486
|
if (!(t - s >= e.innerRadiusPx - Ve && t + s <= e.outerRadiusPx + Ve) || t <= 0) return !1;
|
|
3484
3487
|
const i = Math.abs(e.endAngle - e.startAngle) / 2, o = me("tangential", r, a, n) / t, l = Ve / t;
|
|
3485
3488
|
return Math.abs(r - e.midAngle) + o <= i + l;
|
|
3486
|
-
},
|
|
3489
|
+
}, ds = ({ x: e, y: t, labelWidth: r, labelHeight: a, panelRect: n }) => e - r / 2 >= 0 && e + r / 2 <= n.width && t - a / 2 >= 0 && t + a / 2 <= n.height, St = ({ wedge: e, position: t, offset: r, labelWidth: a, labelHeight: n }) => t === "inside" ? {
|
|
3487
3490
|
labelRadius: (e.innerRadiusPx + e.outerRadiusPx) / 2,
|
|
3488
3491
|
labelAngle: e.midAngle,
|
|
3489
3492
|
position: "inside"
|
|
@@ -3491,7 +3494,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3491
3494
|
labelRadius: e.outerRadiusPx + r + me("radial", e.midAngle, a, n),
|
|
3492
3495
|
labelAngle: e.midAngle,
|
|
3493
3496
|
position: "outside"
|
|
3494
|
-
},
|
|
3497
|
+
}, hs = ({ wedge: e, placement: t, justify: r, align: a, offset: n, labelWidth: s, labelHeight: i }) => {
|
|
3495
3498
|
const o = a === "start" ? e.startAngle : a === "end" ? e.endAngle : e.midAngle, l = n + me("radial", o, s, i);
|
|
3496
3499
|
let c;
|
|
3497
3500
|
if (r === "center") c = (e.innerRadiusPx + e.outerRadiusPx) / 2;
|
|
@@ -3509,7 +3512,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3509
3512
|
return {
|
|
3510
3513
|
labelRadius: c,
|
|
3511
3514
|
labelAngle: u,
|
|
3512
|
-
position:
|
|
3515
|
+
position: us({
|
|
3513
3516
|
wedge: e,
|
|
3514
3517
|
labelRadius: c,
|
|
3515
3518
|
labelAngle: u,
|
|
@@ -3517,7 +3520,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3517
3520
|
labelHeight: i
|
|
3518
3521
|
}) ? "inside" : "outside"
|
|
3519
3522
|
};
|
|
3520
|
-
},
|
|
3523
|
+
}, fs = class extends Z {
|
|
3521
3524
|
constructor(...e) {
|
|
3522
3525
|
super(...e), this.type = "bar", this.styleTarget = { observation: {
|
|
3523
3526
|
vocabulary: {
|
|
@@ -3538,7 +3541,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3538
3541
|
},
|
|
3539
3542
|
hovered: {
|
|
3540
3543
|
stroke: h("hoverAffordance"),
|
|
3541
|
-
shadow:
|
|
3544
|
+
shadow: wn
|
|
3542
3545
|
}
|
|
3543
3546
|
} }, this.defaultParams = {}, this.defaultPosition = "dodge", this.positionRoles = [
|
|
3544
3547
|
{
|
|
@@ -3593,10 +3596,10 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3593
3596
|
const f = Xr(t, r);
|
|
3594
3597
|
return f === null ? null : Bt(f, s);
|
|
3595
3598
|
}
|
|
3596
|
-
if (r.type === "polar") return
|
|
3599
|
+
if (r.type === "polar") return ps(t);
|
|
3597
3600
|
const i = ye(a), o = {
|
|
3598
|
-
isSolo: !i ||
|
|
3599
|
-
isNegative: i &&
|
|
3601
|
+
isSolo: !i || Gn(t) === "solo",
|
|
3602
|
+
isNegative: i && ys(t),
|
|
3600
3603
|
purpose: n
|
|
3601
3604
|
};
|
|
3602
3605
|
if (r.mainAxis === "x") {
|
|
@@ -3619,7 +3622,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3619
3622
|
x: u,
|
|
3620
3623
|
y: (l + c) / 2
|
|
3621
3624
|
};
|
|
3622
|
-
}, this.getDataLabelPlacements = (t) => t.coordSystem.type === "polar" ?
|
|
3625
|
+
}, this.getDataLabelPlacements = (t) => t.coordSystem.type === "polar" ? ls(t) : Hn(t), this.resolvePercentageValueStrategy = (t, r) => r === "polar" ? cs() : $n(t);
|
|
3623
3626
|
}
|
|
3624
3627
|
resolveParams(e) {
|
|
3625
3628
|
const { width: t, ...r } = super.resolveParams(e), a = this.resolveWidthParam(t, e.diagnostics);
|
|
@@ -3654,10 +3657,10 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3654
3657
|
suggestion: "Set params.width to a fraction of the category band in (0, 1]."
|
|
3655
3658
|
}), a;
|
|
3656
3659
|
}
|
|
3657
|
-
}, kt = ({ width: e }, t) => e !== void 0 ? e : t === "polar" ? 1 :
|
|
3660
|
+
}, kt = ({ width: e }, t) => e !== void 0 ? e : t === "polar" ? 1 : Un, ps = (e) => {
|
|
3658
3661
|
const t = q(e), r = J(e), a = G(e), n = j(e);
|
|
3659
3662
|
return t === null || r === null || a === null || n === null ? null : $((t + r) / 2, (a + n) / 2);
|
|
3660
|
-
},
|
|
3663
|
+
}, ys = (e) => {
|
|
3661
3664
|
const t = $r(e);
|
|
3662
3665
|
return L(t) && t < 0;
|
|
3663
3666
|
}, Lt = (e) => {
|
|
@@ -3666,13 +3669,13 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3666
3669
|
if (a.purpose === "value" || a.isSolo) return n;
|
|
3667
3670
|
const s = a.isNegative ? r : t;
|
|
3668
3671
|
return s === null ? null : (s + n) / 2;
|
|
3669
|
-
},
|
|
3672
|
+
}, gs = (e) => {
|
|
3670
3673
|
const t = [];
|
|
3671
3674
|
if (!e.layer.dataLabels.showDataLabels) return {
|
|
3672
3675
|
labels: t,
|
|
3673
3676
|
droppedCount: 0
|
|
3674
3677
|
};
|
|
3675
|
-
const { offset: r } = e.layer.dataLabels, a =
|
|
3678
|
+
const { offset: r } = e.layer.dataLabels, a = ms(e.layer);
|
|
3676
3679
|
for (const n of e.layer.data) {
|
|
3677
3680
|
const s = X(n), i = z(n);
|
|
3678
3681
|
if (s === null || i === null || !Ke(s, i)) continue;
|
|
@@ -3711,7 +3714,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3711
3714
|
labels: t,
|
|
3712
3715
|
droppedCount: 0
|
|
3713
3716
|
};
|
|
3714
|
-
},
|
|
3717
|
+
}, ms = (e) => {
|
|
3715
3718
|
const { position: t, justify: r, align: a } = e.dataLabels;
|
|
3716
3719
|
return t === "auto" ? {
|
|
3717
3720
|
placement: "outside",
|
|
@@ -3722,7 +3725,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3722
3725
|
justify: fr(e.data, e.mapping) ? Ze(r) : r,
|
|
3723
3726
|
align: a
|
|
3724
3727
|
};
|
|
3725
|
-
},
|
|
3728
|
+
}, bs = class extends Z {
|
|
3726
3729
|
constructor(...e) {
|
|
3727
3730
|
super(...e), this.type = "line", this.styleTarget = { observation: {
|
|
3728
3731
|
vocabulary: {
|
|
@@ -3786,7 +3789,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3786
3789
|
identity: !0,
|
|
3787
3790
|
fill: !0
|
|
3788
3791
|
}
|
|
3789
|
-
}, this.highlightStrategy = "overlay-anchor", this.spatialKind = "buckets", this.resolveAnchorPosition = Qe, this.getDataLabelPlacements = (t) =>
|
|
3792
|
+
}, this.highlightStrategy = "overlay-anchor", this.spatialKind = "buckets", this.resolveAnchorPosition = Qe, this.getDataLabelPlacements = (t) => gs(t);
|
|
3790
3793
|
}
|
|
3791
3794
|
compile(e) {
|
|
3792
3795
|
return {
|
|
@@ -3794,13 +3797,13 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3794
3797
|
mapping: {}
|
|
3795
3798
|
};
|
|
3796
3799
|
}
|
|
3797
|
-
},
|
|
3800
|
+
}, vs = (e) => {
|
|
3798
3801
|
const t = [];
|
|
3799
3802
|
if (!e.layer.dataLabels.showDataLabels) return {
|
|
3800
3803
|
labels: t,
|
|
3801
3804
|
droppedCount: 0
|
|
3802
3805
|
};
|
|
3803
|
-
const { offset: r } = e.layer.dataLabels, a =
|
|
3806
|
+
const { offset: r } = e.layer.dataLabels, a = As(e.layer), n = a.justify === "panel-start" || a.justify === "panel-end", s = e.styleReaders;
|
|
3804
3807
|
for (const i of e.layer.data) {
|
|
3805
3808
|
const o = X(i), l = z(i);
|
|
3806
3809
|
if (o === null || l === null || !Ke(o, l)) continue;
|
|
@@ -3840,7 +3843,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3840
3843
|
labels: t,
|
|
3841
3844
|
droppedCount: 0
|
|
3842
3845
|
};
|
|
3843
|
-
},
|
|
3846
|
+
}, As = (e) => {
|
|
3844
3847
|
const { position: t, justify: r, align: a } = e.dataLabels;
|
|
3845
3848
|
return t === "auto" ? {
|
|
3846
3849
|
placement: "outside",
|
|
@@ -3851,7 +3854,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3851
3854
|
justify: r,
|
|
3852
3855
|
align: a
|
|
3853
3856
|
};
|
|
3854
|
-
},
|
|
3857
|
+
}, Es = class extends Z {
|
|
3855
3858
|
constructor(...e) {
|
|
3856
3859
|
super(...e), this.type = "point", this.styleTarget = { observation: {
|
|
3857
3860
|
vocabulary: {
|
|
@@ -3903,7 +3906,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3903
3906
|
if (r !== "label") return null;
|
|
3904
3907
|
const a = F(t.size);
|
|
3905
3908
|
return a !== null ? { variable: a } : null;
|
|
3906
|
-
}, this.getDataLabelPlacements = (t) =>
|
|
3909
|
+
}, this.getDataLabelPlacements = (t) => vs(t);
|
|
3907
3910
|
}
|
|
3908
3911
|
compile({ data: e }) {
|
|
3909
3912
|
return {
|
|
@@ -3911,7 +3914,7 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
3911
3914
|
mapping: {}
|
|
3912
3915
|
};
|
|
3913
3916
|
}
|
|
3914
|
-
},
|
|
3917
|
+
}, xs = class extends Z {
|
|
3915
3918
|
constructor(...e) {
|
|
3916
3919
|
super(...e), this.type = "rule", this.styleTarget = {
|
|
3917
3920
|
observation: {
|
|
@@ -4014,22 +4017,22 @@ var is = " · ", Ve = 2, os = (e) => {
|
|
|
4014
4017
|
sourceFormat: t.getValueFormat(a)
|
|
4015
4018
|
} : null;
|
|
4016
4019
|
};
|
|
4017
|
-
function
|
|
4020
|
+
function Ts(e) {
|
|
4018
4021
|
return e[ce.color];
|
|
4019
4022
|
}
|
|
4020
|
-
function
|
|
4023
|
+
function Zi(e) {
|
|
4021
4024
|
return e[ce.alpha];
|
|
4022
4025
|
}
|
|
4023
|
-
function
|
|
4026
|
+
function eo(e) {
|
|
4024
4027
|
return e[ce.size];
|
|
4025
4028
|
}
|
|
4026
|
-
function
|
|
4029
|
+
function to(e) {
|
|
4027
4030
|
return e[ce.strokeWidth];
|
|
4028
4031
|
}
|
|
4029
|
-
function
|
|
4032
|
+
function ro(e) {
|
|
4030
4033
|
return e[ce.lineType];
|
|
4031
4034
|
}
|
|
4032
|
-
var
|
|
4035
|
+
var Ms = (e) => {
|
|
4033
4036
|
const t = q(e), r = J(e), a = G(e), n = j(e);
|
|
4034
4037
|
if (t === null || r === null || a === null || n === null) return null;
|
|
4035
4038
|
const s = Math.min(t, r), i = Math.abs(r - t), o = Math.max(a, n), l = Math.abs(n - a);
|
|
@@ -4039,17 +4042,17 @@ var Ts = (e) => {
|
|
|
4039
4042
|
width: i,
|
|
4040
4043
|
height: l
|
|
4041
4044
|
};
|
|
4042
|
-
},
|
|
4043
|
-
const t =
|
|
4045
|
+
}, ws = (e) => {
|
|
4046
|
+
const t = Ms(e);
|
|
4044
4047
|
if (!t) return null;
|
|
4045
|
-
const r = t.width *
|
|
4048
|
+
const r = t.width * Yn, a = t.height * zn;
|
|
4046
4049
|
return {
|
|
4047
4050
|
x: t.x + r,
|
|
4048
4051
|
y: t.y + a,
|
|
4049
4052
|
width: t.width - r * 2,
|
|
4050
4053
|
height: t.height - a * 2
|
|
4051
4054
|
};
|
|
4052
|
-
},
|
|
4055
|
+
}, Ss = (e) => !!Ts(e), ks = (e) => Ss(e) ? ws(e) : null, Rt = 4, Ls = (e) => {
|
|
4053
4056
|
const t = [];
|
|
4054
4057
|
if (!e.layer.dataLabels.showDataLabels) return {
|
|
4055
4058
|
labels: t,
|
|
@@ -4057,7 +4060,7 @@ var Ts = (e) => {
|
|
|
4057
4060
|
};
|
|
4058
4061
|
const r = e.styleReaders;
|
|
4059
4062
|
for (const a of e.layer.data) {
|
|
4060
|
-
const n =
|
|
4063
|
+
const n = ks(a);
|
|
4061
4064
|
if (n === null) continue;
|
|
4062
4065
|
const s = e.formatLabel(a);
|
|
4063
4066
|
if (s === "") continue;
|
|
@@ -4079,10 +4082,10 @@ var Ts = (e) => {
|
|
|
4079
4082
|
labels: t,
|
|
4080
4083
|
droppedCount: 0
|
|
4081
4084
|
};
|
|
4082
|
-
},
|
|
4085
|
+
}, _s = (e) => {
|
|
4083
4086
|
const t = F(e.color);
|
|
4084
4087
|
return t !== null ? { variable: t } : null;
|
|
4085
|
-
},
|
|
4088
|
+
}, Rs = class extends Z {
|
|
4086
4089
|
constructor(...e) {
|
|
4087
4090
|
super(...e), this.type = "tile", this.styleTarget = { observation: {
|
|
4088
4091
|
vocabulary: {
|
|
@@ -4147,13 +4150,13 @@ var Ts = (e) => {
|
|
|
4147
4150
|
}, this.grid = { cartesian: {
|
|
4148
4151
|
hideGridX: !0,
|
|
4149
4152
|
hideGridY: !0
|
|
4150
|
-
} }, this.legend = { suppressWhenSingleItem: !1 }, this.dataLabels = { cartesian: { showDataLabels: !0 } }, this.dataLabelCoordTypes = ["cartesian"], this.highlightStrategy = "observation-rerender", this.spatialKind = "cells", this.identityKey = "x-y", this.tooltip = [{ aes: "color" }], this.resolveValueSource =
|
|
4153
|
+
} }, this.legend = { suppressWhenSingleItem: !1 }, this.dataLabels = { cartesian: { showDataLabels: !0 } }, this.dataLabelCoordTypes = ["cartesian"], this.highlightStrategy = "observation-rerender", this.spatialKind = "cells", this.identityKey = "x-y", this.tooltip = [{ aes: "color" }], this.resolveValueSource = _s, this.resolveAnchorPosition = (t) => {
|
|
4151
4154
|
const r = q(t), a = J(t), n = G(t), s = j(t);
|
|
4152
4155
|
return r === null || a === null || n === null || s === null ? null : {
|
|
4153
4156
|
x: (r + a) / 2,
|
|
4154
4157
|
y: (n + s) / 2
|
|
4155
4158
|
};
|
|
4156
|
-
}, this.getDataLabelPlacements = (t) =>
|
|
4159
|
+
}, this.getDataLabelPlacements = (t) => Ls(t);
|
|
4157
4160
|
}
|
|
4158
4161
|
compile({ data: e }) {
|
|
4159
4162
|
return {
|
|
@@ -4161,26 +4164,26 @@ var Ts = (e) => {
|
|
|
4161
4164
|
mapping: {}
|
|
4162
4165
|
};
|
|
4163
4166
|
}
|
|
4164
|
-
},
|
|
4165
|
-
new
|
|
4166
|
-
new As(),
|
|
4167
|
-
new ms(),
|
|
4168
|
-
new Vn(),
|
|
4167
|
+
}, Cs = [
|
|
4168
|
+
new fs(),
|
|
4169
4169
|
new Es(),
|
|
4170
|
-
new
|
|
4171
|
-
|
|
4170
|
+
new bs(),
|
|
4171
|
+
new Wn(),
|
|
4172
|
+
new xs(),
|
|
4173
|
+
new Rs()
|
|
4174
|
+
], ao = class extends hr {
|
|
4172
4175
|
constructor() {
|
|
4173
4176
|
super("geom");
|
|
4174
|
-
for (const e of
|
|
4177
|
+
for (const e of Cs) this.register(e.type, e);
|
|
4175
4178
|
}
|
|
4176
|
-
},
|
|
4179
|
+
}, Ds = class {
|
|
4177
4180
|
compute(e) {
|
|
4178
4181
|
return e.data.size() === 0 ? {
|
|
4179
4182
|
data: e.data,
|
|
4180
4183
|
mapping: {}
|
|
4181
4184
|
} : this.computeStat(e);
|
|
4182
4185
|
}
|
|
4183
|
-
},
|
|
4186
|
+
}, Is = class {
|
|
4184
4187
|
constructor() {
|
|
4185
4188
|
this.transformType = "aggregate";
|
|
4186
4189
|
}
|
|
@@ -4192,16 +4195,16 @@ var Ts = (e) => {
|
|
|
4192
4195
|
};
|
|
4193
4196
|
return e.groupBy(...r.groupby).rollup(a);
|
|
4194
4197
|
}
|
|
4195
|
-
},
|
|
4198
|
+
}, Fs = {
|
|
4196
4199
|
numeric: { type: "decimal" },
|
|
4197
4200
|
categorical: { type: "text" },
|
|
4198
4201
|
temporal: { type: "datetime" }
|
|
4199
|
-
},
|
|
4202
|
+
}, Ps = class {
|
|
4200
4203
|
constructor() {
|
|
4201
4204
|
this.transformType = "constant";
|
|
4202
4205
|
}
|
|
4203
4206
|
apply(e, t) {
|
|
4204
|
-
const { options: r } = t, a = sr(r.value,
|
|
4207
|
+
const { options: r } = t, a = sr(r.value, Fs[r.type], _e);
|
|
4205
4208
|
if (r.value !== null && a === null) throw new oe({
|
|
4206
4209
|
code: "INCOMPATIBLE_TYPE",
|
|
4207
4210
|
message: `Constant '${r.variableName}' cannot be read as ${r.type}`,
|
|
@@ -4216,7 +4219,7 @@ var Ts = (e) => {
|
|
|
4216
4219
|
const { options: t } = e;
|
|
4217
4220
|
return [t.variableName];
|
|
4218
4221
|
}
|
|
4219
|
-
},
|
|
4222
|
+
}, Os = class {
|
|
4220
4223
|
constructor() {
|
|
4221
4224
|
this.transformType = "filter";
|
|
4222
4225
|
}
|
|
@@ -4224,7 +4227,7 @@ var Ts = (e) => {
|
|
|
4224
4227
|
const { options: r } = t;
|
|
4225
4228
|
return e.filter(r.variableName, r.operator, r.value);
|
|
4226
4229
|
}
|
|
4227
|
-
},
|
|
4230
|
+
}, Ns = class {
|
|
4228
4231
|
constructor() {
|
|
4229
4232
|
this.transformType = "reshape";
|
|
4230
4233
|
}
|
|
@@ -4241,7 +4244,7 @@ var Ts = (e) => {
|
|
|
4241
4244
|
const { options: t } = e;
|
|
4242
4245
|
return [t.keyName ?? "key"];
|
|
4243
4246
|
}
|
|
4244
|
-
},
|
|
4247
|
+
}, Bs = class {
|
|
4245
4248
|
constructor() {
|
|
4246
4249
|
this.transformType = "sort";
|
|
4247
4250
|
}
|
|
@@ -4249,26 +4252,26 @@ var Ts = (e) => {
|
|
|
4249
4252
|
const { options: r } = t;
|
|
4250
4253
|
return e.orderBy(r.variableName, r.direction ?? "asc");
|
|
4251
4254
|
}
|
|
4252
|
-
},
|
|
4253
|
-
new
|
|
4254
|
-
new Fs(),
|
|
4255
|
+
}, Vs = [
|
|
4256
|
+
new Is(),
|
|
4255
4257
|
new Ps(),
|
|
4256
4258
|
new Os(),
|
|
4257
|
-
new Ns()
|
|
4258
|
-
|
|
4259
|
+
new Ns(),
|
|
4260
|
+
new Bs()
|
|
4261
|
+
], no = class extends hr {
|
|
4259
4262
|
constructor() {
|
|
4260
4263
|
super("transform");
|
|
4261
|
-
for (const e of
|
|
4264
|
+
for (const e of Vs) this.register(e.transformType, e);
|
|
4262
4265
|
}
|
|
4263
4266
|
};
|
|
4264
|
-
function
|
|
4267
|
+
function Ws(e) {
|
|
4265
4268
|
if ("definition" in e) return e.definition;
|
|
4266
4269
|
if (wr(e) || Sr(e) || kr(e)) return e;
|
|
4267
4270
|
}
|
|
4268
|
-
function
|
|
4271
|
+
function so(e) {
|
|
4269
4272
|
const t = [], r = [], a = [];
|
|
4270
4273
|
for (const n of e) {
|
|
4271
|
-
const s =
|
|
4274
|
+
const s = Ws(n);
|
|
4272
4275
|
s && (wr(s) ? t.push(s) : Sr(s) ? r.push(s) : kr(s) && a.push(s));
|
|
4273
4276
|
}
|
|
4274
4277
|
return {
|
|
@@ -4279,12 +4282,12 @@ function no(e) {
|
|
|
4279
4282
|
...We("geom", t, (n) => n.type),
|
|
4280
4283
|
...We("stat", r, (n) => n.type),
|
|
4281
4284
|
...We("transform", a, (n) => n.transformType),
|
|
4282
|
-
...
|
|
4283
|
-
...
|
|
4285
|
+
...Us(t),
|
|
4286
|
+
...Ys(t)
|
|
4284
4287
|
]
|
|
4285
4288
|
};
|
|
4286
4289
|
}
|
|
4287
|
-
function
|
|
4290
|
+
function Us(e) {
|
|
4288
4291
|
const t = [];
|
|
4289
4292
|
for (const r of e)
|
|
4290
4293
|
r.spatialKind === "render-hit-test" && (r.identityKey !== "x-group" && r.identityKey !== "x-y" || t.push({
|
|
@@ -4298,7 +4301,7 @@ function Ws(e) {
|
|
|
4298
4301
|
}));
|
|
4299
4302
|
return t;
|
|
4300
4303
|
}
|
|
4301
|
-
function
|
|
4304
|
+
function Ys(e) {
|
|
4302
4305
|
const t = [];
|
|
4303
4306
|
for (const r of e)
|
|
4304
4307
|
r.spatialKind !== "cells" || !r.supportedCoordTypes.includes("polar") || t.push({
|
|
@@ -4331,7 +4334,7 @@ function We(e, t, r) {
|
|
|
4331
4334
|
});
|
|
4332
4335
|
return n;
|
|
4333
4336
|
}
|
|
4334
|
-
var wr = (e) => e instanceof Z, Sr = (e) => e instanceof
|
|
4337
|
+
var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Ds, kr = (e) => "transformType" in e && typeof e.apply == "function", io = [
|
|
4335
4338
|
"brick",
|
|
4336
4339
|
"gray",
|
|
4337
4340
|
"red",
|
|
@@ -4342,7 +4345,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4342
4345
|
"blue",
|
|
4343
4346
|
"purple",
|
|
4344
4347
|
"pink"
|
|
4345
|
-
],
|
|
4348
|
+
], oo = [
|
|
4346
4349
|
"cyan",
|
|
4347
4350
|
"pink",
|
|
4348
4351
|
"purple",
|
|
@@ -4351,7 +4354,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4351
4354
|
"yellow",
|
|
4352
4355
|
"green",
|
|
4353
4356
|
"blue"
|
|
4354
|
-
],
|
|
4357
|
+
], zs = [
|
|
4355
4358
|
"#B84737",
|
|
4356
4359
|
"#BA7420",
|
|
4357
4360
|
"#0B8666",
|
|
@@ -4360,7 +4363,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4360
4363
|
"#E2BF6B",
|
|
4361
4364
|
"#95CBA6",
|
|
4362
4365
|
"#AABCE5"
|
|
4363
|
-
],
|
|
4366
|
+
], Gs = "brick", O = {
|
|
4364
4367
|
red: "#E83562",
|
|
4365
4368
|
orange: "#F38650",
|
|
4366
4369
|
yellow: "#FBBC30",
|
|
@@ -4371,7 +4374,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4371
4374
|
dark_purple: "#6D48D2",
|
|
4372
4375
|
plum: "#C82184",
|
|
4373
4376
|
pink: "#FC8497"
|
|
4374
|
-
},
|
|
4377
|
+
}, js = [
|
|
4375
4378
|
O.purple,
|
|
4376
4379
|
O.pink,
|
|
4377
4380
|
O.yellow,
|
|
@@ -4392,7 +4395,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4392
4395
|
red: "#FFADAD",
|
|
4393
4396
|
orange: "#FFDEB4",
|
|
4394
4397
|
yellow: "#FDF7C3"
|
|
4395
|
-
},
|
|
4398
|
+
}, Hs = [
|
|
4396
4399
|
P.green,
|
|
4397
4400
|
P.purple,
|
|
4398
4401
|
P.red,
|
|
@@ -4503,7 +4506,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4503
4506
|
pink200: "#FED0F3",
|
|
4504
4507
|
pink100: "#FFE8F9",
|
|
4505
4508
|
pink50: "#FFF4FC"
|
|
4506
|
-
},
|
|
4509
|
+
}, lo = [be.brick100, be.brick900], $s = [
|
|
4507
4510
|
be.gray200,
|
|
4508
4511
|
P.green,
|
|
4509
4512
|
P.red,
|
|
@@ -4625,7 +4628,7 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4625
4628
|
C.yellow,
|
|
4626
4629
|
C.green,
|
|
4627
4630
|
C.blue
|
|
4628
|
-
],
|
|
4631
|
+
], Ks = [
|
|
4629
4632
|
C.cyan,
|
|
4630
4633
|
C.green,
|
|
4631
4634
|
C.red,
|
|
@@ -4635,12 +4638,12 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4635
4638
|
positive: "#84FC89",
|
|
4636
4639
|
negative: "#FC8497",
|
|
4637
4640
|
total: "#84D1FC"
|
|
4638
|
-
},
|
|
4641
|
+
}, Xs = [
|
|
4639
4642
|
ke.start,
|
|
4640
4643
|
ke.positive,
|
|
4641
4644
|
ke.negative,
|
|
4642
4645
|
ke.total
|
|
4643
|
-
],
|
|
4646
|
+
], co = {
|
|
4644
4647
|
transform: "linear",
|
|
4645
4648
|
reverse: !1,
|
|
4646
4649
|
nice: !0,
|
|
@@ -4651,16 +4654,16 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4651
4654
|
interpolate: "lab",
|
|
4652
4655
|
domainMid: null,
|
|
4653
4656
|
symmetric: !1
|
|
4654
|
-
},
|
|
4657
|
+
}, uo = {
|
|
4655
4658
|
size: [4, 20],
|
|
4656
4659
|
alpha: [0.1, 1],
|
|
4657
4660
|
strokeWidth: [1, 4]
|
|
4658
|
-
},
|
|
4661
|
+
}, ho = {
|
|
4659
4662
|
domainMin: null,
|
|
4660
4663
|
domainMax: null,
|
|
4661
4664
|
nice: !1,
|
|
4662
4665
|
reverse: !1
|
|
4663
|
-
},
|
|
4666
|
+
}, fo = {
|
|
4664
4667
|
range: null,
|
|
4665
4668
|
domain: null,
|
|
4666
4669
|
padding: 0.1,
|
|
@@ -4669,27 +4672,27 @@ var wr = (e) => e instanceof Z, Sr = (e) => e instanceof Cs, kr = (e) => "transf
|
|
|
4669
4672
|
function It(e, t = "light", r) {
|
|
4670
4673
|
return ((r !== void 0 ? Ct[t][r] : void 0) ?? Ct[t].default).map((a) => be[`${e}${a}`]);
|
|
4671
4674
|
}
|
|
4672
|
-
function
|
|
4675
|
+
function qs(e) {
|
|
4673
4676
|
const t = Se.indexOf(C[e]);
|
|
4674
4677
|
return t <= 0 ? Se : [...Se.slice(t), ...Se.slice(0, t)];
|
|
4675
4678
|
}
|
|
4676
|
-
function
|
|
4679
|
+
function po(e, t = {}) {
|
|
4677
4680
|
switch (e.type) {
|
|
4678
4681
|
case "default":
|
|
4679
|
-
return t.hasTouchingGeoms ? It(
|
|
4682
|
+
return t.hasTouchingGeoms ? It(Gs, t.colorScheme ?? "light", t.groupCount) : zs;
|
|
4680
4683
|
case "graphy":
|
|
4681
|
-
return e.variant === "waterfall" ?
|
|
4684
|
+
return e.variant === "waterfall" ? Xs : js;
|
|
4682
4685
|
case "pastel":
|
|
4683
|
-
return e.variant === "waterfall" ?
|
|
4686
|
+
return e.variant === "waterfall" ? $s : Hs;
|
|
4684
4687
|
case "neon":
|
|
4685
|
-
return e.variant === "waterfall" ?
|
|
4688
|
+
return e.variant === "waterfall" ? Ks : qs(e.base);
|
|
4686
4689
|
case "mono":
|
|
4687
4690
|
return It(e.base, e.variant ?? "light", t.groupCount);
|
|
4688
4691
|
case "custom":
|
|
4689
4692
|
return e.colors;
|
|
4690
4693
|
}
|
|
4691
4694
|
}
|
|
4692
|
-
function
|
|
4695
|
+
function yo(e, t) {
|
|
4693
4696
|
if (!t) return e;
|
|
4694
4697
|
const r = [...e];
|
|
4695
4698
|
for (const [a, n] of Object.entries(t)) {
|
|
@@ -4700,7 +4703,7 @@ function po(e, t) {
|
|
|
4700
4703
|
}
|
|
4701
4704
|
return r;
|
|
4702
4705
|
}
|
|
4703
|
-
function
|
|
4706
|
+
function go(e, t, r, a) {
|
|
4704
4707
|
if (!t) return;
|
|
4705
4708
|
const n = r?.type === "custom" ? a[r.id] : void 0, s = {};
|
|
4706
4709
|
for (const [i, o] of Object.entries(t)) {
|
|
@@ -4726,7 +4729,7 @@ function yo(e, t, r, a) {
|
|
|
4726
4729
|
}
|
|
4727
4730
|
return Object.keys(s).length > 0 ? s : void 0;
|
|
4728
4731
|
}
|
|
4729
|
-
function
|
|
4732
|
+
function mo(e, t, r) {
|
|
4730
4733
|
if (!t) return Dt.palette;
|
|
4731
4734
|
if (t.type === "custom") {
|
|
4732
4735
|
const a = r[t.id];
|
|
@@ -4749,7 +4752,7 @@ function go(e, t, r) {
|
|
|
4749
4752
|
}
|
|
4750
4753
|
return t;
|
|
4751
4754
|
}
|
|
4752
|
-
function
|
|
4755
|
+
function bo(e, t = {}) {
|
|
4753
4756
|
const r = t;
|
|
4754
4757
|
return {
|
|
4755
4758
|
type: "scale",
|
|
@@ -4768,7 +4771,7 @@ function mo(e, t = {}) {
|
|
|
4768
4771
|
symmetric: r.symmetric
|
|
4769
4772
|
};
|
|
4770
4773
|
}
|
|
4771
|
-
function
|
|
4774
|
+
function vo(e, t = {}) {
|
|
4772
4775
|
return {
|
|
4773
4776
|
type: "scale",
|
|
4774
4777
|
scaledAesthetic: e,
|
|
@@ -4780,7 +4783,7 @@ function bo(e, t = {}) {
|
|
|
4780
4783
|
clamp: t.clamp
|
|
4781
4784
|
};
|
|
4782
4785
|
}
|
|
4783
|
-
function
|
|
4786
|
+
function Ao(e, t = {}) {
|
|
4784
4787
|
return {
|
|
4785
4788
|
type: "scale",
|
|
4786
4789
|
scaledAesthetic: e,
|
|
@@ -4791,14 +4794,14 @@ function vo(e, t = {}) {
|
|
|
4791
4794
|
reverse: t.reverse
|
|
4792
4795
|
};
|
|
4793
4796
|
}
|
|
4794
|
-
function
|
|
4797
|
+
function Eo(e, t = {}) {
|
|
4795
4798
|
return {
|
|
4796
4799
|
type: "scale",
|
|
4797
4800
|
scaledAesthetic: e,
|
|
4798
4801
|
scaleType: "identity"
|
|
4799
4802
|
};
|
|
4800
4803
|
}
|
|
4801
|
-
function
|
|
4804
|
+
function xo(e, t) {
|
|
4802
4805
|
return {
|
|
4803
4806
|
type: "scale",
|
|
4804
4807
|
scaledAesthetic: e,
|
|
@@ -4806,7 +4809,7 @@ function Eo(e, t) {
|
|
|
4806
4809
|
options: t
|
|
4807
4810
|
};
|
|
4808
4811
|
}
|
|
4809
|
-
function
|
|
4812
|
+
function To(e, t = {}) {
|
|
4810
4813
|
return {
|
|
4811
4814
|
type: "scale",
|
|
4812
4815
|
scaledAesthetic: e,
|
|
@@ -4815,24 +4818,24 @@ function xo(e, t = {}) {
|
|
|
4815
4818
|
overrides: t.overrides
|
|
4816
4819
|
};
|
|
4817
4820
|
}
|
|
4818
|
-
var
|
|
4821
|
+
var Mo = { labelCrossPosition: 0.5 }, wo = {
|
|
4819
4822
|
kind: "rectangle",
|
|
4820
4823
|
zOrder: "foreground"
|
|
4821
|
-
},
|
|
4824
|
+
}, So = {
|
|
4822
4825
|
zOrder: "foreground",
|
|
4823
4826
|
fit: "contain"
|
|
4824
|
-
},
|
|
4827
|
+
}, ko = {
|
|
4825
4828
|
x: 8,
|
|
4826
4829
|
y: 8,
|
|
4827
4830
|
unit: "px"
|
|
4828
|
-
},
|
|
4831
|
+
}, Lo = { align: "center" }, _o = {
|
|
4829
4832
|
startArrowheadStyle: "none",
|
|
4830
4833
|
endArrowheadStyle: "line-arrow"
|
|
4831
|
-
},
|
|
4834
|
+
}, Ro = {
|
|
4832
4835
|
thin: 2,
|
|
4833
4836
|
medium: 4,
|
|
4834
4837
|
thick: 8
|
|
4835
|
-
},
|
|
4838
|
+
}, Co = 0.5, Do = {
|
|
4836
4839
|
strokeWidth: 2,
|
|
4837
4840
|
shadow: {
|
|
4838
4841
|
offsetX: 0,
|
|
@@ -4840,7 +4843,7 @@ var To = { labelCrossPosition: 0.5 }, Mo = {
|
|
|
4840
4843
|
blur: 1.15,
|
|
4841
4844
|
color: "rgba(0, 0, 0, 0.16)"
|
|
4842
4845
|
}
|
|
4843
|
-
},
|
|
4846
|
+
}, Io = {
|
|
4844
4847
|
small: {
|
|
4845
4848
|
arrow: { strokeWidth: 2 },
|
|
4846
4849
|
label: {
|
|
@@ -4871,7 +4874,7 @@ var To = { labelCrossPosition: 0.5 }, Mo = {
|
|
|
4871
4874
|
strokeWidth: 2
|
|
4872
4875
|
}
|
|
4873
4876
|
}
|
|
4874
|
-
},
|
|
4877
|
+
}, Fo = {
|
|
4875
4878
|
differenceArrow: "differenceArrows",
|
|
4876
4879
|
shape: "shapes",
|
|
4877
4880
|
arrow: "arrows",
|
|
@@ -4880,7 +4883,7 @@ var To = { labelCrossPosition: 0.5 }, Mo = {
|
|
|
4880
4883
|
sticker: "stickers",
|
|
4881
4884
|
pinnedNumber: "pinnedNumbers",
|
|
4882
4885
|
comment: "comments"
|
|
4883
|
-
},
|
|
4886
|
+
}, Po = {
|
|
4884
4887
|
differenceArrow(e) {
|
|
4885
4888
|
return {
|
|
4886
4889
|
type: "annotation",
|
|
@@ -4940,190 +4943,191 @@ var To = { labelCrossPosition: 0.5 }, Mo = {
|
|
|
4940
4943
|
};
|
|
4941
4944
|
export {
|
|
4942
4945
|
Ae as $,
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4946
|
+
Pt as $n,
|
|
4947
|
+
Ca as $t,
|
|
4948
|
+
io as A,
|
|
4949
|
+
bi as An,
|
|
4950
|
+
sn as At,
|
|
4951
|
+
Ms as B,
|
|
4952
|
+
ze as Bn,
|
|
4953
|
+
Ja as Bt,
|
|
4954
|
+
co as C,
|
|
4955
|
+
Vt as Cn,
|
|
4956
|
+
ei as Cr,
|
|
4957
|
+
Fi as Ct,
|
|
4958
|
+
zs as D,
|
|
4959
|
+
Jr as Dn,
|
|
4957
4960
|
pt as Dt,
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4961
|
+
uo as E,
|
|
4962
|
+
Qr as En,
|
|
4963
|
+
Zs as Er,
|
|
4964
|
+
vn as Et,
|
|
4965
|
+
Ds as F,
|
|
4966
|
+
F as Fn,
|
|
4963
4967
|
Xe as Ft,
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4968
|
+
eo as G,
|
|
4969
|
+
ui as Gn,
|
|
4970
|
+
Wa as Gt,
|
|
4971
|
+
Zi as H,
|
|
4972
|
+
Bt as Hn,
|
|
4973
|
+
Ci as Ht,
|
|
4974
|
+
Cs as I,
|
|
4975
|
+
fe as In,
|
|
4972
4976
|
pr as It,
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4977
|
+
ss as J,
|
|
4978
|
+
q as Jn,
|
|
4979
|
+
_a as Jt,
|
|
4980
|
+
to as K,
|
|
4981
|
+
X as Kn,
|
|
4978
4982
|
ne as Kt,
|
|
4979
|
-
|
|
4980
|
-
|
|
4983
|
+
ao as L,
|
|
4984
|
+
fi as Ln,
|
|
4981
4985
|
ue as Lt,
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4986
|
+
so as M,
|
|
4987
|
+
Le as Mn,
|
|
4988
|
+
ln as Mt,
|
|
4989
|
+
Ws as N,
|
|
4990
|
+
gi as Nn,
|
|
4987
4991
|
gr as Nt,
|
|
4988
|
-
|
|
4989
|
-
|
|
4992
|
+
Gs as O,
|
|
4993
|
+
vi as On,
|
|
4990
4994
|
h as Ot,
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
4995
|
+
no as P,
|
|
4996
|
+
mi as Pn,
|
|
4997
|
+
Ii as Pt,
|
|
4998
|
+
Un as Q,
|
|
4999
|
+
$r as Qn,
|
|
5000
|
+
Li as Qt,
|
|
5001
|
+
ws as R,
|
|
5002
|
+
pi as Rn,
|
|
5003
|
+
Di as Rt,
|
|
5004
|
+
po as S,
|
|
5005
|
+
oe as Sn,
|
|
5006
|
+
ti as Sr,
|
|
5007
|
+
Pi as St,
|
|
5008
|
+
fo as T,
|
|
5009
|
+
W as Tn,
|
|
5010
|
+
Ue as Tr,
|
|
5007
5011
|
mr as Tt,
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5012
|
+
Ts as U,
|
|
5013
|
+
di as Un,
|
|
5014
|
+
Ha as Ut,
|
|
5015
|
+
Ss as V,
|
|
5016
|
+
qr as Vn,
|
|
5013
5017
|
fr as Vt,
|
|
5014
|
-
|
|
5015
|
-
|
|
5018
|
+
ro as W,
|
|
5019
|
+
Xr as Wn,
|
|
5016
5020
|
hr as Wt,
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5021
|
+
Gn as X,
|
|
5022
|
+
j as Xn,
|
|
5023
|
+
Ri as Xt,
|
|
5024
|
+
is as Y,
|
|
5025
|
+
z as Yn,
|
|
5022
5026
|
or as Yt,
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5027
|
+
Qi as Z,
|
|
5028
|
+
G as Zn,
|
|
5029
|
+
Ra as Zt,
|
|
5030
|
+
vo as _,
|
|
5031
|
+
Wt as _n,
|
|
5032
|
+
Ur as _r,
|
|
5029
5033
|
qe as _t,
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5034
|
+
Ro as a,
|
|
5035
|
+
wi as an,
|
|
5036
|
+
ce as ar,
|
|
5037
|
+
Bi as at,
|
|
5038
|
+
mo as b,
|
|
5039
|
+
xi as bn,
|
|
5040
|
+
Yr as br,
|
|
5041
|
+
$i as bt,
|
|
5042
|
+
So as c,
|
|
5043
|
+
Si as cn,
|
|
5044
|
+
jr as cr,
|
|
5045
|
+
Yi as ct,
|
|
5046
|
+
Lo as d,
|
|
5047
|
+
ma as dn,
|
|
5048
|
+
zr as dr,
|
|
5049
|
+
ji as dt,
|
|
5050
|
+
_i as en,
|
|
5051
|
+
Ye as er,
|
|
5048
5052
|
Ee as et,
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5053
|
+
Co as f,
|
|
5054
|
+
ra as fn,
|
|
5055
|
+
ii as fr,
|
|
5056
|
+
Ui as ft,
|
|
5057
|
+
Ao as g,
|
|
5058
|
+
Ei as gn,
|
|
5059
|
+
ie as gr,
|
|
5060
|
+
xn as gt,
|
|
5061
|
+
Eo as h,
|
|
5062
|
+
Ai as hn,
|
|
5063
|
+
ni as hr,
|
|
5064
|
+
Vi as ht,
|
|
5065
|
+
Do as i,
|
|
5066
|
+
ka as in,
|
|
5067
|
+
Ot as ir,
|
|
5068
|
+
Dn as it,
|
|
5069
|
+
oo as j,
|
|
5070
|
+
yi as jn,
|
|
5067
5071
|
yr as jt,
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5072
|
+
lo as k,
|
|
5073
|
+
ye as kn,
|
|
5074
|
+
on as kt,
|
|
5075
|
+
ko as l,
|
|
5076
|
+
ae as ln,
|
|
5077
|
+
ri as lr,
|
|
5078
|
+
Gi as lt,
|
|
5079
|
+
xo as m,
|
|
5080
|
+
Zr as mn,
|
|
5081
|
+
Br as mr,
|
|
5082
|
+
Wi as mt,
|
|
5083
|
+
Po as n,
|
|
5080
5084
|
Ke as nn,
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5085
|
+
b as nr,
|
|
5086
|
+
Ji as nt,
|
|
5087
|
+
Mo as o,
|
|
5088
|
+
Mi as on,
|
|
5089
|
+
ci as or,
|
|
5090
|
+
Tn as ot,
|
|
5091
|
+
To as p,
|
|
5092
|
+
ta as pn,
|
|
5093
|
+
Vr as pr,
|
|
5094
|
+
zi as pt,
|
|
5091
5095
|
kt as q,
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5096
|
+
J as qn,
|
|
5097
|
+
ki as qt,
|
|
5098
|
+
_o as r,
|
|
5099
|
+
La as rn,
|
|
5100
|
+
Nt as rr,
|
|
5101
|
+
qi as rt,
|
|
5102
|
+
Io as s,
|
|
5099
5103
|
Ti as sn,
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5104
|
+
m as sr,
|
|
5105
|
+
Ni as st,
|
|
5106
|
+
Fo as t,
|
|
5107
|
+
Da as tn,
|
|
5108
|
+
oi as tr,
|
|
5105
5109
|
Z as tt,
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5110
|
+
wo as u,
|
|
5111
|
+
sr as un,
|
|
5112
|
+
Y as ur,
|
|
5113
|
+
Hi as ut,
|
|
5114
|
+
bo as v,
|
|
5115
|
+
ea as vn,
|
|
5116
|
+
Wr as vr,
|
|
5117
|
+
Xi as vt,
|
|
5118
|
+
ho as w,
|
|
5119
|
+
_e as wn,
|
|
5120
|
+
L as wr,
|
|
5117
5121
|
De as wt,
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5122
|
+
go as x,
|
|
5123
|
+
R as xn,
|
|
5124
|
+
ai as xr,
|
|
5125
|
+
Oi as xt,
|
|
5126
|
+
yo as y,
|
|
5127
|
+
ve as yn,
|
|
5128
|
+
si as yr,
|
|
5129
|
+
Ki as yt,
|
|
5130
|
+
ks as z,
|
|
5131
|
+
hi as zn,
|
|
5132
|
+
Qa as zt
|
|
5129
5133
|
};
|