@genome-spy/app 0.84.0 → 0.86.0
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/README.md +28 -0
- package/dist/{agentApi-DHXYZVvQ.js → agentApi-DgopQbMV.js} +5804 -7009
- package/dist/agentApi.es.js +2823 -2594
- package/dist/agentShared.es.js +15 -14
- package/dist/canvas2d-8uxuN_vx.js +619 -0
- package/dist/canvas2d-BtQC7Xr8.js +619 -0
- package/dist/canvasSizeHelper-7h_8rOcx.js +56 -0
- package/dist/clipOptions-BQfNhxgP.js +2239 -0
- package/dist/clipOptions-taFzEljc.js +2259 -0
- package/dist/{debug-aHQsa6hU.js → debug-Bzc3SoRg.js} +8 -8
- package/dist/{debug-D6FqxKEj.js → debug-D_VtWQ6l.js} +8 -8
- package/dist/{esm-CGLz7idZ.js → esm-BA6yMcc-.js} +438 -434
- package/dist/{esm-D8vvQAP3.js → esm-CcDLRSvC.js} +33 -33
- package/dist/{esm-BeV56E_5.js → esm-CfYZhLHN.js} +33 -33
- package/dist/{esm-DQ3lJSQN.js → esm-JAiZmFIS.js} +1 -1
- package/dist/index.es.js +3067 -2987
- package/dist/index.js +2030 -2022
- package/dist/indexer-qiFctgR3.js +72 -0
- package/dist/indexer-qy_dq5l5.js +72 -0
- package/dist/layoutResult-D50MSHXR.js +97 -0
- package/dist/nativeText-DFV5XIx8.js +860 -0
- package/dist/nativeText-vT3AWE14.js +860 -0
- package/dist/performanceProfiler-CPLEjApa.js +20 -0
- package/dist/rasterExport-B8pVoOsj.js +44 -0
- package/dist/rasterExport-C4r4xjQT.js +44 -0
- package/dist/rasterImage-B4rPLaW9.js +18 -0
- package/dist/rasterization-CFogVB3B.js +50 -0
- package/dist/rectangle-DKnrAmKs.js +142 -0
- package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
- package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
- package/dist/schema.json +1559 -219
- package/dist/style.css +1 -1
- package/dist/svg-C-Sw6E6G.js +1167 -0
- package/dist/svg-CKHwwKRt.js +1167 -0
- package/dist/{svgNumber-C6aRPc8Z.js → svgNumber-DNxESJQB.js} +1 -1
- package/dist/svgRasterizer-BgD72AmG.js +40 -0
- package/dist/svgRasterizer-BgSNqI3L.js +40 -0
- package/dist/vega-scale-CK0_al6O.js +2700 -0
- package/dist/vega-scale-D46-iCaL.js +2700 -0
- package/dist/viewError-BiR9VCgL.js +29 -0
- package/dist/{viewIdentityRegistry-Dl7rR4Ay.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
- package/dist/{viewIdentityRegistry-AEQpJTDm.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
- package/dist/viewSelectors-CKfxF_LM.js +1817 -0
- package/dist/viewSelectors-D_imtq5Z.js +1817 -0
- package/dist/viewUtils-nCJ7AoaI.js +5782 -0
- package/dist/warning-CpIIpk8e.js +7 -0
- package/dist/webgl-BaA3jSa2.js +4128 -0
- package/dist/webgl-FP-4EsBL.js +4128 -0
- package/package.json +7 -6
- package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
- package/dist/clipOptions-Dqco1p8b.js +0 -377
- package/dist/framebufferReadback-Bje9lHb7.js +0 -1993
- package/dist/framebufferReadback-CC0D6Haw.js +0 -147
- package/dist/raster-9uKYMjHZ.js +0 -53
- package/dist/raster-BofBWXbe.js +0 -54
- package/dist/svg-CvsT1Y2V.js +0 -1793
- package/dist/svg-DRgWfcsL.js +0 -1793
- package/dist/twgl-full.module-BNEMlXRV.js +0 -1849
- package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
- package/dist/viewSelectors-BhW4mTR1.js +0 -6386
- package/dist/viewSelectors-Bwzj10Qz.js +0 -6363
- package/dist/viewUtils-DMNiWslc.js +0 -7228
|
@@ -0,0 +1,2239 @@
|
|
|
1
|
+
//#region ../core/node_modules/vega-util/build/vega-util.js
|
|
2
|
+
function e(e, t, n) {
|
|
3
|
+
return e.fields = t || [], e.fname = n, e;
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
return e == null ? null : e.fname;
|
|
7
|
+
}
|
|
8
|
+
function n(e) {
|
|
9
|
+
return e == null ? null : e.fields;
|
|
10
|
+
}
|
|
11
|
+
function r(e) {
|
|
12
|
+
return e.length === 1 ? i(e[0]) : a(e);
|
|
13
|
+
}
|
|
14
|
+
var i = (e) => function(t) {
|
|
15
|
+
return t[e];
|
|
16
|
+
}, a = (e) => {
|
|
17
|
+
let t = e.length;
|
|
18
|
+
return function(n) {
|
|
19
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
20
|
+
return n;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
function o(e) {
|
|
24
|
+
throw Error(e);
|
|
25
|
+
}
|
|
26
|
+
function s(e) {
|
|
27
|
+
let t = [], n = e.length, r = null, i = 0, a = "", s, c, l;
|
|
28
|
+
e += "";
|
|
29
|
+
function u() {
|
|
30
|
+
t.push(a + e.substring(s, c)), a = "", s = c + 1;
|
|
31
|
+
}
|
|
32
|
+
for (s = c = 0; c < n; ++c) if (l = e[c], l === "\\") a += e.substring(s, c++), s = c;
|
|
33
|
+
else if (l === r) u(), r = null, i = -1;
|
|
34
|
+
else if (r) continue;
|
|
35
|
+
else s === i && l === "\"" || s === i && l === "'" ? (s = c + 1, r = l) : l === "." && !i ? c > s ? u() : s = c + 1 : l === "[" ? (c > s && u(), i = s = c + 1) : l === "]" && (i || o("Access path missing open bracket: " + e), i > 0 && u(), i = 0, s = c + 1);
|
|
36
|
+
return i && o("Access path missing closing bracket: " + e), r && o("Access path missing closing quote: " + e), c > s && (c++, u()), t;
|
|
37
|
+
}
|
|
38
|
+
function c(t, n, i) {
|
|
39
|
+
let a = s(t);
|
|
40
|
+
return t = a.length === 1 ? a[0] : t, e((i && i.get || r)(a), [t], n || t);
|
|
41
|
+
}
|
|
42
|
+
c("id");
|
|
43
|
+
var l = e((e) => e, [], "identity");
|
|
44
|
+
e(() => 0, [], "zero"), e(() => 1, [], "one"), e(() => !0, [], "true"), e(() => !1, [], "false"), [...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
45
|
+
var u = Array.isArray;
|
|
46
|
+
function d(e) {
|
|
47
|
+
return e === Object(e);
|
|
48
|
+
}
|
|
49
|
+
function f(e) {
|
|
50
|
+
return e[e.length - 1];
|
|
51
|
+
}
|
|
52
|
+
function p(e) {
|
|
53
|
+
return e == null || e === "" ? null : +e;
|
|
54
|
+
}
|
|
55
|
+
var m = (e) => (t) => e * Math.exp(t), h = (e) => (t) => Math.log(e * t), ee = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), g = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, _ = (e) => (t) => t < 0 ? -((-t) ** +e) : t ** +e;
|
|
56
|
+
function v(e, t, n, r) {
|
|
57
|
+
let i = n(e[0]), a = n(f(e)), o = (a - i) * t;
|
|
58
|
+
return [r(i - o), r(a - o)];
|
|
59
|
+
}
|
|
60
|
+
function te(e, t) {
|
|
61
|
+
return v(e, t, p, l);
|
|
62
|
+
}
|
|
63
|
+
function ne(e, t) {
|
|
64
|
+
var n = Math.sign(e[0]);
|
|
65
|
+
return v(e, t, h(n), m(n));
|
|
66
|
+
}
|
|
67
|
+
function re(e, t, n) {
|
|
68
|
+
return v(e, t, _(n), _(1 / n));
|
|
69
|
+
}
|
|
70
|
+
function y(e, t, n, r, i) {
|
|
71
|
+
let a = r(e[0]), o = r(f(e)), s = t == null ? (a + o) / 2 : r(t);
|
|
72
|
+
return [i(s + (a - s) * n), i(s + (o - s) * n)];
|
|
73
|
+
}
|
|
74
|
+
function b(e, t, n) {
|
|
75
|
+
return y(e, t, n, p, l);
|
|
76
|
+
}
|
|
77
|
+
function x(e, t, n) {
|
|
78
|
+
let r = Math.sign(e[0]);
|
|
79
|
+
return y(e, t, n, h(r), m(r));
|
|
80
|
+
}
|
|
81
|
+
function S(e, t, n, r) {
|
|
82
|
+
return y(e, t, n, _(r), _(1 / r));
|
|
83
|
+
}
|
|
84
|
+
function ie(e, t, n, r) {
|
|
85
|
+
return y(e, t, n, ee(r), g(r));
|
|
86
|
+
}
|
|
87
|
+
function ae(e) {
|
|
88
|
+
return e == null ? [] : u(e) ? e : [e];
|
|
89
|
+
}
|
|
90
|
+
function oe(e, t, n) {
|
|
91
|
+
let r = e[0], i = e[1], a;
|
|
92
|
+
return i < r && (a = i, i = r, r = a), a = i - r, a >= n - t ? [t, n] : [r = Math.min(Math.max(r, t), n - a), r + a];
|
|
93
|
+
}
|
|
94
|
+
function se(e) {
|
|
95
|
+
return typeof e == "function";
|
|
96
|
+
}
|
|
97
|
+
var ce = "descending";
|
|
98
|
+
function le(t, r, i) {
|
|
99
|
+
i ||= {}, r = ae(r) || [];
|
|
100
|
+
let a = [], o = [], s = {}, l = i.comparator || de;
|
|
101
|
+
return ae(t).forEach((e, t) => {
|
|
102
|
+
e != null && (a.push(r[t] === ce ? -1 : 1), o.push(e = se(e) ? e : c(e, null, i)), (n(e) || []).forEach((e) => s[e] = 1));
|
|
103
|
+
}), o.length === 0 ? null : e(l(o, a), Object.keys(s));
|
|
104
|
+
}
|
|
105
|
+
var ue = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, e = e instanceof Date ? +e : e) !== e && t === t ? -1 : +(t !== t && e === e), de = (e, t) => e.length === 1 ? fe(e[0], t[0]) : pe(e, t, e.length), fe = (e, t) => function(n, r) {
|
|
106
|
+
return ue(e(n), e(r)) * t;
|
|
107
|
+
}, pe = (e, t, n) => (t.push(0), function(r, i) {
|
|
108
|
+
let a, o = 0, s = -1;
|
|
109
|
+
for (; o === 0 && ++s < n;) a = e[s], o = ue(a(r), a(i));
|
|
110
|
+
return o * t[s];
|
|
111
|
+
});
|
|
112
|
+
function me(e) {
|
|
113
|
+
return typeof e == "boolean";
|
|
114
|
+
}
|
|
115
|
+
function he(e) {
|
|
116
|
+
return typeof e == "number";
|
|
117
|
+
}
|
|
118
|
+
function ge(e) {
|
|
119
|
+
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
120
|
+
}
|
|
121
|
+
function C(e) {
|
|
122
|
+
return typeof e == "string";
|
|
123
|
+
}
|
|
124
|
+
function _e(e, t) {
|
|
125
|
+
let n = e[0], r = f(e), i = +t;
|
|
126
|
+
return i ? i === 1 ? r : n + i * (r - n) : n;
|
|
127
|
+
}
|
|
128
|
+
function ve(e) {
|
|
129
|
+
return e && f(e) - e[0] || 0;
|
|
130
|
+
}
|
|
131
|
+
function ye(e) {
|
|
132
|
+
return u(e) ? `[${e.map((e) => e === null ? "null" : ye(e))}]` : d(e) || C(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
|
|
133
|
+
}
|
|
134
|
+
function be(e) {
|
|
135
|
+
let t = {}, n = e.length;
|
|
136
|
+
for (let r = 0; r < n; ++r) t[e[r]] = !0;
|
|
137
|
+
return t;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region ../../node_modules/d3-array/src/range.js
|
|
141
|
+
function xe(e, t, n) {
|
|
142
|
+
e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
|
|
143
|
+
for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
|
|
144
|
+
return a;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region ../../node_modules/d3-format/src/formatDecimal.js
|
|
148
|
+
function Se(e) {
|
|
149
|
+
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
|
|
150
|
+
}
|
|
151
|
+
function Ce(e, t) {
|
|
152
|
+
if (!isFinite(e) || e === 0) return null;
|
|
153
|
+
var n = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e"), r = e.slice(0, n);
|
|
154
|
+
return [r.length > 1 ? r[0] + r.slice(2) : r, +e.slice(n + 1)];
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../../node_modules/d3-format/src/exponent.js
|
|
158
|
+
function we(e) {
|
|
159
|
+
return e = Ce(Math.abs(e)), e ? e[1] : NaN;
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region ../../node_modules/d3-format/src/formatGroup.js
|
|
163
|
+
function Te(e, t) {
|
|
164
|
+
return function(n, r) {
|
|
165
|
+
for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
|
|
166
|
+
return a.reverse().join(t);
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region ../../node_modules/d3-format/src/formatNumerals.js
|
|
171
|
+
function Ee(e) {
|
|
172
|
+
return function(t) {
|
|
173
|
+
return t.replace(/[0-9]/g, function(t) {
|
|
174
|
+
return e[+t];
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region ../../node_modules/d3-format/src/formatSpecifier.js
|
|
180
|
+
var De = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
181
|
+
function Oe(e) {
|
|
182
|
+
if (!(t = De.exec(e))) throw Error("invalid format: " + e);
|
|
183
|
+
var t;
|
|
184
|
+
return new ke({
|
|
185
|
+
fill: t[1],
|
|
186
|
+
align: t[2],
|
|
187
|
+
sign: t[3],
|
|
188
|
+
symbol: t[4],
|
|
189
|
+
zero: t[5],
|
|
190
|
+
width: t[6],
|
|
191
|
+
comma: t[7],
|
|
192
|
+
precision: t[8] && t[8].slice(1),
|
|
193
|
+
trim: t[9],
|
|
194
|
+
type: t[10]
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
Oe.prototype = ke.prototype;
|
|
198
|
+
function ke(e) {
|
|
199
|
+
this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
|
|
200
|
+
}
|
|
201
|
+
ke.prototype.toString = function() {
|
|
202
|
+
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
203
|
+
};
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region ../../node_modules/d3-format/src/formatTrim.js
|
|
206
|
+
function Ae(e) {
|
|
207
|
+
out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
|
|
208
|
+
case ".":
|
|
209
|
+
r = i = n;
|
|
210
|
+
break;
|
|
211
|
+
case "0":
|
|
212
|
+
r === 0 && (r = n), i = n;
|
|
213
|
+
break;
|
|
214
|
+
default:
|
|
215
|
+
if (!+e[n]) break out;
|
|
216
|
+
r > 0 && (r = 0);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region ../../node_modules/d3-format/src/formatPrefixAuto.js
|
|
223
|
+
var je;
|
|
224
|
+
function Me(e, t) {
|
|
225
|
+
var n = Ce(e, t);
|
|
226
|
+
if (!n) return je = void 0, e.toPrecision(t);
|
|
227
|
+
var r = n[0], i = n[1], a = i - (je = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
|
|
228
|
+
return a === o ? r : a > o ? r + Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + Array(1 - a).join("0") + Ce(e, Math.max(0, t + a - 1))[0];
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region ../../node_modules/d3-format/src/formatRounded.js
|
|
232
|
+
function Ne(e, t) {
|
|
233
|
+
var n = Ce(e, t);
|
|
234
|
+
if (!n) return e + "";
|
|
235
|
+
var r = n[0], i = n[1];
|
|
236
|
+
return i < 0 ? "0." + Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + Array(i - r.length + 2).join("0");
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region ../../node_modules/d3-format/src/formatTypes.js
|
|
240
|
+
var Pe = {
|
|
241
|
+
"%": (e, t) => (e * 100).toFixed(t),
|
|
242
|
+
b: (e) => Math.round(e).toString(2),
|
|
243
|
+
c: (e) => e + "",
|
|
244
|
+
d: Se,
|
|
245
|
+
e: (e, t) => e.toExponential(t),
|
|
246
|
+
f: (e, t) => e.toFixed(t),
|
|
247
|
+
g: (e, t) => e.toPrecision(t),
|
|
248
|
+
o: (e) => Math.round(e).toString(8),
|
|
249
|
+
p: (e, t) => Ne(e * 100, t),
|
|
250
|
+
r: Ne,
|
|
251
|
+
s: Me,
|
|
252
|
+
X: (e) => Math.round(e).toString(16).toUpperCase(),
|
|
253
|
+
x: (e) => Math.round(e).toString(16)
|
|
254
|
+
};
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region ../../node_modules/d3-format/src/identity.js
|
|
257
|
+
function Fe(e) {
|
|
258
|
+
return e;
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region ../../node_modules/d3-format/src/locale.js
|
|
262
|
+
var Ie = Array.prototype.map, Le = [
|
|
263
|
+
"y",
|
|
264
|
+
"z",
|
|
265
|
+
"a",
|
|
266
|
+
"f",
|
|
267
|
+
"p",
|
|
268
|
+
"n",
|
|
269
|
+
"µ",
|
|
270
|
+
"m",
|
|
271
|
+
"",
|
|
272
|
+
"k",
|
|
273
|
+
"M",
|
|
274
|
+
"G",
|
|
275
|
+
"T",
|
|
276
|
+
"P",
|
|
277
|
+
"E",
|
|
278
|
+
"Z",
|
|
279
|
+
"Y"
|
|
280
|
+
];
|
|
281
|
+
function Re(e) {
|
|
282
|
+
var t = e.grouping === void 0 || e.thousands === void 0 ? Fe : Te(Ie.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? Fe : Ee(Ie.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
|
|
283
|
+
function l(e, l) {
|
|
284
|
+
e = Oe(e);
|
|
285
|
+
var u = e.fill, d = e.align, f = e.sign, p = e.symbol, m = e.zero, h = e.width, ee = e.comma, g = e.precision, _ = e.trim, v = e.type;
|
|
286
|
+
v === "n" ? (ee = !0, v = "g") : Pe[v] || (g === void 0 && (g = 12), _ = !0, v = "g"), (m || u === "0" && d === "=") && (m = !0, u = "0", d = "=");
|
|
287
|
+
var te = (l && l.prefix !== void 0 ? l.prefix : "") + (p === "$" ? n : p === "#" && /[boxX]/.test(v) ? "0" + v.toLowerCase() : ""), ne = (p === "$" ? r : /[%p]/.test(v) ? o : "") + (l && l.suffix !== void 0 ? l.suffix : ""), re = Pe[v], y = /[defgprs%]/.test(v);
|
|
288
|
+
g = g === void 0 ? 6 : /[gprs]/.test(v) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
|
|
289
|
+
function b(e) {
|
|
290
|
+
var n = te, r = ne, o, l, p;
|
|
291
|
+
if (v === "c") r = re(e) + r, e = "";
|
|
292
|
+
else {
|
|
293
|
+
e = +e;
|
|
294
|
+
var b = e < 0 || 1 / e < 0;
|
|
295
|
+
if (e = isNaN(e) ? c : re(Math.abs(e), g), _ && (e = Ae(e)), b && +e == 0 && f !== "+" && (b = !1), n = (b ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (v === "s" && !isNaN(e) && je !== void 0 ? Le[8 + je / 3] : "") + r + (b && f === "(" ? ")" : ""), y) {
|
|
296
|
+
for (o = -1, l = e.length; ++o < l;) if (p = e.charCodeAt(o), 48 > p || p > 57) {
|
|
297
|
+
r = (p === 46 ? i + e.slice(o + 1) : e.slice(o)) + r, e = e.slice(0, o);
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
ee && !m && (e = t(e, Infinity));
|
|
303
|
+
var x = n.length + e.length + r.length, S = x < h ? Array(h - x + 1).join(u) : "";
|
|
304
|
+
switch (ee && m && (e = t(S + e, S.length ? h - r.length : Infinity), S = ""), d) {
|
|
305
|
+
case "<":
|
|
306
|
+
e = n + e + r + S;
|
|
307
|
+
break;
|
|
308
|
+
case "=":
|
|
309
|
+
e = n + S + e + r;
|
|
310
|
+
break;
|
|
311
|
+
case "^":
|
|
312
|
+
e = S.slice(0, x = S.length >> 1) + n + e + r + S.slice(x);
|
|
313
|
+
break;
|
|
314
|
+
default:
|
|
315
|
+
e = S + n + e + r;
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
return a(e);
|
|
319
|
+
}
|
|
320
|
+
return b.toString = function() {
|
|
321
|
+
return e + "";
|
|
322
|
+
}, b;
|
|
323
|
+
}
|
|
324
|
+
function u(e, t) {
|
|
325
|
+
var n = Math.max(-8, Math.min(8, Math.floor(we(t) / 3))) * 3, r = 10 ** -n, i = l((e = Oe(e), e.type = "f", e), { suffix: Le[8 + n / 3] });
|
|
326
|
+
return function(e) {
|
|
327
|
+
return i(r * e);
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
return {
|
|
331
|
+
format: l,
|
|
332
|
+
formatPrefix: u
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
//#endregion
|
|
336
|
+
//#region ../../node_modules/d3-format/src/defaultLocale.js
|
|
337
|
+
var ze, Be, Ve;
|
|
338
|
+
He({
|
|
339
|
+
thousands: ",",
|
|
340
|
+
grouping: [3],
|
|
341
|
+
currency: ["$", ""]
|
|
342
|
+
});
|
|
343
|
+
function He(e) {
|
|
344
|
+
return ze = Re(e), Be = ze.format, Ve = ze.formatPrefix, ze;
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region ../core/src/data/flowNode.js
|
|
348
|
+
var Ue = class {
|
|
349
|
+
stats = {
|
|
350
|
+
count: 0,
|
|
351
|
+
first: null
|
|
352
|
+
};
|
|
353
|
+
#e = !1;
|
|
354
|
+
#t = !1;
|
|
355
|
+
#n = [];
|
|
356
|
+
paramRuntimeProvider = null;
|
|
357
|
+
get behavior() {
|
|
358
|
+
return 0;
|
|
359
|
+
}
|
|
360
|
+
get domainSensitiveScaleChannels() {
|
|
361
|
+
return [];
|
|
362
|
+
}
|
|
363
|
+
get label() {
|
|
364
|
+
return `(${this.constructor.name})`;
|
|
365
|
+
}
|
|
366
|
+
constructor(e) {
|
|
367
|
+
this.paramRuntimeProvider = e, this.children = [], this.parent = void 0, this.completed = !1;
|
|
368
|
+
}
|
|
369
|
+
get disposed() {
|
|
370
|
+
return this.#t;
|
|
371
|
+
}
|
|
372
|
+
getDebugState() {
|
|
373
|
+
let e = this;
|
|
374
|
+
return {
|
|
375
|
+
label: this.label,
|
|
376
|
+
children: this.children.slice(),
|
|
377
|
+
parent: this.parent,
|
|
378
|
+
stats: {
|
|
379
|
+
count: this.stats.count,
|
|
380
|
+
first: this.stats.first
|
|
381
|
+
},
|
|
382
|
+
completed: this.completed,
|
|
383
|
+
initialized: this.#e,
|
|
384
|
+
disposed: this.#t,
|
|
385
|
+
params: "params" in e ? structuredClone(e.params) : void 0,
|
|
386
|
+
view: We(e, this.paramRuntimeProvider),
|
|
387
|
+
domainSensitiveScaleChannels: this.domainSensitiveScaleChannels
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
reset() {
|
|
391
|
+
this.completed = !1;
|
|
392
|
+
for (let e of this.children) e.reset();
|
|
393
|
+
this.stats.count = 0, this.stats.first = null;
|
|
394
|
+
}
|
|
395
|
+
initialize() {}
|
|
396
|
+
initializeOnce() {
|
|
397
|
+
this.#e ||= (this.initialize(), !0);
|
|
398
|
+
}
|
|
399
|
+
#r() {
|
|
400
|
+
this._propagate = Function("children", "stats", xe(this.children.length).map((e) => `const child${e} = children[${e}];`).join("\n") + `return function propagate(datum) {
|
|
401
|
+
if (stats.count === 0) {
|
|
402
|
+
stats.first = structuredClone(datum);
|
|
403
|
+
}
|
|
404
|
+
stats.count++;
|
|
405
|
+
${xe(this.children.length).map((e) => `child${e}.handle(datum);`).join("\n")}
|
|
406
|
+
};`)(this.children, this.stats);
|
|
407
|
+
}
|
|
408
|
+
setParent(e) {
|
|
409
|
+
this.parent = e;
|
|
410
|
+
}
|
|
411
|
+
addChild(e) {
|
|
412
|
+
if (e.parent) throw Error("Cannot add the child! It already has a parent.");
|
|
413
|
+
return this.children.push(e), e.setParent(this), this.#r(), this;
|
|
414
|
+
}
|
|
415
|
+
adopt(e) {
|
|
416
|
+
e.parent && e.parent.removeChild(e), this.addChild(e);
|
|
417
|
+
}
|
|
418
|
+
adoptChildrenOf(e) {
|
|
419
|
+
for (let t of e.children.slice()) this.adopt(t);
|
|
420
|
+
}
|
|
421
|
+
insertAsParent(e) {
|
|
422
|
+
if (this.isRoot()) throw Error("Cannot insert a new parent for a root node!");
|
|
423
|
+
e.parent = this.parent, this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#r(), this.parent = void 0, e.addChild(this);
|
|
424
|
+
}
|
|
425
|
+
removeChild(e) {
|
|
426
|
+
let t = this.children.indexOf(e);
|
|
427
|
+
if (t > -1) this.children.splice(t, 1), e.parent = void 0, this.#r();
|
|
428
|
+
else throw Error("Trying to remove an unknown child node!");
|
|
429
|
+
}
|
|
430
|
+
excise() {
|
|
431
|
+
if (this.isRoot()) throw Error("Cannot excise root node!");
|
|
432
|
+
if (this.isTerminal()) this.parent.removeChild(this);
|
|
433
|
+
else if (this.children.length == 1) {
|
|
434
|
+
let e = this.children[0];
|
|
435
|
+
e.setParent(this.parent), this.parent.children[this.parent.children.indexOf(this)] = e, this.parent.#r(), this.setParent(void 0), this.children.length = 0;
|
|
436
|
+
} else throw Error("Cannot excise a node that has multiple children!");
|
|
437
|
+
}
|
|
438
|
+
isRoot() {
|
|
439
|
+
return !this.parent;
|
|
440
|
+
}
|
|
441
|
+
isBranching() {
|
|
442
|
+
return this.children.length > 1;
|
|
443
|
+
}
|
|
444
|
+
isTerminal() {
|
|
445
|
+
return this.children.length == 0;
|
|
446
|
+
}
|
|
447
|
+
visit(e) {
|
|
448
|
+
e(this);
|
|
449
|
+
for (let t of this.children) t.visit(e);
|
|
450
|
+
e.afterChildren && e.afterChildren(this);
|
|
451
|
+
}
|
|
452
|
+
subtreeToString(e = 0) {
|
|
453
|
+
let t = this.children.map((t) => t.subtreeToString(e + 1)).join("");
|
|
454
|
+
return `${" ".repeat(e * 2)}* ${this.label}${"identifier" in this && this.identifier ? ": " + this.identifier : ""} \n${t}`;
|
|
455
|
+
}
|
|
456
|
+
handle(e) {
|
|
457
|
+
this._propagate(e);
|
|
458
|
+
}
|
|
459
|
+
complete() {
|
|
460
|
+
this.completed = !0;
|
|
461
|
+
for (let e of this.children) e.complete();
|
|
462
|
+
}
|
|
463
|
+
registerDisposer(e) {
|
|
464
|
+
this.#t ? e() : this.#n.push(e);
|
|
465
|
+
}
|
|
466
|
+
dispose() {
|
|
467
|
+
if (!this.#t) {
|
|
468
|
+
this.#t = !0;
|
|
469
|
+
for (let e of this.#n) e();
|
|
470
|
+
this.#n.length = 0;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
disposeSubtree() {
|
|
474
|
+
let e = () => void 0;
|
|
475
|
+
e.afterChildren = (e) => {
|
|
476
|
+
e.dispose();
|
|
477
|
+
}, this.visit(e);
|
|
478
|
+
}
|
|
479
|
+
beginBatch(e) {
|
|
480
|
+
for (let t of this.children) t.beginBatch(e);
|
|
481
|
+
}
|
|
482
|
+
get paramRuntime() {
|
|
483
|
+
if (this.paramRuntimeProvider && this.paramRuntimeProvider.paramRuntime) return this.paramRuntimeProvider.paramRuntime;
|
|
484
|
+
if (!this.parent) throw Error("Cannot find paramRuntime!");
|
|
485
|
+
return this.parent.paramRuntime;
|
|
486
|
+
}
|
|
487
|
+
repropagate() {
|
|
488
|
+
if (this.parent) this.parent.repropagate();
|
|
489
|
+
else throw Error("Cannot repropagate data, no FlowNode with stored data found!");
|
|
490
|
+
}
|
|
491
|
+
_propagate(e) {}
|
|
492
|
+
};
|
|
493
|
+
function We(e, t) {
|
|
494
|
+
if ("view" in e) return e.view;
|
|
495
|
+
if (t && "getPathString" in t) return t;
|
|
496
|
+
}
|
|
497
|
+
function Ge(e) {
|
|
498
|
+
let t = /* @__PURE__ */ new Set();
|
|
499
|
+
for (; e;) {
|
|
500
|
+
for (let n of e.domainSensitiveScaleChannels) t.add(n);
|
|
501
|
+
e = e.parent;
|
|
502
|
+
}
|
|
503
|
+
return t;
|
|
504
|
+
}
|
|
505
|
+
function Ke(e) {
|
|
506
|
+
return e.type == "file";
|
|
507
|
+
}
|
|
508
|
+
function qe(e) {
|
|
509
|
+
return e.type == "facet";
|
|
510
|
+
}
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region ../core/src/ruler/rulerValue.js
|
|
513
|
+
function Je(e = ["x"], t = {}) {
|
|
514
|
+
let n = {};
|
|
515
|
+
for (let r of e) n[r] = t[r] ?? null;
|
|
516
|
+
return {
|
|
517
|
+
type: "ruler",
|
|
518
|
+
values: n
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
//#endregion
|
|
522
|
+
//#region ../core/src/paramRuntime/paramUtils.js
|
|
523
|
+
function w(e) {
|
|
524
|
+
return typeof e == "object" && !!e && "expr" in e && C(e.expr);
|
|
525
|
+
}
|
|
526
|
+
function Ye(e) {
|
|
527
|
+
if (w(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
|
|
528
|
+
return e;
|
|
529
|
+
}
|
|
530
|
+
function Xe(e) {
|
|
531
|
+
return ("expr" in e || "bind" in e) && !("select" in e) && !("ruler" in e);
|
|
532
|
+
}
|
|
533
|
+
function Ze(e) {
|
|
534
|
+
return !("expr" in e || "bind" in e) && "select" in e;
|
|
535
|
+
}
|
|
536
|
+
function Qe(e) {
|
|
537
|
+
return !("expr" in e || "bind" in e || "select" in e) && "ruler" in e;
|
|
538
|
+
}
|
|
539
|
+
function $e(e) {
|
|
540
|
+
if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)) throw Error("Invalid parameter name: " + e + ". Must be a valid JavaScript identifier.");
|
|
541
|
+
return e;
|
|
542
|
+
}
|
|
543
|
+
function et(e, t, n) {
|
|
544
|
+
if ("select" in e) {
|
|
545
|
+
let t = Vr(e.select);
|
|
546
|
+
if (Hr(t)) return t.toggle ? Pr() : Nr(null);
|
|
547
|
+
if (Ur(t)) {
|
|
548
|
+
if (!t.encodings) throw Error("Interval selection \"" + e.name + "\" must have encodings defined!");
|
|
549
|
+
return Fr(t.encodings);
|
|
550
|
+
}
|
|
551
|
+
throw Error("Unknown selection config for parameter \"" + e.name + "\".");
|
|
552
|
+
}
|
|
553
|
+
if ("ruler" in e) return Je(e.ruler.encodings, e.value);
|
|
554
|
+
if ("expr" in e) {
|
|
555
|
+
let r = n ?? t?.createExpression(e.expr);
|
|
556
|
+
if (!r) throw Error("Cannot evaluate expression for parameter \"" + e.name + "\".");
|
|
557
|
+
return r(null);
|
|
558
|
+
}
|
|
559
|
+
return "value" in e ? e.value : null;
|
|
560
|
+
}
|
|
561
|
+
function tt(e, t, n, r, i = {}) {
|
|
562
|
+
let a = { ...t }, o = /* @__PURE__ */ new Set(), s = !1, c = !1, l = i.batchMode ?? "microtask";
|
|
563
|
+
r?.(() => {
|
|
564
|
+
c = !0, o.clear(), s = !1;
|
|
565
|
+
});
|
|
566
|
+
let u = () => {
|
|
567
|
+
if (c) return;
|
|
568
|
+
if (!n || o.size === 0) {
|
|
569
|
+
s = !1;
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
let e = new Set(o);
|
|
573
|
+
o.clear(), s = !1, n(e);
|
|
574
|
+
}, d = (t) => {
|
|
575
|
+
c || (o.add(t), s || (s = !0, queueMicrotask(() => {
|
|
576
|
+
c || (l == "whenPropagated" && e.whenPropagated ? e.whenPropagated().then(u).catch(() => {
|
|
577
|
+
u();
|
|
578
|
+
}) : u());
|
|
579
|
+
})));
|
|
580
|
+
};
|
|
581
|
+
for (let [i, o] of Object.entries(t)) if (w(o)) if (n) {
|
|
582
|
+
let t = () => d(i), n = e.watchExpression ? e.watchExpression(o.expr, t, {
|
|
583
|
+
scopeOwned: !r,
|
|
584
|
+
registerDisposer: r
|
|
585
|
+
}) : e.createExpression(o.expr);
|
|
586
|
+
if (!e.watchExpression) {
|
|
587
|
+
let e = n.subscribe(t);
|
|
588
|
+
r?.(e);
|
|
589
|
+
}
|
|
590
|
+
Object.defineProperty(a, i, {
|
|
591
|
+
enumerable: !0,
|
|
592
|
+
get() {
|
|
593
|
+
return n();
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
} else {
|
|
597
|
+
let t = e.createExpression(o.expr);
|
|
598
|
+
Object.defineProperty(a, i, {
|
|
599
|
+
enumerable: !0,
|
|
600
|
+
get() {
|
|
601
|
+
return t();
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
else a[i] = o;
|
|
606
|
+
return a;
|
|
607
|
+
}
|
|
608
|
+
function nt(e, t, n, r) {
|
|
609
|
+
if (!w(t)) return t;
|
|
610
|
+
let i = () => {
|
|
611
|
+
throw Error(n);
|
|
612
|
+
}, a = e.watchExpression ? e.watchExpression(t.expr, i, {
|
|
613
|
+
scopeOwned: !1,
|
|
614
|
+
registerDisposer: r
|
|
615
|
+
}) : e.createExpression(t.expr);
|
|
616
|
+
if (!e.watchExpression) {
|
|
617
|
+
let e = a.subscribe(i);
|
|
618
|
+
r?.(e);
|
|
619
|
+
}
|
|
620
|
+
return a();
|
|
621
|
+
}
|
|
622
|
+
function rt(e) {
|
|
623
|
+
return Object.assign(() => e, {
|
|
624
|
+
subscribe: () => () => void 0,
|
|
625
|
+
invalidate: () => void 0,
|
|
626
|
+
identifier: () => "constant",
|
|
627
|
+
fields: [],
|
|
628
|
+
globals: [],
|
|
629
|
+
code: JSON.stringify(e)
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region ../core/src/data/transforms/transform.js
|
|
634
|
+
var it = class extends Ue {
|
|
635
|
+
#e;
|
|
636
|
+
constructor(e, t) {
|
|
637
|
+
super(t), this.#e = e.type;
|
|
638
|
+
}
|
|
639
|
+
get label() {
|
|
640
|
+
return this.#e;
|
|
641
|
+
}
|
|
642
|
+
watchExprRef(e, t) {
|
|
643
|
+
if (w(e)) {
|
|
644
|
+
let n = e;
|
|
645
|
+
return this.paramRuntime.watchExpression(n.expr, t, {
|
|
646
|
+
scopeOwned: !1,
|
|
647
|
+
registerDisposer: (e) => this.registerDisposer(e)
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
return (() => e);
|
|
651
|
+
}
|
|
652
|
+
}, T = "__uniqueId", at = 1e4, ot = [null], st = class extends it {
|
|
653
|
+
get behavior() {
|
|
654
|
+
return 2;
|
|
655
|
+
}
|
|
656
|
+
constructor(e) {
|
|
657
|
+
super(e), this.params = e, this._blocks = [], this._usedBlocks = 0, this._id = -1;
|
|
658
|
+
}
|
|
659
|
+
initialize() {}
|
|
660
|
+
reset() {
|
|
661
|
+
super.reset(), this._usedBlocks = 0, this._id = -1;
|
|
662
|
+
}
|
|
663
|
+
handle(e) {
|
|
664
|
+
e[T] = this.#e(), this._propagate(e);
|
|
665
|
+
}
|
|
666
|
+
#e() {
|
|
667
|
+
return ++this._id % 1e4 == 0 && (this._id = this.#t() * at), this._id;
|
|
668
|
+
}
|
|
669
|
+
#t() {
|
|
670
|
+
return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
|
|
671
|
+
}
|
|
672
|
+
#n() {
|
|
673
|
+
let e = ot.length;
|
|
674
|
+
return ot[e] = this, this._blocks.push(e), this._usedBlocks++, e;
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region ../core/src/utils/field.js
|
|
679
|
+
function ct(t, n = t) {
|
|
680
|
+
return /^[A-Za-z0-9_]+$/.test(t) ? e(Function("validator", `
|
|
681
|
+
let validated = !validator;
|
|
682
|
+
return function accessField(datum) {
|
|
683
|
+
if (!validated) {
|
|
684
|
+
validator(datum);
|
|
685
|
+
validated = true;
|
|
686
|
+
}
|
|
687
|
+
return datum[${JSON.stringify(t)}];
|
|
688
|
+
}`)(function(e) {
|
|
689
|
+
t in e || lt(e, t);
|
|
690
|
+
}), [t], n) : c(t);
|
|
691
|
+
}
|
|
692
|
+
function lt(e, t) {
|
|
693
|
+
throw Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`);
|
|
694
|
+
}
|
|
695
|
+
//#endregion
|
|
696
|
+
//#region ../../node_modules/vega-util/build/accessor.js
|
|
697
|
+
function E(e, t, n) {
|
|
698
|
+
return Object.assign(e, {
|
|
699
|
+
fields: t || [],
|
|
700
|
+
fname: n
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
//#endregion
|
|
704
|
+
//#region ../../node_modules/vega-util/build/getter.js
|
|
705
|
+
function ut(e) {
|
|
706
|
+
return e.length === 1 ? dt(e[0]) : ft(e);
|
|
707
|
+
}
|
|
708
|
+
var dt = (e) => function(t) {
|
|
709
|
+
return t[e];
|
|
710
|
+
}, ft = (e) => {
|
|
711
|
+
let t = e.length;
|
|
712
|
+
return function(n) {
|
|
713
|
+
for (let r = 0; r < t; ++r) n = n[e[r]];
|
|
714
|
+
return n;
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
//#endregion
|
|
718
|
+
//#region ../../node_modules/vega-util/build/error.js
|
|
719
|
+
function D(e) {
|
|
720
|
+
throw Error(e);
|
|
721
|
+
}
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region ../../node_modules/vega-util/build/splitAccessPath.js
|
|
724
|
+
function pt(e) {
|
|
725
|
+
let t = [], n = e.length, r = null, i = 0, a = "", o, s, c;
|
|
726
|
+
e += "";
|
|
727
|
+
function l() {
|
|
728
|
+
t.push(a + e.substring(o, s)), a = "", o = s + 1;
|
|
729
|
+
}
|
|
730
|
+
for (o = s = 0; s < n; ++s) if (c = e[s], c === "\\") a += e.substring(o, s++), o = s;
|
|
731
|
+
else if (c === r) l(), r = null, i = -1;
|
|
732
|
+
else if (r) continue;
|
|
733
|
+
else o === i && c === "\"" || o === i && c === "'" ? (o = s + 1, r = c) : c === "." && !i ? s > o ? l() : o = s + 1 : c === "[" ? (s > o && l(), i = o = s + 1) : c === "]" && (i || D("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
734
|
+
return i && D("Access path missing closing bracket: " + e), r && D("Access path missing closing quote: " + e), s > o && (s++, l()), t;
|
|
735
|
+
}
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region ../../node_modules/vega-util/build/field.js
|
|
738
|
+
function mt(e, t, n) {
|
|
739
|
+
let r = pt(e), i = r.length === 1 ? r[0] : e;
|
|
740
|
+
return E((n && n.get || ut)(r), [i], t || i);
|
|
741
|
+
}
|
|
742
|
+
mt("id");
|
|
743
|
+
var ht = E((e) => e, [], "identity");
|
|
744
|
+
E(() => 0, [], "zero"), E(() => 1, [], "one"), E(() => !0, [], "true"), E(() => !1, [], "false");
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region ../../node_modules/vega-util/build/interpreter.js
|
|
747
|
+
var gt = /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function"), "__proto__"]), _t = Array.isArray;
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region ../../node_modules/vega-util/build/isObject.js
|
|
750
|
+
function vt(e) {
|
|
751
|
+
return e === Object(e);
|
|
752
|
+
}
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region ../../node_modules/vega-util/build/array.js
|
|
755
|
+
function yt(e) {
|
|
756
|
+
return e == null ? [] : _t(e) ? e : [e];
|
|
757
|
+
}
|
|
758
|
+
//#endregion
|
|
759
|
+
//#region ../../node_modules/vega-util/build/isFunction.js
|
|
760
|
+
function bt(e) {
|
|
761
|
+
return typeof e == "function";
|
|
762
|
+
}
|
|
763
|
+
//#endregion
|
|
764
|
+
//#region ../../node_modules/vega-util/build/hasOwnProperty.js
|
|
765
|
+
function O(e, t) {
|
|
766
|
+
return Object.hasOwn(e, t);
|
|
767
|
+
}
|
|
768
|
+
//#endregion
|
|
769
|
+
//#region ../../node_modules/vega-util/build/isString.js
|
|
770
|
+
function xt(e) {
|
|
771
|
+
return typeof e == "string";
|
|
772
|
+
}
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region ../../node_modules/vega-util/build/stringValue.js
|
|
775
|
+
function St(e) {
|
|
776
|
+
return _t(e) ? `[${e.map((e) => e === null ? "null" : St(e))}]` : vt(e) || xt(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
|
|
777
|
+
}
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region ../../node_modules/vega-util/build/toSet.js
|
|
780
|
+
function Ct(e) {
|
|
781
|
+
let t = {}, n = e.length;
|
|
782
|
+
for (let r = 0; r < n; ++r) t[e[r] + ""] = !0;
|
|
783
|
+
return t;
|
|
784
|
+
}
|
|
785
|
+
//#endregion
|
|
786
|
+
//#region ../../node_modules/vega-expression/build/vega-expression.js
|
|
787
|
+
var wt = "RawCode", Tt = "Literal", Et = "Property", Dt = "Identifier", Ot = "ArrayExpression", kt = "BinaryExpression", At = "CallExpression", jt = "ConditionalExpression", Mt = "LogicalExpression", Nt = "MemberExpression", Pt = "ObjectExpression", Ft = "UnaryExpression";
|
|
788
|
+
function k(e) {
|
|
789
|
+
this.type = e;
|
|
790
|
+
}
|
|
791
|
+
k.prototype.visit = function(e) {
|
|
792
|
+
let t, n, r;
|
|
793
|
+
if (e(this)) return 1;
|
|
794
|
+
for (t = It(this), n = 0, r = t.length; n < r; ++n) if (t[n].visit(e)) return 1;
|
|
795
|
+
};
|
|
796
|
+
function It(e) {
|
|
797
|
+
switch (e.type) {
|
|
798
|
+
case Ot: return e.elements;
|
|
799
|
+
case kt:
|
|
800
|
+
case Mt: return [e.left, e.right];
|
|
801
|
+
case At: return [e.callee].concat(e.arguments);
|
|
802
|
+
case jt: return [
|
|
803
|
+
e.test,
|
|
804
|
+
e.consequent,
|
|
805
|
+
e.alternate
|
|
806
|
+
];
|
|
807
|
+
case Nt: return [e.object, e.property];
|
|
808
|
+
case Pt: return e.properties;
|
|
809
|
+
case Et: return [e.key, e.value];
|
|
810
|
+
case Ft: return [e.argument];
|
|
811
|
+
case Dt:
|
|
812
|
+
case Tt:
|
|
813
|
+
case wt:
|
|
814
|
+
default: return [];
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
var A, j, M, N, P, Lt = 1, Rt = 2, F = 3, I = 4, zt = 5, L = 6, R = 7, z = 8, Bt = 9;
|
|
818
|
+
A = {}, A[Lt] = "Boolean", A[Rt] = "<end>", A[F] = "Identifier", A[I] = "Keyword", A[zt] = "Null", A[L] = "Numeric", A[R] = "Punctuator", A[z] = "String", A[Bt] = "RegularExpression";
|
|
819
|
+
var Vt = "ArrayExpression", Ht = "BinaryExpression", Ut = "CallExpression", Wt = "ConditionalExpression", Gt = "Identifier", Kt = "Literal", qt = "LogicalExpression", Jt = "MemberExpression", Yt = "ObjectExpression", Xt = "Property", Zt = "UnaryExpression", B = "Unexpected token %0", Qt = "Unexpected number", $t = "Unexpected string", en = "Unexpected identifier", tn = "Unexpected reserved word", nn = "Unexpected end of input", rn = "Invalid regular expression", an = "Invalid regular expression: missing /", on = "Octal literals are not allowed in strict mode.", sn = "Duplicate data property in object literal not allowed in strict mode", V = "ILLEGAL", cn = "Disabled.", ln = /* @__PURE__ */ RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), un = /* @__PURE__ */ RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
|
|
820
|
+
function dn(e, t) {
|
|
821
|
+
/* istanbul ignore next */
|
|
822
|
+
if (!e) throw Error("ASSERT: " + t);
|
|
823
|
+
}
|
|
824
|
+
function H(e) {
|
|
825
|
+
return e >= 48 && e <= 57;
|
|
826
|
+
}
|
|
827
|
+
function fn(e) {
|
|
828
|
+
return "0123456789abcdefABCDEF".includes(e);
|
|
829
|
+
}
|
|
830
|
+
function U(e) {
|
|
831
|
+
return "01234567".includes(e);
|
|
832
|
+
}
|
|
833
|
+
function pn(e) {
|
|
834
|
+
return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [
|
|
835
|
+
5760,
|
|
836
|
+
6158,
|
|
837
|
+
8192,
|
|
838
|
+
8193,
|
|
839
|
+
8194,
|
|
840
|
+
8195,
|
|
841
|
+
8196,
|
|
842
|
+
8197,
|
|
843
|
+
8198,
|
|
844
|
+
8199,
|
|
845
|
+
8200,
|
|
846
|
+
8201,
|
|
847
|
+
8202,
|
|
848
|
+
8239,
|
|
849
|
+
8287,
|
|
850
|
+
12288,
|
|
851
|
+
65279
|
|
852
|
+
].includes(e);
|
|
853
|
+
}
|
|
854
|
+
function W(e) {
|
|
855
|
+
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
856
|
+
}
|
|
857
|
+
function G(e) {
|
|
858
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && ln.test(String.fromCharCode(e));
|
|
859
|
+
}
|
|
860
|
+
function mn(e) {
|
|
861
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && un.test(String.fromCharCode(e));
|
|
862
|
+
}
|
|
863
|
+
var hn = {
|
|
864
|
+
if: 1,
|
|
865
|
+
in: 1,
|
|
866
|
+
do: 1,
|
|
867
|
+
var: 1,
|
|
868
|
+
for: 1,
|
|
869
|
+
new: 1,
|
|
870
|
+
try: 1,
|
|
871
|
+
let: 1,
|
|
872
|
+
this: 1,
|
|
873
|
+
else: 1,
|
|
874
|
+
case: 1,
|
|
875
|
+
void: 1,
|
|
876
|
+
with: 1,
|
|
877
|
+
enum: 1,
|
|
878
|
+
while: 1,
|
|
879
|
+
break: 1,
|
|
880
|
+
catch: 1,
|
|
881
|
+
throw: 1,
|
|
882
|
+
const: 1,
|
|
883
|
+
yield: 1,
|
|
884
|
+
class: 1,
|
|
885
|
+
super: 1,
|
|
886
|
+
return: 1,
|
|
887
|
+
typeof: 1,
|
|
888
|
+
delete: 1,
|
|
889
|
+
switch: 1,
|
|
890
|
+
export: 1,
|
|
891
|
+
import: 1,
|
|
892
|
+
public: 1,
|
|
893
|
+
static: 1,
|
|
894
|
+
default: 1,
|
|
895
|
+
finally: 1,
|
|
896
|
+
extends: 1,
|
|
897
|
+
package: 1,
|
|
898
|
+
private: 1,
|
|
899
|
+
function: 1,
|
|
900
|
+
continue: 1,
|
|
901
|
+
debugger: 1,
|
|
902
|
+
interface: 1,
|
|
903
|
+
protected: 1,
|
|
904
|
+
instanceof: 1,
|
|
905
|
+
implements: 1
|
|
906
|
+
};
|
|
907
|
+
function gn() {
|
|
908
|
+
for (; M < N;) {
|
|
909
|
+
let e = j.charCodeAt(M);
|
|
910
|
+
if (pn(e) || W(e)) ++M;
|
|
911
|
+
else break;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
function _n(e) {
|
|
915
|
+
var t, n, r, i = 0;
|
|
916
|
+
for (n = e === "u" ? 4 : 2, t = 0; t < n; ++t) M < N && fn(j[M]) ? (r = j[M++], i = i * 16 + "0123456789abcdef".indexOf(r.toLowerCase())) : J({}, B, V);
|
|
917
|
+
return String.fromCharCode(i);
|
|
918
|
+
}
|
|
919
|
+
function vn() {
|
|
920
|
+
var e = j[M], t = 0, n, r;
|
|
921
|
+
for (e === "}" && J({}, B, V); M < N && (e = j[M++], fn(e));) t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
|
|
922
|
+
return (t > 1114111 || e !== "}") && J({}, B, V), t <= 65535 ? String.fromCharCode(t) : (n = (t - 65536 >> 10) + 55296, r = (t - 65536 & 1023) + 56320, String.fromCharCode(n, r));
|
|
923
|
+
}
|
|
924
|
+
function yn() {
|
|
925
|
+
var e = j.charCodeAt(M++), t = String.fromCharCode(e);
|
|
926
|
+
for (e === 92 && (j.charCodeAt(M) !== 117 && J({}, B, V), ++M, e = _n("u"), (!e || e === "\\" || !G(e.charCodeAt(0))) && J({}, B, V), t = e); M < N && (e = j.charCodeAt(M), mn(e));) ++M, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), j.charCodeAt(M) !== 117 && J({}, B, V), ++M, e = _n("u"), (!e || e === "\\" || !mn(e.charCodeAt(0))) && J({}, B, V), t += e);
|
|
927
|
+
return t;
|
|
928
|
+
}
|
|
929
|
+
function bn() {
|
|
930
|
+
for (var e = M++, t; M < N;) {
|
|
931
|
+
if (t = j.charCodeAt(M), t === 92) return M = e, yn();
|
|
932
|
+
if (mn(t)) ++M;
|
|
933
|
+
else break;
|
|
934
|
+
}
|
|
935
|
+
return j.slice(e, M);
|
|
936
|
+
}
|
|
937
|
+
function xn() {
|
|
938
|
+
var e = M, t = j.charCodeAt(M) === 92 ? yn() : bn();
|
|
939
|
+
return {
|
|
940
|
+
type: t.length === 1 ? F : hn.hasOwnProperty(t) ? I : t === "null" ? zt : t === "true" || t === "false" ? Lt : F,
|
|
941
|
+
value: t,
|
|
942
|
+
start: e,
|
|
943
|
+
end: M
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
function Sn() {
|
|
947
|
+
var e = M, t = j.charCodeAt(M), n, r = j[M], i, a, o;
|
|
948
|
+
switch (t) {
|
|
949
|
+
case 46:
|
|
950
|
+
case 40:
|
|
951
|
+
case 41:
|
|
952
|
+
case 59:
|
|
953
|
+
case 44:
|
|
954
|
+
case 123:
|
|
955
|
+
case 125:
|
|
956
|
+
case 91:
|
|
957
|
+
case 93:
|
|
958
|
+
case 58:
|
|
959
|
+
case 63:
|
|
960
|
+
case 126: return ++M, {
|
|
961
|
+
type: R,
|
|
962
|
+
value: String.fromCharCode(t),
|
|
963
|
+
start: e,
|
|
964
|
+
end: M
|
|
965
|
+
};
|
|
966
|
+
default: if (n = j.charCodeAt(M + 1), n === 61) switch (t) {
|
|
967
|
+
case 43:
|
|
968
|
+
case 45:
|
|
969
|
+
case 47:
|
|
970
|
+
case 60:
|
|
971
|
+
case 62:
|
|
972
|
+
case 94:
|
|
973
|
+
case 124:
|
|
974
|
+
case 37:
|
|
975
|
+
case 38:
|
|
976
|
+
case 42: return M += 2, {
|
|
977
|
+
type: R,
|
|
978
|
+
value: String.fromCharCode(t) + String.fromCharCode(n),
|
|
979
|
+
start: e,
|
|
980
|
+
end: M
|
|
981
|
+
};
|
|
982
|
+
case 33:
|
|
983
|
+
case 61: return M += 2, j.charCodeAt(M) === 61 && ++M, {
|
|
984
|
+
type: R,
|
|
985
|
+
value: j.slice(e, M),
|
|
986
|
+
start: e,
|
|
987
|
+
end: M
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
if (o = j.substr(M, 4), o === ">>>=") return M += 4, {
|
|
992
|
+
type: R,
|
|
993
|
+
value: o,
|
|
994
|
+
start: e,
|
|
995
|
+
end: M
|
|
996
|
+
};
|
|
997
|
+
if (a = o.substr(0, 3), a === ">>>" || a === "<<=" || a === ">>=") return M += 3, {
|
|
998
|
+
type: R,
|
|
999
|
+
value: a,
|
|
1000
|
+
start: e,
|
|
1001
|
+
end: M
|
|
1002
|
+
};
|
|
1003
|
+
if (i = a.substr(0, 2), r === i[1] && "+-<>&|".includes(r) || i === "=>") return M += 2, {
|
|
1004
|
+
type: R,
|
|
1005
|
+
value: i,
|
|
1006
|
+
start: e,
|
|
1007
|
+
end: M
|
|
1008
|
+
};
|
|
1009
|
+
if (i === "//" && J({}, B, V), "<>=!+-*%&|^/".includes(r)) return ++M, {
|
|
1010
|
+
type: R,
|
|
1011
|
+
value: r,
|
|
1012
|
+
start: e,
|
|
1013
|
+
end: M
|
|
1014
|
+
};
|
|
1015
|
+
J({}, B, V);
|
|
1016
|
+
}
|
|
1017
|
+
function Cn(e) {
|
|
1018
|
+
let t = "";
|
|
1019
|
+
for (; M < N && fn(j[M]);) t += j[M++];
|
|
1020
|
+
return t.length === 0 && J({}, B, V), G(j.charCodeAt(M)) && J({}, B, V), {
|
|
1021
|
+
type: L,
|
|
1022
|
+
value: parseInt("0x" + t, 16),
|
|
1023
|
+
start: e,
|
|
1024
|
+
end: M
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
function wn(e) {
|
|
1028
|
+
let t = "0" + j[M++];
|
|
1029
|
+
for (; M < N && U(j[M]);) t += j[M++];
|
|
1030
|
+
return (G(j.charCodeAt(M)) || H(j.charCodeAt(M))) && J({}, B, V), {
|
|
1031
|
+
type: L,
|
|
1032
|
+
value: parseInt(t, 8),
|
|
1033
|
+
octal: !0,
|
|
1034
|
+
start: e,
|
|
1035
|
+
end: M
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
function Tn() {
|
|
1039
|
+
var e, t, n = j[M];
|
|
1040
|
+
if (dn(H(n.charCodeAt(0)) || n === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = M, e = "", n !== ".") {
|
|
1041
|
+
if (e = j[M++], n = j[M], e === "0") {
|
|
1042
|
+
if (n === "x" || n === "X") return ++M, Cn(t);
|
|
1043
|
+
if (U(n)) return wn(t);
|
|
1044
|
+
n && H(n.charCodeAt(0)) && J({}, B, V);
|
|
1045
|
+
}
|
|
1046
|
+
for (; H(j.charCodeAt(M));) e += j[M++];
|
|
1047
|
+
n = j[M];
|
|
1048
|
+
}
|
|
1049
|
+
if (n === ".") {
|
|
1050
|
+
for (e += j[M++]; H(j.charCodeAt(M));) e += j[M++];
|
|
1051
|
+
n = j[M];
|
|
1052
|
+
}
|
|
1053
|
+
if (n === "e" || n === "E") if (e += j[M++], n = j[M], (n === "+" || n === "-") && (e += j[M++]), H(j.charCodeAt(M))) for (; H(j.charCodeAt(M));) e += j[M++];
|
|
1054
|
+
else J({}, B, V);
|
|
1055
|
+
return G(j.charCodeAt(M)) && J({}, B, V), {
|
|
1056
|
+
type: L,
|
|
1057
|
+
value: parseFloat(e),
|
|
1058
|
+
start: t,
|
|
1059
|
+
end: M
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
function En() {
|
|
1063
|
+
var e = "", t, n, r, i, a = !1;
|
|
1064
|
+
for (t = j[M], dn(t === "'" || t === "\"", "String literal must starts with a quote"), n = M, ++M; M < N;) if (r = j[M++], r === t) {
|
|
1065
|
+
t = "";
|
|
1066
|
+
break;
|
|
1067
|
+
} else if (r === "\\") if (r = j[M++], !r || !W(r.charCodeAt(0))) switch (r) {
|
|
1068
|
+
case "u":
|
|
1069
|
+
case "x":
|
|
1070
|
+
j[M] === "{" ? (++M, e += vn()) : e += _n(r);
|
|
1071
|
+
break;
|
|
1072
|
+
case "n":
|
|
1073
|
+
e += "\n";
|
|
1074
|
+
break;
|
|
1075
|
+
case "r":
|
|
1076
|
+
e += "\r";
|
|
1077
|
+
break;
|
|
1078
|
+
case "t":
|
|
1079
|
+
e += " ";
|
|
1080
|
+
break;
|
|
1081
|
+
case "b":
|
|
1082
|
+
e += "\b";
|
|
1083
|
+
break;
|
|
1084
|
+
case "f":
|
|
1085
|
+
e += "\f";
|
|
1086
|
+
break;
|
|
1087
|
+
case "v":
|
|
1088
|
+
e += "\v";
|
|
1089
|
+
break;
|
|
1090
|
+
default:
|
|
1091
|
+
U(r) ? (i = "01234567".indexOf(r), i !== 0 && (a = !0), M < N && U(j[M]) && (a = !0, i = i * 8 + "01234567".indexOf(j[M++]), "0123".includes(r) && M < N && U(j[M]) && (i = i * 8 + "01234567".indexOf(j[M++]))), e += String.fromCharCode(i)) : e += r;
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
else r === "\r" && j[M] === "\n" && ++M;
|
|
1095
|
+
else if (W(r.charCodeAt(0))) break;
|
|
1096
|
+
else e += r;
|
|
1097
|
+
return t !== "" && J({}, B, V), {
|
|
1098
|
+
type: z,
|
|
1099
|
+
value: e,
|
|
1100
|
+
octal: a,
|
|
1101
|
+
start: n,
|
|
1102
|
+
end: M
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
function Dn(e, t) {
|
|
1106
|
+
let n = e;
|
|
1107
|
+
t.includes("u") && (n = n.replace(/\\u\{([0-9a-fA-F]+)\}/g, (e, t) => {
|
|
1108
|
+
if (parseInt(t, 16) <= 1114111) return "x";
|
|
1109
|
+
J({}, rn);
|
|
1110
|
+
}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
|
|
1111
|
+
try {
|
|
1112
|
+
new RegExp(n);
|
|
1113
|
+
} catch {
|
|
1114
|
+
J({}, rn);
|
|
1115
|
+
}
|
|
1116
|
+
try {
|
|
1117
|
+
return new RegExp(e, t);
|
|
1118
|
+
} catch {
|
|
1119
|
+
return null;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
function On() {
|
|
1123
|
+
var e = j[M], t, n, r, i;
|
|
1124
|
+
for (dn(e === "/", "Regular expression literal must start with a slash"), t = j[M++], n = !1, r = !1; M < N;) if (e = j[M++], t += e, e === "\\") e = j[M++], W(e.charCodeAt(0)) && J({}, an), t += e;
|
|
1125
|
+
else if (W(e.charCodeAt(0))) J({}, an);
|
|
1126
|
+
else if (n) e === "]" && (n = !1);
|
|
1127
|
+
else if (e === "/") {
|
|
1128
|
+
r = !0;
|
|
1129
|
+
break;
|
|
1130
|
+
} else e === "[" && (n = !0);
|
|
1131
|
+
return r || J({}, an), i = t.substr(1, t.length - 2), {
|
|
1132
|
+
value: i,
|
|
1133
|
+
literal: t
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
function kn() {
|
|
1137
|
+
for (var e, t = "", n = ""; M < N && (e = j[M], mn(e.charCodeAt(0)));) ++M, e === "\\" && M < N ? J({}, B, V) : (n += e, t += e);
|
|
1138
|
+
return n.search(/[^gimuy]/g) >= 0 && J({}, rn, n), {
|
|
1139
|
+
value: n,
|
|
1140
|
+
literal: t
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
function An() {
|
|
1144
|
+
var e, t, n, r;
|
|
1145
|
+
return P = null, gn(), e = M, t = On(), n = kn(), r = Dn(t.value, n.value), {
|
|
1146
|
+
literal: t.literal + n.literal,
|
|
1147
|
+
value: r,
|
|
1148
|
+
regex: {
|
|
1149
|
+
pattern: t.value,
|
|
1150
|
+
flags: n.value
|
|
1151
|
+
},
|
|
1152
|
+
start: e,
|
|
1153
|
+
end: M
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
function jn(e) {
|
|
1157
|
+
return e.type === F || e.type === I || e.type === Lt || e.type === zt;
|
|
1158
|
+
}
|
|
1159
|
+
function Mn() {
|
|
1160
|
+
if (gn(), M >= N) return {
|
|
1161
|
+
type: Rt,
|
|
1162
|
+
start: M,
|
|
1163
|
+
end: M
|
|
1164
|
+
};
|
|
1165
|
+
let e = j.charCodeAt(M);
|
|
1166
|
+
return G(e) ? xn() : e === 40 || e === 41 || e === 59 ? Sn() : e === 39 || e === 34 ? En() : e === 46 ? H(j.charCodeAt(M + 1)) ? Tn() : Sn() : H(e) ? Tn() : Sn();
|
|
1167
|
+
}
|
|
1168
|
+
function K() {
|
|
1169
|
+
let e = P;
|
|
1170
|
+
return M = e.end, P = Mn(), M = e.end, e;
|
|
1171
|
+
}
|
|
1172
|
+
function Nn() {
|
|
1173
|
+
let e = M;
|
|
1174
|
+
P = Mn(), M = e;
|
|
1175
|
+
}
|
|
1176
|
+
function Pn(e) {
|
|
1177
|
+
let t = new k(Vt);
|
|
1178
|
+
return t.elements = e, t;
|
|
1179
|
+
}
|
|
1180
|
+
function Fn(e, t, n) {
|
|
1181
|
+
let r = new k(e === "||" || e === "&&" ? qt : Ht);
|
|
1182
|
+
return r.operator = e, r.left = t, r.right = n, r;
|
|
1183
|
+
}
|
|
1184
|
+
function In(e, t) {
|
|
1185
|
+
let n = new k(Ut);
|
|
1186
|
+
return n.callee = e, n.arguments = t, n;
|
|
1187
|
+
}
|
|
1188
|
+
function Ln(e, t, n) {
|
|
1189
|
+
let r = new k(Wt);
|
|
1190
|
+
return r.test = e, r.consequent = t, r.alternate = n, r;
|
|
1191
|
+
}
|
|
1192
|
+
function Rn(e) {
|
|
1193
|
+
let t = new k(Gt);
|
|
1194
|
+
return t.name = e, t;
|
|
1195
|
+
}
|
|
1196
|
+
function q(e) {
|
|
1197
|
+
let t = new k(Kt);
|
|
1198
|
+
return t.value = e.value, t.raw = j.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
|
|
1199
|
+
}
|
|
1200
|
+
function zn(e, t, n) {
|
|
1201
|
+
let r = new k(Jt);
|
|
1202
|
+
return r.computed = e === "[", r.object = t, r.property = n, r.computed || (n.member = !0), r;
|
|
1203
|
+
}
|
|
1204
|
+
function Bn(e) {
|
|
1205
|
+
let t = new k(Yt);
|
|
1206
|
+
return t.properties = e, t;
|
|
1207
|
+
}
|
|
1208
|
+
function Vn(e, t, n) {
|
|
1209
|
+
let r = new k(Xt);
|
|
1210
|
+
return r.key = t, r.value = n, r.kind = e, r;
|
|
1211
|
+
}
|
|
1212
|
+
function Hn(e, t) {
|
|
1213
|
+
let n = new k(Zt);
|
|
1214
|
+
return n.operator = e, n.argument = t, n.prefix = !0, n;
|
|
1215
|
+
}
|
|
1216
|
+
function J(e, t) {
|
|
1217
|
+
var n, r = Array.prototype.slice.call(arguments, 2), i = t.replace(/%(\d)/g, (e, t) => (dn(t < r.length, "Message reference must be in range"), r[t]));
|
|
1218
|
+
throw n = Error(i), n.index = M, n.description = i, n;
|
|
1219
|
+
}
|
|
1220
|
+
function Un(e) {
|
|
1221
|
+
e.type === Rt && J(e, nn), e.type === L && J(e, Qt), e.type === z && J(e, $t), e.type === F && J(e, en), e.type === I && J(e, tn), J(e, B, e.value);
|
|
1222
|
+
}
|
|
1223
|
+
function Y(e) {
|
|
1224
|
+
let t = K();
|
|
1225
|
+
(t.type !== R || t.value !== e) && Un(t);
|
|
1226
|
+
}
|
|
1227
|
+
function X(e) {
|
|
1228
|
+
return P.type === R && P.value === e;
|
|
1229
|
+
}
|
|
1230
|
+
function Wn(e) {
|
|
1231
|
+
return P.type === I && P.value === e;
|
|
1232
|
+
}
|
|
1233
|
+
function Gn() {
|
|
1234
|
+
let e = [];
|
|
1235
|
+
for (M = P.start, Y("["); !X("]");) X(",") ? (K(), e.push(null)) : (e.push(Z()), X("]") || Y(","));
|
|
1236
|
+
return K(), Pn(e);
|
|
1237
|
+
}
|
|
1238
|
+
function Kn() {
|
|
1239
|
+
M = P.start;
|
|
1240
|
+
let e = K();
|
|
1241
|
+
return e.type === z || e.type === L ? (e.octal && J(e, on), q(e)) : Rn(e.value);
|
|
1242
|
+
}
|
|
1243
|
+
function qn() {
|
|
1244
|
+
var e, t, n, r;
|
|
1245
|
+
if (M = P.start, e = P, e.type === F) return n = Kn(), Y(":"), r = Z(), Vn("init", n, r);
|
|
1246
|
+
if (e.type === Rt || e.type === R) Un(e);
|
|
1247
|
+
else return t = Kn(), Y(":"), r = Z(), Vn("init", t, r);
|
|
1248
|
+
}
|
|
1249
|
+
function Jn() {
|
|
1250
|
+
var e = [], t, n, r, i = {}, a = String;
|
|
1251
|
+
for (M = P.start, Y("{"); !X("}");) t = qn(), n = t.key.type === Gt ? t.key.name : a(t.key.value), r = "$" + n, Object.prototype.hasOwnProperty.call(i, r) ? J({}, sn) : i[r] = !0, e.push(t), X("}") || Y(",");
|
|
1252
|
+
return Y("}"), Bn(e);
|
|
1253
|
+
}
|
|
1254
|
+
function Yn() {
|
|
1255
|
+
Y("(");
|
|
1256
|
+
let e = sr();
|
|
1257
|
+
return Y(")"), e;
|
|
1258
|
+
}
|
|
1259
|
+
var Xn = { if: 1 };
|
|
1260
|
+
function Zn() {
|
|
1261
|
+
var e, t, n;
|
|
1262
|
+
if (X("(")) return Yn();
|
|
1263
|
+
if (X("[")) return Gn();
|
|
1264
|
+
if (X("{")) return Jn();
|
|
1265
|
+
if (e = P.type, M = P.start, e === F || Xn[P.value]) n = Rn(K().value);
|
|
1266
|
+
else if (e === z || e === L) P.octal && J(P, on), n = q(K());
|
|
1267
|
+
else if (e === I) throw Error(cn);
|
|
1268
|
+
else e === Lt ? (t = K(), t.value = t.value === "true", n = q(t)) : e === zt ? (t = K(), t.value = null, n = q(t)) : X("/") || X("/=") ? (n = q(An()), Nn()) : Un(K());
|
|
1269
|
+
return n;
|
|
1270
|
+
}
|
|
1271
|
+
function Qn() {
|
|
1272
|
+
let e = [];
|
|
1273
|
+
if (Y("("), !X(")")) for (; M < N && (e.push(Z()), !X(")"));) Y(",");
|
|
1274
|
+
return Y(")"), e;
|
|
1275
|
+
}
|
|
1276
|
+
function $n() {
|
|
1277
|
+
M = P.start;
|
|
1278
|
+
let e = K();
|
|
1279
|
+
return jn(e) || Un(e), Rn(e.value);
|
|
1280
|
+
}
|
|
1281
|
+
function er() {
|
|
1282
|
+
return Y("."), $n();
|
|
1283
|
+
}
|
|
1284
|
+
function tr() {
|
|
1285
|
+
Y("[");
|
|
1286
|
+
let e = sr();
|
|
1287
|
+
return Y("]"), e;
|
|
1288
|
+
}
|
|
1289
|
+
function nr() {
|
|
1290
|
+
for (var e = Zn(), t, n;;) if (X(".")) n = er(), e = zn(".", e, n);
|
|
1291
|
+
else if (X("(")) t = Qn(), e = In(e, t);
|
|
1292
|
+
else if (X("[")) n = tr(), e = zn("[", e, n);
|
|
1293
|
+
else break;
|
|
1294
|
+
return e;
|
|
1295
|
+
}
|
|
1296
|
+
function rr() {
|
|
1297
|
+
let e = nr();
|
|
1298
|
+
if (P.type === R && (X("++") || X("--"))) throw Error(cn);
|
|
1299
|
+
return e;
|
|
1300
|
+
}
|
|
1301
|
+
function ir() {
|
|
1302
|
+
var e, t;
|
|
1303
|
+
if (P.type !== R && P.type !== I) t = rr();
|
|
1304
|
+
else if (X("++") || X("--")) throw Error(cn);
|
|
1305
|
+
else if (X("+") || X("-") || X("~") || X("!")) e = K(), t = ir(), t = Hn(e.value, t);
|
|
1306
|
+
else if (Wn("delete") || Wn("void") || Wn("typeof")) throw Error(cn);
|
|
1307
|
+
else t = rr();
|
|
1308
|
+
return t;
|
|
1309
|
+
}
|
|
1310
|
+
function ar(e) {
|
|
1311
|
+
let t = 0;
|
|
1312
|
+
if (e.type !== R && e.type !== I) return 0;
|
|
1313
|
+
switch (e.value) {
|
|
1314
|
+
case "||":
|
|
1315
|
+
t = 1;
|
|
1316
|
+
break;
|
|
1317
|
+
case "&&":
|
|
1318
|
+
t = 2;
|
|
1319
|
+
break;
|
|
1320
|
+
case "|":
|
|
1321
|
+
t = 3;
|
|
1322
|
+
break;
|
|
1323
|
+
case "^":
|
|
1324
|
+
t = 4;
|
|
1325
|
+
break;
|
|
1326
|
+
case "&":
|
|
1327
|
+
t = 5;
|
|
1328
|
+
break;
|
|
1329
|
+
case "==":
|
|
1330
|
+
case "!=":
|
|
1331
|
+
case "===":
|
|
1332
|
+
case "!==":
|
|
1333
|
+
t = 6;
|
|
1334
|
+
break;
|
|
1335
|
+
case "<":
|
|
1336
|
+
case ">":
|
|
1337
|
+
case "<=":
|
|
1338
|
+
case ">=":
|
|
1339
|
+
case "instanceof":
|
|
1340
|
+
case "in":
|
|
1341
|
+
t = 7;
|
|
1342
|
+
break;
|
|
1343
|
+
case "<<":
|
|
1344
|
+
case ">>":
|
|
1345
|
+
case ">>>":
|
|
1346
|
+
t = 8;
|
|
1347
|
+
break;
|
|
1348
|
+
case "+":
|
|
1349
|
+
case "-":
|
|
1350
|
+
t = 9;
|
|
1351
|
+
break;
|
|
1352
|
+
case "*":
|
|
1353
|
+
case "/":
|
|
1354
|
+
case "%":
|
|
1355
|
+
t = 11;
|
|
1356
|
+
break;
|
|
1357
|
+
}
|
|
1358
|
+
return t;
|
|
1359
|
+
}
|
|
1360
|
+
function or() {
|
|
1361
|
+
var e = P, t, n, r, i, a, o, s, c = ir(), l;
|
|
1362
|
+
if (r = P, i = ar(r), i === 0) return c;
|
|
1363
|
+
for (r.prec = i, K(), t = [e, P], o = ir(), a = [
|
|
1364
|
+
c,
|
|
1365
|
+
r,
|
|
1366
|
+
o
|
|
1367
|
+
]; (i = ar(P)) > 0;) {
|
|
1368
|
+
for (; a.length > 2 && i <= a[a.length - 2].prec;) o = a.pop(), s = a.pop().value, c = a.pop(), t.pop(), n = Fn(s, c, o), a.push(n);
|
|
1369
|
+
r = K(), r.prec = i, a.push(r), t.push(P), n = ir(), a.push(n);
|
|
1370
|
+
}
|
|
1371
|
+
for (l = a.length - 1, n = a[l], t.pop(); l > 1;) t.pop(), n = Fn(a[l - 1].value, a[l - 2], n), l -= 2;
|
|
1372
|
+
return n;
|
|
1373
|
+
}
|
|
1374
|
+
function Z() {
|
|
1375
|
+
var e = or(), t, n;
|
|
1376
|
+
return X("?") && (K(), t = Z(), Y(":"), n = Z(), e = Ln(e, t, n)), e;
|
|
1377
|
+
}
|
|
1378
|
+
function sr() {
|
|
1379
|
+
let e = Z();
|
|
1380
|
+
if (X(",")) throw Error(cn);
|
|
1381
|
+
return e;
|
|
1382
|
+
}
|
|
1383
|
+
function cr(e) {
|
|
1384
|
+
j = e, M = 0, N = j.length, P = null, Nn();
|
|
1385
|
+
let t = sr();
|
|
1386
|
+
if (P.type !== Rt) throw Error("Unexpect token after expression.");
|
|
1387
|
+
return t;
|
|
1388
|
+
}
|
|
1389
|
+
var lr = {
|
|
1390
|
+
NaN: "NaN",
|
|
1391
|
+
E: "Math.E",
|
|
1392
|
+
LN2: "Math.LN2",
|
|
1393
|
+
LN10: "Math.LN10",
|
|
1394
|
+
LOG2E: "Math.LOG2E",
|
|
1395
|
+
LOG10E: "Math.LOG10E",
|
|
1396
|
+
PI: "Math.PI",
|
|
1397
|
+
SQRT1_2: "Math.SQRT1_2",
|
|
1398
|
+
SQRT2: "Math.SQRT2",
|
|
1399
|
+
MIN_VALUE: "Number.MIN_VALUE",
|
|
1400
|
+
MAX_VALUE: "Number.MAX_VALUE"
|
|
1401
|
+
};
|
|
1402
|
+
function ur(e) {
|
|
1403
|
+
function t(t, n, r, i) {
|
|
1404
|
+
let a = e(n[0]);
|
|
1405
|
+
return r && (a = r + "(" + a + ")", r.lastIndexOf("new ", 0) === 0 && (a = "(" + a + ")")), a + "." + t + (i < 0 ? "" : i === 0 ? "()" : "(" + n.slice(1).map(e).join(",") + ")");
|
|
1406
|
+
}
|
|
1407
|
+
function n(e, n, r) {
|
|
1408
|
+
return (i) => t(e, i, n, r);
|
|
1409
|
+
}
|
|
1410
|
+
let r = "new Date", i = "String", a = "RegExp";
|
|
1411
|
+
return {
|
|
1412
|
+
isNaN: "Number.isNaN",
|
|
1413
|
+
isFinite: "Number.isFinite",
|
|
1414
|
+
abs: "Math.abs",
|
|
1415
|
+
acos: "Math.acos",
|
|
1416
|
+
asin: "Math.asin",
|
|
1417
|
+
atan: "Math.atan",
|
|
1418
|
+
atan2: "Math.atan2",
|
|
1419
|
+
ceil: "Math.ceil",
|
|
1420
|
+
cos: "Math.cos",
|
|
1421
|
+
exp: "Math.exp",
|
|
1422
|
+
floor: "Math.floor",
|
|
1423
|
+
hypot: "Math.hypot",
|
|
1424
|
+
log: "Math.log",
|
|
1425
|
+
max: "Math.max",
|
|
1426
|
+
min: "Math.min",
|
|
1427
|
+
pow: "Math.pow",
|
|
1428
|
+
random: "Math.random",
|
|
1429
|
+
round: "Math.round",
|
|
1430
|
+
sin: "Math.sin",
|
|
1431
|
+
sqrt: "Math.sqrt",
|
|
1432
|
+
tan: "Math.tan",
|
|
1433
|
+
clamp: function(t) {
|
|
1434
|
+
t.length < 3 && D("Missing arguments to clamp function."), t.length > 3 && D("Too many arguments to clamp function.");
|
|
1435
|
+
let n = t.map(e);
|
|
1436
|
+
return "Math.max(" + n[1] + ", Math.min(" + n[2] + "," + n[0] + "))";
|
|
1437
|
+
},
|
|
1438
|
+
now: "Date.now",
|
|
1439
|
+
utc: "Date.UTC",
|
|
1440
|
+
datetime: r,
|
|
1441
|
+
date: n("getDate", r, 0),
|
|
1442
|
+
day: n("getDay", r, 0),
|
|
1443
|
+
year: n("getFullYear", r, 0),
|
|
1444
|
+
month: n("getMonth", r, 0),
|
|
1445
|
+
hours: n("getHours", r, 0),
|
|
1446
|
+
minutes: n("getMinutes", r, 0),
|
|
1447
|
+
seconds: n("getSeconds", r, 0),
|
|
1448
|
+
milliseconds: n("getMilliseconds", r, 0),
|
|
1449
|
+
time: n("getTime", r, 0),
|
|
1450
|
+
timezoneoffset: n("getTimezoneOffset", r, 0),
|
|
1451
|
+
utcdate: n("getUTCDate", r, 0),
|
|
1452
|
+
utcday: n("getUTCDay", r, 0),
|
|
1453
|
+
utcyear: n("getUTCFullYear", r, 0),
|
|
1454
|
+
utcmonth: n("getUTCMonth", r, 0),
|
|
1455
|
+
utchours: n("getUTCHours", r, 0),
|
|
1456
|
+
utcminutes: n("getUTCMinutes", r, 0),
|
|
1457
|
+
utcseconds: n("getUTCSeconds", r, 0),
|
|
1458
|
+
utcmilliseconds: n("getUTCMilliseconds", r, 0),
|
|
1459
|
+
length: n("length", null, -1),
|
|
1460
|
+
parseFloat: "parseFloat",
|
|
1461
|
+
parseInt: "parseInt",
|
|
1462
|
+
upper: n("toUpperCase", i, 0),
|
|
1463
|
+
lower: n("toLowerCase", i, 0),
|
|
1464
|
+
substring: n("substring", i),
|
|
1465
|
+
split: n("split", i),
|
|
1466
|
+
trim: n("trim", i, 0),
|
|
1467
|
+
btoa: "btoa",
|
|
1468
|
+
atob: "atob",
|
|
1469
|
+
regexp: a,
|
|
1470
|
+
test: n("test", a),
|
|
1471
|
+
if: function(t) {
|
|
1472
|
+
t.length < 3 && D("Missing arguments to if function."), t.length > 3 && D("Too many arguments to if function.");
|
|
1473
|
+
let n = t.map(e);
|
|
1474
|
+
return "(" + n[0] + "?" + n[1] + ":" + n[2] + ")";
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
function dr(e) {
|
|
1479
|
+
let t = e && e.length - 1;
|
|
1480
|
+
return t && (e[0] === "\"" && e[t] === "\"" || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
|
|
1481
|
+
}
|
|
1482
|
+
function fr(e) {
|
|
1483
|
+
e ||= {};
|
|
1484
|
+
let t = e.allowed ? Ct(e.allowed) : {}, n = e.forbidden ? Ct(e.forbidden) : {}, r = e.constants || lr, i = (e.functions || ur)(d), a = e.globalvar, o = e.fieldvar, s = bt(a) ? a : (e) => `${a}["${e}"]`;
|
|
1485
|
+
[...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function")];
|
|
1486
|
+
let c = {}, l = {}, u = 0;
|
|
1487
|
+
function d(e) {
|
|
1488
|
+
if (xt(e)) return e;
|
|
1489
|
+
let t = f[e.type];
|
|
1490
|
+
return t ?? D("Unsupported type: " + e.type), t(e);
|
|
1491
|
+
}
|
|
1492
|
+
let f = {
|
|
1493
|
+
Literal: (e) => e.raw,
|
|
1494
|
+
Identifier: (e) => {
|
|
1495
|
+
let i = e.name;
|
|
1496
|
+
return u > 0 ? i : O(n, i) ? D("Illegal identifier: " + i) : O(r, i) ? r[i] : O(t, i) ? i : (c[i] = 1, s(i));
|
|
1497
|
+
},
|
|
1498
|
+
MemberExpression: (e) => {
|
|
1499
|
+
let t = !e.computed, n = d(e.object);
|
|
1500
|
+
t && (u += 1);
|
|
1501
|
+
let r = d(e.property);
|
|
1502
|
+
return n === o && (l[dr(r)] = 1), t && --u, n + (t ? "." + r : "[" + r + "]");
|
|
1503
|
+
},
|
|
1504
|
+
CallExpression: (e) => {
|
|
1505
|
+
e.callee.type !== "Identifier" && D("Illegal callee type: " + e.callee.type);
|
|
1506
|
+
let t = e.callee.name, n = e.arguments, r = O(i, t) && i[t];
|
|
1507
|
+
return r || D("Unrecognized function: " + t), bt(r) ? r(n) : r + "(" + n.map(d).join(",") + ")";
|
|
1508
|
+
},
|
|
1509
|
+
ArrayExpression: (e) => "[" + e.elements.map(d).join(",") + "]",
|
|
1510
|
+
BinaryExpression: (e) => "(" + d(e.left) + " " + e.operator + " " + d(e.right) + ")",
|
|
1511
|
+
UnaryExpression: (e) => "(" + e.operator + d(e.argument) + ")",
|
|
1512
|
+
ConditionalExpression: (e) => "(" + d(e.test) + "?" + d(e.consequent) + ":" + d(e.alternate) + ")",
|
|
1513
|
+
LogicalExpression: (e) => "(" + d(e.left) + e.operator + d(e.right) + ")",
|
|
1514
|
+
ObjectExpression: (e) => {
|
|
1515
|
+
for (let t of e.properties) {
|
|
1516
|
+
let e = t.key.name;
|
|
1517
|
+
gt.has(e) && D("Illegal property: " + e);
|
|
1518
|
+
}
|
|
1519
|
+
return "{" + e.properties.map(d).join(",") + "}";
|
|
1520
|
+
},
|
|
1521
|
+
Property: (e) => {
|
|
1522
|
+
u += 1;
|
|
1523
|
+
let t = d(e.key);
|
|
1524
|
+
return --u, t + ":" + d(e.value);
|
|
1525
|
+
}
|
|
1526
|
+
};
|
|
1527
|
+
function p(e) {
|
|
1528
|
+
let t = {
|
|
1529
|
+
code: d(e),
|
|
1530
|
+
globals: Object.keys(c),
|
|
1531
|
+
fields: Object.keys(l)
|
|
1532
|
+
};
|
|
1533
|
+
return c = {}, l = {}, t;
|
|
1534
|
+
}
|
|
1535
|
+
return p.functions = i, p.constants = r, p;
|
|
1536
|
+
}
|
|
1537
|
+
//#endregion
|
|
1538
|
+
//#region ../core/src/utils/smoothstep.js
|
|
1539
|
+
function pr(e, t, n) {
|
|
1540
|
+
return n = (n - e) / (t - e), n = Math.max(0, Math.min(1, n)), n * n * (3 - 2 * n);
|
|
1541
|
+
}
|
|
1542
|
+
//#endregion
|
|
1543
|
+
//#region ../core/src/utils/clamp.js
|
|
1544
|
+
function mr(e, t = 0, n = 1) {
|
|
1545
|
+
return Math.max(t, Math.min(n, e));
|
|
1546
|
+
}
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region ../core/src/utils/linearstep.js
|
|
1549
|
+
function hr(e, t, n) {
|
|
1550
|
+
return mr((n - e) / (t - e), 0, 1);
|
|
1551
|
+
}
|
|
1552
|
+
//#endregion
|
|
1553
|
+
//#region ../core/src/utils/expression.js
|
|
1554
|
+
function gr(e) {
|
|
1555
|
+
return u(e) || ArrayBuffer.isView(e) ? e : null;
|
|
1556
|
+
}
|
|
1557
|
+
function _r(e) {
|
|
1558
|
+
return gr(e) || (C(e) ? e : null);
|
|
1559
|
+
}
|
|
1560
|
+
var vr = {
|
|
1561
|
+
clamp: mr,
|
|
1562
|
+
format(e, t) {
|
|
1563
|
+
return Be(t)(e);
|
|
1564
|
+
},
|
|
1565
|
+
join(e, t) {
|
|
1566
|
+
return gr(e).join(t);
|
|
1567
|
+
},
|
|
1568
|
+
indexof(e, t, n) {
|
|
1569
|
+
return _r(e).indexOf(t, n);
|
|
1570
|
+
},
|
|
1571
|
+
lastindexof(e, t, n) {
|
|
1572
|
+
return _r(e).lastIndexOf(t, n);
|
|
1573
|
+
},
|
|
1574
|
+
reverse(e) {
|
|
1575
|
+
return C(e) ? Array.from(e).reverse().join("") : gr(e).slice().reverse();
|
|
1576
|
+
},
|
|
1577
|
+
slice(e, t, n) {
|
|
1578
|
+
return _r(e).slice(t, n);
|
|
1579
|
+
},
|
|
1580
|
+
mapHasKey(e, t) {
|
|
1581
|
+
return e.has(t);
|
|
1582
|
+
},
|
|
1583
|
+
isArray: u,
|
|
1584
|
+
isBoolean: me,
|
|
1585
|
+
isDefined(e) {
|
|
1586
|
+
return e !== void 0;
|
|
1587
|
+
},
|
|
1588
|
+
isNumber: he,
|
|
1589
|
+
isObject: d,
|
|
1590
|
+
isRegExp: ge,
|
|
1591
|
+
isString: C,
|
|
1592
|
+
isValid(e) {
|
|
1593
|
+
return e != null && e === e;
|
|
1594
|
+
},
|
|
1595
|
+
lerp: _e,
|
|
1596
|
+
linearstep: hr,
|
|
1597
|
+
replace(e, t, n) {
|
|
1598
|
+
return String(e).replace(t, n);
|
|
1599
|
+
},
|
|
1600
|
+
sort(e) {
|
|
1601
|
+
return gr(e).slice().sort(ue);
|
|
1602
|
+
},
|
|
1603
|
+
center(e) {
|
|
1604
|
+
let t = gr(e);
|
|
1605
|
+
return (t[0] + t[t.length - 1]) / 2;
|
|
1606
|
+
},
|
|
1607
|
+
span(e) {
|
|
1608
|
+
return ve(e);
|
|
1609
|
+
},
|
|
1610
|
+
smoothstep: pr
|
|
1611
|
+
};
|
|
1612
|
+
function yr(e) {
|
|
1613
|
+
let t = !1, n = Dr(e, {}, { resolveScaleResolution: () => (t = !0, { channel: "analysis" }) });
|
|
1614
|
+
return {
|
|
1615
|
+
usesScaleHelper: t,
|
|
1616
|
+
globals: n.globals
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
function br(e, t) {
|
|
1620
|
+
let n = ur(e);
|
|
1621
|
+
for (let e in vr) n[e] = `this.${e}`;
|
|
1622
|
+
for (let r of [
|
|
1623
|
+
"scale",
|
|
1624
|
+
"invert",
|
|
1625
|
+
"domain",
|
|
1626
|
+
"range",
|
|
1627
|
+
"bandwidth",
|
|
1628
|
+
"linearize"
|
|
1629
|
+
]) n[r] = (n) => xr(e, t, r, n);
|
|
1630
|
+
return n;
|
|
1631
|
+
}
|
|
1632
|
+
function xr(e, t, n, r) {
|
|
1633
|
+
if (r.length === 0) throw Error(`Scale helper "${n}" requires a literal channel name.`);
|
|
1634
|
+
if ((n === "scale" || n === "invert" || n === "linearize") && r.length < 2) throw Error(`Scale helper "${n}" requires a channel name and a value.`);
|
|
1635
|
+
let i = Sr(r[0]);
|
|
1636
|
+
if (!i) throw Error(`Scale helper "${n}" requires a literal channel name.`);
|
|
1637
|
+
let a = t.resolveScaleResolution?.(i);
|
|
1638
|
+
if (!a) throw Error(`Unknown scale channel "${i}" in expression helper "${n}".`);
|
|
1639
|
+
let o = t.getScaleHelper(n, i, a), s = r.slice(1).map((t) => e(t)).join(",");
|
|
1640
|
+
return `${t.globalvar}["${o.codeName}"](${s})`;
|
|
1641
|
+
}
|
|
1642
|
+
function Sr(e) {
|
|
1643
|
+
return e?.type === "Literal" && typeof e.value == "string" ? e.value : void 0;
|
|
1644
|
+
}
|
|
1645
|
+
function Cr(e, t) {
|
|
1646
|
+
let n = (n) => Tr(t, e, n);
|
|
1647
|
+
if (e === "domain") return () => n(() => t.getDomain());
|
|
1648
|
+
if (e === "range") return () => n(() => t.getScale().range());
|
|
1649
|
+
if (e === "bandwidth") return () => n(() => {
|
|
1650
|
+
let e = t.getScale();
|
|
1651
|
+
if (typeof e.bandwidth != "function") throw Error(`Scale channel "${t.channel}" does not support bandwidth().`);
|
|
1652
|
+
return e.bandwidth();
|
|
1653
|
+
});
|
|
1654
|
+
if (e === "scale") return (e) => n(() => t.getScale()(e));
|
|
1655
|
+
if (e === "invert") return (e) => n(() => t.getScale().invert(e));
|
|
1656
|
+
if (e === "linearize") return (e) => n(() => e == null ? null : typeof t.fromComplex == "function" ? t.fromComplex(e) : e);
|
|
1657
|
+
throw Error("Unknown scale helper: " + e);
|
|
1658
|
+
}
|
|
1659
|
+
var wr = /* @__PURE__ */ new WeakSet();
|
|
1660
|
+
function Tr(e, t, n) {
|
|
1661
|
+
if (wr.has(e)) throw Error(`Scale helper cycle detected while evaluating ${t}("${e.channel}").`);
|
|
1662
|
+
wr.add(e);
|
|
1663
|
+
try {
|
|
1664
|
+
return n();
|
|
1665
|
+
} finally {
|
|
1666
|
+
wr.delete(e);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
function Er(e, t, n, r) {
|
|
1670
|
+
let i = /* @__PURE__ */ new Set(), a = () => {
|
|
1671
|
+
for (let e of i) e();
|
|
1672
|
+
}, o = () => {
|
|
1673
|
+
e === "domain" ? n.addEventListener("domain", a) : (e === "range" || n.addEventListener("domain", a), n.addEventListener("range", a));
|
|
1674
|
+
}, s = () => {
|
|
1675
|
+
e === "domain" ? n.removeEventListener("domain", a) : (e === "range" || n.removeEventListener("domain", a), n.removeEventListener("range", a));
|
|
1676
|
+
};
|
|
1677
|
+
return {
|
|
1678
|
+
id: `scale:${t}:${r}`,
|
|
1679
|
+
name: `scale(${t})`,
|
|
1680
|
+
kind: "derived",
|
|
1681
|
+
rank: 0,
|
|
1682
|
+
propagation: "sync",
|
|
1683
|
+
get() {
|
|
1684
|
+
return n.getScale();
|
|
1685
|
+
},
|
|
1686
|
+
subscribe(e) {
|
|
1687
|
+
let t = i.size === 0;
|
|
1688
|
+
return i.add(e), t && o(), () => {
|
|
1689
|
+
i.delete(e) && i.size === 0 && s();
|
|
1690
|
+
};
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
function Dr(e, t = {}, n = {}) {
|
|
1695
|
+
try {
|
|
1696
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = 1, o = {
|
|
1697
|
+
...n,
|
|
1698
|
+
globalvar: "globalObject",
|
|
1699
|
+
globalObject: t,
|
|
1700
|
+
getScaleHelper(e, n, o) {
|
|
1701
|
+
let s = e + ":" + n, c = i.get(s);
|
|
1702
|
+
if (c) return c;
|
|
1703
|
+
let l = r.get(s);
|
|
1704
|
+
l || (l = Er(e, n, o, "__scale_dependency_" + a++), r.set(s, l));
|
|
1705
|
+
let u = "__scale_helper_" + a++, d = {
|
|
1706
|
+
codeName: u,
|
|
1707
|
+
dependency: l
|
|
1708
|
+
};
|
|
1709
|
+
return i.set(s, d), t[u] = Cr(e, o), d;
|
|
1710
|
+
}
|
|
1711
|
+
}, s = fr({
|
|
1712
|
+
forbidden: [],
|
|
1713
|
+
allowed: ["datum", "undefined"],
|
|
1714
|
+
globalvar: "globalObject",
|
|
1715
|
+
fieldvar: "datum",
|
|
1716
|
+
functions: (e) => br(e, o)
|
|
1717
|
+
})(cr(e)), c = Function("datum", "globalObject", `"use strict";
|
|
1718
|
+
try {
|
|
1719
|
+
return (${s.code});
|
|
1720
|
+
} catch (e) {
|
|
1721
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
1722
|
+
}`).bind(vr), l = (e) => c(e, t);
|
|
1723
|
+
return l.fields = s.fields, l.globals = s.globals, l.code = s.code, l.scaleDependencies = Array.from(r.values()), l;
|
|
1724
|
+
} catch (t) {
|
|
1725
|
+
throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
var Or = fr({
|
|
1729
|
+
forbidden: [],
|
|
1730
|
+
allowed: ["event"],
|
|
1731
|
+
globalvar: "globalObject"
|
|
1732
|
+
});
|
|
1733
|
+
function kr(e) {
|
|
1734
|
+
try {
|
|
1735
|
+
let t = Or(cr(e));
|
|
1736
|
+
return Function("event", "globalObject", `"use strict";
|
|
1737
|
+
try {
|
|
1738
|
+
return !!(${t.code});
|
|
1739
|
+
} catch (e) {
|
|
1740
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
1741
|
+
}`);
|
|
1742
|
+
} catch (t) {
|
|
1743
|
+
throw Error(`Invalid expression: ${e}, ${t.message}`, { cause: t });
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
//#endregion
|
|
1747
|
+
//#region ../core/src/utils/interactionConfig.js
|
|
1748
|
+
function Ar(e) {
|
|
1749
|
+
if (typeof e == "string") {
|
|
1750
|
+
let t = e.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);
|
|
1751
|
+
if (!t) throw Error(`Invalid event type string: ${e}`);
|
|
1752
|
+
let [, n, r] = t, i = { type: n };
|
|
1753
|
+
return r && (i.filter = r), i;
|
|
1754
|
+
} else return e;
|
|
1755
|
+
}
|
|
1756
|
+
function jr(e) {
|
|
1757
|
+
return e?.filter ? kr(e.filter) : () => !0;
|
|
1758
|
+
}
|
|
1759
|
+
function Mr(e, t, n) {
|
|
1760
|
+
if (!t.includes(e.type)) throw Error(n);
|
|
1761
|
+
return e;
|
|
1762
|
+
}
|
|
1763
|
+
//#endregion
|
|
1764
|
+
//#region ../core/src/selection/selection.js
|
|
1765
|
+
function Nr(e) {
|
|
1766
|
+
return {
|
|
1767
|
+
type: "single",
|
|
1768
|
+
datum: e,
|
|
1769
|
+
uniqueId: e?.[T]
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
function Pr(e) {
|
|
1773
|
+
return e ??= [], {
|
|
1774
|
+
type: "multi",
|
|
1775
|
+
data: new Map(e.map((e) => [e[T], e]))
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
function Fr(e) {
|
|
1779
|
+
return {
|
|
1780
|
+
type: "interval",
|
|
1781
|
+
intervals: Object.fromEntries(e.map((e) => [e, null]))
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
function Ir(e, { add: t, remove: n, toggle: r }) {
|
|
1785
|
+
let i = e.data;
|
|
1786
|
+
for (let e of t ?? []) i.set(e[T], e);
|
|
1787
|
+
for (let e of n ?? []) i.delete(e[T]);
|
|
1788
|
+
for (let e of r ?? []) {
|
|
1789
|
+
let t = e[T];
|
|
1790
|
+
i.has(t) ? i.delete(t) : i.set(t, e);
|
|
1791
|
+
}
|
|
1792
|
+
return {
|
|
1793
|
+
type: "multi",
|
|
1794
|
+
data: i
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1797
|
+
function Lr(e, t) {
|
|
1798
|
+
let n = !!(e.empty ?? !0), r = $e(e.param), i = e.fields ?? {};
|
|
1799
|
+
if (zr(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(T)}]`;
|
|
1800
|
+
if (Br(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(T)}])`;
|
|
1801
|
+
if (Rr(t)) {
|
|
1802
|
+
let a = Object.keys(t.intervals), o = Object.keys(i).filter(Si);
|
|
1803
|
+
if (o.length === 0) throw Error("Filtering using interval selections requires at least one primary positional channel in the config! " + JSON.stringify(e));
|
|
1804
|
+
if (o.some((e) => !a.includes(e))) throw Error(`Selection channels (${a.join(", ")}) do not match the fields: ${JSON.stringify(e)}!`);
|
|
1805
|
+
let s = (e) => `datum[${JSON.stringify(e)}]`;
|
|
1806
|
+
return a.map((e) => {
|
|
1807
|
+
let t = Ai(e), a = i[e], o = i[t] ?? i[e], c = `${r}.intervals.${e}[0] <= ${s(o)}`, l = `${s(a)} <= ${r}.intervals.${e}[1]`;
|
|
1808
|
+
return `(${r}.intervals.${e} ? (${c} && ${l}) : ${n})`;
|
|
1809
|
+
}).join(" && ");
|
|
1810
|
+
} else throw Error(`Unrecognized selection type : ${JSON.stringify(t)}`);
|
|
1811
|
+
}
|
|
1812
|
+
function Rr(e) {
|
|
1813
|
+
return e.type === "interval";
|
|
1814
|
+
}
|
|
1815
|
+
function zr(e) {
|
|
1816
|
+
return e.type === "single";
|
|
1817
|
+
}
|
|
1818
|
+
function Br(e) {
|
|
1819
|
+
return e.type === "multi";
|
|
1820
|
+
}
|
|
1821
|
+
function Vr(e) {
|
|
1822
|
+
let t = typeof e == "string" ? { type: e } : { ...e };
|
|
1823
|
+
return t.on = t.on ? Ar(t.on) : Hr(t) ? { type: "click" } : void 0, t.clear = t.clear === !1 ? void 0 : t.clear === !0 || t.clear == null ? { type: "dblclick" } : Ar(t.clear), Hr(t) && t.on.type === "click" && (t.toggle = !0), t;
|
|
1824
|
+
}
|
|
1825
|
+
function Hr(e) {
|
|
1826
|
+
return e && e.type == "point";
|
|
1827
|
+
}
|
|
1828
|
+
function Ur(e) {
|
|
1829
|
+
return e && e.type == "interval";
|
|
1830
|
+
}
|
|
1831
|
+
function Wr(e) {
|
|
1832
|
+
return Object.values(e.intervals).some((e) => e && e.length === 2);
|
|
1833
|
+
}
|
|
1834
|
+
function Gr(e, t) {
|
|
1835
|
+
return Object.entries(e.intervals).every(([e, n]) => (e == "x" || e == "y") && n && n[0] <= t[e] && n[1] >= t[e]);
|
|
1836
|
+
}
|
|
1837
|
+
//#endregion
|
|
1838
|
+
//#region ../core/src/encoder/accessor.js
|
|
1839
|
+
function Kr(e, t, n) {
|
|
1840
|
+
if (!e) throw Error("Cannot create an accessor without a channel.");
|
|
1841
|
+
function r(n) {
|
|
1842
|
+
let r = n;
|
|
1843
|
+
return r.fields ??= [], r.constant = r.fields.length === 0, r.channelDef = t, r.channel = e, r.sourceKey = Yr(t), r.scaleChannel = ((ui(t) && t.resolutionChannel) ?? (Pi(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = Xr({
|
|
1844
|
+
scaleChannel: r.scaleChannel,
|
|
1845
|
+
source: Jr(t)
|
|
1846
|
+
}).domainKeyBase), r.equals = (e) => e ? r === e || r.sourceKey !== void 0 && r.sourceKey === e.sourceKey : !1, r.asNumberAccessor = () => r, r;
|
|
1847
|
+
}
|
|
1848
|
+
function i(e) {
|
|
1849
|
+
if (w(e)) {
|
|
1850
|
+
let t = r(n.createExpression(e.expr));
|
|
1851
|
+
if (t.fields.length > 0) throw Error("Expression in DatumDef/ValueDef cannot access data fields: " + e.expr);
|
|
1852
|
+
return t;
|
|
1853
|
+
} else {
|
|
1854
|
+
let t = e;
|
|
1855
|
+
return r(() => t);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
if (Q(t)) try {
|
|
1859
|
+
return r(ct(t.field));
|
|
1860
|
+
} catch (e) {
|
|
1861
|
+
throw Error(`Invalid field definition: ${e.message}`, { cause: e });
|
|
1862
|
+
}
|
|
1863
|
+
else if (hi(t)) return r(n.createExpression(t.expr));
|
|
1864
|
+
else if (li(t)) return i(t.datum);
|
|
1865
|
+
else if (ci(t)) return i(t.value);
|
|
1866
|
+
else throw Error(`Invalid channel definition: "${e}": ${JSON.stringify(t)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`);
|
|
1867
|
+
}
|
|
1868
|
+
function qr(e) {
|
|
1869
|
+
return e.scaleChannel !== void 0;
|
|
1870
|
+
}
|
|
1871
|
+
function Jr(e) {
|
|
1872
|
+
if (Q(e)) return {
|
|
1873
|
+
kind: "field",
|
|
1874
|
+
value: e.field
|
|
1875
|
+
};
|
|
1876
|
+
if (hi(e)) return {
|
|
1877
|
+
kind: "expr",
|
|
1878
|
+
value: e.expr
|
|
1879
|
+
};
|
|
1880
|
+
if (li(e)) return {
|
|
1881
|
+
kind: "datum",
|
|
1882
|
+
value: e.datum
|
|
1883
|
+
};
|
|
1884
|
+
if (ci(e)) return {
|
|
1885
|
+
kind: "value",
|
|
1886
|
+
value: e.value
|
|
1887
|
+
};
|
|
1888
|
+
throw Error("Cannot derive a domain key from channel definition: " + JSON.stringify(e));
|
|
1889
|
+
}
|
|
1890
|
+
function Yr(e) {
|
|
1891
|
+
let t = Jr(e);
|
|
1892
|
+
return t.kind === "datum" || t.kind === "value" ? "constant|" + $r(t.value) : t.kind + "|" + Qr(t);
|
|
1893
|
+
}
|
|
1894
|
+
function Xr({ scaleChannel: e, source: t, type: n }) {
|
|
1895
|
+
if (!e) throw Error("Cannot build a domain key without a scale channel.");
|
|
1896
|
+
let r = e + "|" + t.kind + "|" + Qr(t);
|
|
1897
|
+
return {
|
|
1898
|
+
domainKeyBase: r,
|
|
1899
|
+
domainKey: n ? n + "|" + r : void 0
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
function Zr(e, t) {
|
|
1903
|
+
let { domainKey: n, domainKeyBase: r } = Xr({
|
|
1904
|
+
scaleChannel: e.scaleChannel,
|
|
1905
|
+
source: Jr(e.channelDef),
|
|
1906
|
+
type: t
|
|
1907
|
+
});
|
|
1908
|
+
if (!n) throw Error("Cannot finalize a domain key without a resolved type.");
|
|
1909
|
+
return e.domainKeyBase = r, e.domainKey = n, n;
|
|
1910
|
+
}
|
|
1911
|
+
function Qr(e) {
|
|
1912
|
+
switch (e.kind) {
|
|
1913
|
+
case "field":
|
|
1914
|
+
case "expr": return e.value;
|
|
1915
|
+
case "datum":
|
|
1916
|
+
case "value": return $r(e.value);
|
|
1917
|
+
default: throw Error("Unknown domain key source.");
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
function $r(e) {
|
|
1921
|
+
return w(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
|
|
1922
|
+
}
|
|
1923
|
+
//#endregion
|
|
1924
|
+
//#region ../core/src/encoder/encoder.js
|
|
1925
|
+
function ei(e, t, n, r) {
|
|
1926
|
+
let i, a = rt(!1), o = () => {
|
|
1927
|
+
if (i) return i;
|
|
1928
|
+
let o = n.findValue(e);
|
|
1929
|
+
if (!o) return a;
|
|
1930
|
+
let s = {};
|
|
1931
|
+
if (Rr(o)) {
|
|
1932
|
+
let n = Object.keys(o.intervals);
|
|
1933
|
+
for (let r of n) {
|
|
1934
|
+
let n = t[r];
|
|
1935
|
+
if (Q(n)) {
|
|
1936
|
+
s[r] = n.field;
|
|
1937
|
+
continue;
|
|
1938
|
+
} else if (n && "condition" in n) {
|
|
1939
|
+
let e = n.condition;
|
|
1940
|
+
if (Q(e)) {
|
|
1941
|
+
s[r] = e.field;
|
|
1942
|
+
continue;
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
throw Error(`Selection "${e}" has an interval for "${r}" channel, but could not find a fieldDef: ${JSON.stringify(t[r])}`);
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
let c = Lr({
|
|
1949
|
+
type: "filter",
|
|
1950
|
+
param: e,
|
|
1951
|
+
fields: s,
|
|
1952
|
+
empty: r
|
|
1953
|
+
}, o);
|
|
1954
|
+
return i = n.createExpression(c), i;
|
|
1955
|
+
};
|
|
1956
|
+
return Object.assign((e) => o()(e), {
|
|
1957
|
+
param: e,
|
|
1958
|
+
empty: r ?? !0
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
function ti(e, t, n, r) {
|
|
1962
|
+
let i = gi(t) || _i(t) ? Array.isArray(t.condition) ? t.condition : [t.condition] : [], a = [...i, t], o = a.map((t, o) => {
|
|
1963
|
+
let s = i[o];
|
|
1964
|
+
return {
|
|
1965
|
+
accessor: Kr(e, t, r),
|
|
1966
|
+
predicate: s?.param ? ei(s.param, n, r, s.empty) : Object.assign(rt(o === a.length - 1), { empty: !1 })
|
|
1967
|
+
};
|
|
1968
|
+
});
|
|
1969
|
+
if (o.filter((e) => !e.accessor.constant).length > 1) throw Error("Only one accessor can be non-constant. Channel: " + e);
|
|
1970
|
+
return o;
|
|
1971
|
+
}
|
|
1972
|
+
function ni(e, t) {
|
|
1973
|
+
let n = {}, r = (t) => e.getScaleResolution(t)?.getScale();
|
|
1974
|
+
for (let [i, a] of Object.entries(t)) {
|
|
1975
|
+
if (!a) continue;
|
|
1976
|
+
let o = i;
|
|
1977
|
+
ri(o) || (n[o] = oi(ti(o, a, t, e.paramRuntime), r));
|
|
1978
|
+
}
|
|
1979
|
+
return n;
|
|
1980
|
+
}
|
|
1981
|
+
function ri(e) {
|
|
1982
|
+
return e === "key" || e === "search" || e === "tooltip";
|
|
1983
|
+
}
|
|
1984
|
+
function ii(e) {
|
|
1985
|
+
return e.branches.map((e) => e.accessor);
|
|
1986
|
+
}
|
|
1987
|
+
function ai(e) {
|
|
1988
|
+
return e.branches.find((e) => !e.accessor.constant)?.accessor;
|
|
1989
|
+
}
|
|
1990
|
+
function oi(e, t) {
|
|
1991
|
+
if (e.length === 1) {
|
|
1992
|
+
let n = si(e[0].accessor, t);
|
|
1993
|
+
return Object.assign(n, { branches: e });
|
|
1994
|
+
}
|
|
1995
|
+
let n = e.map((e) => e.predicate), r = e.map((e) => si(e.accessor, t));
|
|
1996
|
+
return Object.assign((e) => {
|
|
1997
|
+
for (let t = 0; t < r.length; t++) if (n[t](e)) return r[t](e);
|
|
1998
|
+
}, {
|
|
1999
|
+
constant: !1,
|
|
2000
|
+
branches: e,
|
|
2001
|
+
scale: r.map((e) => e.scale).find((e) => e),
|
|
2002
|
+
channelDef: e.at(-1).accessor.channelDef
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
function si(e, t) {
|
|
2006
|
+
let { channel: n, scaleChannel: r, channelDef: i } = e, a = e.scaleChannel ? t(r) : void 0;
|
|
2007
|
+
if (r && !a) throw Error(`Missing scale! "${n}": ${JSON.stringify(i)}`);
|
|
2008
|
+
return Object.assign(a ? (t) => a(e(t)) : (t) => e(t), {
|
|
2009
|
+
scale: a,
|
|
2010
|
+
constant: e.constant,
|
|
2011
|
+
branches: [{
|
|
2012
|
+
accessor: e,
|
|
2013
|
+
predicate: rt(!0)
|
|
2014
|
+
}],
|
|
2015
|
+
channelDef: i
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
function ci(e) {
|
|
2019
|
+
return e && "value" in e;
|
|
2020
|
+
}
|
|
2021
|
+
function Q(e) {
|
|
2022
|
+
return e && "field" in e;
|
|
2023
|
+
}
|
|
2024
|
+
function li(e) {
|
|
2025
|
+
return e && "datum" in e;
|
|
2026
|
+
}
|
|
2027
|
+
function ui(e) {
|
|
2028
|
+
return Q(e) || li(e) || hi(e) || mi(e);
|
|
2029
|
+
}
|
|
2030
|
+
function di(e) {
|
|
2031
|
+
if (_i(e)) {
|
|
2032
|
+
let t = e.condition;
|
|
2033
|
+
return (Array.isArray(t) ? t : [t]).find((e) => ui(e));
|
|
2034
|
+
} else if (ui(e)) return e;
|
|
2035
|
+
}
|
|
2036
|
+
function fi(e) {
|
|
2037
|
+
let t = e && di(e);
|
|
2038
|
+
return t != null && t.type != "quantitative" && t.scale !== null;
|
|
2039
|
+
}
|
|
2040
|
+
function pi(e, t) {
|
|
2041
|
+
let n = e.mark.encoding[t];
|
|
2042
|
+
if (Array.isArray(n)) throw Error("Not a channel def with scale!");
|
|
2043
|
+
{
|
|
2044
|
+
let e = di(n);
|
|
2045
|
+
if (e) return e;
|
|
2046
|
+
}
|
|
2047
|
+
throw Error("Not a channel def with scale!");
|
|
2048
|
+
}
|
|
2049
|
+
function mi(e) {
|
|
2050
|
+
return e && "chrom" in e;
|
|
2051
|
+
}
|
|
2052
|
+
function hi(e) {
|
|
2053
|
+
return e && "expr" in e;
|
|
2054
|
+
}
|
|
2055
|
+
function gi(e) {
|
|
2056
|
+
return (Q(e) || li(e)) && "condition" in e;
|
|
2057
|
+
}
|
|
2058
|
+
function _i(e) {
|
|
2059
|
+
return ci(e) && "condition" in e;
|
|
2060
|
+
}
|
|
2061
|
+
var vi = ["x", "y"], yi = ["x2", "y2"], bi = ["xOffset", "yOffset"], xi = [...vi, ...yi];
|
|
2062
|
+
function Si(e) {
|
|
2063
|
+
return vi.includes(e);
|
|
2064
|
+
}
|
|
2065
|
+
function Ci(e) {
|
|
2066
|
+
return xi.includes(e);
|
|
2067
|
+
}
|
|
2068
|
+
function wi(e) {
|
|
2069
|
+
return bi.includes(e);
|
|
2070
|
+
}
|
|
2071
|
+
function Ti(e) {
|
|
2072
|
+
return ji(e) == "x" ? "xOffset" : "yOffset";
|
|
2073
|
+
}
|
|
2074
|
+
function Ei(e, t, n) {
|
|
2075
|
+
return t ?? (n ? 0 : e);
|
|
2076
|
+
}
|
|
2077
|
+
var Di = {
|
|
2078
|
+
x: "x2",
|
|
2079
|
+
y: "y2"
|
|
2080
|
+
}, Oi = Object.fromEntries(Object.entries(Di).map((e) => [e[1], e[0]]));
|
|
2081
|
+
function ki(e) {
|
|
2082
|
+
return e in Oi;
|
|
2083
|
+
}
|
|
2084
|
+
function Ai(e) {
|
|
2085
|
+
let t = Di[e];
|
|
2086
|
+
if (t) return t;
|
|
2087
|
+
throw Error(`${e} has no secondary channel!`);
|
|
2088
|
+
}
|
|
2089
|
+
function ji(e) {
|
|
2090
|
+
return Oi[e] ?? e;
|
|
2091
|
+
}
|
|
2092
|
+
function Mi(e) {
|
|
2093
|
+
return [
|
|
2094
|
+
"color",
|
|
2095
|
+
"fill",
|
|
2096
|
+
"stroke"
|
|
2097
|
+
].includes(ji(e));
|
|
2098
|
+
}
|
|
2099
|
+
function Ni(e) {
|
|
2100
|
+
return ["shape", "direction"].includes(e);
|
|
2101
|
+
}
|
|
2102
|
+
function Pi(e) {
|
|
2103
|
+
return [
|
|
2104
|
+
"x",
|
|
2105
|
+
"y",
|
|
2106
|
+
"x2",
|
|
2107
|
+
"y2",
|
|
2108
|
+
"xOffset",
|
|
2109
|
+
"yOffset",
|
|
2110
|
+
"color",
|
|
2111
|
+
"fill",
|
|
2112
|
+
"stroke",
|
|
2113
|
+
"opacity",
|
|
2114
|
+
"fillOpacity",
|
|
2115
|
+
"strokeOpacity",
|
|
2116
|
+
"strokeWidth",
|
|
2117
|
+
"size",
|
|
2118
|
+
"shape",
|
|
2119
|
+
"direction",
|
|
2120
|
+
"angle",
|
|
2121
|
+
"dx",
|
|
2122
|
+
"dy",
|
|
2123
|
+
"sample"
|
|
2124
|
+
].includes(e);
|
|
2125
|
+
}
|
|
2126
|
+
function Fi(e) {
|
|
2127
|
+
switch (e) {
|
|
2128
|
+
case "shape": return [
|
|
2129
|
+
"circle",
|
|
2130
|
+
"square",
|
|
2131
|
+
"cross",
|
|
2132
|
+
"diamond",
|
|
2133
|
+
"triangle-up",
|
|
2134
|
+
"triangle-right",
|
|
2135
|
+
"triangle-down",
|
|
2136
|
+
"triangle-left",
|
|
2137
|
+
"tick-up",
|
|
2138
|
+
"tick-right",
|
|
2139
|
+
"tick-down",
|
|
2140
|
+
"tick-left",
|
|
2141
|
+
"x",
|
|
2142
|
+
"+"
|
|
2143
|
+
];
|
|
2144
|
+
case "direction": return ["forward", "reverse"];
|
|
2145
|
+
default:
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
function Ii(e) {
|
|
2149
|
+
if (!Ni(e)) throw Error("Not a discrete channel: " + e);
|
|
2150
|
+
let t = new Map(Fi(e).map((e, t) => [e, t]));
|
|
2151
|
+
return (n) => {
|
|
2152
|
+
let r = t.get(n);
|
|
2153
|
+
if (r !== void 0) return r;
|
|
2154
|
+
throw Error(`Invalid value for "${e}" channel: ${n}`);
|
|
2155
|
+
};
|
|
2156
|
+
}
|
|
2157
|
+
//#endregion
|
|
2158
|
+
//#region ../core/src/utils/arrayUtils.js
|
|
2159
|
+
function Li(e, t) {
|
|
2160
|
+
return e.length == t.length && e.every((n, r) => e[r] === t[r]);
|
|
2161
|
+
}
|
|
2162
|
+
function Ri(e) {
|
|
2163
|
+
return Array.isArray(e) ? e : e === void 0 ? [] : [e];
|
|
2164
|
+
}
|
|
2165
|
+
function zi(e) {
|
|
2166
|
+
return e[e.length - 1];
|
|
2167
|
+
}
|
|
2168
|
+
function Bi(e, t, n) {
|
|
2169
|
+
if (t < 0 || t >= e.length) throw Error("Source index out of range.");
|
|
2170
|
+
if (n < 0 || n > e.length - 1) throw Error("Destination index out of range.");
|
|
2171
|
+
let [r] = e.splice(t, 1);
|
|
2172
|
+
e.splice(n, 0, r);
|
|
2173
|
+
}
|
|
2174
|
+
//#endregion
|
|
2175
|
+
//#region ../core/src/view/renderingContext/clipOptions.js
|
|
2176
|
+
function Vi(e) {
|
|
2177
|
+
if (e.clip) return e.clip;
|
|
2178
|
+
if (e.clipRect) return {
|
|
2179
|
+
rect: e.clipRect,
|
|
2180
|
+
clipX: !0,
|
|
2181
|
+
clipY: !0
|
|
2182
|
+
};
|
|
2183
|
+
}
|
|
2184
|
+
function Hi(e, t) {
|
|
2185
|
+
return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
|
|
2186
|
+
}
|
|
2187
|
+
function $(e, t, n) {
|
|
2188
|
+
return t || n ? {
|
|
2189
|
+
rect: e,
|
|
2190
|
+
clipX: t,
|
|
2191
|
+
clipY: n
|
|
2192
|
+
} : void 0;
|
|
2193
|
+
}
|
|
2194
|
+
function Ui(e, t) {
|
|
2195
|
+
return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
|
|
2196
|
+
}
|
|
2197
|
+
function Wi(e, t) {
|
|
2198
|
+
if (!e) return t;
|
|
2199
|
+
if (!t) return e;
|
|
2200
|
+
let n = e.clipX || t.clipX, r = e.clipY || t.clipY, i = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, a = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
|
|
2201
|
+
return $(e.rect.modify({
|
|
2202
|
+
x: () => i.x,
|
|
2203
|
+
y: () => a.y,
|
|
2204
|
+
width: () => i.width,
|
|
2205
|
+
height: () => a.height
|
|
2206
|
+
}), n, r);
|
|
2207
|
+
}
|
|
2208
|
+
function Gi(e, t) {
|
|
2209
|
+
if (e === !0) return $(t, !0, !0);
|
|
2210
|
+
if (e === "x") return $(t, !0, !1);
|
|
2211
|
+
if (e === "y") return $(t, !1, !0);
|
|
2212
|
+
}
|
|
2213
|
+
function Ki(e) {
|
|
2214
|
+
let t = e.mark;
|
|
2215
|
+
if (t) {
|
|
2216
|
+
let e = t.properties.clip;
|
|
2217
|
+
return {
|
|
2218
|
+
clipX: e === !0 || e === "x",
|
|
2219
|
+
clipY: e === !0 || e === "y"
|
|
2220
|
+
};
|
|
2221
|
+
}
|
|
2222
|
+
let n = !1, r = !0, i = !0;
|
|
2223
|
+
return e.visit((e) => {
|
|
2224
|
+
let t = e.mark;
|
|
2225
|
+
if (t) {
|
|
2226
|
+
n = !0;
|
|
2227
|
+
let e = t.properties.clip;
|
|
2228
|
+
r &&= e === !0 || e === "x", i &&= e === !0 || e === "y";
|
|
2229
|
+
}
|
|
2230
|
+
}), {
|
|
2231
|
+
clipX: n && r,
|
|
2232
|
+
clipY: n && i
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
function qi(e, t, n) {
|
|
2236
|
+
if (t !== "never") return Wi(e, Gi(t, n));
|
|
2237
|
+
}
|
|
2238
|
+
//#endregion
|
|
2239
|
+
export { Ar as $, ne as $t, wi as A, Je as At, Vr as B, ye as Bt, mi as C, w as Ct, hi as D, nt as Dt, Ni as E, Xe as Et, vi as F, Be as Ft, Rr as G, u as Gt, Pr as H, oe as Ht, Ei as I, Ve as It, Hr as J, he as Jt, Ur as K, me as Kt, Kr as L, Oe as Lt, Si as M, Ge as Mt, ki as N, qe as Nt, Q as O, $e as Ot, ci as P, Ke as Pt, Ir as Q, te as Qt, Zr as R, we as Rt, Pi as S, et as St, li as T, Ze as Tt, Nr as U, le as Ut, Fr as V, t as Vt, Wr as W, o as Wt, Lr as X, C as Xt, zr as Y, d as Yt, Gr as Z, _e as Zt, ai as _, ct as _t, Ki as a, b as an, mr as at, Ai as b, it as bt, Ri as c, ie as cn, xt as ct, Li as d, yt as dt, re as en, jr as et, ni as f, vt as ft, ii as g, D as gt, Ii as h, mt as ht, $ as i, be as in, hr as it, Ci as j, Ue as jt, fi as k, Ye as kt, Bi as l, O as lt, pi as m, ht as mt, Hi as n, ve as nn, yr as nt, Vi as o, x as on, Ct as ot, di as p, _t as pt, Br as q, se as qt, Wi as r, s as rn, Dr as rt, qi as s, S as sn, St as st, Ui as t, f as tn, Mr as tt, zi as u, bt as ut, Ti as v, st as vt, Mi as w, Qe as wt, ui as x, tt as xt, ji as y, T as yt, qr as z, xe as zt };
|