@genome-spy/app 0.87.0 → 0.88.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-BZ1JCo1N.js → agentApi-BYFBKiRQ.js} +5365 -5080
- package/dist/agentApi.es.js +3160 -2909
- package/dist/agentShared.es.js +3 -3
- package/dist/{canvas2d-Cafq5v-N.js → canvas2d-BVQ7-2eJ.js} +68 -68
- package/dist/{canvas2d-B_PnIof-.js → canvas2d-D7SZK3xv.js} +39 -39
- package/dist/{clipOptions-H68pJyEZ.js → clipOptions-BWHr3aTa.js} +822 -768
- package/dist/{clipOptions-D6eh9T-_.js → clipOptions-DTMcB_9z.js} +547 -493
- package/dist/{debug-BGzgZmyk.js → debug-CVpoEOWx.js} +2 -2
- package/dist/{debug-UYKZLNh4.js → debug-DYAMZZKl.js} +2 -2
- package/dist/index.es.js +3390 -3410
- package/dist/index.js +397 -374
- package/dist/{indexer-Di57GyxX.js → indexer-CXjZDo2Q.js} +1 -1
- package/dist/{indexer-o6Hpg4nN.js → indexer-DAH_ruVn.js} +1 -1
- package/dist/{nativeText-DAjvkrzc.js → order-C5CzA37O.js} +271 -287
- package/dist/{nativeText-D9SoxpaD.js → order-DvY7KNcu.js} +271 -287
- package/dist/{rasterExport-DzldLv6E.js → rasterExport-BgZ98e6U.js} +1 -1
- package/dist/{rasterExport-IAbJwi8F.js → rasterExport-DEr8fOLm.js} +1 -1
- package/dist/{renderCanvas2D-yJ1IrDcX.js → renderCanvas2D-DtcJjqpB.js} +57 -50
- package/dist/{renderCanvas2D-BJ93Ptqj.js → renderCanvas2D-DxturTEW.js} +62 -55
- package/dist/schema.json +756 -96
- package/dist/{svg-DJuqHIyc.js → svg-CyrLfa9e.js} +364 -357
- package/dist/{svg-BRpl2Xub.js → svg-SDJMzL--.js} +338 -331
- package/dist/{svgRasterizer-PAoqLn1j.js → svgRasterizer-f7DJ3UO0.js} +1 -1
- package/dist/{svgRasterizer-CGZQ5njV.js → svgRasterizer-mWK7HTkx.js} +1 -1
- package/dist/{vega-scale-BGC53c22.js → vega-scale-CypF85iS.js} +801 -801
- package/dist/{vega-scale-DdW2NzQ3.js → vega-scale-DLKCwWRs.js} +65 -65
- package/dist/{viewIdentityRegistry-Dc2hXYsO.js → viewIdentityRegistry-DIDo44XQ.js} +1 -1
- package/dist/{viewIdentityRegistry-D4p067HU.js → viewIdentityRegistry-Dl-vMN9I.js} +1 -1
- package/dist/{viewSelectors-DNXnGwEW.js → viewSelectors-CymbZyE6.js} +375 -340
- package/dist/{viewSelectors-DYYlOt91.js → viewSelectors-DNiDip5e.js} +370 -335
- package/dist/{viewUtils-EdhZTPrJ.js → viewUtils-BrJLIj2o.js} +1750 -1716
- package/dist/{webgl-CdgNFlJk.js → webgl-CqTDifWM.js} +1196 -1164
- package/dist/{webgl-C53DwzVT.js → webgl-jaC2m0Zr.js} +1015 -983
- package/package.json +5 -5
- package/src/embedTypes.d.ts +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as e, Dt as t, Ot as n, Pt as r, b as i, ct as a, dn as o, fn as s, jt as c, k as l, o as u, sn as d, st as f, t as p, u as m, un as h, vn as ee } from "./clipOptions-DTMcB_9z.js";
|
|
2
2
|
import { a as g, n as te, r as ne, t as _ } from "./viewError-BiR9VCgL.js";
|
|
3
|
-
import { U as re, m as ie, rt as ae, y as v } from "./vega-scale-
|
|
3
|
+
import { U as re, m as ie, rt as ae, y as v } from "./vega-scale-DLKCwWRs.js";
|
|
4
|
+
import { t as oe } from "./warning-CpIIpk8e.js";
|
|
4
5
|
//#region ../core/src/view/layout/flexLayout.js
|
|
5
|
-
function
|
|
6
|
+
function se(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
|
|
6
7
|
n ||= 0, i ||= 0;
|
|
7
|
-
let o =
|
|
8
|
-
for (let t = 0; t < e.length; t++) s += o[t],
|
|
8
|
+
let o = he(e, t, n), s = 0, c = 0;
|
|
9
|
+
for (let t = 0; t < e.length; t++) s += o[t], S(e[t]) || c++;
|
|
9
10
|
let l = s + Math.max(0, c - 1) * n, u = r === void 0 ? (e) => e : (e) => Math.round(e * r) / r, d = 0, f = [], p = (e) => {
|
|
10
11
|
let t = d;
|
|
11
12
|
if (!t) return;
|
|
@@ -17,13 +18,13 @@ function oe(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
|
|
|
17
18
|
});
|
|
18
19
|
m += r, d = 0;
|
|
19
20
|
}, m = a ? Math.max(t, l) : 0 + i;
|
|
20
|
-
if (e.length == 1 &&
|
|
21
|
+
if (e.length == 1 && S(e[0])) return [{
|
|
21
22
|
location: m,
|
|
22
23
|
size: 0
|
|
23
24
|
}];
|
|
24
25
|
for (let t = 0; t < e.length; t++) {
|
|
25
26
|
let r = e[t];
|
|
26
|
-
if (
|
|
27
|
+
if (S(r)) d++;
|
|
27
28
|
else {
|
|
28
29
|
p(f.length > 0);
|
|
29
30
|
let e = o[t];
|
|
@@ -35,24 +36,24 @@ function oe(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
|
|
|
35
36
|
}
|
|
36
37
|
return m += a ? n : -n, p(!1), f;
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function ce(e, { spacing: t } = { spacing: 0 }) {
|
|
39
40
|
let n = 0;
|
|
40
|
-
for (let r of e) n +=
|
|
41
|
+
for (let r of e) n += T(r) + (S(r) ? 0 : t);
|
|
41
42
|
return Math.max(0, n - t);
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function le(e, t, { spacing: n = 0 } = {}) {
|
|
44
45
|
let r = [], i = [], a = 0, o = 0;
|
|
45
46
|
for (let [s, c] of e.entries()) {
|
|
46
|
-
let e =
|
|
47
|
+
let e = T(c), l = !S(c), u = o && l ? n : 0;
|
|
47
48
|
i.length && a + u + e > t && (r.push(i), i = [], a = 0, o = 0), i.push(s), a += (o && l ? n : 0) + e, o += +!!l;
|
|
48
49
|
}
|
|
49
50
|
return i.length && r.push(i), r;
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function ue(e) {
|
|
52
53
|
let t = 0, n = 0, r = 0, i, a = !0;
|
|
53
54
|
for (let o of e) {
|
|
54
|
-
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r,
|
|
55
|
-
let e =
|
|
55
|
+
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, T(o));
|
|
56
|
+
let e = E(o);
|
|
56
57
|
e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
|
|
57
58
|
}
|
|
58
59
|
return O({
|
|
@@ -62,7 +63,7 @@ function le(e) {
|
|
|
62
63
|
maxPx: a ? i : void 0
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function de(e) {
|
|
66
67
|
let t = {
|
|
67
68
|
px: 0,
|
|
68
69
|
grow: 0,
|
|
@@ -70,8 +71,8 @@ function ue(e) {
|
|
|
70
71
|
maxPx: 0
|
|
71
72
|
}, n = !0;
|
|
72
73
|
for (let r of e) {
|
|
73
|
-
t.px +=
|
|
74
|
-
let e =
|
|
74
|
+
t.px += C(r.px), t.grow += C(r.grow), t.minPx += T(r);
|
|
75
|
+
let e = E(r);
|
|
75
76
|
e === void 0 ? n = !1 : t.maxPx += e;
|
|
76
77
|
}
|
|
77
78
|
return n || delete t.maxPx, O(t);
|
|
@@ -87,7 +88,7 @@ var y = class e {
|
|
|
87
88
|
return this.#e(-e.width, -e.height);
|
|
88
89
|
}
|
|
89
90
|
#e(t, n) {
|
|
90
|
-
return new e(
|
|
91
|
+
return new e(D(this.width, t), D(this.height, n));
|
|
91
92
|
}
|
|
92
93
|
isGrowing() {
|
|
93
94
|
return !!(this.width.grow || this.height.grow);
|
|
@@ -95,23 +96,23 @@ var y = class e {
|
|
|
95
96
|
}, b = Object.freeze({
|
|
96
97
|
px: 0,
|
|
97
98
|
grow: 0
|
|
98
|
-
}),
|
|
99
|
-
function
|
|
99
|
+
}), x = new y(b, b);
|
|
100
|
+
function S(e) {
|
|
100
101
|
return !e.px && !e.grow && !e.minPx;
|
|
101
102
|
}
|
|
102
103
|
function fe(e, t) {
|
|
103
104
|
return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function C(e) {
|
|
106
107
|
return e || 0;
|
|
107
108
|
}
|
|
108
109
|
function pe(e) {
|
|
109
|
-
return e && (
|
|
110
|
+
return e && (h(e.px) || h(e.grow) || h(e.minPx) || h(e.maxPx));
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function me(e) {
|
|
112
113
|
if (J(e)) throw Error("parseSizeDef does not accept step-based sizes.");
|
|
113
|
-
if (pe(e)) return
|
|
114
|
-
if (
|
|
114
|
+
if (pe(e)) return _e(e), O(e);
|
|
115
|
+
if (h(e)) return {
|
|
115
116
|
px: e,
|
|
116
117
|
grow: 0
|
|
117
118
|
};
|
|
@@ -121,28 +122,28 @@ function C(e) {
|
|
|
121
122
|
};
|
|
122
123
|
throw Error(`Invalid sizeDef: ${e}`);
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function he(e, t, n) {
|
|
125
126
|
let r = !1;
|
|
126
|
-
for (let t of e)
|
|
127
|
-
if (!r) return
|
|
127
|
+
for (let t of e) _e(t), r ||= ve(t);
|
|
128
|
+
if (!r) return ge(e, t, n);
|
|
128
129
|
let i = Array(e.length).fill(0), a = [];
|
|
129
|
-
for (let t = 0; t < e.length; t++)
|
|
130
|
+
for (let t = 0; t < e.length; t++) S(e[t]) || a.push(t);
|
|
130
131
|
let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
|
|
131
132
|
for (let t of a) {
|
|
132
133
|
let n = e[t];
|
|
133
|
-
|
|
134
|
+
C(n.grow) || (i[t] = w(C(n.px), n), c.add(t));
|
|
134
135
|
}
|
|
135
136
|
for (;;) {
|
|
136
137
|
let t = 0, n = 0, r = 0;
|
|
137
|
-
for (let o of a) c.has(o) ? r += i[o] : (t +=
|
|
138
|
+
for (let o of a) c.has(o) ? r += i[o] : (t += C(e[o].px), n += C(e[o].grow));
|
|
138
139
|
if (!n) {
|
|
139
|
-
for (let t of a) c.has(t) || (i[t] =
|
|
140
|
+
for (let t of a) c.has(t) || (i[t] = w(C(e[t].px), e[t]), c.add(t));
|
|
140
141
|
break;
|
|
141
142
|
}
|
|
142
143
|
let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
|
|
143
144
|
for (let t of a) {
|
|
144
145
|
if (c.has(t)) continue;
|
|
145
|
-
let r = e[t], a =
|
|
146
|
+
let r = e[t], a = C(r.px) + C(r.grow) / n * o, s = w(a, r);
|
|
146
147
|
i[t] = s;
|
|
147
148
|
let f = s - a;
|
|
148
149
|
l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
|
|
@@ -154,33 +155,33 @@ function me(e, t, n) {
|
|
|
154
155
|
}
|
|
155
156
|
return i;
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function ge(e, t, n) {
|
|
158
159
|
let r = 0, i = 0;
|
|
159
|
-
for (let t of e) r +=
|
|
160
|
+
for (let t of e) r += C(t.px) + (S(t) ? 0 : n), i += C(t.grow);
|
|
160
161
|
r -= n;
|
|
161
162
|
let a = Math.max(0, t - r), o = Array(e.length);
|
|
162
163
|
for (let t = 0; t < e.length; t++) {
|
|
163
164
|
let n = e[t];
|
|
164
|
-
o[t] =
|
|
165
|
+
o[t] = S(n) ? 0 : C(n.px) + (i ? C(n.grow) / i * a : 0);
|
|
165
166
|
}
|
|
166
167
|
return o;
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
+
function _e(e) {
|
|
169
170
|
if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
|
|
170
171
|
}
|
|
171
|
-
function
|
|
172
|
+
function w(e, t) {
|
|
172
173
|
return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
|
|
173
174
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
175
|
+
function T(e) {
|
|
176
|
+
return w(C(e.px), e);
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
-
return e.maxPx ?? (
|
|
178
|
+
function E(e) {
|
|
179
|
+
return e.maxPx ?? (C(e.grow) ? void 0 : T(e));
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function ve(e) {
|
|
181
182
|
return e.minPx !== void 0 || e.maxPx !== void 0;
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function D(e, t) {
|
|
184
185
|
return O({
|
|
185
186
|
px: (e.px ?? 0) + t,
|
|
186
187
|
grow: e.grow,
|
|
@@ -189,8 +190,8 @@ function _e(e, t) {
|
|
|
189
190
|
});
|
|
190
191
|
}
|
|
191
192
|
function O(e) {
|
|
192
|
-
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i =
|
|
193
|
-
return e.px ? t.px = e.px : e.px === 0 && (t.px = 0), e.grow ? t.grow = e.grow : e.grow === 0 ? t.grow = 0 : !n && !r && i && (t.grow = 1), e.minPx && e.minPx >
|
|
193
|
+
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = ve(e);
|
|
194
|
+
return e.px ? t.px = e.px : e.px === 0 && (t.px = 0), e.grow ? t.grow = e.grow : e.grow === 0 ? t.grow = 0 : !n && !r && i && (t.grow = 1), e.minPx && e.minPx > C(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (C(t.grow) || e.maxPx < C(e.px)) && (t.maxPx = e.maxPx), t;
|
|
194
195
|
}
|
|
195
196
|
//#endregion
|
|
196
197
|
//#region ../core/src/view/layout/padding.js
|
|
@@ -241,23 +242,23 @@ var k = class e {
|
|
|
241
242
|
return new e(t, t, t, t);
|
|
242
243
|
}
|
|
243
244
|
};
|
|
244
|
-
function
|
|
245
|
+
function ye(e, t) {
|
|
245
246
|
return t ? new k(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
|
|
246
247
|
}
|
|
247
248
|
var A = k.createUniformPadding(0);
|
|
248
249
|
Object.freeze(A);
|
|
249
250
|
//#endregion
|
|
250
251
|
//#region ../core/src/utils/url.js
|
|
251
|
-
var
|
|
252
|
+
var be = /^([A-Za-z]+:)?\/\//;
|
|
252
253
|
function j(e, t) {
|
|
253
|
-
if (t &&
|
|
254
|
+
if (t && be.test(t)) return t;
|
|
254
255
|
let n = typeof e == "function" ? e() : e;
|
|
255
256
|
if (!n) return t;
|
|
256
257
|
if (!t) return n;
|
|
257
258
|
if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
|
|
258
259
|
return M(n) + t;
|
|
259
260
|
}
|
|
260
|
-
function
|
|
261
|
+
function xe(e, t, n = Se()) {
|
|
261
262
|
let r = typeof e == "function" ? e() : e;
|
|
262
263
|
if (!t) return r;
|
|
263
264
|
try {
|
|
@@ -272,7 +273,7 @@ function M(e) {
|
|
|
272
273
|
let t = e.replace(/[^/]*$/, "");
|
|
273
274
|
return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
|
|
274
275
|
}
|
|
275
|
-
function
|
|
276
|
+
function Se() {
|
|
276
277
|
if (typeof document < "u" && document.baseURI) return document.baseURI;
|
|
277
278
|
if (typeof window < "u" && window.location?.href) return window.location.href;
|
|
278
279
|
}
|
|
@@ -319,11 +320,11 @@ var N = class {
|
|
|
319
320
|
shrink() {
|
|
320
321
|
Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
|
|
321
322
|
}
|
|
322
|
-
}, P = Symbol("runtimeNode"),
|
|
323
|
+
}, P = Symbol("runtimeNode"), F = 1e6;
|
|
323
324
|
function Ce(e) {
|
|
324
325
|
return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
+
function I(e, t) {
|
|
327
328
|
let n = {
|
|
328
329
|
id: e.id,
|
|
329
330
|
name: e.name,
|
|
@@ -346,18 +347,18 @@ function we(e, t) {
|
|
|
346
347
|
t(e);
|
|
347
348
|
} }) : n;
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function we(e) {
|
|
350
351
|
let t = e[P];
|
|
351
352
|
if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
|
|
352
353
|
return t;
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
-
return typeof e.rank == "number" ? e.rank :
|
|
355
|
+
function Te(e) {
|
|
356
|
+
return typeof e.rank == "number" ? e.rank : we(e).rank;
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
+
function Ee(e) {
|
|
358
359
|
for (let t of e) t();
|
|
359
360
|
}
|
|
360
|
-
var
|
|
361
|
+
var De = class {
|
|
361
362
|
#e = 1;
|
|
362
363
|
#t = 1;
|
|
363
364
|
#n = 0;
|
|
@@ -398,7 +399,7 @@ var Oe = class {
|
|
|
398
399
|
}, l = () => {
|
|
399
400
|
s.disposed = !0, s.listeners.clear(), u();
|
|
400
401
|
}, u = this.#g(e, l);
|
|
401
|
-
return Object.assign(
|
|
402
|
+
return Object.assign(I(s, c), { dispose: l });
|
|
402
403
|
}
|
|
403
404
|
computed(e, t, n, r, i = {}) {
|
|
404
405
|
return this.#_(e, t, n, r, i);
|
|
@@ -433,7 +434,7 @@ var Oe = class {
|
|
|
433
434
|
})), l = c(), u = () => {
|
|
434
435
|
s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
|
|
435
436
|
}, d = this.#g(e, u);
|
|
436
|
-
return Object.assign(
|
|
437
|
+
return Object.assign(I(s), {
|
|
437
438
|
dispose: u,
|
|
438
439
|
rebind: (e, n) => {
|
|
439
440
|
if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
|
|
@@ -541,7 +542,7 @@ var Oe = class {
|
|
|
541
542
|
#v(e) {
|
|
542
543
|
this.#s++;
|
|
543
544
|
try {
|
|
544
|
-
|
|
545
|
+
Ee(e);
|
|
545
546
|
} finally {
|
|
546
547
|
this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
|
|
547
548
|
}
|
|
@@ -570,7 +571,7 @@ var Oe = class {
|
|
|
570
571
|
}
|
|
571
572
|
#b(e) {
|
|
572
573
|
let t = -1, n = 0;
|
|
573
|
-
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e,
|
|
574
|
+
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, Te(t)), 0), t = this.#n), n);
|
|
574
575
|
}
|
|
575
576
|
#x(e) {
|
|
576
577
|
if (this.#d.has(e)) {
|
|
@@ -587,8 +588,8 @@ var Oe = class {
|
|
|
587
588
|
this.#f.add(e), this.#m.push(e, this.#C(e.rank)), this.#w();
|
|
588
589
|
}
|
|
589
590
|
#C(e) {
|
|
590
|
-
let t = this.#t %
|
|
591
|
-
return this.#t += 1, e *
|
|
591
|
+
let t = this.#t % F;
|
|
592
|
+
return this.#t += 1, e * F + t;
|
|
592
593
|
}
|
|
593
594
|
#w() {
|
|
594
595
|
this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
|
|
@@ -604,7 +605,7 @@ var Oe = class {
|
|
|
604
605
|
this.#h.clear();
|
|
605
606
|
}
|
|
606
607
|
}
|
|
607
|
-
},
|
|
608
|
+
}, Oe = class {
|
|
608
609
|
#e = 1;
|
|
609
610
|
#t = /* @__PURE__ */ new Map();
|
|
610
611
|
createOwner(e, t) {
|
|
@@ -625,7 +626,7 @@ var Oe = class {
|
|
|
625
626
|
t.clear(), this.#t.delete(e);
|
|
626
627
|
}
|
|
627
628
|
}
|
|
628
|
-
},
|
|
629
|
+
}, ke = class {
|
|
629
630
|
#e = 1;
|
|
630
631
|
#t = /* @__PURE__ */ new Map();
|
|
631
632
|
createRootScope(e) {
|
|
@@ -657,24 +658,24 @@ var Oe = class {
|
|
|
657
658
|
t.params.clear(), t.initializers.clear();
|
|
658
659
|
}
|
|
659
660
|
registerInitializer(e, t, n) {
|
|
660
|
-
|
|
661
|
-
let
|
|
662
|
-
if (!
|
|
663
|
-
if (
|
|
664
|
-
|
|
661
|
+
r(t);
|
|
662
|
+
let i = this.#t.get(e);
|
|
663
|
+
if (!i) throw Error("Unknown scope: " + e);
|
|
664
|
+
if (i.params.has(t) || i.initializers.has(t)) throw Error(`Parameter "${t}" already exists in scope ${e}`);
|
|
665
|
+
i.initializers.set(t, {
|
|
665
666
|
initialize: n,
|
|
666
667
|
initializing: !1
|
|
667
668
|
});
|
|
668
669
|
}
|
|
669
670
|
register(e, t, n) {
|
|
670
|
-
|
|
671
|
-
let
|
|
672
|
-
if (!
|
|
673
|
-
if (
|
|
674
|
-
return
|
|
671
|
+
r(t);
|
|
672
|
+
let i = this.#t.get(e);
|
|
673
|
+
if (!i) throw Error("Unknown scope: " + e);
|
|
674
|
+
if (i.params.has(t) || i.initializers.get(t)?.initializing === !1) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
|
|
675
|
+
return i.params.set(t, n), n;
|
|
675
676
|
}
|
|
676
677
|
resolve(e, t) {
|
|
677
|
-
|
|
678
|
+
r(t);
|
|
678
679
|
let n = e;
|
|
679
680
|
for (; n;) {
|
|
680
681
|
let e = this.#t.get(n);
|
|
@@ -698,13 +699,13 @@ var Oe = class {
|
|
|
698
699
|
};
|
|
699
700
|
//#endregion
|
|
700
701
|
//#region ../core/src/paramRuntime/expressionCompiler.js
|
|
701
|
-
function
|
|
702
|
-
return
|
|
702
|
+
function Ae(e, t = {}, n = {}) {
|
|
703
|
+
return a(e, t, n);
|
|
703
704
|
}
|
|
704
705
|
//#endregion
|
|
705
706
|
//#region ../core/src/paramRuntime/expressionRef.js
|
|
706
|
-
function
|
|
707
|
-
let r = {}, i =
|
|
707
|
+
function L(e, t, n = {}) {
|
|
708
|
+
let r = {}, i = Ae(e, r, n), a = /* @__PURE__ */ new Map();
|
|
708
709
|
for (let n of i.globals) {
|
|
709
710
|
if (a.has(n)) continue;
|
|
710
711
|
let i = t(n);
|
|
@@ -735,10 +736,10 @@ function F(e, t, n = {}) {
|
|
|
735
736
|
}
|
|
736
737
|
//#endregion
|
|
737
738
|
//#region ../core/src/paramRuntime/paramRuntime.js
|
|
738
|
-
var
|
|
739
|
-
#e = new
|
|
740
|
-
#t = new
|
|
741
|
-
#n = new
|
|
739
|
+
var je = class {
|
|
740
|
+
#e = new Oe();
|
|
741
|
+
#t = new De({ lifecycleRegistry: this.#e });
|
|
742
|
+
#n = new ke();
|
|
742
743
|
createScope(e) {
|
|
743
744
|
let t = this.#e.createOwner("scope", e ?? "root");
|
|
744
745
|
return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
|
|
@@ -763,11 +764,11 @@ var Me = class {
|
|
|
763
764
|
return this.#n.register(e, t, a);
|
|
764
765
|
}
|
|
765
766
|
registerDerived(e, t, n, r) {
|
|
766
|
-
let { expression: i, dependencies: a } =
|
|
767
|
+
let { expression: i, dependencies: a } = L(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
|
|
767
768
|
return this.#n.register(e, t, s);
|
|
768
769
|
}
|
|
769
770
|
createExpression(e, t, n) {
|
|
770
|
-
let { expression: r } =
|
|
771
|
+
let { expression: r } = L(t, (t) => this.resolve(e, t), n);
|
|
771
772
|
return r;
|
|
772
773
|
}
|
|
773
774
|
resolve(e, t) {
|
|
@@ -800,11 +801,11 @@ var Me = class {
|
|
|
800
801
|
whenPropagated(e) {
|
|
801
802
|
return this.#t.whenPropagated(e);
|
|
802
803
|
}
|
|
803
|
-
},
|
|
804
|
-
function
|
|
804
|
+
}, Me = (e) => new Promise((t) => setTimeout(t, e));
|
|
805
|
+
function Ne() {
|
|
805
806
|
return { canceled: !1 };
|
|
806
807
|
}
|
|
807
|
-
function
|
|
808
|
+
function Pe(e) {
|
|
808
809
|
let t = e.requestAnimationFrame || window.requestAnimationFrame, n = e.signal, r = e.cancelToken, i = () => new Promise((i, a) => {
|
|
809
810
|
if (r?.canceled) return i();
|
|
810
811
|
if (n?.aborted) return a("aborted");
|
|
@@ -817,11 +818,11 @@ function Fe(e) {
|
|
|
817
818
|
};
|
|
818
819
|
t(m);
|
|
819
820
|
});
|
|
820
|
-
return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") :
|
|
821
|
+
return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : Me(e.delay).then(i) : i();
|
|
821
822
|
}
|
|
822
823
|
//#endregion
|
|
823
824
|
//#region ../core/src/utils/animator.js
|
|
824
|
-
var
|
|
825
|
+
var Fe = class {
|
|
825
826
|
constructor(e) {
|
|
826
827
|
this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
|
|
827
828
|
}
|
|
@@ -847,13 +848,13 @@ var Ie = class {
|
|
|
847
848
|
this._finalized = !0, this._renderRequested = !1, this.transitions = [], this._animationFrameRequest !== void 0 && (window.cancelAnimationFrame(this._animationFrameRequest), this._animationFrameRequest = void 0);
|
|
848
849
|
}
|
|
849
850
|
transition(e) {
|
|
850
|
-
return
|
|
851
|
+
return Pe({
|
|
851
852
|
requestAnimationFrame: (e) => this.requestTransition(e),
|
|
852
853
|
...e
|
|
853
854
|
});
|
|
854
855
|
}
|
|
855
856
|
};
|
|
856
|
-
function
|
|
857
|
+
function R(e, t, n, r, i) {
|
|
857
858
|
let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
|
|
858
859
|
function u(e, t, n, r) {
|
|
859
860
|
return t + (e - t) * 2 ** (-n / r);
|
|
@@ -872,7 +873,7 @@ function Le(e, t, n, r, i) {
|
|
|
872
873
|
s || (s = !0, e.requestTransition(d));
|
|
873
874
|
}
|
|
874
875
|
function p(n) {
|
|
875
|
-
l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a =
|
|
876
|
+
l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = Ie(), d(a));
|
|
876
877
|
}
|
|
877
878
|
return p.stop = () => {
|
|
878
879
|
o = !0, s = !1, e.cancelTransition(d);
|
|
@@ -880,41 +881,53 @@ function Le(e, t, n, r, i) {
|
|
|
880
881
|
l = e, c = e, p.stop(), t(c);
|
|
881
882
|
}, p;
|
|
882
883
|
}
|
|
883
|
-
function
|
|
884
|
+
function Ie() {
|
|
884
885
|
let e = globalThis.document?.timeline?.currentTime;
|
|
885
886
|
return typeof e == "number" ? e : performance.now();
|
|
886
887
|
}
|
|
887
888
|
//#endregion
|
|
888
889
|
//#region ../core/src/paramRuntime/viewParamRuntime.js
|
|
889
|
-
var
|
|
890
|
+
var z = class {
|
|
890
891
|
#e;
|
|
891
892
|
#t;
|
|
892
893
|
#n = /* @__PURE__ */ new Map();
|
|
893
894
|
#r = /* @__PURE__ */ new Map();
|
|
894
895
|
#i = /* @__PURE__ */ new Map();
|
|
895
|
-
#a = /* @__PURE__ */ new
|
|
896
|
-
#o;
|
|
897
|
-
#s;
|
|
896
|
+
#a = /* @__PURE__ */ new Set();
|
|
897
|
+
#o = /* @__PURE__ */ new Map();
|
|
898
|
+
#s = /* @__PURE__ */ new Map();
|
|
898
899
|
#c;
|
|
899
900
|
#l;
|
|
900
|
-
#u
|
|
901
|
+
#u;
|
|
902
|
+
#d;
|
|
903
|
+
#f = !1;
|
|
901
904
|
constructor(e, t, n, r = {}) {
|
|
902
|
-
this.#
|
|
903
|
-
let i = this.#
|
|
904
|
-
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new
|
|
905
|
+
this.#c = e ?? (() => void 0), this.#l = t ?? (() => void 0), this.#u = n, this.#d = r.snapTransitionedUpdates ?? !1;
|
|
906
|
+
let i = this.#c();
|
|
907
|
+
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new je(), this.#t = this.#e.createScope());
|
|
908
|
+
}
|
|
909
|
+
get #p() {
|
|
910
|
+
return { resolveScaleResolution: this.#l };
|
|
905
911
|
}
|
|
906
912
|
registerParam(e, t = {}) {
|
|
907
913
|
let n = e.name;
|
|
908
|
-
if (
|
|
909
|
-
if (
|
|
914
|
+
if (r(n), this.#i.has(n) || this.#a.has(n)) throw Error("Parameter \"" + n + "\" already registered in this scope.");
|
|
915
|
+
if (Re(e), t.defer) {
|
|
910
916
|
if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
|
|
911
917
|
return this.#e.registerInitializer(this.#t, n, () => {
|
|
912
|
-
this.#
|
|
918
|
+
this.#m(e);
|
|
913
919
|
}), this.#i.set(n, e), () => {
|
|
914
920
|
throw Error("Cannot set derived parameter \"" + n + "\".");
|
|
915
921
|
};
|
|
916
922
|
}
|
|
917
|
-
return this.#
|
|
923
|
+
return this.#m(e);
|
|
924
|
+
}
|
|
925
|
+
registerLazyExpression(e, t, n) {
|
|
926
|
+
this.#e.registerInitializer(this.#t, e, () => {
|
|
927
|
+
n?.();
|
|
928
|
+
let r = this.#e.registerDerived(this.#t, e, t, this.#p);
|
|
929
|
+
this.#r.set(e, r);
|
|
930
|
+
}), this.#a.add(e);
|
|
918
931
|
}
|
|
919
932
|
registerScopedExpression(e, t, n) {
|
|
920
933
|
if (this.#e !== n.#e) throw Error("Scoped expressions must share a parameter runtime.");
|
|
@@ -922,7 +935,7 @@ var ze = class {
|
|
|
922
935
|
this.#e.registerInitializer(this.#t, e, () => {
|
|
923
936
|
let r = this.#e.registerDerived(this.#t, e, t, {
|
|
924
937
|
expressionScope: n.#t,
|
|
925
|
-
|
|
938
|
+
...n.#p
|
|
926
939
|
});
|
|
927
940
|
this.#r.set(e, r);
|
|
928
941
|
}), this.#i.set(e, {
|
|
@@ -930,67 +943,69 @@ var ze = class {
|
|
|
930
943
|
expr: t
|
|
931
944
|
});
|
|
932
945
|
}
|
|
933
|
-
#
|
|
934
|
-
let
|
|
946
|
+
#m(e) {
|
|
947
|
+
let n = e.name, r, i;
|
|
935
948
|
if (e.push == "outer") {
|
|
936
|
-
let a = this.findRuntimeForParam(
|
|
937
|
-
if (!a) throw Error(`Parameter "${
|
|
938
|
-
let o = a.paramConfigs.get(
|
|
939
|
-
if (!o) throw Error(`Outer parameter "${
|
|
940
|
-
if ("expr" in o || "select" in o || "ruler" in o) throw Error(`The outer parameter "${
|
|
941
|
-
|
|
942
|
-
a.setValue(
|
|
943
|
-
}, this.#n.set(
|
|
944
|
-
} else if ("value" in e) i =
|
|
949
|
+
let a = this.findRuntimeForParam(n);
|
|
950
|
+
if (!a) throw Error(`Parameter "${n}" not found in outer scope!`);
|
|
951
|
+
let o = a.paramConfigs.get(n);
|
|
952
|
+
if (!o) throw Error(`Outer parameter "${n}" exists as a value but has no registered config.`);
|
|
953
|
+
if ("expr" in o || "select" in o || "ruler" in o) throw Error(`The outer parameter "${n}" must not have expr, select, or ruler properties!`);
|
|
954
|
+
r = (e) => {
|
|
955
|
+
a.setValue(n, e);
|
|
956
|
+
}, this.#n.set(n, r), "ruler" in e && (i = t(e, this), r(i));
|
|
957
|
+
} else if ("value" in e) i = t(e, this), r = "transition" in e ? this.#g(n, i, e.transition) : this.#h(n, i);
|
|
945
958
|
else if ("expr" in e) {
|
|
946
|
-
if ("transition" in e) this.#
|
|
959
|
+
if ("transition" in e) this.#_(n, e.expr, e.transition);
|
|
947
960
|
else {
|
|
948
|
-
let
|
|
949
|
-
this.#r.set(
|
|
961
|
+
let t = this.#e.registerDerived(this.#t, n, e.expr, this.#p);
|
|
962
|
+
this.#r.set(n, t);
|
|
950
963
|
}
|
|
951
|
-
|
|
952
|
-
throw Error("Cannot set derived parameter \"" +
|
|
964
|
+
r = () => {
|
|
965
|
+
throw Error("Cannot set derived parameter \"" + n + "\".");
|
|
953
966
|
};
|
|
954
|
-
} else i =
|
|
967
|
+
} else i = t(e, this), r = this.#h(n, i);
|
|
955
968
|
if ("select" in e) {
|
|
956
|
-
if (i ??=
|
|
957
|
-
let e = this.#e.registerSelection(this.#t,
|
|
958
|
-
this.#r.set(
|
|
969
|
+
if (i ??= t(e, this), !this.#n.has(n)) {
|
|
970
|
+
let e = this.#e.registerSelection(this.#t, n, i);
|
|
971
|
+
this.#r.set(n, e), this.#n.set(n, (t) => {
|
|
959
972
|
e.set(t), this.#e.flushNow();
|
|
960
|
-
}),
|
|
973
|
+
}), r = this.#n.get(n);
|
|
961
974
|
}
|
|
962
|
-
|
|
975
|
+
r(i);
|
|
963
976
|
}
|
|
964
|
-
return this.#i.set(
|
|
977
|
+
return this.#i.set(n, e), r;
|
|
965
978
|
}
|
|
966
979
|
allocateSetter(e, t, n = !1) {
|
|
967
|
-
if (
|
|
968
|
-
let
|
|
969
|
-
this.#r.set(e,
|
|
970
|
-
let
|
|
971
|
-
|
|
980
|
+
if (r(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
|
|
981
|
+
let i = this.#e.registerBase(this.#t, e, t, { notify: !n });
|
|
982
|
+
this.#r.set(e, i);
|
|
983
|
+
let a = (e) => {
|
|
984
|
+
i.set(e), this.#e.flushNow();
|
|
972
985
|
};
|
|
973
|
-
return this.#n.set(e,
|
|
986
|
+
return this.#n.set(e, a), a;
|
|
974
987
|
}
|
|
975
988
|
setValue(e, t, n) {
|
|
976
|
-
|
|
977
|
-
let
|
|
978
|
-
if (!
|
|
979
|
-
|
|
989
|
+
r(e);
|
|
990
|
+
let i = this.#n.get(e);
|
|
991
|
+
if (!i) throw Error("Writable parameter not found in this scope: " + e);
|
|
992
|
+
i(t, n);
|
|
980
993
|
}
|
|
981
994
|
getValue(e) {
|
|
982
995
|
return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
|
|
983
996
|
}
|
|
997
|
+
getParamRef(e) {
|
|
998
|
+
r(e);
|
|
999
|
+
let t = this.findRuntimeForParam(e);
|
|
1000
|
+
if (t) return t.#r.has(e) || t.#e.resolve(t.#t, e), t.#r.get(e);
|
|
1001
|
+
}
|
|
984
1002
|
getTargetValue(e) {
|
|
985
|
-
return
|
|
1003
|
+
return r(e), this.#s.get(e)?.target ?? this.getValue(e);
|
|
986
1004
|
}
|
|
987
1005
|
subscribe(e, t) {
|
|
988
|
-
|
|
989
|
-
let n = this.findRuntimeForParam(e);
|
|
1006
|
+
let n = this.getParamRef(e);
|
|
990
1007
|
if (!n) throw Error("Parameter not found: " + e);
|
|
991
|
-
|
|
992
|
-
if (!r) throw Error("Parameter found without local reference: " + e);
|
|
993
|
-
return r.subscribe(t);
|
|
1008
|
+
return n.subscribe(t);
|
|
994
1009
|
}
|
|
995
1010
|
findValue(e) {
|
|
996
1011
|
return this.findRuntimeForParam(e)?.getValue(e);
|
|
@@ -1002,19 +1017,39 @@ var ze = class {
|
|
|
1002
1017
|
return this.#i;
|
|
1003
1018
|
}
|
|
1004
1019
|
hasLocalParam(e) {
|
|
1005
|
-
|
|
1020
|
+
r(e);
|
|
1006
1021
|
let t = this.#i.get(e);
|
|
1007
|
-
return this.#r.has(e) || t !== void 0 && "expr" in t;
|
|
1022
|
+
return this.#r.has(e) || this.#a.has(e) || t !== void 0 && "expr" in t;
|
|
1008
1023
|
}
|
|
1009
1024
|
isPendingParam(e) {
|
|
1010
1025
|
let t = this.findRuntimeForParam(e);
|
|
1011
1026
|
return t !== void 0 && !t.#r.has(e);
|
|
1012
1027
|
}
|
|
1013
1028
|
hasConfiguredParamInScopeChain(e) {
|
|
1014
|
-
return
|
|
1029
|
+
return r(e), this.#i.has(e) ? !0 : this.#c()?.hasConfiguredParamInScopeChain(e) ?? !1;
|
|
1015
1030
|
}
|
|
1016
1031
|
findRuntimeForParam(e) {
|
|
1017
|
-
return this.hasLocalParam(e) ? this : this.#
|
|
1032
|
+
return this.hasLocalParam(e) ? this : this.#c()?.findRuntimeForParam(e);
|
|
1033
|
+
}
|
|
1034
|
+
findConfiguredParam(e) {
|
|
1035
|
+
let t = this.#i.get(e);
|
|
1036
|
+
return t ? {
|
|
1037
|
+
runtime: this,
|
|
1038
|
+
config: t
|
|
1039
|
+
} : this.#c()?.findConfiguredParam(e);
|
|
1040
|
+
}
|
|
1041
|
+
registerSelectionController(e, t) {
|
|
1042
|
+
let n = this.#o.get(e);
|
|
1043
|
+
return n || (n = /* @__PURE__ */ new Set(), this.#o.set(e, n)), n.add(t), () => {
|
|
1044
|
+
n.delete(t), n.size === 0 && this.#o.delete(e);
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
getSelectionController(e) {
|
|
1048
|
+
let t = this.#o.get(e);
|
|
1049
|
+
if (t) {
|
|
1050
|
+
if (t.size > 1) throw Error(`Selection "${e}" has ambiguous interaction ownership.`);
|
|
1051
|
+
return t.values().next().value;
|
|
1052
|
+
}
|
|
1018
1053
|
}
|
|
1019
1054
|
getDebugState() {
|
|
1020
1055
|
let e = [];
|
|
@@ -1022,22 +1057,22 @@ var ze = class {
|
|
|
1022
1057
|
let r = this.#i.get(t);
|
|
1023
1058
|
e.push({
|
|
1024
1059
|
name: t,
|
|
1025
|
-
kind:
|
|
1060
|
+
kind: Le(r),
|
|
1026
1061
|
value: n.get(),
|
|
1027
1062
|
writable: this.#n.has(t),
|
|
1028
1063
|
configured: !!r,
|
|
1029
1064
|
config: r ? structuredClone(r) : void 0,
|
|
1030
|
-
target: this.#
|
|
1065
|
+
target: this.#s.get(t)?.target
|
|
1031
1066
|
});
|
|
1032
1067
|
}
|
|
1033
1068
|
return {
|
|
1034
1069
|
scopeId: this.#t,
|
|
1035
|
-
disposed: this.#
|
|
1070
|
+
disposed: this.#f,
|
|
1036
1071
|
params: e
|
|
1037
1072
|
};
|
|
1038
1073
|
}
|
|
1039
1074
|
createExpression(e) {
|
|
1040
|
-
return this.#e.createExpression(this.#t, e,
|
|
1075
|
+
return this.#e.createExpression(this.#t, e, this.#p);
|
|
1041
1076
|
}
|
|
1042
1077
|
watchExpression(e, t, n = {}) {
|
|
1043
1078
|
let r = this.createExpression(e), i = r.subscribe(t);
|
|
@@ -1064,7 +1099,7 @@ var ze = class {
|
|
|
1064
1099
|
cancelUpdate(e) {
|
|
1065
1100
|
this.#e.cancelUpdate(e);
|
|
1066
1101
|
}
|
|
1067
|
-
#
|
|
1102
|
+
#h(e, t) {
|
|
1068
1103
|
let n = this.#e.registerBase(this.#t, e, t);
|
|
1069
1104
|
this.#r.set(e, n);
|
|
1070
1105
|
let r = (e) => {
|
|
@@ -1072,36 +1107,36 @@ var ze = class {
|
|
|
1072
1107
|
};
|
|
1073
1108
|
return this.#n.set(e, r), r;
|
|
1074
1109
|
}
|
|
1075
|
-
#
|
|
1076
|
-
let r = this.#
|
|
1077
|
-
this.#
|
|
1110
|
+
#g(e, t, n) {
|
|
1111
|
+
let r = this.#v(e, t, n), i = (t, n) => {
|
|
1112
|
+
this.#y(e, r, t, n);
|
|
1078
1113
|
};
|
|
1079
1114
|
return this.#n.set(e, i), i;
|
|
1080
1115
|
}
|
|
1081
|
-
#
|
|
1082
|
-
let r = this.createExpression(t), i = this.#
|
|
1083
|
-
this.#
|
|
1116
|
+
#_(e, t, n) {
|
|
1117
|
+
let r = this.createExpression(t), i = this.#v(e, r(null), n), a = r.subscribe(() => {
|
|
1118
|
+
this.#y(e, i, r(null), { animate: !this.#d });
|
|
1084
1119
|
});
|
|
1085
1120
|
this.#e.addScopeDisposer(this.#t, a);
|
|
1086
1121
|
}
|
|
1087
|
-
#
|
|
1088
|
-
let r =
|
|
1122
|
+
#v(e, t, n) {
|
|
1123
|
+
let r = B(e, t), i = this.#e.registerBase(this.#t, e, r);
|
|
1089
1124
|
this.#r.set(e, i);
|
|
1090
|
-
let a = this.#
|
|
1125
|
+
let a = this.#u;
|
|
1091
1126
|
if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
|
|
1092
|
-
let o =
|
|
1127
|
+
let o = R(a, ({ value: e }) => {
|
|
1093
1128
|
i.set(e), this.#e.flushNow();
|
|
1094
1129
|
}, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
|
|
1095
1130
|
target: i.get(),
|
|
1096
1131
|
smoother: o,
|
|
1097
1132
|
dispose: () => {
|
|
1098
|
-
o.stop(), this.#
|
|
1133
|
+
o.stop(), this.#s.delete(e);
|
|
1099
1134
|
}
|
|
1100
1135
|
};
|
|
1101
|
-
return this.#
|
|
1136
|
+
return this.#s.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
|
|
1102
1137
|
}
|
|
1103
|
-
#
|
|
1104
|
-
let i =
|
|
1138
|
+
#y(e, t, n, r = {}) {
|
|
1139
|
+
let i = B(e, n);
|
|
1105
1140
|
t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
|
|
1106
1141
|
}
|
|
1107
1142
|
evaluateAndGet(e) {
|
|
@@ -1117,25 +1152,25 @@ var ze = class {
|
|
|
1117
1152
|
return this.#e.whenPropagated(e);
|
|
1118
1153
|
}
|
|
1119
1154
|
finalizeInitialization() {
|
|
1120
|
-
this.#
|
|
1155
|
+
this.#d = !1;
|
|
1121
1156
|
}
|
|
1122
1157
|
dispose() {
|
|
1123
|
-
this.#
|
|
1158
|
+
this.#f || (this.#f = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#s.clear());
|
|
1124
1159
|
}
|
|
1125
1160
|
hasPointSelections() {
|
|
1126
|
-
for (let
|
|
1127
|
-
let
|
|
1128
|
-
if (
|
|
1129
|
-
if (
|
|
1130
|
-
} else if (
|
|
1161
|
+
for (let t of this.#i.values()) if (e(t)) {
|
|
1162
|
+
let e = t.select;
|
|
1163
|
+
if (s(e)) {
|
|
1164
|
+
if (e == "point") return !0;
|
|
1165
|
+
} else if (e.type == "point") return !0;
|
|
1131
1166
|
}
|
|
1132
1167
|
return !1;
|
|
1133
1168
|
}
|
|
1134
1169
|
};
|
|
1135
|
-
function
|
|
1170
|
+
function Le(e) {
|
|
1136
1171
|
return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
|
|
1137
1172
|
}
|
|
1138
|
-
function
|
|
1173
|
+
function Re(e) {
|
|
1139
1174
|
let t = e.name;
|
|
1140
1175
|
if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
|
|
1141
1176
|
if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
|
|
@@ -1148,62 +1183,62 @@ function Ve(e) {
|
|
|
1148
1183
|
if (n.halfLife != null && (!Number.isFinite(n.halfLife) || n.halfLife <= 0)) throw Error(`The transition halfLife for parameter "${t}" must be a positive finite number.`);
|
|
1149
1184
|
if (n.epsilon != null && (!Number.isFinite(n.epsilon) || n.epsilon < 0)) throw Error(`The transition epsilon for parameter "${t}" must be a non-negative finite number.`);
|
|
1150
1185
|
}
|
|
1151
|
-
function
|
|
1186
|
+
function B(e, t) {
|
|
1152
1187
|
if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
|
|
1153
1188
|
return t;
|
|
1154
1189
|
}
|
|
1155
1190
|
//#endregion
|
|
1156
1191
|
//#region ../core/src/utils/addBaseUrl.js
|
|
1157
|
-
function
|
|
1192
|
+
function ze(e, t) {
|
|
1158
1193
|
return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
|
|
1159
1194
|
}
|
|
1160
|
-
function
|
|
1195
|
+
function Be(e) {
|
|
1161
1196
|
if (!e) return e;
|
|
1162
1197
|
if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
|
|
1163
1198
|
return e.endsWith("/") ? e : e + "/";
|
|
1164
1199
|
}
|
|
1165
1200
|
//#endregion
|
|
1166
1201
|
//#region ../core/src/config/mergeConfig.js
|
|
1167
|
-
function
|
|
1168
|
-
return
|
|
1202
|
+
function V(e) {
|
|
1203
|
+
return o(e) && !Array.isArray(e);
|
|
1169
1204
|
}
|
|
1170
|
-
function
|
|
1205
|
+
function Ve(e) {
|
|
1171
1206
|
let t = {};
|
|
1172
|
-
for (let [n, r] of Object.entries(e)) t[n] =
|
|
1207
|
+
for (let [n, r] of Object.entries(e)) t[n] = H(r);
|
|
1173
1208
|
return t;
|
|
1174
1209
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return Array.isArray(e) ? e.map(
|
|
1210
|
+
function H(e) {
|
|
1211
|
+
return Array.isArray(e) ? e.map(H) : V(e) ? Ve(e) : e;
|
|
1177
1212
|
}
|
|
1178
|
-
function
|
|
1213
|
+
function U(e, t) {
|
|
1179
1214
|
for (let [n, r] of Object.entries(t)) {
|
|
1180
1215
|
if (r === void 0) continue;
|
|
1181
1216
|
let t = e[n];
|
|
1182
|
-
|
|
1217
|
+
V(r) && V(t) ? U(t, r) : e[n] = H(r);
|
|
1183
1218
|
}
|
|
1184
1219
|
return e;
|
|
1185
1220
|
}
|
|
1186
|
-
function
|
|
1221
|
+
function He(e) {
|
|
1187
1222
|
let t = {};
|
|
1188
|
-
for (let n of e) n &&
|
|
1223
|
+
for (let n of e) n && U(t, n);
|
|
1189
1224
|
return t;
|
|
1190
1225
|
}
|
|
1191
1226
|
//#endregion
|
|
1192
1227
|
//#region ../core/src/view/viewChrome.js
|
|
1193
|
-
var
|
|
1194
|
-
function
|
|
1195
|
-
|
|
1228
|
+
var W = /* @__PURE__ */ new WeakMap();
|
|
1229
|
+
function Ue(e, t) {
|
|
1230
|
+
W.set(e, t);
|
|
1196
1231
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
1232
|
+
function We(e) {
|
|
1233
|
+
return W.get(e);
|
|
1199
1234
|
}
|
|
1200
|
-
function
|
|
1201
|
-
return
|
|
1235
|
+
function Ge(e) {
|
|
1236
|
+
return W.has(e);
|
|
1202
1237
|
}
|
|
1203
|
-
function
|
|
1238
|
+
function Ke(e) {
|
|
1204
1239
|
let t = e;
|
|
1205
1240
|
for (; t;) {
|
|
1206
|
-
let n =
|
|
1241
|
+
let n = W.get(t);
|
|
1207
1242
|
if (n === "excludeSubtree" || t === e && n === "exclude") return !0;
|
|
1208
1243
|
t = t.layoutParent;
|
|
1209
1244
|
}
|
|
@@ -1211,16 +1246,16 @@ function H(e) {
|
|
|
1211
1246
|
}
|
|
1212
1247
|
//#endregion
|
|
1213
1248
|
//#region ../core/src/view/postScaleParams.js
|
|
1214
|
-
var
|
|
1249
|
+
var qe = /* @__PURE__ */ new WeakMap();
|
|
1215
1250
|
function Je(e, t) {
|
|
1216
|
-
|
|
1251
|
+
qe.set(e, t);
|
|
1217
1252
|
}
|
|
1218
1253
|
function Ye(e) {
|
|
1219
|
-
return
|
|
1254
|
+
return qe.get(e);
|
|
1220
1255
|
}
|
|
1221
1256
|
//#endregion
|
|
1222
1257
|
//#region ../core/src/data/namedDataScope.js
|
|
1223
|
-
var
|
|
1258
|
+
var Xe = class {
|
|
1224
1259
|
name;
|
|
1225
1260
|
owner;
|
|
1226
1261
|
getDefaultData;
|
|
@@ -1258,13 +1293,13 @@ var W = class {
|
|
|
1258
1293
|
dispose() {
|
|
1259
1294
|
this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
|
|
1260
1295
|
}
|
|
1261
|
-
},
|
|
1296
|
+
}, Ze = class {
|
|
1262
1297
|
view;
|
|
1263
1298
|
#e = /* @__PURE__ */ new Map();
|
|
1264
1299
|
#t = /* @__PURE__ */ new Map();
|
|
1265
1300
|
constructor(e) {
|
|
1266
1301
|
this.view = e;
|
|
1267
|
-
for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new
|
|
1302
|
+
for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Xe(t, e, () => n));
|
|
1268
1303
|
}
|
|
1269
1304
|
getLocalBinding(e) {
|
|
1270
1305
|
return this.#e.get(e);
|
|
@@ -1278,7 +1313,7 @@ var W = class {
|
|
|
1278
1313
|
let n = this.view.dataParent?.namedDataScope;
|
|
1279
1314
|
if (n) return n.resolve(e);
|
|
1280
1315
|
let r = this.#t.get(e);
|
|
1281
|
-
return r || (r = new
|
|
1316
|
+
return r || (r = new Xe(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
|
|
1282
1317
|
}
|
|
1283
1318
|
dispose() {
|
|
1284
1319
|
for (let e of this.#e.values()) e.dispose();
|
|
@@ -1286,7 +1321,7 @@ var W = class {
|
|
|
1286
1321
|
for (let e of this.#t.values()) e.dispose();
|
|
1287
1322
|
this.#t.clear();
|
|
1288
1323
|
}
|
|
1289
|
-
}, G = "VISIT_SKIP", K = "VISIT_STOP", q = (e) => e,
|
|
1324
|
+
}, G = "VISIT_SKIP", K = "VISIT_STOP", q = (e) => e, Qe = class {
|
|
1290
1325
|
spec;
|
|
1291
1326
|
namedDataScope;
|
|
1292
1327
|
#e;
|
|
@@ -1308,7 +1343,7 @@ var W = class {
|
|
|
1308
1343
|
facetCoords = new ae([], JSON.stringify);
|
|
1309
1344
|
constructor(e, t, n, r, i, a = {}) {
|
|
1310
1345
|
if (!e) throw Error("View spec must be defined!");
|
|
1311
|
-
if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new
|
|
1346
|
+
if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Ze(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
|
|
1312
1347
|
let o = r ? r.getConfigScopes() : [t.getBaseConfig()], s = e.config;
|
|
1313
1348
|
this.#e = [...o, s].filter((e) => !!e), this.resolutions = {
|
|
1314
1349
|
scale: {},
|
|
@@ -1321,11 +1356,11 @@ var W = class {
|
|
|
1321
1356
|
}, this.flowHandle = void 0, this.needsAxes = {
|
|
1322
1357
|
x: !1,
|
|
1323
1358
|
y: !1
|
|
1324
|
-
}, this.paramRuntime = new
|
|
1325
|
-
let
|
|
1326
|
-
for (let e of
|
|
1359
|
+
}, this.paramRuntime = new z(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { snapTransitionedUpdates: !0 }), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => oe("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
|
|
1360
|
+
let c = [...e.params ?? [], ...Ye(e) ?? []];
|
|
1361
|
+
for (let e of c) {
|
|
1327
1362
|
if ("expr" in e) {
|
|
1328
|
-
let { usesScaleHelper: t, globals: n } =
|
|
1363
|
+
let { usesScaleHelper: t, globals: n } = f(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
|
|
1329
1364
|
if (t || r) {
|
|
1330
1365
|
this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
|
|
1331
1366
|
continue;
|
|
@@ -1351,20 +1386,20 @@ var W = class {
|
|
|
1351
1386
|
return this.#t;
|
|
1352
1387
|
}
|
|
1353
1388
|
getConfig() {
|
|
1354
|
-
return
|
|
1389
|
+
return He(this.#e);
|
|
1355
1390
|
}
|
|
1356
1391
|
getCursorSpec() {
|
|
1357
1392
|
return this.spec.cursor;
|
|
1358
1393
|
}
|
|
1359
1394
|
getCursor() {
|
|
1360
|
-
let
|
|
1361
|
-
return e
|
|
1395
|
+
let e = this.getCursorSpec();
|
|
1396
|
+
return n(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
|
|
1362
1397
|
}
|
|
1363
|
-
watchCursor(
|
|
1398
|
+
watchCursor(e, t) {
|
|
1364
1399
|
let r = this.getCursorSpec();
|
|
1365
|
-
|
|
1400
|
+
n(r) && this.paramRuntime.watchExpression(r.expr, e, {
|
|
1366
1401
|
scopeOwned: !1,
|
|
1367
|
-
registerDisposer:
|
|
1402
|
+
registerDisposer: t
|
|
1368
1403
|
});
|
|
1369
1404
|
}
|
|
1370
1405
|
getConfigScopes() {
|
|
@@ -1383,11 +1418,11 @@ var W = class {
|
|
|
1383
1418
|
return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
|
|
1384
1419
|
}
|
|
1385
1420
|
getSize() {
|
|
1386
|
-
return this._cache("size/size", () => this.isConfiguredVisible() ? new y(this.#g("width"), this.#g("height")) :
|
|
1421
|
+
return this._cache("size/size", () => this.isConfiguredVisible() ? new y(this.#g("width"), this.#g("height")) : x);
|
|
1387
1422
|
}
|
|
1388
1423
|
getViewportSize() {
|
|
1389
1424
|
if (!this.isScrollable()) return this.getSize();
|
|
1390
|
-
if (!this.isConfiguredVisible()) return
|
|
1425
|
+
if (!this.isConfiguredVisible()) return x;
|
|
1391
1426
|
let e = this.getSize();
|
|
1392
1427
|
return new y(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
|
|
1393
1428
|
}
|
|
@@ -1401,7 +1436,7 @@ var W = class {
|
|
|
1401
1436
|
if (v(i.type)) n = i.domain().length;
|
|
1402
1437
|
else if (["locus", "index"].includes(i.type)) {
|
|
1403
1438
|
let e = i.domain();
|
|
1404
|
-
n =
|
|
1439
|
+
n = m(e) - e[0];
|
|
1405
1440
|
} else throw new _(`Cannot use step-based size with "${i.type}" scale!`, this);
|
|
1406
1441
|
let a = i;
|
|
1407
1442
|
n = ie(n, a.paddingInner(), a.paddingOuter());
|
|
@@ -1420,7 +1455,7 @@ var W = class {
|
|
|
1420
1455
|
grow: 0
|
|
1421
1456
|
};
|
|
1422
1457
|
else throw new _(`Cannot use step-based size with "${e}"!`, this);
|
|
1423
|
-
} else return (r &&
|
|
1458
|
+
} else return (r && me(r)) ?? (a ? void 0 : {
|
|
1424
1459
|
px: 0,
|
|
1425
1460
|
grow: 1
|
|
1426
1461
|
});
|
|
@@ -1436,17 +1471,17 @@ var W = class {
|
|
|
1436
1471
|
};
|
|
1437
1472
|
}
|
|
1438
1473
|
#v(e) {
|
|
1439
|
-
if (
|
|
1474
|
+
if (Ke(this)) return;
|
|
1440
1475
|
let t = this.getConfig().view;
|
|
1441
1476
|
if (!t) return;
|
|
1442
1477
|
let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
|
|
1443
1478
|
return r && !v(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
|
|
1444
1479
|
}
|
|
1445
|
-
resolveSizeValue(
|
|
1446
|
-
if (!
|
|
1447
|
-
let r = this.#C(
|
|
1448
|
-
if (
|
|
1449
|
-
throw new _(`"${
|
|
1480
|
+
resolveSizeValue(e, t) {
|
|
1481
|
+
if (!n(t)) return t;
|
|
1482
|
+
let r = this.#C(e)();
|
|
1483
|
+
if (rt(r) || r === "container") return r;
|
|
1484
|
+
throw new _(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
|
|
1450
1485
|
}
|
|
1451
1486
|
registerSizeInvalidation() {
|
|
1452
1487
|
this.#y("width", "x"), this.#y("height", "y"), this.#b("width"), this.#b("height"), this.#b("viewportWidth"), this.#b("viewportHeight");
|
|
@@ -1470,14 +1505,14 @@ var W = class {
|
|
|
1470
1505
|
n && v(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
|
|
1471
1506
|
}
|
|
1472
1507
|
}
|
|
1473
|
-
#b(
|
|
1474
|
-
let { value:
|
|
1475
|
-
|
|
1508
|
+
#b(e) {
|
|
1509
|
+
let { value: t } = this.#_(e);
|
|
1510
|
+
n(t) ? this.#S(e, t.expr) : J(t) && n(t.step) && this.#S(e + ".step", t.step.expr);
|
|
1476
1511
|
}
|
|
1477
|
-
#x(
|
|
1478
|
-
let r =
|
|
1479
|
-
if (
|
|
1480
|
-
throw new _(`"${
|
|
1512
|
+
#x(e, t) {
|
|
1513
|
+
let r = n(t.step) ? this.#C(e + ".step")() : t.step;
|
|
1514
|
+
if (rt(r)) return r;
|
|
1515
|
+
throw new _(`"${e}.step" ExprRef must resolve to a finite number!`, this);
|
|
1481
1516
|
}
|
|
1482
1517
|
#S(e, t) {
|
|
1483
1518
|
if (!this.#m.has(e)) {
|
|
@@ -1608,7 +1643,7 @@ var W = class {
|
|
|
1608
1643
|
}
|
|
1609
1644
|
}
|
|
1610
1645
|
configureViewOpacity() {
|
|
1611
|
-
(!this.opacityFunction || this.opacityFunction === q) && (this.opacityFunction =
|
|
1646
|
+
(!this.opacityFunction || this.opacityFunction === q) && (this.opacityFunction = et(this));
|
|
1612
1647
|
}
|
|
1613
1648
|
finalizeParamRuntimeInitialization() {
|
|
1614
1649
|
this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
|
|
@@ -1620,7 +1655,7 @@ var W = class {
|
|
|
1620
1655
|
return this.#s;
|
|
1621
1656
|
}
|
|
1622
1657
|
arrange(e, t, n = {}) {
|
|
1623
|
-
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId,
|
|
1658
|
+
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, p(t, u(n))), this.#a || this.#o) {
|
|
1624
1659
|
let e = this.getOverhang(), n = this.layoutParent ? k.zero() : this.getPadding();
|
|
1625
1660
|
this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
|
|
1626
1661
|
}
|
|
@@ -1642,7 +1677,7 @@ var W = class {
|
|
|
1642
1677
|
}
|
|
1643
1678
|
getFacetFields(e) {
|
|
1644
1679
|
let t = this.getEncoding().sample;
|
|
1645
|
-
return
|
|
1680
|
+
return l(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
|
|
1646
1681
|
}
|
|
1647
1682
|
usesSampleFacetRendering() {
|
|
1648
1683
|
return this.layoutParent?.usesSampleFacetRendering() ?? !1;
|
|
@@ -1654,15 +1689,15 @@ var W = class {
|
|
|
1654
1689
|
};
|
|
1655
1690
|
}
|
|
1656
1691
|
getScaleResolution(e) {
|
|
1657
|
-
let t =
|
|
1692
|
+
let t = i(e);
|
|
1658
1693
|
return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
|
|
1659
1694
|
}
|
|
1660
1695
|
getAxisResolution(e) {
|
|
1661
|
-
let t =
|
|
1696
|
+
let t = i(e);
|
|
1662
1697
|
return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
|
|
1663
1698
|
}
|
|
1664
1699
|
getLegendResolution(e) {
|
|
1665
|
-
let t =
|
|
1700
|
+
let t = i(e);
|
|
1666
1701
|
return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
|
|
1667
1702
|
}
|
|
1668
1703
|
getConfiguredResolution(e, t) {
|
|
@@ -1675,14 +1710,14 @@ var W = class {
|
|
|
1675
1710
|
return "independent";
|
|
1676
1711
|
}
|
|
1677
1712
|
getBaseUrl() {
|
|
1678
|
-
return j(() => this.dataParent?.getBaseUrl(),
|
|
1713
|
+
return j(() => this.dataParent?.getBaseUrl(), Be(this.spec.baseUrl));
|
|
1679
1714
|
}
|
|
1680
1715
|
isPickingSupported() {
|
|
1681
1716
|
return !0;
|
|
1682
1717
|
}
|
|
1683
1718
|
getTitleText() {
|
|
1684
|
-
let
|
|
1685
|
-
if (
|
|
1719
|
+
let e = this.spec.title;
|
|
1720
|
+
if (e) return s(e) ? e : n(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
|
|
1686
1721
|
}
|
|
1687
1722
|
_cache(e, t) {
|
|
1688
1723
|
return te(this, e, t);
|
|
@@ -1706,16 +1741,16 @@ var W = class {
|
|
|
1706
1741
|
}
|
|
1707
1742
|
propagateInteraction(e) {}
|
|
1708
1743
|
};
|
|
1709
|
-
function
|
|
1744
|
+
function $e(e) {
|
|
1710
1745
|
return "unitsPerPixel" in e;
|
|
1711
1746
|
}
|
|
1712
|
-
function
|
|
1713
|
-
let
|
|
1714
|
-
if (
|
|
1715
|
-
if (
|
|
1716
|
-
if (
|
|
1717
|
-
let r = (
|
|
1718
|
-
let n =
|
|
1747
|
+
function et(e) {
|
|
1748
|
+
let t = "opacity" in e.spec ? e.spec.opacity : void 0;
|
|
1749
|
+
if (t !== void 0) {
|
|
1750
|
+
if (h(t)) return (e) => e * t;
|
|
1751
|
+
if ($e(t)) {
|
|
1752
|
+
let r = (t) => {
|
|
1753
|
+
let n = e.getScaleResolution(t), r = n?.getScale();
|
|
1719
1754
|
if ([
|
|
1720
1755
|
"linear",
|
|
1721
1756
|
"index",
|
|
@@ -1724,44 +1759,44 @@ function $e(t) {
|
|
|
1724
1759
|
scale: r,
|
|
1725
1760
|
scaleResolution: n
|
|
1726
1761
|
};
|
|
1727
|
-
}, i =
|
|
1728
|
-
if (!
|
|
1729
|
-
let a = () => 1, o = [],
|
|
1730
|
-
let
|
|
1762
|
+
}, i = nt(t.values, "opacity.values", e);
|
|
1763
|
+
if (!d(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
|
|
1764
|
+
let a = () => 1, o = [], s = () => {
|
|
1765
|
+
let t = tt(nt(o.map((e) => e()), "opacity.unitsPerPixel", e), i, e), n = re().domain(t.unitsPerPixel).range(t.values).clamp(!0);
|
|
1731
1766
|
a = (e) => n(e);
|
|
1732
1767
|
};
|
|
1733
|
-
o =
|
|
1734
|
-
if (
|
|
1735
|
-
let
|
|
1736
|
-
|
|
1768
|
+
o = t.unitsPerPixel.map((t) => {
|
|
1769
|
+
if (n(t)) {
|
|
1770
|
+
let n = e.paramRuntime.watchExpression(t.expr, () => {
|
|
1771
|
+
s(), e.context.animator.requestRender();
|
|
1737
1772
|
});
|
|
1738
|
-
return () =>
|
|
1739
|
-
} else return () =>
|
|
1740
|
-
}),
|
|
1741
|
-
let
|
|
1773
|
+
return () => n(null);
|
|
1774
|
+
} else return () => t;
|
|
1775
|
+
}), s();
|
|
1776
|
+
let c = (e) => {
|
|
1742
1777
|
let t = e.scaleResolution.getAxisLength() || 1e3;
|
|
1743
|
-
return
|
|
1744
|
-
},
|
|
1745
|
-
if (
|
|
1746
|
-
let
|
|
1747
|
-
if (
|
|
1748
|
-
else if (
|
|
1749
|
-
else if (n)
|
|
1750
|
-
else throw new _("Cannot find a resolved quantitative x or y scale for dynamic opacity!",
|
|
1778
|
+
return ee(e.scale.domain()) / t;
|
|
1779
|
+
}, l;
|
|
1780
|
+
if (t.channel === "auto") {
|
|
1781
|
+
let t = r("x"), n = r("y");
|
|
1782
|
+
if (t && n) l = () => (c(t) + c(n)) / 2;
|
|
1783
|
+
else if (t) l = () => c(t);
|
|
1784
|
+
else if (n) l = () => c(n);
|
|
1785
|
+
else throw new _("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
|
|
1751
1786
|
} else {
|
|
1752
|
-
let
|
|
1753
|
-
if (!
|
|
1754
|
-
|
|
1787
|
+
let n = t.channel ? r(t.channel) : r("x") ?? r("y");
|
|
1788
|
+
if (!n) throw new _("Cannot find a resolved quantitative scale for dynamic opacity!", e);
|
|
1789
|
+
l = () => c(n);
|
|
1755
1790
|
}
|
|
1756
|
-
return (e) => a(
|
|
1757
|
-
} else if (
|
|
1758
|
-
let
|
|
1759
|
-
return (
|
|
1791
|
+
return (e) => a(l()) * e;
|
|
1792
|
+
} else if (n(t)) {
|
|
1793
|
+
let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
|
|
1794
|
+
return (e) => n(null) * e;
|
|
1760
1795
|
}
|
|
1761
1796
|
}
|
|
1762
1797
|
return q;
|
|
1763
1798
|
}
|
|
1764
|
-
function
|
|
1799
|
+
function tt(e, t, n) {
|
|
1765
1800
|
if (!e.length) throw new _("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
|
|
1766
1801
|
if (e.length !== t.length) throw new _("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
|
|
1767
1802
|
e.forEach((e, t) => {
|
|
@@ -1779,40 +1814,40 @@ function et(e, t, n) {
|
|
|
1779
1814
|
values: a
|
|
1780
1815
|
};
|
|
1781
1816
|
}
|
|
1782
|
-
function
|
|
1783
|
-
if (!
|
|
1817
|
+
function nt(e, t, n) {
|
|
1818
|
+
if (!d(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
|
|
1784
1819
|
return e.map((e, r) => {
|
|
1785
|
-
if (!
|
|
1820
|
+
if (!h(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
|
|
1786
1821
|
return e;
|
|
1787
1822
|
});
|
|
1788
1823
|
}
|
|
1789
1824
|
var J = (e) => !!e && typeof e == "object" && "step" in e;
|
|
1790
|
-
function
|
|
1825
|
+
function rt(e) {
|
|
1791
1826
|
return typeof e == "number" && Number.isFinite(e);
|
|
1792
1827
|
}
|
|
1793
1828
|
var Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap();
|
|
1794
|
-
function rt(e, t) {
|
|
1795
|
-
at(e, t, "Import");
|
|
1796
|
-
}
|
|
1797
1829
|
function it(e, t) {
|
|
1798
|
-
|
|
1830
|
+
ot(e, t, "Import");
|
|
1831
|
+
}
|
|
1832
|
+
function at(e, t) {
|
|
1833
|
+
ot(e, t, "View");
|
|
1799
1834
|
}
|
|
1800
|
-
function
|
|
1835
|
+
function ot(e, t, n) {
|
|
1801
1836
|
if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
|
|
1802
1837
|
Y.set(e, { name: t });
|
|
1803
1838
|
}
|
|
1804
|
-
function
|
|
1839
|
+
function st(e) {
|
|
1805
1840
|
return Y.get(e);
|
|
1806
1841
|
}
|
|
1807
|
-
function
|
|
1842
|
+
function ct(e, t = {}) {
|
|
1808
1843
|
let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
|
|
1809
1844
|
X.set(e, n);
|
|
1810
1845
|
}
|
|
1811
|
-
function
|
|
1812
|
-
|
|
1846
|
+
function lt(e, t = {}) {
|
|
1847
|
+
Ue(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
|
|
1813
1848
|
}
|
|
1814
|
-
function
|
|
1815
|
-
return e.getLayoutAncestors().some(
|
|
1849
|
+
function ut(e) {
|
|
1850
|
+
return e.getLayoutAncestors().some(Ge);
|
|
1816
1851
|
}
|
|
1817
1852
|
function Z(e) {
|
|
1818
1853
|
let t = e.getDataAncestors(), n = [];
|
|
@@ -1822,7 +1857,7 @@ function Z(e) {
|
|
|
1822
1857
|
}
|
|
1823
1858
|
return n;
|
|
1824
1859
|
}
|
|
1825
|
-
function
|
|
1860
|
+
function dt(e) {
|
|
1826
1861
|
let t = e.explicitName;
|
|
1827
1862
|
if (!t) throw Error("Cannot build a selector for a view without a name.");
|
|
1828
1863
|
return {
|
|
@@ -1830,43 +1865,43 @@ function ut(e) {
|
|
|
1830
1865
|
view: t
|
|
1831
1866
|
};
|
|
1832
1867
|
}
|
|
1833
|
-
function
|
|
1868
|
+
function ft(e, t) {
|
|
1834
1869
|
if (!t) throw Error("Cannot build a selector for a parameter without a name.");
|
|
1835
1870
|
return {
|
|
1836
1871
|
scope: Z(e),
|
|
1837
1872
|
param: t
|
|
1838
1873
|
};
|
|
1839
1874
|
}
|
|
1840
|
-
function
|
|
1841
|
-
return
|
|
1875
|
+
function pt(e) {
|
|
1876
|
+
return xt(e), "p:" + JSON.stringify({
|
|
1842
1877
|
scope: e.scope,
|
|
1843
1878
|
param: e.param
|
|
1844
1879
|
});
|
|
1845
1880
|
}
|
|
1846
|
-
function
|
|
1881
|
+
function mt(e, t) {
|
|
1847
1882
|
e.visit((e) => {
|
|
1848
|
-
let n =
|
|
1883
|
+
let n = We(e);
|
|
1849
1884
|
if (n === "excludeSubtree") return G;
|
|
1850
1885
|
if (n !== "exclude") return t(e);
|
|
1851
1886
|
});
|
|
1852
1887
|
}
|
|
1853
|
-
function
|
|
1888
|
+
function ht(e, t) {
|
|
1854
1889
|
e.visit((e) => {
|
|
1855
1890
|
let n = X.get(e);
|
|
1856
1891
|
if (n === "excludeSubtree") return G;
|
|
1857
1892
|
if (n !== "exclude") return t(e);
|
|
1858
1893
|
});
|
|
1859
1894
|
}
|
|
1860
|
-
function
|
|
1861
|
-
if (
|
|
1895
|
+
function gt(e, t) {
|
|
1896
|
+
if (St(t), !At(e, t.scope)) return;
|
|
1862
1897
|
let n = [];
|
|
1863
1898
|
if ($(e, t.scope, (e) => {
|
|
1864
1899
|
e.explicitName === t.view && n.push(e);
|
|
1865
1900
|
}, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
|
|
1866
1901
|
if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
|
|
1867
1902
|
}
|
|
1868
|
-
function
|
|
1869
|
-
if (
|
|
1903
|
+
function _t(e, t) {
|
|
1904
|
+
if (xt(t), !At(e, t.scope)) return;
|
|
1870
1905
|
let n = [];
|
|
1871
1906
|
if ($(e, t.scope, (e) => {
|
|
1872
1907
|
for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Q(i) && n.push({
|
|
@@ -1876,54 +1911,54 @@ function gt(e, t) {
|
|
|
1876
1911
|
}), n.length === 1) return n[0];
|
|
1877
1912
|
if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
|
|
1878
1913
|
}
|
|
1879
|
-
function
|
|
1914
|
+
function vt(e, t) {
|
|
1880
1915
|
e.visit((e) => {
|
|
1881
1916
|
let n = X.get(e);
|
|
1882
1917
|
if (n === "excludeSubtree") return G;
|
|
1883
1918
|
if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Q(r) && t({
|
|
1884
1919
|
view: e,
|
|
1885
1920
|
param: r,
|
|
1886
|
-
selector:
|
|
1921
|
+
selector: ft(e, n)
|
|
1887
1922
|
});
|
|
1888
1923
|
});
|
|
1889
1924
|
}
|
|
1890
|
-
function
|
|
1925
|
+
function yt(e) {
|
|
1891
1926
|
let t = [];
|
|
1892
|
-
return
|
|
1927
|
+
return vt(e, (e) => t.push(e)), t;
|
|
1893
1928
|
}
|
|
1894
|
-
function
|
|
1929
|
+
function bt(e) {
|
|
1895
1930
|
let t = [];
|
|
1896
|
-
for (let n of
|
|
1897
|
-
let r =
|
|
1898
|
-
|
|
1931
|
+
for (let n of Ct(e)) {
|
|
1932
|
+
let r = wt(n);
|
|
1933
|
+
Et(e, r, t), Dt(e, r, t);
|
|
1899
1934
|
}
|
|
1900
1935
|
return t;
|
|
1901
1936
|
}
|
|
1902
|
-
function
|
|
1937
|
+
function xt(e) {
|
|
1903
1938
|
if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
|
|
1904
1939
|
if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
|
|
1905
1940
|
}
|
|
1906
|
-
function
|
|
1941
|
+
function St(e) {
|
|
1907
1942
|
if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
|
|
1908
1943
|
if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
|
|
1909
1944
|
}
|
|
1910
|
-
function Q(
|
|
1911
|
-
return
|
|
1945
|
+
function Q(t) {
|
|
1946
|
+
return t.persist === !1 ? !1 : e(t) ? !0 : c(t) ? !!t.bind : !1;
|
|
1912
1947
|
}
|
|
1913
|
-
function
|
|
1948
|
+
function Ct(e) {
|
|
1914
1949
|
let t = /* @__PURE__ */ new Set([e]);
|
|
1915
1950
|
return e.visit((e) => {
|
|
1916
1951
|
let n = Y.get(e);
|
|
1917
1952
|
n && typeof n.name == "string" && t.add(e);
|
|
1918
1953
|
}), Array.from(t);
|
|
1919
1954
|
}
|
|
1920
|
-
function
|
|
1955
|
+
function wt(e) {
|
|
1921
1956
|
return Z(e);
|
|
1922
1957
|
}
|
|
1923
|
-
function
|
|
1958
|
+
function Tt(e) {
|
|
1924
1959
|
return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
|
|
1925
1960
|
}
|
|
1926
|
-
function
|
|
1961
|
+
function Et(e, t, n) {
|
|
1927
1962
|
let r = /* @__PURE__ */ new Map();
|
|
1928
1963
|
$(e, t, (e) => {
|
|
1929
1964
|
for (let [t, n] of e.paramRuntime.paramConfigs) {
|
|
@@ -1936,15 +1971,15 @@ function Tt(e, t, n) {
|
|
|
1936
1971
|
if (i.length <= 1) continue;
|
|
1937
1972
|
let r = i.map((e) => e.getPathString()).join(", ");
|
|
1938
1973
|
n.push({
|
|
1939
|
-
message: "Bookmarkable parameter \"" + e + "\" is not unique within " +
|
|
1974
|
+
message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Tt(t) + ". Found in: " + r + ".",
|
|
1940
1975
|
scope: t
|
|
1941
1976
|
});
|
|
1942
1977
|
}
|
|
1943
1978
|
}
|
|
1944
|
-
function
|
|
1945
|
-
let r =
|
|
1979
|
+
function Dt(e, t, n) {
|
|
1980
|
+
let r = Ot(e, t);
|
|
1946
1981
|
if (!r.length) return;
|
|
1947
|
-
let i = r.filter((e) =>
|
|
1982
|
+
let i = r.filter((e) => kt(e));
|
|
1948
1983
|
if (i.length <= 1) return;
|
|
1949
1984
|
let a = /* @__PURE__ */ new Map();
|
|
1950
1985
|
for (let e of i) {
|
|
@@ -1952,11 +1987,11 @@ function Et(e, t, n) {
|
|
|
1952
1987
|
typeof n != "string" || !n.length || a.set(n, (a.get(n) ?? 0) + 1);
|
|
1953
1988
|
}
|
|
1954
1989
|
for (let [e, r] of a) r > 1 && n.push({
|
|
1955
|
-
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " +
|
|
1990
|
+
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Tt(t) + ".",
|
|
1956
1991
|
scope: t
|
|
1957
1992
|
});
|
|
1958
1993
|
}
|
|
1959
|
-
function
|
|
1994
|
+
function Ot(e, t) {
|
|
1960
1995
|
let n = [];
|
|
1961
1996
|
return $(e, t, (e) => {
|
|
1962
1997
|
if (Z(e).length !== t.length + 1) return;
|
|
@@ -1964,7 +1999,7 @@ function Dt(e, t) {
|
|
|
1964
1999
|
!r || typeof r.name != "string" || n.push(e);
|
|
1965
2000
|
}, { includeNamedImportRoots: !0 }), n;
|
|
1966
2001
|
}
|
|
1967
|
-
function
|
|
2002
|
+
function kt(e) {
|
|
1968
2003
|
let t = !1;
|
|
1969
2004
|
return e.visit((e) => {
|
|
1970
2005
|
let n = X.get(e);
|
|
@@ -1974,7 +2009,7 @@ function Ot(e) {
|
|
|
1974
2009
|
}
|
|
1975
2010
|
}), t;
|
|
1976
2011
|
}
|
|
1977
|
-
function
|
|
2012
|
+
function At(e, t) {
|
|
1978
2013
|
let n = e, r = [];
|
|
1979
2014
|
for (let i of t) {
|
|
1980
2015
|
if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
|
|
@@ -1996,20 +2031,20 @@ function $(e, t, n, r = {}) {
|
|
|
1996
2031
|
e.visit((e) => {
|
|
1997
2032
|
let r = Y.get(e), a = X.get(e);
|
|
1998
2033
|
if (a === "excludeSubtree") return G;
|
|
1999
|
-
if (a !== "exclude" &&
|
|
2034
|
+
if (a !== "exclude" && jt(e, t, r, i)) return n(e);
|
|
2000
2035
|
});
|
|
2001
2036
|
}
|
|
2002
|
-
function
|
|
2037
|
+
function jt(e, t, n, r) {
|
|
2003
2038
|
let i = Z(e);
|
|
2004
|
-
return
|
|
2005
|
-
}
|
|
2006
|
-
function jt(e, t) {
|
|
2007
|
-
return e.length === t.length && Mt(e, t);
|
|
2039
|
+
return Mt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Nt(t, i);
|
|
2008
2040
|
}
|
|
2009
2041
|
function Mt(e, t) {
|
|
2042
|
+
return e.length === t.length && Nt(e, t);
|
|
2043
|
+
}
|
|
2044
|
+
function Nt(e, t) {
|
|
2010
2045
|
if (e.length > t.length) return !1;
|
|
2011
2046
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
2012
2047
|
return !0;
|
|
2013
2048
|
}
|
|
2014
2049
|
//#endregion
|
|
2015
|
-
export { M as A,
|
|
2050
|
+
export { M as A, se as B, ze as C, Ne as D, R as E, b as F, de as H, ue as I, ce as L, k as M, ye as N, N as O, y as P, E as R, He as S, Fe as T, le as U, me as V, K as _, ut as a, Ge as b, ct as c, _t as d, gt as f, G as g, mt as h, dt as i, xe as j, j as k, it as l, ht as m, st as n, pt as o, bt as p, Z as r, lt as s, yt as t, at as u, Qe as v, z as w, Ke as x, Je as y, T as z };
|