@genome-spy/app 0.83.1 → 0.85.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/dist/{agentApi-AxdD95yY.js → agentApi-Cz0hCnVp.js} +6576 -7722
- package/dist/agentApi.es.js +3747 -3317
- package/dist/agentShared.es.js +18 -18
- package/dist/arrayUtils-LJpQOu-U.js +2175 -0
- package/dist/bmFontMetrics-CuNB-kNN.js +31 -0
- package/dist/canvas2d-DoAXEiF9.js +309 -0
- package/dist/canvas2d-f5jl4A5D.js +310 -0
- package/dist/canvasSizeHelper-7h_8rOcx.js +56 -0
- package/dist/clipOptions-gqdb3fvW.js +43 -0
- package/dist/color-W5zffv-z.js +335 -0
- package/dist/{componentStyles-BzJWWojD.js → componentStyles-FsNmIb22.js} +5 -1
- package/dist/{debug-CI7POTMx.js → debug-BvCZWumf.js} +10 -10
- package/dist/{debug-DJKug_38.js → debug-CgDtmspT.js} +7 -5
- package/dist/dialog.es.js +1 -1
- 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/framebufferReadback-CCLOjStu.js +148 -0
- package/dist/framebufferReadback-THWwFqs8.js +1994 -0
- package/dist/index.es.js +3735 -3369
- package/dist/index.js +743 -616
- package/dist/metadataChannels-DV62inJh.js +19 -0
- package/dist/nativeText-DMO8gLt7.js +806 -0
- package/dist/nativeText-m5AUINMq.js +806 -0
- package/dist/paramUtils-BYI4rwyL.js +2195 -0
- package/dist/schema.json +2253 -4201
- package/dist/style.css +1 -1
- package/dist/svg-CCu8kYy2.js +1158 -0
- package/dist/svg-yFj875aX.js +1158 -0
- package/dist/svgNumber-DNxESJQB.js +11 -0
- package/dist/twgl-full.module-DB2UdP1k.js +1849 -0
- package/dist/viewIdentityRegistry-BUdkK9zT.js +92 -0
- package/dist/{viewIdentityRegistry-CcQdL0Z8.js → viewIdentityRegistry-D3oPbN4O.js} +1 -1
- package/dist/viewRenderingContext-HtpqwS_x.js +120 -0
- package/dist/viewSelectors-DGCspRN3.js +4198 -0
- package/dist/viewSelectors-U5oLCLHV.js +4195 -0
- package/dist/{viewUtils-Cybv1tu-.js → viewUtils-Dg4RA40Q.js} +2405 -3983
- package/dist/warning-CpIIpk8e.js +7 -0
- package/dist/warning-DRGdb6BF.js +59 -0
- package/dist/webgl-Ci6ZhCCf.js +54 -0
- package/dist/webgl-Dpz8a3TI.js +53 -0
- package/package.json +5 -5
- package/dist/metadataChannels-fGQOmJj0.js +0 -6732
- package/dist/viewIdentityRegistry-EH5-Noyz.js +0 -6827
|
@@ -0,0 +1,2175 @@
|
|
|
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 ie(e, t, n) {
|
|
78
|
+
let r = Math.sign(e[0]);
|
|
79
|
+
return y(e, t, n, h(r), m(r));
|
|
80
|
+
}
|
|
81
|
+
function x(e, t, n, r) {
|
|
82
|
+
return y(e, t, n, _(r), _(1 / r));
|
|
83
|
+
}
|
|
84
|
+
function ae(e, t, n, r) {
|
|
85
|
+
return y(e, t, n, ee(r), g(r));
|
|
86
|
+
}
|
|
87
|
+
function oe(e) {
|
|
88
|
+
return e == null ? [] : u(e) ? e : [e];
|
|
89
|
+
}
|
|
90
|
+
function se(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 ce(e) {
|
|
95
|
+
return typeof e == "function";
|
|
96
|
+
}
|
|
97
|
+
var le = "descending";
|
|
98
|
+
function ue(t, r, i) {
|
|
99
|
+
i ||= {}, r = oe(r) || [];
|
|
100
|
+
let a = [], o = [], s = {}, l = i.comparator || fe;
|
|
101
|
+
return oe(t).forEach((e, t) => {
|
|
102
|
+
e != null && (a.push(r[t] === le ? -1 : 1), o.push(e = ce(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 de = (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), fe = (e, t) => e.length === 1 ? pe(e[0], t[0]) : me(e, t, e.length), pe = (e, t) => function(n, r) {
|
|
106
|
+
return de(e(n), e(r)) * t;
|
|
107
|
+
}, me = (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 = de(a(r), a(i));
|
|
110
|
+
return o * t[s];
|
|
111
|
+
});
|
|
112
|
+
function he(e) {
|
|
113
|
+
return typeof e == "boolean";
|
|
114
|
+
}
|
|
115
|
+
function ge(e) {
|
|
116
|
+
return typeof e == "number";
|
|
117
|
+
}
|
|
118
|
+
function _e(e) {
|
|
119
|
+
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
120
|
+
}
|
|
121
|
+
function S(e) {
|
|
122
|
+
return typeof e == "string";
|
|
123
|
+
}
|
|
124
|
+
function ve(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 ye(e) {
|
|
129
|
+
return e && f(e) - e[0] || 0;
|
|
130
|
+
}
|
|
131
|
+
function be(e) {
|
|
132
|
+
return u(e) ? `[${e.map((e) => e === null ? "null" : be(e))}]` : d(e) || S(e) ? JSON.stringify(e).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029") : e;
|
|
133
|
+
}
|
|
134
|
+
function xe(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 Se(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 Ce(e) {
|
|
149
|
+
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
|
|
150
|
+
}
|
|
151
|
+
function we(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 Te(e) {
|
|
159
|
+
return e = we(Math.abs(e)), e ? e[1] : NaN;
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region ../../node_modules/d3-format/src/formatGroup.js
|
|
163
|
+
function Ee(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 De(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 Oe = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
181
|
+
function ke(e) {
|
|
182
|
+
if (!(t = Oe.exec(e))) throw Error("invalid format: " + e);
|
|
183
|
+
var t;
|
|
184
|
+
return new Ae({
|
|
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
|
+
ke.prototype = Ae.prototype;
|
|
198
|
+
function Ae(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
|
+
Ae.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 je(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 Me;
|
|
224
|
+
function Ne(e, t) {
|
|
225
|
+
var n = we(e, t);
|
|
226
|
+
if (!n) return Me = void 0, e.toPrecision(t);
|
|
227
|
+
var r = n[0], i = n[1], a = i - (Me = 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") + we(e, Math.max(0, t + a - 1))[0];
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region ../../node_modules/d3-format/src/formatRounded.js
|
|
232
|
+
function Pe(e, t) {
|
|
233
|
+
var n = we(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 Fe = {
|
|
241
|
+
"%": (e, t) => (e * 100).toFixed(t),
|
|
242
|
+
b: (e) => Math.round(e).toString(2),
|
|
243
|
+
c: (e) => e + "",
|
|
244
|
+
d: Ce,
|
|
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) => Pe(e * 100, t),
|
|
250
|
+
r: Pe,
|
|
251
|
+
s: Ne,
|
|
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 Ie(e) {
|
|
258
|
+
return e;
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region ../../node_modules/d3-format/src/locale.js
|
|
262
|
+
var Le = Array.prototype.map, Re = [
|
|
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 ze(e) {
|
|
282
|
+
var t = e.grouping === void 0 || e.thousands === void 0 ? Ie : Ee(Le.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 ? Ie : De(Le.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 = ke(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") : Fe[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 = Fe[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 = je(e)), b && +e == 0 && f !== "+" && (b = !1), n = (b ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (v === "s" && !isNaN(e) && Me !== void 0 ? Re[8 + Me / 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 ie = n.length + e.length + r.length, x = ie < h ? Array(h - ie + 1).join(u) : "";
|
|
304
|
+
switch (ee && m && (e = t(x + e, x.length ? h - r.length : Infinity), x = ""), d) {
|
|
305
|
+
case "<":
|
|
306
|
+
e = n + e + r + x;
|
|
307
|
+
break;
|
|
308
|
+
case "=":
|
|
309
|
+
e = n + x + e + r;
|
|
310
|
+
break;
|
|
311
|
+
case "^":
|
|
312
|
+
e = x.slice(0, ie = x.length >> 1) + n + e + r + x.slice(ie);
|
|
313
|
+
break;
|
|
314
|
+
default:
|
|
315
|
+
e = x + 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(Te(t) / 3))) * 3, r = 10 ** -n, i = l((e = ke(e), e.type = "f", e), { suffix: Re[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 Be, Ve, He;
|
|
338
|
+
Ue({
|
|
339
|
+
thousands: ",",
|
|
340
|
+
grouping: [3],
|
|
341
|
+
currency: ["$", ""]
|
|
342
|
+
});
|
|
343
|
+
function Ue(e) {
|
|
344
|
+
return Be = ze(e), Ve = Be.format, He = Be.formatPrefix, Be;
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region ../core/src/data/flowNode.js
|
|
348
|
+
var We = 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: Ge(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", Se(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
|
+
${Se(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 Ge(e, t) {
|
|
494
|
+
if ("view" in e) return e.view;
|
|
495
|
+
if (t && "getPathString" in t) return t;
|
|
496
|
+
}
|
|
497
|
+
function Ke(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 qe(e) {
|
|
506
|
+
return e.type == "file";
|
|
507
|
+
}
|
|
508
|
+
function Je(e) {
|
|
509
|
+
return e.type == "facet";
|
|
510
|
+
}
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region ../core/src/ruler/rulerValue.js
|
|
513
|
+
function Ye(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 C(e) {
|
|
524
|
+
return typeof e == "object" && !!e && "expr" in e && S(e.expr);
|
|
525
|
+
}
|
|
526
|
+
function Xe(e) {
|
|
527
|
+
if (C(e)) throw Error("ExprRef " + JSON.stringify(e) + " not allowed here. Expected a scalar value.");
|
|
528
|
+
return e;
|
|
529
|
+
}
|
|
530
|
+
function Ze(e) {
|
|
531
|
+
return ("expr" in e || "bind" in e) && !("select" in e) && !("ruler" in e);
|
|
532
|
+
}
|
|
533
|
+
function Qe(e) {
|
|
534
|
+
return !("expr" in e || "bind" in e) && "select" in e;
|
|
535
|
+
}
|
|
536
|
+
function $e(e) {
|
|
537
|
+
return !("expr" in e || "bind" in e || "select" in e) && "ruler" in e;
|
|
538
|
+
}
|
|
539
|
+
function et(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 tt(e, t, n) {
|
|
544
|
+
if ("select" in e) {
|
|
545
|
+
let t = Br(e.select);
|
|
546
|
+
if (Vr(t)) return t.toggle ? Nr() : Mr(null);
|
|
547
|
+
if (Hr(t)) {
|
|
548
|
+
if (!t.encodings) throw Error("Interval selection \"" + e.name + "\" must have encodings defined!");
|
|
549
|
+
return Pr(t.encodings);
|
|
550
|
+
}
|
|
551
|
+
throw Error("Unknown selection config for parameter \"" + e.name + "\".");
|
|
552
|
+
}
|
|
553
|
+
if ("ruler" in e) return Ye(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 nt(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 (C(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 rt(e, t, n, r) {
|
|
609
|
+
if (!C(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 it(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 at = class extends We {
|
|
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 (C(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
|
+
}, w = "__uniqueId", ot = 1e4, st = [null], ct = class extends at {
|
|
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[w] = this.#e(), this._propagate(e);
|
|
665
|
+
}
|
|
666
|
+
#e() {
|
|
667
|
+
return ++this._id % 1e4 == 0 && (this._id = this.#t() * ot), this._id;
|
|
668
|
+
}
|
|
669
|
+
#t() {
|
|
670
|
+
return this._usedBlocks < this._blocks.length ? this._blocks[this._usedBlocks++] : this.#n();
|
|
671
|
+
}
|
|
672
|
+
#n() {
|
|
673
|
+
let e = st.length;
|
|
674
|
+
return st[e] = this, this._blocks.push(e), this._usedBlocks++, e;
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
//#endregion
|
|
678
|
+
//#region ../core/src/utils/field.js
|
|
679
|
+
function lt(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 || ut(e, t);
|
|
690
|
+
}), [t], n) : c(t);
|
|
691
|
+
}
|
|
692
|
+
function ut(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 T(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 dt(e) {
|
|
706
|
+
return e.length === 1 ? ft(e[0]) : pt(e);
|
|
707
|
+
}
|
|
708
|
+
var ft = (e) => function(t) {
|
|
709
|
+
return t[e];
|
|
710
|
+
}, pt = (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 E(e) {
|
|
720
|
+
throw Error(e);
|
|
721
|
+
}
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region ../../node_modules/vega-util/build/splitAccessPath.js
|
|
724
|
+
function mt(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 || E("Access path missing open bracket: " + e), i > 0 && l(), i = 0, o = s + 1);
|
|
734
|
+
return i && E("Access path missing closing bracket: " + e), r && E("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 ht(e, t, n) {
|
|
739
|
+
let r = mt(e), i = r.length === 1 ? r[0] : e;
|
|
740
|
+
return T((n && n.get || dt)(r), [i], t || i);
|
|
741
|
+
}
|
|
742
|
+
ht("id");
|
|
743
|
+
var gt = T((e) => e, [], "identity");
|
|
744
|
+
T(() => 0, [], "zero"), T(() => 1, [], "one"), T(() => !0, [], "true"), T(() => !1, [], "false");
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region ../../node_modules/vega-util/build/interpreter.js
|
|
747
|
+
var _t = /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(Object.prototype).filter((e) => typeof Object.prototype[e] == "function"), "__proto__"]), vt = Array.isArray;
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region ../../node_modules/vega-util/build/isObject.js
|
|
750
|
+
function yt(e) {
|
|
751
|
+
return e === Object(e);
|
|
752
|
+
}
|
|
753
|
+
//#endregion
|
|
754
|
+
//#region ../../node_modules/vega-util/build/array.js
|
|
755
|
+
function bt(e) {
|
|
756
|
+
return e == null ? [] : vt(e) ? e : [e];
|
|
757
|
+
}
|
|
758
|
+
//#endregion
|
|
759
|
+
//#region ../../node_modules/vega-util/build/isFunction.js
|
|
760
|
+
function xt(e) {
|
|
761
|
+
return typeof e == "function";
|
|
762
|
+
}
|
|
763
|
+
//#endregion
|
|
764
|
+
//#region ../../node_modules/vega-util/build/hasOwnProperty.js
|
|
765
|
+
function D(e, t) {
|
|
766
|
+
return Object.hasOwn(e, t);
|
|
767
|
+
}
|
|
768
|
+
//#endregion
|
|
769
|
+
//#region ../../node_modules/vega-util/build/isString.js
|
|
770
|
+
function St(e) {
|
|
771
|
+
return typeof e == "string";
|
|
772
|
+
}
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region ../../node_modules/vega-util/build/stringValue.js
|
|
775
|
+
function Ct(e) {
|
|
776
|
+
return vt(e) ? `[${e.map((e) => e === null ? "null" : Ct(e))}]` : yt(e) || St(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 wt(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 Tt = "RawCode", Et = "Literal", Dt = "Property", Ot = "Identifier", kt = "ArrayExpression", At = "BinaryExpression", jt = "CallExpression", Mt = "ConditionalExpression", Nt = "LogicalExpression", Pt = "MemberExpression", Ft = "ObjectExpression", It = "UnaryExpression";
|
|
788
|
+
function O(e) {
|
|
789
|
+
this.type = e;
|
|
790
|
+
}
|
|
791
|
+
O.prototype.visit = function(e) {
|
|
792
|
+
let t, n, r;
|
|
793
|
+
if (e(this)) return 1;
|
|
794
|
+
for (t = Lt(this), n = 0, r = t.length; n < r; ++n) if (t[n].visit(e)) return 1;
|
|
795
|
+
};
|
|
796
|
+
function Lt(e) {
|
|
797
|
+
switch (e.type) {
|
|
798
|
+
case kt: return e.elements;
|
|
799
|
+
case At:
|
|
800
|
+
case Nt: return [e.left, e.right];
|
|
801
|
+
case jt: return [e.callee].concat(e.arguments);
|
|
802
|
+
case Mt: return [
|
|
803
|
+
e.test,
|
|
804
|
+
e.consequent,
|
|
805
|
+
e.alternate
|
|
806
|
+
];
|
|
807
|
+
case Pt: return [e.object, e.property];
|
|
808
|
+
case Ft: return e.properties;
|
|
809
|
+
case Dt: return [e.key, e.value];
|
|
810
|
+
case It: return [e.argument];
|
|
811
|
+
case Ot:
|
|
812
|
+
case Et:
|
|
813
|
+
case Tt:
|
|
814
|
+
default: return [];
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
var k, A, j, M, N, Rt = 1, P = 2, F = 3, I = 4, zt = 5, L = 6, R = 7, z = 8, Bt = 9;
|
|
818
|
+
k = {}, k[Rt] = "Boolean", k[P] = "<end>", k[F] = "Identifier", k[I] = "Keyword", k[zt] = "Null", k[L] = "Numeric", k[R] = "Punctuator", k[z] = "String", k[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", H = "Disabled.", cn = /* @__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]"), ln = /* @__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 un(e, t) {
|
|
821
|
+
/* istanbul ignore next */
|
|
822
|
+
if (!e) throw Error("ASSERT: " + t);
|
|
823
|
+
}
|
|
824
|
+
function U(e) {
|
|
825
|
+
return e >= 48 && e <= 57;
|
|
826
|
+
}
|
|
827
|
+
function dn(e) {
|
|
828
|
+
return "0123456789abcdefABCDEF".includes(e);
|
|
829
|
+
}
|
|
830
|
+
function W(e) {
|
|
831
|
+
return "01234567".includes(e);
|
|
832
|
+
}
|
|
833
|
+
function fn(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 G(e) {
|
|
855
|
+
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
856
|
+
}
|
|
857
|
+
function K(e) {
|
|
858
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 92 || e >= 128 && cn.test(String.fromCharCode(e));
|
|
859
|
+
}
|
|
860
|
+
function pn(e) {
|
|
861
|
+
return e === 36 || e === 95 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 48 && e <= 57 || e === 92 || e >= 128 && ln.test(String.fromCharCode(e));
|
|
862
|
+
}
|
|
863
|
+
var mn = {
|
|
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 hn() {
|
|
908
|
+
for (; j < M;) {
|
|
909
|
+
let e = A.charCodeAt(j);
|
|
910
|
+
if (fn(e) || G(e)) ++j;
|
|
911
|
+
else break;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
function gn(e) {
|
|
915
|
+
var t, n, r, i = 0;
|
|
916
|
+
for (n = e === "u" ? 4 : 2, t = 0; t < n; ++t) j < M && dn(A[j]) ? (r = A[j++], i = i * 16 + "0123456789abcdef".indexOf(r.toLowerCase())) : Y({}, B, V);
|
|
917
|
+
return String.fromCharCode(i);
|
|
918
|
+
}
|
|
919
|
+
function _n() {
|
|
920
|
+
var e = A[j], t = 0, n, r;
|
|
921
|
+
for (e === "}" && Y({}, B, V); j < M && (e = A[j++], dn(e));) t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
|
|
922
|
+
return (t > 1114111 || e !== "}") && Y({}, B, V), t <= 65535 ? String.fromCharCode(t) : (n = (t - 65536 >> 10) + 55296, r = (t - 65536 & 1023) + 56320, String.fromCharCode(n, r));
|
|
923
|
+
}
|
|
924
|
+
function vn() {
|
|
925
|
+
var e = A.charCodeAt(j++), t = String.fromCharCode(e);
|
|
926
|
+
for (e === 92 && (A.charCodeAt(j) !== 117 && Y({}, B, V), ++j, e = gn("u"), (!e || e === "\\" || !K(e.charCodeAt(0))) && Y({}, B, V), t = e); j < M && (e = A.charCodeAt(j), pn(e));) ++j, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), A.charCodeAt(j) !== 117 && Y({}, B, V), ++j, e = gn("u"), (!e || e === "\\" || !pn(e.charCodeAt(0))) && Y({}, B, V), t += e);
|
|
927
|
+
return t;
|
|
928
|
+
}
|
|
929
|
+
function yn() {
|
|
930
|
+
for (var e = j++, t; j < M;) {
|
|
931
|
+
if (t = A.charCodeAt(j), t === 92) return j = e, vn();
|
|
932
|
+
if (pn(t)) ++j;
|
|
933
|
+
else break;
|
|
934
|
+
}
|
|
935
|
+
return A.slice(e, j);
|
|
936
|
+
}
|
|
937
|
+
function bn() {
|
|
938
|
+
var e = j, t = A.charCodeAt(j) === 92 ? vn() : yn();
|
|
939
|
+
return {
|
|
940
|
+
type: t.length === 1 ? F : mn.hasOwnProperty(t) ? I : t === "null" ? zt : t === "true" || t === "false" ? Rt : F,
|
|
941
|
+
value: t,
|
|
942
|
+
start: e,
|
|
943
|
+
end: j
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
function xn() {
|
|
947
|
+
var e = j, t = A.charCodeAt(j), n, r = A[j], 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 ++j, {
|
|
961
|
+
type: R,
|
|
962
|
+
value: String.fromCharCode(t),
|
|
963
|
+
start: e,
|
|
964
|
+
end: j
|
|
965
|
+
};
|
|
966
|
+
default: if (n = A.charCodeAt(j + 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 j += 2, {
|
|
977
|
+
type: R,
|
|
978
|
+
value: String.fromCharCode(t) + String.fromCharCode(n),
|
|
979
|
+
start: e,
|
|
980
|
+
end: j
|
|
981
|
+
};
|
|
982
|
+
case 33:
|
|
983
|
+
case 61: return j += 2, A.charCodeAt(j) === 61 && ++j, {
|
|
984
|
+
type: R,
|
|
985
|
+
value: A.slice(e, j),
|
|
986
|
+
start: e,
|
|
987
|
+
end: j
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
if (o = A.substr(j, 4), o === ">>>=") return j += 4, {
|
|
992
|
+
type: R,
|
|
993
|
+
value: o,
|
|
994
|
+
start: e,
|
|
995
|
+
end: j
|
|
996
|
+
};
|
|
997
|
+
if (a = o.substr(0, 3), a === ">>>" || a === "<<=" || a === ">>=") return j += 3, {
|
|
998
|
+
type: R,
|
|
999
|
+
value: a,
|
|
1000
|
+
start: e,
|
|
1001
|
+
end: j
|
|
1002
|
+
};
|
|
1003
|
+
if (i = a.substr(0, 2), r === i[1] && "+-<>&|".includes(r) || i === "=>") return j += 2, {
|
|
1004
|
+
type: R,
|
|
1005
|
+
value: i,
|
|
1006
|
+
start: e,
|
|
1007
|
+
end: j
|
|
1008
|
+
};
|
|
1009
|
+
if (i === "//" && Y({}, B, V), "<>=!+-*%&|^/".includes(r)) return ++j, {
|
|
1010
|
+
type: R,
|
|
1011
|
+
value: r,
|
|
1012
|
+
start: e,
|
|
1013
|
+
end: j
|
|
1014
|
+
};
|
|
1015
|
+
Y({}, B, V);
|
|
1016
|
+
}
|
|
1017
|
+
function Sn(e) {
|
|
1018
|
+
let t = "";
|
|
1019
|
+
for (; j < M && dn(A[j]);) t += A[j++];
|
|
1020
|
+
return t.length === 0 && Y({}, B, V), K(A.charCodeAt(j)) && Y({}, B, V), {
|
|
1021
|
+
type: L,
|
|
1022
|
+
value: parseInt("0x" + t, 16),
|
|
1023
|
+
start: e,
|
|
1024
|
+
end: j
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
function Cn(e) {
|
|
1028
|
+
let t = "0" + A[j++];
|
|
1029
|
+
for (; j < M && W(A[j]);) t += A[j++];
|
|
1030
|
+
return (K(A.charCodeAt(j)) || U(A.charCodeAt(j))) && Y({}, B, V), {
|
|
1031
|
+
type: L,
|
|
1032
|
+
value: parseInt(t, 8),
|
|
1033
|
+
octal: !0,
|
|
1034
|
+
start: e,
|
|
1035
|
+
end: j
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
function wn() {
|
|
1039
|
+
var e, t, n = A[j];
|
|
1040
|
+
if (un(U(n.charCodeAt(0)) || n === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = j, e = "", n !== ".") {
|
|
1041
|
+
if (e = A[j++], n = A[j], e === "0") {
|
|
1042
|
+
if (n === "x" || n === "X") return ++j, Sn(t);
|
|
1043
|
+
if (W(n)) return Cn(t);
|
|
1044
|
+
n && U(n.charCodeAt(0)) && Y({}, B, V);
|
|
1045
|
+
}
|
|
1046
|
+
for (; U(A.charCodeAt(j));) e += A[j++];
|
|
1047
|
+
n = A[j];
|
|
1048
|
+
}
|
|
1049
|
+
if (n === ".") {
|
|
1050
|
+
for (e += A[j++]; U(A.charCodeAt(j));) e += A[j++];
|
|
1051
|
+
n = A[j];
|
|
1052
|
+
}
|
|
1053
|
+
if (n === "e" || n === "E") if (e += A[j++], n = A[j], (n === "+" || n === "-") && (e += A[j++]), U(A.charCodeAt(j))) for (; U(A.charCodeAt(j));) e += A[j++];
|
|
1054
|
+
else Y({}, B, V);
|
|
1055
|
+
return K(A.charCodeAt(j)) && Y({}, B, V), {
|
|
1056
|
+
type: L,
|
|
1057
|
+
value: parseFloat(e),
|
|
1058
|
+
start: t,
|
|
1059
|
+
end: j
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
function Tn() {
|
|
1063
|
+
var e = "", t, n, r, i, a = !1;
|
|
1064
|
+
for (t = A[j], un(t === "'" || t === "\"", "String literal must starts with a quote"), n = j, ++j; j < M;) if (r = A[j++], r === t) {
|
|
1065
|
+
t = "";
|
|
1066
|
+
break;
|
|
1067
|
+
} else if (r === "\\") if (r = A[j++], !r || !G(r.charCodeAt(0))) switch (r) {
|
|
1068
|
+
case "u":
|
|
1069
|
+
case "x":
|
|
1070
|
+
A[j] === "{" ? (++j, e += _n()) : e += gn(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
|
+
W(r) ? (i = "01234567".indexOf(r), i !== 0 && (a = !0), j < M && W(A[j]) && (a = !0, i = i * 8 + "01234567".indexOf(A[j++]), "0123".includes(r) && j < M && W(A[j]) && (i = i * 8 + "01234567".indexOf(A[j++]))), e += String.fromCharCode(i)) : e += r;
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
else r === "\r" && A[j] === "\n" && ++j;
|
|
1095
|
+
else if (G(r.charCodeAt(0))) break;
|
|
1096
|
+
else e += r;
|
|
1097
|
+
return t !== "" && Y({}, B, V), {
|
|
1098
|
+
type: z,
|
|
1099
|
+
value: e,
|
|
1100
|
+
octal: a,
|
|
1101
|
+
start: n,
|
|
1102
|
+
end: j
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
function En(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
|
+
Y({}, rn);
|
|
1110
|
+
}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
|
|
1111
|
+
try {
|
|
1112
|
+
new RegExp(n);
|
|
1113
|
+
} catch {
|
|
1114
|
+
Y({}, rn);
|
|
1115
|
+
}
|
|
1116
|
+
try {
|
|
1117
|
+
return new RegExp(e, t);
|
|
1118
|
+
} catch {
|
|
1119
|
+
return null;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
function Dn() {
|
|
1123
|
+
var e = A[j], t, n, r, i;
|
|
1124
|
+
for (un(e === "/", "Regular expression literal must start with a slash"), t = A[j++], n = !1, r = !1; j < M;) if (e = A[j++], t += e, e === "\\") e = A[j++], G(e.charCodeAt(0)) && Y({}, an), t += e;
|
|
1125
|
+
else if (G(e.charCodeAt(0))) Y({}, 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 || Y({}, an), i = t.substr(1, t.length - 2), {
|
|
1132
|
+
value: i,
|
|
1133
|
+
literal: t
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
function On() {
|
|
1137
|
+
for (var e, t = "", n = ""; j < M && (e = A[j], pn(e.charCodeAt(0)));) ++j, e === "\\" && j < M ? Y({}, B, V) : (n += e, t += e);
|
|
1138
|
+
return n.search(/[^gimuy]/g) >= 0 && Y({}, rn, n), {
|
|
1139
|
+
value: n,
|
|
1140
|
+
literal: t
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
function kn() {
|
|
1144
|
+
var e, t, n, r;
|
|
1145
|
+
return N = null, hn(), e = j, t = Dn(), n = On(), r = En(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: j
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
function An(e) {
|
|
1157
|
+
return e.type === F || e.type === I || e.type === Rt || e.type === zt;
|
|
1158
|
+
}
|
|
1159
|
+
function jn() {
|
|
1160
|
+
if (hn(), j >= M) return {
|
|
1161
|
+
type: P,
|
|
1162
|
+
start: j,
|
|
1163
|
+
end: j
|
|
1164
|
+
};
|
|
1165
|
+
let e = A.charCodeAt(j);
|
|
1166
|
+
return K(e) ? bn() : e === 40 || e === 41 || e === 59 ? xn() : e === 39 || e === 34 ? Tn() : e === 46 ? U(A.charCodeAt(j + 1)) ? wn() : xn() : U(e) ? wn() : xn();
|
|
1167
|
+
}
|
|
1168
|
+
function q() {
|
|
1169
|
+
let e = N;
|
|
1170
|
+
return j = e.end, N = jn(), j = e.end, e;
|
|
1171
|
+
}
|
|
1172
|
+
function Mn() {
|
|
1173
|
+
let e = j;
|
|
1174
|
+
N = jn(), j = e;
|
|
1175
|
+
}
|
|
1176
|
+
function Nn(e) {
|
|
1177
|
+
let t = new O(Vt);
|
|
1178
|
+
return t.elements = e, t;
|
|
1179
|
+
}
|
|
1180
|
+
function Pn(e, t, n) {
|
|
1181
|
+
let r = new O(e === "||" || e === "&&" ? qt : Ht);
|
|
1182
|
+
return r.operator = e, r.left = t, r.right = n, r;
|
|
1183
|
+
}
|
|
1184
|
+
function Fn(e, t) {
|
|
1185
|
+
let n = new O(Ut);
|
|
1186
|
+
return n.callee = e, n.arguments = t, n;
|
|
1187
|
+
}
|
|
1188
|
+
function In(e, t, n) {
|
|
1189
|
+
let r = new O(Wt);
|
|
1190
|
+
return r.test = e, r.consequent = t, r.alternate = n, r;
|
|
1191
|
+
}
|
|
1192
|
+
function Ln(e) {
|
|
1193
|
+
let t = new O(Gt);
|
|
1194
|
+
return t.name = e, t;
|
|
1195
|
+
}
|
|
1196
|
+
function J(e) {
|
|
1197
|
+
let t = new O(Kt);
|
|
1198
|
+
return t.value = e.value, t.raw = A.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
|
|
1199
|
+
}
|
|
1200
|
+
function Rn(e, t, n) {
|
|
1201
|
+
let r = new O(Jt);
|
|
1202
|
+
return r.computed = e === "[", r.object = t, r.property = n, r.computed || (n.member = !0), r;
|
|
1203
|
+
}
|
|
1204
|
+
function zn(e) {
|
|
1205
|
+
let t = new O(Yt);
|
|
1206
|
+
return t.properties = e, t;
|
|
1207
|
+
}
|
|
1208
|
+
function Bn(e, t, n) {
|
|
1209
|
+
let r = new O(Xt);
|
|
1210
|
+
return r.key = t, r.value = n, r.kind = e, r;
|
|
1211
|
+
}
|
|
1212
|
+
function Vn(e, t) {
|
|
1213
|
+
let n = new O(Zt);
|
|
1214
|
+
return n.operator = e, n.argument = t, n.prefix = !0, n;
|
|
1215
|
+
}
|
|
1216
|
+
function Y(e, t) {
|
|
1217
|
+
var n, r = Array.prototype.slice.call(arguments, 2), i = t.replace(/%(\d)/g, (e, t) => (un(t < r.length, "Message reference must be in range"), r[t]));
|
|
1218
|
+
throw n = Error(i), n.index = j, n.description = i, n;
|
|
1219
|
+
}
|
|
1220
|
+
function Hn(e) {
|
|
1221
|
+
e.type === P && Y(e, nn), e.type === L && Y(e, Qt), e.type === z && Y(e, $t), e.type === F && Y(e, en), e.type === I && Y(e, tn), Y(e, B, e.value);
|
|
1222
|
+
}
|
|
1223
|
+
function X(e) {
|
|
1224
|
+
let t = q();
|
|
1225
|
+
(t.type !== R || t.value !== e) && Hn(t);
|
|
1226
|
+
}
|
|
1227
|
+
function Z(e) {
|
|
1228
|
+
return N.type === R && N.value === e;
|
|
1229
|
+
}
|
|
1230
|
+
function Un(e) {
|
|
1231
|
+
return N.type === I && N.value === e;
|
|
1232
|
+
}
|
|
1233
|
+
function Wn() {
|
|
1234
|
+
let e = [];
|
|
1235
|
+
for (j = N.start, X("["); !Z("]");) Z(",") ? (q(), e.push(null)) : (e.push(Q()), Z("]") || X(","));
|
|
1236
|
+
return q(), Nn(e);
|
|
1237
|
+
}
|
|
1238
|
+
function Gn() {
|
|
1239
|
+
j = N.start;
|
|
1240
|
+
let e = q();
|
|
1241
|
+
return e.type === z || e.type === L ? (e.octal && Y(e, on), J(e)) : Ln(e.value);
|
|
1242
|
+
}
|
|
1243
|
+
function Kn() {
|
|
1244
|
+
var e, t, n, r;
|
|
1245
|
+
if (j = N.start, e = N, e.type === F) return n = Gn(), X(":"), r = Q(), Bn("init", n, r);
|
|
1246
|
+
if (e.type === P || e.type === R) Hn(e);
|
|
1247
|
+
else return t = Gn(), X(":"), r = Q(), Bn("init", t, r);
|
|
1248
|
+
}
|
|
1249
|
+
function qn() {
|
|
1250
|
+
var e = [], t, n, r, i = {}, a = String;
|
|
1251
|
+
for (j = N.start, X("{"); !Z("}");) t = Kn(), n = t.key.type === Gt ? t.key.name : a(t.key.value), r = "$" + n, Object.prototype.hasOwnProperty.call(i, r) ? Y({}, sn) : i[r] = !0, e.push(t), Z("}") || X(",");
|
|
1252
|
+
return X("}"), zn(e);
|
|
1253
|
+
}
|
|
1254
|
+
function Jn() {
|
|
1255
|
+
X("(");
|
|
1256
|
+
let e = or();
|
|
1257
|
+
return X(")"), e;
|
|
1258
|
+
}
|
|
1259
|
+
var Yn = { if: 1 };
|
|
1260
|
+
function Xn() {
|
|
1261
|
+
var e, t, n;
|
|
1262
|
+
if (Z("(")) return Jn();
|
|
1263
|
+
if (Z("[")) return Wn();
|
|
1264
|
+
if (Z("{")) return qn();
|
|
1265
|
+
if (e = N.type, j = N.start, e === F || Yn[N.value]) n = Ln(q().value);
|
|
1266
|
+
else if (e === z || e === L) N.octal && Y(N, on), n = J(q());
|
|
1267
|
+
else if (e === I) throw Error(H);
|
|
1268
|
+
else e === Rt ? (t = q(), t.value = t.value === "true", n = J(t)) : e === zt ? (t = q(), t.value = null, n = J(t)) : Z("/") || Z("/=") ? (n = J(kn()), Mn()) : Hn(q());
|
|
1269
|
+
return n;
|
|
1270
|
+
}
|
|
1271
|
+
function Zn() {
|
|
1272
|
+
let e = [];
|
|
1273
|
+
if (X("("), !Z(")")) for (; j < M && (e.push(Q()), !Z(")"));) X(",");
|
|
1274
|
+
return X(")"), e;
|
|
1275
|
+
}
|
|
1276
|
+
function Qn() {
|
|
1277
|
+
j = N.start;
|
|
1278
|
+
let e = q();
|
|
1279
|
+
return An(e) || Hn(e), Ln(e.value);
|
|
1280
|
+
}
|
|
1281
|
+
function $n() {
|
|
1282
|
+
return X("."), Qn();
|
|
1283
|
+
}
|
|
1284
|
+
function er() {
|
|
1285
|
+
X("[");
|
|
1286
|
+
let e = or();
|
|
1287
|
+
return X("]"), e;
|
|
1288
|
+
}
|
|
1289
|
+
function tr() {
|
|
1290
|
+
for (var e = Xn(), t, n;;) if (Z(".")) n = $n(), e = Rn(".", e, n);
|
|
1291
|
+
else if (Z("(")) t = Zn(), e = Fn(e, t);
|
|
1292
|
+
else if (Z("[")) n = er(), e = Rn("[", e, n);
|
|
1293
|
+
else break;
|
|
1294
|
+
return e;
|
|
1295
|
+
}
|
|
1296
|
+
function nr() {
|
|
1297
|
+
let e = tr();
|
|
1298
|
+
if (N.type === R && (Z("++") || Z("--"))) throw Error(H);
|
|
1299
|
+
return e;
|
|
1300
|
+
}
|
|
1301
|
+
function rr() {
|
|
1302
|
+
var e, t;
|
|
1303
|
+
if (N.type !== R && N.type !== I) t = nr();
|
|
1304
|
+
else if (Z("++") || Z("--")) throw Error(H);
|
|
1305
|
+
else if (Z("+") || Z("-") || Z("~") || Z("!")) e = q(), t = rr(), t = Vn(e.value, t);
|
|
1306
|
+
else if (Un("delete") || Un("void") || Un("typeof")) throw Error(H);
|
|
1307
|
+
else t = nr();
|
|
1308
|
+
return t;
|
|
1309
|
+
}
|
|
1310
|
+
function ir(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 ar() {
|
|
1361
|
+
var e = N, t, n, r, i, a, o, s, c = rr(), l;
|
|
1362
|
+
if (r = N, i = ir(r), i === 0) return c;
|
|
1363
|
+
for (r.prec = i, q(), t = [e, N], o = rr(), a = [
|
|
1364
|
+
c,
|
|
1365
|
+
r,
|
|
1366
|
+
o
|
|
1367
|
+
]; (i = ir(N)) > 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 = Pn(s, c, o), a.push(n);
|
|
1369
|
+
r = q(), r.prec = i, a.push(r), t.push(N), n = rr(), a.push(n);
|
|
1370
|
+
}
|
|
1371
|
+
for (l = a.length - 1, n = a[l], t.pop(); l > 1;) t.pop(), n = Pn(a[l - 1].value, a[l - 2], n), l -= 2;
|
|
1372
|
+
return n;
|
|
1373
|
+
}
|
|
1374
|
+
function Q() {
|
|
1375
|
+
var e = ar(), t, n;
|
|
1376
|
+
return Z("?") && (q(), t = Q(), X(":"), n = Q(), e = In(e, t, n)), e;
|
|
1377
|
+
}
|
|
1378
|
+
function or() {
|
|
1379
|
+
let e = Q();
|
|
1380
|
+
if (Z(",")) throw Error(H);
|
|
1381
|
+
return e;
|
|
1382
|
+
}
|
|
1383
|
+
function sr(e) {
|
|
1384
|
+
A = e, j = 0, M = A.length, N = null, Mn();
|
|
1385
|
+
let t = or();
|
|
1386
|
+
if (N.type !== P) throw Error("Unexpect token after expression.");
|
|
1387
|
+
return t;
|
|
1388
|
+
}
|
|
1389
|
+
var cr = {
|
|
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 lr(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 && E("Missing arguments to clamp function."), t.length > 3 && E("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 && E("Missing arguments to if function."), t.length > 3 && E("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 ur(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 dr(e) {
|
|
1483
|
+
e ||= {};
|
|
1484
|
+
let t = e.allowed ? wt(e.allowed) : {}, n = e.forbidden ? wt(e.forbidden) : {}, r = e.constants || cr, i = (e.functions || lr)(d), a = e.globalvar, o = e.fieldvar, s = xt(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 (St(e)) return e;
|
|
1489
|
+
let t = f[e.type];
|
|
1490
|
+
return t ?? E("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 : D(n, i) ? E("Illegal identifier: " + i) : D(r, i) ? r[i] : D(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[ur(r)] = 1), t && --u, n + (t ? "." + r : "[" + r + "]");
|
|
1503
|
+
},
|
|
1504
|
+
CallExpression: (e) => {
|
|
1505
|
+
e.callee.type !== "Identifier" && E("Illegal callee type: " + e.callee.type);
|
|
1506
|
+
let t = e.callee.name, n = e.arguments, r = D(i, t) && i[t];
|
|
1507
|
+
return r || E("Unrecognized function: " + t), xt(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
|
+
_t.has(e) && E("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 fr(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 pr(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 mr(e, t, n) {
|
|
1550
|
+
return pr((n - e) / (t - e), 0, 1);
|
|
1551
|
+
}
|
|
1552
|
+
//#endregion
|
|
1553
|
+
//#region ../core/src/utils/expression.js
|
|
1554
|
+
function hr(e) {
|
|
1555
|
+
return u(e) || ArrayBuffer.isView(e) ? e : null;
|
|
1556
|
+
}
|
|
1557
|
+
function gr(e) {
|
|
1558
|
+
return hr(e) || (S(e) ? e : null);
|
|
1559
|
+
}
|
|
1560
|
+
var _r = {
|
|
1561
|
+
clamp: pr,
|
|
1562
|
+
format(e, t) {
|
|
1563
|
+
return Ve(t)(e);
|
|
1564
|
+
},
|
|
1565
|
+
join(e, t) {
|
|
1566
|
+
return hr(e).join(t);
|
|
1567
|
+
},
|
|
1568
|
+
indexof(e, t, n) {
|
|
1569
|
+
return gr(e).indexOf(t, n);
|
|
1570
|
+
},
|
|
1571
|
+
lastindexof(e, t, n) {
|
|
1572
|
+
return gr(e).lastIndexOf(t, n);
|
|
1573
|
+
},
|
|
1574
|
+
reverse(e) {
|
|
1575
|
+
return S(e) ? Array.from(e).reverse().join("") : hr(e).slice().reverse();
|
|
1576
|
+
},
|
|
1577
|
+
slice(e, t, n) {
|
|
1578
|
+
return gr(e).slice(t, n);
|
|
1579
|
+
},
|
|
1580
|
+
mapHasKey(e, t) {
|
|
1581
|
+
return e.has(t);
|
|
1582
|
+
},
|
|
1583
|
+
isArray: u,
|
|
1584
|
+
isBoolean: he,
|
|
1585
|
+
isDefined(e) {
|
|
1586
|
+
return e !== void 0;
|
|
1587
|
+
},
|
|
1588
|
+
isNumber: ge,
|
|
1589
|
+
isObject: d,
|
|
1590
|
+
isRegExp: _e,
|
|
1591
|
+
isString: S,
|
|
1592
|
+
isValid(e) {
|
|
1593
|
+
return e != null && e === e;
|
|
1594
|
+
},
|
|
1595
|
+
lerp: ve,
|
|
1596
|
+
linearstep: mr,
|
|
1597
|
+
replace(e, t, n) {
|
|
1598
|
+
return String(e).replace(t, n);
|
|
1599
|
+
},
|
|
1600
|
+
sort(e) {
|
|
1601
|
+
return hr(e).slice().sort(de);
|
|
1602
|
+
},
|
|
1603
|
+
center(e) {
|
|
1604
|
+
let t = hr(e);
|
|
1605
|
+
return (t[0] + t[t.length - 1]) / 2;
|
|
1606
|
+
},
|
|
1607
|
+
span(e) {
|
|
1608
|
+
return ye(e);
|
|
1609
|
+
},
|
|
1610
|
+
smoothstep: fr
|
|
1611
|
+
};
|
|
1612
|
+
function vr(e) {
|
|
1613
|
+
let t = !1, n = Er(e, {}, { resolveScaleResolution: () => (t = !0, { channel: "analysis" }) });
|
|
1614
|
+
return {
|
|
1615
|
+
usesScaleHelper: t,
|
|
1616
|
+
globals: n.globals
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
function yr(e, t) {
|
|
1620
|
+
let n = lr(e);
|
|
1621
|
+
for (let e in _r) 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) => br(e, t, r, n);
|
|
1630
|
+
return n;
|
|
1631
|
+
}
|
|
1632
|
+
function br(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 = xr(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 xr(e) {
|
|
1643
|
+
return e?.type === "Literal" && typeof e.value == "string" ? e.value : void 0;
|
|
1644
|
+
}
|
|
1645
|
+
function Sr(e, t) {
|
|
1646
|
+
let n = (n) => wr(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 Cr = /* @__PURE__ */ new WeakSet();
|
|
1660
|
+
function wr(e, t, n) {
|
|
1661
|
+
if (Cr.has(e)) throw Error(`Scale helper cycle detected while evaluating ${t}("${e.channel}").`);
|
|
1662
|
+
Cr.add(e);
|
|
1663
|
+
try {
|
|
1664
|
+
return n();
|
|
1665
|
+
} finally {
|
|
1666
|
+
Cr.delete(e);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
function Tr(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 Er(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 = Tr(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] = Sr(e, o), d;
|
|
1710
|
+
}
|
|
1711
|
+
}, s = dr({
|
|
1712
|
+
forbidden: [],
|
|
1713
|
+
allowed: ["datum", "undefined"],
|
|
1714
|
+
globalvar: "globalObject",
|
|
1715
|
+
fieldvar: "datum",
|
|
1716
|
+
functions: (e) => yr(e, o)
|
|
1717
|
+
})(sr(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(_r), 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 Dr = dr({
|
|
1729
|
+
forbidden: [],
|
|
1730
|
+
allowed: ["event"],
|
|
1731
|
+
globalvar: "globalObject"
|
|
1732
|
+
});
|
|
1733
|
+
function Or(e) {
|
|
1734
|
+
try {
|
|
1735
|
+
let t = Dr(sr(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 kr(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 Ar(e) {
|
|
1757
|
+
return e?.filter ? Or(e.filter) : () => !0;
|
|
1758
|
+
}
|
|
1759
|
+
function jr(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 Mr(e) {
|
|
1766
|
+
return {
|
|
1767
|
+
type: "single",
|
|
1768
|
+
datum: e,
|
|
1769
|
+
uniqueId: e?.[w]
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
function Nr(e) {
|
|
1773
|
+
return e ??= [], {
|
|
1774
|
+
type: "multi",
|
|
1775
|
+
data: new Map(e.map((e) => [e[w], e]))
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
function Pr(e) {
|
|
1779
|
+
return {
|
|
1780
|
+
type: "interval",
|
|
1781
|
+
intervals: Object.fromEntries(e.map((e) => [e, null]))
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
function Fr(e, { add: t, remove: n, toggle: r }) {
|
|
1785
|
+
let i = e.data;
|
|
1786
|
+
for (let e of t ?? []) i.set(e[w], e);
|
|
1787
|
+
for (let e of n ?? []) i.delete(e[w]);
|
|
1788
|
+
for (let e of r ?? []) {
|
|
1789
|
+
let t = e[w];
|
|
1790
|
+
i.has(t) ? i.delete(t) : i.set(t, e);
|
|
1791
|
+
}
|
|
1792
|
+
return {
|
|
1793
|
+
type: "multi",
|
|
1794
|
+
data: i
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1797
|
+
function Ir(e, t) {
|
|
1798
|
+
let n = !!(e.empty ?? !0), r = et(e.param), i = e.fields ?? {};
|
|
1799
|
+
if (Rr(t)) return `${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(w)}]`;
|
|
1800
|
+
if (zr(t)) return `${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(w)}])`;
|
|
1801
|
+
if (Lr(t)) {
|
|
1802
|
+
let a = Object.keys(t.intervals), o = Object.keys(i).filter(xi);
|
|
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 = ki(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 Lr(e) {
|
|
1813
|
+
return e.type === "interval";
|
|
1814
|
+
}
|
|
1815
|
+
function Rr(e) {
|
|
1816
|
+
return e.type === "single";
|
|
1817
|
+
}
|
|
1818
|
+
function zr(e) {
|
|
1819
|
+
return e.type === "multi";
|
|
1820
|
+
}
|
|
1821
|
+
function Br(e) {
|
|
1822
|
+
let t = typeof e == "string" ? { type: e } : { ...e };
|
|
1823
|
+
return t.on = t.on ? kr(t.on) : Vr(t) ? { type: "click" } : void 0, t.clear = t.clear === !1 ? void 0 : t.clear === !0 || t.clear == null ? { type: "dblclick" } : kr(t.clear), Vr(t) && t.on.type === "click" && (t.toggle = !0), t;
|
|
1824
|
+
}
|
|
1825
|
+
function Vr(e) {
|
|
1826
|
+
return e && e.type == "point";
|
|
1827
|
+
}
|
|
1828
|
+
function Hr(e) {
|
|
1829
|
+
return e && e.type == "interval";
|
|
1830
|
+
}
|
|
1831
|
+
function Ur(e) {
|
|
1832
|
+
return Object.values(e.intervals).some((e) => e && e.length === 2);
|
|
1833
|
+
}
|
|
1834
|
+
function Wr(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 Gr(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 = Jr(t), r.scaleChannel = ((li(t) && t.resolutionChannel) ?? (Ni(e) && e)) || void 0, r.scaleChannel !== void 0 && (r.domainKeyBase = Yr({
|
|
1844
|
+
scaleChannel: r.scaleChannel,
|
|
1845
|
+
source: qr(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 (C(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 ($(t)) try {
|
|
1859
|
+
return r(lt(t.field));
|
|
1860
|
+
} catch (e) {
|
|
1861
|
+
throw Error(`Invalid field definition: ${e.message}`, { cause: e });
|
|
1862
|
+
}
|
|
1863
|
+
else if (mi(t)) return r(n.createExpression(t.expr));
|
|
1864
|
+
else if (ci(t)) return i(t.datum);
|
|
1865
|
+
else if (si(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 Kr(e) {
|
|
1869
|
+
return e.scaleChannel !== void 0;
|
|
1870
|
+
}
|
|
1871
|
+
function qr(e) {
|
|
1872
|
+
if ($(e)) return {
|
|
1873
|
+
kind: "field",
|
|
1874
|
+
value: e.field
|
|
1875
|
+
};
|
|
1876
|
+
if (mi(e)) return {
|
|
1877
|
+
kind: "expr",
|
|
1878
|
+
value: e.expr
|
|
1879
|
+
};
|
|
1880
|
+
if (ci(e)) return {
|
|
1881
|
+
kind: "datum",
|
|
1882
|
+
value: e.datum
|
|
1883
|
+
};
|
|
1884
|
+
if (si(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 Jr(e) {
|
|
1891
|
+
let t = qr(e);
|
|
1892
|
+
return t.kind === "datum" || t.kind === "value" ? "constant|" + Qr(t.value) : t.kind + "|" + Zr(t);
|
|
1893
|
+
}
|
|
1894
|
+
function Yr({ 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 + "|" + Zr(t);
|
|
1897
|
+
return {
|
|
1898
|
+
domainKeyBase: r,
|
|
1899
|
+
domainKey: n ? n + "|" + r : void 0
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
function Xr(e, t) {
|
|
1903
|
+
let { domainKey: n, domainKeyBase: r } = Yr({
|
|
1904
|
+
scaleChannel: e.scaleChannel,
|
|
1905
|
+
source: qr(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 Zr(e) {
|
|
1912
|
+
switch (e.kind) {
|
|
1913
|
+
case "field":
|
|
1914
|
+
case "expr": return e.value;
|
|
1915
|
+
case "datum":
|
|
1916
|
+
case "value": return Qr(e.value);
|
|
1917
|
+
default: throw Error("Unknown domain key source.");
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
function Qr(e) {
|
|
1921
|
+
return C(e) ? "expr:" + e.expr : e === void 0 ? "undefined" : JSON.stringify(e);
|
|
1922
|
+
}
|
|
1923
|
+
//#endregion
|
|
1924
|
+
//#region ../core/src/encoder/encoder.js
|
|
1925
|
+
function $r(e, t, n, r) {
|
|
1926
|
+
let i, a = it(!1), o = () => {
|
|
1927
|
+
if (i) return i;
|
|
1928
|
+
let o = n.findValue(e);
|
|
1929
|
+
if (!o) return a;
|
|
1930
|
+
let s = {};
|
|
1931
|
+
if (Lr(o)) {
|
|
1932
|
+
let n = Object.keys(o.intervals);
|
|
1933
|
+
for (let r of n) {
|
|
1934
|
+
let n = t[r];
|
|
1935
|
+
if ($(n)) {
|
|
1936
|
+
s[r] = n.field;
|
|
1937
|
+
continue;
|
|
1938
|
+
} else if (n && "condition" in n) {
|
|
1939
|
+
let e = n.condition;
|
|
1940
|
+
if ($(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 = Ir({
|
|
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 ei(e, t, n, r) {
|
|
1962
|
+
let i = hi(t) || gi(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: Gr(e, t, r),
|
|
1966
|
+
predicate: s?.param ? $r(s.param, n, r, s.empty) : Object.assign(it(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 ti(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
|
+
ni(o) || (n[o] = ai(ei(o, a, t, e.paramRuntime), r));
|
|
1978
|
+
}
|
|
1979
|
+
return n;
|
|
1980
|
+
}
|
|
1981
|
+
function ni(e) {
|
|
1982
|
+
return e === "key" || e === "search" || e === "tooltip";
|
|
1983
|
+
}
|
|
1984
|
+
function ri(e) {
|
|
1985
|
+
return e.branches.map((e) => e.accessor);
|
|
1986
|
+
}
|
|
1987
|
+
function ii(e) {
|
|
1988
|
+
return e.branches.find((e) => !e.accessor.constant)?.accessor;
|
|
1989
|
+
}
|
|
1990
|
+
function ai(e, t) {
|
|
1991
|
+
if (e.length === 1) {
|
|
1992
|
+
let n = oi(e[0].accessor, t);
|
|
1993
|
+
return Object.assign(n, { branches: e });
|
|
1994
|
+
}
|
|
1995
|
+
let n = e.map((e) => e.predicate), r = e.map((e) => oi(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 oi(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: it(!0)
|
|
2014
|
+
}],
|
|
2015
|
+
channelDef: i
|
|
2016
|
+
});
|
|
2017
|
+
}
|
|
2018
|
+
function si(e) {
|
|
2019
|
+
return e && "value" in e;
|
|
2020
|
+
}
|
|
2021
|
+
function $(e) {
|
|
2022
|
+
return e && "field" in e;
|
|
2023
|
+
}
|
|
2024
|
+
function ci(e) {
|
|
2025
|
+
return e && "datum" in e;
|
|
2026
|
+
}
|
|
2027
|
+
function li(e) {
|
|
2028
|
+
return $(e) || ci(e) || mi(e) || pi(e);
|
|
2029
|
+
}
|
|
2030
|
+
function ui(e) {
|
|
2031
|
+
if (gi(e)) {
|
|
2032
|
+
let t = e.condition;
|
|
2033
|
+
return (Array.isArray(t) ? t : [t]).find((e) => li(e));
|
|
2034
|
+
} else if (li(e)) return e;
|
|
2035
|
+
}
|
|
2036
|
+
function di(e) {
|
|
2037
|
+
let t = e && ui(e);
|
|
2038
|
+
return t != null && t.type != "quantitative" && t.scale !== null;
|
|
2039
|
+
}
|
|
2040
|
+
function fi(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 = ui(n);
|
|
2045
|
+
if (e) return e;
|
|
2046
|
+
}
|
|
2047
|
+
throw Error("Not a channel def with scale!");
|
|
2048
|
+
}
|
|
2049
|
+
function pi(e) {
|
|
2050
|
+
return e && "chrom" in e;
|
|
2051
|
+
}
|
|
2052
|
+
function mi(e) {
|
|
2053
|
+
return e && "expr" in e;
|
|
2054
|
+
}
|
|
2055
|
+
function hi(e) {
|
|
2056
|
+
return ($(e) || ci(e)) && "condition" in e;
|
|
2057
|
+
}
|
|
2058
|
+
function gi(e) {
|
|
2059
|
+
return si(e) && "condition" in e;
|
|
2060
|
+
}
|
|
2061
|
+
var _i = ["x", "y"], vi = ["x2", "y2"], yi = ["xOffset", "yOffset"], bi = [..._i, ...vi];
|
|
2062
|
+
function xi(e) {
|
|
2063
|
+
return _i.includes(e);
|
|
2064
|
+
}
|
|
2065
|
+
function Si(e) {
|
|
2066
|
+
return bi.includes(e);
|
|
2067
|
+
}
|
|
2068
|
+
function Ci(e) {
|
|
2069
|
+
return yi.includes(e);
|
|
2070
|
+
}
|
|
2071
|
+
function wi(e) {
|
|
2072
|
+
return Ai(e) == "x" ? "xOffset" : "yOffset";
|
|
2073
|
+
}
|
|
2074
|
+
function Ti(e, t, n) {
|
|
2075
|
+
return t ?? (n ? 0 : e);
|
|
2076
|
+
}
|
|
2077
|
+
var Ei = {
|
|
2078
|
+
x: "x2",
|
|
2079
|
+
y: "y2"
|
|
2080
|
+
}, Di = Object.fromEntries(Object.entries(Ei).map((e) => [e[1], e[0]]));
|
|
2081
|
+
function Oi(e) {
|
|
2082
|
+
return e in Di;
|
|
2083
|
+
}
|
|
2084
|
+
function ki(e) {
|
|
2085
|
+
let t = Ei[e];
|
|
2086
|
+
if (t) return t;
|
|
2087
|
+
throw Error(`${e} has no secondary channel!`);
|
|
2088
|
+
}
|
|
2089
|
+
function Ai(e) {
|
|
2090
|
+
return Di[e] ?? e;
|
|
2091
|
+
}
|
|
2092
|
+
function ji(e) {
|
|
2093
|
+
return [
|
|
2094
|
+
"color",
|
|
2095
|
+
"fill",
|
|
2096
|
+
"stroke"
|
|
2097
|
+
].includes(Ai(e));
|
|
2098
|
+
}
|
|
2099
|
+
function Mi(e) {
|
|
2100
|
+
return ["shape", "direction"].includes(e);
|
|
2101
|
+
}
|
|
2102
|
+
function Ni(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 Pi(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 Fi(e) {
|
|
2149
|
+
if (!Mi(e)) throw Error("Not a discrete channel: " + e);
|
|
2150
|
+
let t = new Map(Pi(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 Ii(e, t) {
|
|
2160
|
+
return e.length == t.length && e.every((n, r) => e[r] === t[r]);
|
|
2161
|
+
}
|
|
2162
|
+
function Li(e) {
|
|
2163
|
+
return Array.isArray(e) ? e : e === void 0 ? [] : [e];
|
|
2164
|
+
}
|
|
2165
|
+
function Ri(e) {
|
|
2166
|
+
return e[e.length - 1];
|
|
2167
|
+
}
|
|
2168
|
+
function zi(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
|
+
export { wt as $, ie as $t, Gr as A, ke as At, zr as B, ce as Bt, Ci as C, Ye as Ct, si as D, qe as Dt, Oi as E, Je as Et, Nr as F, se as Ft, Fr as G, te as Gt, Rr as H, d as Ht, Mr as I, ue as It, jr as J, f as Jt, kr as K, ne as Kt, Ur as L, o as Lt, Kr as M, Se as Mt, Br as N, be as Nt, _i as O, Ve as Ot, Pr as P, t as Pt, pr as Q, b as Qt, Lr as R, u as Rt, di as S, Xe as St, xi as T, Ke as Tt, Ir as U, S as Ut, Vr as V, ge as Vt, Wr as W, ve as Wt, Er as X, s as Xt, vr as Y, ye as Yt, mr as Z, xe as Zt, ji as _, $e as _t, ti as a, yt as at, mi as b, rt as bt, Fi as c, ht as ct, wi as d, ct as dt, x as en, Ct as et, Ai as f, w as ft, pi as g, C as gt, Ni as h, tt as ht, Ii as i, bt as it, Xr as j, Te as jt, Ti as k, He as kt, ri as l, E as lt, li as m, nt as mt, zi as n, D as nt, ui as o, vt as ot, ki as p, at as pt, Ar as q, re as qt, Ri as r, xt as rt, fi as s, gt as st, Li as t, ae as tn, St as tt, ii as u, lt as ut, ci as v, Qe as vt, Si as w, We as wt, $ as x, et as xt, Mi as y, Ze as yt, Hr as z, he as zt };
|