@blueprint-chart/lib 0.1.28 → 0.1.29
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/index.js +757 -754
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Jt = (t, a, e) =>
|
|
1
|
+
var ul = Object.defineProperty;
|
|
2
|
+
var hl = (t, a, e) => a in t ? ul(t, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[a] = e;
|
|
3
|
+
var Jt = (t, a, e) => hl(t, typeof a != "symbol" ? a + "" : a, e);
|
|
4
4
|
import * as p from "d3";
|
|
5
5
|
import "d3-transition";
|
|
6
6
|
import { D3Blueprint as dt } from "d3-blueprint";
|
|
7
7
|
import Ga from "dayjs";
|
|
8
|
-
import { computePosition as Ys, offset as
|
|
9
|
-
import
|
|
10
|
-
var xt = /* @__PURE__ */ ((t) => (t.BarVertical = "bar-vertical", t.BarHorizontal = "bar-horizontal", t.BarMulti = "bar-multi", t.ColumnStacked = "column-stacked", t.BarStacked = "bar-stacked", t.BarSplit = "bar-split", t.BarGrouped = "bar-grouped", t.Line = "line", t.LineMulti = "line-multi", t.Area = "area", t.AreaStacked = "area-stacked", t.Donut = "donut", t.Pie = "pie", t.VerticalBar = "vertical-bar", t.HorizontalBar = "horizontal-bar", t))(xt || {}), Ft = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t))(Ft || {}), Ya = /* @__PURE__ */ ((t) => (t.Linear = "linear", t.Log = "log", t))(Ya || {}), tt = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dashed = "dashed", t.Dotted = "dotted", t.None = "none", t))(tt || {}), We = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Inside = "inside", t.Outside = "outside", t.Off = "off", t))(We || {}), Ka = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Horizontal = "horizontal", t.Vertical = "vertical", t))(Ka || {}),
|
|
11
|
-
class
|
|
8
|
+
import { computePosition as Ys, offset as Rs, flip as Hs, shift as Ws } from "@floating-ui/dom";
|
|
9
|
+
import He from "chroma-js";
|
|
10
|
+
var xt = /* @__PURE__ */ ((t) => (t.BarVertical = "bar-vertical", t.BarHorizontal = "bar-horizontal", t.BarMulti = "bar-multi", t.ColumnStacked = "column-stacked", t.BarStacked = "bar-stacked", t.BarSplit = "bar-split", t.BarGrouped = "bar-grouped", t.Line = "line", t.LineMulti = "line-multi", t.Area = "area", t.AreaStacked = "area-stacked", t.Donut = "donut", t.Pie = "pie", t.VerticalBar = "vertical-bar", t.HorizontalBar = "horizontal-bar", t))(xt || {}), Ft = /* @__PURE__ */ ((t) => (t.Left = "left", t.Right = "right", t))(Ft || {}), Ya = /* @__PURE__ */ ((t) => (t.Linear = "linear", t.Log = "log", t))(Ya || {}), tt = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dashed = "dashed", t.Dotted = "dotted", t.None = "none", t))(tt || {}), We = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Inside = "inside", t.Outside = "outside", t.Off = "off", t))(We || {}), Ka = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Horizontal = "horizontal", t.Vertical = "vertical", t))(Ka || {}), gl = /* @__PURE__ */ ((t) => (t.Above = "above", t.Below = "below", t))(gl || {}), pl = /* @__PURE__ */ ((t) => (t.Auto = "auto", t.Standard = "standard", t.AspectRatio = "aspect-ratio", t))(pl || {}), et = /* @__PURE__ */ ((t) => (t.NW = "NW", t.N = "N", t.NE = "NE", t.E = "E", t.SE = "SE", t.S = "S", t.SW = "SW", t.W = "W", t.Center = "center", t))(et || {}), mt = /* @__PURE__ */ ((t) => (t.Direct = "direct", t.CurveLeft = "curve-left", t.CurveRight = "curve-right", t.Elbow = "elbow", t))(mt || {}), Sr = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dotted = "dotted", t.Dashed = "dashed", t))(Sr || {}), Qe = /* @__PURE__ */ ((t) => (t.Point = "point", t.Range = "range", t.Free = "free", t))(Qe || {}), qs = /* @__PURE__ */ ((t) => (t.Hide = "hide", t.Show = "show", t))(qs || {}), Xs = /* @__PURE__ */ ((t) => (t.Start = "start", t.Center = "center", t.End = "end", t))(Xs || {}), ot = /* @__PURE__ */ ((t) => (t.Vertical = "vertical", t.Horizontal = "horizontal", t))(ot || {}), Et = /* @__PURE__ */ ((t) => (t.Circle = "circle", t.Square = "square", t.Diamond = "diamond", t.Triangle = "triangle", t.TriangleDown = "triangleDown", t.Cross = "cross", t.Star = "star", t))(Et || {}), Nt = /* @__PURE__ */ ((t) => (t.All = "all", t.First = "first", t.Last = "last", t.FirstLast = "firstLast", t))(Nt || {}), At = /* @__PURE__ */ ((t) => (t.Filled = "filled", t.Hollow = "hollow", t))(At || {}), ft = /* @__PURE__ */ ((t) => (t.Ascending = "ascending", t.Descending = "descending", t.None = "none", t))(ft || {}), ea = /* @__PURE__ */ ((t) => (t.Total = "total", t.WithinGroups = "within-groups", t.None = "none", t))(ea || {}), Va = /* @__PURE__ */ ((t) => (t.Top = "top", t.Bottom = "bottom", t.Left = "left", t.Right = "right", t))(Va || {}), fa = /* @__PURE__ */ ((t) => (t.Start = "start", t.Middle = "middle", t.End = "end", t))(fa || {}), Ie = /* @__PURE__ */ ((t) => (t.Inside = "inside", t.Outside = "outside", t.Auto = "auto", t))(Ie || {}), yt = /* @__PURE__ */ ((t) => (t.Both = "both", t.Vertical = "vertical", t.Horizontal = "horizontal", t))(yt || {}), ta = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dashed = "dashed", t.Dotted = "dotted", t))(ta || {}), ka = /* @__PURE__ */ ((t) => (t.Normal = "normal", t.Percent = "percent", t))(ka || {}), bl = /* @__PURE__ */ ((t) => (t.Solid = "solid", t.Dashed = "dashed", t.Dotted = "dotted", t.None = "none", t))(bl || {}), fe = /* @__PURE__ */ ((t) => (t.Colors = "colors", t.Boolean = "boolean", t.Select = "select", t.Text = "text", t.NumberFormat = "numberFormat", t.DateFormat = "dateFormat", t))(fe || {}), vt = /* @__PURE__ */ ((t) => (t.Off = "", t.Auto = "auto", t.Outside = "outside", t.Inside = "inside", t))(vt || {}), Kt = /* @__PURE__ */ ((t) => (t.Linear = "linear", t.MonotoneX = "monotoneX", t.Step = "step", t.StepBefore = "stepBefore", t.StepAfter = "stepAfter", t.Basis = "basis", t.Cardinal = "cardinal", t.CatmullRom = "catmullRom", t))(Kt || {}), ml = /* @__PURE__ */ ((t) => (t.Property = "property", t.Data = "data", t.Colorize = "colorize", t.Highlight = "highlight", t.AreaFill = "areafill", t.Annotation = "annotation", t.Series = "series", t.AnnotationVisibility = "annotation-visibility", t.Scene = "scene", t.Transform = "transform", t.Chart = "chart", t))(ml || {});
|
|
11
|
+
class yl extends dt {
|
|
12
12
|
initialize() {
|
|
13
13
|
const a = this.base.append("div").attr("class", "bc-frame"), e = a.append("div").attr("class", "bc-frame-header");
|
|
14
14
|
a.append("div").attr("class", "bc-frame-body"), a.append("p").attr("class", "bc-frame-note");
|
|
@@ -99,11 +99,11 @@ class ml extends dt {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function vl(t) {
|
|
103
103
|
const a = [];
|
|
104
104
|
return t.title && a.push({ tag: "h3", className: "bc-frame-title", text: t.title }), t.description && a.push({ tag: "p", className: "bc-frame-description", text: t.description }), a;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function xl(t) {
|
|
107
107
|
const a = [];
|
|
108
108
|
return t.byline && a.push({ tag: "span", className: "bc-frame-byline", text: t.byline }), t.source && a.push({
|
|
109
109
|
tag: "span",
|
|
@@ -113,26 +113,26 @@ function vl(t) {
|
|
|
113
113
|
href: t.sourceUrl || void 0
|
|
114
114
|
}), a;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
function
|
|
116
|
+
const Al = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48.042969 90.607422" width="10" height="18" style="vertical-align:-3px;margin-right:3px"><path fill="currentColor" opacity="0.55" d="M 20.042969 34.607422 A 28 28 0 0 1 23.072266 34.779297 A 28 28 0 0 0 20.042969 34.607422 z M 23.34375 34.810547 A 28 28 0 0 1 26.171875 35.292969 A 28 28 0 0 0 23.34375 34.810547 z M 16.570312 34.84375 A 28 28 0 0 0 15.474609 35.033203 A 28 28 0 0 1 16.570312 34.84375 z M 26.390625 35.341797 A 28 28 0 0 1 29.316406 36.189453 A 28 28 0 0 0 26.390625 35.341797 z M 13.128906 35.511719 A 28 28 0 0 0 11.904297 35.873047 A 28 28 0 0 1 13.128906 35.511719 z M 29.373047 36.210938 A 28 28 0 0 1 32.103516 37.347656 A 28 28 0 0 0 29.373047 36.210938 z M 9.7832031 36.609375 A 28 28 0 0 0 8.5820312 37.117188 A 28 28 0 0 1 9.7832031 36.609375 z M 32.392578 37.486328 A 28 28 0 0 1 34.939453 38.90625 A 28 28 0 0 0 32.392578 37.486328 z M 6.5742188 38.128906 A 28 28 0 0 0 5.4511719 38.765625 A 28 28 0 0 1 6.5742188 38.128906 z M 35.041016 38.966797 A 28 28 0 0 1 37.523438 40.738281 A 28 28 0 0 0 35.041016 38.966797 z M 3.5273438 40.080078 A 28 28 0 0 0 2.5761719 40.771484 A 28 28 0 0 1 3.5273438 40.080078 z M 37.658203 40.851562 A 28 28 0 0 1 39.804688 42.783203 A 28 28 0 0 0 37.658203 40.851562 z M 40.011719 42.990234 A 28 28 0 0 1 42.013672 45.251953 A 28 28 0 0 0 40.011719 42.990234 z M 42.013672 45.251953 A 28 28 0 0 1 20.042969 56 A 28 28 0 0 1 14.232422 55.3125 A 16 16 0 0 1 16 62.607422 A 16 16 0 0 1 0 78.607422 L 0 82.121094 A 28 28 0 0 0 20.042969 90.607422 A 28 28 0 0 0 48.042969 62.607422 A 28 28 0 0 0 42.013672 45.251953 z M 1.3007812 46.667969 A 16 16 0 0 1 1.6191406 46.697266 A 16 16 0 0 0 1.3007812 46.667969 z M 4.2558594 47.189453 A 16 16 0 0 1 4.4355469 47.242188 A 16 16 0 0 0 4.2558594 47.189453 z "/><path fill="currentColor" opacity="0.85" d="M 6.0637516 38.376047 A 28 28 0 0 1 20.042969 34.615234 A 28 28 0 0 1 42.013672 45.259765 A 28 28 0 0 0 48.042969 28.007812 A 28 28 0 0 0 20.042969 0.0078125 A 28 28 0 0 0 0 8.4941407 L 0 16.007812 A 12 12 0 0 1 12 28.007812 A 12 12 0 0 1 6.0613693 38.364443 "/><path fill="currentColor" d="M 20.042969 34.607422 A 28 28 0 0 0 5.0878906 38.970703 A 28 28 0 0 1 6.0644531 38.376953 L 6.0605469 38.365234 A 12 12 0 0 1 0 40.007812 L 0 43.09375 L 0 43.101562 L 0 46.607422 A 16 16 0 0 1 2.8847656 46.873047 A 16 16 0 0 1 2.9199219 46.878906 A 16 16 0 0 1 5.7011719 47.662109 A 16 16 0 0 1 5.7324219 47.673828 A 16 16 0 0 1 8.3300781 48.955078 A 16 16 0 0 1 8.3398438 48.958984 A 16 16 0 0 1 8.3457031 48.962891 A 16 16 0 0 1 10.662109 50.6875 A 16 16 0 0 1 10.697266 50.71875 A 16 16 0 0 1 12.660156 52.837891 A 16 16 0 0 1 12.667969 52.845703 A 16 16 0 0 1 12.673828 52.855469 A 16 16 0 0 1 14.228516 55.306641 A 16 16 0 0 1 14.232422 55.3125 A 28 28 0 0 0 20.042969 56 A 28 28 0 0 0 42.013672 45.251953 A 28 28 0 0 0 20.042969 34.607422 z M 4.7695312 39.177734 A 28 28 0 0 0 2.5390625 40.798828 A 28 28 0 0 1 4.7695312 39.177734 z M 2.1816406 41.091797 A 28 28 0 0 0 0.11914062 42.984375 A 28 28 0 0 1 2.1816406 41.091797 z "/></svg>';
|
|
117
|
+
function wl() {
|
|
118
118
|
return [{
|
|
119
119
|
tag: "a",
|
|
120
120
|
className: "bc-frame-credit",
|
|
121
121
|
text: "Blueprint Chart",
|
|
122
|
-
html:
|
|
122
|
+
html: Al + "Blueprint Chart",
|
|
123
123
|
href: "/",
|
|
124
124
|
target: "_blank",
|
|
125
125
|
rel: "noopener noreferrer"
|
|
126
126
|
}];
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Ht(t, a) {
|
|
129
129
|
if (a === null)
|
|
130
130
|
return { wrapper: t, header: t, body: t, footer: t };
|
|
131
131
|
const e = a ?? {};
|
|
132
|
-
new
|
|
133
|
-
headerItems:
|
|
134
|
-
footerLeftItems:
|
|
135
|
-
footerRightItems:
|
|
132
|
+
new yl(p.select(t)).draw({
|
|
133
|
+
headerItems: vl(e),
|
|
134
|
+
footerLeftItems: xl(e),
|
|
135
|
+
footerRightItems: wl()
|
|
136
136
|
});
|
|
137
137
|
const n = t.querySelector(".bc-frame"), s = n.querySelector(".bc-frame-header"), o = n.querySelector(".bc-frame-body"), i = n.querySelector(".bc-frame-note"), c = n.querySelector(".bc-frame-footer");
|
|
138
138
|
if (e.padding && n.style.setProperty("--bc-frame-padding", e.padding), e.transparentBackground && n.style.setProperty("--bc-frame-bg", "transparent"), e.note ? i.textContent = e.note : i.style.display = "none", t.isConnected) {
|
|
@@ -151,7 +151,7 @@ function Rt(t, a) {
|
|
|
151
151
|
function fs(t) {
|
|
152
152
|
return t && (t.startsWith("(") && t.endsWith(")") ? t.slice(0, -1) : t);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Sl(t) {
|
|
155
155
|
if (!t)
|
|
156
156
|
return { prefix: "", d3Spec: "", suffix: "" };
|
|
157
157
|
if (t.includes("|")) {
|
|
@@ -167,7 +167,7 @@ function wl(t) {
|
|
|
167
167
|
function ya(t) {
|
|
168
168
|
if (!t)
|
|
169
169
|
return null;
|
|
170
|
-
const { prefix: a, d3Spec: e, suffix: r } =
|
|
170
|
+
const { prefix: a, d3Spec: e, suffix: r } = Sl(t);
|
|
171
171
|
if (!e)
|
|
172
172
|
return null;
|
|
173
173
|
const n = p.format(e);
|
|
@@ -185,13 +185,13 @@ function ra(t, a) {
|
|
|
185
185
|
dy: e - r
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const kl = {
|
|
189
189
|
top: 12,
|
|
190
190
|
right: 20,
|
|
191
191
|
bottom: 24,
|
|
192
192
|
left: 50
|
|
193
193
|
}, Us = 600, js = 400;
|
|
194
|
-
class
|
|
194
|
+
class Ll extends dt {
|
|
195
195
|
initialize() {
|
|
196
196
|
this.configDefine("totalWidth", { defaultValue: Us }), this.configDefine("totalHeight", { defaultValue: js }), this.layer("svg", this.base, {
|
|
197
197
|
dataBind: (a, e) => a.selectAll("svg").data(e),
|
|
@@ -206,7 +206,7 @@ class kl extends dt {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const $l = 400, ds = 2, kr = 2, Lr = 9;
|
|
210
210
|
function Ca(t, a, e, r) {
|
|
211
211
|
const n = Math.min(0, ...t), s = Math.max(0, ...t), o = (a == null ? void 0 : a.min) ?? n, i = (a == null ? void 0 : a.max) ?? s, c = r === "log" ? p.scaleSymlog().domain([o, i]).nice() : p.scaleLinear().domain([o, i]).nice(), f = c.ticks(), d = e ? ya(e) ?? c.tickFormat() : c.tickFormat(), g = f.map((m) => d(m));
|
|
212
212
|
if (g.length === 0)
|
|
@@ -245,7 +245,7 @@ function Or(t) {
|
|
|
245
245
|
return Math.max(...t.map((e) => e.length)) * 6 + kr + Lr;
|
|
246
246
|
}
|
|
247
247
|
function na(t, a, e, r, n, s) {
|
|
248
|
-
const o = {}, i = n ?? 50, c = r ?? "left", f = a ?? "auto", d = f === "auto" ? t > 0 && t <
|
|
248
|
+
const o = {}, i = n ?? 50, c = r ?? "left", f = a ?? "auto", d = f === "auto" ? t > 0 && t < $l ? "inside" : "outside" : f, g = d === "inside", b = d === "off";
|
|
249
249
|
return c === "right" ? (o.left = 0, g ? o.right = ds : b ? o.right = 0 : o.right = i) : (o.right = s !== !1 ? 15 : 0, g ? o.left = ds : b ? o.left = 0 : o.left = i), g && (o.top = 35), (s === !1 || e === "inside" || e === "off") && (o.bottom = 5), o;
|
|
250
250
|
}
|
|
251
251
|
function Ot(t) {
|
|
@@ -256,12 +256,12 @@ function Ot(t) {
|
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
function Wt(t, a) {
|
|
259
|
-
const e = { ...
|
|
259
|
+
const e = { ...kl, ...a }, r = t.closest(".bc-frame--constrained") != null;
|
|
260
260
|
if (r) {
|
|
261
261
|
const b = parseFloat(t.dataset.headerH || "0"), m = parseFloat(t.dataset.footerH || "0"), v = e.top;
|
|
262
262
|
e.top = b + v, e.bottom += m, e.stableTop = v;
|
|
263
263
|
}
|
|
264
|
-
const n = Ot(t), s = n.width > 0 ? n.width : Us, o = n.height > 0 ? n.height : js, i = s - e.left - e.right, c = o - e.top - e.bottom, f = new
|
|
264
|
+
const n = Ot(t), s = n.width > 0 ? n.width : Us, o = n.height > 0 ? n.height : js, i = s - e.left - e.right, c = o - e.top - e.bottom, f = new Ll(p.select(t));
|
|
265
265
|
f.config({ totalWidth: s, totalHeight: o }), f.draw([e]);
|
|
266
266
|
const d = t.querySelector("svg"), g = d.querySelector("g");
|
|
267
267
|
return r && (d.setAttribute("viewBox", `0 0 ${s} ${o}`), d.setAttribute("preserveAspectRatio", "none"), d.removeAttribute("width"), d.removeAttribute("height"), d.style.width = "100%", d.style.height = "100%", d.style.display = "block"), { svg: d, chartArea: g, width: i, height: c, margin: e };
|
|
@@ -269,10 +269,10 @@ function Wt(t, a) {
|
|
|
269
269
|
function Ma(t) {
|
|
270
270
|
return typeof window > "u" || typeof window.matchMedia != "function" ? t : window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0 : t;
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const Ra = 500;
|
|
273
273
|
let Zs = 0;
|
|
274
274
|
function qt(t) {
|
|
275
|
-
Zs = t ?
|
|
275
|
+
Zs = t ? Ra : 0;
|
|
276
276
|
}
|
|
277
277
|
function Ve() {
|
|
278
278
|
return Ma(Zs);
|
|
@@ -303,11 +303,11 @@ function wt(t, a, e, r) {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
function Vt(t, a) {
|
|
306
|
-
const e = Ma(a ??
|
|
306
|
+
const e = Ma(a ?? Ra);
|
|
307
307
|
e <= 0 || typeof t.animate != "function" || t.animate([{ opacity: 0 }, { opacity: 1 }], { duration: e, easing: "ease-in-out" });
|
|
308
308
|
}
|
|
309
309
|
function _t(t, a) {
|
|
310
|
-
const e = Ma(a ??
|
|
310
|
+
const e = Ma(a ?? Ra);
|
|
311
311
|
if (t.querySelectorAll("[data-bc-fade-overlay]").forEach((n) => {
|
|
312
312
|
typeof n.getAnimations == "function" && n.getAnimations().forEach((s) => s.cancel()), n.remove();
|
|
313
313
|
}), e <= 0 || t.children.length === 0)
|
|
@@ -326,7 +326,7 @@ function _t(t, a) {
|
|
|
326
326
|
}), r;
|
|
327
327
|
}
|
|
328
328
|
function Gt(t, a, e) {
|
|
329
|
-
const r = Ma(e ??
|
|
329
|
+
const r = Ma(e ?? Ra);
|
|
330
330
|
if (getComputedStyle(t).position === "static" && (t.style.position = "relative"), t.appendChild(a), r > 0 && typeof a.animate == "function") {
|
|
331
331
|
const s = a.animate(
|
|
332
332
|
[{ opacity: 1 }, { opacity: 0 }],
|
|
@@ -418,11 +418,11 @@ class Qs extends dt {
|
|
|
418
418
|
const a = this.config("gridStyle"), e = this.config("gridWidth"), r = this.config("direction"), n = this.base.select(".bc-axis-vertical").node();
|
|
419
419
|
if (n && a !== tt.None && e > 0) {
|
|
420
420
|
const s = r === Ft.Right ? -e : e;
|
|
421
|
-
|
|
421
|
+
Cl(n, a, s);
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Cl(t, a, e) {
|
|
426
426
|
var i;
|
|
427
427
|
const r = ((i = t.ownerSVGElement) == null ? void 0 : i.parentElement) ?? document.documentElement, s = getComputedStyle(r).getPropertyValue("--bc-grid-color").trim() || "#ccc";
|
|
428
428
|
p.select(t).selectAll(".tick").each(function() {
|
|
@@ -430,7 +430,7 @@ function $l(t, a, e) {
|
|
|
430
430
|
a === tt.Dashed ? f.attr("stroke-dasharray", "4,4") : a === tt.Dotted && f.attr("stroke-dasharray", "1,3");
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function su(t, a, e, r = {}, n) {
|
|
434
434
|
const s = r.direction ?? Ft.Left, o = new Qs(p.select(t));
|
|
435
435
|
if (n) {
|
|
436
436
|
n.querySelectorAll(".bc-grid-line").forEach((f) => f.remove());
|
|
@@ -454,15 +454,15 @@ function nu(t, a, e, r = {}, n) {
|
|
|
454
454
|
const i = t.querySelector(".bc-axis-vertical");
|
|
455
455
|
return i && s === Ft.Right && i.setAttribute("transform", `translate(${r.gridWidth ?? 0},0)`), i;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Ml(t) {
|
|
458
458
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
459
459
|
}
|
|
460
|
-
var Ar = { exports: {} },
|
|
461
|
-
function
|
|
460
|
+
var Ar = { exports: {} }, Ol = Ar.exports, hs;
|
|
461
|
+
function Pl() {
|
|
462
462
|
return hs || (hs = 1, (function(t, a) {
|
|
463
463
|
(function(e, r) {
|
|
464
464
|
t.exports = r();
|
|
465
|
-
})(
|
|
465
|
+
})(Ol, (function() {
|
|
466
466
|
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, s = /\d\d/, o = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, c = {}, f = function(x) {
|
|
467
467
|
return (x = +x) + (x > 68 ? 1900 : 2e3);
|
|
468
468
|
}, d = function(x) {
|
|
@@ -520,8 +520,8 @@ function Ol() {
|
|
|
520
520
|
A = x, L = c && c.formats;
|
|
521
521
|
for (var w = (x = A.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(Z, _, ae) {
|
|
522
522
|
var ie = ae && ae.toUpperCase();
|
|
523
|
-
return _ || L[ae] || e[ae] || L[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(re, F,
|
|
524
|
-
return F ||
|
|
523
|
+
return _ || L[ae] || e[ae] || L[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(re, F, R) {
|
|
524
|
+
return F || R.slice(1);
|
|
525
525
|
}));
|
|
526
526
|
}))).match(r), T = w.length, I = 0; I < T; I += 1) {
|
|
527
527
|
var E = w[I], j = v[E], B = j && j[0], V = j && j[1];
|
|
@@ -532,8 +532,8 @@ function Ol() {
|
|
|
532
532
|
var re = w[ae];
|
|
533
533
|
if (typeof re == "string") ie += re.length;
|
|
534
534
|
else {
|
|
535
|
-
var F = re.regex,
|
|
536
|
-
|
|
535
|
+
var F = re.regex, R = re.parser, W = Z.slice(ie), oe = F.exec(W)[0];
|
|
536
|
+
R.call(_, oe), Z = Z.replace(oe, "");
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
return (function(le) {
|
|
@@ -567,9 +567,9 @@ function Ol() {
|
|
|
567
567
|
})(E, V, j, L), this.init(), ie && ie !== !0 && (this.$L = this.locale(ie).$L), ae && E != this.format(V) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
|
|
568
568
|
} else if (V instanceof Array) for (var re = V.length, F = 1; F <= re; F += 1) {
|
|
569
569
|
B[1] = V[F - 1];
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
this.$d =
|
|
570
|
+
var R = L.apply(this, B);
|
|
571
|
+
if (R.isValid()) {
|
|
572
|
+
this.$d = R.$d, this.$L = R.$L, this.init();
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
575
|
F === re && (this.$d = /* @__PURE__ */ new Date(""));
|
|
@@ -580,9 +580,9 @@ function Ol() {
|
|
|
580
580
|
}));
|
|
581
581
|
})(Ar)), Ar.exports;
|
|
582
582
|
}
|
|
583
|
-
var
|
|
584
|
-
const
|
|
585
|
-
Ga.extend(
|
|
583
|
+
var Tl = Pl();
|
|
584
|
+
const zl = /* @__PURE__ */ Ml(Tl);
|
|
585
|
+
Ga.extend(zl);
|
|
586
586
|
const Js = [
|
|
587
587
|
"YYYY-MM-DDTHH:mm:ss",
|
|
588
588
|
"YYYY-MM-DD HH:mm",
|
|
@@ -601,7 +601,7 @@ const Js = [
|
|
|
601
601
|
"YYYY/MM",
|
|
602
602
|
"YYYY"
|
|
603
603
|
];
|
|
604
|
-
function
|
|
604
|
+
function Dl(t) {
|
|
605
605
|
return t.includes("HH") || t.includes("mm") || t.includes("ss") ? "datetime" : t.includes("DD") || new RegExp("(?<![MA-Z])D(?!D)").test(t) ? "day" : t === "YYYY" ? "year" : t.includes("MM") || t.includes("MMM") || t.includes("MMMM") || t.includes("M/") ? "month" : "day";
|
|
606
606
|
}
|
|
607
607
|
function $r(t) {
|
|
@@ -615,7 +615,7 @@ function $r(t) {
|
|
|
615
615
|
t.millisecond()
|
|
616
616
|
));
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function El(t) {
|
|
619
619
|
const a = t.trim();
|
|
620
620
|
if (!a)
|
|
621
621
|
return null;
|
|
@@ -636,7 +636,7 @@ function tr(t) {
|
|
|
636
636
|
const a = t.trim();
|
|
637
637
|
if (!a)
|
|
638
638
|
return;
|
|
639
|
-
const e =
|
|
639
|
+
const e = El(a);
|
|
640
640
|
if (e)
|
|
641
641
|
return e.getTime();
|
|
642
642
|
const r = parseFloat(a);
|
|
@@ -684,10 +684,10 @@ function Pr(t) {
|
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
return e ? { dates: a, granularity:
|
|
687
|
+
return e ? { dates: a, granularity: Dl(e) } : null;
|
|
688
688
|
}
|
|
689
|
-
const
|
|
690
|
-
function
|
|
689
|
+
const Fl = 60, er = 10, dn = 1.3, Nl = 12, Il = 3, Bl = 14, Vl = 10;
|
|
690
|
+
function _l(t, a, e = Il) {
|
|
691
691
|
if (t === "")
|
|
692
692
|
return [""];
|
|
693
693
|
if (t.length * er <= a)
|
|
@@ -708,7 +708,7 @@ function Vl(t, a, e = Nl) {
|
|
|
708
708
|
}
|
|
709
709
|
return s && n.push(s), n.length > e ? null : n;
|
|
710
710
|
}
|
|
711
|
-
const
|
|
711
|
+
const Gl = {
|
|
712
712
|
year: "%Y",
|
|
713
713
|
month: "%b %Y",
|
|
714
714
|
day: "%b %-d, %Y",
|
|
@@ -734,7 +734,7 @@ function ei(t, a) {
|
|
|
734
734
|
if (t)
|
|
735
735
|
return ya(t) ?? p.format(t);
|
|
736
736
|
if (e) {
|
|
737
|
-
const r = p.timeFormat(
|
|
737
|
+
const r = p.timeFormat(Gl[e.granularity] ?? "%Y-%m-%d"), n = /* @__PURE__ */ new Map();
|
|
738
738
|
return a.forEach((s, o) => n.set(s, e.dates[o])), (s) => {
|
|
739
739
|
if (s instanceof Date)
|
|
740
740
|
return r(s);
|
|
@@ -752,7 +752,7 @@ function rr(t, a) {
|
|
|
752
752
|
}
|
|
753
753
|
return e;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Yl(t, a, e) {
|
|
756
756
|
if (t.length <= 1)
|
|
757
757
|
return t;
|
|
758
758
|
const r = e ? rr(t, e) : t.reduce((f, d) => Math.max(f, d.length), 0) * er, n = Math.max(16, Math.ceil(r) + 8), s = Math.max(2, Math.floor(a / n));
|
|
@@ -761,7 +761,7 @@ function Gl(t, a, e) {
|
|
|
761
761
|
const o = Math.ceil(t.length / s), i = t.filter((f, d) => d % o === 0), c = t[t.length - 1];
|
|
762
762
|
return i[i.length - 1] !== c && i.push(c), i;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Rl(t, a, e, r) {
|
|
765
765
|
if (t.length <= 1 || a <= 0 || e === "horizontal")
|
|
766
766
|
return !1;
|
|
767
767
|
if (e === "vertical")
|
|
@@ -775,13 +775,13 @@ function Hl(t, a) {
|
|
|
775
775
|
if (t.length === 0)
|
|
776
776
|
return 0;
|
|
777
777
|
const e = rr(t, a ?? null);
|
|
778
|
-
return Math.ceil(e) +
|
|
778
|
+
return Math.ceil(e) + Nl;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Wl(t) {
|
|
781
781
|
let a = 1;
|
|
782
782
|
for (const e of t)
|
|
783
783
|
e.length > a && (a = e.length);
|
|
784
|
-
return a <= 1 ? 0 : a *
|
|
784
|
+
return a <= 1 ? 0 : a * Bl + Vl;
|
|
785
785
|
}
|
|
786
786
|
function un(t, a, e = {}, r = 24) {
|
|
787
787
|
if (t.length === 0 || a <= 0 || e.labelPosition === "off" || e.labelPosition === "inside")
|
|
@@ -792,12 +792,12 @@ function un(t, a, e = {}, r = 24) {
|
|
|
792
792
|
if (s !== "vertical" && b) {
|
|
793
793
|
const m = ti(t, d, n);
|
|
794
794
|
if (m) {
|
|
795
|
-
const v =
|
|
795
|
+
const v = Wl(Array.from(m.values()));
|
|
796
796
|
return v > r ? v : void 0;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
-
if (!
|
|
800
|
+
if (!Rl(t, a, s, n))
|
|
801
801
|
return;
|
|
802
802
|
const c = Hl(t, n);
|
|
803
803
|
return c > r ? c : void 0;
|
|
@@ -806,14 +806,14 @@ function ti(t, a, e) {
|
|
|
806
806
|
const r = /* @__PURE__ */ new Map();
|
|
807
807
|
let n = !1;
|
|
808
808
|
for (const s of t) {
|
|
809
|
-
const o = e ? e(s) : s, i =
|
|
809
|
+
const o = e ? e(s) : s, i = _l(o, a);
|
|
810
810
|
if (i === null)
|
|
811
811
|
return null;
|
|
812
812
|
r.set(s, i), i.length > 1 && (n = !0);
|
|
813
813
|
}
|
|
814
814
|
return n ? r : null;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function ql(t, a) {
|
|
817
817
|
t.selectAll(".tick").each(function() {
|
|
818
818
|
const e = p.select(this), r = e.datum(), n = r instanceof Date ? r.toISOString() : String(r), s = a.get(n);
|
|
819
819
|
if (!s || s.length <= 1)
|
|
@@ -863,11 +863,11 @@ class ai extends dt {
|
|
|
863
863
|
if (!T && f > 0)
|
|
864
864
|
if (y) {
|
|
865
865
|
if (A) {
|
|
866
|
-
const Z =
|
|
866
|
+
const Z = Yl(x, f, v);
|
|
867
867
|
Z.length < x.length && (T = Z);
|
|
868
868
|
}
|
|
869
869
|
} else {
|
|
870
|
-
const Z = Math.max(2, Math.floor(f /
|
|
870
|
+
const Z = Math.max(2, Math.floor(f / Fl));
|
|
871
871
|
m.ticks(Z);
|
|
872
872
|
}
|
|
873
873
|
T && m.tickValues(T);
|
|
@@ -890,14 +890,14 @@ class ai extends dt {
|
|
|
890
890
|
}
|
|
891
891
|
this.config("showTicks") || B.selectAll(".tick line").remove();
|
|
892
892
|
const V = i === "auto" ? "outside" : i;
|
|
893
|
-
V === "off" ? B.selectAll(".tick text").remove() : V === "inside" && B.selectAll(".tick text").attr("y", 0).attr("dy", "-0.6em"), w && V !== "off" ? B.selectAll(".tick text").attr("transform", "rotate(-90)").attr("text-anchor", "end").attr("x", s === "above" ? 9 : -9).attr("y", 0).attr("dy", "0.32em") : B.selectAll(".tick text").attr("transform", null), L && V !== "off" &&
|
|
893
|
+
V === "off" ? B.selectAll(".tick text").remove() : V === "inside" && B.selectAll(".tick text").attr("y", 0).attr("dy", "-0.6em"), w && V !== "off" ? B.selectAll(".tick text").attr("transform", "rotate(-90)").attr("text-anchor", "end").attr("x", s === "above" ? 9 : -9).attr("y", 0).attr("dy", "0.32em") : B.selectAll(".tick text").attr("transform", null), L && V !== "off" && ql(B, L);
|
|
894
894
|
}
|
|
895
895
|
postDraw() {
|
|
896
896
|
const a = this.config("gridStyle"), e = this.config("height"), r = this.base.select(".bc-axis-horizontal").node();
|
|
897
|
-
r && a !== "none" && e > 0 &&
|
|
897
|
+
r && a !== "none" && e > 0 && Xl(r, a, e);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Xl(t, a, e) {
|
|
901
901
|
var i;
|
|
902
902
|
const r = ((i = t.ownerSVGElement) == null ? void 0 : i.parentElement) ?? document.documentElement, s = getComputedStyle(r).getPropertyValue("--bc-grid-color").trim() || "#ccc";
|
|
903
903
|
p.select(t).selectAll(".tick").each(function() {
|
|
@@ -905,7 +905,7 @@ function ql(t, a, e) {
|
|
|
905
905
|
a === "dashed" ? f.attr("stroke-dasharray", "4,4") : a === "dotted" && f.attr("stroke-dasharray", "1,3");
|
|
906
906
|
});
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function iu(t, a, e, r = {}, n) {
|
|
909
909
|
const s = new ai(p.select(t));
|
|
910
910
|
if (n) {
|
|
911
911
|
n.querySelectorAll(".bc-grid-line").forEach((c) => c.remove());
|
|
@@ -939,8 +939,8 @@ const ri = [
|
|
|
939
939
|
"#edc948",
|
|
940
940
|
"#b07aa1",
|
|
941
941
|
"#ff9da7"
|
|
942
|
-
],
|
|
943
|
-
class
|
|
942
|
+
], Ul = 200, gs = 0.2;
|
|
943
|
+
class jl extends dt {
|
|
944
944
|
initialize() {
|
|
945
945
|
this.configDefine("colors", { defaultValue: ri }), this.configDefine("yOffset", { defaultValue: -10 }), this.configDefine("layout", { defaultValue: "horizontal" }), this.configDefine("valueSuffixes", { defaultValue: [] }), this.configDefine("maxWidth", { defaultValue: 0 });
|
|
946
946
|
const a = this.base.append("g").attr("class", "bc-legend"), e = (r) => {
|
|
@@ -973,7 +973,7 @@ class Ul extends dt {
|
|
|
973
973
|
this.base.select(".bc-legend").attr("transform", `translate(0,${a})`);
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function Zl(t) {
|
|
977
977
|
const a = p.select(t).selectAll(".bc-legend-item");
|
|
978
978
|
if (a.empty())
|
|
979
979
|
return;
|
|
@@ -996,13 +996,13 @@ function jl(t) {
|
|
|
996
996
|
}
|
|
997
997
|
a.on("mouseenter.bcHighlight", null).on("mouseleave.bcHighlight", null).on("mouseenter.bcHighlight", function() {
|
|
998
998
|
const o = p.select(this).attr("data-series") ?? "";
|
|
999
|
-
e && clearTimeout(e), e = setTimeout(() => n(o), Ma(
|
|
999
|
+
e && clearTimeout(e), e = setTimeout(() => n(o), Ma(Ul));
|
|
1000
1000
|
}).on("mouseleave.bcHighlight", () => {
|
|
1001
1001
|
e && (clearTimeout(e), e = null), r !== null && s();
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
1004
|
function xa(t, a, e = ri, r = -10, n = "top", s = "start", o = 0, i = 0, c = 0, f = [], d = {}) {
|
|
1005
|
-
const g = n === "left" || n === "right" ? "vertical" : "horizontal", b = new
|
|
1005
|
+
const g = n === "left" || n === "right" ? "vertical" : "horizontal", b = new jl(p.select(t));
|
|
1006
1006
|
b.config({ colors: e, yOffset: r, layout: g, valueSuffixes: f, maxWidth: o }), b.draw(a);
|
|
1007
1007
|
const m = t.querySelector(".bc-legend");
|
|
1008
1008
|
if (m) {
|
|
@@ -1023,7 +1023,7 @@ function xa(t, a, e = ri, r = -10, n = "top", s = "start", o = 0, i = 0, c = 0,
|
|
|
1023
1023
|
let w = c, T = r;
|
|
1024
1024
|
g === "horizontal" ? s === "middle" ? w += -A + (o + A + L - v) / 2 : s === "end" ? w += o + L - v : w += -A : s === "middle" ? T += (i - y) / 2 : s === "end" && (T += i - y), m.setAttribute("transform", `translate(${w},${T})`);
|
|
1025
1025
|
}
|
|
1026
|
-
return
|
|
1026
|
+
return Zl(t), m;
|
|
1027
1027
|
}
|
|
1028
1028
|
const ni = [
|
|
1029
1029
|
{ name: "Blueprint", label: "Blueprint", colors: ["#2563A0", "#D4A63A", "#C94044", "#2D8659", "#4B90CF", "#163A65"] },
|
|
@@ -1077,16 +1077,16 @@ const ni = [
|
|
|
1077
1077
|
{ name: "Wizards", label: "Wizards", colors: ["#c8102e", "#0c2340", "#8d9093", "#c8c9c7"] },
|
|
1078
1078
|
{ name: "FrancescoXanto", label: "Xanto", colors: ["#2c6aa5", "#d9ae2c", "#ddc655", "#d88c27", "#64894d"] },
|
|
1079
1079
|
{ name: "Zeppelin", label: "Zeppelin", colors: ["#efdb15", "#739c9c", "#0d484c", "#c71a08"] }
|
|
1080
|
-
],
|
|
1080
|
+
], Ql = Object.fromEntries(
|
|
1081
1081
|
ni.map((t) => [t.name, t.colors])
|
|
1082
1082
|
);
|
|
1083
|
-
function
|
|
1083
|
+
function Jl(t) {
|
|
1084
1084
|
if (!t)
|
|
1085
1085
|
return;
|
|
1086
|
-
const a =
|
|
1086
|
+
const a = Ql[t];
|
|
1087
1087
|
return a ? [...a] : void 0;
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Kl() {
|
|
1090
1090
|
return ni;
|
|
1091
1091
|
}
|
|
1092
1092
|
function Tr(t, a) {
|
|
@@ -1108,7 +1108,7 @@ function Oa(t) {
|
|
|
1108
1108
|
const a = Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : sn;
|
|
1109
1109
|
return a / (a + 100);
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Ha(t, a, e) {
|
|
1112
1112
|
let r = 0, n = 0, s = 1 / 0, o = !0, i = !1;
|
|
1113
1113
|
for (const d of t)
|
|
1114
1114
|
Number.isFinite(d) && (i = !0, d < r && (r = d), d > n && (n = d), d <= 0 ? o = !1 : d < s && (s = d));
|
|
@@ -1123,7 +1123,7 @@ function Ra(t, a, e) {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
return [c, f];
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function ec(t) {
|
|
1127
1127
|
return typeof t.step == "function";
|
|
1128
1128
|
}
|
|
1129
1129
|
const pr = /* @__PURE__ */ new WeakMap();
|
|
@@ -1228,7 +1228,7 @@ class Yt {
|
|
|
1228
1228
|
return;
|
|
1229
1229
|
}
|
|
1230
1230
|
this.hGroup.style.display = "";
|
|
1231
|
-
const e = a.options, r = a.scale, n =
|
|
1231
|
+
const e = a.options, r = a.scale, n = ec(r) ? r.domain() : [];
|
|
1232
1232
|
this.hChart.config({
|
|
1233
1233
|
scale: r,
|
|
1234
1234
|
height: a.height,
|
|
@@ -1254,7 +1254,7 @@ class Yt {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
1256
|
const si = "bc-tooltip";
|
|
1257
|
-
function
|
|
1257
|
+
function tc() {
|
|
1258
1258
|
if (document.getElementById("bc-tooltip-styles"))
|
|
1259
1259
|
return;
|
|
1260
1260
|
const t = document.createElement("style");
|
|
@@ -1274,7 +1274,7 @@ function ec() {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
`, document.head.appendChild(t);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function ac(t) {
|
|
1278
1278
|
const a = t ? ya(t) : null, e = (r) => typeof r == "number" && a ? a(r) : String(r);
|
|
1279
1279
|
return (r) => {
|
|
1280
1280
|
if (r && typeof r == "object") {
|
|
@@ -1292,13 +1292,13 @@ function tc(t) {
|
|
|
1292
1292
|
};
|
|
1293
1293
|
}
|
|
1294
1294
|
function Aa(t) {
|
|
1295
|
-
const a = (t == null ? void 0 : t.format) ??
|
|
1295
|
+
const a = (t == null ? void 0 : t.format) ?? ac(t == null ? void 0 : t.numberFormat);
|
|
1296
1296
|
let e = null;
|
|
1297
1297
|
const r = [];
|
|
1298
1298
|
return {
|
|
1299
1299
|
name: "tooltip",
|
|
1300
1300
|
install() {
|
|
1301
|
-
|
|
1301
|
+
tc(), e = document.createElement("div"), e.className = si, document.body.appendChild(e);
|
|
1302
1302
|
},
|
|
1303
1303
|
postDraw(n) {
|
|
1304
1304
|
n.base.selectAll(".bc-bar, .bc-dot, .bc-arc").each(function() {
|
|
@@ -1308,7 +1308,7 @@ function Aa(t) {
|
|
|
1308
1308
|
const d = p.select(i).datum();
|
|
1309
1309
|
e.textContent = a(d), e.style.display = "block", Ys(i, e, {
|
|
1310
1310
|
placement: "top",
|
|
1311
|
-
middleware: [
|
|
1311
|
+
middleware: [Rs(8), Hs(), Ws()]
|
|
1312
1312
|
}).then(({ x: g, y: b }) => {
|
|
1313
1313
|
e && (e.style.left = `${g}px`, e.style.top = `${b}px`);
|
|
1314
1314
|
});
|
|
@@ -1327,7 +1327,7 @@ function Aa(t) {
|
|
|
1327
1327
|
}
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function rc(t) {
|
|
1331
1331
|
switch (t) {
|
|
1332
1332
|
case ta.Solid:
|
|
1333
1333
|
return "none";
|
|
@@ -1339,7 +1339,7 @@ function ac(t) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
function Pa(t) {
|
|
1342
|
-
const a = (t == null ? void 0 : t.color) ?? "#999", e = (t == null ? void 0 : t.dashArray) ??
|
|
1342
|
+
const a = (t == null ? void 0 : t.color) ?? "#999", e = (t == null ? void 0 : t.dashArray) ?? rc(t == null ? void 0 : t.style), r = (t == null ? void 0 : t.direction) ?? yt.Both, n = (t == null ? void 0 : t.orientation) ?? ot.Vertical, s = [];
|
|
1343
1343
|
return {
|
|
1344
1344
|
name: "crosshair",
|
|
1345
1345
|
install() {
|
|
@@ -1419,7 +1419,7 @@ const va = {
|
|
|
1419
1419
|
center: { nx: 0, ny: 0 }
|
|
1420
1420
|
};
|
|
1421
1421
|
et.N + "", et.W, et.NE + "", et.NW, et.E + "", et.N, et.SE + "", et.NE, et.S + "", et.E, et.SW + "", et.SE, et.W + "", et.S, et.NW + "", et.SW, et.Center + "", et.Center;
|
|
1422
|
-
function
|
|
1422
|
+
function nc(t, a) {
|
|
1423
1423
|
const e = va[t] ?? va.NW;
|
|
1424
1424
|
return { dx: e.dx * a, dy: e.dy * a };
|
|
1425
1425
|
}
|
|
@@ -1446,7 +1446,7 @@ function bs(t, a) {
|
|
|
1446
1446
|
y: r + n.ny * (a.bottom - a.top) / 2
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function sc(t, a, e, r, n) {
|
|
1450
1450
|
if ("bandwidth" in a) {
|
|
1451
1451
|
const f = a, d = f(t.label) ?? 0, g = f.bandwidth(), b = e(t.value), m = e(0);
|
|
1452
1452
|
return n === "horizontal" ? bs(r, { left: m, right: b, top: d, bottom: d + g }) : bs(r, { left: d, right: d + g, top: b, bottom: m });
|
|
@@ -1454,7 +1454,7 @@ function nc(t, a, e, r, n) {
|
|
|
1454
1454
|
const s = oi(a, t.label), o = e(t.value), i = 2, c = va[r] ?? va.N;
|
|
1455
1455
|
return { x: s + c.dx * i, y: o + c.dy * i };
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function ic(t, a, e, r = 4) {
|
|
1458
1458
|
const n = t.x + t.width / 2, s = t.y + t.height / 2;
|
|
1459
1459
|
if (a === n && e === s)
|
|
1460
1460
|
return { x: n, y: s };
|
|
@@ -1483,7 +1483,7 @@ function pn(t, a) {
|
|
|
1483
1483
|
const e = a ?? "#666", r = `bc-arrow-${e.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
1484
1484
|
return t.querySelector(`#${r}`) || (p.select(t).select("defs").empty() ? p.select(t).append("defs") : p.select(t).select("defs")).append("marker").attr("id", r).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 8).attr("markerHeight", 8).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 1 1 L 9 5 L 1 9").attr("fill", "none").attr("stroke", e).attr("stroke-width", 1.5).attr("stroke-linecap", "round").attr("stroke-linejoin", "round"), r;
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function oc(t) {
|
|
1487
1487
|
switch (t) {
|
|
1488
1488
|
case Sr.Dotted:
|
|
1489
1489
|
return "2,3";
|
|
@@ -1493,12 +1493,12 @@ function ic(t) {
|
|
|
1493
1493
|
return "";
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
function
|
|
1497
|
-
const n = t.append("circle").attr("class", "bc-annotation-circle").attr("cx", a).attr("cy", e).attr("r", r.size ?? 4).attr("fill", "none").attr("stroke", r.color ?? "#666").attr("stroke-width", 1.5), s =
|
|
1496
|
+
function lc(t, a, e, r = {}) {
|
|
1497
|
+
const n = t.append("circle").attr("class", "bc-annotation-circle").attr("cx", a).attr("cy", e).attr("r", r.size ?? 4).attr("fill", "none").attr("stroke", r.color ?? "#666").attr("stroke-width", 1.5), s = oc(r.style ?? Sr.Solid);
|
|
1498
1498
|
s && n.attr("stroke-dasharray", s);
|
|
1499
1499
|
}
|
|
1500
1500
|
const ms = 1 / Math.tan(40 * Math.PI / 180);
|
|
1501
|
-
function
|
|
1501
|
+
function cc(t, a, e) {
|
|
1502
1502
|
if (e) {
|
|
1503
1503
|
const s = a.y >= t.y ? 1 : -1, o = Math.max(Math.abs(a.y - t.y) - Math.abs(a.x - t.x) * ms, 12);
|
|
1504
1504
|
return { x: t.x, y: t.y + s * o };
|
|
@@ -1506,11 +1506,11 @@ function lc(t, a, e) {
|
|
|
1506
1506
|
const r = a.x >= t.x ? 1 : -1, n = Math.max(Math.abs(a.x - t.x) - Math.abs(a.y - t.y) * ms, 12);
|
|
1507
1507
|
return { x: t.x + r * n, y: t.y };
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1510
|
-
const r =
|
|
1509
|
+
function fc(t, a, e) {
|
|
1510
|
+
const r = cc(t, a, e);
|
|
1511
1511
|
return `M ${t.x} ${t.y} L ${r.x} ${r.y} L ${a.x} ${a.y}`;
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function dc(t, a, e, r = mt.Direct, n = {}) {
|
|
1514
1514
|
var c;
|
|
1515
1515
|
let s;
|
|
1516
1516
|
switch (r) {
|
|
@@ -1521,7 +1521,7 @@ function fc(t, a, e, r = mt.Direct, n = {}) {
|
|
|
1521
1521
|
break;
|
|
1522
1522
|
}
|
|
1523
1523
|
case mt.Elbow: {
|
|
1524
|
-
s =
|
|
1524
|
+
s = fc(a, e, n.departVertical ?? !1);
|
|
1525
1525
|
break;
|
|
1526
1526
|
}
|
|
1527
1527
|
default:
|
|
@@ -1540,14 +1540,14 @@ function bn(t, a, e, r, n = {}) {
|
|
|
1540
1540
|
`);
|
|
1541
1541
|
if (c.length > 1 || n.maxWidth && n.maxWidth > 0)
|
|
1542
1542
|
if (n.maxWidth && n.maxWidth > 0)
|
|
1543
|
-
|
|
1543
|
+
uc(i, a, n.maxWidth);
|
|
1544
1544
|
else
|
|
1545
1545
|
for (let f = 0; f < c.length; f++)
|
|
1546
1546
|
i.append("tspan").attr("x", i.attr("x")).attr("dy", f === 0 ? "0" : "1.2em").text(c[f]);
|
|
1547
1547
|
else
|
|
1548
1548
|
i.text(a);
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function uc(t, a, e) {
|
|
1551
1551
|
const r = a.split(/\s+/);
|
|
1552
1552
|
let n = "", s = 0;
|
|
1553
1553
|
for (const o of r) {
|
|
@@ -1584,7 +1584,7 @@ function mn(t, a) {
|
|
|
1584
1584
|
const e = String(t);
|
|
1585
1585
|
return e.endsWith("%") ? parseFloat(e) / 100 * a : parseFloat(e) || void 0;
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function hc(t) {
|
|
1588
1588
|
return t < -4 ? "end" : t > 4 ? "start" : "middle";
|
|
1589
1589
|
}
|
|
1590
1590
|
function vs(t, a, e) {
|
|
@@ -1603,26 +1603,26 @@ function li(t, a, e, r) {
|
|
|
1603
1603
|
return;
|
|
1604
1604
|
const o = t.append("g").attr("data-annotation-index", String(r));
|
|
1605
1605
|
a.id && o.attr("data-annotation-id", a.id);
|
|
1606
|
-
const i = a, c = i.anchorDirection ?? et.N, f =
|
|
1606
|
+
const i = a, c = i.anchorDirection ?? et.N, f = sc(s, e.scaleX, e.scaleY, c, e.orientation);
|
|
1607
1607
|
let d, g;
|
|
1608
1608
|
const b = a;
|
|
1609
1609
|
if (b.dx != null || b.dy != null) {
|
|
1610
1610
|
const { x: w, y: T } = vs(s, e.scaleX, e.scaleY);
|
|
1611
1611
|
d = w + (Number(b.dx) || 40), g = T + (Number(b.dy) || -40);
|
|
1612
1612
|
} else if (b.direction != null && b.textOffsetX == null) {
|
|
1613
|
-
const { x: w, y: T } = vs(s, e.scaleX, e.scaleY), I = b.direction, E = b.anchorDistance ?? 60, j =
|
|
1613
|
+
const { x: w, y: T } = vs(s, e.scaleX, e.scaleY), I = b.direction, E = b.anchorDistance ?? 60, j = nc(I, E);
|
|
1614
1614
|
d = w + j.dx, g = T + j.dy;
|
|
1615
1615
|
} else
|
|
1616
1616
|
d = f.x + (i.textOffsetX ?? -42), g = f.y + (i.textOffsetY ?? -42);
|
|
1617
1617
|
const m = a.circleColor ?? "#666", v = a;
|
|
1618
|
-
v.showCircle &&
|
|
1618
|
+
v.showCircle && lc(o, f.x, f.y, {
|
|
1619
1619
|
size: v.circleSize,
|
|
1620
1620
|
style: v.circleStyle,
|
|
1621
1621
|
color: m
|
|
1622
1622
|
});
|
|
1623
1623
|
const y = Math.max(4, Math.min(d, e.width - 4)), x = Math.max(4, Math.min(g, e.height - 4));
|
|
1624
1624
|
if (a.text) {
|
|
1625
|
-
const w =
|
|
1625
|
+
const w = hc(d - f.x);
|
|
1626
1626
|
bn(o, a.text, y, x - 4, {
|
|
1627
1627
|
textColor: a.textColor,
|
|
1628
1628
|
maxWidth: mn(a.maxWidth, e.width),
|
|
@@ -1638,7 +1638,7 @@ function li(t, a, e, r) {
|
|
|
1638
1638
|
try {
|
|
1639
1639
|
const V = I.getBBox();
|
|
1640
1640
|
if (V.width > 0 && V.height > 0) {
|
|
1641
|
-
w =
|
|
1641
|
+
w = ic(V, f.x, f.y);
|
|
1642
1642
|
const Z = V.x + V.width / 2;
|
|
1643
1643
|
T = Math.abs(w.x - Z) < 1;
|
|
1644
1644
|
}
|
|
@@ -1653,7 +1653,7 @@ function li(t, a, e, r) {
|
|
|
1653
1653
|
j = Math.abs(re.dx) > 0.01 ? ae : f.x, B = Math.abs(re.dy) > 0.01 ? ie : f.y;
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
|
-
|
|
1656
|
+
dc(o, w, { x: j, y: B }, i.lineStyle ?? mt.Direct, {
|
|
1657
1657
|
showArrow: i.showArrow,
|
|
1658
1658
|
lineWeight: i.lineWeight,
|
|
1659
1659
|
color: m,
|
|
@@ -1733,7 +1733,7 @@ function on(t, a, e, r) {
|
|
|
1733
1733
|
const n = e + 0.45 * (t - e);
|
|
1734
1734
|
return `M ${t} ${a} L ${n} ${a} L ${e} ${r}`;
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function gc(t, a) {
|
|
1737
1737
|
const e = t.hasAttribute("marker-end"), r = hn(t.parentElement);
|
|
1738
1738
|
if (e && r) {
|
|
1739
1739
|
const n = p.select(t), s = t.getAttribute("d"), o = `M ${r.fromX} ${r.fromY} L ${r.fromX} ${r.fromY}`;
|
|
@@ -1766,12 +1766,12 @@ function hc(t, a) {
|
|
|
1766
1766
|
});
|
|
1767
1767
|
}
|
|
1768
1768
|
const yr = 1;
|
|
1769
|
-
function
|
|
1769
|
+
function pc(t, a) {
|
|
1770
1770
|
return t.style !== a.style || t.departVertical !== a.departVertical ? !1 : Math.abs(t.fromX - a.fromX) <= yr && Math.abs(t.fromY - a.fromY) <= yr && Math.abs(t.toX - a.toX) <= yr && Math.abs(t.toY - a.toY) <= yr;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function bc(t, a, e) {
|
|
1773
1773
|
const r = hn(t.parentElement);
|
|
1774
|
-
if (!r ||
|
|
1774
|
+
if (!r || pc(a, r))
|
|
1775
1775
|
return;
|
|
1776
1776
|
const n = p.select(t);
|
|
1777
1777
|
if (a.style === mt.Elbow && r.style === mt.Elbow) {
|
|
@@ -1812,7 +1812,7 @@ function di(t, a, e, r) {
|
|
|
1812
1812
|
const c = e.get(i);
|
|
1813
1813
|
if (c) {
|
|
1814
1814
|
const f = o.querySelector(".bc-annotation-line");
|
|
1815
|
-
f && c.line &&
|
|
1815
|
+
f && c.line && bc(f, c.line, r);
|
|
1816
1816
|
try {
|
|
1817
1817
|
const d = o.getBBox(), g = c.rect.x - d.x, b = c.rect.y - d.y;
|
|
1818
1818
|
if (Math.abs(g) > 0.5 || Math.abs(b) > 0.5) {
|
|
@@ -1826,7 +1826,7 @@ function di(t, a, e, r) {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
} else {
|
|
1828
1828
|
const f = o.querySelector(".bc-annotation-line");
|
|
1829
|
-
f &&
|
|
1829
|
+
f && gc(f, r);
|
|
1830
1830
|
const d = o.querySelectorAll(".bc-annotation-text, .bc-annotation-circle");
|
|
1831
1831
|
for (const g of d) {
|
|
1832
1832
|
const b = g;
|
|
@@ -1888,7 +1888,7 @@ function zr(t, a, e) {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
}
|
|
1890
1890
|
if (e.transition) {
|
|
1891
|
-
const c = Ma(
|
|
1891
|
+
const c = Ma(Ra);
|
|
1892
1892
|
di(i.node(), o.node(), s ?? /* @__PURE__ */ new Map(), c);
|
|
1893
1893
|
}
|
|
1894
1894
|
ui(r);
|
|
@@ -1936,7 +1936,7 @@ function Wa(t, a) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
1938
|
if (a.transition) {
|
|
1939
|
-
const m = Ma(
|
|
1939
|
+
const m = Ma(Ra);
|
|
1940
1940
|
di(g.node(), d.node(), f ?? /* @__PURE__ */ new Map(), m);
|
|
1941
1941
|
}
|
|
1942
1942
|
ui(n);
|
|
@@ -1944,21 +1944,21 @@ function Wa(t, a) {
|
|
|
1944
1944
|
};
|
|
1945
1945
|
}
|
|
1946
1946
|
function hi(t, a) {
|
|
1947
|
-
if (!
|
|
1947
|
+
if (!He.valid(t))
|
|
1948
1948
|
return a;
|
|
1949
1949
|
try {
|
|
1950
|
-
return
|
|
1950
|
+
return He(t);
|
|
1951
1951
|
} catch {
|
|
1952
1952
|
return a;
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
function It(t) {
|
|
1956
|
-
return
|
|
1956
|
+
return He.valid(t) && He.contrast(t, "#fff") >= He.contrast(t, "#333") ? "#fff" : "#333";
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1959
|
-
return !
|
|
1958
|
+
function ou(t, a) {
|
|
1959
|
+
return !He.valid(t) || !He.valid(a) ? 1 : He.contrast(t, a);
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1961
|
+
function lu(t) {
|
|
1962
1962
|
return t >= 7 ? "AAA" : t >= 4.5 ? "AA" : "Fail";
|
|
1963
1963
|
}
|
|
1964
1964
|
const ar = 4.5;
|
|
@@ -1973,47 +1973,47 @@ function Bt(t) {
|
|
|
1973
1973
|
return "#fff";
|
|
1974
1974
|
}
|
|
1975
1975
|
function gi(t, a = "#fff") {
|
|
1976
|
-
if (!
|
|
1977
|
-
return
|
|
1978
|
-
let e =
|
|
1979
|
-
const r = hi(a,
|
|
1980
|
-
if (
|
|
1976
|
+
if (!He.valid(t))
|
|
1977
|
+
return He.valid(a) ? It(a) : "#333";
|
|
1978
|
+
let e = He(t);
|
|
1979
|
+
const r = hi(a, He("#fff"));
|
|
1980
|
+
if (He.contrast(e, r) >= ar)
|
|
1981
1981
|
return e.hex();
|
|
1982
1982
|
const n = r.luminance() > 0.5;
|
|
1983
|
-
for (let s = 0; s < 20 && (e = n ? e.darken(0.3) : e.brighten(0.3), !(
|
|
1983
|
+
for (let s = 0; s < 20 && (e = n ? e.darken(0.3) : e.brighten(0.3), !(He.contrast(e, r) >= ar)); s++)
|
|
1984
1984
|
;
|
|
1985
1985
|
return e.hex();
|
|
1986
1986
|
}
|
|
1987
1987
|
const yn = 12, Cr = 0.25, pi = 20;
|
|
1988
|
-
function
|
|
1988
|
+
function mc(t, a) {
|
|
1989
1989
|
if (t.length === 0)
|
|
1990
1990
|
return [];
|
|
1991
|
-
const e = hi(a,
|
|
1991
|
+
const e = hi(a, He("#fff")), r = He.valid(a) ? a : "#fff", n = e.luminance() > 0.5, s = t.map((o) => He.valid(o) ? yc(He(o), r, n) : He("#000"));
|
|
1992
1992
|
for (let o = 1; o < s.length; o++)
|
|
1993
|
-
|
|
1993
|
+
He.deltaE(s[o], s[o - 1]) >= yn || (s[o] = vc(s[o], s[o - 1], r, n));
|
|
1994
1994
|
return s.map((o) => o.hex());
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function yc(t, a, e) {
|
|
1997
1997
|
for (let r = 0; r < pi; r++) {
|
|
1998
|
-
if (
|
|
1998
|
+
if (He.contrast(t, a) >= ar)
|
|
1999
1999
|
return t;
|
|
2000
2000
|
t = e ? t.darken(Cr) : t.brighten(Cr);
|
|
2001
2001
|
}
|
|
2002
2002
|
return t;
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function vc(t, a, e, r) {
|
|
2005
2005
|
const n = xs(t, a, e, r);
|
|
2006
|
-
if (
|
|
2006
|
+
if (He.deltaE(n, a) >= yn)
|
|
2007
2007
|
return n;
|
|
2008
2008
|
const s = xs(t, a, e, !r);
|
|
2009
|
-
return
|
|
2009
|
+
return He.deltaE(s, a) > He.deltaE(n, a) && He.contrast(s, e) >= ar ? s : n;
|
|
2010
2010
|
}
|
|
2011
2011
|
function xs(t, a, e, r) {
|
|
2012
|
-
let n = t, s =
|
|
2012
|
+
let n = t, s = He.deltaE(t, a), o = t;
|
|
2013
2013
|
for (let i = 0; i < pi; i++) {
|
|
2014
2014
|
o = r ? o.darken(Cr) : o.brighten(Cr);
|
|
2015
|
-
const c =
|
|
2016
|
-
if (c > s &&
|
|
2015
|
+
const c = He.deltaE(o, a);
|
|
2016
|
+
if (c > s && He.contrast(o, e) >= ar && (n = o, s = c), s >= yn)
|
|
2017
2017
|
break;
|
|
2018
2018
|
}
|
|
2019
2019
|
return n;
|
|
@@ -2028,25 +2028,25 @@ function Xt(t) {
|
|
|
2028
2028
|
function Ut(t, a) {
|
|
2029
2029
|
bi.set(t, a);
|
|
2030
2030
|
}
|
|
2031
|
-
let
|
|
2031
|
+
let xc = 0;
|
|
2032
2032
|
const As = /* @__PURE__ */ new WeakMap();
|
|
2033
2033
|
function sa(t, a, e, r) {
|
|
2034
2034
|
let n = As.get(a);
|
|
2035
2035
|
n || (n = /* @__PURE__ */ new Map(), As.set(a, n));
|
|
2036
2036
|
let s = n.get(e);
|
|
2037
|
-
s || (s = `bc-clip-${++
|
|
2037
|
+
s || (s = `bc-clip-${++xc}`, n.set(e, s));
|
|
2038
2038
|
const o = p.select(t).select("defs").empty() ? p.select(t).append("defs") : p.select(t).select("defs"), i = o.select(`#${s}`);
|
|
2039
2039
|
return i.empty() ? o.append("clipPath").attr("id", s).append("rect").attr("x", r.x).attr("y", r.y).attr("width", r.width).attr("height", r.height) : i.select("rect").attr("x", r.x).attr("y", r.y).attr("width", r.width).attr("height", r.height), s;
|
|
2040
2040
|
}
|
|
2041
|
-
const wr = "bc-scene",
|
|
2041
|
+
const wr = "bc-scene", Ac = 500, ws = /* @__PURE__ */ new Set(), ln = /* @__PURE__ */ new WeakMap();
|
|
2042
2042
|
function Ta(t) {
|
|
2043
2043
|
let a = ln.get(t);
|
|
2044
|
-
return a || (a = new
|
|
2044
|
+
return a || (a = new Sc(t), ln.set(t, a)), a;
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function wc(t) {
|
|
2047
2047
|
ln.delete(t);
|
|
2048
2048
|
}
|
|
2049
|
-
class
|
|
2049
|
+
class Sc {
|
|
2050
2050
|
constructor(a) {
|
|
2051
2051
|
Jt(this, "container");
|
|
2052
2052
|
Jt(this, "_state", "idle");
|
|
@@ -2104,7 +2104,7 @@ class wc {
|
|
|
2104
2104
|
this._state = "idle";
|
|
2105
2105
|
return;
|
|
2106
2106
|
}
|
|
2107
|
-
const r = a.duration ??
|
|
2107
|
+
const r = a.duration ?? Ac, n = this.effectiveDuration(r), s = this._buffer;
|
|
2108
2108
|
if (this._buffer = [], n <= 0) {
|
|
2109
2109
|
this._state = "animating";
|
|
2110
2110
|
for (const i of s)
|
|
@@ -2172,17 +2172,17 @@ class wc {
|
|
|
2172
2172
|
* returns a new instance. Idempotent.
|
|
2173
2173
|
*/
|
|
2174
2174
|
destroy() {
|
|
2175
|
-
this.interrupt(),
|
|
2175
|
+
this.interrupt(), wc(this.container);
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
|
-
function
|
|
2178
|
+
function kc(t, a) {
|
|
2179
2179
|
const e = /* @__PURE__ */ new Map();
|
|
2180
2180
|
return t.querySelectorAll(`[data-bc-role="${a}"]`).forEach((n) => {
|
|
2181
2181
|
const s = n.getAttribute("data-bc-key");
|
|
2182
2182
|
s != null && e.set(s, n);
|
|
2183
2183
|
}), e;
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function Lc(t, a) {
|
|
2186
2186
|
return t.tagName === a.tagName;
|
|
2187
2187
|
}
|
|
2188
2188
|
function Ss(t, a) {
|
|
@@ -2194,15 +2194,15 @@ function Ss(t, a) {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
return e;
|
|
2196
2196
|
}
|
|
2197
|
-
const
|
|
2197
|
+
const $c = { opacity: 0 };
|
|
2198
2198
|
function qa(t, a) {
|
|
2199
2199
|
if (t.state === "idle" || t.state === "animating") {
|
|
2200
|
-
|
|
2200
|
+
Cc(a);
|
|
2201
2201
|
return;
|
|
2202
2202
|
}
|
|
2203
|
-
t.register(() =>
|
|
2203
|
+
t.register(() => Mc(t, a));
|
|
2204
2204
|
}
|
|
2205
|
-
function
|
|
2205
|
+
function Cc(t) {
|
|
2206
2206
|
const e = p.select(t.parent).selectAll(t.selector).data(t.data, (s) => t.key(s));
|
|
2207
2207
|
e.exit().remove();
|
|
2208
2208
|
const r = t.insert(e.enter());
|
|
@@ -2210,27 +2210,27 @@ function $c(t) {
|
|
|
2210
2210
|
Ja(this, t.attrs(s));
|
|
2211
2211
|
});
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2214
|
-
const e = t.activeTransition, n = p.select(a.parent).selectAll(a.selector).data(a.data, (f) => a.key(f)), s =
|
|
2213
|
+
function Mc(t, a) {
|
|
2214
|
+
const e = t.activeTransition, n = p.select(a.parent).selectAll(a.selector).data(a.data, (f) => a.key(f)), s = Oc(a), o = n.exit();
|
|
2215
2215
|
e ? o.each(function() {
|
|
2216
|
-
const f = this, d = p.select(f).datum(), g = a.exitTo ? a.exitTo(d) :
|
|
2216
|
+
const f = this, d = p.select(f).datum(), g = a.exitTo ? a.exitTo(d) : $c;
|
|
2217
2217
|
vr(f, g, e).on("end.featureJoin-exit", () => {
|
|
2218
2218
|
var b;
|
|
2219
2219
|
return (b = f.parentNode) == null ? void 0 : b.removeChild(f);
|
|
2220
2220
|
});
|
|
2221
2221
|
}) : o.remove();
|
|
2222
|
-
const i =
|
|
2222
|
+
const i = kc(t.container, a.role), c = a.insert(n.enter());
|
|
2223
2223
|
mi(c, a), c.each(function(f) {
|
|
2224
2224
|
const d = this, g = a.attrs(f);
|
|
2225
2225
|
if (e) {
|
|
2226
|
-
const b = a.key(f)
|
|
2227
|
-
if (
|
|
2228
|
-
const
|
|
2229
|
-
Ja(d,
|
|
2226
|
+
const b = i.get(yi(a.key(f)));
|
|
2227
|
+
if (b && Lc(b, d)) {
|
|
2228
|
+
const v = Ss(b, s);
|
|
2229
|
+
Ja(d, v), vr(d, g, e);
|
|
2230
2230
|
return;
|
|
2231
2231
|
}
|
|
2232
|
-
const
|
|
2233
|
-
Ja(d,
|
|
2232
|
+
const m = a.enterFrom ? a.enterFrom(f) : g;
|
|
2233
|
+
Ja(d, m), vr(d, g, e);
|
|
2234
2234
|
} else
|
|
2235
2235
|
Ja(d, g);
|
|
2236
2236
|
}), n.each(function(f) {
|
|
@@ -2239,9 +2239,12 @@ function Cc(t, a) {
|
|
|
2239
2239
|
});
|
|
2240
2240
|
}
|
|
2241
2241
|
function mi(t, a) {
|
|
2242
|
-
t.attr("data-bc-role", a.role), t.attr("data-bc-key", (e) => a.key(e));
|
|
2242
|
+
t.attr("data-bc-role", a.role), t.attr("data-bc-key", (e) => yi(a.key(e)));
|
|
2243
2243
|
}
|
|
2244
|
-
function
|
|
2244
|
+
function yi(t) {
|
|
2245
|
+
return t.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g, "␟");
|
|
2246
|
+
}
|
|
2247
|
+
function Oc(t) {
|
|
2245
2248
|
return t.data.length === 0 ? [] : Object.keys(t.attrs(t.data[0]));
|
|
2246
2249
|
}
|
|
2247
2250
|
function Ja(t, a) {
|
|
@@ -2254,19 +2257,19 @@ function vr(t, a, e) {
|
|
|
2254
2257
|
r.attr(n, String(s));
|
|
2255
2258
|
return r;
|
|
2256
2259
|
}
|
|
2257
|
-
const
|
|
2260
|
+
const Pc = 0.35;
|
|
2258
2261
|
function Xa(t) {
|
|
2259
2262
|
return new Set((t ?? []).map((a) => a.target));
|
|
2260
2263
|
}
|
|
2261
2264
|
function at(t, a, e = 1) {
|
|
2262
|
-
return t.size === 0 || t.has(a) ? e :
|
|
2265
|
+
return t.size === 0 || t.has(a) ? e : Pc;
|
|
2263
2266
|
}
|
|
2264
2267
|
const Na = ["#4e79a7"], ks = 13;
|
|
2265
|
-
class
|
|
2268
|
+
class Tc extends dt {
|
|
2266
2269
|
initialize() {
|
|
2267
2270
|
}
|
|
2268
2271
|
}
|
|
2269
|
-
function
|
|
2272
|
+
function vi(t, a, e = {}, r = !1) {
|
|
2270
2273
|
var Te, ze, Fe, J, X, Ae, $e, Le, we, Ee, Ne, k, M, C;
|
|
2271
2274
|
qt(r);
|
|
2272
2275
|
let n = null, s, o;
|
|
@@ -2279,12 +2282,12 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2279
2282
|
s.set(U, G);
|
|
2280
2283
|
t.replaceChildren();
|
|
2281
2284
|
}
|
|
2282
|
-
const { body: c } =
|
|
2285
|
+
const { body: c } = Ht(t, e.frame), f = Ot(c).width, d = e.categoryLabelLine === !0, g = Ca(a.values, (Te = e.verticalAxis) == null ? void 0 : Te.range, (ze = e.verticalAxis) == null ? void 0 : ze.numberFormat, (Fe = e.verticalAxis) == null ? void 0 : Fe.scaleType), b = d ? We.Off : (J = e.horizontalAxis) == null ? void 0 : J.labelPosition, m = na(f, (X = e.verticalAxis) == null ? void 0 : X.labelPosition, b, (Ae = e.verticalAxis) == null ? void 0 : Ae.direction, g);
|
|
2283
2286
|
if (!d) {
|
|
2284
2287
|
const O = Math.max(0, f - (m.left ?? 50) - (m.right ?? 20)), K = un(a.labels, O, e.horizontalAxis);
|
|
2285
2288
|
K !== void 0 && (m.bottom = K);
|
|
2286
2289
|
}
|
|
2287
|
-
const { chartArea: v, width: y, height: x, margin: A } = Wt(c, m), w = x - (d ? ks : 0), T = ra(o, A), I =
|
|
2290
|
+
const { chartArea: v, width: y, height: x, margin: A } = Wt(c, m), w = x - (d ? ks : 0), T = ra(o, A), I = Ec(a, e), E = I.map((O) => ({
|
|
2288
2291
|
label: O,
|
|
2289
2292
|
value: a.values[a.labels.indexOf(O)]
|
|
2290
2293
|
})), j = e.swapLabelValue === !0, B = e.waterfall === !0, V = [];
|
|
@@ -2297,12 +2300,12 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2297
2300
|
e.waterfallTotal && V.push({ label: "Total", value: O, y0: 0, y1: O, isTotal: !0 });
|
|
2298
2301
|
}
|
|
2299
2302
|
const Z = B ? V.map((O) => O.label) : I, _ = p.scaleBand().domain(Z).range([0, y]).padding(Oa(e.barGap)), ae = (($e = e.verticalAxis) == null ? void 0 : $e.scaleType) === "log", ie = B ? V.flatMap((O) => [O.y0, O.y1]) : E.map((O) => O.value);
|
|
2300
|
-
let [re, F] =
|
|
2303
|
+
let [re, F] = Ha(ie, (Le = e.verticalAxis) == null ? void 0 : Le.range, (we = e.verticalAxis) == null ? void 0 : we.scaleType);
|
|
2301
2304
|
if (e.valueLabels && re < 0 && ((Ne = (Ee = e.verticalAxis) == null ? void 0 : Ee.range) == null ? void 0 : Ne.min) == null) {
|
|
2302
2305
|
const O = F - re;
|
|
2303
2306
|
re -= O * 0.1;
|
|
2304
2307
|
}
|
|
2305
|
-
const
|
|
2308
|
+
const R = ae ? p.scaleSymlog().domain([re, F]).nice().range([w, 0]) : p.scaleLinear().domain([re, F]).nice().range([w, 0]);
|
|
2306
2309
|
i.attach(v, T);
|
|
2307
2310
|
const W = j && e.valueLabels && !B ? (() => {
|
|
2308
2311
|
const O = new Map(E.map((K) => [K.label, K.value]));
|
|
@@ -2313,9 +2316,9 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2313
2316
|
};
|
|
2314
2317
|
})() : { ...e.horizontalAxis, width: y }, oe = d ? { ...W, labelPosition: We.Off } : W;
|
|
2315
2318
|
i.update({
|
|
2316
|
-
vertical: { scale:
|
|
2319
|
+
vertical: { scale: R, height: x, options: { ...e.verticalAxis, gridWidth: y, topPadding: A.top } },
|
|
2317
2320
|
horizontal: { scale: _, height: x, options: oe }
|
|
2318
|
-
}), !ae && re < 0 && F > 0 && p.select(v).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", y).attr("y1",
|
|
2321
|
+
}), !ae && re < 0 && F > 0 && p.select(v).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", y).attr("y1", R(0)).attr("y2", R(0)).attr("stroke", "#666").attr("stroke-width", 1);
|
|
2319
2322
|
const le = la(e.colorizes), ke = new Set((e.highlights ?? []).map((O) => O.target)), se = v.ownerSVGElement, ve = sa(se, t, "bars", { x: 0, y: 0, width: y, height: w }), xe = p.select(se).select("defs"), be = ve.replace(/^bc-clip-/, ""), he = p.select(v).append("g").attr("clip-path", `url(#${ve})`);
|
|
2320
2323
|
if (e.barBackground) {
|
|
2321
2324
|
const O = (e.colors ?? Na)[0], K = B ? Z : E.map((U) => U.label);
|
|
@@ -2335,7 +2338,7 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2335
2338
|
const G = E[U], Q = E[U + 1];
|
|
2336
2339
|
if (G.value == null || Q.value == null || Number.isNaN(G.value) || Number.isNaN(Q.value) || G.value === 0 || Q.value === 0)
|
|
2337
2340
|
continue;
|
|
2338
|
-
const ne = (_(G.label) ?? 0) + _.bandwidth(), Se = _(Q.label) ?? 0, Y = Math.min(
|
|
2341
|
+
const ne = (_(G.label) ?? 0) + _.bandwidth(), Se = _(Q.label) ?? 0, Y = Math.min(R(0), R(G.value)), ce = Math.min(R(0), R(Q.value)), Ce = R(0), Pe = le.get(G.label) ?? O[0], Ge = le.get(Q.label) ?? O[0];
|
|
2339
2342
|
let Ue;
|
|
2340
2343
|
if (Pe === Ge)
|
|
2341
2344
|
Ue = Pe;
|
|
@@ -2355,7 +2358,7 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2355
2358
|
const ne = V[Q], Se = V[Q + 1];
|
|
2356
2359
|
if (Se.isTotal || ne.value == null || Se.value == null || Number.isNaN(ne.value) || Number.isNaN(Se.value) || ne.value === 0 || Se.value === 0)
|
|
2357
2360
|
continue;
|
|
2358
|
-
const Y = (_(ne.label) ?? 0) + _.bandwidth(), ce = _(Se.label) ?? 0, Ce =
|
|
2361
|
+
const Y = (_(ne.label) ?? 0) + _.bandwidth(), ce = _(Se.label) ?? 0, Ce = R(ne.y1), Pe = R(Se.y1), Ge = R(ne.y0), Ue = R(Se.y0), Ze = le.get(ne.label) ?? U[0], Ke = le.get(Se.label) ?? U[0];
|
|
2359
2362
|
let ut;
|
|
2360
2363
|
if (Ze === Ke)
|
|
2361
2364
|
ut = Ze;
|
|
@@ -2370,12 +2373,12 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2370
2373
|
const G = V[U], Q = V[U + 1];
|
|
2371
2374
|
if (Q.isTotal)
|
|
2372
2375
|
break;
|
|
2373
|
-
he.append("line").attr("class", "bc-waterfall-connector").attr("x1", (_(G.label) ?? 0) + _.bandwidth()).attr("x2", _(Q.label) ?? 0).attr("y1",
|
|
2376
|
+
he.append("line").attr("class", "bc-waterfall-connector").attr("x1", (_(G.label) ?? 0) + _.bandwidth()).attr("x2", _(Q.label) ?? 0).attr("y1", R(G.y1)).attr("y2", R(G.y1)).attr("stroke", "currentColor").attr("stroke-dasharray", "2,2").attr("opacity", 0.3);
|
|
2374
2377
|
}
|
|
2375
|
-
if (he.selectAll(".bc-bar").data(V, (U) => U.label).enter().append("rect").attr("class", "bc-bar").attr("x", (U) => _(U.label) ?? 0).attr("y", (U) => Math.min(
|
|
2378
|
+
if (he.selectAll(".bc-bar").data(V, (U) => U.label).enter().append("rect").attr("class", "bc-bar").attr("x", (U) => _(U.label) ?? 0).attr("y", (U) => Math.min(R(U.y0), R(U.y1))).attr("width", _.bandwidth()).attr("height", (U) => Math.abs(R(U.y0) - R(U.y1))).attr("fill", (U) => U.isTotal ? K : le.get(U.label) ?? O[0]).attr("opacity", (U) => ke.size > 0 ? at(ke, U.label) : null), e.valueLabels) {
|
|
2376
2379
|
const U = e.valueLabelPosition ?? Ie.Auto, G = ya(((k = e.verticalAxis) == null ? void 0 : k.numberFormat) ?? ""), Q = (ne) => G ? G(ne) : String(ne);
|
|
2377
2380
|
ge.selectAll(".bc-value-label").data(V, (ne) => ne.label).enter().append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("x", (ne) => (_(ne.label) ?? 0) + _.bandwidth() / 2).attr("y", (ne) => {
|
|
2378
|
-
const Se = Math.min(
|
|
2381
|
+
const Se = Math.min(R(ne.y0), R(ne.y1)), Y = Math.abs(R(ne.y0) - R(ne.y1));
|
|
2379
2382
|
return U === Ie.Inside ? Se + Y / 2 : Se - 4;
|
|
2380
2383
|
}).attr("text-anchor", "middle").attr("dominant-baseline", U === Ie.Inside ? "central" : "auto").attr("fill", (ne) => U === Ie.Inside ? It(ne.isTotal ? K : le.get(ne.label) ?? O[0]) : "currentColor").text((ne) => j ? ne.label : Q(ne.isTotal ? ne.y1 : ne.value));
|
|
2381
2384
|
}
|
|
@@ -2390,14 +2393,14 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2390
2393
|
insert: (G) => G.append("rect").attr("class", "bc-bar"),
|
|
2391
2394
|
attrs: (G) => ({
|
|
2392
2395
|
x: _(G.label) ?? 0,
|
|
2393
|
-
y: Math.min(
|
|
2396
|
+
y: Math.min(R(0), R(G.value)),
|
|
2394
2397
|
width: _.bandwidth(),
|
|
2395
|
-
height: Math.abs(
|
|
2398
|
+
height: Math.abs(R(G.value) - R(0)),
|
|
2396
2399
|
fill: le.get(G.label) ?? (e.colors ?? Na)[0],
|
|
2397
2400
|
opacity: at(ke, G.label)
|
|
2398
2401
|
})
|
|
2399
2402
|
});
|
|
2400
|
-
const U = new
|
|
2403
|
+
const U = new Tc(he);
|
|
2401
2404
|
e.tooltips && U.use(Aa({ numberFormat: (M = e.verticalAxis) == null ? void 0 : M.numberFormat })), e.crosshair && U.use(Pa({
|
|
2402
2405
|
width: y,
|
|
2403
2406
|
height: w,
|
|
@@ -2406,14 +2409,14 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2406
2409
|
color: e.crosshairColor
|
|
2407
2410
|
})), (C = e.annotations) != null && C.length && U.use(Wa(e.annotations, {
|
|
2408
2411
|
scaleX: _,
|
|
2409
|
-
scaleY:
|
|
2412
|
+
scaleY: R,
|
|
2410
2413
|
data: E,
|
|
2411
2414
|
width: y,
|
|
2412
2415
|
height: w,
|
|
2413
2416
|
backgroundColor: Bt(t),
|
|
2414
2417
|
transition: r,
|
|
2415
2418
|
priorAnnotations: s
|
|
2416
|
-
})), U.draw(E), e.valueLabels &&
|
|
2419
|
+
})), U.draw(E), e.valueLabels && Dc(ge, E, _, R, {
|
|
2417
2420
|
position: e.valueLabelPosition,
|
|
2418
2421
|
colorOverrides: le,
|
|
2419
2422
|
colors: e.colors ?? Na,
|
|
@@ -2429,12 +2432,12 @@ function yi(t, a, e = {}, r = !1) {
|
|
|
2429
2432
|
}
|
|
2430
2433
|
Ut(t, { chartType: "bar-vertical", margin: A }), n && (Vt(he.node()), Gt(t, n));
|
|
2431
2434
|
}
|
|
2432
|
-
function
|
|
2435
|
+
function zc(t, a, e, r) {
|
|
2433
2436
|
const n = Math.abs(e(t.value) - e(0)), s = r === Ie.Inside, o = (a(t.label) ?? 0) + a.bandwidth() / 2, i = "middle";
|
|
2434
2437
|
let c, f;
|
|
2435
2438
|
return t.value < 0 ? s ? (c = e(t.value) - n / 2, f = "central") : (c = e(t.value) + 4, f = "hanging") : s ? (c = e(t.value) + n / 2, f = "central") : (c = e(t.value) - 4, f = "auto"), { tx: o, ty: c, anchor: i, baseline: f, isInside: s };
|
|
2436
2439
|
}
|
|
2437
|
-
function
|
|
2440
|
+
function Dc(t, a, e, r, n) {
|
|
2438
2441
|
const s = n.position ?? Ie.Auto, o = (g) => n.swapLabelValue ? g.label : n.percent && n.total !== void 0 ? Mr(g.value, n.total) : String(g.value);
|
|
2439
2442
|
let i = t.select(".bc-value-label-group");
|
|
2440
2443
|
i.empty() && (i = t.append("g").attr("class", "bc-value-label-group"));
|
|
@@ -2447,7 +2450,7 @@ function zc(t, a, e, r, n) {
|
|
|
2447
2450
|
key: (g) => g.label,
|
|
2448
2451
|
insert: (g) => g.append("text").attr("class", "bc-value-label").attr("font-size", "11px"),
|
|
2449
2452
|
attrs: (g) => {
|
|
2450
|
-
const b =
|
|
2453
|
+
const b = zc(g, e, r, s);
|
|
2451
2454
|
return {
|
|
2452
2455
|
x: b.tx,
|
|
2453
2456
|
y: b.ty,
|
|
@@ -2458,12 +2461,12 @@ function zc(t, a, e, r, n) {
|
|
|
2458
2461
|
}
|
|
2459
2462
|
}), i.selectAll(".bc-value-label").data(a, (g) => g.label).text(o);
|
|
2460
2463
|
}
|
|
2461
|
-
function
|
|
2464
|
+
function Ec(t, a) {
|
|
2462
2465
|
const e = t.labels.map((r, n) => ({ label: r, value: t.values[n] }));
|
|
2463
2466
|
return a.sort === ft.Ascending ? e.sort((r, n) => r.value - n.value) : a.sort === ft.Descending && e.sort((r, n) => n.value - r.value), e.map((r) => r.label);
|
|
2464
2467
|
}
|
|
2465
|
-
const Ia = ["#4e79a7"], Ls = 13,
|
|
2466
|
-
class
|
|
2468
|
+
const Ia = ["#4e79a7"], Ls = 13, Fc = "11px sans-serif", en = 4;
|
|
2469
|
+
class Nc extends dt {
|
|
2467
2470
|
initialize() {
|
|
2468
2471
|
}
|
|
2469
2472
|
}
|
|
@@ -2471,12 +2474,12 @@ function tn(t) {
|
|
|
2471
2474
|
try {
|
|
2472
2475
|
const e = document.createElement("canvas").getContext("2d");
|
|
2473
2476
|
if (e)
|
|
2474
|
-
return e.font =
|
|
2477
|
+
return e.font = Fc, Math.ceil(e.measureText(t).width);
|
|
2475
2478
|
} catch {
|
|
2476
2479
|
}
|
|
2477
2480
|
return t.length * 6.5;
|
|
2478
2481
|
}
|
|
2479
|
-
function
|
|
2482
|
+
function xi(t, a, e = {}, r = !1) {
|
|
2480
2483
|
var Te, ze, Fe, J, X, Ae, $e, Le, we, Ee, Ne;
|
|
2481
2484
|
qt(r);
|
|
2482
2485
|
let n = null, s, o;
|
|
@@ -2489,7 +2492,7 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2489
2492
|
s.set(C, O);
|
|
2490
2493
|
t.replaceChildren();
|
|
2491
2494
|
}
|
|
2492
|
-
const { body: c } =
|
|
2495
|
+
const { body: c } = Ht(t, e.frame), f = Ot(c).width, d = f > 0 && f < 400 && ((Te = e.verticalAxis) == null ? void 0 : Te.labelPosition) !== "outside", g = e.categoryLabelLine === !0 || d, b = Or(a.labels), m = g ? We.Off : (ze = e.verticalAxis) == null ? void 0 : ze.labelPosition, v = na(f, m, (Fe = e.horizontalAxis) == null ? void 0 : Fe.labelPosition, (J = e.verticalAxis) == null ? void 0 : J.direction, b, (X = e.horizontalAxis) == null ? void 0 : X.showAxis), y = e.valueLabelPosition ?? Ie.Auto, x = e.swapLabelValue === !0;
|
|
2493
2496
|
if (e.valueLabels && y !== Ie.Inside)
|
|
2494
2497
|
if (x) {
|
|
2495
2498
|
const k = a.labels.reduce((C, O) => C.length > O.length ? C : O, ""), M = tn(k) + en;
|
|
@@ -2498,7 +2501,7 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2498
2501
|
const k = Math.max(...a.values), M = Math.min(...a.values), C = k > 0 ? tn(String(k)) + en : 0, O = M < 0 ? tn(String(M)) + en : 0;
|
|
2499
2502
|
v.right = Math.max(v.right ?? 15, C), O > 0 && (v.left = (v.left ?? 50) + O);
|
|
2500
2503
|
}
|
|
2501
|
-
const { chartArea: A, width: L, height: w, margin: T } = Wt(c, v), I = g ? Ls : 0, E = ra(o, T), j =
|
|
2504
|
+
const { chartArea: A, width: L, height: w, margin: T } = Wt(c, v), I = g ? Ls : 0, E = ra(o, T), j = Vc(a, e), B = j.map((k) => ({
|
|
2502
2505
|
label: k,
|
|
2503
2506
|
value: a.values[a.labels.indexOf(k)]
|
|
2504
2507
|
})), V = e.waterfall === !0, Z = [];
|
|
@@ -2510,7 +2513,7 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2510
2513
|
}
|
|
2511
2514
|
e.waterfallTotal && Z.push({ label: "Total", value: k, x0: 0, x1: k, isTotal: !0 });
|
|
2512
2515
|
}
|
|
2513
|
-
const _ = ((Ae = e.horizontalAxis) == null ? void 0 : Ae.scaleType) === "log", ae = V ? Z.flatMap((k) => [k.x0, k.x1]) : B.map((k) => k.value), [ie, re] =
|
|
2516
|
+
const _ = ((Ae = e.horizontalAxis) == null ? void 0 : Ae.scaleType) === "log", ae = V ? Z.flatMap((k) => [k.x0, k.x1]) : B.map((k) => k.value), [ie, re] = Ha(ae, ($e = e.horizontalAxis) == null ? void 0 : $e.range, (Le = e.horizontalAxis) == null ? void 0 : Le.scaleType), F = _ ? p.scaleSymlog().domain([ie, re]).nice().range([0, L]) : p.scaleLinear().domain([ie, re]).nice().range([0, L]), R = V ? Z.map((k) => k.label) : j, W = p.scaleBand().domain(R).range([0, w]).padding(Oa(e.barGap)), oe = x && e.valueLabels && !V ? (() => {
|
|
2514
2517
|
const k = new Map(B.map((M) => [M.label, M.value]));
|
|
2515
2518
|
return {
|
|
2516
2519
|
...e.verticalAxis,
|
|
@@ -2525,10 +2528,10 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2525
2528
|
}), !_ && ie < 0 && re > 0 && p.select(A).append("line").attr("class", "bc-zero-baseline").attr("x1", F(0)).attr("x2", F(0)).attr("y1", 0).attr("y2", w).attr("stroke", "#666").attr("stroke-width", 1);
|
|
2526
2529
|
const ke = la(e.colorizes), se = new Set((e.highlights ?? []).map((k) => k.target)), ve = A.ownerSVGElement, xe = sa(ve, t, "bars", { x: 0, y: 0, width: L, height: w }), be = p.select(ve).select("defs"), he = xe.replace(/^bc-clip-/, ""), me = p.select(A).append("g").attr("clip-path", `url(#${xe})`);
|
|
2527
2530
|
if (e.barBackground) {
|
|
2528
|
-
const k = (e.colors ?? Ia)[0], M = V ?
|
|
2531
|
+
const k = (e.colors ?? Ia)[0], M = V ? R : B.map((C) => C.label);
|
|
2529
2532
|
me.selectAll(".bc-bar-bg").data(M, (C) => C).enter().append("rect").attr("class", "bc-bar-bg").attr("x", 0).attr("y", (C) => (W(C) ?? 0) + I).attr("width", L).attr("height", W.bandwidth() - I).attr("fill", k).attr("opacity", 0.18);
|
|
2530
2533
|
}
|
|
2531
|
-
const ge = V ?
|
|
2534
|
+
const ge = V ? R : B.map((k) => k.label);
|
|
2532
2535
|
if (e.barSeparators && ge.length > 1) {
|
|
2533
2536
|
const k = W.step();
|
|
2534
2537
|
for (let M = 1; M < ge.length; M++) {
|
|
@@ -2603,7 +2606,7 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2603
2606
|
opacity: at(se, O.label)
|
|
2604
2607
|
})
|
|
2605
2608
|
});
|
|
2606
|
-
const C = new
|
|
2609
|
+
const C = new Nc(me);
|
|
2607
2610
|
if (e.tooltips && C.use(Aa({ numberFormat: (Ee = e.horizontalAxis) == null ? void 0 : Ee.numberFormat })), e.crosshair && C.use(Pa({
|
|
2608
2611
|
width: L,
|
|
2609
2612
|
height: w,
|
|
@@ -2623,7 +2626,7 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2623
2626
|
priorAnnotations: s
|
|
2624
2627
|
})), C.draw(B), e.valueLabels) {
|
|
2625
2628
|
const O = p.select(A).append("g");
|
|
2626
|
-
|
|
2629
|
+
Bc(O, B, F, W, {
|
|
2627
2630
|
position: y,
|
|
2628
2631
|
colorOverrides: ke,
|
|
2629
2632
|
colors: e.colors ?? Ia,
|
|
@@ -2636,14 +2639,14 @@ function vi(t, a, e = {}, r = !1) {
|
|
|
2636
2639
|
}
|
|
2637
2640
|
if (g) {
|
|
2638
2641
|
const k = p.select(A).append("g").attr("class", "bc-category-labels");
|
|
2639
|
-
for (const M of
|
|
2642
|
+
for (const M of R) {
|
|
2640
2643
|
const C = W(M) ?? 0;
|
|
2641
2644
|
k.append("text").attr("class", "bc-category-label").attr("x", 2).attr("y", C + Ls / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "10px").attr("font-weight", "600").attr("fill", "currentColor").text(M);
|
|
2642
2645
|
}
|
|
2643
2646
|
}
|
|
2644
2647
|
Ut(t, { chartType: "bar-horizontal", margin: T }), n && (Vt(me.node()), Gt(t, n));
|
|
2645
2648
|
}
|
|
2646
|
-
function
|
|
2649
|
+
function Ic(t, a, e, r, n = 0) {
|
|
2647
2650
|
const s = r === Ie.Inside, o = (e(t.label) ?? 0) + n + (e.bandwidth() - n) / 2;
|
|
2648
2651
|
let i, c;
|
|
2649
2652
|
if (t.value < 0) {
|
|
@@ -2655,7 +2658,7 @@ function Nc(t, a, e, r, n = 0) {
|
|
|
2655
2658
|
}
|
|
2656
2659
|
return { tx: i, ty: o, anchor: c, isInside: s };
|
|
2657
2660
|
}
|
|
2658
|
-
function
|
|
2661
|
+
function Bc(t, a, e, r, n) {
|
|
2659
2662
|
const s = n.position ?? Ie.Auto, o = n.categoryLabelOffset ?? 0, i = (b) => n.swapLabelValue ? b.label : n.percent && n.total !== void 0 ? Mr(b.value, n.total) : String(b.value);
|
|
2660
2663
|
let c = t.select(".bc-value-label-group");
|
|
2661
2664
|
c.empty() && (c = t.append("g").attr("class", "bc-value-label-group"));
|
|
@@ -2668,7 +2671,7 @@ function Ic(t, a, e, r, n) {
|
|
|
2668
2671
|
key: (b) => b.label,
|
|
2669
2672
|
insert: (b) => b.append("text").attr("class", "bc-value-label").attr("font-size", "11px").attr("dominant-baseline", "central"),
|
|
2670
2673
|
attrs: (b) => {
|
|
2671
|
-
const m =
|
|
2674
|
+
const m = Ic(b, e, r, s, o);
|
|
2672
2675
|
return {
|
|
2673
2676
|
x: m.tx,
|
|
2674
2677
|
y: m.ty,
|
|
@@ -2678,7 +2681,7 @@ function Ic(t, a, e, r, n) {
|
|
|
2678
2681
|
}
|
|
2679
2682
|
}), c.selectAll(".bc-value-label").data(a, (b) => b.label).text(i);
|
|
2680
2683
|
}
|
|
2681
|
-
function
|
|
2684
|
+
function Vc(t, a) {
|
|
2682
2685
|
const e = t.labels.map((r, n) => ({ label: r, value: t.values[n] }));
|
|
2683
2686
|
return a.sort === ft.Ascending ? e.sort((r, n) => r.value - n.value) : a.sort === ft.Descending && e.sort((r, n) => n.value - r.value), e.map((r) => r.label);
|
|
2684
2687
|
}
|
|
@@ -2697,7 +2700,7 @@ function wa(t, a, e) {
|
|
|
2697
2700
|
i > 0 && i + f > e ? (c = Math.max(c, i), o++, i = f) : i += f;
|
|
2698
2701
|
return c = Math.max(c, i), { width: c, height: o * n };
|
|
2699
2702
|
}
|
|
2700
|
-
function
|
|
2703
|
+
function Ai(t) {
|
|
2701
2704
|
return t.length === 0 ? 0 : Math.max(...t.map((e) => e.length)) * 7 + 10;
|
|
2702
2705
|
}
|
|
2703
2706
|
function da(t, a) {
|
|
@@ -2707,15 +2710,15 @@ function Xe(t, a, e, r) {
|
|
|
2707
2710
|
const n = da(t, r);
|
|
2708
2711
|
return (n == null ? void 0 : n.color) ?? e[a % e.length];
|
|
2709
2712
|
}
|
|
2710
|
-
function
|
|
2713
|
+
function _c(t, a) {
|
|
2711
2714
|
const e = da(t, a);
|
|
2712
2715
|
return (e == null ? void 0 : e.dash) ?? "solid";
|
|
2713
2716
|
}
|
|
2714
|
-
function
|
|
2717
|
+
function Gc(t, a) {
|
|
2715
2718
|
const e = da(t, a);
|
|
2716
2719
|
return (e == null ? void 0 : e.lineWidth) ?? 2;
|
|
2717
2720
|
}
|
|
2718
|
-
function
|
|
2721
|
+
function wi(t, a, e) {
|
|
2719
2722
|
const r = da(t, e);
|
|
2720
2723
|
return !(r != null && r.interpolation) || r.interpolation === "global" ? a : r.interpolation;
|
|
2721
2724
|
}
|
|
@@ -2735,7 +2738,7 @@ function nr(t, a) {
|
|
|
2735
2738
|
const e = da(t, a);
|
|
2736
2739
|
return (e == null ? void 0 : e.opacity) ?? 1;
|
|
2737
2740
|
}
|
|
2738
|
-
function
|
|
2741
|
+
function Yc(t, a, e) {
|
|
2739
2742
|
const r = da(t, e);
|
|
2740
2743
|
if ((r == null ? void 0 : r.lineSymbols) !== !1 && ((r == null ? void 0 : r.lineSymbols) === !0 || a))
|
|
2741
2744
|
return {
|
|
@@ -2748,7 +2751,7 @@ function Gc(t, a, e) {
|
|
|
2748
2751
|
lineSymbols: !0
|
|
2749
2752
|
};
|
|
2750
2753
|
}
|
|
2751
|
-
const
|
|
2754
|
+
const Rc = [
|
|
2752
2755
|
"#4e79a7",
|
|
2753
2756
|
"#f28e2b",
|
|
2754
2757
|
"#e15759",
|
|
@@ -2762,7 +2765,7 @@ class Hc extends dt {
|
|
|
2762
2765
|
initialize() {
|
|
2763
2766
|
}
|
|
2764
2767
|
}
|
|
2765
|
-
function
|
|
2768
|
+
function Wc(t, a, e = {}, r = !1) {
|
|
2766
2769
|
var ce, Ce, Pe, Ge, Ue, Ze, Ke, ut, ht, je, Tt, zt, ue;
|
|
2767
2770
|
qt(r);
|
|
2768
2771
|
let n = null, s, o;
|
|
@@ -2771,11 +2774,11 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2771
2774
|
const P = Xt(t);
|
|
2772
2775
|
o = P == null ? void 0 : P.margin, i.detach(), P && P.chartType !== "bar-multi" && (n = _t(t)), s = /* @__PURE__ */ new Map();
|
|
2773
2776
|
for (const de of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
2774
|
-
for (const [
|
|
2775
|
-
s.set(
|
|
2777
|
+
for (const [H, Me] of Pt(de))
|
|
2778
|
+
s.set(H, Me);
|
|
2776
2779
|
t.replaceChildren();
|
|
2777
2780
|
}
|
|
2778
|
-
const { body: c } =
|
|
2781
|
+
const { body: c } = Ht(t, e.frame), f = a.series ?? [], d = f.filter((P) => !za(P.name, e.seriesOverrides)), g = d.map((P) => P.name), b = e.colors ?? Rc, m = e.seriesOverrides, v = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", y = v ? "direct" : e.legend !== !1 ? "legend" : "none", x = e.legend !== !1 && !v, A = Ot(c).width, L = 350, w = e.legendPosition ?? "top", T = A > 0 && A < L && (w === "left" || w === "right") ? "top" : w, I = e.legendAnchor ?? "start", E = d.flatMap((P) => P.values), j = Ca(E, (ce = e.verticalAxis) == null ? void 0 : ce.range, (Ce = e.verticalAxis) == null ? void 0 : Ce.numberFormat, (Pe = e.verticalAxis) == null ? void 0 : Pe.scaleType), B = na(A, (Ge = e.verticalAxis) == null ? void 0 : Ge.labelPosition, (Ue = e.horizontalAxis) == null ? void 0 : Ue.labelPosition, (Ze = e.verticalAxis) == null ? void 0 : Ze.direction, j), V = Math.max(0, A - (B.left ?? 50) - (B.right ?? 20)), Z = un(a.labels, V, e.horizontalAxis);
|
|
2779
2782
|
Z !== void 0 && (B.bottom = Z);
|
|
2780
2783
|
const _ = B.top != null, ae = Math.max(0, A - (B.left ?? 50) - (B.right ?? 20)), ie = x ? wa(g, T, ae) : { width: 0, height: 0 }, re = x ? ie.height + 15 : 0, F = { ...B };
|
|
2781
2784
|
if (x && T === "top") {
|
|
@@ -2783,41 +2786,41 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2783
2786
|
F.top = re + P;
|
|
2784
2787
|
}
|
|
2785
2788
|
x && T === "bottom" && (F.bottom = (F.bottom ?? 24) + re), x && T === "left" && (F.left = (F.left ?? 50) + ie.width + 10), x && T === "right" && (F.right = (F.right ?? 20) + ie.width + 10);
|
|
2786
|
-
const { chartArea:
|
|
2787
|
-
let [se, ve] =
|
|
2789
|
+
const { chartArea: R, width: W, height: oe, margin: le } = Wt(c, F), ke = ra(o, le);
|
|
2790
|
+
let [se, ve] = Ha(E, (Ke = e.verticalAxis) == null ? void 0 : Ke.range, (ut = e.verticalAxis) == null ? void 0 : ut.scaleType);
|
|
2788
2791
|
if (e.valueLabels && se < 0 && ((je = (ht = e.verticalAxis) == null ? void 0 : ht.range) == null ? void 0 : je.min) == null) {
|
|
2789
2792
|
const P = ve - se;
|
|
2790
2793
|
se -= P * 0.1;
|
|
2791
2794
|
}
|
|
2792
2795
|
let xe = a.labels;
|
|
2793
2796
|
if (e.sortMode === "total") {
|
|
2794
|
-
const P = a.labels.map((de,
|
|
2797
|
+
const P = a.labels.map((de, H) => ({
|
|
2795
2798
|
label: de,
|
|
2796
|
-
index:
|
|
2797
|
-
total: d.reduce((Me, qe) => Me + (qe.values[
|
|
2799
|
+
index: H,
|
|
2800
|
+
total: d.reduce((Me, qe) => Me + (qe.values[H] ?? 0), 0)
|
|
2798
2801
|
}));
|
|
2799
|
-
P.sort((de,
|
|
2802
|
+
P.sort((de, H) => H.total - de.total), xe = P.map((de) => de.label);
|
|
2800
2803
|
}
|
|
2801
2804
|
const be = p.scaleBand().domain(xe).range([0, W]).padding(Oa(e.barGap)), he = p.scaleBand().domain(g).range([0, be.bandwidth()]).padding(0.05), me = ((Tt = e.verticalAxis) == null ? void 0 : Tt.scaleType) === "log", ge = me ? p.scaleSymlog().domain([se, ve]).nice().range([oe, 0]) : p.scaleLinear().domain([se, ve]).nice().range([oe, 0]);
|
|
2802
|
-
i.attach(
|
|
2805
|
+
i.attach(R, ke), i.update({
|
|
2803
2806
|
vertical: { scale: ge, height: oe, options: { ...e.verticalAxis, gridWidth: W, topPadding: le.top } },
|
|
2804
2807
|
horizontal: { scale: be, height: oe, options: { ...e.horizontalAxis, width: W } }
|
|
2805
|
-
}), !me && se < 0 && ve > 0 && p.select(
|
|
2808
|
+
}), !me && se < 0 && ve > 0 && p.select(R).append("line").attr("class", "bc-zero-baseline").attr("x1", 0).attr("x2", W).attr("y1", ge(0)).attr("y2", ge(0)).attr("stroke", "#666").attr("stroke-width", 1);
|
|
2806
2809
|
const Te = /* @__PURE__ */ new Map();
|
|
2807
2810
|
e.sortMode === "within-groups" && a.labels.forEach((P, de) => {
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2811
|
+
const H = d.map((Me) => ({ name: Me.name, value: Me.values[de] }));
|
|
2812
|
+
H.sort((Me, qe) => qe.value - Me.value), H.forEach((Me, qe) => {
|
|
2810
2813
|
Te.set(`${P}\0${Me.name}`, g[qe]);
|
|
2811
2814
|
});
|
|
2812
2815
|
});
|
|
2813
2816
|
const ze = [];
|
|
2814
2817
|
a.labels.forEach((P, de) => {
|
|
2815
|
-
d.forEach((
|
|
2816
|
-
const Me = f.findIndex((rt) => rt.name ===
|
|
2817
|
-
ze.push({ label: P, series: qe, seriesName:
|
|
2818
|
+
d.forEach((H) => {
|
|
2819
|
+
const Me = f.findIndex((rt) => rt.name === H.name), qe = e.sortMode === "within-groups" ? Te.get(`${P}\0${H.name}`) ?? H.name : H.name;
|
|
2820
|
+
ze.push({ label: P, series: qe, seriesName: H.name, value: H.values[de], seriesIndex: Me });
|
|
2818
2821
|
});
|
|
2819
2822
|
});
|
|
2820
|
-
const Fe = e.valueLabels ?? !1, J =
|
|
2823
|
+
const Fe = e.valueLabels ?? !1, J = R.ownerSVGElement, X = sa(J, t, "bars", { x: 0, y: 0, width: W, height: oe }), Ae = p.select(R).append("g").attr("clip-path", `url(#${X})`), $e = Ta(t), Le = Xa(e.highlights), we = la(e.colorizes), Ee = Ae.append("g").node();
|
|
2821
2824
|
qa($e, {
|
|
2822
2825
|
role: "mark-per-cell",
|
|
2823
2826
|
parent: Ee,
|
|
@@ -2826,7 +2829,7 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2826
2829
|
key: (P) => `${P.label}\0${P.seriesName}`,
|
|
2827
2830
|
insert: (P) => P.append("rect").attr("class", "bc-bar bc-bar-multi"),
|
|
2828
2831
|
attrs: (P) => {
|
|
2829
|
-
const de = Xe(P.seriesName, P.seriesIndex, b, m),
|
|
2832
|
+
const de = Xe(P.seriesName, P.seriesIndex, b, m), H = nr(P.seriesName, m), Me = {
|
|
2830
2833
|
"data-series": P.seriesName,
|
|
2831
2834
|
x: (be(P.label) ?? 0) + (he(P.series) ?? 0),
|
|
2832
2835
|
y: Math.min(ge(0), ge(P.value)),
|
|
@@ -2834,7 +2837,7 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2834
2837
|
height: Math.abs(ge(P.value) - ge(0)),
|
|
2835
2838
|
fill: we.get(P.seriesName) ?? de
|
|
2836
2839
|
};
|
|
2837
|
-
return
|
|
2840
|
+
return H < 1 && (Me["fill-opacity"] = H), Le.size > 0 ? { ...Me, opacity: at(Le, P.seriesName) } : Me;
|
|
2838
2841
|
}
|
|
2839
2842
|
});
|
|
2840
2843
|
const Ne = new Hc(Ae);
|
|
@@ -2845,9 +2848,9 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2845
2848
|
style: e.crosshairStyle,
|
|
2846
2849
|
color: e.crosshairColor
|
|
2847
2850
|
})), (ue = e.annotations) != null && ue.length) {
|
|
2848
|
-
const P = a.labels.map((de,
|
|
2851
|
+
const P = a.labels.map((de, H) => ({
|
|
2849
2852
|
label: de,
|
|
2850
|
-
value: Math.max(...d.map((Me) => Me.values[
|
|
2853
|
+
value: Math.max(...d.map((Me) => Me.values[H] ?? 0))
|
|
2851
2854
|
}));
|
|
2852
2855
|
Ne.use(Wa(e.annotations, { scaleX: be, scaleY: ge, data: P, width: W, height: oe, backgroundColor: Bt(t), transition: r, priorAnnotations: s }));
|
|
2853
2856
|
}
|
|
@@ -2863,31 +2866,31 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2863
2866
|
function Q(P) {
|
|
2864
2867
|
return O === vt.Inside ? Ie.Inside : O === vt.Outside ? Ie.Outside : Fe ? G() : Ie.Outside;
|
|
2865
2868
|
}
|
|
2866
|
-
function ne(P, de,
|
|
2867
|
-
return
|
|
2869
|
+
function ne(P, de, H) {
|
|
2870
|
+
return H === "start" ? P + 12 : H === "end" ? P + de - 4 : P + de / 2;
|
|
2868
2871
|
}
|
|
2869
|
-
const Se = p.select(
|
|
2872
|
+
const Se = p.select(R).append("g").attr("class", "bc-value-labels");
|
|
2870
2873
|
ze.forEach((P) => {
|
|
2871
2874
|
if (!Ua(P.seriesName, Fe, m))
|
|
2872
2875
|
return;
|
|
2873
|
-
const de = (be(P.label) ?? 0) + (he(P.series) ?? 0) + he.bandwidth() / 2,
|
|
2874
|
-
let Dt,
|
|
2876
|
+
const de = (be(P.label) ?? 0) + (he(P.series) ?? 0) + he.bandwidth() / 2, H = Math.min(ge(0), ge(P.value)), Me = Math.abs(ge(P.value) - ge(0)), qe = G(), rt = M && k.has(P.seriesName), lt = P.value < 0, nt = H + Me;
|
|
2877
|
+
let Dt, Rt, ca;
|
|
2875
2878
|
if (qe === Ie.Inside) {
|
|
2876
2879
|
const te = Xe(P.seriesName, P.seriesIndex, b, m);
|
|
2877
|
-
|
|
2880
|
+
Rt = It(te), ca = "central", rt && Q() === Ie.Inside ? Dt = ne(H, Me, K) + 14 : Dt = H + Me / 2;
|
|
2878
2881
|
} else
|
|
2879
|
-
|
|
2880
|
-
Se.append("text").attr("class", "bc-value-label").attr("data-series", P.seriesName).attr("x", de).attr("y", Dt).attr("text-anchor", "middle").attr("dominant-baseline", ca).attr("font-size", "11px").attr("fill",
|
|
2882
|
+
Rt = "currentColor", lt ? (Dt = rt && Q() === Ie.Outside ? nt + 16 : nt + 4, ca = "hanging") : (Dt = rt && Q() === Ie.Outside ? H - 16 : H - 4, ca = "auto");
|
|
2883
|
+
Se.append("text").attr("class", "bc-value-label").attr("data-series", P.seriesName).attr("x", de).attr("y", Dt).attr("text-anchor", "middle").attr("dominant-baseline", ca).attr("font-size", "11px").attr("fill", Rt).text(String(P.value));
|
|
2881
2884
|
}), ze.forEach((P) => {
|
|
2882
2885
|
var Dt;
|
|
2883
2886
|
if (!k.has(P.seriesName))
|
|
2884
2887
|
return;
|
|
2885
|
-
const de = (be(P.label) ?? 0) + (he(P.series) ?? 0) + he.bandwidth() / 2,
|
|
2888
|
+
const de = (be(P.label) ?? 0) + (he(P.series) ?? 0) + he.bandwidth() / 2, H = Math.min(ge(0), ge(P.value)), Me = Math.abs(ge(P.value) - ge(0)), qe = ((Dt = m == null ? void 0 : m.find((Rt) => Rt.name === P.seriesName)) == null ? void 0 : Dt.labelText) || P.seriesName, rt = Q(), lt = Xe(P.seriesName, P.seriesIndex, b, m), nt = p.select(R).append("text").attr("class", "bc-direct-label").attr("data-series", P.seriesName).attr("x", de).attr("text-anchor", "middle").attr("font-size", "10px").text(qe);
|
|
2886
2889
|
if (rt === Ie.Inside) {
|
|
2887
|
-
const
|
|
2888
|
-
nt.attr("y",
|
|
2890
|
+
const Rt = ne(H, Me, K);
|
|
2891
|
+
nt.attr("y", Rt).attr("fill", It(lt)), K === "middle" && nt.attr("dominant-baseline", "central");
|
|
2889
2892
|
} else
|
|
2890
|
-
nt.attr("y",
|
|
2893
|
+
nt.attr("y", H - 4).attr("fill", gi(lt, C));
|
|
2891
2894
|
});
|
|
2892
2895
|
const Y = g.filter((P) => ma(P, y, m) === "legend");
|
|
2893
2896
|
if (x && Y.length > 0) {
|
|
@@ -2895,15 +2898,15 @@ function Rc(t, a, e = {}, r = !1) {
|
|
|
2895
2898
|
const qe = f.findIndex((rt) => rt.name === Me);
|
|
2896
2899
|
return Xe(Me, qe, b, m);
|
|
2897
2900
|
});
|
|
2898
|
-
let de = 0,
|
|
2901
|
+
let de = 0, H = 0;
|
|
2899
2902
|
if (T === "top") {
|
|
2900
2903
|
const Me = _ ? 15 : 0;
|
|
2901
|
-
|
|
2902
|
-
} else T === "bottom" ?
|
|
2903
|
-
xa(
|
|
2904
|
+
H = -(ie.height + 10 + Me);
|
|
2905
|
+
} else T === "bottom" ? H = oe + 25 : T === "left" ? de = -(ie.width + 10) : T === "right" && (de = W + 10);
|
|
2906
|
+
xa(R, Y, P, H, T, I, W, oe, de, [], { left: le.left, right: le.right });
|
|
2904
2907
|
}
|
|
2905
2908
|
}
|
|
2906
|
-
const
|
|
2909
|
+
const qc = {
|
|
2907
2910
|
linear: p.curveLinear,
|
|
2908
2911
|
monotoneX: p.curveMonotoneX,
|
|
2909
2912
|
step: p.curveStep,
|
|
@@ -2914,9 +2917,9 @@ const Wc = {
|
|
|
2914
2917
|
catmullRom: p.curveCatmullRom
|
|
2915
2918
|
};
|
|
2916
2919
|
function $a(t) {
|
|
2917
|
-
return t &&
|
|
2920
|
+
return t && qc[t] || p.curveLinear;
|
|
2918
2921
|
}
|
|
2919
|
-
function
|
|
2922
|
+
function Si(t) {
|
|
2920
2923
|
const a = (t == null ? void 0 : t.position) ?? Ie.Auto, e = (t == null ? void 0 : t.orientation) ?? ot.Vertical, r = t != null && t.format ? p.format(t.format) : (n) => String(n);
|
|
2921
2924
|
return {
|
|
2922
2925
|
name: "value-labels",
|
|
@@ -2945,17 +2948,17 @@ function wi(t) {
|
|
|
2945
2948
|
}
|
|
2946
2949
|
};
|
|
2947
2950
|
}
|
|
2948
|
-
const
|
|
2951
|
+
const ki = "bc-tooltip", _a = /* @__PURE__ */ new WeakMap();
|
|
2949
2952
|
function Dr(t) {
|
|
2950
2953
|
const a = _a.get(t);
|
|
2951
2954
|
a && (_a.delete(t), a());
|
|
2952
2955
|
}
|
|
2953
|
-
function
|
|
2956
|
+
function Xc() {
|
|
2954
2957
|
if (document.getElementById("bc-tooltip-styles"))
|
|
2955
2958
|
return;
|
|
2956
2959
|
const t = document.createElement("style");
|
|
2957
2960
|
t.id = "bc-tooltip-styles", t.textContent = `
|
|
2958
|
-
.${
|
|
2961
|
+
.${ki} {
|
|
2959
2962
|
position: absolute;
|
|
2960
2963
|
pointer-events: none;
|
|
2961
2964
|
background: var(--bs-body-bg, #fff);
|
|
@@ -2970,7 +2973,7 @@ function qc() {
|
|
|
2970
2973
|
}
|
|
2971
2974
|
`, document.head.appendChild(t);
|
|
2972
2975
|
}
|
|
2973
|
-
function
|
|
2976
|
+
function Uc(t) {
|
|
2974
2977
|
const a = t ? ya(t) : null, e = (r) => a ? a(r) : String(r);
|
|
2975
2978
|
return (r) => r.series ? `${r.series} – ${r.label}: ${e(r.value)}` : `${r.label}: ${e(r.value)}`;
|
|
2976
2979
|
}
|
|
@@ -2984,7 +2987,7 @@ function Er(t, a) {
|
|
|
2984
2987
|
crosshairDirection: i = yt.Both,
|
|
2985
2988
|
crosshairStyle: c = ta.Dashed,
|
|
2986
2989
|
crosshairColor: f = "#999",
|
|
2987
|
-
format: d =
|
|
2990
|
+
format: d = Uc(a.numberFormat),
|
|
2988
2991
|
container: g
|
|
2989
2992
|
} = a;
|
|
2990
2993
|
if (n.length === 0) {
|
|
@@ -2994,7 +2997,7 @@ function Er(t, a) {
|
|
|
2994
2997
|
}
|
|
2995
2998
|
const b = c === ta.Solid ? "none" : c === ta.Dotted ? "2,2" : "4,3", m = [...new Set(n.map((re) => re.cx))].sort((re, F) => re - F), v = p.select(t);
|
|
2996
2999
|
let y = null;
|
|
2997
|
-
s && (
|
|
3000
|
+
s && (Xc(), y = document.createElement("div"), y.className = ki, document.body.appendChild(y));
|
|
2998
3001
|
const x = ".bc-annotations", A = !v.select(x).empty(), L = (re) => A ? v.insert(re, x) : v.append(re), w = o && (i === yt.Both || i === yt.Vertical), T = o && (i === yt.Both || i === yt.Horizontal);
|
|
2999
3002
|
let I = null, E = null;
|
|
3000
3003
|
w && (I = L("line").attr("class", "bc-crosshair bc-crosshair-v").attr("y1", 0).attr("y2", r).attr("stroke", f).attr("stroke-width", 1).style("stroke-dasharray", b).attr("pointer-events", "none").style("display", "none")), T && (E = L("line").attr("class", "bc-crosshair bc-crosshair-h").attr("x1", 0).attr("x2", e).attr("stroke", f).attr("stroke-width", 1).style("stroke-dasharray", b).attr("pointer-events", "none").style("display", "none"));
|
|
@@ -3002,7 +3005,7 @@ function Er(t, a) {
|
|
|
3002
3005
|
function V(re, F) {
|
|
3003
3006
|
if (m.length === 0)
|
|
3004
3007
|
return null;
|
|
3005
|
-
const
|
|
3008
|
+
const R = p.bisectCenter(m, re), W = m[R], oe = n.filter((se) => se.cx === W);
|
|
3006
3009
|
if (oe.length === 0)
|
|
3007
3010
|
return null;
|
|
3008
3011
|
let le = oe[0], ke = Math.abs(oe[0].cy - F);
|
|
@@ -3013,10 +3016,10 @@ function Er(t, a) {
|
|
|
3013
3016
|
return le;
|
|
3014
3017
|
}
|
|
3015
3018
|
const Z = (re) => {
|
|
3016
|
-
const [F,
|
|
3019
|
+
const [F, R] = p.pointer(re, t), W = V(F, R);
|
|
3017
3020
|
W && (j.attr("cx", W.cx).attr("cy", W.cy).attr("stroke", W.color).style("display", null), y && (y.textContent = d(W), y.style.display = "block", Ys(j.node(), y, {
|
|
3018
3021
|
placement: "top",
|
|
3019
|
-
middleware: [
|
|
3022
|
+
middleware: [Rs(8), Hs(), Ws()]
|
|
3020
3023
|
}).then(({ x: oe, y: le }) => {
|
|
3021
3024
|
y && (y.style.left = `${oe}px`, y.style.top = `${le}px`);
|
|
3022
3025
|
})), I && I.attr("x1", W.cx).attr("x2", W.cx).style("display", null), E && E.attr("y1", W.cy).attr("y2", W.cy).style("display", null));
|
|
@@ -3029,16 +3032,16 @@ function Er(t, a) {
|
|
|
3029
3032
|
};
|
|
3030
3033
|
return g && _a.set(g, ie), ie;
|
|
3031
3034
|
}
|
|
3032
|
-
const
|
|
3035
|
+
const jc = p.symbolTriangle2 ?? p.symbolTriangle, Zc = {
|
|
3033
3036
|
circle: p.symbolCircle,
|
|
3034
3037
|
square: p.symbolSquare,
|
|
3035
3038
|
diamond: p.symbolDiamond,
|
|
3036
3039
|
triangle: p.symbolTriangle,
|
|
3037
|
-
triangleDown:
|
|
3040
|
+
triangleDown: jc,
|
|
3038
3041
|
cross: p.symbolCross,
|
|
3039
3042
|
star: p.symbolStar
|
|
3040
3043
|
};
|
|
3041
|
-
function
|
|
3044
|
+
function Qc(t, a, e) {
|
|
3042
3045
|
switch (e) {
|
|
3043
3046
|
case Nt.First:
|
|
3044
3047
|
return t === 0;
|
|
@@ -3052,7 +3055,7 @@ function Zc(t, a, e) {
|
|
|
3052
3055
|
}
|
|
3053
3056
|
}
|
|
3054
3057
|
function vn(t, a, e, r, n = !1) {
|
|
3055
|
-
const s = r.symbol ?? Et.Circle, o = r.showOn ?? Nt.FirstLast, i = r.style ?? At.Filled, c = r.size ?? 3.5, f = r.opacity ?? 1, d = "var(--bs-body-bg, #fff)", g = a.filter((m) =>
|
|
3058
|
+
const s = r.symbol ?? Et.Circle, o = r.showOn ?? Nt.FirstLast, i = r.style ?? At.Filled, c = r.size ?? 3.5, f = r.opacity ?? 1, d = "var(--bs-body-bg, #fff)", g = a.filter((m) => Qc(m.index, e, o)), b = n ? Ve() : 0;
|
|
3056
3059
|
if (s === Et.Circle) {
|
|
3057
3060
|
t.selectAll("path.bc-symbol").remove();
|
|
3058
3061
|
const m = t.selectAll("circle.bc-symbol").data(g).join(
|
|
@@ -3062,7 +3065,7 @@ function vn(t, a, e, r, n = !1) {
|
|
|
3062
3065
|
);
|
|
3063
3066
|
(n ? m.transition().duration(b) : m).attr("cx", (y) => y.cx).attr("cy", (y) => y.cy).attr("r", c).attr("fill", (y) => i === At.Filled ? y.color : d).attr("stroke", (y) => y.color).attr("stroke-width", i === At.Hollow ? 1.5 : 0).attr("opacity", f);
|
|
3064
3067
|
} else {
|
|
3065
|
-
const m =
|
|
3068
|
+
const m = Zc[s] ?? p.symbolCircle, v = Math.PI * c * c, y = p.symbol().type(m).size(v);
|
|
3066
3069
|
t.selectAll("circle.bc-symbol").remove();
|
|
3067
3070
|
const x = t.selectAll("path.bc-symbol").data(g).join(
|
|
3068
3071
|
(L) => L.append("path").attr("class", "bc-symbol").attr("transform", (w) => `translate(${w.cx},${w.cy})`).attr("d", y).attr("fill", (w) => i === At.Filled ? w.color : d).attr("stroke", (w) => w.color).attr("stroke-width", i === At.Hollow ? 1.5 : 0).attr("opacity", f),
|
|
@@ -3072,10 +3075,10 @@ function vn(t, a, e, r, n = !1) {
|
|
|
3072
3075
|
(n ? x.transition().duration(b) : x).attr("transform", (L) => `translate(${L.cx},${L.cy})`).attr("d", y).attr("fill", (L) => i === At.Filled ? L.color : d).attr("stroke", (L) => L.color).attr("stroke-width", i === At.Hollow ? 1.5 : 0).attr("opacity", f);
|
|
3073
3076
|
}
|
|
3074
3077
|
}
|
|
3075
|
-
const
|
|
3076
|
-
class
|
|
3078
|
+
const Li = "#4e79a7";
|
|
3079
|
+
class Jc extends dt {
|
|
3077
3080
|
initialize() {
|
|
3078
|
-
this.configDefine("xPos", { defaultValue: (n, s) => 0 }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("color", { defaultValue:
|
|
3081
|
+
this.configDefine("xPos", { defaultValue: (n, s) => 0 }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("color", { defaultValue: Li }), this.configDefine("curve", { defaultValue: p.curveLinear }), this.configDefine("areaFill", { defaultValue: !1 }), this.configDefine("areaFillOpacity", { defaultValue: 0.2 }), this.configDefine("height", { defaultValue: 0 });
|
|
3079
3082
|
const a = this.base.append("g"), e = this.base.append("g"), r = this.base.append("g");
|
|
3080
3083
|
this.layer("area", a, {
|
|
3081
3084
|
dataBind: (n, s) => n.selectAll(".bc-area").data(this.config("areaFill") ? [s] : []),
|
|
@@ -3137,7 +3140,7 @@ class Qc extends dt {
|
|
|
3137
3140
|
});
|
|
3138
3141
|
}
|
|
3139
3142
|
}
|
|
3140
|
-
function
|
|
3143
|
+
function Kc(t, a, e = {}, r = !1) {
|
|
3141
3144
|
var me, ge, Te, ze, Fe, J, X, Ae, $e, Le, we, Ee, Ne;
|
|
3142
3145
|
qt(r), Dr(t);
|
|
3143
3146
|
let n = [], s = [], o = [], i = null, c = null, f, d;
|
|
@@ -3150,20 +3153,20 @@ function Jc(t, a, e = {}, r = !1) {
|
|
|
3150
3153
|
f.set(C, O);
|
|
3151
3154
|
t.replaceChildren();
|
|
3152
3155
|
}
|
|
3153
|
-
const { body: b } =
|
|
3156
|
+
const { body: b } = Ht(t, e.frame), m = Ot(b).width, v = Ca(a.values, (me = e.verticalAxis) == null ? void 0 : me.range, (ge = e.verticalAxis) == null ? void 0 : ge.numberFormat, (Te = e.verticalAxis) == null ? void 0 : Te.scaleType), y = na(m, (ze = e.verticalAxis) == null ? void 0 : ze.labelPosition, (Fe = e.horizontalAxis) == null ? void 0 : Fe.labelPosition, (J = e.verticalAxis) == null ? void 0 : J.direction, v), { chartArea: x, width: A, height: L, margin: w } = Wt(b, y), T = ra(d, w), I = Tr(a.labels, (X = e.horizontalAxis) == null ? void 0 : X.range), E = I.map((k) => a.labels[k]), j = I.map((k) => a.values[k]), B = E.map((k, M) => ({
|
|
3154
3157
|
label: k,
|
|
3155
3158
|
value: j[M]
|
|
3156
|
-
})), V = p.scalePoint().domain(E).range([0, A]).padding(e.edgePadding ? 0.6 : 0), Z = V, _ = (k) => V(k.label) ?? 0, ae = ((Ae = e.verticalAxis) == null ? void 0 : Ae.scaleType) === "log", [ie, re] =
|
|
3159
|
+
})), V = p.scalePoint().domain(E).range([0, A]).padding(e.edgePadding ? 0.6 : 0), Z = V, _ = (k) => V(k.label) ?? 0, ae = ((Ae = e.verticalAxis) == null ? void 0 : Ae.scaleType) === "log", [ie, re] = Ha(j, ($e = e.verticalAxis) == null ? void 0 : $e.range, (Le = e.verticalAxis) == null ? void 0 : Le.scaleType), F = ae ? p.scaleSymlog().domain([ie, re]).nice().range([L, 0]) : p.scaleLinear().domain([ie, re]).nice().range([L, 0]), R = F.domain(), W = R[0] < 0 && R[1] > 0 ? F(0) : void 0;
|
|
3157
3160
|
g.attach(x, T), g.update({
|
|
3158
3161
|
vertical: { scale: F, height: L, options: { ...e.verticalAxis, gridWidth: A, topPadding: w.top } },
|
|
3159
3162
|
horizontal: { scale: Z, height: L, options: { ...e.horizontalAxis, width: A, zeroY: W } }
|
|
3160
3163
|
});
|
|
3161
|
-
const oe = x.ownerSVGElement, le = sa(oe, t, "plot", { x: -1, y: -1, width: A + 2, height: L + 2 }), ke = p.select(x).append("g").attr("clip-path", `url(#${le})`), se = ke.node(), ve = ((we = e.colors) == null ? void 0 : we[0]) ??
|
|
3164
|
+
const oe = x.ownerSVGElement, le = sa(oe, t, "plot", { x: -1, y: -1, width: A + 2, height: L + 2 }), ke = p.select(x).append("g").attr("clip-path", `url(#${le})`), se = ke.node(), ve = ((we = e.colors) == null ? void 0 : we[0]) ?? Li, xe = $a(e.interpolation), be = e.lineSymbols, he = new Jc(p.select(se));
|
|
3162
3165
|
if (he.config({ xPos: _, y: F, color: ve, curve: xe, areaFill: e.areaFill ?? !1, areaFillOpacity: e.areaFillOpacity ?? 0.2, height: L }), s.length > 0 || n.length > 0 || o.length > 0) {
|
|
3163
3166
|
const k = (T == null ? void 0 : T.dx) ?? 0, M = (T == null ? void 0 : T.dy) ?? 0, C = se.querySelectorAll(":scope > g");
|
|
3164
3167
|
C[0] && wt(C[0], n, k, M), C[1] && wt(C[1], s, k, M), C[2] && wt(C[2], o, k, M);
|
|
3165
3168
|
}
|
|
3166
|
-
if (e.valueLabels && he.use(
|
|
3169
|
+
if (e.valueLabels && he.use(Si({ position: e.valueLabelPosition, orientation: ot.Vertical })), he.draw(B), (Ee = e.annotations) != null && Ee.length && zr(x, e.annotations, { scaleX: Z, scaleY: F, data: B, width: A, height: L, backgroundColor: Bt(t), transition: r, priorAnnotations: f }), p.select(se).selectAll(".bc-dot").attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none"), e.tooltips || e.crosshair) {
|
|
3167
3170
|
const k = B.map((M) => ({
|
|
3168
3171
|
cx: _(M),
|
|
3169
3172
|
cy: F(M.value),
|
|
@@ -3196,7 +3199,7 @@ function Jc(t, a, e = {}, r = !1) {
|
|
|
3196
3199
|
}
|
|
3197
3200
|
Ut(t, { chartType: "line", margin: w }), c && (Vt(ke.node()), Gt(t, c));
|
|
3198
3201
|
}
|
|
3199
|
-
const xn = 28,
|
|
3202
|
+
const xn = 28, $i = 18, Ci = 20;
|
|
3200
3203
|
function An(t, a, e, r = xn) {
|
|
3201
3204
|
if (t.length === 0)
|
|
3202
3205
|
return [];
|
|
@@ -3213,8 +3216,8 @@ function An(t, a, e, r = xn) {
|
|
|
3213
3216
|
}
|
|
3214
3217
|
return c;
|
|
3215
3218
|
}
|
|
3216
|
-
function
|
|
3217
|
-
const { outerRadius: r, fontSize: n = 12, bgColor: s = "#fff" } = e, o = r + 2, i = o +
|
|
3219
|
+
function Mi(t, a, e) {
|
|
3220
|
+
const { outerRadius: r, fontSize: n = 12, bgColor: s = "#fff" } = e, o = r + 2, i = o + $i, c = xn / i, f = [], d = [];
|
|
3218
3221
|
for (const b of a) {
|
|
3219
3222
|
const m = (b.startAngle + b.endAngle) / 2;
|
|
3220
3223
|
m < Math.PI ? d.push({ ...b, midAngle: m }) : f.push({ ...b, midAngle: m });
|
|
@@ -3228,22 +3231,22 @@ function Ci(t, a, e) {
|
|
|
3228
3231
|
const E = T.showLabel !== !1, j = T.showValue !== !1;
|
|
3229
3232
|
if (!E && !j)
|
|
3230
3233
|
return;
|
|
3231
|
-
const V = A[I] - Math.PI / 2, Z = Math.cos(V) * o, _ = Math.sin(V) * o, ae = Math.cos(V) * i, ie = Math.sin(V) * i, re = ae + L *
|
|
3234
|
+
const V = A[I] - Math.PI / 2, Z = Math.cos(V) * o, _ = Math.sin(V) * o, ae = Math.cos(V) * i, ie = Math.sin(V) * i, re = ae + L * Ci;
|
|
3232
3235
|
w.append("polyline").attr("class", "bc-arc-label-line").attr("points", `${Z},${_} ${ae},${ie} ${re},${ie}`).attr("fill", "none").attr("stroke", "var(--bc-text-color, #999)").attr("stroke-width", 1).attr("opacity", 0.5);
|
|
3233
|
-
const F = re + L * 4,
|
|
3234
|
-
if (E &&
|
|
3236
|
+
const F = re + L * 4, R = w.append("text").attr("class", "bc-arc-direct-label").attr("x", F).attr("y", ie).attr("text-anchor", m ? "start" : "end").attr("font-size", `${n}px`);
|
|
3237
|
+
if (E && R.append("tspan").attr("x", F).attr("dy", j ? "-0.1em" : "0.35em").attr("font-weight", "bold").attr("fill", gi(T.color, s)).text(T.label), j) {
|
|
3235
3238
|
const W = T.displayAsPercentage && T.percentage != null ? `${Math.round(T.percentage)}%` : String(T.value);
|
|
3236
|
-
|
|
3239
|
+
R.append("tspan").attr("x", F).attr("dy", E ? "1.2em" : "0.35em").attr("fill", "var(--bc-text-color, #666)").text(W);
|
|
3237
3240
|
}
|
|
3238
3241
|
});
|
|
3239
3242
|
}
|
|
3240
3243
|
g(d, !0), g(f, !1);
|
|
3241
3244
|
}
|
|
3242
|
-
const
|
|
3243
|
-
function
|
|
3245
|
+
const Oi = 0.3;
|
|
3246
|
+
function Pi(t, a, e) {
|
|
3244
3247
|
const { outerRadius: r, innerRadius: n = 0, fontSize: s = 12 } = e, o = (n + r) / 2, i = t.append("g").attr("class", "bc-arc-labels-inside");
|
|
3245
3248
|
for (const c of a) {
|
|
3246
|
-
if (c.endAngle - c.startAngle <
|
|
3249
|
+
if (c.endAngle - c.startAngle < Oi)
|
|
3247
3250
|
continue;
|
|
3248
3251
|
const d = c.showLabel !== !1, g = c.showValue !== !1;
|
|
3249
3252
|
if (!d && !g)
|
|
@@ -3255,21 +3258,21 @@ function Oi(t, a, e) {
|
|
|
3255
3258
|
}
|
|
3256
3259
|
}
|
|
3257
3260
|
}
|
|
3258
|
-
function
|
|
3261
|
+
function ef(t, a, e) {
|
|
3259
3262
|
const { outerRadius: r, innerRadius: n = 0, fontSize: s = 12, bgColor: o } = e, i = (n + r) / 2, c = [], f = [];
|
|
3260
3263
|
for (const d of a) {
|
|
3261
3264
|
const g = d.endAngle - d.startAngle, b = g * i, m = d.label.length * 7;
|
|
3262
|
-
b > m * 1.2 && g >=
|
|
3265
|
+
b > m * 1.2 && g >= Oi ? c.push(d) : f.push(d);
|
|
3263
3266
|
}
|
|
3264
|
-
c.length > 0 &&
|
|
3267
|
+
c.length > 0 && Pi(t, c, { outerRadius: r, innerRadius: n, fontSize: s }), f.length > 0 && Mi(t, f, { outerRadius: r, fontSize: s, bgColor: o });
|
|
3265
3268
|
}
|
|
3266
|
-
function
|
|
3269
|
+
function tf(t, a) {
|
|
3267
3270
|
if (t.length === 0)
|
|
3268
3271
|
return { left: 0, right: 0, top: 0, bottom: 0 };
|
|
3269
|
-
const e = Math.max(...t.map((i) => i.length)), r =
|
|
3272
|
+
const e = Math.max(...t.map((i) => i.length)), r = $i + Ci + 6 + 4 + e * 7 + 6, s = t.length * xn / 2, o = Math.max(10, s - a + 20);
|
|
3270
3273
|
return { left: r, right: r, top: o, bottom: o };
|
|
3271
3274
|
}
|
|
3272
|
-
const
|
|
3275
|
+
const Ti = [
|
|
3273
3276
|
"#4e79a7",
|
|
3274
3277
|
"#f28e2b",
|
|
3275
3278
|
"#e15759",
|
|
@@ -3279,9 +3282,9 @@ const Pi = [
|
|
|
3279
3282
|
"#b07aa1",
|
|
3280
3283
|
"#ff9da7"
|
|
3281
3284
|
];
|
|
3282
|
-
class
|
|
3285
|
+
class af extends dt {
|
|
3283
3286
|
initialize() {
|
|
3284
|
-
this.configDefine("xPos", { defaultValue: (n) => 0 }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("colors", { defaultValue:
|
|
3287
|
+
this.configDefine("xPos", { defaultValue: (n) => 0 }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("colors", { defaultValue: Ti }), this.configDefine("labels", { defaultValue: [] }), this.configDefine("curve", { defaultValue: p.curveLinear }), this.configDefine("areaFill", { defaultValue: !1 }), this.configDefine("areaFillOpacity", { defaultValue: 0.2 }), this.configDefine("height", { defaultValue: 0 }), this.configDefine("dots", { defaultValue: [] }), this.configDefine("highlightTargets", { defaultValue: /* @__PURE__ */ new Set() });
|
|
3285
3288
|
const a = this.base.append("g"), e = this.base.append("g"), r = this.base.append("g");
|
|
3286
3289
|
this.layer("areas", a, {
|
|
3287
3290
|
dataBind: (n, s) => n.selectAll(".bc-area").data(this.config("areaFill") ? s : [], (o) => o.name),
|
|
@@ -3349,8 +3352,8 @@ class tf extends dt {
|
|
|
3349
3352
|
});
|
|
3350
3353
|
}
|
|
3351
3354
|
}
|
|
3352
|
-
function
|
|
3353
|
-
var zt, ue, P, de,
|
|
3355
|
+
function rf(t, a, e = {}, r = !1) {
|
|
3356
|
+
var zt, ue, P, de, H, Me, qe, rt, lt, nt, Dt, Rt, ca;
|
|
3354
3357
|
qt(r), Dr(t);
|
|
3355
3358
|
let n = a, s = [], o = [], i = [], c = [], f = null, d, g;
|
|
3356
3359
|
const b = Yt.for(t);
|
|
@@ -3358,25 +3361,25 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3358
3361
|
const te = Xt(t);
|
|
3359
3362
|
g = te == null ? void 0 : te.margin, b.detach(), (te == null ? void 0 : te.chartType) === "line-multi" ? (s = Array.from(t.querySelectorAll(".bc-frame .bc-area")), o = Array.from(t.querySelectorAll(".bc-frame .bc-line")), i = Array.from(t.querySelectorAll(".bc-frame .bc-dot")), c = Array.from(t.querySelectorAll(".bc-frame .bc-symbols"))) : te && (f = _t(t)), d = /* @__PURE__ */ new Map();
|
|
3360
3363
|
for (const ye of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
3361
|
-
for (const [_e,
|
|
3362
|
-
d.set(_e,
|
|
3364
|
+
for (const [_e, Re] of Pt(ye))
|
|
3365
|
+
d.set(_e, Re);
|
|
3363
3366
|
t.replaceChildren();
|
|
3364
3367
|
}
|
|
3365
|
-
const { body: m } =
|
|
3368
|
+
const { body: m } = Ht(t, e.frame), v = n.series ?? [];
|
|
3366
3369
|
let y = v.filter((te) => !za(te.name, e.seriesOverrides));
|
|
3367
3370
|
(e.sortMode === "total" || e.sortMode === "within-groups") && (y = [...y].sort((te, ye) => {
|
|
3368
3371
|
const _e = te.values.reduce((st, it) => st + it, 0);
|
|
3369
3372
|
return ye.values.reduce((st, it) => st + it, 0) - _e;
|
|
3370
3373
|
}));
|
|
3371
|
-
const x = e.colors ??
|
|
3374
|
+
const x = e.colors ?? Ti, A = y.map((te) => te.name), L = la(e.colorizes), w = e.seriesOverrides, T = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", I = T ? "direct" : e.legend !== !1 ? "legend" : "none", E = A.filter((te) => ma(te, I, w) === "direct"), j = e.legend !== !1 && !T, B = Ot(m).width, V = 350, Z = e.legendPosition ?? "top", _ = B > 0 && B < V && (Z === "left" || Z === "right") ? "top" : Z, ae = e.legendAnchor ?? "start", ie = Tr(n.labels, (zt = e.horizontalAxis) == null ? void 0 : zt.range), re = ie.map((te) => n.labels[te]);
|
|
3372
3375
|
y = y.map((te) => ({ ...te, values: ie.map((ye) => te.values[ye]) })), n = { ...n, labels: re, series: y };
|
|
3373
|
-
const F = y.flatMap((te) => te.values),
|
|
3376
|
+
const F = y.flatMap((te) => te.values), R = Ca(F, (ue = e.verticalAxis) == null ? void 0 : ue.range, (P = e.verticalAxis) == null ? void 0 : P.numberFormat, (de = e.verticalAxis) == null ? void 0 : de.scaleType), W = na(B, (H = e.verticalAxis) == null ? void 0 : H.labelPosition, (Me = e.horizontalAxis) == null ? void 0 : Me.labelPosition, (qe = e.verticalAxis) == null ? void 0 : qe.direction, R), oe = E.length > 0 ? Ai(E) : 0, le = W.top != null, ke = Math.max(0, B - (W.left ?? 50) - (W.right ?? 20) - oe), se = j ? wa(A, _, ke) : { width: 0, height: 0 }, ve = j ? se.height + 15 : 0, xe = { ...W };
|
|
3374
3377
|
if (j && _ === "top") {
|
|
3375
3378
|
const te = le ? 15 : 0;
|
|
3376
3379
|
xe.top = ve + te;
|
|
3377
3380
|
}
|
|
3378
3381
|
j && _ === "bottom" && (xe.bottom = (xe.bottom ?? 24) + ve), j && _ === "left" && (xe.left = (xe.left ?? 50) + se.width + 10), j && _ === "right" && (xe.right = (xe.right ?? 20) + se.width + 10), oe > 0 && (xe.right = (xe.right ?? 20) + oe);
|
|
3379
|
-
const { chartArea: be, width: he, height: me, margin: ge } = Wt(m, xe), Te = ra(g, ge), [ze, Fe] =
|
|
3382
|
+
const { chartArea: be, width: he, height: me, margin: ge } = Wt(m, xe), Te = ra(g, ge), [ze, Fe] = Ha(F, (rt = e.verticalAxis) == null ? void 0 : rt.range, (lt = e.verticalAxis) == null ? void 0 : lt.scaleType), J = p.scalePoint().domain(n.labels).range([0, he]).padding(e.edgePadding ? 0.6 : 0), X = J, Ae = (te) => J(n.labels[te]) ?? 0, Le = ((nt = e.verticalAxis) == null ? void 0 : nt.scaleType) === "log" ? p.scaleSymlog().domain([ze, Fe]).nice().range([me, 0]) : p.scaleLinear().domain([ze, Fe]).nice().range([me, 0]), we = Le.domain(), Ee = we[0] < 0 && we[1] > 0 ? Le(0) : void 0;
|
|
3380
3383
|
b.attach(be, Te), b.update({
|
|
3381
3384
|
vertical: { scale: Le, height: me, options: { ...e.verticalAxis, gridWidth: he, topPadding: ge.top } },
|
|
3382
3385
|
horizontal: { scale: X, height: me, options: { ...e.horizontalAxis, width: he, zeroY: Ee } }
|
|
@@ -3386,11 +3389,11 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3386
3389
|
values: te.values,
|
|
3387
3390
|
colorIndex: v.findIndex((ye) => ye.name === te.name)
|
|
3388
3391
|
})), K = $a(e.interpolation);
|
|
3389
|
-
(Dt = e.areaFills) != null && Dt.length &&
|
|
3392
|
+
(Dt = e.areaFills) != null && Dt.length && nf(C, e.areaFills, y, Ae, n.labels.length, Le, K);
|
|
3390
3393
|
const U = [];
|
|
3391
3394
|
y.forEach((te, ye) => {
|
|
3392
|
-
n.labels.forEach((_e,
|
|
3393
|
-
U.push({ label: _e, value: te.values[
|
|
3395
|
+
n.labels.forEach((_e, Re) => {
|
|
3396
|
+
U.push({ label: _e, value: te.values[Re], series: te.name, colorIndex: ye });
|
|
3394
3397
|
});
|
|
3395
3398
|
});
|
|
3396
3399
|
const G = e.lineSymbols, Q = {
|
|
@@ -3398,7 +3401,7 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3398
3401
|
dotted: "2,4",
|
|
3399
3402
|
dashed: "8,4",
|
|
3400
3403
|
"dash-dot": "8,4,2,4"
|
|
3401
|
-
}, ne = e.valueLabels ?? !1, Se = new Set((e.highlights ?? []).map((te) => te.target)), Y = new
|
|
3404
|
+
}, ne = e.valueLabels ?? !1, Se = new Set((e.highlights ?? []).map((te) => te.target)), Y = new af(p.select(C));
|
|
3402
3405
|
Y.config({ xPos: Ae, y: Le, colors: x, labels: n.labels, curve: K, areaFill: e.areaFill ?? !1, areaFillOpacity: e.areaFillOpacity ?? 0.2, height: me, dots: U, highlightTargets: Se });
|
|
3403
3406
|
const ce = new Set(O.map((te) => te.name)), Ce = s.filter((te) => {
|
|
3404
3407
|
var ye;
|
|
@@ -3414,12 +3417,12 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3414
3417
|
const te = (Te == null ? void 0 : Te.dx) ?? 0, ye = (Te == null ? void 0 : Te.dy) ?? 0, _e = C.querySelectorAll(":scope > g");
|
|
3415
3418
|
_e[0] && wt(_e[0], Ce, te, ye), _e[1] && wt(_e[1], Pe, te, ye), _e[2] && wt(_e[2], Ge, te, ye);
|
|
3416
3419
|
}
|
|
3417
|
-
if (Y.draw(O), (
|
|
3420
|
+
if (Y.draw(O), (Rt = e.annotations) != null && Rt.length) {
|
|
3418
3421
|
const te = n.labels.map((ye, _e) => {
|
|
3419
|
-
var
|
|
3422
|
+
var Re;
|
|
3420
3423
|
return {
|
|
3421
3424
|
label: ye,
|
|
3422
|
-
value: ((
|
|
3425
|
+
value: ((Re = y[0]) == null ? void 0 : Re.values[_e]) ?? 0
|
|
3423
3426
|
};
|
|
3424
3427
|
});
|
|
3425
3428
|
zr(be, e.annotations, { scaleX: X, scaleY: Le, data: te, width: he, height: me, backgroundColor: Bt(t), transition: r, priorAnnotations: d });
|
|
@@ -3431,14 +3434,14 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3431
3434
|
const ye = Ae(n.labels.indexOf(te.label)), _e = Le(te.value);
|
|
3432
3435
|
Ue.append("text").attr("class", "bc-value-label").attr("data-series", te.colorIndex).attr("x", ye).attr("y", _e - 8).attr("text-anchor", "middle").attr("font-size", "11px").attr("fill", "currentColor").text(String(te.value));
|
|
3433
3436
|
}), p.select(C).selectAll(".bc-line").each(function(te) {
|
|
3434
|
-
const ye = te, _e = Xe(ye.name, ye.colorIndex, x, w),
|
|
3435
|
-
if (jt.attr("stroke", L.get(ye.name) ?? _e).attr("stroke-width",
|
|
3437
|
+
const ye = te, _e = Xe(ye.name, ye.colorIndex, x, w), Re = Gc(ye.name, w), st = _c(ye.name, w), it = wi(ye.name, e.interpolation ?? "linear", w), jt = r ? p.select(this).transition().duration(Ve()) : p.select(this);
|
|
3438
|
+
if (jt.attr("stroke", L.get(ye.name) ?? _e).attr("stroke-width", Re), jt.attr("opacity", at(Se, ye.name, 1)), st !== "solid" && p.select(this).attr("stroke-dasharray", Q[st] ?? ""), it !== (e.interpolation ?? "linear")) {
|
|
3436
3439
|
const pa = $a(it), Ea = p.line().curve(pa).x((Zt, Jr) => Ae(Jr)).y((Zt) => Le(Zt));
|
|
3437
3440
|
jt.attr("d", Ea(ye.values));
|
|
3438
3441
|
}
|
|
3439
3442
|
}), p.select(C).selectAll(".bc-area").each(function(te) {
|
|
3440
|
-
const ye = te, _e = Xe(ye.name, ye.colorIndex, x, w),
|
|
3441
|
-
|
|
3443
|
+
const ye = te, _e = Xe(ye.name, ye.colorIndex, x, w), Re = r ? p.select(this).transition().duration(Ve()) : p.select(this);
|
|
3444
|
+
Re.attr("fill", L.get(ye.name) ?? _e), Re.attr("opacity", at(Se, ye.name, e.areaFillOpacity ?? 0.2));
|
|
3442
3445
|
}), p.select(C).selectAll(".bc-dot").attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none"), e.tooltips || e.crosshair) {
|
|
3443
3446
|
const te = U.map((ye) => ({
|
|
3444
3447
|
cx: Ae(n.labels.indexOf(ye.label)),
|
|
@@ -3469,10 +3472,10 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3469
3472
|
symbolOpacity: G.opacity
|
|
3470
3473
|
} : void 0, Ke = n.labels.length;
|
|
3471
3474
|
y.forEach((te, ye) => {
|
|
3472
|
-
const _e =
|
|
3475
|
+
const _e = Yc(te.name, Ze, w);
|
|
3473
3476
|
if (!_e)
|
|
3474
3477
|
return;
|
|
3475
|
-
const
|
|
3478
|
+
const Re = {
|
|
3476
3479
|
symbol: _e.symbolShape ?? (G == null ? void 0 : G.symbol) ?? Et.Circle,
|
|
3477
3480
|
showOn: _e.symbolShowOn ?? (G == null ? void 0 : G.showOn) ?? Nt.FirstLast,
|
|
3478
3481
|
style: _e.symbolStyle ?? (G == null ? void 0 : G.style) ?? At.Filled,
|
|
@@ -3485,38 +3488,38 @@ function af(t, a, e = {}, r = !1) {
|
|
|
3485
3488
|
index: Zt
|
|
3486
3489
|
})), it = c.find((Ea) => Ea.getAttribute("data-series-name") === te.name);
|
|
3487
3490
|
let jt, pa = !1;
|
|
3488
|
-
it ? (be.appendChild(it), jt = p.select(it), pa = !0) : jt = p.select(be).append("g").attr("class", "bc-symbols").attr("data-series", ye).attr("data-series-name", te.name), vn(jt, st, Ke,
|
|
3491
|
+
it ? (be.appendChild(it), jt = p.select(it), pa = !0) : jt = p.select(be).append("g").attr("class", "bc-symbols").attr("data-series", ye).attr("data-series-name", te.name), vn(jt, st, Ke, Re, r && pa);
|
|
3489
3492
|
});
|
|
3490
3493
|
const ut = n.labels.length - 1, ht = Ae(ut) + 6, je = [];
|
|
3491
3494
|
if (y.forEach((te, ye) => {
|
|
3492
3495
|
var it;
|
|
3493
3496
|
if (ma(te.name, I, w) !== "direct")
|
|
3494
3497
|
return;
|
|
3495
|
-
const
|
|
3496
|
-
je.push({ name: te.name, index: ye, naturalY: Le(
|
|
3498
|
+
const Re = te.values[ut], st = ((it = w == null ? void 0 : w.find((jt) => jt.name === te.name)) == null ? void 0 : it.labelText) || te.name;
|
|
3499
|
+
je.push({ name: te.name, index: ye, naturalY: Le(Re), text: st });
|
|
3497
3500
|
}), je.length > 0) {
|
|
3498
|
-
je.sort((
|
|
3499
|
-
const te = je.map((
|
|
3500
|
-
je.forEach((
|
|
3501
|
-
p.select(be).append("text").attr("class", "bc-direct-label").attr("data-series",
|
|
3501
|
+
je.sort((Re, st) => Re.naturalY - st.naturalY);
|
|
3502
|
+
const te = je.map((Re) => Re.naturalY), _e = An(te, 0, me, 14);
|
|
3503
|
+
je.forEach((Re, st) => {
|
|
3504
|
+
p.select(be).append("text").attr("class", "bc-direct-label").attr("data-series", Re.index).attr("x", ht).attr("y", _e[st]).attr("dy", "0.35em").attr("font-size", "11px").attr("fill", Xe(Re.name, Re.index, x, w)).text(Re.text);
|
|
3502
3505
|
});
|
|
3503
3506
|
}
|
|
3504
3507
|
const Tt = A.filter((te) => ma(te, I, w) === "legend");
|
|
3505
3508
|
if (j && Tt.length > 0) {
|
|
3506
|
-
const te = Tt.map((
|
|
3507
|
-
const st = v.findIndex((it) => it.name ===
|
|
3508
|
-
return Xe(
|
|
3509
|
+
const te = Tt.map((Re) => {
|
|
3510
|
+
const st = v.findIndex((it) => it.name === Re);
|
|
3511
|
+
return Xe(Re, st, x, w);
|
|
3509
3512
|
});
|
|
3510
3513
|
let ye = 0, _e = 0;
|
|
3511
3514
|
if (_ === "top") {
|
|
3512
|
-
const
|
|
3513
|
-
_e = -(se.height + 10 +
|
|
3515
|
+
const Re = le ? 15 : 0;
|
|
3516
|
+
_e = -(se.height + 10 + Re);
|
|
3514
3517
|
} else _ === "bottom" ? _e = me + 25 : _ === "left" ? ye = -(se.width + 10) : _ === "right" && (ye = he + 10);
|
|
3515
3518
|
xa(be, Tt, te, _e, _, ae, he, me, ye, [], { left: ge.left, right: ge.right });
|
|
3516
3519
|
}
|
|
3517
3520
|
Ut(t, { chartType: "line-multi", margin: ge }), f && (Vt(M.node()), Gt(t, f));
|
|
3518
3521
|
}
|
|
3519
|
-
function
|
|
3522
|
+
function nf(t, a, e, r, n, s, o) {
|
|
3520
3523
|
const i = p.select(t).append("g").attr("class", "bc-area-fills");
|
|
3521
3524
|
for (const c of a) {
|
|
3522
3525
|
const f = e.find((y) => y.name === c.from), d = e.find((y) => y.name === c.to);
|
|
@@ -3524,14 +3527,14 @@ function rf(t, a, e, r, n, s, o) {
|
|
|
3524
3527
|
continue;
|
|
3525
3528
|
const g = c.interpolation ? $a(c.interpolation) : o, b = (c.opacity ?? 30) / 100, m = c.color ?? "#ccc", v = c.negativeColor;
|
|
3526
3529
|
if (v)
|
|
3527
|
-
|
|
3530
|
+
of(i, f.values, d.values, r, s, g, m, v, b);
|
|
3528
3531
|
else {
|
|
3529
3532
|
const y = p.area().curve(g).x((x, A) => r(A)).y0((x, A) => s(d.values[A])).y1((x) => s(x));
|
|
3530
3533
|
i.append("path").attr("class", "bc-area-fill").attr("d", y(f.values) ?? "").attr("fill", m).attr("opacity", b);
|
|
3531
3534
|
}
|
|
3532
3535
|
}
|
|
3533
3536
|
}
|
|
3534
|
-
function
|
|
3537
|
+
function sf(t, a, e, r) {
|
|
3535
3538
|
const n = t - e, s = a - r;
|
|
3536
3539
|
if (n === 0 && s === 0 || n > 0 && s > 0 || n < 0 && s < 0)
|
|
3537
3540
|
return null;
|
|
@@ -3541,7 +3544,7 @@ function nf(t, a, e, r) {
|
|
|
3541
3544
|
const i = -n / o;
|
|
3542
3545
|
return i < 0 || i > 1 ? null : i;
|
|
3543
3546
|
}
|
|
3544
|
-
function
|
|
3547
|
+
function of(t, a, e, r, n, s, o, i, c) {
|
|
3545
3548
|
const f = a.length;
|
|
3546
3549
|
if (f === 0)
|
|
3547
3550
|
return;
|
|
@@ -3549,7 +3552,7 @@ function sf(t, a, e, r, n, s, o, i, c) {
|
|
|
3549
3552
|
for (let v = 0; v < f; v++) {
|
|
3550
3553
|
const y = r(v), x = n(a[v]), A = n(e[v]);
|
|
3551
3554
|
if (d.push({ x: y, fromY: x, toY: A }), v < f - 1) {
|
|
3552
|
-
const L = n(a[v + 1]), w = n(e[v + 1]), T =
|
|
3555
|
+
const L = n(a[v + 1]), w = n(e[v + 1]), T = sf(x, L, A, w);
|
|
3553
3556
|
if (T !== null && T > 0 && T < 1) {
|
|
3554
3557
|
const I = y + T * (r(v + 1) - y), E = x + T * (L - x), j = A + T * (w - A);
|
|
3555
3558
|
d.push({ x: I, fromY: E, toY: j });
|
|
@@ -3573,7 +3576,7 @@ function sf(t, a, e, r, n, s, o, i, c) {
|
|
|
3573
3576
|
x += "Z", t.append("path").attr("class", `bc-area-fill ${v.positive ? "bc-area-fill-pos" : "bc-area-fill-neg"}`).attr("d", x).attr("fill", v.positive ? o : i).attr("opacity", c);
|
|
3574
3577
|
}
|
|
3575
3578
|
}
|
|
3576
|
-
const
|
|
3579
|
+
const lf = [
|
|
3577
3580
|
"#4e79a7",
|
|
3578
3581
|
"#f28e2b",
|
|
3579
3582
|
"#e15759",
|
|
@@ -3583,14 +3586,14 @@ const of = [
|
|
|
3583
3586
|
"#b07aa1",
|
|
3584
3587
|
"#ff9da7"
|
|
3585
3588
|
];
|
|
3586
|
-
class
|
|
3589
|
+
class cf extends dt {
|
|
3587
3590
|
initialize() {
|
|
3588
3591
|
}
|
|
3589
3592
|
}
|
|
3590
|
-
function
|
|
3591
|
-
|
|
3593
|
+
function ff(t, a, e = {}, r = !1) {
|
|
3594
|
+
zi(t, a, e, 0.6, r);
|
|
3592
3595
|
}
|
|
3593
|
-
function
|
|
3596
|
+
function zi(t, a, e, r, n = !1) {
|
|
3594
3597
|
var Fe;
|
|
3595
3598
|
qt(n);
|
|
3596
3599
|
let s = null, o;
|
|
@@ -3602,7 +3605,7 @@ function Ti(t, a, e, r, n = !1) {
|
|
|
3602
3605
|
o.set($e, Le);
|
|
3603
3606
|
t.replaceChildren();
|
|
3604
3607
|
}
|
|
3605
|
-
const { body: i } =
|
|
3608
|
+
const { body: i } = Ht(t, e.frame);
|
|
3606
3609
|
let c = [...a.labels], f = [...a.values];
|
|
3607
3610
|
if (e.sort === ft.Ascending || e.sort === ft.Descending) {
|
|
3608
3611
|
const J = c.map((X, Ae) => ({ label: X, value: f[Ae] }));
|
|
@@ -3612,12 +3615,12 @@ function Ti(t, a, e, r, n = !1) {
|
|
|
3612
3615
|
const J = e.sliceMax - 1, X = c.slice(0, J), Ae = f.slice(0, J), $e = f.slice(J).reduce((Le, we) => Le + we, 0);
|
|
3613
3616
|
X.push(e.sliceGroupLabel ?? "Others"), Ae.push($e), c = X, f = Ae;
|
|
3614
3617
|
}
|
|
3615
|
-
const d = f.reduce((J, X) => J + X, 0), g = f.map((J) => d > 0 ? J / d * 100 : 0), b = e.colors ??
|
|
3618
|
+
const d = f.reduce((J, X) => J + X, 0), g = f.map((J) => d > 0 ? J / d * 100 : 0), b = e.colors ?? lf, m = b.length < c.length && b.length >= 2 ? He.scale(b).mode("lch").colors(c.length) : b, v = typeof e.directLabelling == "string" ? e.directLabelling : e.directLabelling ? vt.Auto : vt.Off, y = !!v && !(v === vt.Auto && e.legend === !0), A = (e.showValues ?? !0) && !y ? f.map((J, X) => `(${e.displayAsPercentage ? `${Math.round(g[X])}%` : String(J)})`) : [], L = e.legend !== !1 && !y, w = Ot(i).width, T = 350, I = e.legendPosition ?? "top", E = w > 0 && w < T && (I === "left" || I === "right") ? "top" : I, j = e.legendAnchor ?? "start", B = A.length > 0 ? c.map((J, X) => `${J} ${A[X]}`) : c, V = Math.max(0, w - 50 - 20), Z = L ? wa(B, E, V) : { width: 0, height: 0 }, _ = L ? Z.height + 15 : 0, ae = {};
|
|
3616
3619
|
if (L && E === "top" && (ae.top = _), L && E === "bottom" && (ae.bottom = 24 + _), L && E === "left" && (ae.left = 50 + Z.width + 10), L && E === "right" && (ae.right = 20 + Z.width + 10), y) {
|
|
3617
|
-
const J = Ot(i), X = 20, Ae = J.width - 2 * X, $e = (J.height > 0 ? J.height : 400) - 2 * X, Le = Math.min(Ae, $e) / 2, we =
|
|
3620
|
+
const J = Ot(i), X = 20, Ae = J.width - 2 * X, $e = (J.height > 0 ? J.height : 400) - 2 * X, Le = Math.min(Ae, $e) / 2, we = tf(c, Le);
|
|
3618
3621
|
ae.left = (ae.left ?? X) + we.left, ae.right = (ae.right ?? X) + we.right, ae.top = (ae.top ?? X) + we.top, ae.bottom = (ae.bottom ?? X) + we.bottom;
|
|
3619
3622
|
}
|
|
3620
|
-
const { chartArea: ie, width: re, height: F, margin:
|
|
3623
|
+
const { chartArea: ie, width: re, height: F, margin: R } = Wt(i, ae), W = Math.min(re, F) / 2, oe = W * r, le = p.scaleOrdinal().domain(c).range(m), ke = p.pie().sort(null), se = p.arc().innerRadius(oe).outerRadius(W), ve = p.select(ie).append("g").attr("transform", `translate(${re / 2},${F / 2})`), xe = la(e.colorizes), be = ke(f), he = be.map((J, X) => ({
|
|
3621
3624
|
label: c[X],
|
|
3622
3625
|
arc: J,
|
|
3623
3626
|
color: xe.get(c[X]) ?? le(c[X])
|
|
@@ -3634,7 +3637,7 @@ function Ti(t, a, e, r, n = !1) {
|
|
|
3634
3637
|
return ge.size > 0 ? { ...X, opacity: at(ge, J.label) } : X;
|
|
3635
3638
|
}
|
|
3636
3639
|
});
|
|
3637
|
-
const ze = new
|
|
3640
|
+
const ze = new cf(ve);
|
|
3638
3641
|
if (e.tooltips && ze.use(Aa()), ze.draw(he), (Fe = e.annotations) != null && Fe.length) {
|
|
3639
3642
|
const J = e.annotations.filter((X) => X.kind === "free");
|
|
3640
3643
|
J.length && Wa(J, {
|
|
@@ -3660,7 +3663,7 @@ function Ti(t, a, e, r, n = !1) {
|
|
|
3660
3663
|
showLabel: e.showLabels ?? !0,
|
|
3661
3664
|
showValue: e.showValues ?? !0
|
|
3662
3665
|
})), X = ve, Ae = Bt(t), $e = { outerRadius: W, innerRadius: oe, bgColor: Ae };
|
|
3663
|
-
v === vt.Inside ?
|
|
3666
|
+
v === vt.Inside ? Pi(X, J, $e) : v === vt.Auto ? ef(X, J, $e) : Mi(X, J, $e);
|
|
3664
3667
|
}
|
|
3665
3668
|
if (e.showTotal && r > 0 && !e.displayAsPercentage) {
|
|
3666
3669
|
const J = String(d);
|
|
@@ -3668,17 +3671,17 @@ function Ti(t, a, e, r, n = !1) {
|
|
|
3668
3671
|
}
|
|
3669
3672
|
if (L) {
|
|
3670
3673
|
let J = 0, X = 0;
|
|
3671
|
-
E === "top" ? X = -(Z.height + 10) : E === "bottom" ? X = F + 25 : E === "left" ? J = -(Z.width + 10) : E === "right" && (J = re + 10), xa(ie, c, m, X, E, j, re, F, J, A, { left:
|
|
3674
|
+
E === "top" ? X = -(Z.height + 10) : E === "bottom" ? X = F + 25 : E === "left" ? J = -(Z.width + 10) : E === "right" && (J = re + 10), xa(ie, c, m, X, E, j, re, F, J, A, { left: R.left, right: R.right });
|
|
3672
3675
|
}
|
|
3673
3676
|
Ut(t, { chartType: r > 0 ? "donut" : "pie" }), s && (Vt(ve.node()), Gt(t, s));
|
|
3674
3677
|
}
|
|
3675
|
-
function
|
|
3676
|
-
|
|
3678
|
+
function df(t, a, e = {}, r = !1) {
|
|
3679
|
+
zi(t, a, e, 0, r);
|
|
3677
3680
|
}
|
|
3678
|
-
const
|
|
3679
|
-
class
|
|
3681
|
+
const Di = "#4e79a7";
|
|
3682
|
+
class uf extends dt {
|
|
3680
3683
|
initialize() {
|
|
3681
|
-
this.configDefine("xPos", { defaultValue: (n, s) => 0 }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("color", { defaultValue:
|
|
3684
|
+
this.configDefine("xPos", { defaultValue: (n, s) => 0 }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("color", { defaultValue: Di }), this.configDefine("curve", { defaultValue: p.curveMonotoneX }), this.configDefine("areaFillOpacity", { defaultValue: 0.25 }), this.configDefine("height", { defaultValue: 0 });
|
|
3682
3685
|
const a = this.base.append("g"), e = this.base.append("g"), r = this.base.append("g");
|
|
3683
3686
|
this.layer("area", a, {
|
|
3684
3687
|
dataBind: (n, s) => n.selectAll(".bc-area").data([s]),
|
|
@@ -3740,7 +3743,7 @@ class df extends dt {
|
|
|
3740
3743
|
});
|
|
3741
3744
|
}
|
|
3742
3745
|
}
|
|
3743
|
-
function
|
|
3746
|
+
function hf(t, a, e = {}, r = !1) {
|
|
3744
3747
|
var me, ge, Te, ze, Fe, J, X, Ae, $e, Le, we, Ee, Ne;
|
|
3745
3748
|
qt(r), Dr(t);
|
|
3746
3749
|
let n = [], s = [], o = [], i = null, c = null, f, d;
|
|
@@ -3753,20 +3756,20 @@ function uf(t, a, e = {}, r = !1) {
|
|
|
3753
3756
|
f.set(C, O);
|
|
3754
3757
|
t.replaceChildren();
|
|
3755
3758
|
}
|
|
3756
|
-
const { body: b } =
|
|
3759
|
+
const { body: b } = Ht(t, e.frame), m = Ot(b).width, v = Ca(a.values, (me = e.verticalAxis) == null ? void 0 : me.range, (ge = e.verticalAxis) == null ? void 0 : ge.numberFormat, (Te = e.verticalAxis) == null ? void 0 : Te.scaleType), y = na(m, (ze = e.verticalAxis) == null ? void 0 : ze.labelPosition, (Fe = e.horizontalAxis) == null ? void 0 : Fe.labelPosition, (J = e.verticalAxis) == null ? void 0 : J.direction, v), { chartArea: x, width: A, height: L, margin: w } = Wt(b, y), T = ra(d, w), I = Tr(a.labels, (X = e.horizontalAxis) == null ? void 0 : X.range), E = I.map((k) => a.labels[k]), j = I.map((k) => a.values[k]), B = E.map((k, M) => ({
|
|
3757
3760
|
label: k,
|
|
3758
3761
|
value: j[M]
|
|
3759
|
-
})), V = p.scalePoint().domain(E).range([0, A]).padding(e.edgePadding ? 0.6 : 0), Z = V, _ = (k) => V(k.label) ?? 0, ae = ((Ae = e.verticalAxis) == null ? void 0 : Ae.scaleType) === "log", [ie, re] =
|
|
3762
|
+
})), V = p.scalePoint().domain(E).range([0, A]).padding(e.edgePadding ? 0.6 : 0), Z = V, _ = (k) => V(k.label) ?? 0, ae = ((Ae = e.verticalAxis) == null ? void 0 : Ae.scaleType) === "log", [ie, re] = Ha(j, ($e = e.verticalAxis) == null ? void 0 : $e.range, (Le = e.verticalAxis) == null ? void 0 : Le.scaleType), F = ae ? p.scaleSymlog().domain([ie, re]).nice().range([L, 0]) : p.scaleLinear().domain([ie, re]).nice().range([L, 0]), R = F.domain(), W = R[0] < 0 && R[1] > 0 ? F(0) : void 0;
|
|
3760
3763
|
g.attach(x, T), g.update({
|
|
3761
3764
|
vertical: { scale: F, height: L, options: { ...e.verticalAxis, gridWidth: A, topPadding: w.top } },
|
|
3762
3765
|
horizontal: { scale: Z, height: L, options: { ...e.horizontalAxis, width: A, zeroY: W } }
|
|
3763
3766
|
});
|
|
3764
|
-
const oe = x.ownerSVGElement, le = sa(oe, t, "plot", { x: 0, y: 0, width: A, height: L }), ke = p.select(x).append("g").attr("clip-path", `url(#${le})`), se = ke.node(), ve = ((we = e.colors) == null ? void 0 : we[0]) ??
|
|
3767
|
+
const oe = x.ownerSVGElement, le = sa(oe, t, "plot", { x: 0, y: 0, width: A, height: L }), ke = p.select(x).append("g").attr("clip-path", `url(#${le})`), se = ke.node(), ve = ((we = e.colors) == null ? void 0 : we[0]) ?? Di, xe = $a(e.interpolation ?? "monotoneX"), be = e.lineSymbols, he = new uf(p.select(se));
|
|
3765
3768
|
if (he.config({ xPos: _, y: F, color: ve, curve: xe, areaFillOpacity: e.areaFillOpacity ?? 0.25, height: L }), s.length > 0 || n.length > 0 || o.length > 0) {
|
|
3766
3769
|
const k = (T == null ? void 0 : T.dx) ?? 0, M = (T == null ? void 0 : T.dy) ?? 0, C = se.querySelectorAll(":scope > g");
|
|
3767
3770
|
C[0] && wt(C[0], n, k, M), C[1] && wt(C[1], s, k, M), C[2] && wt(C[2], o, k, M);
|
|
3768
3771
|
}
|
|
3769
|
-
if (e.valueLabels && he.use(
|
|
3772
|
+
if (e.valueLabels && he.use(Si({ position: e.valueLabelPosition, orientation: ot.Vertical })), he.draw(B), (Ee = e.annotations) != null && Ee.length && zr(x, e.annotations, { scaleX: Z, scaleY: F, data: B, width: A, height: L, backgroundColor: Bt(t), transition: r, priorAnnotations: f }), p.select(se).selectAll(".bc-dot").attr("fill-opacity", 0).attr("stroke-opacity", 0).attr("pointer-events", "none"), e.tooltips || e.crosshair) {
|
|
3770
3773
|
const k = B.map((M) => ({
|
|
3771
3774
|
cx: _(M),
|
|
3772
3775
|
cy: F(M.value),
|
|
@@ -3829,7 +3832,7 @@ function Sn(t) {
|
|
|
3829
3832
|
i[0] *= 100, i[1] *= 100;
|
|
3830
3833
|
return s;
|
|
3831
3834
|
}
|
|
3832
|
-
const
|
|
3835
|
+
const Ei = [
|
|
3833
3836
|
"#4e79a7",
|
|
3834
3837
|
"#f28e2b",
|
|
3835
3838
|
"#e15759",
|
|
@@ -3839,9 +3842,9 @@ const Di = [
|
|
|
3839
3842
|
"#b07aa1",
|
|
3840
3843
|
"#ff9da7"
|
|
3841
3844
|
];
|
|
3842
|
-
class
|
|
3845
|
+
class gf extends dt {
|
|
3843
3846
|
initialize() {
|
|
3844
|
-
this.configDefine("xPos", { defaultValue: (r) => 0 }), this.configDefine("colors", { defaultValue:
|
|
3847
|
+
this.configDefine("xPos", { defaultValue: (r) => 0 }), this.configDefine("colors", { defaultValue: Ei }), this.configDefine("curve", { defaultValue: p.curveMonotoneX }), this.configDefine("areaFillOpacity", { defaultValue: 0.85 }), this.configDefine("highlightTargets", { defaultValue: /* @__PURE__ */ new Set() });
|
|
3845
3848
|
const a = this.base.append("g"), e = this.base.append("g");
|
|
3846
3849
|
this.layer("stacked-areas", a, {
|
|
3847
3850
|
dataBind: (r, n) => r.selectAll(".bc-area").data(n, (s) => s.name),
|
|
@@ -3884,7 +3887,7 @@ class hf extends dt {
|
|
|
3884
3887
|
});
|
|
3885
3888
|
}
|
|
3886
3889
|
}
|
|
3887
|
-
function
|
|
3890
|
+
function pf(t, a, e = {}, r = !1) {
|
|
3888
3891
|
var Ge, Ue, Ze, Ke, ut, ht, je, Tt, zt;
|
|
3889
3892
|
qt(r), Dr(t);
|
|
3890
3893
|
let n = a, s = [], o = [], i = null, c, f;
|
|
@@ -3893,35 +3896,35 @@ function gf(t, a, e = {}, r = !1) {
|
|
|
3893
3896
|
const ue = Xt(t);
|
|
3894
3897
|
f = ue == null ? void 0 : ue.margin, d.detach(), (ue == null ? void 0 : ue.chartType) === "area-stacked" ? (s = Array.from(t.querySelectorAll(".bc-frame .bc-area")), o = Array.from(t.querySelectorAll(".bc-frame .bc-line"))) : ue && (i = _t(t)), c = /* @__PURE__ */ new Map();
|
|
3895
3898
|
for (const P of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))
|
|
3896
|
-
for (const [de,
|
|
3897
|
-
c.set(de,
|
|
3899
|
+
for (const [de, H] of Pt(P))
|
|
3900
|
+
c.set(de, H);
|
|
3898
3901
|
t.replaceChildren();
|
|
3899
3902
|
}
|
|
3900
|
-
const { body: g } =
|
|
3903
|
+
const { body: g } = Ht(t, e.frame), b = Tr(n.labels, (Ge = e.horizontalAxis) == null ? void 0 : Ge.range);
|
|
3901
3904
|
if (b.length < n.labels.length) {
|
|
3902
|
-
const ue = b.map((de) => n.labels[de]), P = (n.series ?? []).map((de) => ({ ...de, values: b.map((
|
|
3905
|
+
const ue = b.map((de) => n.labels[de]), P = (n.series ?? []).map((de) => ({ ...de, values: b.map((H) => de.values[H]) }));
|
|
3903
3906
|
n = { labels: ue, values: b.map((de) => n.values[de]), series: P };
|
|
3904
3907
|
}
|
|
3905
|
-
const m = n.series ?? [], v = m.filter((ue) => !za(ue.name, e.seriesOverrides)), y = e.colors ??
|
|
3908
|
+
const m = n.series ?? [], v = m.filter((ue) => !za(ue.name, e.seriesOverrides)), y = e.colors ?? Ei, x = v.map((ue) => ue.name), A = e.seriesOverrides, L = la(e.colorizes), w = e.directLabelling === !0 || e.directLabelling === "auto" && e.legend !== !0 || !!e.directLabelling && e.directLabelling !== "auto", T = w ? "direct" : e.legend !== !1 ? "legend" : "none", I = x.filter((ue) => ma(ue, T, A) === "direct"), E = e.legend !== !1 && !w, j = Ot(g).width, B = 350, V = e.legendPosition ?? "top", Z = j > 0 && j < B && (V === "left" || V === "right") ? "top" : V, _ = e.legendAnchor ?? "start", ae = e.stacked !== !1, ie = e.stackPercent === !0 || e.stackMode === ka.Percent, re = e.areaSortMode ?? ft.None, F = e.areaLines !== !1, R = [...v];
|
|
3906
3909
|
if (re !== ft.None) {
|
|
3907
|
-
const ue = new Map(
|
|
3908
|
-
|
|
3909
|
-
const
|
|
3910
|
-
return re === ft.Ascending ?
|
|
3910
|
+
const ue = new Map(R.map((P) => [P.name, P.values.reduce((de, H) => de + H, 0)]));
|
|
3911
|
+
R.sort((P, de) => {
|
|
3912
|
+
const H = (ue.get(P.name) ?? 0) - (ue.get(de.name) ?? 0);
|
|
3913
|
+
return re === ft.Ascending ? H : -H;
|
|
3911
3914
|
});
|
|
3912
3915
|
}
|
|
3913
|
-
const W = { labels: n.labels, values: n.values, series:
|
|
3916
|
+
const W = { labels: n.labels, values: n.values, series: R }, oe = ie ? Sn(W) : wn(W);
|
|
3914
3917
|
let le = 0;
|
|
3915
3918
|
if (ae)
|
|
3916
3919
|
for (const ue of oe)
|
|
3917
3920
|
for (const P of ue)
|
|
3918
3921
|
P[1] > le && (le = P[1]);
|
|
3919
3922
|
else
|
|
3920
|
-
for (const ue of
|
|
3923
|
+
for (const ue of R)
|
|
3921
3924
|
for (const P of ue.values)
|
|
3922
3925
|
P > le && (le = P);
|
|
3923
3926
|
ie && (le = 100);
|
|
3924
|
-
const ke = [0, le], se = ((Ue = e.verticalAxis) == null ? void 0 : Ue.numberFormat) ?? (ie ? "|d|%" : void 0), ve = Ca(ke, (Ze = e.verticalAxis) == null ? void 0 : Ze.range, se, (Ke = e.verticalAxis) == null ? void 0 : Ke.scaleType), xe = na(j, (ut = e.verticalAxis) == null ? void 0 : ut.labelPosition, (ht = e.horizontalAxis) == null ? void 0 : ht.labelPosition, (je = e.verticalAxis) == null ? void 0 : je.direction, ve), be = I.length > 0 ?
|
|
3927
|
+
const ke = [0, le], se = ((Ue = e.verticalAxis) == null ? void 0 : Ue.numberFormat) ?? (ie ? "|d|%" : void 0), ve = Ca(ke, (Ze = e.verticalAxis) == null ? void 0 : Ze.range, se, (Ke = e.verticalAxis) == null ? void 0 : Ke.scaleType), xe = na(j, (ut = e.verticalAxis) == null ? void 0 : ut.labelPosition, (ht = e.horizontalAxis) == null ? void 0 : ht.labelPosition, (je = e.verticalAxis) == null ? void 0 : je.direction, ve), be = I.length > 0 ? Ai(I) : 0, he = xe.top != null, me = Math.max(0, j - (xe.left ?? 50) - (xe.right ?? 20) - be), ge = E ? wa(x, Z, me) : { width: 0, height: 0 }, Te = E ? ge.height + 15 : 0, ze = { ...xe };
|
|
3925
3928
|
if (E && Z === "top") {
|
|
3926
3929
|
const ue = he ? 15 : 0;
|
|
3927
3930
|
ze.top = Te + ue;
|
|
@@ -3937,39 +3940,39 @@ function gf(t, a, e = {}, r = !1) {
|
|
|
3937
3940
|
horizontal: { scale: we, height: X, options: { ...e.horizontalAxis, width: J } }
|
|
3938
3941
|
});
|
|
3939
3942
|
const k = Fe.ownerSVGElement, M = sa(k, t, "plot", { x: 0, y: 0, width: J, height: X }), C = p.select(Fe).append("g").attr("clip-path", `url(#${M})`), O = C.node(), K = $a(e.interpolation ?? "monotoneX"), U = oe.map((ue) => {
|
|
3940
|
-
const P = m.findIndex((
|
|
3943
|
+
const P = m.findIndex((H) => H.name === ue.key);
|
|
3941
3944
|
let de;
|
|
3942
3945
|
if (ae)
|
|
3943
|
-
de = Array.from(ue).map((
|
|
3946
|
+
de = Array.from(ue).map((H) => [Ne(H[0]), Ne(H[1])]);
|
|
3944
3947
|
else {
|
|
3945
|
-
const
|
|
3946
|
-
de = ((
|
|
3948
|
+
const H = R.find((Me) => Me.name === ue.key);
|
|
3949
|
+
de = ((H == null ? void 0 : H.values) ?? []).map((Me) => [Ne(0), Ne(Me)]);
|
|
3947
3950
|
}
|
|
3948
3951
|
return {
|
|
3949
3952
|
name: ue.key,
|
|
3950
3953
|
points: de,
|
|
3951
3954
|
colorIndex: P >= 0 ? P : 0
|
|
3952
3955
|
};
|
|
3953
|
-
}), G = new Set((e.highlights ?? []).map((ue) => ue.target)), Q = G.size > 0, ne = e.areaFillOpacity != null ? e.areaFillOpacity : 0.85, Se = new
|
|
3956
|
+
}), G = new Set((e.highlights ?? []).map((ue) => ue.target)), Q = G.size > 0, ne = e.areaFillOpacity != null ? e.areaFillOpacity : 0.85, Se = new gf(p.select(O));
|
|
3954
3957
|
if (Se.config({ xPos: Ee, colors: y, curve: K, areaFillOpacity: ne, highlightTargets: G }), s.length > 0 || o.length > 0) {
|
|
3955
3958
|
const ue = ($e == null ? void 0 : $e.dx) ?? 0, P = ($e == null ? void 0 : $e.dy) ?? 0, de = O.querySelectorAll(":scope > g");
|
|
3956
3959
|
de[0] && wt(de[0], s, ue, P), de[1] && wt(de[1], o, ue, P);
|
|
3957
3960
|
}
|
|
3958
3961
|
if (Se.draw(U), p.select(O).selectAll(".bc-area").each(function(ue) {
|
|
3959
|
-
const P = ue, de = L.get(P.name) ?? Xe(P.name, P.colorIndex, y, A),
|
|
3960
|
-
|
|
3962
|
+
const P = ue, de = L.get(P.name) ?? Xe(P.name, P.colorIndex, y, A), H = r ? p.select(this).transition().duration(Ve()) : p.select(this);
|
|
3963
|
+
H.attr("fill", de), Q && H.attr("opacity", at(G, P.name, ne));
|
|
3961
3964
|
}), F || p.select(O).selectAll(".bc-line").attr("display", "none"), p.select(O).selectAll(".bc-line").each(function(ue) {
|
|
3962
|
-
const P = ue, de = L.get(P.name) ?? Xe(P.name, P.colorIndex, y, A),
|
|
3963
|
-
if (Me.attr("stroke", de), Q && Me.attr("opacity", at(G, P.name, 1)),
|
|
3964
|
-
const qe = $a(
|
|
3965
|
+
const P = ue, de = L.get(P.name) ?? Xe(P.name, P.colorIndex, y, A), H = wi(P.name, e.interpolation ?? "monotoneX", A), Me = r ? p.select(this).transition().duration(Ve()) : p.select(this);
|
|
3966
|
+
if (Me.attr("stroke", de), Q && Me.attr("opacity", at(G, P.name, 1)), H !== (e.interpolation ?? "monotoneX")) {
|
|
3967
|
+
const qe = $a(H), rt = p.line().curve(qe).x((lt, nt) => Ee(nt)).y((lt) => lt[1]);
|
|
3965
3968
|
Me.attr("d", rt(P.points));
|
|
3966
3969
|
}
|
|
3967
3970
|
}), (Tt = e.annotations) != null && Tt.length) {
|
|
3968
3971
|
const ue = n.labels.map((P, de) => {
|
|
3969
|
-
var
|
|
3972
|
+
var H;
|
|
3970
3973
|
return {
|
|
3971
3974
|
label: P,
|
|
3972
|
-
value: ((
|
|
3975
|
+
value: ((H = v[0]) == null ? void 0 : H.values[de]) ?? 0
|
|
3973
3976
|
};
|
|
3974
3977
|
});
|
|
3975
3978
|
zr(Fe, e.annotations, { scaleX: we, scaleY: Ne, data: ue, width: J, height: X, backgroundColor: Bt(t), transition: r, priorAnnotations: c });
|
|
@@ -3977,12 +3980,12 @@ function gf(t, a, e = {}, r = !1) {
|
|
|
3977
3980
|
if (e.tooltips || e.crosshair) {
|
|
3978
3981
|
const ue = [];
|
|
3979
3982
|
oe.forEach((P) => {
|
|
3980
|
-
const de = m.findIndex((
|
|
3981
|
-
Array.from(P).forEach((
|
|
3982
|
-
const qe =
|
|
3983
|
+
const de = m.findIndex((H) => H.name === P.key);
|
|
3984
|
+
Array.from(P).forEach((H, Me) => {
|
|
3985
|
+
const qe = H[1] - H[0];
|
|
3983
3986
|
ue.push({
|
|
3984
3987
|
cx: Ee(Me),
|
|
3985
|
-
cy: Ne(
|
|
3988
|
+
cy: Ne(H[1]),
|
|
3986
3989
|
label: n.labels[Me],
|
|
3987
3990
|
value: Math.round(qe * 100) / 100,
|
|
3988
3991
|
series: P.key,
|
|
@@ -4007,34 +4010,34 @@ function gf(t, a, e = {}, r = !1) {
|
|
|
4007
4010
|
var lt;
|
|
4008
4011
|
if (ma(ue.name, T, A) !== "direct")
|
|
4009
4012
|
return;
|
|
4010
|
-
const
|
|
4011
|
-
if (!
|
|
4013
|
+
const H = oe.find((nt) => nt.key === ue.name);
|
|
4014
|
+
if (!H)
|
|
4012
4015
|
return;
|
|
4013
|
-
const Me =
|
|
4016
|
+
const Me = H[Y], qe = Ne((Me[0] + Me[1]) / 2), rt = ((lt = A == null ? void 0 : A.find((nt) => nt.name === ue.name)) == null ? void 0 : lt.labelText) || ue.name;
|
|
4014
4017
|
Ce.push({ name: ue.name, index: P, naturalY: qe, text: rt });
|
|
4015
4018
|
}), Ce.length > 0) {
|
|
4016
|
-
Ce.sort((
|
|
4017
|
-
const ue = Ce.map((
|
|
4018
|
-
Ce.forEach((
|
|
4019
|
-
p.select(Fe).append("text").attr("class", "bc-direct-label").attr("data-series",
|
|
4019
|
+
Ce.sort((H, Me) => H.naturalY - Me.naturalY);
|
|
4020
|
+
const ue = Ce.map((H) => H.naturalY), de = An(ue, 0, X, 14);
|
|
4021
|
+
Ce.forEach((H, Me) => {
|
|
4022
|
+
p.select(Fe).append("text").attr("class", "bc-direct-label").attr("data-series", H.index).attr("x", ce).attr("y", de[Me]).attr("dy", "0.35em").attr("font-size", "11px").attr("fill", Xe(H.name, H.index, y, A)).text(H.text);
|
|
4020
4023
|
});
|
|
4021
4024
|
}
|
|
4022
4025
|
const Pe = x.filter((ue) => ma(ue, T, A) === "legend");
|
|
4023
4026
|
if (E && Pe.length > 0) {
|
|
4024
|
-
const ue = Pe.map((
|
|
4025
|
-
const Me = m.findIndex((qe) => qe.name ===
|
|
4026
|
-
return Xe(
|
|
4027
|
+
const ue = Pe.map((H) => {
|
|
4028
|
+
const Me = m.findIndex((qe) => qe.name === H);
|
|
4029
|
+
return Xe(H, Me, y, A);
|
|
4027
4030
|
});
|
|
4028
4031
|
let P = 0, de = 0;
|
|
4029
4032
|
if (Z === "top") {
|
|
4030
|
-
const
|
|
4031
|
-
de = -(ge.height + 10 +
|
|
4033
|
+
const H = he ? 15 : 0;
|
|
4034
|
+
de = -(ge.height + 10 + H);
|
|
4032
4035
|
} else Z === "bottom" ? de = X + 25 : Z === "left" ? P = -(ge.width + 10) : Z === "right" && (P = J + 10);
|
|
4033
4036
|
xa(Fe, Pe, ue, de, Z, _, J, X, P, [], { left: Ae.left, right: Ae.right });
|
|
4034
4037
|
}
|
|
4035
4038
|
Ut(t, { chartType: "area-stacked", margin: Ae }), i && (Vt(C.node()), Gt(t, i));
|
|
4036
4039
|
}
|
|
4037
|
-
const
|
|
4040
|
+
const Fi = [
|
|
4038
4041
|
"#4e79a7",
|
|
4039
4042
|
"#f28e2b",
|
|
4040
4043
|
"#e15759",
|
|
@@ -4044,9 +4047,9 @@ const Ei = [
|
|
|
4044
4047
|
"#b07aa1",
|
|
4045
4048
|
"#ff9da7"
|
|
4046
4049
|
];
|
|
4047
|
-
class
|
|
4050
|
+
class bf extends dt {
|
|
4048
4051
|
initialize() {
|
|
4049
|
-
this.configDefine("x", { defaultValue: p.scaleBand() }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("colors", { defaultValue:
|
|
4052
|
+
this.configDefine("x", { defaultValue: p.scaleBand() }), this.configDefine("y", { defaultValue: p.scaleLinear() }), this.configDefine("colors", { defaultValue: Fi });
|
|
4050
4053
|
const a = this.base.append("g");
|
|
4051
4054
|
this.layer("bars", a, {
|
|
4052
4055
|
dataBind: (e, r) => e.selectAll(".bc-bar-stacked").data(r, (n) => n.label + "\0" + n.seriesName),
|
|
@@ -4070,7 +4073,7 @@ class pf extends dt {
|
|
|
4070
4073
|
});
|
|
4071
4074
|
}
|
|
4072
4075
|
}
|
|
4073
|
-
function
|
|
4076
|
+
function mf(t, a, e) {
|
|
4074
4077
|
const r = [];
|
|
4075
4078
|
for (const n of t) {
|
|
4076
4079
|
const s = n.key, o = e.findIndex((i) => i.name === s);
|
|
@@ -4088,7 +4091,7 @@ function bf(t, a, e) {
|
|
|
4088
4091
|
}
|
|
4089
4092
|
return r;
|
|
4090
4093
|
}
|
|
4091
|
-
function
|
|
4094
|
+
function yf(t, a, e = {}, r = !1) {
|
|
4092
4095
|
var Ne, k, M, C, O, K, U, G;
|
|
4093
4096
|
qt(r);
|
|
4094
4097
|
let n = [], s = null, o, i;
|
|
@@ -4101,9 +4104,9 @@ function mf(t, a, e = {}, r = !1) {
|
|
|
4101
4104
|
o.set(Se, Y);
|
|
4102
4105
|
t.replaceChildren();
|
|
4103
4106
|
}
|
|
4104
|
-
const { body: f } =
|
|
4107
|
+
const { body: f } = Ht(t, e.frame), d = a.series ?? [], g = d.filter((Q) => !za(Q.name, e.seriesOverrides)), b = g.map((Q) => Q.name), m = e.colors ?? Fi, v = e.seriesOverrides, y = e.legend !== !1, x = Ot(f).width, A = 350, L = e.legendPosition ?? "top", w = x > 0 && x < A && (L === "left" || L === "right") ? "top" : L, T = e.legendAnchor ?? "start", I = { labels: a.labels, values: a.values, series: g }, E = e.stackMode === ka.Percent, j = E ? Sn(I) : wn(I), B = mf(j, a.labels, d), V = E ? 100 : p.max(B, (Q) => Q.y1) ?? 0, _ = Ca([0, V], (Ne = e.verticalAxis) == null ? void 0 : Ne.range, (k = e.verticalAxis) == null ? void 0 : k.numberFormat, (M = e.verticalAxis) == null ? void 0 : M.scaleType), ae = na(x, (C = e.verticalAxis) == null ? void 0 : C.labelPosition, (O = e.horizontalAxis) == null ? void 0 : O.labelPosition, (K = e.verticalAxis) == null ? void 0 : K.direction, _), ie = Math.max(0, x - (ae.left ?? 50) - (ae.right ?? 20)), re = un(a.labels, ie, e.horizontalAxis);
|
|
4105
4108
|
re !== void 0 && (ae.bottom = re);
|
|
4106
|
-
const F = ae.top != null,
|
|
4109
|
+
const F = ae.top != null, R = Math.max(0, x - (ae.left ?? 50) - (ae.right ?? 20)), W = y ? wa(b, w, R) : { width: 0, height: 0 }, oe = y ? W.height + 15 : 0, le = { ...ae };
|
|
4107
4110
|
if (y && w === "top") {
|
|
4108
4111
|
const Q = F ? 15 : 0;
|
|
4109
4112
|
le.top = oe + Q;
|
|
@@ -4124,7 +4127,7 @@ function mf(t, a, e = {}, r = !1) {
|
|
|
4124
4127
|
vertical: { scale: ge, height: ve, options: { ...e.verticalAxis, gridWidth: se, topPadding: xe.top } },
|
|
4125
4128
|
horizontal: { scale: me, height: ve, options: { ...e.horizontalAxis, width: se } }
|
|
4126
4129
|
});
|
|
4127
|
-
const Te = ke.ownerSVGElement, ze = sa(Te, t, "bars", { x: 0, y: 0, width: se, height: ve }), Fe = p.select(ke).append("g").attr("clip-path", `url(#${ze})`), J = he === a.labels ? B : he.flatMap((Q) => B.filter((ne) => ne.label === Q)), X = new
|
|
4130
|
+
const Te = ke.ownerSVGElement, ze = sa(Te, t, "bars", { x: 0, y: 0, width: se, height: ve }), Fe = p.select(ke).append("g").attr("clip-path", `url(#${ze})`), J = he === a.labels ? B : he.flatMap((Q) => B.filter((ne) => ne.label === Q)), X = new bf(Fe);
|
|
4128
4131
|
if (X.config({ x: me, y: ge, colors: m }), n.length > 0) {
|
|
4129
4132
|
const Q = Fe.node().querySelector("g");
|
|
4130
4133
|
wt(Q, n, (be == null ? void 0 : be.dx) ?? 0, (be == null ? void 0 : be.dy) ?? 0);
|
|
@@ -4167,7 +4170,7 @@ function mf(t, a, e = {}, r = !1) {
|
|
|
4167
4170
|
xa(ke, b, Q, Se, w, T, se, ve, ne, [], { left: xe.left, right: xe.right });
|
|
4168
4171
|
}
|
|
4169
4172
|
}
|
|
4170
|
-
const
|
|
4173
|
+
const Ni = [
|
|
4171
4174
|
"#4e79a7",
|
|
4172
4175
|
"#f28e2b",
|
|
4173
4176
|
"#e15759",
|
|
@@ -4177,9 +4180,9 @@ const Fi = [
|
|
|
4177
4180
|
"#b07aa1",
|
|
4178
4181
|
"#ff9da7"
|
|
4179
4182
|
], $s = 13;
|
|
4180
|
-
class
|
|
4183
|
+
class vf extends dt {
|
|
4181
4184
|
initialize() {
|
|
4182
|
-
this.configDefine("x", { defaultValue: p.scaleLinear() }), this.configDefine("y", { defaultValue: p.scaleBand() }), this.configDefine("colors", { defaultValue:
|
|
4185
|
+
this.configDefine("x", { defaultValue: p.scaleLinear() }), this.configDefine("y", { defaultValue: p.scaleBand() }), this.configDefine("colors", { defaultValue: Ni }), this.configDefine("categoryLabelOffset", { defaultValue: 0 });
|
|
4183
4186
|
const a = this.base.append("g");
|
|
4184
4187
|
this.layer("bars", a, {
|
|
4185
4188
|
dataBind: (e, r) => e.selectAll(".bc-bar-stacked").data(r, (n) => n.label + "\0" + n.seriesName),
|
|
@@ -4203,7 +4206,7 @@ class yf extends dt {
|
|
|
4203
4206
|
});
|
|
4204
4207
|
}
|
|
4205
4208
|
}
|
|
4206
|
-
function
|
|
4209
|
+
function xf(t, a, e) {
|
|
4207
4210
|
const r = [];
|
|
4208
4211
|
for (const n of t) {
|
|
4209
4212
|
const s = n.key, o = e.findIndex((i) => i.name === s);
|
|
@@ -4221,7 +4224,7 @@ function vf(t, a, e) {
|
|
|
4221
4224
|
}
|
|
4222
4225
|
return r;
|
|
4223
4226
|
}
|
|
4224
|
-
function
|
|
4227
|
+
function Af(t, a, e = {}, r = !1) {
|
|
4225
4228
|
var O, K, U, G, Q, ne, Se;
|
|
4226
4229
|
qt(r);
|
|
4227
4230
|
let n = [], s = null, o, i;
|
|
@@ -4234,12 +4237,12 @@ function xf(t, a, e = {}, r = !1) {
|
|
|
4234
4237
|
o.set(Ce, Pe);
|
|
4235
4238
|
t.replaceChildren();
|
|
4236
4239
|
}
|
|
4237
|
-
const { body: f } =
|
|
4240
|
+
const { body: f } = Ht(t, e.frame), d = a.series ?? [], g = d.filter((Y) => !za(Y.name, e.seriesOverrides)), b = g.map((Y) => Y.name), m = e.colors ?? Ni, v = e.seriesOverrides, y = e.legend !== !1, x = Ot(f).width, A = 350, L = e.legendPosition ?? "top", w = x > 0 && x < A && (L === "left" || L === "right") ? "top" : L, T = e.legendAnchor ?? "start", I = { labels: a.labels, values: a.values, series: g }, E = e.stackMode === ka.Percent, j = E ? Sn(I) : wn(I), B = xf(j, a.labels, d), V = E ? 100 : p.max(B, (Y) => Y.y1) ?? 0, Z = e.categoryLabelLine === !0, _ = Or(a.labels), ae = Z ? We.Off : (O = e.verticalAxis) == null ? void 0 : O.labelPosition, ie = na(x, ae, (K = e.horizontalAxis) == null ? void 0 : K.labelPosition, (U = e.verticalAxis) == null ? void 0 : U.direction, _, (G = e.horizontalAxis) == null ? void 0 : G.showAxis), re = ie.top != null, F = Math.max(0, x - (ie.left ?? 50) - (ie.right ?? 20)), R = y ? wa(b, w, F) : { width: 0, height: 0 }, W = y ? R.height + 15 : 0, oe = { ...ie };
|
|
4238
4241
|
if (y && w === "top") {
|
|
4239
4242
|
const Y = re ? 15 : 0;
|
|
4240
4243
|
oe.top = W + Y;
|
|
4241
4244
|
}
|
|
4242
|
-
y && w === "bottom" && (oe.bottom = (oe.bottom ?? 24) + W), y && w === "left" && (oe.left = (oe.left ?? 50) +
|
|
4245
|
+
y && w === "bottom" && (oe.bottom = (oe.bottom ?? 24) + W), y && w === "left" && (oe.left = (oe.left ?? 50) + R.width + 10), y && w === "right" && (oe.right = (oe.right ?? 20) + R.width + 10);
|
|
4243
4246
|
const { chartArea: le, width: ke, height: se, margin: ve } = Wt(f, oe), xe = ra(i, ve);
|
|
4244
4247
|
let be = a.labels;
|
|
4245
4248
|
if (e.sortMode === "total") {
|
|
@@ -4264,7 +4267,7 @@ function xf(t, a, e = {}, r = !1) {
|
|
|
4264
4267
|
},
|
|
4265
4268
|
order: "horizontal-first"
|
|
4266
4269
|
});
|
|
4267
|
-
const ge = le.ownerSVGElement, Te = sa(ge, t, "bars", { x: 0, y: 0, width: ke, height: se }), ze = p.select(le).append("g").attr("clip-path", `url(#${Te})`), Fe = be === a.labels ? B : be.flatMap((Y) => B.filter((ce) => ce.label === Y)), J = Z ? $s : 0, X = new
|
|
4270
|
+
const ge = le.ownerSVGElement, Te = sa(ge, t, "bars", { x: 0, y: 0, width: ke, height: se }), ze = p.select(le).append("g").attr("clip-path", `url(#${Te})`), Fe = be === a.labels ? B : be.flatMap((Y) => B.filter((ce) => ce.label === Y)), J = Z ? $s : 0, X = new vf(ze);
|
|
4268
4271
|
if (X.config({ x: he, y: me, colors: m, categoryLabelOffset: J }), n.length > 0) {
|
|
4269
4272
|
const Y = ze.node().querySelector("g");
|
|
4270
4273
|
wt(Y, n, (xe == null ? void 0 : xe.dx) ?? 0, (xe == null ? void 0 : xe.dy) ?? 0);
|
|
@@ -4319,8 +4322,8 @@ function xf(t, a, e = {}, r = !1) {
|
|
|
4319
4322
|
if (we === Ie.Inside)
|
|
4320
4323
|
ht();
|
|
4321
4324
|
else {
|
|
4322
|
-
const je = he(Y.y1) + 4, Tt = k.get(Y.label) ?? 0, zt = Ne.get(Y.label + "\0" + Y.seriesName), ue = je < Tt, P = zt !== void 0 && Pe + 4 > zt, de = ke + ve.right - 2,
|
|
4323
|
-
ue || P ||
|
|
4325
|
+
const je = he(Y.y1) + 4, Tt = k.get(Y.label) ?? 0, zt = Ne.get(Y.label + "\0" + Y.seriesName), ue = je < Tt, P = zt !== void 0 && Pe + 4 > zt, de = ke + ve.right - 2, H = je + Pe > de;
|
|
4326
|
+
ue || P || H ? ht() : (k.set(Y.label, je + Pe), C.append("text").attr("class", "bc-value-label").attr("data-series", Y.seriesName).attr("x", je).attr("y", Ue).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("font-size", "11px").attr("fill", "currentColor").text(ce));
|
|
4324
4327
|
}
|
|
4325
4328
|
else if (!Ge)
|
|
4326
4329
|
ht();
|
|
@@ -4336,12 +4339,12 @@ function xf(t, a, e = {}, r = !1) {
|
|
|
4336
4339
|
let ce = 0, Ce = 0;
|
|
4337
4340
|
if (w === "top") {
|
|
4338
4341
|
const Pe = re ? 15 : 0;
|
|
4339
|
-
Ce = -(
|
|
4340
|
-
} else w === "bottom" ? Ce = se + 25 : w === "left" ? ce = -(
|
|
4342
|
+
Ce = -(R.height + 10 + Pe);
|
|
4343
|
+
} else w === "bottom" ? Ce = se + 25 : w === "left" ? ce = -(R.width + 10) : w === "right" && (ce = ke + 10);
|
|
4341
4344
|
xa(le, b, Y, Ce, w, T, ke, se, ce, [], { left: ve.left, right: ve.right });
|
|
4342
4345
|
}
|
|
4343
4346
|
}
|
|
4344
|
-
const
|
|
4347
|
+
const Ii = [
|
|
4345
4348
|
"#4e79a7",
|
|
4346
4349
|
"#f28e2b",
|
|
4347
4350
|
"#e15759",
|
|
@@ -4351,9 +4354,9 @@ const Ni = [
|
|
|
4351
4354
|
"#b07aa1",
|
|
4352
4355
|
"#ff9da7"
|
|
4353
4356
|
], Cs = 16, xr = 20, Ms = 13;
|
|
4354
|
-
class
|
|
4357
|
+
class wf extends dt {
|
|
4355
4358
|
initialize() {
|
|
4356
|
-
this.configDefine("y", { defaultValue: p.scaleBand() }), this.configDefine("colors", { defaultValue:
|
|
4359
|
+
this.configDefine("y", { defaultValue: p.scaleBand() }), this.configDefine("colors", { defaultValue: Ii }), this.configDefine("categoryLabelOffset", { defaultValue: 0 });
|
|
4357
4360
|
const a = this.base.append("g");
|
|
4358
4361
|
this.layer("bars", a, {
|
|
4359
4362
|
dataBind: (e, r) => e.selectAll(".bc-bar-split").data(r, (n) => n.label + "\0" + n.seriesName),
|
|
@@ -4377,7 +4380,7 @@ class Af extends dt {
|
|
|
4377
4380
|
});
|
|
4378
4381
|
}
|
|
4379
4382
|
}
|
|
4380
|
-
function
|
|
4383
|
+
function Sf(t, a, e, r) {
|
|
4381
4384
|
const n = t.length;
|
|
4382
4385
|
if (n === 0)
|
|
4383
4386
|
return [];
|
|
@@ -4393,7 +4396,7 @@ function wf(t, a, e, r) {
|
|
|
4393
4396
|
};
|
|
4394
4397
|
});
|
|
4395
4398
|
}
|
|
4396
|
-
function
|
|
4399
|
+
function kf(t, a, e, r) {
|
|
4397
4400
|
const n = [];
|
|
4398
4401
|
for (const s of t) {
|
|
4399
4402
|
const o = r.find((i) => i.name === s.seriesName);
|
|
@@ -4412,7 +4415,7 @@ function Sf(t, a, e, r) {
|
|
|
4412
4415
|
}
|
|
4413
4416
|
return n;
|
|
4414
4417
|
}
|
|
4415
|
-
function
|
|
4418
|
+
function Lf(t, a, e = {}, r = !1) {
|
|
4416
4419
|
var Ae, $e, Le, we, Ee, Ne;
|
|
4417
4420
|
qt(r);
|
|
4418
4421
|
let n = [], s = null, o;
|
|
@@ -4421,7 +4424,7 @@ function kf(t, a, e = {}, r = !1) {
|
|
|
4421
4424
|
const k = Xt(t);
|
|
4422
4425
|
o = k == null ? void 0 : k.margin, i.detach(), (k == null ? void 0 : k.chartType) === "bar-split" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-split")) : k && (s = _t(t)), t.replaceChildren();
|
|
4423
4426
|
}
|
|
4424
|
-
const { body: c } =
|
|
4427
|
+
const { body: c } = Ht(t, e.frame), f = a.series ?? [], d = f.filter((k) => !za(k.name, e.seriesOverrides)), g = d.map((k) => k.name), b = e.colors ?? Ii, m = e.seriesOverrides, v = e.legend !== !1, y = Ot(c).width, x = 350, A = e.legendPosition ?? "top", L = y > 0 && y < x && (A === "left" || A === "right") ? "top" : A, w = e.legendAnchor ?? "start", T = e.categoryLabelLine === !0, I = Or(a.labels), E = T ? We.Off : (Ae = e.verticalAxis) == null ? void 0 : Ae.labelPosition, j = na(
|
|
4425
4428
|
y,
|
|
4426
4429
|
E,
|
|
4427
4430
|
($e = e.horizontalAxis) == null ? void 0 : $e.labelPosition,
|
|
@@ -4432,7 +4435,7 @@ function kf(t, a, e = {}, r = !1) {
|
|
|
4432
4435
|
j.top = (j.top ?? 12) + xr;
|
|
4433
4436
|
const B = Math.max(0, y - (j.left ?? 50) - (j.right ?? 20)), V = v ? wa(g, L, B) : { width: 0, height: 0 }, Z = v ? V.height + 15 : 0, _ = { ...j };
|
|
4434
4437
|
v && L === "top" && (_.top = Z + xr), v && L === "bottom" && (_.bottom = (_.bottom ?? 24) + Z), v && L === "left" && (_.left = (_.left ?? 50) + V.width + 10), v && L === "right" && (_.right = (_.right ?? 20) + V.width + 10);
|
|
4435
|
-
const { chartArea: ae, width: ie, height: re, margin: F } = Wt(c, _),
|
|
4438
|
+
const { chartArea: ae, width: ie, height: re, margin: F } = Wt(c, _), R = ra(o, F);
|
|
4436
4439
|
let W = a.labels;
|
|
4437
4440
|
if (e.sortMode === "total") {
|
|
4438
4441
|
const k = a.labels.map((M, C) => ({
|
|
@@ -4442,7 +4445,7 @@ function kf(t, a, e = {}, r = !1) {
|
|
|
4442
4445
|
k.sort((M, C) => C.total - M.total), W = k.map((M) => M.label);
|
|
4443
4446
|
}
|
|
4444
4447
|
const oe = p.scaleBand().domain(W).range([0, re]).padding(Oa(e.barGap)), le = T ? Ms : 0;
|
|
4445
|
-
i.attach(ae,
|
|
4448
|
+
i.attach(ae, R), i.update({
|
|
4446
4449
|
vertical: {
|
|
4447
4450
|
scale: oe,
|
|
4448
4451
|
height: re,
|
|
@@ -4454,13 +4457,13 @@ function kf(t, a, e = {}, r = !1) {
|
|
|
4454
4457
|
},
|
|
4455
4458
|
order: "horizontal-first"
|
|
4456
4459
|
});
|
|
4457
|
-
const ke = e.sharedScale === !0, se =
|
|
4460
|
+
const ke = e.sharedScale === !0, se = Sf(d, f, ie, ke), ve = ae.ownerSVGElement, xe = sa(ve, t, "bars", { x: 0, y: 0, width: ie, height: re }), be = p.select(ae).append("g").attr("clip-path", `url(#${xe})`), he = p.select(ae).append("g").attr("class", "bc-split-headers");
|
|
4458
4461
|
for (const k of se)
|
|
4459
4462
|
he.append("text").attr("class", "bc-split-header").attr("x", k.xOffset + k.panelWidth / 2).attr("y", -xr / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "11px").attr("font-weight", "600").attr("fill", "currentColor").text(k.seriesName);
|
|
4460
|
-
const me =
|
|
4463
|
+
const me = kf(se, W, a.labels, f), ge = new wf(be);
|
|
4461
4464
|
if (ge.config({ y: oe, colors: b, categoryLabelOffset: le }), n.length > 0) {
|
|
4462
4465
|
const k = be.node().querySelector("g");
|
|
4463
|
-
wt(k, n, (
|
|
4466
|
+
wt(k, n, (R == null ? void 0 : R.dx) ?? 0, (R == null ? void 0 : R.dy) ?? 0);
|
|
4464
4467
|
}
|
|
4465
4468
|
e.tooltips && ge.use(Aa({ numberFormat: (Ne = e.verticalAxis) == null ? void 0 : Ne.numberFormat })), e.crosshair && ge.use(Pa({
|
|
4466
4469
|
width: ie,
|
|
@@ -4518,7 +4521,7 @@ const cn = [
|
|
|
4518
4521
|
"#b07aa1",
|
|
4519
4522
|
"#ff9da7"
|
|
4520
4523
|
], Os = 13;
|
|
4521
|
-
class
|
|
4524
|
+
class $f extends dt {
|
|
4522
4525
|
initialize() {
|
|
4523
4526
|
this.configDefine("x", { defaultValue: p.scaleLinear() }), this.configDefine("y0", { defaultValue: p.scaleBand() }), this.configDefine("y1", { defaultValue: p.scaleBand() }), this.configDefine("colors", { defaultValue: cn }), this.configDefine("categoryLabelOffset", { defaultValue: 0 });
|
|
4524
4527
|
const a = this.base.append("g");
|
|
@@ -4544,7 +4547,7 @@ class Lf extends dt {
|
|
|
4544
4547
|
});
|
|
4545
4548
|
}
|
|
4546
4549
|
}
|
|
4547
|
-
function
|
|
4550
|
+
function Cf(t, a, e = {}, r = !1) {
|
|
4548
4551
|
var $e, Le, we, Ee, Ne, k;
|
|
4549
4552
|
qt(r);
|
|
4550
4553
|
let n = [], s = null, o;
|
|
@@ -4553,7 +4556,7 @@ function $f(t, a, e = {}, r = !1) {
|
|
|
4553
4556
|
const M = Xt(t);
|
|
4554
4557
|
o = M == null ? void 0 : M.margin, i.detach(), (M == null ? void 0 : M.chartType) === "bar-grouped" ? n = Array.from(t.querySelectorAll(".bc-frame .bc-bar-grouped")) : M && (s = _t(t)), t.replaceChildren();
|
|
4555
4558
|
}
|
|
4556
|
-
const { body: c } =
|
|
4559
|
+
const { body: c } = Ht(t, e.frame), f = a.series ?? [], d = f.filter((M) => !za(M.name, e.seriesOverrides)), g = d.map((M) => M.name), b = e.colors ?? cn, m = e.seriesOverrides, v = e.legend !== !1, y = Ot(c).width, x = 350, A = e.legendPosition ?? "top", L = y > 0 && y < x && (A === "left" || A === "right") ? "top" : A, w = e.legendAnchor ?? "start", T = e.categoryLabelLine === !0, I = Or(a.labels), E = T ? We.Off : ($e = e.verticalAxis) == null ? void 0 : $e.labelPosition, j = na(
|
|
4557
4560
|
y,
|
|
4558
4561
|
E,
|
|
4559
4562
|
(Le = e.horizontalAxis) == null ? void 0 : Le.labelPosition,
|
|
@@ -4562,7 +4565,7 @@ function $f(t, a, e = {}, r = !1) {
|
|
|
4562
4565
|
(Ee = e.horizontalAxis) == null ? void 0 : Ee.showAxis
|
|
4563
4566
|
), B = Math.max(0, y - (j.left ?? 50) - (j.right ?? 20)), V = v ? wa(g, L, B) : { width: 0, height: 0 }, Z = v ? V.height + 15 : 0, _ = { ...j };
|
|
4564
4567
|
v && L === "top" && (_.top = Z), v && L === "bottom" && (_.bottom = (_.bottom ?? 24) + Z), v && L === "left" && (_.left = (_.left ?? 50) + V.width + 10), v && L === "right" && (_.right = (_.right ?? 20) + V.width + 10);
|
|
4565
|
-
const { chartArea: ae, width: ie, height: re, margin: F } = Wt(c, _),
|
|
4568
|
+
const { chartArea: ae, width: ie, height: re, margin: F } = Wt(c, _), R = ra(o, F);
|
|
4566
4569
|
let W = a.labels;
|
|
4567
4570
|
if (e.sortMode === "total") {
|
|
4568
4571
|
const M = a.labels.map((C, O) => ({
|
|
@@ -4572,7 +4575,7 @@ function $f(t, a, e = {}, r = !1) {
|
|
|
4572
4575
|
M.sort((C, O) => O.total - C.total), W = M.map((C) => C.label);
|
|
4573
4576
|
}
|
|
4574
4577
|
const oe = p.scaleBand().domain(W).range([0, re]).paddingInner(Oa(e.barGap)).paddingOuter(0.05), le = T ? Os : 0, ke = Math.max(0, oe.bandwidth() - le), se = p.scaleBand().domain(g).range([0, ke]).padding(0.05), ve = p.max(d.flatMap((M) => M.values)) ?? 0, xe = p.scaleLinear().domain([0, ve]).nice().range([0, ie]);
|
|
4575
|
-
i.attach(ae,
|
|
4578
|
+
i.attach(ae, R), i.update({
|
|
4576
4579
|
vertical: {
|
|
4577
4580
|
scale: oe,
|
|
4578
4581
|
height: re,
|
|
@@ -4610,12 +4613,12 @@ function $f(t, a, e = {}, r = !1) {
|
|
|
4610
4613
|
});
|
|
4611
4614
|
}
|
|
4612
4615
|
}
|
|
4613
|
-
const Te = new
|
|
4616
|
+
const Te = new $f(me);
|
|
4614
4617
|
Te.config({ x: xe, y0: oe, y1: se, colors: b, categoryLabelOffset: le });
|
|
4615
4618
|
const ze = Xa(e.highlights);
|
|
4616
4619
|
if (n.length > 0) {
|
|
4617
4620
|
const M = me.node().querySelector("g");
|
|
4618
|
-
wt(M, n, (
|
|
4621
|
+
wt(M, n, (R == null ? void 0 : R.dx) ?? 0, (R == null ? void 0 : R.dy) ?? 0);
|
|
4619
4622
|
}
|
|
4620
4623
|
e.tooltips && Te.use(Aa({ numberFormat: (k = e.verticalAxis) == null ? void 0 : k.numberFormat })), e.crosshair && Te.use(Pa({
|
|
4621
4624
|
width: ie,
|
|
@@ -4656,7 +4659,7 @@ const Fr = /* @__PURE__ */ new Map();
|
|
|
4656
4659
|
function St(t, a, e) {
|
|
4657
4660
|
Fr.set(t, { renderer: a, options: e });
|
|
4658
4661
|
}
|
|
4659
|
-
function
|
|
4662
|
+
function Mf(t) {
|
|
4660
4663
|
var a;
|
|
4661
4664
|
return (a = Fr.get(t)) == null ? void 0 : a.renderer;
|
|
4662
4665
|
}
|
|
@@ -4664,7 +4667,7 @@ function kn(t) {
|
|
|
4664
4667
|
var a;
|
|
4665
4668
|
return ((a = Fr.get(t)) == null ? void 0 : a.options) ?? [];
|
|
4666
4669
|
}
|
|
4667
|
-
function
|
|
4670
|
+
function cu() {
|
|
4668
4671
|
return Array.from(Fr.keys());
|
|
4669
4672
|
}
|
|
4670
4673
|
const Ps = [
|
|
@@ -4679,7 +4682,7 @@ const Ps = [
|
|
|
4679
4682
|
default: "Blueprint",
|
|
4680
4683
|
choices: [
|
|
4681
4684
|
{ value: "", text: "Custom" },
|
|
4682
|
-
...
|
|
4685
|
+
...Kl().map((t) => ({ value: t.name, text: t.label }))
|
|
4683
4686
|
]
|
|
4684
4687
|
}, $t = { key: "autoContrast", type: fe.Boolean, label: "Auto-adjust contrast", default: !1 }, Ct = { key: "allowDarkMode", type: fe.Boolean, label: "Allow dark mode", default: !0 }, ja = { key: "legend", type: fe.Boolean, label: "Show legend", default: !0 }, ua = {
|
|
4685
4688
|
key: "legendPosition",
|
|
@@ -4733,7 +4736,7 @@ const Ps = [
|
|
|
4733
4736
|
{ value: Ie.Outside, text: "Outside" },
|
|
4734
4737
|
{ value: Ie.Inside, text: "Inside" }
|
|
4735
4738
|
]
|
|
4736
|
-
}, ga = { key: "tooltips", type: fe.Boolean, label: "Tooltips", default: !1 },
|
|
4739
|
+
}, ga = { key: "tooltips", type: fe.Boolean, label: "Tooltips", default: !1 }, Bi = { key: "crosshair", type: fe.Boolean, label: "Crosshair", default: !1 }, Vi = {
|
|
4737
4740
|
key: "crosshairDirection",
|
|
4738
4741
|
type: fe.Select,
|
|
4739
4742
|
label: "Crosshair direction",
|
|
@@ -4743,7 +4746,7 @@ const Ps = [
|
|
|
4743
4746
|
{ value: yt.Vertical, text: "Vertical" },
|
|
4744
4747
|
{ value: yt.Horizontal, text: "Horizontal" }
|
|
4745
4748
|
]
|
|
4746
|
-
},
|
|
4749
|
+
}, _i = {
|
|
4747
4750
|
key: "crosshairStyle",
|
|
4748
4751
|
type: fe.Select,
|
|
4749
4752
|
label: "Crosshair style",
|
|
@@ -4753,7 +4756,7 @@ const Ps = [
|
|
|
4753
4756
|
{ value: ta.Dashed, text: "Dashed" },
|
|
4754
4757
|
{ value: ta.Dotted, text: "Dotted" }
|
|
4755
4758
|
]
|
|
4756
|
-
},
|
|
4759
|
+
}, Gi = { key: "crosshairColor", type: fe.Text, label: "Crosshair color", default: "#999", placeholder: "#999" }, Yi = { key: "lineSymbols", type: fe.Boolean, label: "Show line symbols", default: !1 }, Ri = {
|
|
4757
4760
|
key: "lineSymbolShape",
|
|
4758
4761
|
type: fe.Select,
|
|
4759
4762
|
label: "Symbol",
|
|
@@ -4778,7 +4781,7 @@ const Ps = [
|
|
|
4778
4781
|
{ value: Nt.Last, text: "Last" },
|
|
4779
4782
|
{ value: Nt.All, text: "All" }
|
|
4780
4783
|
]
|
|
4781
|
-
},
|
|
4784
|
+
}, Wi = {
|
|
4782
4785
|
key: "lineSymbolStyle",
|
|
4783
4786
|
type: fe.Select,
|
|
4784
4787
|
label: "Style",
|
|
@@ -4787,7 +4790,7 @@ const Ps = [
|
|
|
4787
4790
|
{ value: At.Filled, text: "Filled" },
|
|
4788
4791
|
{ value: At.Hollow, text: "Hollow" }
|
|
4789
4792
|
]
|
|
4790
|
-
},
|
|
4793
|
+
}, qi = { key: "lineSymbolSize", type: fe.Text, label: "Size", default: "3.5", placeholder: "3.5" }, Xi = { key: "lineSymbolOpacity", type: fe.Text, label: "Opacity", default: "1", placeholder: "1" }, sr = {
|
|
4791
4794
|
key: "sortMode",
|
|
4792
4795
|
type: fe.Select,
|
|
4793
4796
|
label: "Sort mode",
|
|
@@ -4797,7 +4800,7 @@ const Ps = [
|
|
|
4797
4800
|
{ value: ea.Total, text: "By total" },
|
|
4798
4801
|
{ value: ea.WithinGroups, text: "Within groups" }
|
|
4799
4802
|
]
|
|
4800
|
-
}, Vr = { key: "edgePadding", type: fe.Boolean, label: "Edge padding", default: !1 }, _r = { key: "waterfall", type: fe.Boolean, label: "Waterfall", default: !1 }, Gr = { key: "waterfallTotal", type: fe.Boolean, label: "Waterfall total", default: !1 }, ir = { key: "barBackground", type: fe.Boolean, label: "Bar background", default: !1 }, Yr = { key: "barGap", type: fe.Text, label: "Bar gap", default: String(sn), placeholder: String(sn) }, or = { key: "barSeparators", type: fe.Boolean, label: "Bar separators", default: !1 },
|
|
4803
|
+
}, Vr = { key: "edgePadding", type: fe.Boolean, label: "Edge padding", default: !1 }, _r = { key: "waterfall", type: fe.Boolean, label: "Waterfall", default: !1 }, Gr = { key: "waterfallTotal", type: fe.Boolean, label: "Waterfall total", default: !1 }, ir = { key: "barBackground", type: fe.Boolean, label: "Bar background", default: !1 }, Yr = { key: "barGap", type: fe.Text, label: "Bar gap", default: String(sn), placeholder: String(sn) }, or = { key: "barSeparators", type: fe.Boolean, label: "Bar separators", default: !1 }, Rr = { key: "connectedColumns", type: fe.Boolean, label: "Connected columns", default: !1 }, Hr = { key: "connectionsOpacity", type: fe.Text, label: "Opacity", default: "0.15", placeholder: "0.15" }, Wr = { key: "swapLabelValue", type: fe.Boolean, label: "Swap labels and values", default: !1 }, Ui = {
|
|
4801
4804
|
key: "stackMode",
|
|
4802
4805
|
type: fe.Select,
|
|
4803
4806
|
label: "Stack mode",
|
|
@@ -4806,7 +4809,7 @@ const Ps = [
|
|
|
4806
4809
|
{ value: ka.Normal, text: "Normal" },
|
|
4807
4810
|
{ value: ka.Percent, text: "Percentage (100%)" }
|
|
4808
4811
|
]
|
|
4809
|
-
},
|
|
4812
|
+
}, Of = { key: "sharedScale", type: fe.Boolean, label: "Shared scale", default: !1 }, Da = { key: "categoryLabelLine", type: fe.Boolean, label: "Labels on separate line", default: !1 }, ji = { key: "displayAsPercentage", type: fe.Boolean, label: "Display as percentage", default: !1 }, Zi = { key: "showTotal", type: fe.Boolean, label: "Show total", default: !1 }, Qi = { key: "showLabels", type: fe.Boolean, label: "Show labels", default: !0 }, Ji = { key: "showValues", type: fe.Boolean, label: "Show values", default: !0 }, Ki = { key: "sliceMax", type: fe.Text, label: "Max slices", default: "6" }, eo = { key: "sliceGroupLabel", type: fe.Text, label: "Group label", default: "Others", placeholder: "Others" }, Pf = { key: "areaFillOpacity", type: fe.Text, label: "Opacity", default: "0.85", placeholder: "0.85" }, Tf = { key: "stacked", type: fe.Boolean, label: "Stack areas", default: !0 }, zf = { key: "stackPercent", type: fe.Boolean, label: "Stack to 100%", default: !1 }, Df = { key: "areaLines", type: fe.Boolean, label: "Separate areas with lines", default: !0 }, Ef = {
|
|
4810
4813
|
key: "areaSortMode",
|
|
4811
4814
|
type: fe.Select,
|
|
4812
4815
|
label: "Sort areas",
|
|
@@ -4816,7 +4819,7 @@ const Ps = [
|
|
|
4816
4819
|
{ value: ft.Ascending, text: "Smallest first" },
|
|
4817
4820
|
{ value: ft.Descending, text: "Largest first" }
|
|
4818
4821
|
]
|
|
4819
|
-
},
|
|
4822
|
+
}, Ff = {
|
|
4820
4823
|
key: "interpolation",
|
|
4821
4824
|
type: fe.Select,
|
|
4822
4825
|
label: "Line interpolation",
|
|
@@ -4839,7 +4842,7 @@ const Ps = [
|
|
|
4839
4842
|
{ value: We.Inside, text: "Inside" },
|
|
4840
4843
|
{ value: We.Outside, text: "Outside" },
|
|
4841
4844
|
{ value: We.Off, text: "Off" }
|
|
4842
|
-
],
|
|
4845
|
+
], Nf = [
|
|
4843
4846
|
{ value: Ka.Auto, text: "Auto" },
|
|
4844
4847
|
{ value: Ka.Horizontal, text: "Horizontal" },
|
|
4845
4848
|
{ value: Ka.Vertical, text: "Vertical" }
|
|
@@ -4860,7 +4863,7 @@ function lr(t) {
|
|
|
4860
4863
|
{ key: "showHorizontalAxis", type: fe.Boolean, label: "Show horizontal axis", default: !0 },
|
|
4861
4864
|
{ key: "showHorizontalTicks", type: fe.Boolean, label: "Show horizontal ticks", default: t.showHorizontalTicks },
|
|
4862
4865
|
{ key: "horizontalLabelPosition", type: fe.Select, label: "Horizontal labels", default: We.Auto, choices: zs },
|
|
4863
|
-
{ key: "horizontalLabelRotation", type: fe.Select, label: "Horizontal label rotation", default: Ka.Horizontal, choices:
|
|
4866
|
+
{ key: "horizontalLabelRotation", type: fe.Select, label: "Horizontal label rotation", default: Ka.Horizontal, choices: Nf },
|
|
4864
4867
|
{ key: "horizontalGridStyle", type: fe.Select, label: "Horizontal grid style", default: t.horizontalGrid, choices: Ps },
|
|
4865
4868
|
{ key: "horizontalNumberFormat", type: fe.NumberFormat, label: "Horizontal number format" },
|
|
4866
4869
|
...t.valueAxis === "horizontal" ? [
|
|
@@ -4874,23 +4877,23 @@ function lr(t) {
|
|
|
4874
4877
|
] : []
|
|
4875
4878
|
];
|
|
4876
4879
|
}
|
|
4877
|
-
const qr = lr({ verticalGrid: tt.Dashed, horizontalGrid: tt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", valueAxisZeroBaseline: !0 }), cr = lr({ verticalGrid: tt.None, horizontalGrid: tt.Dashed, showVerticalTicks: !1, showHorizontalTicks: !1, valueAxis: "horizontal", valueAxisZeroBaseline: !0 }),
|
|
4878
|
-
St(xt.BarVertical,
|
|
4879
|
-
St(xt.BarHorizontal,
|
|
4880
|
-
St(xt.BarMulti,
|
|
4881
|
-
St(xt.Line,
|
|
4882
|
-
St(xt.LineMulti,
|
|
4883
|
-
St(xt.Donut,
|
|
4884
|
-
St(xt.Pie,
|
|
4885
|
-
St(xt.Area,
|
|
4886
|
-
const
|
|
4887
|
-
St(xt.AreaStacked,
|
|
4888
|
-
St(xt.ColumnStacked,
|
|
4889
|
-
St(xt.BarStacked,
|
|
4890
|
-
St(xt.BarSplit,
|
|
4891
|
-
St(xt.BarGrouped,
|
|
4892
|
-
St(xt.VerticalBar,
|
|
4893
|
-
St(xt.HorizontalBar,
|
|
4880
|
+
const qr = lr({ verticalGrid: tt.Dashed, horizontalGrid: tt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", valueAxisZeroBaseline: !0 }), cr = lr({ verticalGrid: tt.None, horizontalGrid: tt.Dashed, showVerticalTicks: !1, showHorizontalTicks: !1, valueAxis: "horizontal", valueAxisZeroBaseline: !0 }), to = lr({ verticalGrid: tt.Dashed, horizontalGrid: tt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0 }), If = lr({ verticalGrid: tt.Dashed, horizontalGrid: tt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0, valueAxisZeroBaseline: !0 }), Xr = { ...Ff, default: Kt.MonotoneX }, Bf = { ...Vi, default: yt.Vertical }, Vf = { ...Bi, default: !0 }, _f = { ...Yi, default: !0 }, ao = { ...sr, default: ea.Total }, $n = { ...Ir, default: !0 }, Gf = { ...ji, default: !0 }, Yf = { ...Ki, default: "5" }, Rf = { ...Zi, default: !0 }, Ur = { ...Nr, default: vt.Auto }, jr = { ...ja, default: !1 }, Zr = [Bi, Vi, _i, Gi], Cn = [Vf, Bf, _i, Gi], Qr = [Ir, Br, ga, ...Zr], Mn = [$n, Br, ga, ...Zr], Hf = [Yi, Ri, Hi, Wi, qi, Xi], Wf = [_f, Ri, Hi, Wi, qi, Xi], ro = [Ir, ga, ...Cn, ...Hf], qf = [Ir, ga, ...Cn, ...Wf], Xf = [Gf, Zi, Qi, Ji, Yf, eo], Uf = [ji, Rf, Qi, Ji, Ki, eo];
|
|
4881
|
+
St(xt.BarVertical, vi, [kt, Lt, $t, Ct, Wr, ir, or, Yr, Rr, Hr, _r, Gr, Da, ...qr, ...Qr]);
|
|
4882
|
+
St(xt.BarHorizontal, xi, [kt, Lt, $t, Ct, Wr, ir, or, Yr, Rr, Hr, _r, Gr, Da, ...cr, ...Mn]);
|
|
4883
|
+
St(xt.BarMulti, Wc, [kt, Lt, $t, Ct, ao, jr, ha, ua, Ur, Ln, ...qr, ...Qr]);
|
|
4884
|
+
St(xt.Line, Kc, [kt, Lt, $t, Ct, Xr, Vr, ...to, ...ro]);
|
|
4885
|
+
St(xt.LineMulti, rf, [kt, Lt, $t, Ct, Xr, Vr, sr, jr, ha, ua, Ur, ...to, ...qf]);
|
|
4886
|
+
St(xt.Donut, ff, [kt, Lt, $t, Ct, jr, ha, ua, Ur, ga, ...Uf]);
|
|
4887
|
+
St(xt.Pie, df, [kt, Lt, $t, Ct, jr, ha, ua, Ur, ga, ...Xf]);
|
|
4888
|
+
St(xt.Area, hf, [kt, Lt, $t, Ct, Xr, Vr, ...If, ...ro]);
|
|
4889
|
+
const jf = lr({ verticalGrid: tt.Dashed, horizontalGrid: tt.None, showVerticalTicks: !1, showHorizontalTicks: !1, showVerticalAxis: !1, valueAxis: "vertical", horizontalRange: !0, valueAxisZeroBaseline: !0 });
|
|
4890
|
+
St(xt.AreaStacked, pf, [kt, Lt, $t, Ct, Pf, Xr, Vr, Ef, Tf, zf, Df, ja, ha, ua, Nr, ...jf, ga, ...Cn]);
|
|
4891
|
+
St(xt.ColumnStacked, yf, [kt, Lt, $t, Ct, Ui, sr, ja, ha, ua, Nr, Ln, ...qr, ...Qr]);
|
|
4892
|
+
St(xt.BarStacked, Af, [kt, Lt, $t, Ct, Ui, sr, ja, ha, ua, Nr, Ln, Da, ...cr, ...Mn]);
|
|
4893
|
+
St(xt.BarSplit, Lf, [kt, Lt, $t, Ct, Of, sr, ja, ha, ua, Da, ...cr, $n, Br, ga, ...Zr]);
|
|
4894
|
+
St(xt.BarGrouped, Cf, [kt, Lt, $t, Ct, ao, ja, ha, ua, ir, or, Da, ...cr, $n, Br, ga, ...Zr]);
|
|
4895
|
+
St(xt.VerticalBar, vi, [kt, Lt, $t, Ct, Wr, ir, or, Yr, Rr, Hr, _r, Gr, Da, ...qr, ...Qr]);
|
|
4896
|
+
St(xt.HorizontalBar, xi, [kt, Lt, $t, Ct, Wr, ir, or, Yr, Rr, Hr, _r, Gr, Da, ...cr, ...Mn]);
|
|
4894
4897
|
function Ds(t) {
|
|
4895
4898
|
const a = t == null ? void 0 : t.trim();
|
|
4896
4899
|
if (!a)
|
|
@@ -4898,7 +4901,7 @@ function Ds(t) {
|
|
|
4898
4901
|
const e = Number.parseFloat(a);
|
|
4899
4902
|
return Number.isFinite(e) ? e : void 0;
|
|
4900
4903
|
}
|
|
4901
|
-
function
|
|
4904
|
+
function no(t) {
|
|
4902
4905
|
var s;
|
|
4903
4906
|
const a = t.split(`
|
|
4904
4907
|
`).map((o) => o.trim()).filter(Boolean), e = [], r = [], n = (s = a[0]) == null ? void 0 : s.match(/^_series\s*=\s*(.+)$/);
|
|
@@ -4927,15 +4930,15 @@ function ro(t) {
|
|
|
4927
4930
|
}
|
|
4928
4931
|
return { labels: e, values: r };
|
|
4929
4932
|
}
|
|
4930
|
-
function
|
|
4931
|
-
const e = {}, r =
|
|
4932
|
-
return r ? e.colors = r : t.colors && t.colors.length > 0 && (e.colors = t.colors), t.autoContrast && a && e.colors && (e.colors =
|
|
4933
|
+
function Zf(t, a) {
|
|
4934
|
+
const e = {}, r = Jl(t.colorPalette);
|
|
4935
|
+
return r ? e.colors = r : t.colors && t.colors.length > 0 && (e.colors = t.colors), t.autoContrast && a && e.colors && (e.colors = mc(e.colors, a)), t.allowDarkMode !== void 0 && (e.allowDarkMode = t.allowDarkMode), e;
|
|
4933
4936
|
}
|
|
4934
|
-
function
|
|
4937
|
+
function Qf(t) {
|
|
4935
4938
|
const a = {};
|
|
4936
4939
|
return t.legend !== void 0 && (a.legend = t.legend), t.legendPosition !== void 0 && (a.legendPosition = t.legendPosition), t.legendAnchor !== void 0 && (a.legendAnchor = t.legendAnchor), t.directLabelling !== void 0 && (a.directLabelling = t.directLabelling), t.directLabelAnchor !== void 0 && (a.directLabelAnchor = t.directLabelAnchor), a;
|
|
4937
4940
|
}
|
|
4938
|
-
function
|
|
4941
|
+
function Jf(t) {
|
|
4939
4942
|
if (!(t.showVerticalTicks !== void 0 || t.verticalGridStyle !== void 0 || t.verticalNumberFormat !== void 0 || t.showVerticalAxis !== void 0 || t.verticalAxisDirection !== void 0 || t.verticalScaleType !== void 0 || t.verticalLabelPosition !== void 0 || t.verticalRangeMin || t.verticalRangeMax))
|
|
4940
4943
|
return {};
|
|
4941
4944
|
const e = {};
|
|
@@ -4943,7 +4946,7 @@ function Qf(t) {
|
|
|
4943
4946
|
const r = tr(t.verticalRangeMin ?? ""), n = tr(t.verticalRangeMax ?? "");
|
|
4944
4947
|
return (r !== void 0 || n !== void 0) && (e.range = {}, r !== void 0 && (e.range.min = r), n !== void 0 && (e.range.max = n)), { verticalAxis: e };
|
|
4945
4948
|
}
|
|
4946
|
-
function
|
|
4949
|
+
function Kf(t) {
|
|
4947
4950
|
if (!(t.showHorizontalTicks !== void 0 || t.horizontalGridStyle !== void 0 || t.horizontalNumberFormat !== void 0 || t.showHorizontalAxis !== void 0 || t.horizontalScaleType !== void 0 || t.horizontalLabelPosition !== void 0 || t.horizontalLabelRotation !== void 0 || t.horizontalRangeMin || t.horizontalRangeMax))
|
|
4948
4951
|
return {};
|
|
4949
4952
|
const e = {};
|
|
@@ -4951,7 +4954,7 @@ function Jf(t) {
|
|
|
4951
4954
|
const r = tr(t.horizontalRangeMin ?? ""), n = tr(t.horizontalRangeMax ?? "");
|
|
4952
4955
|
return (r !== void 0 || n !== void 0) && (e.range = {}, r !== void 0 && (e.range.min = r), n !== void 0 && (e.range.max = n)), { horizontalAxis: e };
|
|
4953
4956
|
}
|
|
4954
|
-
function
|
|
4957
|
+
function ed(t) {
|
|
4955
4958
|
return t.lineSymbols ? {
|
|
4956
4959
|
lineSymbols: {
|
|
4957
4960
|
symbol: t.lineSymbolShape ?? Et.Circle,
|
|
@@ -4962,13 +4965,13 @@ function Kf(t) {
|
|
|
4962
4965
|
}
|
|
4963
4966
|
} : {};
|
|
4964
4967
|
}
|
|
4965
|
-
function
|
|
4968
|
+
function td(t, a) {
|
|
4966
4969
|
const e = {
|
|
4967
|
-
...
|
|
4968
|
-
...Zf(t),
|
|
4970
|
+
...Zf(t, a),
|
|
4969
4971
|
...Qf(t),
|
|
4970
4972
|
...Jf(t),
|
|
4971
|
-
...Kf(t)
|
|
4973
|
+
...Kf(t),
|
|
4974
|
+
...ed(t)
|
|
4972
4975
|
};
|
|
4973
4976
|
t.interpolation !== void 0 && (e.interpolation = t.interpolation), t.valueLabels !== void 0 && (e.valueLabels = t.valueLabels), t.valueLabelPosition !== void 0 && (e.valueLabelPosition = t.valueLabelPosition), t.tooltips !== void 0 && (e.tooltips = t.tooltips), t.crosshair !== void 0 && (e.crosshair = t.crosshair), t.crosshairDirection && (e.crosshairDirection = t.crosshairDirection), t.crosshairStyle && (e.crosshairStyle = t.crosshairStyle), t.crosshairColor && (e.crosshairColor = t.crosshairColor), t.displayAsPercentage !== void 0 && (e.displayAsPercentage = t.displayAsPercentage), t.showTotal !== void 0 && (e.showTotal = t.showTotal), t.showLabels !== void 0 && (e.showLabels = t.showLabels), t.showValues !== void 0 && (e.showValues = t.showValues), t.swapLabelValue !== void 0 && (e.swapLabelValue = t.swapLabelValue);
|
|
4974
4977
|
const r = parseInt(t.sliceMax ?? "", 10);
|
|
@@ -4980,7 +4983,7 @@ function ed(t, a) {
|
|
|
4980
4983
|
const o = parseFloat(t.areaFillOpacity ?? "");
|
|
4981
4984
|
return isNaN(o) || (e.areaFillOpacity = o), t.edgePadding !== void 0 && (e.edgePadding = t.edgePadding), t.waterfall !== void 0 && (e.waterfall = t.waterfall), t.waterfallTotal !== void 0 && (e.waterfallTotal = t.waterfallTotal), t.categoryLabelLine !== void 0 && (e.categoryLabelLine = t.categoryLabelLine), e;
|
|
4982
4985
|
}
|
|
4983
|
-
const
|
|
4986
|
+
const ad = [
|
|
4984
4987
|
{ intent: "range", pattern: /\b(range|high and low|high\/low|margin of error|confidence interval|confidence|interval|plus or minus|spread between)\b/i },
|
|
4985
4988
|
{ intent: "composition-over-time", pattern: /(composition|mix|stacked|breakdown)[^.]*\b(over time|by year|by quarter|by month|by decade)\b|\b(over time|by year|by quarter|by month)\b[^.]*(composition|mix|breakdown)/i },
|
|
4986
4989
|
{ intent: "part-to-whole", pattern: /\b(share|part[- ]to[- ]whole|proportion|percentage of (?:the )?total|% of (?:the )?total|makes? up|out of (?:the )?total|composition)\b/i },
|
|
@@ -4988,10 +4991,10 @@ const td = [
|
|
|
4988
4991
|
{ intent: "trend", pattern: /\b(over time|trend|grew|rose|fell|climbed|declined|increased?|decreased?|change over|year[- ]over[- ]year|overtak\w*|overtook|surpass\w*|crossover|diverg\w*)\b/i },
|
|
4989
4992
|
{ intent: "comparison", pattern: /\b(compares?|compared|comparison|versus|vs\.?|more than|difference between|across|than)\b/i }
|
|
4990
4993
|
];
|
|
4991
|
-
function
|
|
4994
|
+
function rd(t) {
|
|
4992
4995
|
if (t === void 0 || t.trim() === "")
|
|
4993
4996
|
return "none";
|
|
4994
|
-
for (const a of
|
|
4997
|
+
for (const a of ad)
|
|
4995
4998
|
if (a.pattern.test(t))
|
|
4996
4999
|
return a.intent;
|
|
4997
5000
|
return "none";
|
|
@@ -5034,10 +5037,10 @@ const De = (t, a, e) => ({ type: t, fitness: a, reason: e }), Sa = {
|
|
|
5034
5037
|
],
|
|
5035
5038
|
comparison: (t) => Sa["1cat+Nnum"].none(t),
|
|
5036
5039
|
ranking: (t) => Sa["1cat+Nnum"].none(t),
|
|
5037
|
-
//
|
|
5040
|
+
// Crossover/trend stories read as lines, even over categorical periods (turn-6 re-cut).
|
|
5038
5041
|
trend: () => [
|
|
5039
|
-
De("
|
|
5040
|
-
De("
|
|
5042
|
+
De("line-multi", "best", "A trend or crossover story reads best as lines, even over categorical periods"),
|
|
5043
|
+
De("bar-multi", "alternative", "Grouped bars if per-period comparison matters more than the trend")
|
|
5041
5044
|
],
|
|
5042
5045
|
"part-to-whole": () => [
|
|
5043
5046
|
De("bar-stacked", "best", "Stacked bars show composition within each category"),
|
|
@@ -5105,15 +5108,15 @@ const De = (t, a, e) => ({ type: t, fitness: a, reason: e }), Sa = {
|
|
|
5105
5108
|
]
|
|
5106
5109
|
}
|
|
5107
5110
|
};
|
|
5108
|
-
function
|
|
5111
|
+
function nd(t, a, e) {
|
|
5109
5112
|
const r = Sa[t], n = r[a] ?? r.none;
|
|
5110
5113
|
return n ? n(e) : [De("bar-vertical", "good", "Default bar chart recommendation")];
|
|
5111
5114
|
}
|
|
5112
|
-
function
|
|
5115
|
+
function sd(t, a) {
|
|
5113
5116
|
const e = t.filter((s) => s === "string").length, r = t.filter((s) => s === "number").length, n = t.filter((s) => s === "date").length;
|
|
5114
5117
|
return n === 1 && e === 0 && r >= 1 ? r === 1 ? "1date+1num" : "1date+Nnum" : e === 1 && n === 0 && r >= 1 ? r === 1 ? "1cat+1num" : "1cat+Nnum" : "other";
|
|
5115
5118
|
}
|
|
5116
|
-
const
|
|
5119
|
+
const id = {
|
|
5117
5120
|
"bar-vertical": "Vertical Bar Chart",
|
|
5118
5121
|
"bar-horizontal": "Horizontal Bar Chart",
|
|
5119
5122
|
"bar-multi": "Grouped Bar Chart",
|
|
@@ -5128,19 +5131,19 @@ const sd = {
|
|
|
5128
5131
|
pie: "Pie Chart",
|
|
5129
5132
|
donut: "Donut Chart"
|
|
5130
5133
|
};
|
|
5131
|
-
function
|
|
5134
|
+
function fu(t, a, e) {
|
|
5132
5135
|
if (t.length === 0)
|
|
5133
5136
|
return [];
|
|
5134
|
-
const r =
|
|
5135
|
-
return
|
|
5137
|
+
const r = sd(t), n = rd(e);
|
|
5138
|
+
return nd(r, n, a).map((s) => ({
|
|
5136
5139
|
chartType: s.type,
|
|
5137
|
-
label:
|
|
5140
|
+
label: id[s.type] ?? s.type,
|
|
5138
5141
|
fitness: s.fitness,
|
|
5139
5142
|
reason: s.reason
|
|
5140
5143
|
}));
|
|
5141
5144
|
}
|
|
5142
5145
|
const an = /* @__PURE__ */ Object.create(null);
|
|
5143
|
-
function
|
|
5146
|
+
function od(t) {
|
|
5144
5147
|
if (!an[t]) {
|
|
5145
5148
|
const a = {};
|
|
5146
5149
|
for (const e of kn(t))
|
|
@@ -5151,14 +5154,14 @@ function id(t) {
|
|
|
5151
5154
|
}
|
|
5152
5155
|
function Es(t, a) {
|
|
5153
5156
|
var n;
|
|
5154
|
-
const e =
|
|
5157
|
+
const e = od(t);
|
|
5155
5158
|
return ((n = a.colors) == null ? void 0 : n.length) ? { ...e, colorPalette: void 0, ...a } : { ...e, ...a };
|
|
5156
5159
|
}
|
|
5157
|
-
const
|
|
5160
|
+
const ld = {
|
|
5158
5161
|
protanopia: "Protanopia (no red)",
|
|
5159
5162
|
deuteranopia: "Deuteranopia (no green)",
|
|
5160
5163
|
tritanopia: "Tritanopia (no blue)"
|
|
5161
|
-
},
|
|
5164
|
+
}, so = {
|
|
5162
5165
|
protanopia: [
|
|
5163
5166
|
0.152286,
|
|
5164
5167
|
1.052583,
|
|
@@ -5226,42 +5229,42 @@ const od = {
|
|
|
5226
5229
|
0
|
|
5227
5230
|
]
|
|
5228
5231
|
};
|
|
5229
|
-
function
|
|
5232
|
+
function cd(t) {
|
|
5230
5233
|
return `bc-cvd-${t}`;
|
|
5231
5234
|
}
|
|
5232
|
-
function
|
|
5235
|
+
function du(t) {
|
|
5233
5236
|
const a = "http://www.w3.org/2000/svg", e = document.createElementNS(a, "filter");
|
|
5234
|
-
e.setAttribute("id",
|
|
5237
|
+
e.setAttribute("id", cd(t)), e.setAttribute("color-interpolation-filters", "linearRGB");
|
|
5235
5238
|
const r = document.createElementNS(a, "feColorMatrix");
|
|
5236
|
-
return r.setAttribute("type", "matrix"), r.setAttribute("values",
|
|
5239
|
+
return r.setAttribute("type", "matrix"), r.setAttribute("values", so[t].join(" ")), e.appendChild(r), e;
|
|
5237
5240
|
}
|
|
5238
|
-
function
|
|
5241
|
+
function fd(t) {
|
|
5239
5242
|
return t <= 0.04045 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
|
|
5240
5243
|
}
|
|
5241
5244
|
function rn(t) {
|
|
5242
5245
|
return t <= 31308e-7 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - 0.055;
|
|
5243
5246
|
}
|
|
5244
|
-
function
|
|
5245
|
-
const [e, r, n] =
|
|
5246
|
-
return
|
|
5247
|
+
function dd(t, a) {
|
|
5248
|
+
const [e, r, n] = He(t).rgb().map((d) => fd(d / 255)), s = so[a], o = rn(s[0] * e + s[1] * r + s[2] * n), i = rn(s[5] * e + s[6] * r + s[7] * n), c = rn(s[10] * e + s[11] * r + s[12] * n), f = (d) => Math.min(255, Math.max(0, Math.round(d * 255)));
|
|
5249
|
+
return He(f(o), f(i), f(c)).hex();
|
|
5247
5250
|
}
|
|
5248
|
-
const
|
|
5249
|
-
function
|
|
5251
|
+
const ud = 10;
|
|
5252
|
+
function uu(t) {
|
|
5250
5253
|
if (t.length < 2)
|
|
5251
5254
|
return [];
|
|
5252
5255
|
const a = ["protanopia", "deuteranopia", "tritanopia"], e = [];
|
|
5253
5256
|
for (const r of a) {
|
|
5254
|
-
const n = t.map((o) =>
|
|
5257
|
+
const n = t.map((o) => dd(o, r)), s = [];
|
|
5255
5258
|
for (let o = 0; o < n.length; o++)
|
|
5256
5259
|
for (let i = o + 1; i < n.length; i++) {
|
|
5257
|
-
const c =
|
|
5258
|
-
c <
|
|
5260
|
+
const c = He.deltaE(n[o], n[i]);
|
|
5261
|
+
c < ud && s.push({ a: t[o], b: t[i], deltaE: c });
|
|
5259
5262
|
}
|
|
5260
|
-
s.length > 0 && e.push({ type: r, label:
|
|
5263
|
+
s.length > 0 && e.push({ type: r, label: ld[r], pairs: s });
|
|
5261
5264
|
}
|
|
5262
5265
|
return e;
|
|
5263
5266
|
}
|
|
5264
|
-
function
|
|
5267
|
+
function hd(t) {
|
|
5265
5268
|
const a = {
|
|
5266
5269
|
properties: [],
|
|
5267
5270
|
data: null,
|
|
@@ -5311,7 +5314,7 @@ function ud(t) {
|
|
|
5311
5314
|
}
|
|
5312
5315
|
return a;
|
|
5313
5316
|
}
|
|
5314
|
-
function
|
|
5317
|
+
function gd(t) {
|
|
5315
5318
|
const a = {
|
|
5316
5319
|
properties: [],
|
|
5317
5320
|
data: null,
|
|
@@ -5357,7 +5360,7 @@ function hd(t) {
|
|
|
5357
5360
|
}
|
|
5358
5361
|
return a;
|
|
5359
5362
|
}
|
|
5360
|
-
function
|
|
5363
|
+
function pd(t, a) {
|
|
5361
5364
|
function e() {
|
|
5362
5365
|
this.constructor = t;
|
|
5363
5366
|
}
|
|
@@ -5367,7 +5370,7 @@ function La(t, a, e, r) {
|
|
|
5367
5370
|
var n = Error.call(this, t);
|
|
5368
5371
|
return Object.setPrototypeOf && Object.setPrototypeOf(n, La.prototype), n.expected = a, n.found = e, n.location = r, n.name = "SyntaxError", n;
|
|
5369
5372
|
}
|
|
5370
|
-
|
|
5373
|
+
pd(La, Error);
|
|
5371
5374
|
function nn(t, a, e) {
|
|
5372
5375
|
return e = e || " ", t.length > a ? t : (a -= t.length, e += e.repeat(a), t + e.slice(0, a));
|
|
5373
5376
|
}
|
|
@@ -5456,13 +5459,13 @@ La.buildMessage = function(t, a) {
|
|
|
5456
5459
|
}
|
|
5457
5460
|
return "Expected " + i(t) + " but " + c(a) + " found.";
|
|
5458
5461
|
};
|
|
5459
|
-
function
|
|
5462
|
+
function bd(t, a) {
|
|
5460
5463
|
a = a !== void 0 ? a : {};
|
|
5461
|
-
var e = {}, r = a.grammarSource, n = { Chart: Gn }, s = Gn, o = "chart", i = "{", c = "}", f = "data", d = "=", g = ",", b = " ", m = "colorize", v = "highlight", y = "areafill", x = "annotation", A = "range", L = "note", w = "series", T = "scene", I = "step", E = "transform", j = "hide_annotation", B = "hide_range", V = "hide_note", Z = "show_annotation", _ = "show_range", ae = "show_note", ie = "%", re = "-", F = ".",
|
|
5462
|
-
`, "\r", "{", "}", "="], !0, !1), K = Ye("colorize", !1), U = Ye("highlight", !1), G = Ye("areafill", !1), Q = Ye("annotation", !1), ne = Ye("range", !1), Se = Ye("note", !1), Y = Ye("series", !1), ce = Ye("scene", !1), Ce = Ye("step", !1), Pe = Ye("transform", !1), Ge = Ye("hide_annotation", !1), Ue = Ye("hide_range", !1), Ze = Ye("hide_note", !1), Ke = Ye("show_annotation", !1), ut = Ye("show_range", !1), ht = Ye("show_note", !1), je = Ye("%", !1), Tt = dr("identifier"), zt = ia([["a", "z"], ["A", "Z"], "_", "#"], !1, !1), ue = ia([["a", "z"], ["A", "Z"], ["0", "9"], "_", "#", "-"], !1, !1), P = Ye("-", !1), de = Ye(".", !1),
|
|
5464
|
+
var e = {}, r = a.grammarSource, n = { Chart: Gn }, s = Gn, o = "chart", i = "{", c = "}", f = "data", d = "=", g = ",", b = " ", m = "colorize", v = "highlight", y = "areafill", x = "annotation", A = "range", L = "note", w = "series", T = "scene", I = "step", E = "transform", j = "hide_annotation", B = "hide_range", V = "hide_note", Z = "show_annotation", _ = "show_range", ae = "show_note", ie = "%", re = "-", F = ".", R = '"', W = "\\", oe = "n", le = "r", ke = "t", se = "u", ve = "//", xe = "/*", be = "*/", he = /^[^\t\n\r{}=]/, me = /^[a-zA-Z_#]/, ge = /^[a-zA-Z0-9_#\-]/, Te = /^[0-9]/, ze = /^[eE]/, Fe = /^[+\-]/, J = /^[^"\\]/, X = /^[0-9a-fA-F]/, Ae = /^[^\n]/, $e = /^[ \t\n\r]/, Le = Ye("chart", !1), we = Ye("{", !1), Ee = Ye("}", !1), Ne = Ye("data", !1), k = Ye("=", !1), M = Ye(",", !1), C = Ye(" ", !1), O = ia([" ", `
|
|
5465
|
+
`, "\r", "{", "}", "="], !0, !1), K = Ye("colorize", !1), U = Ye("highlight", !1), G = Ye("areafill", !1), Q = Ye("annotation", !1), ne = Ye("range", !1), Se = Ye("note", !1), Y = Ye("series", !1), ce = Ye("scene", !1), Ce = Ye("step", !1), Pe = Ye("transform", !1), Ge = Ye("hide_annotation", !1), Ue = Ye("hide_range", !1), Ze = Ye("hide_note", !1), Ke = Ye("show_annotation", !1), ut = Ye("show_range", !1), ht = Ye("show_note", !1), je = Ye("%", !1), Tt = dr("identifier"), zt = ia([["a", "z"], ["A", "Z"], "_", "#"], !1, !1), ue = ia([["a", "z"], ["A", "Z"], ["0", "9"], "_", "#", "-"], !1, !1), P = Ye("-", !1), de = Ye(".", !1), H = ia([["0", "9"]], !1, !1), Me = ia(["e", "E"], !1, !1), qe = ia(["+", "-"], !1, !1), rt = dr("string"), lt = Ye('"', !1), nt = Ye("\\", !1), Dt = ia(['"', "\\"], !0, !1), Rt = Ye("n", !1), ca = Ye("r", !1), te = Ye("t", !1), ye = Ye("u", !1), _e = ia([["0", "9"], ["a", "f"], ["A", "F"]], !1, !1), Re = rl(), st = Ye("//", !1), it = ia([`
|
|
5463
5466
|
`], !0, !1), jt = Ye("/*", !1), pa = Ye("*/", !1), Ea = dr("whitespace"), Zt = ia([" ", " ", `
|
|
5464
|
-
`, "\r"], !1, !1), Jr = dr("optional whitespace"),
|
|
5465
|
-
const $ =
|
|
5467
|
+
`, "\r"], !1, !1), Jr = dr("optional whitespace"), bo = function(l, h) {
|
|
5468
|
+
const $ = hd(h);
|
|
5466
5469
|
return {
|
|
5467
5470
|
type: "chart",
|
|
5468
5471
|
chartType: l,
|
|
@@ -5477,39 +5480,39 @@ function pd(t, a) {
|
|
|
5477
5480
|
scenes: $.scenes,
|
|
5478
5481
|
transforms: $.transforms
|
|
5479
5482
|
};
|
|
5480
|
-
}, bo = function(l) {
|
|
5481
|
-
return l;
|
|
5482
5483
|
}, mo = function(l) {
|
|
5484
|
+
return l;
|
|
5485
|
+
}, yo = function(l) {
|
|
5483
5486
|
return { type: "data", entries: l };
|
|
5484
5487
|
}, Vn = function(l, h, $) {
|
|
5485
5488
|
return $;
|
|
5486
|
-
},
|
|
5489
|
+
}, vo = function(l, h, $) {
|
|
5487
5490
|
const S = [h, ...$];
|
|
5488
5491
|
return { type: "property", key: l, value: S[0].value, isPercentage: !1, values: S.map((z) => z.value) };
|
|
5489
|
-
},
|
|
5492
|
+
}, xo = function(l) {
|
|
5490
5493
|
return l;
|
|
5491
|
-
},
|
|
5494
|
+
}, Ao = function(l, h) {
|
|
5492
5495
|
return { type: "property", key: l, value: h.value, isPercentage: h.isPercentage };
|
|
5493
|
-
},
|
|
5496
|
+
}, wo = function(l) {
|
|
5494
5497
|
return l.trim();
|
|
5495
|
-
}, wo = function(l, h) {
|
|
5496
|
-
return { type: "colorize", target: l, properties: h };
|
|
5497
5498
|
}, So = function(l, h) {
|
|
5499
|
+
return { type: "colorize", target: l, properties: h };
|
|
5500
|
+
}, ko = function(l, h) {
|
|
5498
5501
|
return { type: "colorize", target: l, properties: h, fromHighlight: !0 };
|
|
5499
|
-
},
|
|
5502
|
+
}, Lo = function(l) {
|
|
5500
5503
|
return { type: "highlight", target: l, properties: [] };
|
|
5501
|
-
},
|
|
5504
|
+
}, $o = function(l, h, $) {
|
|
5502
5505
|
return { type: "areafill", from: l, to: h, properties: $ };
|
|
5503
|
-
},
|
|
5506
|
+
}, Co = function(l, h) {
|
|
5504
5507
|
return { type: "annotation", kind: "point", target: l, properties: h };
|
|
5505
|
-
}, Co = function(l) {
|
|
5506
|
-
return { type: "annotation", kind: "range", properties: l };
|
|
5507
5508
|
}, Mo = function(l) {
|
|
5509
|
+
return { type: "annotation", kind: "range", properties: l };
|
|
5510
|
+
}, Oo = function(l) {
|
|
5508
5511
|
return { type: "annotation", kind: "free", properties: l };
|
|
5509
|
-
}, Oo = function(l, h) {
|
|
5510
|
-
return { type: "series", name: l, properties: h };
|
|
5511
5512
|
}, Po = function(l, h) {
|
|
5512
|
-
|
|
5513
|
+
return { type: "series", name: l, properties: h };
|
|
5514
|
+
}, To = function(l, h) {
|
|
5515
|
+
const $ = gd(h);
|
|
5513
5516
|
return {
|
|
5514
5517
|
type: "scene",
|
|
5515
5518
|
name: l ?? null,
|
|
@@ -5523,63 +5526,63 @@ function pd(t, a) {
|
|
|
5523
5526
|
series: $.series,
|
|
5524
5527
|
transforms: $.transforms
|
|
5525
5528
|
};
|
|
5526
|
-
},
|
|
5529
|
+
}, zo = function(l, h) {
|
|
5527
5530
|
return { type: "transform", transformType: l, properties: h };
|
|
5528
|
-
}, zo = function(l) {
|
|
5529
|
-
return { type: "annotation-visibility", action: "hide", kind: "point", id: l };
|
|
5530
5531
|
}, Do = function(l) {
|
|
5531
|
-
return { type: "annotation-visibility", action: "hide", kind: "
|
|
5532
|
+
return { type: "annotation-visibility", action: "hide", kind: "point", id: l };
|
|
5532
5533
|
}, Eo = function(l) {
|
|
5533
|
-
return { type: "annotation-visibility", action: "hide", kind: "
|
|
5534
|
+
return { type: "annotation-visibility", action: "hide", kind: "range", id: l };
|
|
5534
5535
|
}, Fo = function(l) {
|
|
5535
|
-
return { type: "annotation-visibility", action: "
|
|
5536
|
+
return { type: "annotation-visibility", action: "hide", kind: "free", id: l };
|
|
5536
5537
|
}, No = function(l) {
|
|
5537
|
-
return { type: "annotation-visibility", action: "show", kind: "
|
|
5538
|
+
return { type: "annotation-visibility", action: "show", kind: "point", id: l };
|
|
5538
5539
|
}, Io = function(l) {
|
|
5539
|
-
return { type: "annotation-visibility", action: "show", kind: "
|
|
5540
|
+
return { type: "annotation-visibility", action: "show", kind: "range", id: l };
|
|
5540
5541
|
}, Bo = function(l) {
|
|
5541
|
-
return l;
|
|
5542
|
+
return { type: "annotation-visibility", action: "show", kind: "free", id: l };
|
|
5542
5543
|
}, Vo = function(l) {
|
|
5543
5544
|
return l;
|
|
5544
|
-
}, _o = function(l
|
|
5545
|
+
}, _o = function(l) {
|
|
5546
|
+
return l;
|
|
5547
|
+
}, Go = function(l, h) {
|
|
5545
5548
|
return { type: "property", key: l, value: h.value, isPercentage: h.isPercentage };
|
|
5546
|
-
}, Go = function(l) {
|
|
5547
|
-
return { value: l, isPercentage: !0 };
|
|
5548
5549
|
}, Yo = function(l) {
|
|
5550
|
+
return { value: l, isPercentage: !0 };
|
|
5551
|
+
}, Ro = function(l) {
|
|
5549
5552
|
return { value: l, isPercentage: !1 };
|
|
5550
5553
|
}, Ho = function(l) {
|
|
5551
5554
|
return { value: l, isPercentage: !1 };
|
|
5552
|
-
}, Ro = function(l) {
|
|
5553
|
-
return { value: l, isPercentage: !1 };
|
|
5554
5555
|
}, Wo = function(l) {
|
|
5555
|
-
return
|
|
5556
|
+
return { value: l, isPercentage: !1 };
|
|
5556
5557
|
}, qo = function(l) {
|
|
5557
|
-
return l
|
|
5558
|
+
return parseFloat(l);
|
|
5558
5559
|
}, Xo = function(l) {
|
|
5560
|
+
return l.join("");
|
|
5561
|
+
}, Uo = function(l) {
|
|
5559
5562
|
return l;
|
|
5560
|
-
}, Uo = function() {
|
|
5561
|
-
return '"';
|
|
5562
5563
|
}, jo = function() {
|
|
5563
|
-
return "
|
|
5564
|
+
return '"';
|
|
5564
5565
|
}, Zo = function() {
|
|
5566
|
+
return "\\";
|
|
5567
|
+
}, Qo = function() {
|
|
5565
5568
|
return `
|
|
5566
5569
|
`;
|
|
5567
|
-
}, Qo = function() {
|
|
5568
|
-
return "\r";
|
|
5569
5570
|
}, Jo = function() {
|
|
5571
|
+
return "\r";
|
|
5572
|
+
}, Ko = function() {
|
|
5570
5573
|
return " ";
|
|
5571
|
-
}, Ko = function(l) {
|
|
5572
|
-
return String.fromCharCode(parseInt(l, 16));
|
|
5573
5574
|
}, el = function(l) {
|
|
5574
|
-
|
|
5575
|
+
return String.fromCharCode(parseInt(l, 16));
|
|
5576
|
+
}, tl = function(l) {
|
|
5577
|
+
al("Unknown escape sequence \\" + l);
|
|
5575
5578
|
}, u = a.peg$currPos | 0, Be = u, Fa = [{ line: 1, column: 1 }], Qt = u, fr = a.peg$maxFailExpected || [], D = a.peg$silentFails | 0, Za;
|
|
5576
5579
|
if (a.startRule) {
|
|
5577
5580
|
if (!(a.startRule in n))
|
|
5578
5581
|
throw new Error(`Can't start parsing from rule "` + a.startRule + '".');
|
|
5579
5582
|
s = n[a.startRule];
|
|
5580
5583
|
}
|
|
5581
|
-
function
|
|
5582
|
-
throw h = h !== void 0 ? h : Kr(Be, u),
|
|
5584
|
+
function al(l, h) {
|
|
5585
|
+
throw h = h !== void 0 ? h : Kr(Be, u), sl(l, h);
|
|
5583
5586
|
}
|
|
5584
5587
|
function Ye(l, h) {
|
|
5585
5588
|
return { type: "literal", text: l, ignoreCase: h };
|
|
@@ -5587,10 +5590,10 @@ function pd(t, a) {
|
|
|
5587
5590
|
function ia(l, h, $) {
|
|
5588
5591
|
return { type: "class", parts: l, inverted: h, ignoreCase: $ };
|
|
5589
5592
|
}
|
|
5590
|
-
function
|
|
5593
|
+
function rl() {
|
|
5591
5594
|
return { type: "any" };
|
|
5592
5595
|
}
|
|
5593
|
-
function
|
|
5596
|
+
function nl() {
|
|
5594
5597
|
return { type: "end" };
|
|
5595
5598
|
}
|
|
5596
5599
|
function dr(l) {
|
|
@@ -5631,10 +5634,10 @@ function pd(t, a) {
|
|
|
5631
5634
|
function q(l) {
|
|
5632
5635
|
u < Qt || (u > Qt && (Qt = u, fr = []), fr.push(l));
|
|
5633
5636
|
}
|
|
5634
|
-
function
|
|
5637
|
+
function sl(l, h) {
|
|
5635
5638
|
return new La(l, null, null, h);
|
|
5636
5639
|
}
|
|
5637
|
-
function
|
|
5640
|
+
function il(l, h, $) {
|
|
5638
5641
|
return new La(
|
|
5639
5642
|
La.buildMessage(l, h),
|
|
5640
5643
|
l,
|
|
@@ -5650,7 +5653,7 @@ function pd(t, a) {
|
|
|
5650
5653
|
if (Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5651
5654
|
for (Oe(), N = [], ee = Yn(); ee !== e; )
|
|
5652
5655
|
N.push(ee), ee = Yn();
|
|
5653
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Oe(), Be = l, l =
|
|
5656
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Oe(), Be = l, l = bo(S, N)) : (u = l, l = e);
|
|
5654
5657
|
} else
|
|
5655
5658
|
u = l, l = e;
|
|
5656
5659
|
else
|
|
@@ -5663,22 +5666,22 @@ function pd(t, a) {
|
|
|
5663
5666
|
}
|
|
5664
5667
|
function Yn() {
|
|
5665
5668
|
var l, h;
|
|
5666
|
-
return l = u, Oe(), h =
|
|
5669
|
+
return l = u, Oe(), h = Rn(), h === e && (h = qn(), h === e && (h = Xn(), h === e && (h = Un(), h === e && (h = Zn(), h === e && (h = Qn(), h === e && (h = jn(), h === e && (h = es(), h === e && (h = ts(), h === e && (h = as(), h === e && (h = rs(), h === e && (h = ns(), h === e && (h = ss(), h === e && (h = Jn(), h === e && (h = ll(), h === e && (h = Kn(), h === e && (h = ur())))))))))))))))), h !== e ? (Oe(), Be = l, l = mo(h)) : (u = l, l = e), l;
|
|
5667
5670
|
}
|
|
5668
|
-
function
|
|
5671
|
+
function Rn() {
|
|
5669
5672
|
var l, h, $, S, z, N;
|
|
5670
5673
|
if (l = u, t.substr(u, 4) === f ? (h = f, u += 4) : (h = e, D === 0 && q(Ne)), h !== e)
|
|
5671
5674
|
if (Oe(), t.charCodeAt(u) === 123 ? ($ = i, u++) : ($ = e, D === 0 && q(we)), $ !== e) {
|
|
5672
|
-
for (Oe(), S = [], z = Wn(), z === e && (z =
|
|
5673
|
-
S.push(z), z = Wn(), z === e && (z =
|
|
5674
|
-
z = Oe(), t.charCodeAt(u) === 125 ? (N = c, u++) : (N = e, D === 0 && q(Ee)), N !== e ? (Be = l, l =
|
|
5675
|
+
for (Oe(), S = [], z = Wn(), z === e && (z = Hn()); z !== e; )
|
|
5676
|
+
S.push(z), z = Wn(), z === e && (z = Hn());
|
|
5677
|
+
z = Oe(), t.charCodeAt(u) === 125 ? (N = c, u++) : (N = e, D === 0 && q(Ee)), N !== e ? (Be = l, l = yo(S)) : (u = l, l = e);
|
|
5675
5678
|
} else
|
|
5676
5679
|
u = l, l = e;
|
|
5677
5680
|
else
|
|
5678
5681
|
u = l, l = e;
|
|
5679
5682
|
return l;
|
|
5680
5683
|
}
|
|
5681
|
-
function
|
|
5684
|
+
function Hn() {
|
|
5682
5685
|
var l, h, $, S, z, N, ee, pe;
|
|
5683
5686
|
if (l = u, Oe(), h = os(), h !== e)
|
|
5684
5687
|
if (Oe(), t.charCodeAt(u) === 61 ? ($ = d, u++) : ($ = e, D === 0 && q(k)), $ !== e)
|
|
@@ -5688,27 +5691,27 @@ function pd(t, a) {
|
|
|
5688
5691
|
z.push(N), N = u, t.charCodeAt(u) === 44 ? (ee = g, u++) : (ee = e, D === 0 && q(M)), ee !== e ? (Oe(), pe = Qa(), pe !== e ? (Be = N, N = Vn(h, S, pe)) : (u = N, N = e)) : (u = N, N = e);
|
|
5689
5692
|
else
|
|
5690
5693
|
z = e;
|
|
5691
|
-
z !== e ? (N = Oe(), Be = l, l =
|
|
5694
|
+
z !== e ? (N = Oe(), Be = l, l = vo(h, S, z)) : (u = l, l = e);
|
|
5692
5695
|
} else
|
|
5693
5696
|
u = l, l = e;
|
|
5694
5697
|
else
|
|
5695
5698
|
u = l, l = e;
|
|
5696
5699
|
else
|
|
5697
5700
|
u = l, l = e;
|
|
5698
|
-
return l === e && (l = u, Oe(), h = ur(), h !== e ? (Oe(), Be = l, l =
|
|
5701
|
+
return l === e && (l = u, Oe(), h = ur(), h !== e ? (Oe(), Be = l, l = xo(h)) : (u = l, l = e)), l;
|
|
5699
5702
|
}
|
|
5700
5703
|
function Wn() {
|
|
5701
5704
|
var l, h, $, S;
|
|
5702
|
-
return l = u, Oe(), h =
|
|
5705
|
+
return l = u, Oe(), h = ol(), h !== e ? (t.charCodeAt(u) === 9 ? ($ = b, u++) : ($ = e, D === 0 && q(C)), $ !== e ? (Oe(), S = Qa(), S !== e ? (Oe(), Be = l, l = Ao(h, S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5703
5706
|
}
|
|
5704
|
-
function
|
|
5707
|
+
function ol() {
|
|
5705
5708
|
var l, h, $, S;
|
|
5706
5709
|
if (l = u, h = u, $ = [], S = t.charAt(u), he.test(S) ? u++ : (S = e, D === 0 && q(O)), S !== e)
|
|
5707
5710
|
for (; S !== e; )
|
|
5708
5711
|
$.push(S), S = t.charAt(u), he.test(S) ? u++ : (S = e, D === 0 && q(O));
|
|
5709
5712
|
else
|
|
5710
5713
|
$ = e;
|
|
5711
|
-
return $ !== e ? h = t.substring(h, u) : h = $, h !== e && (Be = l, h =
|
|
5714
|
+
return $ !== e ? h = t.substring(h, u) : h = $, h !== e && (Be = l, h = wo(h)), l = h, l;
|
|
5712
5715
|
}
|
|
5713
5716
|
function qn() {
|
|
5714
5717
|
var l, h, $, S, z, N, ee, pe;
|
|
@@ -5718,7 +5721,7 @@ function pd(t, a) {
|
|
|
5718
5721
|
if (Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5719
5722
|
for (Oe(), N = [], ee = gt(); ee !== e; )
|
|
5720
5723
|
N.push(ee), ee = gt();
|
|
5721
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l =
|
|
5724
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l = So(S, N)) : (u = l, l = e);
|
|
5722
5725
|
} else
|
|
5723
5726
|
u = l, l = e;
|
|
5724
5727
|
else
|
|
@@ -5737,7 +5740,7 @@ function pd(t, a) {
|
|
|
5737
5740
|
if (Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5738
5741
|
for (Oe(), N = [], ee = gt(); ee !== e; )
|
|
5739
5742
|
N.push(ee), ee = gt();
|
|
5740
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l =
|
|
5743
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l = ko(S, N)) : (u = l, l = e);
|
|
5741
5744
|
} else
|
|
5742
5745
|
u = l, l = e;
|
|
5743
5746
|
else
|
|
@@ -5746,7 +5749,7 @@ function pd(t, a) {
|
|
|
5746
5749
|
u = l, l = e;
|
|
5747
5750
|
else
|
|
5748
5751
|
u = l, l = e;
|
|
5749
|
-
return l === e && (l = u, t.substr(u, 9) === v ? (h = v, u += 9) : (h = e, D === 0 && q(U)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5752
|
+
return l === e && (l = u, t.substr(u, 9) === v ? (h = v, u += 9) : (h = e, D === 0 && q(U)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = Lo(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e)), l;
|
|
5750
5753
|
}
|
|
5751
5754
|
function Un() {
|
|
5752
5755
|
var l, h, $, S, z, N, ee, pe, Mt, Je;
|
|
@@ -5758,7 +5761,7 @@ function pd(t, a) {
|
|
|
5758
5761
|
if (Oe(), t.charCodeAt(u) === 123 ? (ee = i, u++) : (ee = e, D === 0 && q(we)), ee !== e) {
|
|
5759
5762
|
for (Oe(), pe = [], Mt = gt(); Mt !== e; )
|
|
5760
5763
|
pe.push(Mt), Mt = gt();
|
|
5761
|
-
Mt = Oe(), t.charCodeAt(u) === 125 ? (Je = c, u++) : (Je = e, D === 0 && q(Ee)), Je !== e ? (Be = l, l =
|
|
5764
|
+
Mt = Oe(), t.charCodeAt(u) === 125 ? (Je = c, u++) : (Je = e, D === 0 && q(Ee)), Je !== e ? (Be = l, l = $o(S, N, pe)) : (u = l, l = e);
|
|
5762
5765
|
} else
|
|
5763
5766
|
u = l, l = e;
|
|
5764
5767
|
else
|
|
@@ -5781,7 +5784,7 @@ function pd(t, a) {
|
|
|
5781
5784
|
if (Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5782
5785
|
for (Oe(), N = [], ee = gt(); ee !== e; )
|
|
5783
5786
|
N.push(ee), ee = gt();
|
|
5784
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l =
|
|
5787
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l = Co(S, N)) : (u = l, l = e);
|
|
5785
5788
|
} else
|
|
5786
5789
|
u = l, l = e;
|
|
5787
5790
|
else
|
|
@@ -5798,7 +5801,7 @@ function pd(t, a) {
|
|
|
5798
5801
|
if (Oe(), t.charCodeAt(u) === 123 ? ($ = i, u++) : ($ = e, D === 0 && q(we)), $ !== e) {
|
|
5799
5802
|
for (Oe(), S = [], z = gt(); z !== e; )
|
|
5800
5803
|
S.push(z), z = gt();
|
|
5801
|
-
z = Oe(), t.charCodeAt(u) === 125 ? (N = c, u++) : (N = e, D === 0 && q(Ee)), N !== e ? (Be = l, l =
|
|
5804
|
+
z = Oe(), t.charCodeAt(u) === 125 ? (N = c, u++) : (N = e, D === 0 && q(Ee)), N !== e ? (Be = l, l = Mo(S)) : (u = l, l = e);
|
|
5802
5805
|
} else
|
|
5803
5806
|
u = l, l = e;
|
|
5804
5807
|
else
|
|
@@ -5811,7 +5814,7 @@ function pd(t, a) {
|
|
|
5811
5814
|
if (Oe(), t.charCodeAt(u) === 123 ? ($ = i, u++) : ($ = e, D === 0 && q(we)), $ !== e) {
|
|
5812
5815
|
for (Oe(), S = [], z = gt(); z !== e; )
|
|
5813
5816
|
S.push(z), z = gt();
|
|
5814
|
-
z = Oe(), t.charCodeAt(u) === 125 ? (N = c, u++) : (N = e, D === 0 && q(Ee)), N !== e ? (Be = l, l =
|
|
5817
|
+
z = Oe(), t.charCodeAt(u) === 125 ? (N = c, u++) : (N = e, D === 0 && q(Ee)), N !== e ? (Be = l, l = Oo(S)) : (u = l, l = e);
|
|
5815
5818
|
} else
|
|
5816
5819
|
u = l, l = e;
|
|
5817
5820
|
else
|
|
@@ -5826,7 +5829,7 @@ function pd(t, a) {
|
|
|
5826
5829
|
if (Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5827
5830
|
for (Oe(), N = [], ee = gt(); ee !== e; )
|
|
5828
5831
|
N.push(ee), ee = gt();
|
|
5829
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l =
|
|
5832
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l = Po(S, N)) : (u = l, l = e);
|
|
5830
5833
|
} else
|
|
5831
5834
|
u = l, l = e;
|
|
5832
5835
|
else
|
|
@@ -5837,14 +5840,14 @@ function pd(t, a) {
|
|
|
5837
5840
|
u = l, l = e;
|
|
5838
5841
|
return l;
|
|
5839
5842
|
}
|
|
5840
|
-
function
|
|
5843
|
+
function ll() {
|
|
5841
5844
|
var l, h, $, S, z, N, ee, pe;
|
|
5842
5845
|
if (l = u, t.substr(u, 5) === T ? (h = T, u += 5) : (h = e, D === 0 && q(ce)), h === e && (t.substr(u, 4) === I ? (h = I, u += 4) : (h = e, D === 0 && q(Ce))), h !== e)
|
|
5843
5846
|
if ($ = bt(), $ !== e)
|
|
5844
5847
|
if (S = pt(), S === e && (S = null), Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5845
5848
|
for (Oe(), N = [], ee = is(); ee !== e; )
|
|
5846
5849
|
N.push(ee), ee = is();
|
|
5847
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l =
|
|
5850
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l = To(S, N)) : (u = l, l = e);
|
|
5848
5851
|
} else
|
|
5849
5852
|
u = l, l = e;
|
|
5850
5853
|
else
|
|
@@ -5861,7 +5864,7 @@ function pd(t, a) {
|
|
|
5861
5864
|
if (Oe(), t.charCodeAt(u) === 123 ? (z = i, u++) : (z = e, D === 0 && q(we)), z !== e) {
|
|
5862
5865
|
for (Oe(), N = [], ee = gt(); ee !== e; )
|
|
5863
5866
|
N.push(ee), ee = gt();
|
|
5864
|
-
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l =
|
|
5867
|
+
ee = Oe(), t.charCodeAt(u) === 125 ? (pe = c, u++) : (pe = e, D === 0 && q(Ee)), pe !== e ? (Be = l, l = zo(S, N)) : (u = l, l = e);
|
|
5865
5868
|
} else
|
|
5866
5869
|
u = l, l = e;
|
|
5867
5870
|
else
|
|
@@ -5874,39 +5877,39 @@ function pd(t, a) {
|
|
|
5874
5877
|
}
|
|
5875
5878
|
function es() {
|
|
5876
5879
|
var l, h, $, S;
|
|
5877
|
-
return l = u, t.substr(u, 15) === j ? (h = j, u += 15) : (h = e, D === 0 && q(Ge)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5880
|
+
return l = u, t.substr(u, 15) === j ? (h = j, u += 15) : (h = e, D === 0 && q(Ge)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = Do(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5878
5881
|
}
|
|
5879
5882
|
function ts() {
|
|
5880
5883
|
var l, h, $, S;
|
|
5881
|
-
return l = u, t.substr(u, 10) === B ? (h = B, u += 10) : (h = e, D === 0 && q(Ue)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5884
|
+
return l = u, t.substr(u, 10) === B ? (h = B, u += 10) : (h = e, D === 0 && q(Ue)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = Eo(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5882
5885
|
}
|
|
5883
5886
|
function as() {
|
|
5884
5887
|
var l, h, $, S;
|
|
5885
|
-
return l = u, t.substr(u, 9) === V ? (h = V, u += 9) : (h = e, D === 0 && q(Ze)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5888
|
+
return l = u, t.substr(u, 9) === V ? (h = V, u += 9) : (h = e, D === 0 && q(Ze)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = Fo(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5886
5889
|
}
|
|
5887
5890
|
function rs() {
|
|
5888
5891
|
var l, h, $, S;
|
|
5889
|
-
return l = u, t.substr(u, 15) === Z ? (h = Z, u += 15) : (h = e, D === 0 && q(Ke)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5892
|
+
return l = u, t.substr(u, 15) === Z ? (h = Z, u += 15) : (h = e, D === 0 && q(Ke)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = No(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5890
5893
|
}
|
|
5891
5894
|
function ns() {
|
|
5892
5895
|
var l, h, $, S;
|
|
5893
|
-
return l = u, t.substr(u, 10) === _ ? (h = _, u += 10) : (h = e, D === 0 && q(ut)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5896
|
+
return l = u, t.substr(u, 10) === _ ? (h = _, u += 10) : (h = e, D === 0 && q(ut)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = Io(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5894
5897
|
}
|
|
5895
5898
|
function ss() {
|
|
5896
5899
|
var l, h, $, S;
|
|
5897
|
-
return l = u, t.substr(u, 9) === ae ? (h = ae, u += 9) : (h = e, D === 0 && q(ht)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l =
|
|
5900
|
+
return l = u, t.substr(u, 9) === ae ? (h = ae, u += 9) : (h = e, D === 0 && q(ht)), h !== e ? ($ = bt(), $ !== e ? (S = pt(), S !== e ? (Be = l, l = Bo(S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5898
5901
|
}
|
|
5899
5902
|
function is() {
|
|
5900
5903
|
var l, h;
|
|
5901
|
-
return l = u, Oe(), h =
|
|
5904
|
+
return l = u, Oe(), h = Rn(), h === e && (h = qn(), h === e && (h = Xn(), h === e && (h = Un(), h === e && (h = Zn(), h === e && (h = Qn(), h === e && (h = jn(), h === e && (h = es(), h === e && (h = ts(), h === e && (h = as(), h === e && (h = rs(), h === e && (h = ns(), h === e && (h = ss(), h === e && (h = Jn(), h === e && (h = Kn(), h === e && (h = ur()))))))))))))))), h !== e ? (Oe(), Be = l, l = Vo(h)) : (u = l, l = e), l;
|
|
5902
5905
|
}
|
|
5903
5906
|
function gt() {
|
|
5904
5907
|
var l, h;
|
|
5905
|
-
return l = u, Oe(), h = ur(), h !== e ? (Oe(), Be = l, l =
|
|
5908
|
+
return l = u, Oe(), h = ur(), h !== e ? (Oe(), Be = l, l = _o(h)) : (u = l, l = e), l;
|
|
5906
5909
|
}
|
|
5907
5910
|
function ur() {
|
|
5908
5911
|
var l, h, $, S;
|
|
5909
|
-
return l = u, h = os(), h !== e ? (Oe(), t.charCodeAt(u) === 61 ? ($ = d, u++) : ($ = e, D === 0 && q(k)), $ !== e ? (Oe(), S = Qa(), S !== e ? (Be = l, l =
|
|
5912
|
+
return l = u, h = os(), h !== e ? (Oe(), t.charCodeAt(u) === 61 ? ($ = d, u++) : ($ = e, D === 0 && q(k)), $ !== e ? (Oe(), S = Qa(), S !== e ? (Be = l, l = Go(h, S)) : (u = l, l = e)) : (u = l, l = e)) : (u = l, l = e), l;
|
|
5910
5913
|
}
|
|
5911
5914
|
function os() {
|
|
5912
5915
|
var l;
|
|
@@ -5914,7 +5917,7 @@ function pd(t, a) {
|
|
|
5914
5917
|
}
|
|
5915
5918
|
function Qa() {
|
|
5916
5919
|
var l, h, $;
|
|
5917
|
-
return l = u, h = ls(), h !== e ? (t.charCodeAt(u) === 37 ? ($ = ie, u++) : ($ = e, D === 0 && q(je)), $ !== e ? (Be = l, l =
|
|
5920
|
+
return l = u, h = ls(), h !== e ? (t.charCodeAt(u) === 37 ? ($ = ie, u++) : ($ = e, D === 0 && q(je)), $ !== e ? (Be = l, l = Yo(h)) : (u = l, l = e)) : (u = l, l = e), l === e && (l = u, h = ls(), h !== e && (Be = l, h = Ro(h)), l = h, l === e && (l = u, h = pt(), h !== e && (Be = l, h = Ho(h)), l = h, l === e && (l = u, h = hr(), h !== e && (Be = l, h = Wo(h)), l = h))), l;
|
|
5918
5921
|
}
|
|
5919
5922
|
function hr() {
|
|
5920
5923
|
var l, h, $, S, z;
|
|
@@ -5929,24 +5932,24 @@ function pd(t, a) {
|
|
|
5929
5932
|
function ls() {
|
|
5930
5933
|
var l, h, $, S, z, N, ee, pe, Mt, Je;
|
|
5931
5934
|
if (l = u, h = u, $ = u, t.charCodeAt(u) === 45 ? (S = re, u++) : (S = e, D === 0 && q(P)), S === e && (S = null), z = u, t.charCodeAt(u) === 46 ? (N = F, u++) : (N = e, D === 0 && q(de)), N !== e) {
|
|
5932
|
-
if (ee = [], pe = t.charAt(u), Te.test(pe) ? u++ : (pe = e, D === 0 && q(
|
|
5935
|
+
if (ee = [], pe = t.charAt(u), Te.test(pe) ? u++ : (pe = e, D === 0 && q(H)), pe !== e)
|
|
5933
5936
|
for (; pe !== e; )
|
|
5934
|
-
ee.push(pe), pe = t.charAt(u), Te.test(pe) ? u++ : (pe = e, D === 0 && q(
|
|
5937
|
+
ee.push(pe), pe = t.charAt(u), Te.test(pe) ? u++ : (pe = e, D === 0 && q(H));
|
|
5935
5938
|
else
|
|
5936
5939
|
ee = e;
|
|
5937
5940
|
ee !== e ? (N = [N, ee], z = N) : (u = z, z = e);
|
|
5938
5941
|
} else
|
|
5939
5942
|
u = z, z = e;
|
|
5940
5943
|
if (z === e) {
|
|
5941
|
-
if (z = u, N = [], ee = t.charAt(u), Te.test(ee) ? u++ : (ee = e, D === 0 && q(
|
|
5944
|
+
if (z = u, N = [], ee = t.charAt(u), Te.test(ee) ? u++ : (ee = e, D === 0 && q(H)), ee !== e)
|
|
5942
5945
|
for (; ee !== e; )
|
|
5943
|
-
N.push(ee), ee = t.charAt(u), Te.test(ee) ? u++ : (ee = e, D === 0 && q(
|
|
5946
|
+
N.push(ee), ee = t.charAt(u), Te.test(ee) ? u++ : (ee = e, D === 0 && q(H));
|
|
5944
5947
|
else
|
|
5945
5948
|
N = e;
|
|
5946
5949
|
if (N !== e) {
|
|
5947
5950
|
if (ee = u, t.charCodeAt(u) === 46 ? (pe = F, u++) : (pe = e, D === 0 && q(de)), pe !== e) {
|
|
5948
|
-
for (Mt = [], Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(
|
|
5949
|
-
Mt.push(Je), Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(
|
|
5951
|
+
for (Mt = [], Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(H)); Je !== e; )
|
|
5952
|
+
Mt.push(Je), Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(H));
|
|
5950
5953
|
pe = [pe, Mt], ee = pe;
|
|
5951
5954
|
} else
|
|
5952
5955
|
u = ee, ee = e;
|
|
@@ -5956,9 +5959,9 @@ function pd(t, a) {
|
|
|
5956
5959
|
}
|
|
5957
5960
|
if (z !== e) {
|
|
5958
5961
|
if (N = u, ee = t.charAt(u), ze.test(ee) ? u++ : (ee = e, D === 0 && q(Me)), ee !== e) {
|
|
5959
|
-
if (pe = t.charAt(u), Fe.test(pe) ? u++ : (pe = e, D === 0 && q(qe)), pe === e && (pe = null), Mt = [], Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(
|
|
5962
|
+
if (pe = t.charAt(u), Fe.test(pe) ? u++ : (pe = e, D === 0 && q(qe)), pe === e && (pe = null), Mt = [], Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(H)), Je !== e)
|
|
5960
5963
|
for (; Je !== e; )
|
|
5961
|
-
Mt.push(Je), Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(
|
|
5964
|
+
Mt.push(Je), Je = t.charAt(u), Te.test(Je) ? u++ : (Je = e, D === 0 && q(H));
|
|
5962
5965
|
else
|
|
5963
5966
|
Mt = e;
|
|
5964
5967
|
Mt !== e ? (ee = [ee, pe, Mt], N = ee) : (u = N, N = e);
|
|
@@ -5967,31 +5970,31 @@ function pd(t, a) {
|
|
|
5967
5970
|
N === e && (N = null), S = [S, z, N], $ = S;
|
|
5968
5971
|
} else
|
|
5969
5972
|
u = $, $ = e;
|
|
5970
|
-
return $ !== e ? h = t.substring(h, u) : h = $, h !== e && (Be = l, h =
|
|
5973
|
+
return $ !== e ? h = t.substring(h, u) : h = $, h !== e && (Be = l, h = qo(h)), l = h, l;
|
|
5971
5974
|
}
|
|
5972
5975
|
function pt() {
|
|
5973
5976
|
var l, h, $, S;
|
|
5974
|
-
if (D++, l = u, t.charCodeAt(u) === 34 ? (h =
|
|
5977
|
+
if (D++, l = u, t.charCodeAt(u) === 34 ? (h = R, u++) : (h = e, D === 0 && q(lt)), h !== e) {
|
|
5975
5978
|
for ($ = [], S = cs(); S !== e; )
|
|
5976
5979
|
$.push(S), S = cs();
|
|
5977
|
-
t.charCodeAt(u) === 34 ? (S =
|
|
5980
|
+
t.charCodeAt(u) === 34 ? (S = R, u++) : (S = e, D === 0 && q(lt)), S !== e ? (Be = l, l = Xo($)) : (u = l, l = e);
|
|
5978
5981
|
} else
|
|
5979
5982
|
u = l, l = e;
|
|
5980
5983
|
return D--, l === e && (h = e, D === 0 && q(rt)), l;
|
|
5981
5984
|
}
|
|
5982
5985
|
function cs() {
|
|
5983
5986
|
var l, h, $;
|
|
5984
|
-
return l = u, t.charCodeAt(u) === 92 ? (h = W, u++) : (h = e, D === 0 && q(nt)), h !== e ? ($ =
|
|
5987
|
+
return l = u, t.charCodeAt(u) === 92 ? (h = W, u++) : (h = e, D === 0 && q(nt)), h !== e ? ($ = cl(), $ !== e ? (Be = l, l = Uo($)) : (u = l, l = e)) : (u = l, l = e), l === e && (l = t.charAt(u), J.test(l) ? u++ : (l = e, D === 0 && q(Dt))), l;
|
|
5985
5988
|
}
|
|
5986
|
-
function
|
|
5989
|
+
function cl() {
|
|
5987
5990
|
var l, h, $, S, z, N, ee, pe;
|
|
5988
|
-
return l = u, t.charCodeAt(u) === 34 ? (h =
|
|
5991
|
+
return l = u, t.charCodeAt(u) === 34 ? (h = R, u++) : (h = e, D === 0 && q(lt)), h !== e && (Be = l, h = jo()), l = h, l === e && (l = u, t.charCodeAt(u) === 92 ? (h = W, u++) : (h = e, D === 0 && q(nt)), h !== e && (Be = l, h = Zo()), l = h, l === e && (l = u, t.charCodeAt(u) === 110 ? (h = oe, u++) : (h = e, D === 0 && q(Rt)), h !== e && (Be = l, h = Qo()), l = h, l === e && (l = u, t.charCodeAt(u) === 114 ? (h = le, u++) : (h = e, D === 0 && q(ca)), h !== e && (Be = l, h = Jo()), l = h, l === e && (l = u, t.charCodeAt(u) === 116 ? (h = ke, u++) : (h = e, D === 0 && q(te)), h !== e && (Be = l, h = Ko()), l = h, l === e && (l = u, t.charCodeAt(u) === 117 ? (h = se, u++) : (h = e, D === 0 && q(ye)), h !== e ? ($ = u, S = u, z = t.charAt(u), X.test(z) ? u++ : (z = e, D === 0 && q(_e)), z !== e ? (N = t.charAt(u), X.test(N) ? u++ : (N = e, D === 0 && q(_e)), N !== e ? (ee = t.charAt(u), X.test(ee) ? u++ : (ee = e, D === 0 && q(_e)), ee !== e ? (pe = t.charAt(u), X.test(pe) ? u++ : (pe = e, D === 0 && q(_e)), pe !== e ? (z = [z, N, ee, pe], S = z) : (u = S, S = e)) : (u = S, S = e)) : (u = S, S = e)) : (u = S, S = e), S !== e ? $ = t.substring($, u) : $ = S, $ !== e ? (Be = l, l = el($)) : (u = l, l = e)) : (u = l, l = e), l === e && (l = u, t.length > u ? (h = t.charAt(u), u++) : (h = e, D === 0 && q(Re)), h !== e && (Be = l, h = tl(h)), l = h)))))), l;
|
|
5989
5992
|
}
|
|
5990
5993
|
function gr() {
|
|
5991
5994
|
var l;
|
|
5992
|
-
return l =
|
|
5995
|
+
return l = fl(), l === e && (l = dl()), l;
|
|
5993
5996
|
}
|
|
5994
|
-
function
|
|
5997
|
+
function fl() {
|
|
5995
5998
|
var l, h, $, S;
|
|
5996
5999
|
if (l = u, t.substr(u, 2) === ve ? (h = ve, u += 2) : (h = e, D === 0 && q(st)), h !== e) {
|
|
5997
6000
|
for ($ = [], S = t.charAt(u), Ae.test(S) ? u++ : (S = e, D === 0 && q(it)); S !== e; )
|
|
@@ -6001,11 +6004,11 @@ function pd(t, a) {
|
|
|
6001
6004
|
u = l, l = e;
|
|
6002
6005
|
return l;
|
|
6003
6006
|
}
|
|
6004
|
-
function
|
|
6007
|
+
function dl() {
|
|
6005
6008
|
var l, h, $, S, z, N;
|
|
6006
6009
|
if (l = u, t.substr(u, 2) === xe ? (h = xe, u += 2) : (h = e, D === 0 && q(jt)), h !== e) {
|
|
6007
|
-
for ($ = [], S = u, z = u, D++, t.substr(u, 2) === be ? (N = be, u += 2) : (N = e, D === 0 && q(pa)), D--, N === e ? z = void 0 : (u = z, z = e), z !== e ? (t.length > u ? (N = t.charAt(u), u++) : (N = e, D === 0 && q(
|
|
6008
|
-
$.push(S), S = u, z = u, D++, t.substr(u, 2) === be ? (N = be, u += 2) : (N = e, D === 0 && q(pa)), D--, N === e ? z = void 0 : (u = z, z = e), z !== e ? (t.length > u ? (N = t.charAt(u), u++) : (N = e, D === 0 && q(
|
|
6010
|
+
for ($ = [], S = u, z = u, D++, t.substr(u, 2) === be ? (N = be, u += 2) : (N = e, D === 0 && q(pa)), D--, N === e ? z = void 0 : (u = z, z = e), z !== e ? (t.length > u ? (N = t.charAt(u), u++) : (N = e, D === 0 && q(Re)), N !== e ? (z = [z, N], S = z) : (u = S, S = e)) : (u = S, S = e); S !== e; )
|
|
6011
|
+
$.push(S), S = u, z = u, D++, t.substr(u, 2) === be ? (N = be, u += 2) : (N = e, D === 0 && q(pa)), D--, N === e ? z = void 0 : (u = z, z = e), z !== e ? (t.length > u ? (N = t.charAt(u), u++) : (N = e, D === 0 && q(Re)), N !== e ? (z = [z, N], S = z) : (u = S, S = e)) : (u = S, S = e);
|
|
6009
6012
|
t.substr(u, 2) === be ? (S = be, u += 2) : (S = e, D === 0 && q(pa)), S !== e ? (h = [h, $, S], l = h) : (u = l, l = e);
|
|
6010
6013
|
} else
|
|
6011
6014
|
u = l, l = e;
|
|
@@ -6039,15 +6042,15 @@ function pd(t, a) {
|
|
|
6039
6042
|
);
|
|
6040
6043
|
if (Za !== e && u === t.length)
|
|
6041
6044
|
return Za;
|
|
6042
|
-
throw Za !== e && u < t.length && q(
|
|
6045
|
+
throw Za !== e && u < t.length && q(nl()), il(
|
|
6043
6046
|
fr,
|
|
6044
6047
|
Qt < t.length ? t.charAt(Qt) : null,
|
|
6045
6048
|
Qt < t.length ? Kr(Qt, Qt + 1) : Kr(Qt, Qt)
|
|
6046
6049
|
);
|
|
6047
6050
|
}
|
|
6048
|
-
function
|
|
6051
|
+
function io(t) {
|
|
6049
6052
|
try {
|
|
6050
|
-
return
|
|
6053
|
+
return bd(t);
|
|
6051
6054
|
} catch (a) {
|
|
6052
6055
|
if (a instanceof Error && "location" in a) {
|
|
6053
6056
|
const e = a.location;
|
|
@@ -6056,14 +6059,14 @@ function so(t) {
|
|
|
6056
6059
|
throw a;
|
|
6057
6060
|
}
|
|
6058
6061
|
}
|
|
6059
|
-
function
|
|
6062
|
+
function md(t) {
|
|
6060
6063
|
return typeof t.value == "number" ? t.isPercentage ? `${t.value}%` : `${t.value}` : typeof t.value == "string" && t.value.startsWith("#") ? `"${t.value}"` : typeof t.value == "string" && /^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(t.value) ? t.value : `"${String(t.value).replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
6061
6064
|
}
|
|
6062
6065
|
function aa(t, a) {
|
|
6063
6066
|
const e = /^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(t.key) ? t.key : `"${t.key}"`;
|
|
6064
|
-
return `${a}${e} = ${
|
|
6067
|
+
return `${a}${e} = ${md(t)}`;
|
|
6065
6068
|
}
|
|
6066
|
-
function
|
|
6069
|
+
function yd(t, a) {
|
|
6067
6070
|
if (t.values && t.values.length > 1) {
|
|
6068
6071
|
const e = t.key.startsWith("_") ? t.key : `"${t.key}"`, r = t.values.map((n) => typeof n == "number" ? `${n}` : `"${String(n).replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`);
|
|
6069
6072
|
return `${a}${e} = ${r.join(",")}`;
|
|
@@ -6073,7 +6076,7 @@ function md(t, a) {
|
|
|
6073
6076
|
function On(t, a) {
|
|
6074
6077
|
const e = [`${a}data {`];
|
|
6075
6078
|
for (const r of t.entries)
|
|
6076
|
-
e.push(
|
|
6079
|
+
e.push(yd(r, `${a} `));
|
|
6077
6080
|
return e.push(`${a}}`), e.join(`
|
|
6078
6081
|
`);
|
|
6079
6082
|
}
|
|
@@ -6127,7 +6130,7 @@ function Fn(t, a) {
|
|
|
6127
6130
|
return e.push(`${a}}`), e.join(`
|
|
6128
6131
|
`);
|
|
6129
6132
|
}
|
|
6130
|
-
function
|
|
6133
|
+
function oo(t, a) {
|
|
6131
6134
|
const r = [t.name != null ? `${a}scene "${t.name}" {` : `${a}scene {`];
|
|
6132
6135
|
for (const n of t.properties)
|
|
6133
6136
|
r.push(aa(n, `${a} `));
|
|
@@ -6156,11 +6159,11 @@ function Nn(t, a) {
|
|
|
6156
6159
|
return e.push(`${a}}`), e.join(`
|
|
6157
6160
|
`);
|
|
6158
6161
|
}
|
|
6159
|
-
function
|
|
6162
|
+
function vd(t, a, e) {
|
|
6160
6163
|
const n = kn(e).find((s) => s.key === t);
|
|
6161
6164
|
return !n || n.default === void 0 ? !1 : String(n.default) === String(a);
|
|
6162
6165
|
}
|
|
6163
|
-
function
|
|
6166
|
+
function hu(t) {
|
|
6164
6167
|
const a = [`chart ${t.chartType} {`];
|
|
6165
6168
|
for (const e of t.properties)
|
|
6166
6169
|
a.push(aa(e, " "));
|
|
@@ -6178,16 +6181,16 @@ function uu(t) {
|
|
|
6178
6181
|
for (const e of t.series)
|
|
6179
6182
|
a.push(Fn(e, " "));
|
|
6180
6183
|
for (const e of t.scenes)
|
|
6181
|
-
a.push(
|
|
6184
|
+
a.push(oo(e, " "));
|
|
6182
6185
|
for (const e of t.transforms)
|
|
6183
6186
|
a.push(Nn(e, " "));
|
|
6184
6187
|
return a.push("}"), a.join(`
|
|
6185
6188
|
`);
|
|
6186
6189
|
}
|
|
6187
|
-
function
|
|
6190
|
+
function gu(t) {
|
|
6188
6191
|
const a = [`chart ${t.chartType} {`];
|
|
6189
6192
|
for (const e of t.properties)
|
|
6190
|
-
|
|
6193
|
+
vd(e.key, e.value, t.chartType) || a.push(aa(e, " "));
|
|
6191
6194
|
t.data && a.push(On(t.data, " "));
|
|
6192
6195
|
for (const e of t.colorizes)
|
|
6193
6196
|
a.push(Pn(e, " "));
|
|
@@ -6202,7 +6205,7 @@ function hu(t) {
|
|
|
6202
6205
|
for (const e of t.series)
|
|
6203
6206
|
a.push(Fn(e, " "));
|
|
6204
6207
|
for (const e of t.scenes)
|
|
6205
|
-
a.push(
|
|
6208
|
+
a.push(oo(e, " "));
|
|
6206
6209
|
for (const e of t.transforms)
|
|
6207
6210
|
a.push(Nn(e, " "));
|
|
6208
6211
|
return a.push("}"), a.join(`
|
|
@@ -6219,10 +6222,10 @@ function In(t, a) {
|
|
|
6219
6222
|
}
|
|
6220
6223
|
return s;
|
|
6221
6224
|
}
|
|
6222
|
-
function
|
|
6225
|
+
function xd(t) {
|
|
6223
6226
|
return !(/^-?\d+(\.\d+)?$/.test(t) || /^-?\d+(\.\d+)?%$/.test(t) || /^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(t));
|
|
6224
6227
|
}
|
|
6225
|
-
function
|
|
6228
|
+
function lo(t) {
|
|
6226
6229
|
return t.entries.map((a) => {
|
|
6227
6230
|
if (a.values && a.values.length > 1) {
|
|
6228
6231
|
if (a.key === "_series")
|
|
@@ -6231,11 +6234,11 @@ function oo(t) {
|
|
|
6231
6234
|
return `"${a.key}" = ${r}`;
|
|
6232
6235
|
}
|
|
6233
6236
|
const e = a.isPercentage ? `${a.value}%` : String(a.value);
|
|
6234
|
-
return a.key === "_series" ? `_series = "${e}"` : typeof a.value == "string" &&
|
|
6237
|
+
return a.key === "_series" ? `_series = "${e}"` : typeof a.value == "string" && xd(e) ? `"${a.key}" = "${e}"` : `"${a.key}" = ${e}`;
|
|
6235
6238
|
}).join(`
|
|
6236
6239
|
`);
|
|
6237
6240
|
}
|
|
6238
|
-
function
|
|
6241
|
+
function pu(t, a) {
|
|
6239
6242
|
const e = oa(t.properties), r = e.get("type"), n = r ?? a;
|
|
6240
6243
|
return {
|
|
6241
6244
|
name: t.name,
|
|
@@ -6267,17 +6270,17 @@ function Is(t) {
|
|
|
6267
6270
|
return a.isPercentage ? `${a.value}%` : a.value;
|
|
6268
6271
|
}
|
|
6269
6272
|
const ba = (t) => t === "true" || t === !0;
|
|
6270
|
-
function
|
|
6273
|
+
function co(t) {
|
|
6271
6274
|
return t.map((a) => ({
|
|
6272
6275
|
target: a.target,
|
|
6273
6276
|
color: Fs(a.properties, "color") ?? "#e15759",
|
|
6274
6277
|
label: Fs(a.properties, "label")
|
|
6275
6278
|
}));
|
|
6276
6279
|
}
|
|
6277
|
-
function
|
|
6280
|
+
function fo(t) {
|
|
6278
6281
|
return t.map((a) => ({ target: a.target }));
|
|
6279
6282
|
}
|
|
6280
|
-
function
|
|
6283
|
+
function uo(t) {
|
|
6281
6284
|
return t.map((a) => {
|
|
6282
6285
|
const e = oa(a.properties);
|
|
6283
6286
|
return {
|
|
@@ -6290,7 +6293,7 @@ function fo(t) {
|
|
|
6290
6293
|
};
|
|
6291
6294
|
});
|
|
6292
6295
|
}
|
|
6293
|
-
function
|
|
6296
|
+
function ho(t) {
|
|
6294
6297
|
return t.map((a) => {
|
|
6295
6298
|
const e = oa(a.properties), r = a.kind ?? Qe.Point;
|
|
6296
6299
|
if (r === Qe.Range) {
|
|
@@ -6322,7 +6325,7 @@ function uo(t) {
|
|
|
6322
6325
|
return o !== void 0 && (s.maxWidth = o), e.has("textOutline") && (s.textOutline = ba(e.get("textOutline"))), e.has("showLine") && (s.showLine = ba(e.get("showLine"))), e.has("anchorDirection") && (s.anchorDirection = String(e.get("anchorDirection"))), e.has("textOffsetX") && (s.textOffsetX = Number(e.get("textOffsetX"))), e.has("textOffsetY") && (s.textOffsetY = Number(e.get("textOffsetY"))), e.has("lineStyle") && (s.lineStyle = String(e.get("lineStyle"))), e.has("lineWeight") && (s.lineWeight = Number(e.get("lineWeight"))), e.has("showArrow") && (s.showArrow = ba(e.get("showArrow"))), e.has("lineTargetDistance") && (s.lineTargetDistance = Number(e.get("lineTargetDistance"))), e.has("showCircle") && (s.showCircle = ba(e.get("showCircle"))), e.has("circleSize") && (s.circleSize = Number(e.get("circleSize"))), e.has("circleStyle") && (s.circleStyle = String(e.get("circleStyle"))), e.has("circleColor") && (s.circleColor = String(e.get("circleColor"))), s;
|
|
6323
6326
|
});
|
|
6324
6327
|
}
|
|
6325
|
-
function
|
|
6328
|
+
function go(t) {
|
|
6326
6329
|
return t.map((a) => {
|
|
6327
6330
|
const e = oa(a.properties), r = { name: a.name };
|
|
6328
6331
|
if (e.has("color") && (r.color = String(e.get("color"))), e.has("lineWidth") && (r.lineWidth = Number(e.get("lineWidth"))), e.has("dash") && (r.dash = String(e.get("dash"))), e.has("interpolation") && (r.interpolation = String(e.get("interpolation"))), e.has("labelMode") && (r.labelMode = String(e.get("labelMode"))), e.has("labelText") && (r.labelText = String(e.get("labelText"))), e.has("valueLabels")) {
|
|
@@ -6332,7 +6335,7 @@ function ho(t) {
|
|
|
6332
6335
|
return e.has("lineSymbols") && (r.lineSymbols = ba(e.get("lineSymbols"))), e.has("hidden") && (r.hidden = ba(e.get("hidden"))), e.has("symbolShape") && (r.symbolShape = String(e.get("symbolShape"))), e.has("symbolShowOn") && (r.symbolShowOn = String(e.get("symbolShowOn"))), e.has("symbolStyle") && (r.symbolStyle = String(e.get("symbolStyle"))), e.has("symbolSize") && (r.symbolSize = Number(e.get("symbolSize"))), e.has("symbolOpacity") && (r.symbolOpacity = Number(e.get("symbolOpacity"))), r;
|
|
6333
6336
|
});
|
|
6334
6337
|
}
|
|
6335
|
-
const
|
|
6338
|
+
const Ad = `chart bar-vertical {
|
|
6336
6339
|
title = "E is the most frequent letter in English"
|
|
6337
6340
|
description = "How often each letter appears in typical English text"
|
|
6338
6341
|
byline = "Pierre Romera"
|
|
@@ -6360,7 +6363,7 @@ const xd = `chart bar-vertical {
|
|
|
6360
6363
|
"D" = 4.25
|
|
6361
6364
|
}
|
|
6362
6365
|
}
|
|
6363
|
-
`,
|
|
6366
|
+
`, wd = `chart bar-vertical {
|
|
6364
6367
|
title = "China emits more CO₂ than the US and India combined"
|
|
6365
6368
|
description = "Annual emissions in billion tonnes, 2023"
|
|
6366
6369
|
source = "Global Carbon Project"
|
|
@@ -6392,7 +6395,7 @@ const xd = `chart bar-vertical {
|
|
|
6392
6395
|
showCircle = false
|
|
6393
6396
|
}
|
|
6394
6397
|
}
|
|
6395
|
-
`,
|
|
6398
|
+
`, Sd = `chart bar-horizontal {
|
|
6396
6399
|
title = "Mandarin has nearly twice as many native speakers as Spanish"
|
|
6397
6400
|
description = "Number of native speakers worldwide, in millions"
|
|
6398
6401
|
source = "Ethnologue"
|
|
@@ -6415,7 +6418,7 @@ const xd = `chart bar-vertical {
|
|
|
6415
6418
|
"Japanese" = 125
|
|
6416
6419
|
}
|
|
6417
6420
|
}
|
|
6418
|
-
`,
|
|
6421
|
+
`, kd = `chart line-multi {
|
|
6419
6422
|
title = "Software overtakes hardware as the top revenue driver"
|
|
6420
6423
|
description = "USD billions"
|
|
6421
6424
|
byline = "Pierre Romera"
|
|
@@ -6434,7 +6437,7 @@ const xd = `chart bar-vertical {
|
|
|
6434
6437
|
"Q2 2025" = 16.2,15.5,10.8
|
|
6435
6438
|
}
|
|
6436
6439
|
}
|
|
6437
|
-
`,
|
|
6440
|
+
`, Ld = `chart bar-multi {
|
|
6438
6441
|
title = "USA tops Paris 2024 with 126 medals across all categories"
|
|
6439
6442
|
description = "2024 Paris Summer Games — top six nations"
|
|
6440
6443
|
source = "Olympics.com"
|
|
@@ -6455,7 +6458,7 @@ const xd = `chart bar-vertical {
|
|
|
6455
6458
|
"France" = 16,20,23
|
|
6456
6459
|
}
|
|
6457
6460
|
}
|
|
6458
|
-
`,
|
|
6461
|
+
`, $d = `chart line {
|
|
6459
6462
|
title = "2024 was the hottest year on record"
|
|
6460
6463
|
description = "Deviation from the 1951–1980 average, in °C"
|
|
6461
6464
|
source = "NASA GISS"
|
|
@@ -6487,7 +6490,7 @@ const xd = `chart bar-vertical {
|
|
|
6487
6490
|
showCircle = true
|
|
6488
6491
|
}
|
|
6489
6492
|
}
|
|
6490
|
-
`,
|
|
6493
|
+
`, Cd = `chart line-multi {
|
|
6491
6494
|
title = "Detroit's unemployment hit 16% during the Great Recession"
|
|
6492
6495
|
description = "Percent of labour force, 2000–2014"
|
|
6493
6496
|
source = "Bureau of Labor Statistics"
|
|
@@ -6515,7 +6518,7 @@ const xd = `chart bar-vertical {
|
|
|
6515
6518
|
"2014" = 6.5,8.0,7.1,8.2
|
|
6516
6519
|
}
|
|
6517
6520
|
}
|
|
6518
|
-
`,
|
|
6521
|
+
`, Md = `chart pie {
|
|
6519
6522
|
title = "Asia is home to nearly 60% of the world's population"
|
|
6520
6523
|
description = "Estimated share, 2024"
|
|
6521
6524
|
source = "United Nations"
|
|
@@ -6532,7 +6535,7 @@ const xd = `chart bar-vertical {
|
|
|
6532
6535
|
"North America" = 4.8
|
|
6533
6536
|
}
|
|
6534
6537
|
}
|
|
6535
|
-
`,
|
|
6538
|
+
`, Od = `chart bar-vertical {
|
|
6536
6539
|
title = "Brazil produces more coffee than the next three countries combined"
|
|
6537
6540
|
description = "Million 60-kg bags, 2023/24 crop year"
|
|
6538
6541
|
source = "International Coffee Organization"
|
|
@@ -6558,7 +6561,7 @@ const xd = `chart bar-vertical {
|
|
|
6558
6561
|
direction = descending
|
|
6559
6562
|
}
|
|
6560
6563
|
}
|
|
6561
|
-
`,
|
|
6564
|
+
`, Pd = `chart donut {
|
|
6562
6565
|
title = "Chrome dominates with two-thirds of the desktop browser market"
|
|
6563
6566
|
description = "Worldwide, January 2025"
|
|
6564
6567
|
source = "StatCounter"
|
|
@@ -6577,7 +6580,7 @@ const xd = `chart bar-vertical {
|
|
|
6577
6580
|
"Others" = 2.9
|
|
6578
6581
|
}
|
|
6579
6582
|
}
|
|
6580
|
-
`,
|
|
6583
|
+
`, Td = `chart area {
|
|
6581
6584
|
title = "Apple stock climbed 36 % through 2024"
|
|
6582
6585
|
description = "Monthly closing price in USD"
|
|
6583
6586
|
source = "Yahoo Finance"
|
|
@@ -6599,7 +6602,7 @@ const xd = `chart bar-vertical {
|
|
|
6599
6602
|
"Dec" = 249
|
|
6600
6603
|
}
|
|
6601
6604
|
}
|
|
6602
|
-
`,
|
|
6605
|
+
`, zd = `chart area-stacked {
|
|
6603
6606
|
title = "Renewables rose from 18 % to 23 % of global energy since 2000"
|
|
6604
6607
|
description = "Share of primary energy by source, 2000–2023"
|
|
6605
6608
|
source = "Our World in Data"
|
|
@@ -6617,8 +6620,8 @@ const xd = `chart bar-vertical {
|
|
|
6617
6620
|
"2023" = 24,29,24,23
|
|
6618
6621
|
}
|
|
6619
6622
|
}
|
|
6620
|
-
`,
|
|
6621
|
-
title = "
|
|
6623
|
+
`, Dd = `chart column-stacked {
|
|
6624
|
+
title = "Revenue climbed every quarter as the product mix held steady"
|
|
6622
6625
|
description = "Quarterly revenue in millions, 2024"
|
|
6623
6626
|
source = "Annual report"
|
|
6624
6627
|
|
|
@@ -6630,7 +6633,7 @@ const xd = `chart bar-vertical {
|
|
|
6630
6633
|
"Q4" = 155,105,58
|
|
6631
6634
|
}
|
|
6632
6635
|
}
|
|
6633
|
-
`,
|
|
6636
|
+
`, Ed = `chart bar-stacked {
|
|
6634
6637
|
title = "India's working-age population now surpasses China's"
|
|
6635
6638
|
description = "Millions of people, 2023"
|
|
6636
6639
|
source = "UN Population Division"
|
|
@@ -6647,7 +6650,7 @@ const xd = `chart bar-vertical {
|
|
|
6647
6650
|
"Brazil" = 42,150,22
|
|
6648
6651
|
}
|
|
6649
6652
|
}
|
|
6650
|
-
`,
|
|
6653
|
+
`, Fd = `chart area-stacked {
|
|
6651
6654
|
title = "EU subsidies to new members surged after enlargement"
|
|
6652
6655
|
description = "Agricultural subsidies to post-socialist EU members, million euros"
|
|
6653
6656
|
source = "Eurostat"
|
|
@@ -6846,7 +6849,7 @@ const xd = `chart bar-vertical {
|
|
|
6846
6849
|
highlight "Non-salaried workers"
|
|
6847
6850
|
}
|
|
6848
6851
|
}
|
|
6849
|
-
`,
|
|
6852
|
+
`, Nd = `chart bar-split {
|
|
6850
6853
|
title = "CDU/CSU led German polls at 29 % ahead of the 2021 election"
|
|
6851
6854
|
description = "How Germany would vote in the September 2021 federal election, according to polling in the previous June"
|
|
6852
6855
|
source = "FG Wahlen"
|
|
@@ -6863,7 +6866,7 @@ const xd = `chart bar-vertical {
|
|
|
6863
6866
|
"Left" = 7,9,5
|
|
6864
6867
|
}
|
|
6865
6868
|
}
|
|
6866
|
-
`,
|
|
6869
|
+
`, Id = `chart bar-grouped {
|
|
6867
6870
|
title = "Asia Pacific holds more renewable capacity than all other regions combined"
|
|
6868
6871
|
description = "Installed capacity in gigawatts (GW)"
|
|
6869
6872
|
source = "IRENA"
|
|
@@ -6883,7 +6886,7 @@ function Bs(t, a) {
|
|
|
6883
6886
|
const e = t.properties.find((r) => r.key === a);
|
|
6884
6887
|
return e ? String(e.value) : "";
|
|
6885
6888
|
}
|
|
6886
|
-
function
|
|
6889
|
+
function Bd(t) {
|
|
6887
6890
|
if (!t.data)
|
|
6888
6891
|
return "";
|
|
6889
6892
|
const a = t.data.entries, e = a.find((s) => s.key === "_series");
|
|
@@ -6899,7 +6902,7 @@ function Id(t) {
|
|
|
6899
6902
|
return [r, ...n].join(`
|
|
6900
6903
|
`);
|
|
6901
6904
|
}
|
|
6902
|
-
function
|
|
6905
|
+
function Vd(t) {
|
|
6903
6906
|
if (!t.data)
|
|
6904
6907
|
return "";
|
|
6905
6908
|
const a = t.data.entries, e = a.find((r) => r.key === "_series");
|
|
@@ -6912,57 +6915,57 @@ function Bd(t) {
|
|
|
6912
6915
|
`);
|
|
6913
6916
|
}
|
|
6914
6917
|
function ct(t, a) {
|
|
6915
|
-
const e =
|
|
6918
|
+
const e = io(a);
|
|
6916
6919
|
return {
|
|
6917
6920
|
id: t,
|
|
6918
6921
|
title: Bs(e, "title"),
|
|
6919
6922
|
description: Bs(e, "description"),
|
|
6920
6923
|
chartType: e.chartType,
|
|
6921
|
-
tsvData:
|
|
6922
|
-
serializedData:
|
|
6924
|
+
tsvData: Bd(e),
|
|
6925
|
+
serializedData: Vd(e),
|
|
6923
6926
|
dsl: a
|
|
6924
6927
|
};
|
|
6925
6928
|
}
|
|
6926
|
-
const
|
|
6929
|
+
const bu = [
|
|
6927
6930
|
// Bar Vertical
|
|
6928
|
-
ct("letter-frequency",
|
|
6929
|
-
ct("co2-emissions",
|
|
6930
|
-
ct("coffee-production",
|
|
6931
|
+
ct("letter-frequency", Ad),
|
|
6932
|
+
ct("co2-emissions", wd),
|
|
6933
|
+
ct("coffee-production", Od),
|
|
6931
6934
|
// Bar Horizontal
|
|
6932
|
-
ct("spoken-languages",
|
|
6935
|
+
ct("spoken-languages", Sd),
|
|
6933
6936
|
// Bar Multi
|
|
6934
|
-
ct("quarterly-revenue",
|
|
6935
|
-
ct("medal-count",
|
|
6937
|
+
ct("quarterly-revenue", kd),
|
|
6938
|
+
ct("medal-count", Ld),
|
|
6936
6939
|
// Line
|
|
6937
|
-
ct("temperature-anomaly",
|
|
6940
|
+
ct("temperature-anomaly", $d),
|
|
6938
6941
|
// Line Multi
|
|
6939
|
-
ct("unemployment-rates",
|
|
6942
|
+
ct("unemployment-rates", Cd),
|
|
6940
6943
|
// Donut
|
|
6941
|
-
ct("browser-market",
|
|
6944
|
+
ct("browser-market", Pd),
|
|
6942
6945
|
// Pie
|
|
6943
|
-
ct("world-population",
|
|
6946
|
+
ct("world-population", Md),
|
|
6944
6947
|
// Area
|
|
6945
|
-
ct("stock-price-area",
|
|
6948
|
+
ct("stock-price-area", Td),
|
|
6946
6949
|
// Area Stacked
|
|
6947
|
-
ct("energy-mix-stacked-area",
|
|
6950
|
+
ct("energy-mix-stacked-area", zd),
|
|
6948
6951
|
// Column Stacked
|
|
6949
|
-
ct("quarterly-stacked-columns",
|
|
6952
|
+
ct("quarterly-stacked-columns", Dd),
|
|
6950
6953
|
// Bar Stacked
|
|
6951
|
-
ct("population-stacked-bar",
|
|
6954
|
+
ct("population-stacked-bar", Ed),
|
|
6952
6955
|
// Bar Split
|
|
6953
|
-
ct("election-polls",
|
|
6956
|
+
ct("election-polls", Nd),
|
|
6954
6957
|
// Bar Grouped
|
|
6955
|
-
ct("renewable-capacity",
|
|
6958
|
+
ct("renewable-capacity", Id),
|
|
6956
6959
|
// Story (multi-scene)
|
|
6957
|
-
ct("farm-compass",
|
|
6960
|
+
ct("farm-compass", Fd)
|
|
6958
6961
|
], Vs = /* @__PURE__ */ new Set();
|
|
6959
|
-
function
|
|
6962
|
+
function _d(t, a, e) {
|
|
6960
6963
|
let r = a;
|
|
6961
6964
|
for (const n of t)
|
|
6962
6965
|
n.transformType === "sort" ? r = ea.Total : Vs.has(n.transformType) || (Vs.add(n.transformType), console.warn(`[blueprint-chart] Unknown transform "${n.transformType}" in ${e}; ignored.`));
|
|
6963
6966
|
return r;
|
|
6964
6967
|
}
|
|
6965
|
-
function
|
|
6968
|
+
function Gd(t) {
|
|
6966
6969
|
const a = (s) => {
|
|
6967
6970
|
const o = t.get(s);
|
|
6968
6971
|
return o == null ? void 0 : String(o) || void 0;
|
|
@@ -6978,19 +6981,19 @@ function _d(t) {
|
|
|
6978
6981
|
};
|
|
6979
6982
|
return Object.values(r).some((s) => s !== void 0) ? r : void 0;
|
|
6980
6983
|
}
|
|
6981
|
-
function
|
|
6982
|
-
const a = oa(t.properties), e = t.data ?
|
|
6984
|
+
function Yd(t) {
|
|
6985
|
+
const a = oa(t.properties), e = t.data ? lo(t.data) : "", r = no(e), n = a.get("sort"), s = n == null ? void 0 : String(n), o = s === ft.Ascending || s === ft.Descending ? s : void 0, i = a.get("theme"), c = a.get("sortMode");
|
|
6983
6986
|
let f;
|
|
6984
|
-
return (c === ea.Total || c === ea.WithinGroups || c === ea.None) && (f = c), f =
|
|
6987
|
+
return (c === ea.Total || c === ea.WithinGroups || c === ea.None) && (f = c), f = _d(t.transforms, f, "chart"), {
|
|
6985
6988
|
chartType: t.chartType,
|
|
6986
6989
|
data: r,
|
|
6987
6990
|
properties: t.properties,
|
|
6988
|
-
frame:
|
|
6989
|
-
colorizes:
|
|
6990
|
-
highlights:
|
|
6991
|
-
areaFills:
|
|
6992
|
-
annotations:
|
|
6993
|
-
seriesOverrides:
|
|
6991
|
+
frame: Gd(a),
|
|
6992
|
+
colorizes: co(t.colorizes),
|
|
6993
|
+
highlights: fo(t.highlights),
|
|
6994
|
+
areaFills: uo(t.areaFills),
|
|
6995
|
+
annotations: ho(t.annotations),
|
|
6996
|
+
seriesOverrides: go(t.series),
|
|
6994
6997
|
scenes: t.scenes,
|
|
6995
6998
|
sort: o,
|
|
6996
6999
|
sortMode: f,
|
|
@@ -6998,7 +7001,7 @@ function Gd(t) {
|
|
|
6998
7001
|
};
|
|
6999
7002
|
}
|
|
7000
7003
|
const _s = /* @__PURE__ */ new Set();
|
|
7001
|
-
function
|
|
7004
|
+
function Rd(t, a, e) {
|
|
7002
7005
|
let r = a;
|
|
7003
7006
|
for (const n of t)
|
|
7004
7007
|
n.transformType === "sort" ? r = ea.Total : _s.has(n.transformType) || (_s.add(n.transformType), console.warn(`[blueprint-chart] Unknown transform "${n.transformType}" in ${e}; ignored.`));
|
|
@@ -7017,7 +7020,7 @@ function Hd() {
|
|
|
7017
7020
|
transforms: []
|
|
7018
7021
|
};
|
|
7019
7022
|
}
|
|
7020
|
-
function
|
|
7023
|
+
function Wd(t, a, e) {
|
|
7021
7024
|
const r = Hd();
|
|
7022
7025
|
for (let n = 0; n <= a; n++) {
|
|
7023
7026
|
const s = t[n], o = oa(s.properties), i = o.get("type");
|
|
@@ -7048,7 +7051,7 @@ function Rd(t, a, e) {
|
|
|
7048
7051
|
}
|
|
7049
7052
|
return r;
|
|
7050
7053
|
}
|
|
7051
|
-
function
|
|
7054
|
+
function qd(t, a) {
|
|
7052
7055
|
const e = t.options ?? (t.properties ? Es(t.chartType, In(t.chartType, t.properties)) : {}), r = {
|
|
7053
7056
|
chartType: t.chartType,
|
|
7054
7057
|
data: t.data,
|
|
@@ -7065,7 +7068,7 @@ function Wd(t, a) {
|
|
|
7065
7068
|
};
|
|
7066
7069
|
if (a == null || !t.scenes || a < 0 || a >= t.scenes.length)
|
|
7067
7070
|
return r;
|
|
7068
|
-
const n =
|
|
7071
|
+
const n = Wd(t.scenes, a, t.chartType), s = n.chartType ?? t.chartType, o = n.data ? no(lo(n.data)) : r.data, i = Object.keys(n.chartTypeOptions).length > 0 ? Es(s, { ...e, ...n.chartTypeOptions }) : e, c = n.colorizes.length > 0 ? co(n.colorizes) : n.data ? [] : r.colorizes, f = a != null ? fo(n.highlights) : r.highlights, d = n.areaFills.length > 0 ? uo(n.areaFills) : r.areaFills, g = n.annotations.length > 0 ? ho(n.annotations) : [], b = [...r.annotations, ...g], m = n.hiddenAnnotationIds.size > 0 ? b.filter((w) => !w.id || !n.hiddenAnnotationIds.has(w.id)) : b, v = n.seriesOverrides.length > 0 ? go(n.seriesOverrides) : r.seriesOverrides, y = Rd(n.transforms, r.sortMode, `scene ${a}`), x = ["title", "description", "source", "sourceUrl", "byline", "note"], A = {};
|
|
7069
7072
|
for (const w of x) {
|
|
7070
7073
|
const T = n.properties.get(w);
|
|
7071
7074
|
typeof T == "string" && (A[w] = T);
|
|
@@ -7086,7 +7089,7 @@ function Wd(t, a) {
|
|
|
7086
7089
|
};
|
|
7087
7090
|
}
|
|
7088
7091
|
const fn = /* @__PURE__ */ new WeakMap();
|
|
7089
|
-
function
|
|
7092
|
+
function Xd(t) {
|
|
7090
7093
|
const a = fn.get(t);
|
|
7091
7094
|
if (!(!a || a.size === 0)) {
|
|
7092
7095
|
for (const e of a)
|
|
@@ -7098,8 +7101,8 @@ function Ba(t, a) {
|
|
|
7098
7101
|
let e = fn.get(t);
|
|
7099
7102
|
e || (e = /* @__PURE__ */ new Set(), fn.set(t, e)), e.add(a);
|
|
7100
7103
|
}
|
|
7101
|
-
function
|
|
7102
|
-
if (
|
|
7104
|
+
function Ud(t, a, e) {
|
|
7105
|
+
if (Xd(t), e.ignoreLayout || !a)
|
|
7103
7106
|
return { constrained: !1 };
|
|
7104
7107
|
const r = oa(a), n = r.get("heightMode"), s = r.get("aspectRatio"), o = r.get("fixedHeight");
|
|
7105
7108
|
let i = !1;
|
|
@@ -7110,27 +7113,27 @@ function Xd(t, a, e) {
|
|
|
7110
7113
|
return i && (t.style.display = "flex", t.style.flexDirection = "column", t.style.overflow = "hidden", Ba(t, "display"), Ba(t, "flexDirection"), Ba(t, "overflow")), { constrained: i };
|
|
7111
7114
|
}
|
|
7112
7115
|
const Bn = /* @__PURE__ */ new WeakMap();
|
|
7113
|
-
function
|
|
7116
|
+
function po(t) {
|
|
7114
7117
|
t.querySelectorAll("[data-bc-fade-overlay]").forEach((a) => {
|
|
7115
7118
|
typeof a.getAnimations == "function" && a.getAnimations().forEach((e) => e.cancel()), a.remove();
|
|
7116
7119
|
});
|
|
7117
7120
|
}
|
|
7118
|
-
function
|
|
7121
|
+
function jd(t, a, e) {
|
|
7119
7122
|
if (!e)
|
|
7120
7123
|
return null;
|
|
7121
7124
|
const r = Bn.get(t);
|
|
7122
|
-
return !r || r === a ? null : (
|
|
7125
|
+
return !r || r === a ? null : (po(t), _t(t));
|
|
7123
7126
|
}
|
|
7124
|
-
function
|
|
7127
|
+
function Zd(t, a, e) {
|
|
7125
7128
|
if (Bn.set(t, a), e) {
|
|
7126
7129
|
const r = t.querySelector(".bc-frame .bc-frame-body");
|
|
7127
7130
|
r && Vt(r), Gt(t, e);
|
|
7128
7131
|
}
|
|
7129
7132
|
}
|
|
7130
7133
|
function Gs(t) {
|
|
7131
|
-
Bn.delete(t),
|
|
7134
|
+
Bn.delete(t), po(t);
|
|
7132
7135
|
}
|
|
7133
|
-
function
|
|
7136
|
+
function Qd(t, a, e) {
|
|
7134
7137
|
const r = t.querySelector(".bc-frame");
|
|
7135
7138
|
if (!r)
|
|
7136
7139
|
return;
|
|
@@ -7142,7 +7145,7 @@ function Zd(t, a, e) {
|
|
|
7142
7145
|
r.classList.remove(s);
|
|
7143
7146
|
a.theme && r.classList.add(`bc-theme-${a.theme}`), e.constrained && r.classList.add("bc-frame--constrained");
|
|
7144
7147
|
}
|
|
7145
|
-
function
|
|
7148
|
+
function Jd(t, a, e = {}) {
|
|
7146
7149
|
var m;
|
|
7147
7150
|
if (e.transition || (t.replaceChildren(), Gs(t)), a.data.labels.length === 0) {
|
|
7148
7151
|
e.transition && (t.replaceChildren(), Gs(t));
|
|
@@ -7157,12 +7160,12 @@ function Qd(t, a, e = {}) {
|
|
|
7157
7160
|
}
|
|
7158
7161
|
r = v;
|
|
7159
7162
|
}
|
|
7160
|
-
const n =
|
|
7163
|
+
const n = Ud(t, r.properties, e), s = qd(r, e.sceneIndex), o = Mf(s.chartType);
|
|
7161
7164
|
if (!o)
|
|
7162
7165
|
return;
|
|
7163
|
-
const i =
|
|
7166
|
+
const i = jd(t, s.chartType, !!e.transition);
|
|
7164
7167
|
i && t.replaceChildren();
|
|
7165
|
-
const c = Bt(t), f =
|
|
7168
|
+
const c = Bt(t), f = td(s.options, c);
|
|
7166
7169
|
let d;
|
|
7167
7170
|
if (e.thumbnail)
|
|
7168
7171
|
d = null;
|
|
@@ -7183,15 +7186,15 @@ function Qd(t, a, e = {}) {
|
|
|
7183
7186
|
seriesOverrides: s.seriesOverrides.length > 0 ? s.seriesOverrides : void 0
|
|
7184
7187
|
}, !!e.transition), e.transition && g.commit({ mode: e.transitionMode });
|
|
7185
7188
|
const b = e.theme ?? s.theme;
|
|
7186
|
-
|
|
7189
|
+
Qd(t, { theme: b }, n), Zd(t, s.chartType, i);
|
|
7187
7190
|
}
|
|
7188
|
-
function
|
|
7191
|
+
function mu(t, a, e) {
|
|
7189
7192
|
if (!a) {
|
|
7190
7193
|
e != null && e.transition || t.replaceChildren();
|
|
7191
7194
|
return;
|
|
7192
7195
|
}
|
|
7193
|
-
const r =
|
|
7194
|
-
|
|
7196
|
+
const r = io(a), n = Yd(r);
|
|
7197
|
+
Jd(t, n, e);
|
|
7195
7198
|
}
|
|
7196
7199
|
export {
|
|
7197
7200
|
fa as Anchor,
|
|
@@ -7207,18 +7210,18 @@ export {
|
|
|
7207
7210
|
ta as CrosshairStyle,
|
|
7208
7211
|
sn as DEFAULT_BAR_GAP,
|
|
7209
7212
|
vt as DirectLabelMode,
|
|
7210
|
-
|
|
7211
|
-
|
|
7213
|
+
ml as DslNodeType,
|
|
7214
|
+
pl as FrameSizing,
|
|
7212
7215
|
tt as GridStyle,
|
|
7213
7216
|
Kt as Interpolation,
|
|
7214
7217
|
We as LabelPosition,
|
|
7215
7218
|
Ka as LabelRotation,
|
|
7216
7219
|
Va as LegendPosition,
|
|
7217
|
-
|
|
7220
|
+
bl as LineStyle,
|
|
7218
7221
|
ot as Orientation,
|
|
7219
7222
|
Xs as RangeAnchor,
|
|
7220
7223
|
Ya as ScaleType,
|
|
7221
|
-
|
|
7224
|
+
Sc as SceneTransition,
|
|
7222
7225
|
ft as SortDirection,
|
|
7223
7226
|
ea as SortMode,
|
|
7224
7227
|
ka as StackMode,
|
|
@@ -7226,61 +7229,61 @@ export {
|
|
|
7226
7229
|
Et as SymbolShape,
|
|
7227
7230
|
Nt as SymbolShowOn,
|
|
7228
7231
|
At as SymbolStyle,
|
|
7229
|
-
|
|
7232
|
+
gl as TickPosition,
|
|
7230
7233
|
Ie as ValueLabelPosition,
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7234
|
+
mc as adjustColorsForBackground,
|
|
7235
|
+
Yd as astToDefinition,
|
|
7236
|
+
td as buildChartOptions,
|
|
7237
|
+
uu as checkCvdColors,
|
|
7238
|
+
rd as classifyIntent,
|
|
7236
7239
|
Gt as commitFadeOut,
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7240
|
+
gu as compactSerialize,
|
|
7241
|
+
ho as convertAnnotations,
|
|
7242
|
+
uo as convertAreaFills,
|
|
7243
|
+
co as convertColorizes,
|
|
7244
|
+
fo as convertHighlights,
|
|
7245
|
+
go as convertSeriesOverrides,
|
|
7243
7246
|
Wt as createCanvas,
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
+
du as createCvdSvgFilter,
|
|
7248
|
+
Ht as createFrame,
|
|
7249
|
+
lo as dataEntriesToString,
|
|
7247
7250
|
In as extractChartTypeOptions,
|
|
7248
|
-
|
|
7251
|
+
pu as extractSceneOverrides,
|
|
7249
7252
|
Vt as fadeIn,
|
|
7250
7253
|
qa as featureJoin,
|
|
7251
7254
|
Xt as getCachedChart,
|
|
7252
|
-
|
|
7255
|
+
Mf as getChart,
|
|
7253
7256
|
kn as getChartOptions,
|
|
7254
|
-
|
|
7255
|
-
|
|
7257
|
+
od as getChartTypeDefaults,
|
|
7258
|
+
cd as getCvdFilterId,
|
|
7256
7259
|
Ta as getSceneTransition,
|
|
7257
7260
|
Ma as getTransitionDuration,
|
|
7258
7261
|
za as isSeriesHidden,
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7262
|
+
cu as listCharts,
|
|
7263
|
+
Kl as listPalettes,
|
|
7264
|
+
io as parse,
|
|
7265
|
+
no as parseData,
|
|
7263
7266
|
oa as propertyMap,
|
|
7264
|
-
|
|
7267
|
+
fu as recommendCharts,
|
|
7265
7268
|
St as registerChart,
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
+
mu as renderBpc,
|
|
7270
|
+
Jd as renderChart,
|
|
7271
|
+
iu as renderHorizontalAxis,
|
|
7269
7272
|
xa as renderLegend,
|
|
7270
|
-
|
|
7273
|
+
su as renderVerticalAxis,
|
|
7271
7274
|
Bt as resolveBackgroundColor,
|
|
7272
7275
|
Oa as resolveBarGapPadding,
|
|
7273
7276
|
Es as resolveChartTypeOptions,
|
|
7274
|
-
|
|
7275
|
-
|
|
7277
|
+
Jl as resolvePalette,
|
|
7278
|
+
qd as resolveScene,
|
|
7276
7279
|
Xe as resolveSeriesColor,
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7280
|
+
wi as resolveSeriesInterpolation,
|
|
7281
|
+
bu as samples,
|
|
7282
|
+
hu as serialize,
|
|
7283
|
+
sd as shapeOf,
|
|
7284
|
+
dd as simulateCvdColor,
|
|
7282
7285
|
_t as snapshotForFadeOut,
|
|
7283
7286
|
Ss as snapshotLiveAttrs,
|
|
7284
|
-
|
|
7285
|
-
|
|
7287
|
+
ou as wcagContrastRatio,
|
|
7288
|
+
lu as wcagLevel
|
|
7286
7289
|
};
|