@genome-spy/app 1.1.0 → 1.2.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-BgZUOeB-.js → agentApi-8hMSlqAQ.js} +8459 -6960
- package/dist/agentApi.es.js +5609 -4236
- package/dist/agentShared.es.js +9 -9
- package/dist/{canvas2d-DiPQvNtZ.js → canvas2d-Bd8H8MMo.js} +149 -134
- package/dist/{canvas2d-t_N10CeW.js → canvas2d-D6VYooRf.js} +136 -122
- package/dist/{clipOptions-Cba4I0AO.js → clipOptions-DElJ8dTZ.js} +2274 -2080
- package/dist/{clipOptions-B5PibDq3.js → clipOptions-D_wBNhzs.js} +2121 -1957
- package/dist/{viewIdentityRegistry-BW415b3o.js → containerView-CRJSc4bM.js} +24 -31
- package/dist/{viewIdentityRegistry-_F0E7nkA.js → containerView-aEVmYmkA.js} +24 -31
- package/dist/{debug-DP4WzTNo.js → debug-CQ0agCrd.js} +9 -9
- package/dist/{debug-CVAlrcZt.js → debug-DkIMiGdW.js} +10 -10
- package/dist/index.es.js +1133 -1115
- package/dist/index.js +757 -513
- package/dist/{indexer-En7gpvLN.js → indexer-DDC0YRGn.js} +1 -1
- package/dist/{indexer-DbFTKGlm.js → indexer-DOYMJ-Md.js} +1 -1
- package/dist/markUtils-CvLDz744.js +75 -0
- package/dist/{metadataChannels-DV62inJh.js → metadataChannels-DLSmx7kU.js} +6 -3
- package/dist/{order-R043xTpC.js → order-BVvkjDRT.js} +369 -316
- package/dist/{order-BkYCnwD7.js → order-DmMoZsi1.js} +360 -308
- package/dist/{rasterExport-C_FcNBkC.js → rasterExport-DxvowWjH.js} +4 -4
- package/dist/{rasterExport-Z7gs5346.js → rasterExport-jeRVq6kY.js} +4 -4
- package/dist/rasterization-CFogVB3B.js +50 -0
- package/dist/rasterization-DFj3Cvx4.js +67 -0
- package/dist/{rectangle-DE98gIxF.js → rectangle-DZTR6NFQ.js} +10 -1
- package/dist/rectangle-Dl4Dy0hS.js +191 -0
- package/dist/{renderCanvas2D-DK1c9TFK.js → renderCanvas2D-Bfm1NHFu.js} +99 -94
- package/dist/{renderCanvas2D-IM-A9DYG.js → renderCanvas2D-DVjhp834.js} +101 -96
- package/dist/scalePosition-0aeqp_kz.js +18 -0
- package/dist/schema.json +27198 -13709
- package/dist/style.css +1 -1
- package/dist/{svg-DW3tfUmm.js → svg-Bm2zxBPu.js} +316 -317
- package/dist/{svg-PabUdcDi.js → svg-CkfuhONt.js} +290 -291
- package/dist/{svgRasterizer-B6YtWLJs.js → svgRasterizer-DoRQEqFA.js} +3 -3
- package/dist/{svgRasterizer-BEVDyyS3.js → svgRasterizer-raDDhBF-.js} +3 -3
- package/dist/{vega-scale-Byaw1K8O.js → vega-scale-BoGHANI7.js} +90 -90
- package/dist/{vega-scale-Ctz_wa3z.js → vega-scale-o9TRyzYH.js} +699 -699
- package/dist/viewError-BkJeVYXA.js +33 -0
- package/dist/viewError-IYqyluc7.js +33 -0
- package/dist/{viewSelectors-KtD-QSN0.js → viewSelectors-7LyasQN-.js} +572 -478
- package/dist/{viewSelectors-DYz-PhTO.js → viewSelectors-CbmkSQRT.js} +624 -530
- package/dist/{viewUtils-BZGPseMx.js → viewUtils-DuddMNNw.js} +2146 -2016
- package/dist/{webgl-tdKf9SlZ.js → webgl-CQfvgnxo.js} +1247 -1137
- package/dist/{webgl-BKSGqHaz.js → webgl-DVYkXtiZ.js} +1495 -1386
- package/package.json +4 -4
- package/src/spec/view.d.ts +44 -5
- package/dist/rasterization-_-9JmSas.js +0 -63
- package/dist/viewError-BiR9VCgL.js +0 -29
|
@@ -1,83 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as g, n as
|
|
3
|
-
import { H as
|
|
4
|
-
import { t as
|
|
1
|
+
import { At as e, B as t, Bt as n, Dt as r, It as i, Lt as a, Nt as o, O as s, On as c, Pt as l, Sn as u, _n as d, bn as f, dn as p, ft as m, l as ee, o as te, pt as ne, t as re, xn as ie, y as h } from "./clipOptions-D_wBNhzs.js";
|
|
2
|
+
import { a as g, n as ae, r as oe, t as _ } from "./viewError-IYqyluc7.js";
|
|
3
|
+
import { H as se, m as v, y } from "./vega-scale-BoGHANI7.js";
|
|
4
|
+
import { t as ce } from "./warning-CpIIpk8e.js";
|
|
5
5
|
//#region ../core/src/view/layout/flexLayout.js
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function le(e, t, n = {}) {
|
|
7
|
+
let { sizes: r } = ve(e, t, n.spacing || 0);
|
|
8
|
+
return b(e, r, t, n);
|
|
9
|
+
}
|
|
10
|
+
function b(e, t, n, { spacing: r, devicePixelRatio: i, offset: a, reverse: o } = {}) {
|
|
11
|
+
r ||= 0, a ||= 0;
|
|
12
|
+
let s = 0, c = 0;
|
|
13
|
+
for (let n = 0; n < e.length; n++) s += t[n], C(e[n]) || c++;
|
|
14
|
+
let l = s + Math.max(0, c - 1) * r, u = i === void 0 ? (e) => e : (e) => Math.round(e * i) / i, d = 0, f = [], p = (e) => {
|
|
11
15
|
let t = d;
|
|
12
16
|
if (!t) return;
|
|
13
|
-
let
|
|
14
|
-
m -=
|
|
17
|
+
let n = (e ? r : 0) * (o ? -1 : 1);
|
|
18
|
+
m -= n;
|
|
15
19
|
for (let e = 0; e < t; e++) f.push({
|
|
16
|
-
location: m + (e + 1) / (t + 1) *
|
|
20
|
+
location: m + (e + 1) / (t + 1) * n,
|
|
17
21
|
size: 0
|
|
18
22
|
});
|
|
19
|
-
m +=
|
|
20
|
-
}, m =
|
|
21
|
-
if (e.length == 1 &&
|
|
23
|
+
m += n, d = 0;
|
|
24
|
+
}, m = o ? Math.max(n, l) : 0 + a;
|
|
25
|
+
if (e.length == 1 && C(e[0])) return [{
|
|
22
26
|
location: m,
|
|
23
27
|
size: 0
|
|
24
28
|
}];
|
|
25
|
-
for (let
|
|
26
|
-
let
|
|
27
|
-
if (
|
|
29
|
+
for (let n = 0; n < e.length; n++) {
|
|
30
|
+
let i = e[n];
|
|
31
|
+
if (C(i)) d++;
|
|
28
32
|
else {
|
|
29
33
|
p(f.length > 0);
|
|
30
|
-
let e =
|
|
31
|
-
|
|
34
|
+
let e = t[n];
|
|
35
|
+
o && (m -= e), f.push({
|
|
32
36
|
location: u(m),
|
|
33
37
|
size: u(e)
|
|
34
|
-
}),
|
|
38
|
+
}), o ? m -= r : m += e + r;
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
|
-
return m +=
|
|
41
|
+
return m += o ? r : -r, p(!1), f;
|
|
38
42
|
}
|
|
39
|
-
function
|
|
43
|
+
function ue(e, { spacing: t } = { spacing: 0 }) {
|
|
40
44
|
let n = 0;
|
|
41
|
-
for (let r of e) n += E(r) + (
|
|
45
|
+
for (let r of e) n += E(r) + (C(r) ? 0 : t);
|
|
42
46
|
return Math.max(0, n - t);
|
|
43
47
|
}
|
|
44
|
-
function
|
|
48
|
+
function de(e, t, { spacing: n = 0 } = {}) {
|
|
45
49
|
let r = [], i = [], a = 0, o = 0;
|
|
46
50
|
for (let [s, c] of e.entries()) {
|
|
47
|
-
let e = E(c), l = !
|
|
51
|
+
let e = E(c), l = !C(c), u = o && l ? n : 0;
|
|
48
52
|
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;
|
|
49
53
|
}
|
|
50
54
|
return i.length && r.push(i), r;
|
|
51
55
|
}
|
|
52
|
-
function
|
|
56
|
+
function fe(e) {
|
|
53
57
|
let t = 0, n = 0, r = 0, i, a = !0;
|
|
54
58
|
for (let o of e) {
|
|
55
59
|
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, E(o));
|
|
56
60
|
let e = D(o);
|
|
57
61
|
e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
|
|
58
62
|
}
|
|
59
|
-
return
|
|
63
|
+
return A({
|
|
60
64
|
px: t,
|
|
61
65
|
grow: n,
|
|
62
66
|
minPx: r,
|
|
63
67
|
maxPx: a ? i : void 0
|
|
64
68
|
});
|
|
65
69
|
}
|
|
66
|
-
function
|
|
67
|
-
let t = {
|
|
68
|
-
px:
|
|
69
|
-
grow: 0,
|
|
70
|
-
minPx:
|
|
71
|
-
maxPx:
|
|
72
|
-
},
|
|
73
|
-
for (let
|
|
74
|
-
|
|
75
|
-
let e = D(
|
|
76
|
-
e === void 0 ?
|
|
77
|
-
}
|
|
78
|
-
return
|
|
79
|
-
}
|
|
80
|
-
var
|
|
70
|
+
function pe(e, t = 0, n = 0) {
|
|
71
|
+
let r = Math.max(0, e.length - 1) * t, i = {
|
|
72
|
+
px: r,
|
|
73
|
+
grow: e.length ? 0 : n,
|
|
74
|
+
minPx: r,
|
|
75
|
+
maxPx: r
|
|
76
|
+
}, a = e.length > 0;
|
|
77
|
+
for (let t of e) {
|
|
78
|
+
i.px += w(t.px), i.grow += w(t.grow), i.minPx += E(t);
|
|
79
|
+
let e = D(t);
|
|
80
|
+
e === void 0 ? a = !1 : i.maxPx += e;
|
|
81
|
+
}
|
|
82
|
+
return a || delete i.maxPx, A(i);
|
|
83
|
+
}
|
|
84
|
+
var x = class e {
|
|
81
85
|
constructor(e, t) {
|
|
82
86
|
this.width = e, this.height = t;
|
|
83
87
|
}
|
|
@@ -88,31 +92,31 @@ var y = class e {
|
|
|
88
92
|
return this.#e(-e.width, -e.height);
|
|
89
93
|
}
|
|
90
94
|
#e(t, n) {
|
|
91
|
-
return new e(
|
|
95
|
+
return new e(k(this.width, t), k(this.height, n));
|
|
92
96
|
}
|
|
93
97
|
isGrowing() {
|
|
94
98
|
return !!(this.width.grow || this.height.grow);
|
|
95
99
|
}
|
|
96
|
-
},
|
|
100
|
+
}, me = Object.freeze({
|
|
97
101
|
px: 0,
|
|
98
102
|
grow: 0
|
|
99
|
-
}),
|
|
100
|
-
function
|
|
103
|
+
}), S = new x(me, me);
|
|
104
|
+
function C(e) {
|
|
101
105
|
return !e.px && !e.grow && !e.minPx;
|
|
102
106
|
}
|
|
103
|
-
function
|
|
107
|
+
function he(e, t) {
|
|
104
108
|
return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
|
|
105
109
|
}
|
|
106
|
-
function
|
|
110
|
+
function w(e) {
|
|
107
111
|
return e || 0;
|
|
108
112
|
}
|
|
109
|
-
function
|
|
110
|
-
return e && (
|
|
113
|
+
function ge(e) {
|
|
114
|
+
return e && (f(e.px) || f(e.grow) || f(e.minPx) || f(e.maxPx));
|
|
111
115
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
114
|
-
if (
|
|
115
|
-
if (
|
|
116
|
+
function _e(e) {
|
|
117
|
+
if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
|
|
118
|
+
if (ge(e)) return be(e), A(e);
|
|
119
|
+
if (f(e)) return {
|
|
116
120
|
px: e,
|
|
117
121
|
grow: 0
|
|
118
122
|
};
|
|
@@ -122,80 +126,89 @@ function he(e) {
|
|
|
122
126
|
};
|
|
123
127
|
throw Error(`Invalid sizeDef: ${e}`);
|
|
124
128
|
}
|
|
125
|
-
function
|
|
129
|
+
function ve(e, t, n = 0) {
|
|
126
130
|
let r = !1;
|
|
127
|
-
for (let t of e)
|
|
128
|
-
if (!r) return
|
|
131
|
+
for (let t of e) be(t), r ||= O(t);
|
|
132
|
+
if (!r) return ye(e, t, n);
|
|
129
133
|
let i = Array(e.length).fill(0), a = [];
|
|
130
|
-
for (let t = 0; t < e.length; t++)
|
|
134
|
+
for (let t = 0; t < e.length; t++) C(e[t]) || a.push(t);
|
|
131
135
|
let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
|
|
132
136
|
for (let t of a) {
|
|
133
137
|
let n = e[t];
|
|
134
|
-
|
|
138
|
+
w(n.grow) || (i[t] = T(w(n.px), n), c.add(t));
|
|
135
139
|
}
|
|
140
|
+
let l = 0;
|
|
136
141
|
for (;;) {
|
|
137
142
|
let t = 0, n = 0, r = 0;
|
|
138
|
-
for (let o of a) c.has(o) ? r += i[o] : (t +=
|
|
143
|
+
for (let o of a) c.has(o) ? r += i[o] : (t += w(e[o].px), n += w(e[o].grow));
|
|
139
144
|
if (!n) {
|
|
140
|
-
for (let t of a) c.has(t) || (i[t] = T(
|
|
145
|
+
for (let t of a) c.has(t) || (i[t] = T(w(e[t].px), e[t]), c.add(t));
|
|
141
146
|
break;
|
|
142
147
|
}
|
|
143
|
-
let o = Math.max(0, s - r - t)
|
|
148
|
+
let o = Math.max(0, s - r - t);
|
|
149
|
+
l = o / n;
|
|
150
|
+
let u = 0, d = [], f = [];
|
|
144
151
|
for (let t of a) {
|
|
145
152
|
if (c.has(t)) continue;
|
|
146
|
-
let r = e[t], a =
|
|
153
|
+
let r = e[t], a = w(r.px) + w(r.grow) / n * o, s = T(a, r);
|
|
147
154
|
i[t] = s;
|
|
148
|
-
let
|
|
149
|
-
|
|
155
|
+
let l = s - a;
|
|
156
|
+
u += l, l > 0 ? d.push(t) : l < 0 && f.push(t);
|
|
150
157
|
}
|
|
151
|
-
if (!
|
|
152
|
-
if (
|
|
153
|
-
else if (
|
|
158
|
+
if (!d.length && !f.length) break;
|
|
159
|
+
if (u > 0) for (let e of d) c.add(e);
|
|
160
|
+
else if (u < 0) for (let e of f) c.add(e);
|
|
154
161
|
else for (let e of a) c.add(e);
|
|
155
162
|
}
|
|
156
|
-
return
|
|
163
|
+
return {
|
|
164
|
+
sizes: i,
|
|
165
|
+
growth: l
|
|
166
|
+
};
|
|
157
167
|
}
|
|
158
|
-
function
|
|
168
|
+
function ye(e, t, n) {
|
|
159
169
|
let r = 0, i = 0;
|
|
160
|
-
for (let t of e) r +=
|
|
170
|
+
for (let t of e) r += w(t.px) + (C(t) ? 0 : n), i += w(t.grow);
|
|
161
171
|
r -= n;
|
|
162
172
|
let a = Math.max(0, t - r), o = Array(e.length);
|
|
163
173
|
for (let t = 0; t < e.length; t++) {
|
|
164
174
|
let n = e[t];
|
|
165
|
-
o[t] =
|
|
175
|
+
o[t] = C(n) ? 0 : w(n.px) + (i ? w(n.grow) / i * a : 0);
|
|
166
176
|
}
|
|
167
|
-
return
|
|
177
|
+
return {
|
|
178
|
+
sizes: o,
|
|
179
|
+
growth: i ? a / i : 0
|
|
180
|
+
};
|
|
168
181
|
}
|
|
169
|
-
function
|
|
182
|
+
function be(e) {
|
|
170
183
|
if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
|
|
171
184
|
}
|
|
172
185
|
function T(e, t) {
|
|
173
186
|
return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
|
|
174
187
|
}
|
|
175
188
|
function E(e) {
|
|
176
|
-
return T(
|
|
189
|
+
return T(w(e.px), e);
|
|
177
190
|
}
|
|
178
191
|
function D(e) {
|
|
179
|
-
return e.maxPx ?? (
|
|
192
|
+
return e.maxPx ?? (w(e.grow) ? void 0 : E(e));
|
|
180
193
|
}
|
|
181
|
-
function
|
|
194
|
+
function O(e) {
|
|
182
195
|
return e.minPx !== void 0 || e.maxPx !== void 0;
|
|
183
196
|
}
|
|
184
|
-
function
|
|
185
|
-
return
|
|
197
|
+
function k(e, t) {
|
|
198
|
+
return A({
|
|
186
199
|
px: (e.px ?? 0) + t,
|
|
187
200
|
grow: e.grow,
|
|
188
201
|
minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
|
|
189
202
|
maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
|
|
190
203
|
});
|
|
191
204
|
}
|
|
192
|
-
function
|
|
193
|
-
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i =
|
|
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 >
|
|
205
|
+
function A(e) {
|
|
206
|
+
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = O(e);
|
|
207
|
+
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 > w(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (w(t.grow) || e.maxPx < w(e.px)) && (t.maxPx = e.maxPx), t;
|
|
195
208
|
}
|
|
196
209
|
//#endregion
|
|
197
210
|
//#region ../core/src/view/layout/padding.js
|
|
198
|
-
var
|
|
211
|
+
var j = class e {
|
|
199
212
|
constructor(e, t, n, r) {
|
|
200
213
|
this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
|
|
201
214
|
}
|
|
@@ -230,35 +243,35 @@ var k = class e {
|
|
|
230
243
|
return this.top + this.bottom;
|
|
231
244
|
}
|
|
232
245
|
static createFromConfig(e) {
|
|
233
|
-
return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) :
|
|
246
|
+
return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : M;
|
|
234
247
|
}
|
|
235
248
|
static createFromRecord(t) {
|
|
236
249
|
return new e(t.top, t.right, t.bottom, t.left);
|
|
237
250
|
}
|
|
238
251
|
static zero() {
|
|
239
|
-
return
|
|
252
|
+
return M;
|
|
240
253
|
}
|
|
241
254
|
static createUniformPadding(t) {
|
|
242
255
|
return new e(t, t, t, t);
|
|
243
256
|
}
|
|
244
257
|
};
|
|
245
|
-
function
|
|
246
|
-
return t ? new
|
|
258
|
+
function xe(e, t, n = j.zero()) {
|
|
259
|
+
return t ? new j(t.top === !1 ? n.top : e.top, t.right === !1 ? n.right : e.right, t.bottom === !1 ? n.bottom : e.bottom, t.left === !1 ? n.left : e.left) : e;
|
|
247
260
|
}
|
|
248
|
-
var
|
|
249
|
-
Object.freeze(
|
|
261
|
+
var M = j.createUniformPadding(0);
|
|
262
|
+
Object.freeze(M);
|
|
250
263
|
//#endregion
|
|
251
264
|
//#region ../core/src/utils/url.js
|
|
252
|
-
var
|
|
253
|
-
function
|
|
254
|
-
if (t &&
|
|
265
|
+
var Se = /^([A-Za-z]+:)?\/\//;
|
|
266
|
+
function N(e, t) {
|
|
267
|
+
if (t && Se.test(t)) return t;
|
|
255
268
|
let n = typeof e == "function" ? e() : e;
|
|
256
269
|
if (!n) return t;
|
|
257
270
|
if (!t) return n;
|
|
258
271
|
if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
|
|
259
|
-
return
|
|
272
|
+
return P(n) + t;
|
|
260
273
|
}
|
|
261
|
-
function
|
|
274
|
+
function Ce(e, t, n = we()) {
|
|
262
275
|
let r = typeof e == "function" ? e() : e;
|
|
263
276
|
if (!t) return r;
|
|
264
277
|
try {
|
|
@@ -268,19 +281,19 @@ function Se(e, t, n = Ce()) {
|
|
|
268
281
|
}
|
|
269
282
|
if (n) return new URL(t, n).href;
|
|
270
283
|
} catch {}
|
|
271
|
-
return
|
|
284
|
+
return N(r, t);
|
|
272
285
|
}
|
|
273
|
-
function
|
|
286
|
+
function P(e) {
|
|
274
287
|
let t = e.replace(/[^/]*$/, "");
|
|
275
288
|
return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
|
|
276
289
|
}
|
|
277
|
-
function
|
|
290
|
+
function we() {
|
|
278
291
|
if (typeof document < "u" && document.baseURI) return document.baseURI;
|
|
279
292
|
if (typeof window < "u" && window.location?.href) return window.location.href;
|
|
280
293
|
}
|
|
281
294
|
//#endregion
|
|
282
295
|
//#region ../../node_modules/flatqueue/index.js
|
|
283
|
-
var
|
|
296
|
+
var F = class {
|
|
284
297
|
constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
|
|
285
298
|
let r = e !== Infinity;
|
|
286
299
|
this.ids = r ? new n(e) : [], this.values = r ? new t(e) : [], this.capacity = e, this.length = 0;
|
|
@@ -321,11 +334,11 @@ var N = class {
|
|
|
321
334
|
shrink() {
|
|
322
335
|
Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
|
|
323
336
|
}
|
|
324
|
-
},
|
|
325
|
-
function
|
|
337
|
+
}, I = Symbol("runtimeNode"), L = 1e6;
|
|
338
|
+
function Te(e) {
|
|
326
339
|
return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
|
|
327
340
|
}
|
|
328
|
-
function
|
|
341
|
+
function R(e, t, n = !0) {
|
|
329
342
|
let r = {
|
|
330
343
|
id: e.id,
|
|
331
344
|
name: e.name,
|
|
@@ -340,7 +353,7 @@ function I(e, t, n = !0) {
|
|
|
340
353
|
};
|
|
341
354
|
}
|
|
342
355
|
};
|
|
343
|
-
return Object.defineProperty(r,
|
|
356
|
+
return Object.defineProperty(r, I, {
|
|
344
357
|
enumerable: !1,
|
|
345
358
|
configurable: !1,
|
|
346
359
|
writable: !1,
|
|
@@ -349,18 +362,18 @@ function I(e, t, n = !0) {
|
|
|
349
362
|
t(e);
|
|
350
363
|
} }) : r;
|
|
351
364
|
}
|
|
352
|
-
function
|
|
353
|
-
let t = e[
|
|
365
|
+
function Ee(e) {
|
|
366
|
+
let t = e[I];
|
|
354
367
|
if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
|
|
355
368
|
return t;
|
|
356
369
|
}
|
|
357
|
-
function Ee(e) {
|
|
358
|
-
return typeof e.rank == "number" ? e.rank : Te(e).rank;
|
|
359
|
-
}
|
|
360
370
|
function De(e) {
|
|
371
|
+
return typeof e.rank == "number" ? e.rank : Ee(e).rank;
|
|
372
|
+
}
|
|
373
|
+
function Oe(e) {
|
|
361
374
|
for (let t of e) t();
|
|
362
375
|
}
|
|
363
|
-
var
|
|
376
|
+
var ke = class {
|
|
364
377
|
#e = 1;
|
|
365
378
|
#t = 1;
|
|
366
379
|
#n = 0;
|
|
@@ -374,12 +387,13 @@ var Oe = class {
|
|
|
374
387
|
#u = /* @__PURE__ */ new Map();
|
|
375
388
|
#d = /* @__PURE__ */ new Set();
|
|
376
389
|
#f = /* @__PURE__ */ new Set();
|
|
377
|
-
#p = new
|
|
378
|
-
#m = new
|
|
390
|
+
#p = new F();
|
|
391
|
+
#m = new F();
|
|
379
392
|
#h = /* @__PURE__ */ new Set();
|
|
380
393
|
#g;
|
|
394
|
+
#_;
|
|
381
395
|
constructor(e = {}) {
|
|
382
|
-
this.#g =
|
|
396
|
+
this.#g = Te(e.lifecycleRegistry), this.#_ = e.onError;
|
|
383
397
|
}
|
|
384
398
|
createWritable(e, t, n, r, i = {}) {
|
|
385
399
|
let a = "n" + this.#e++, o = i.notify ?? !0, s = {
|
|
@@ -397,20 +411,20 @@ var Oe = class {
|
|
|
397
411
|
}
|
|
398
412
|
}, c = (e) => {
|
|
399
413
|
if (s.disposed) throw Error("Cannot set disposed parameter \"" + t + "\" (" + a + ").");
|
|
400
|
-
e !== s.value && (s.value = e, o && this.#
|
|
414
|
+
e !== s.value && (s.value = e, o && this.#y(s.listeners));
|
|
401
415
|
}, l = () => {
|
|
402
416
|
s.disposed = !0, s.listeners.clear(), u();
|
|
403
417
|
}, u = this.#g(e, l);
|
|
404
|
-
return Object.assign(
|
|
418
|
+
return Object.assign(R(s, c, o), { dispose: l });
|
|
405
419
|
}
|
|
406
420
|
computed(e, t, n, r, i = {}) {
|
|
407
|
-
return this.#
|
|
421
|
+
return this.#v(e, t, n, r, i);
|
|
408
422
|
}
|
|
409
423
|
operation(e, t, n, r, i, a = {}) {
|
|
410
|
-
return this.#
|
|
424
|
+
return this.#v(e, t, n, r, a, i);
|
|
411
425
|
}
|
|
412
|
-
#
|
|
413
|
-
let o = this.#
|
|
426
|
+
#v(e, t, n, r, i, a) {
|
|
427
|
+
let o = this.#S(() => s.dependencies), s = {
|
|
414
428
|
id: "n" + this.#e++,
|
|
415
429
|
name: t,
|
|
416
430
|
kind: "derived",
|
|
@@ -432,31 +446,31 @@ var Oe = class {
|
|
|
432
446
|
};
|
|
433
447
|
a?.(s.value);
|
|
434
448
|
let c = () => s.dependencies.map((e) => e.subscribe(() => {
|
|
435
|
-
s.disposed || (this.#
|
|
449
|
+
s.disposed || (this.#C(s), e.propagation === "sync" && this.flushNow());
|
|
436
450
|
})), l = c(), u = () => {
|
|
437
451
|
s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
|
|
438
452
|
}, d = this.#g(e, u);
|
|
439
|
-
return Object.assign(
|
|
453
|
+
return Object.assign(R(s), {
|
|
440
454
|
dispose: u,
|
|
441
455
|
rebind: (e, n) => {
|
|
442
456
|
if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
|
|
443
457
|
let r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
444
|
-
let n = e[
|
|
458
|
+
let n = e[I];
|
|
445
459
|
if (n === s) throw Error("Reactive dependency cycle: " + t);
|
|
446
460
|
if (!r.has(n)) {
|
|
447
461
|
r.add(n);
|
|
448
462
|
for (let e of n?.dependencies ?? []) i(e);
|
|
449
463
|
}
|
|
450
464
|
};
|
|
451
|
-
e.forEach(i), l.forEach((e) => e()), s.dependencies = e, s.fn = n, this.#n++, l = c(), this.#
|
|
452
|
-
for (let e of this.#d) this.#p.push(e, this.#
|
|
465
|
+
e.forEach(i), l.forEach((e) => e()), s.dependencies = e, s.fn = n, this.#n++, l = c(), this.#C(s), this.#p.clear();
|
|
466
|
+
for (let e of this.#d) this.#p.push(e, this.#T(e.rank));
|
|
453
467
|
this.#m.clear();
|
|
454
|
-
for (let e of this.#f) this.#m.push(e, this.#
|
|
468
|
+
for (let e of this.#f) this.#m.push(e, this.#T(e.rank));
|
|
455
469
|
}
|
|
456
470
|
});
|
|
457
471
|
}
|
|
458
472
|
effect(e, t, n) {
|
|
459
|
-
let r = this.#
|
|
473
|
+
let r = this.#S(() => t), i = {
|
|
460
474
|
id: "n" + this.#e++,
|
|
461
475
|
get rank() {
|
|
462
476
|
return r();
|
|
@@ -464,7 +478,7 @@ var Oe = class {
|
|
|
464
478
|
disposed: !1,
|
|
465
479
|
fn: n
|
|
466
480
|
}, a = t.map((e) => e.subscribe(() => {
|
|
467
|
-
i.disposed || (this.#
|
|
481
|
+
i.disposed || (this.#w(i), e.propagation === "sync" && this.flushNow());
|
|
468
482
|
})), o = () => {
|
|
469
483
|
i.disposed || (i.disposed = !0, s(), a.forEach((e) => e()), this.#f.delete(i));
|
|
470
484
|
}, s = this.#g(e, o);
|
|
@@ -472,10 +486,12 @@ var Oe = class {
|
|
|
472
486
|
}
|
|
473
487
|
runInTransaction(e) {
|
|
474
488
|
this.#r += 1;
|
|
489
|
+
let t = !1;
|
|
475
490
|
try {
|
|
476
|
-
|
|
491
|
+
let n = e();
|
|
492
|
+
return t = !0, n;
|
|
477
493
|
} finally {
|
|
478
|
-
--this.#r, this.#r === 0 && (this.#i ? (this.#i = !1, this.flushNow()) : this.#
|
|
494
|
+
--this.#r, this.#r === 0 && (t ? this.#i ? (this.#i = !1, this.flushNow()) : this.#E() : this.#i = !1);
|
|
479
495
|
}
|
|
480
496
|
}
|
|
481
497
|
flushNow({ afterTransaction: e = !1 } = {}) {
|
|
@@ -491,14 +507,14 @@ var Oe = class {
|
|
|
491
507
|
for (; this.#p.length;) {
|
|
492
508
|
let e = this.#p.pop();
|
|
493
509
|
if (this.#d.delete(e), e.disposed) continue;
|
|
494
|
-
this.#
|
|
510
|
+
this.#x(e, e.name);
|
|
495
511
|
let t, n;
|
|
496
512
|
try {
|
|
497
513
|
t = e.fn(), n = !e.equals(t, e.value), n && e.apply?.(t);
|
|
498
514
|
} catch (t) {
|
|
499
|
-
throw this.#
|
|
515
|
+
throw this.#C(e), t;
|
|
500
516
|
}
|
|
501
|
-
n && (e.value = t, this.#
|
|
517
|
+
n && (e.value = t, this.#y(e.listeners));
|
|
502
518
|
}
|
|
503
519
|
if (this.#l.size) {
|
|
504
520
|
let e = Infinity, n;
|
|
@@ -515,20 +531,16 @@ var Oe = class {
|
|
|
515
531
|
if (!e) break;
|
|
516
532
|
n = e;
|
|
517
533
|
}
|
|
518
|
-
t = this.#l.get(n).onError, this.#l.delete(n), this.#
|
|
534
|
+
t = this.#l.get(n).onError, this.#l.delete(n), this.#x(n, "streaming update"), n(), t = void 0;
|
|
519
535
|
} else if (this.#m.length) {
|
|
520
536
|
let e = this.#m.pop();
|
|
521
|
-
this.#f.delete(e), e.disposed || (this.#
|
|
537
|
+
this.#f.delete(e), e.disposed || (this.#x(e, "effect " + e.id), e.fn());
|
|
522
538
|
}
|
|
523
539
|
}
|
|
524
540
|
} catch (e) {
|
|
525
|
-
|
|
526
|
-
this.#l.clear(), t?.(e);
|
|
527
|
-
for (let t of n) t.onError?.(e);
|
|
528
|
-
for (let t of this.#h) t.reject(e);
|
|
529
|
-
throw this.#h.clear(), e;
|
|
541
|
+
throw this.#b(e, t), e;
|
|
530
542
|
} finally {
|
|
531
|
-
this.#u.clear(), this.#o = !1, this.#
|
|
543
|
+
this.#u.clear(), this.#o = !1, this.#O();
|
|
532
544
|
}
|
|
533
545
|
}
|
|
534
546
|
requestUpdate(e, t = 0, n, r) {
|
|
@@ -536,26 +548,41 @@ var Oe = class {
|
|
|
536
548
|
rank: t,
|
|
537
549
|
onError: n,
|
|
538
550
|
prerequisites: r
|
|
539
|
-
}), this.#
|
|
551
|
+
}), this.#E();
|
|
540
552
|
}
|
|
541
553
|
cancelUpdate(e) {
|
|
542
554
|
this.#l.delete(e);
|
|
543
555
|
}
|
|
544
|
-
#
|
|
556
|
+
#y(e) {
|
|
545
557
|
this.#s++;
|
|
546
558
|
try {
|
|
547
|
-
|
|
559
|
+
Oe(e);
|
|
560
|
+
} catch (e) {
|
|
561
|
+
throw this.#c = !1, !this.#o && this.#s === 1 && this.#b(e), e;
|
|
548
562
|
} finally {
|
|
549
563
|
this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
|
|
550
564
|
}
|
|
551
565
|
}
|
|
552
|
-
#
|
|
566
|
+
#b(e, t) {
|
|
567
|
+
this.#a = !1;
|
|
568
|
+
let n = Array.from(this.#l.values());
|
|
569
|
+
this.#l.clear(), t?.(e);
|
|
570
|
+
for (let t of n) t.onError?.(e);
|
|
571
|
+
for (let t of this.#h) t.reject(e);
|
|
572
|
+
this.#h.clear();
|
|
573
|
+
try {
|
|
574
|
+
this.#_?.(e);
|
|
575
|
+
} catch (e) {
|
|
576
|
+
console.error(e);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
#x(e, t) {
|
|
553
580
|
let n = (this.#u.get(e) ?? 0) + 1;
|
|
554
581
|
if (n > 100) throw Error("Reactive propagation did not settle: " + t);
|
|
555
582
|
this.#u.set(e, n);
|
|
556
583
|
}
|
|
557
584
|
whenPropagated(e = {}) {
|
|
558
|
-
if (this.#
|
|
585
|
+
if (this.#D()) return Promise.resolve();
|
|
559
586
|
let { signal: t, timeoutMs: n } = e;
|
|
560
587
|
return t?.aborted ? Promise.reject(/* @__PURE__ */ Error("whenPropagated aborted")) : new Promise((e, r) => {
|
|
561
588
|
let i, a = () => {
|
|
@@ -571,43 +598,43 @@ var Oe = class {
|
|
|
571
598
|
t?.addEventListener("abort", s, { once: !0 }), n != null && (i = setTimeout(() => o.reject(/* @__PURE__ */ Error("whenPropagated timeout after " + n + " ms")), n)), this.#h.add(o);
|
|
572
599
|
});
|
|
573
600
|
}
|
|
574
|
-
#
|
|
601
|
+
#S(e) {
|
|
575
602
|
let t = -1, n = 0;
|
|
576
|
-
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e,
|
|
603
|
+
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, De(t)), 0), t = this.#n), n);
|
|
577
604
|
}
|
|
578
|
-
#
|
|
605
|
+
#C(e) {
|
|
579
606
|
if (this.#d.has(e)) {
|
|
580
|
-
this.#
|
|
607
|
+
this.#E();
|
|
581
608
|
return;
|
|
582
609
|
}
|
|
583
|
-
this.#d.add(e), this.#p.push(e, this.#
|
|
610
|
+
this.#d.add(e), this.#p.push(e, this.#T(e.rank)), this.#E();
|
|
584
611
|
}
|
|
585
|
-
#
|
|
612
|
+
#w(e) {
|
|
586
613
|
if (this.#f.has(e)) {
|
|
587
|
-
this.#
|
|
614
|
+
this.#E();
|
|
588
615
|
return;
|
|
589
616
|
}
|
|
590
|
-
this.#f.add(e), this.#m.push(e, this.#
|
|
617
|
+
this.#f.add(e), this.#m.push(e, this.#T(e.rank)), this.#E();
|
|
591
618
|
}
|
|
592
|
-
#
|
|
593
|
-
let t = this.#t %
|
|
594
|
-
return this.#t += 1, e *
|
|
619
|
+
#T(e) {
|
|
620
|
+
let t = this.#t % L;
|
|
621
|
+
return this.#t += 1, e * L + t;
|
|
595
622
|
}
|
|
596
|
-
#
|
|
623
|
+
#E() {
|
|
597
624
|
this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
|
|
598
625
|
this.#a && this.flushNow();
|
|
599
626
|
}));
|
|
600
627
|
}
|
|
601
|
-
#
|
|
628
|
+
#D() {
|
|
602
629
|
return this.#r === 0 && !this.#a && !this.#o && this.#p.length === 0 && this.#m.length === 0 && this.#d.size === 0 && this.#f.size === 0 && this.#l.size === 0;
|
|
603
630
|
}
|
|
604
|
-
#
|
|
605
|
-
if (this.#
|
|
631
|
+
#O() {
|
|
632
|
+
if (this.#D()) {
|
|
606
633
|
for (let e of this.#h) e.resolve();
|
|
607
634
|
this.#h.clear();
|
|
608
635
|
}
|
|
609
636
|
}
|
|
610
|
-
},
|
|
637
|
+
}, Ae = class {
|
|
611
638
|
#e = 1;
|
|
612
639
|
#t = /* @__PURE__ */ new Map();
|
|
613
640
|
createOwner(e, t) {
|
|
@@ -628,7 +655,7 @@ var Oe = class {
|
|
|
628
655
|
t.clear(), this.#t.delete(e);
|
|
629
656
|
}
|
|
630
657
|
}
|
|
631
|
-
},
|
|
658
|
+
}, je = class {
|
|
632
659
|
#e = 1;
|
|
633
660
|
#t = /* @__PURE__ */ new Map();
|
|
634
661
|
createRootScope(e) {
|
|
@@ -659,41 +686,41 @@ var Oe = class {
|
|
|
659
686
|
if (!t) throw Error("Unknown scope: " + e);
|
|
660
687
|
t.params.clear(), t.initializers.clear();
|
|
661
688
|
}
|
|
662
|
-
registerInitializer(e,
|
|
663
|
-
t
|
|
689
|
+
registerInitializer(e, t, r) {
|
|
690
|
+
n(t);
|
|
664
691
|
let i = this.#t.get(e);
|
|
665
692
|
if (!i) throw Error("Unknown scope: " + e);
|
|
666
|
-
if (i.params.has(
|
|
667
|
-
i.initializers.set(
|
|
693
|
+
if (i.params.has(t) || i.initializers.has(t)) throw Error(`Parameter "${t}" already exists in scope ${e}`);
|
|
694
|
+
i.initializers.set(t, {
|
|
668
695
|
initialize: r,
|
|
669
696
|
initializing: !1
|
|
670
697
|
});
|
|
671
698
|
}
|
|
672
|
-
register(e,
|
|
673
|
-
t
|
|
699
|
+
register(e, t, r) {
|
|
700
|
+
n(t);
|
|
674
701
|
let i = this.#t.get(e);
|
|
675
702
|
if (!i) throw Error("Unknown scope: " + e);
|
|
676
|
-
if (i.params.has(
|
|
677
|
-
return i.params.set(
|
|
703
|
+
if (i.params.has(t) || i.initializers.get(t)?.initializing === !1) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
|
|
704
|
+
return i.params.set(t, r), r;
|
|
678
705
|
}
|
|
679
|
-
resolve(e,
|
|
680
|
-
t
|
|
706
|
+
resolve(e, t) {
|
|
707
|
+
n(t);
|
|
681
708
|
let r = e;
|
|
682
709
|
for (; r;) {
|
|
683
710
|
let e = this.#t.get(r);
|
|
684
711
|
if (!e) throw Error("Unknown scope: " + r);
|
|
685
|
-
let
|
|
686
|
-
if (
|
|
687
|
-
if (
|
|
688
|
-
|
|
712
|
+
let n = e.initializers.get(t);
|
|
713
|
+
if (n) {
|
|
714
|
+
if (n.initializing) throw Error(`Parameter dependency cycle while initializing "${t}" in ${r}.`);
|
|
715
|
+
n.initializing = !0;
|
|
689
716
|
try {
|
|
690
|
-
if (
|
|
691
|
-
e.initializers.delete(
|
|
717
|
+
if (n.initialize(), !e.params.has(t)) throw Error(`Initializer did not register parameter "${t}".`);
|
|
718
|
+
e.initializers.delete(t);
|
|
692
719
|
} finally {
|
|
693
|
-
|
|
720
|
+
n.initializing = !1;
|
|
694
721
|
}
|
|
695
722
|
}
|
|
696
|
-
let i = e.params.get(
|
|
723
|
+
let i = e.params.get(t);
|
|
697
724
|
if (i) return i;
|
|
698
725
|
r = e.parentScope;
|
|
699
726
|
}
|
|
@@ -701,58 +728,68 @@ var Oe = class {
|
|
|
701
728
|
};
|
|
702
729
|
//#endregion
|
|
703
730
|
//#region ../core/src/paramRuntime/expressionCompiler.js
|
|
704
|
-
function
|
|
705
|
-
return
|
|
731
|
+
function Me(e, t = {}, n = {}) {
|
|
732
|
+
return ne(e, t, n);
|
|
706
733
|
}
|
|
707
734
|
//#endregion
|
|
708
735
|
//#region ../core/src/paramRuntime/expressionRef.js
|
|
709
|
-
function
|
|
710
|
-
let
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
736
|
+
function z(t, n, r = {}) {
|
|
737
|
+
let i = {}, a = Me(t, i, r), o = /* @__PURE__ */ new Map();
|
|
738
|
+
try {
|
|
739
|
+
for (let e of a.globals) {
|
|
740
|
+
if (o.has(e)) continue;
|
|
741
|
+
let r = n(e);
|
|
742
|
+
if (!r) throw Error("Unknown variable \"" + e + "\" in expression: " + t);
|
|
743
|
+
o.set(e, r), Object.defineProperty(i, e, {
|
|
744
|
+
enumerable: !0,
|
|
745
|
+
get() {
|
|
746
|
+
return r.get();
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
} catch (t) {
|
|
751
|
+
throw e(t, r.specLocation);
|
|
721
752
|
}
|
|
722
|
-
let
|
|
723
|
-
return
|
|
753
|
+
let s = /* @__PURE__ */ new Set();
|
|
754
|
+
return a.subscribe = (e) => {
|
|
724
755
|
let t = [];
|
|
725
|
-
for (let n of
|
|
726
|
-
for (let n of
|
|
756
|
+
for (let n of o.values()) t.push(n.subscribe(e));
|
|
757
|
+
for (let n of a.scaleDependencies ?? []) t.push(n.subscribe(e));
|
|
727
758
|
let n = !0, r = () => {
|
|
728
|
-
n && (n = !1,
|
|
759
|
+
n && (n = !1, s.delete(r), t.forEach((e) => e()));
|
|
729
760
|
};
|
|
730
|
-
return
|
|
731
|
-
},
|
|
732
|
-
for (let e of
|
|
733
|
-
|
|
734
|
-
},
|
|
761
|
+
return s.add(r), r;
|
|
762
|
+
}, a.invalidate = () => {
|
|
763
|
+
for (let e of s) e();
|
|
764
|
+
s.clear();
|
|
765
|
+
}, a.createSnapshotEvaluator = () => {
|
|
735
766
|
let e = {};
|
|
736
|
-
for (let t of Object.keys(
|
|
737
|
-
for (let [t, n] of
|
|
767
|
+
for (let t of Object.keys(i)) o.has(t) || (e[t] = i[t]);
|
|
768
|
+
for (let [t, n] of o) n.batchStable || Object.defineProperty(e, t, {
|
|
738
769
|
enumerable: !0,
|
|
739
770
|
get: () => n.get()
|
|
740
771
|
});
|
|
741
|
-
let t = Object.assign(
|
|
742
|
-
for (let [t, n] of
|
|
772
|
+
let t = Object.assign(a.createEvaluator(e), { refresh() {
|
|
773
|
+
for (let [t, n] of o) n.batchStable && (e[t] = n.get());
|
|
743
774
|
} });
|
|
744
775
|
return t.refresh(), t;
|
|
745
|
-
},
|
|
746
|
-
expression:
|
|
747
|
-
dependencies:
|
|
776
|
+
}, a.identifier = () => a.code + "|" + Array.from(o.values()).map((e) => e.id).concat((a.scaleDependencies ?? []).map((e) => e.id)).join(","), a.dependencies = Array.from(o.values()).concat(a.scaleDependencies ?? []), {
|
|
777
|
+
expression: a,
|
|
778
|
+
dependencies: a.dependencies
|
|
748
779
|
};
|
|
749
780
|
}
|
|
750
781
|
//#endregion
|
|
751
782
|
//#region ../core/src/paramRuntime/paramRuntime.js
|
|
752
783
|
var Ne = class {
|
|
753
|
-
#e = new
|
|
754
|
-
#t
|
|
755
|
-
#n = new
|
|
784
|
+
#e = new Ae();
|
|
785
|
+
#t;
|
|
786
|
+
#n = new je();
|
|
787
|
+
constructor(e = {}) {
|
|
788
|
+
this.#t = new ke({
|
|
789
|
+
lifecycleRegistry: this.#e,
|
|
790
|
+
onError: e.onError
|
|
791
|
+
});
|
|
792
|
+
}
|
|
756
793
|
createScope(e) {
|
|
757
794
|
let t = this.#e.createOwner("scope", e ?? "root");
|
|
758
795
|
return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
|
|
@@ -777,11 +814,11 @@ var Ne = class {
|
|
|
777
814
|
return this.#n.register(e, t, a);
|
|
778
815
|
}
|
|
779
816
|
registerDerived(e, t, n, r) {
|
|
780
|
-
let { expression: i, dependencies: a } =
|
|
817
|
+
let { expression: i, dependencies: a } = z(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
|
|
781
818
|
return this.#n.register(e, t, s);
|
|
782
819
|
}
|
|
783
820
|
createExpression(e, t, n) {
|
|
784
|
-
let { expression: r } =
|
|
821
|
+
let { expression: r } = z(t, (t) => this.resolve(e, t), n);
|
|
785
822
|
return r;
|
|
786
823
|
}
|
|
787
824
|
resolve(e, t) {
|
|
@@ -836,8 +873,8 @@ function Ie(e) {
|
|
|
836
873
|
//#endregion
|
|
837
874
|
//#region ../core/src/utils/animator.js
|
|
838
875
|
var Le = class {
|
|
839
|
-
constructor(e) {
|
|
840
|
-
this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
|
|
876
|
+
constructor(e, t) {
|
|
877
|
+
this._renderCallback = e, this._onError = t, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
|
|
841
878
|
}
|
|
842
879
|
requestTransition(e) {
|
|
843
880
|
this._finalized || (this.cancelTransition(e), this.transitions.push(e), this.requestRender());
|
|
@@ -852,9 +889,14 @@ var Le = class {
|
|
|
852
889
|
this._renderRequested = !1;
|
|
853
890
|
let t = this.transitions;
|
|
854
891
|
this.transitions = [];
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
892
|
+
try {
|
|
893
|
+
let n;
|
|
894
|
+
for (; n = t.shift();) n(e);
|
|
895
|
+
this._finalized || this._renderCallback(e);
|
|
896
|
+
} catch (e) {
|
|
897
|
+
if (!this._onError) throw e;
|
|
898
|
+
this._onError(e);
|
|
899
|
+
}
|
|
858
900
|
})));
|
|
859
901
|
}
|
|
860
902
|
finalize() {
|
|
@@ -900,7 +942,7 @@ function ze() {
|
|
|
900
942
|
}
|
|
901
943
|
//#endregion
|
|
902
944
|
//#region ../core/src/paramRuntime/viewParamRuntime.js
|
|
903
|
-
var
|
|
945
|
+
var B = class {
|
|
904
946
|
#e;
|
|
905
947
|
#t;
|
|
906
948
|
#n = /* @__PURE__ */ new Map();
|
|
@@ -916,11 +958,12 @@ var Be = class {
|
|
|
916
958
|
#f;
|
|
917
959
|
#p;
|
|
918
960
|
#m;
|
|
919
|
-
#h
|
|
961
|
+
#h;
|
|
962
|
+
#g = !1;
|
|
920
963
|
constructor(e, t, n, r = {}) {
|
|
921
|
-
this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
|
|
964
|
+
this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#h = r.getSpecOrigin, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
|
|
922
965
|
let i = this.#d();
|
|
923
|
-
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new Ne(), this.#t = this.#e.createScope());
|
|
966
|
+
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new Ne({ onError: r.onError }), this.#t = this.#e.createScope());
|
|
924
967
|
}
|
|
925
968
|
setSelectionSource(e) {
|
|
926
969
|
this.#s = e;
|
|
@@ -939,38 +982,46 @@ var Be = class {
|
|
|
939
982
|
if (o) throw Error(`Conflicting selection declarations for "${e}" in "${i.location}" and "${o.location}".`);
|
|
940
983
|
return i;
|
|
941
984
|
}
|
|
942
|
-
#
|
|
985
|
+
#_(e) {
|
|
943
986
|
if (!("select" in e)) return;
|
|
944
|
-
let
|
|
945
|
-
kind:
|
|
946
|
-
components:
|
|
987
|
+
let n = t(e.select), r = n.type === "interval" ? "interval" : n.toggle ? "multi" : "single", i = n.type === "interval" ? Array.from(new Set(n.encodings)).sort() : [], a = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, o = {
|
|
988
|
+
kind: r,
|
|
989
|
+
components: i,
|
|
947
990
|
source: this.#s
|
|
948
991
|
}, s = a.#c.get(e.name) ?? /* @__PURE__ */ new Set(), c = s.values().next().value;
|
|
949
|
-
if (c && (c.kind !==
|
|
992
|
+
if (c && (c.kind !== r || JSON.stringify(c.components) !== JSON.stringify(i))) throw Error(`Conflicting selection declarations for "${e.name}" in "${c.source?.name ?? e.name}" and "${this.#s?.name ?? e.name}".`);
|
|
950
993
|
s.add(o), a.#c.set(e.name, s), this.#e.addScopeDisposer(this.#t, () => {
|
|
951
994
|
s.delete(o);
|
|
952
995
|
});
|
|
953
996
|
}
|
|
954
|
-
|
|
955
|
-
return {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
997
|
+
#v(e) {
|
|
998
|
+
return {
|
|
999
|
+
resolveScaleResolution: this.#f,
|
|
1000
|
+
specLocation: this.getSpecLocation(e, ["expr"])
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
registerParam(t, r = {}) {
|
|
1004
|
+
let i = t.name;
|
|
1005
|
+
try {
|
|
1006
|
+
n(i);
|
|
1007
|
+
} catch (n) {
|
|
1008
|
+
throw e(n, this.getSpecLocation(t, ["name"]));
|
|
1009
|
+
}
|
|
1010
|
+
if (this.#i.has(i) || this.#a.has(i)) throw e(/* @__PURE__ */ Error("Parameter \"" + i + "\" already registered in this scope."), this.getSpecLocation(t, ["name"]));
|
|
1011
|
+
if (Ve(t), r.defer) {
|
|
1012
|
+
if (!("expr" in t)) throw Error("Only expression parameters can be deferred.");
|
|
1013
|
+
return this.#e.registerInitializer(this.#t, i, () => {
|
|
1014
|
+
this.#y(t);
|
|
1015
|
+
}), this.#i.set(i, t), () => {
|
|
1016
|
+
throw Error("Cannot set derived parameter \"" + i + "\".");
|
|
966
1017
|
};
|
|
967
1018
|
}
|
|
968
|
-
return this.#
|
|
1019
|
+
return this.#y(t);
|
|
969
1020
|
}
|
|
970
1021
|
registerLazyExpression(e, t, n) {
|
|
971
1022
|
this.#e.registerInitializer(this.#t, e, () => {
|
|
972
1023
|
n?.();
|
|
973
|
-
let r = this.#e.registerDerived(this.#t, e, t, this.#
|
|
1024
|
+
let r = this.#e.registerDerived(this.#t, e, t, this.#v());
|
|
974
1025
|
this.#r.set(e, r);
|
|
975
1026
|
}), this.#a.add(e);
|
|
976
1027
|
}
|
|
@@ -980,7 +1031,7 @@ var Be = class {
|
|
|
980
1031
|
this.#e.registerInitializer(this.#t, e, () => {
|
|
981
1032
|
let r = this.#e.registerDerived(this.#t, e, t, {
|
|
982
1033
|
expressionScope: n.#t,
|
|
983
|
-
...n.#
|
|
1034
|
+
...n.#v()
|
|
984
1035
|
});
|
|
985
1036
|
this.#r.set(e, r);
|
|
986
1037
|
}), this.#i.set(e, {
|
|
@@ -988,65 +1039,65 @@ var Be = class {
|
|
|
988
1039
|
expr: t
|
|
989
1040
|
});
|
|
990
1041
|
}
|
|
991
|
-
#
|
|
992
|
-
let
|
|
993
|
-
if (
|
|
994
|
-
let
|
|
995
|
-
if (!
|
|
996
|
-
let
|
|
997
|
-
if (!
|
|
998
|
-
if ("expr" in
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
}, this.#n.set(
|
|
1002
|
-
} else if ("value" in
|
|
1003
|
-
else if (
|
|
1004
|
-
if ("transition" in
|
|
1005
|
-
else if ("debounce" in
|
|
1042
|
+
#y(t) {
|
|
1043
|
+
let n = t.name, r, i;
|
|
1044
|
+
if (t.push == "outer") {
|
|
1045
|
+
let a = this.findRuntimeForParam(n);
|
|
1046
|
+
if (!a) throw e(/* @__PURE__ */ Error(`Parameter "${n}" not found in outer scope!`), this.getSpecLocation(t, ["name"]));
|
|
1047
|
+
let s = a.paramConfigs.get(n);
|
|
1048
|
+
if (!s) throw Error(`Outer parameter "${n}" exists as a value but has no registered config.`);
|
|
1049
|
+
if ("expr" in s || "select" in s || "ruler" in s) throw Error(`The outer parameter "${n}" must not have expr, select, or ruler properties!`);
|
|
1050
|
+
r = (e) => {
|
|
1051
|
+
a.setValue(n, e);
|
|
1052
|
+
}, this.#n.set(n, r), "ruler" in t && (i = o(t, this), r(i));
|
|
1053
|
+
} else if ("value" in t) i = o(t, this), r = "transition" in t ? this.#x(n, i, t.transition) : this.#b(n, i);
|
|
1054
|
+
else if (l(t)) {
|
|
1055
|
+
if ("transition" in t) this.#S(n, t, t.transition);
|
|
1056
|
+
else if ("debounce" in t) this.#C(n, t, t.debounce);
|
|
1006
1057
|
else {
|
|
1007
|
-
let
|
|
1008
|
-
this.#r.set(
|
|
1058
|
+
let e = this.#e.registerDerived(this.#t, n, t.expr, this.#v(t));
|
|
1059
|
+
this.#r.set(n, e);
|
|
1009
1060
|
}
|
|
1010
|
-
|
|
1011
|
-
throw Error("Cannot set derived parameter \"" +
|
|
1061
|
+
r = () => {
|
|
1062
|
+
throw Error("Cannot set derived parameter \"" + n + "\".");
|
|
1012
1063
|
};
|
|
1013
|
-
} else
|
|
1014
|
-
if ("select" in
|
|
1015
|
-
if (
|
|
1016
|
-
let e = this.#e.registerSelection(this.#t,
|
|
1017
|
-
this.#r.set(
|
|
1064
|
+
} else i = o(t, this), r = this.#b(n, i);
|
|
1065
|
+
if ("select" in t) {
|
|
1066
|
+
if (i ??= o(t, this), !this.#n.has(n)) {
|
|
1067
|
+
let e = this.#e.registerSelection(this.#t, n, i);
|
|
1068
|
+
this.#r.set(n, e), this.#n.set(n, (t) => {
|
|
1018
1069
|
e.set(t), this.#e.flushNow();
|
|
1019
|
-
}),
|
|
1070
|
+
}), r = this.#n.get(n);
|
|
1020
1071
|
}
|
|
1021
|
-
|
|
1072
|
+
r(i);
|
|
1022
1073
|
}
|
|
1023
|
-
return this.#i.set(
|
|
1074
|
+
return this.#i.set(n, t), this.#_(t), r;
|
|
1024
1075
|
}
|
|
1025
|
-
allocateSetter(e,
|
|
1026
|
-
if (
|
|
1027
|
-
let i = this.#e.registerBase(this.#t, e,
|
|
1076
|
+
allocateSetter(e, t, r = !1) {
|
|
1077
|
+
if (n(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
|
|
1078
|
+
let i = this.#e.registerBase(this.#t, e, t, { notify: !r });
|
|
1028
1079
|
this.#r.set(e, i);
|
|
1029
1080
|
let a = (e) => {
|
|
1030
1081
|
i.set(e), this.#e.flushNow();
|
|
1031
1082
|
};
|
|
1032
1083
|
return this.#n.set(e, a), a;
|
|
1033
1084
|
}
|
|
1034
|
-
setValue(e,
|
|
1035
|
-
|
|
1085
|
+
setValue(e, t, r) {
|
|
1086
|
+
n(e);
|
|
1036
1087
|
let i = this.#n.get(e);
|
|
1037
1088
|
if (!i) throw Error("Writable parameter not found in this scope: " + e);
|
|
1038
|
-
i(
|
|
1089
|
+
i(t, r);
|
|
1039
1090
|
}
|
|
1040
1091
|
getValue(e) {
|
|
1041
1092
|
return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
|
|
1042
1093
|
}
|
|
1043
1094
|
getParamRef(e) {
|
|
1044
|
-
|
|
1045
|
-
let
|
|
1046
|
-
if (
|
|
1095
|
+
n(e);
|
|
1096
|
+
let t = this.findRuntimeForParam(e);
|
|
1097
|
+
if (t) return t.#r.has(e) || t.#e.resolve(t.#t, e), t.#r.get(e);
|
|
1047
1098
|
}
|
|
1048
1099
|
getTargetValue(e) {
|
|
1049
|
-
return
|
|
1100
|
+
return n(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
|
|
1050
1101
|
}
|
|
1051
1102
|
subscribe(e, t) {
|
|
1052
1103
|
let n = this.getParamRef(e);
|
|
@@ -1063,16 +1114,16 @@ var Be = class {
|
|
|
1063
1114
|
return this.#i;
|
|
1064
1115
|
}
|
|
1065
1116
|
hasLocalParam(e) {
|
|
1066
|
-
|
|
1067
|
-
let
|
|
1068
|
-
return this.#r.has(e) || this.#a.has(e) ||
|
|
1117
|
+
n(e);
|
|
1118
|
+
let t = this.#i.get(e);
|
|
1119
|
+
return this.#r.has(e) || this.#a.has(e) || t !== void 0 && "expr" in t;
|
|
1069
1120
|
}
|
|
1070
1121
|
isPendingParam(e) {
|
|
1071
1122
|
let t = this.findRuntimeForParam(e);
|
|
1072
1123
|
return t !== void 0 && !t.#r.has(e);
|
|
1073
1124
|
}
|
|
1074
1125
|
hasConfiguredParamInScopeChain(e) {
|
|
1075
|
-
return
|
|
1126
|
+
return n(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
|
|
1076
1127
|
}
|
|
1077
1128
|
findRuntimeForParam(e) {
|
|
1078
1129
|
return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
|
|
@@ -1103,7 +1154,7 @@ var Be = class {
|
|
|
1103
1154
|
let r = this.#i.get(t);
|
|
1104
1155
|
e.push({
|
|
1105
1156
|
name: t,
|
|
1106
|
-
kind:
|
|
1157
|
+
kind: Be(r),
|
|
1107
1158
|
value: n.get(),
|
|
1108
1159
|
writable: this.#n.has(t),
|
|
1109
1160
|
configured: !!r,
|
|
@@ -1113,12 +1164,15 @@ var Be = class {
|
|
|
1113
1164
|
}
|
|
1114
1165
|
return {
|
|
1115
1166
|
scopeId: this.#t,
|
|
1116
|
-
disposed: this.#
|
|
1167
|
+
disposed: this.#g,
|
|
1117
1168
|
params: e
|
|
1118
1169
|
};
|
|
1119
1170
|
}
|
|
1171
|
+
getSpecLocation(e, t) {
|
|
1172
|
+
return ee(e, this.#h, t);
|
|
1173
|
+
}
|
|
1120
1174
|
createExpression(e) {
|
|
1121
|
-
return this.#e.createExpression(this.#t, e, this.#
|
|
1175
|
+
return this.#e.createExpression(this.#t, typeof e == "string" ? e : e.expr, this.#v(typeof e == "string" ? void 0 : e));
|
|
1122
1176
|
}
|
|
1123
1177
|
watchExpression(e, t, n = {}) {
|
|
1124
1178
|
let r = this.createExpression(e), i = r.subscribe(t);
|
|
@@ -1145,7 +1199,7 @@ var Be = class {
|
|
|
1145
1199
|
cancelUpdate(e) {
|
|
1146
1200
|
this.#e.cancelUpdate(e);
|
|
1147
1201
|
}
|
|
1148
|
-
#
|
|
1202
|
+
#b(e, t) {
|
|
1149
1203
|
let n = this.#e.registerBase(this.#t, e, t);
|
|
1150
1204
|
this.#r.set(e, n);
|
|
1151
1205
|
let r = (e) => {
|
|
@@ -1153,19 +1207,19 @@ var Be = class {
|
|
|
1153
1207
|
};
|
|
1154
1208
|
return this.#n.set(e, r), r;
|
|
1155
1209
|
}
|
|
1156
|
-
#
|
|
1157
|
-
let r = this.#
|
|
1158
|
-
this.#
|
|
1210
|
+
#x(e, t, n) {
|
|
1211
|
+
let r = this.#w(e, t, n), i = (t, n) => {
|
|
1212
|
+
this.#T(e, r, t, n);
|
|
1159
1213
|
};
|
|
1160
1214
|
return this.#n.set(e, i), i;
|
|
1161
1215
|
}
|
|
1162
|
-
#
|
|
1163
|
-
let r = this.createExpression(t), i = this.#
|
|
1164
|
-
this.#
|
|
1216
|
+
#S(e, t, n) {
|
|
1217
|
+
let r = this.createExpression(t), i = this.#w(e, r(null), n), a = r.subscribe(() => {
|
|
1218
|
+
this.#T(e, i, r(null), { animate: !this.#m });
|
|
1165
1219
|
});
|
|
1166
1220
|
this.#e.addScopeDisposer(this.#t, a);
|
|
1167
1221
|
}
|
|
1168
|
-
#
|
|
1222
|
+
#C(e, t, n) {
|
|
1169
1223
|
let r = this.createExpression(t), i = r(null), a = this.#e.registerBase(this.#t, e, i);
|
|
1170
1224
|
this.#r.set(e, a);
|
|
1171
1225
|
let o = {
|
|
@@ -1180,8 +1234,8 @@ var Be = class {
|
|
|
1180
1234
|
clearTimeout(o.timeout), c(), this.#u.delete(e);
|
|
1181
1235
|
});
|
|
1182
1236
|
}
|
|
1183
|
-
#
|
|
1184
|
-
let r =
|
|
1237
|
+
#w(e, t, n) {
|
|
1238
|
+
let r = He(e, t), i = this.#e.registerBase(this.#t, e, r);
|
|
1185
1239
|
this.#r.set(e, i);
|
|
1186
1240
|
let a = this.#p;
|
|
1187
1241
|
if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
|
|
@@ -1196,8 +1250,8 @@ var Be = class {
|
|
|
1196
1250
|
};
|
|
1197
1251
|
return this.#l.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
|
|
1198
1252
|
}
|
|
1199
|
-
#
|
|
1200
|
-
let i =
|
|
1253
|
+
#T(e, t, n, r = {}) {
|
|
1254
|
+
let i = He(e, n);
|
|
1201
1255
|
t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
|
|
1202
1256
|
}
|
|
1203
1257
|
evaluateAndGet(e) {
|
|
@@ -1216,22 +1270,17 @@ var Be = class {
|
|
|
1216
1270
|
this.#m = !1;
|
|
1217
1271
|
}
|
|
1218
1272
|
dispose() {
|
|
1219
|
-
this.#
|
|
1220
|
-
}
|
|
1221
|
-
hasPointSelections() {
|
|
1222
|
-
for (let e of
|
|
1223
|
-
let t = e.select;
|
|
1224
|
-
if (te(t)) {
|
|
1225
|
-
if (t == "point") return !0;
|
|
1226
|
-
} else if (t.type == "point") return !0;
|
|
1227
|
-
}
|
|
1273
|
+
this.#g || (this.#g = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#l.clear(), this.#u.clear());
|
|
1274
|
+
}
|
|
1275
|
+
hasPointSelections({ inherited: e = !1 } = {}) {
|
|
1276
|
+
for (let t = this; t; t = e ? t.#d() : void 0) for (let n of t.#i.values()) if (i(n) && (n.select === "point" || typeof n.select == "object" && n.select.type === "point") && (!e || this.findConfiguredParam(n.name).config === n)) return !0;
|
|
1228
1277
|
return !1;
|
|
1229
1278
|
}
|
|
1230
1279
|
};
|
|
1231
|
-
function
|
|
1280
|
+
function Be(e) {
|
|
1232
1281
|
return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
|
|
1233
1282
|
}
|
|
1234
|
-
function
|
|
1283
|
+
function Ve(e) {
|
|
1235
1284
|
let t = e.name;
|
|
1236
1285
|
if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
|
|
1237
1286
|
if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
|
|
@@ -1249,62 +1298,62 @@ function He(e) {
|
|
|
1249
1298
|
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.`);
|
|
1250
1299
|
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.`);
|
|
1251
1300
|
}
|
|
1252
|
-
function
|
|
1301
|
+
function He(e, t) {
|
|
1253
1302
|
if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
|
|
1254
1303
|
return t;
|
|
1255
1304
|
}
|
|
1256
1305
|
//#endregion
|
|
1257
1306
|
//#region ../core/src/utils/addBaseUrl.js
|
|
1258
|
-
function
|
|
1307
|
+
function Ue(e, t) {
|
|
1259
1308
|
return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
|
|
1260
1309
|
}
|
|
1261
|
-
function
|
|
1310
|
+
function We(e) {
|
|
1262
1311
|
if (!e) return e;
|
|
1263
1312
|
if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
|
|
1264
1313
|
return e.endsWith("/") ? e : e + "/";
|
|
1265
1314
|
}
|
|
1266
1315
|
//#endregion
|
|
1267
1316
|
//#region ../core/src/config/mergeConfig.js
|
|
1268
|
-
function
|
|
1269
|
-
return
|
|
1317
|
+
function V(e) {
|
|
1318
|
+
return ie(e) && !Array.isArray(e) && !("expr" in e && typeof e.expr == "string");
|
|
1270
1319
|
}
|
|
1271
|
-
function
|
|
1320
|
+
function Ge(e) {
|
|
1272
1321
|
let t = {};
|
|
1273
|
-
for (let [n, r] of Object.entries(e)) t[n] =
|
|
1322
|
+
for (let [n, r] of Object.entries(e)) t[n] = H(r);
|
|
1274
1323
|
return t;
|
|
1275
1324
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return Array.isArray(e) ? e.map(
|
|
1325
|
+
function H(e) {
|
|
1326
|
+
return Array.isArray(e) ? e.map(H) : V(e) ? Ge(e) : e;
|
|
1278
1327
|
}
|
|
1279
|
-
function
|
|
1328
|
+
function Ke(e, t) {
|
|
1280
1329
|
for (let [n, r] of Object.entries(t)) {
|
|
1281
1330
|
if (r === void 0) continue;
|
|
1282
1331
|
let t = e[n];
|
|
1283
|
-
|
|
1332
|
+
V(r) && V(t) ? Ke(t, r) : e[n] = H(r);
|
|
1284
1333
|
}
|
|
1285
1334
|
return e;
|
|
1286
1335
|
}
|
|
1287
|
-
function
|
|
1336
|
+
function qe(e) {
|
|
1288
1337
|
let t = {};
|
|
1289
|
-
for (let n of e) n &&
|
|
1338
|
+
for (let n of e) n && Ke(t, n);
|
|
1290
1339
|
return t;
|
|
1291
1340
|
}
|
|
1292
1341
|
//#endregion
|
|
1293
1342
|
//#region ../core/src/view/viewChrome.js
|
|
1294
|
-
var
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1343
|
+
var U = /* @__PURE__ */ new WeakMap();
|
|
1344
|
+
function Je(e, t) {
|
|
1345
|
+
U.set(e, t);
|
|
1297
1346
|
}
|
|
1298
|
-
function
|
|
1299
|
-
return
|
|
1347
|
+
function Ye(e) {
|
|
1348
|
+
return U.get(e);
|
|
1300
1349
|
}
|
|
1301
|
-
function
|
|
1302
|
-
return
|
|
1350
|
+
function Xe(e) {
|
|
1351
|
+
return U.has(e);
|
|
1303
1352
|
}
|
|
1304
|
-
function
|
|
1353
|
+
function Ze(e) {
|
|
1305
1354
|
let t = e;
|
|
1306
1355
|
for (; t;) {
|
|
1307
|
-
let n =
|
|
1356
|
+
let n = U.get(t);
|
|
1308
1357
|
if (n === "excludeSubtree" || t === e && n === "exclude") return !0;
|
|
1309
1358
|
t = t.layoutParent;
|
|
1310
1359
|
}
|
|
@@ -1312,16 +1361,16 @@ function U(e) {
|
|
|
1312
1361
|
}
|
|
1313
1362
|
//#endregion
|
|
1314
1363
|
//#region ../core/src/view/postScaleParams.js
|
|
1315
|
-
var
|
|
1316
|
-
function
|
|
1317
|
-
|
|
1364
|
+
var Qe = /* @__PURE__ */ new WeakMap();
|
|
1365
|
+
function $e(e, t) {
|
|
1366
|
+
Qe.set(e, t);
|
|
1318
1367
|
}
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
1368
|
+
function et(e) {
|
|
1369
|
+
return Qe.get(e);
|
|
1321
1370
|
}
|
|
1322
1371
|
//#endregion
|
|
1323
1372
|
//#region ../core/src/data/namedDataScope.js
|
|
1324
|
-
var
|
|
1373
|
+
var tt = class {
|
|
1325
1374
|
name;
|
|
1326
1375
|
owner;
|
|
1327
1376
|
getDefaultData;
|
|
@@ -1359,13 +1408,13 @@ var Ze = class {
|
|
|
1359
1408
|
dispose() {
|
|
1360
1409
|
this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
|
|
1361
1410
|
}
|
|
1362
|
-
},
|
|
1411
|
+
}, nt = class {
|
|
1363
1412
|
view;
|
|
1364
1413
|
#e = /* @__PURE__ */ new Map();
|
|
1365
1414
|
#t = /* @__PURE__ */ new Map();
|
|
1366
1415
|
constructor(e) {
|
|
1367
1416
|
this.view = e;
|
|
1368
|
-
for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new
|
|
1417
|
+
for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new tt(t, e, () => n));
|
|
1369
1418
|
}
|
|
1370
1419
|
getLocalBinding(e) {
|
|
1371
1420
|
return this.#e.get(e);
|
|
@@ -1379,7 +1428,7 @@ var Ze = class {
|
|
|
1379
1428
|
let n = this.view.dataParent?.namedDataScope;
|
|
1380
1429
|
if (n) return n.resolve(e);
|
|
1381
1430
|
let r = this.#t.get(e);
|
|
1382
|
-
return r || (r = new
|
|
1431
|
+
return r || (r = new tt(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
|
|
1383
1432
|
}
|
|
1384
1433
|
dispose() {
|
|
1385
1434
|
for (let e of this.#e.values()) e.dispose();
|
|
@@ -1387,7 +1436,7 @@ var Ze = class {
|
|
|
1387
1436
|
for (let e of this.#t.values()) e.dispose();
|
|
1388
1437
|
this.#t.clear();
|
|
1389
1438
|
}
|
|
1390
|
-
},
|
|
1439
|
+
}, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, rt = class {
|
|
1391
1440
|
spec;
|
|
1392
1441
|
namedDataScope;
|
|
1393
1442
|
#e;
|
|
@@ -1402,31 +1451,36 @@ var Ze = class {
|
|
|
1402
1451
|
#l = void 0;
|
|
1403
1452
|
#u = !1;
|
|
1404
1453
|
#d = [];
|
|
1405
|
-
opacityFunction =
|
|
1454
|
+
opacityFunction = K;
|
|
1406
1455
|
#f = [];
|
|
1407
1456
|
#p = "none";
|
|
1408
1457
|
#m = /* @__PURE__ */ new Map();
|
|
1409
|
-
facetCoords = new
|
|
1458
|
+
facetCoords = new p([], JSON.stringify);
|
|
1459
|
+
layoutCoords;
|
|
1410
1460
|
constructor(e, t, n, r, i, a = {}) {
|
|
1411
1461
|
if (!e) throw Error("View spec must be defined!");
|
|
1412
|
-
if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new
|
|
1462
|
+
if (this.context = t, this.layoutParent = n, this.dataParent = r, a.chrome && Je(this, "excludeSubtree"), this.#t = i, this.spec = e, this.namedDataScope = new nt(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
|
|
1413
1463
|
let o = r ? r.getConfigScopes() : [t.getBaseConfig()], s = e.config;
|
|
1414
1464
|
this.#e = [...o, s].filter((e) => !!e), this.resolutions = {
|
|
1415
1465
|
scale: {},
|
|
1416
1466
|
axis: {},
|
|
1417
1467
|
legend: {}
|
|
1418
|
-
},
|
|
1468
|
+
}, oe(this), this.options = {
|
|
1419
1469
|
inheritEncoding: !1,
|
|
1420
1470
|
layoutSizeParams: "own",
|
|
1421
1471
|
...a
|
|
1422
1472
|
}, this.flowHandle = void 0, this.needsAxes = {
|
|
1423
1473
|
x: !1,
|
|
1424
1474
|
y: !1
|
|
1425
|
-
}, this.paramRuntime = new
|
|
1426
|
-
|
|
1427
|
-
|
|
1475
|
+
}, this.paramRuntime = new B(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, {
|
|
1476
|
+
settleTemporalUpdatesImmediately: !0,
|
|
1477
|
+
onError: t.reportError,
|
|
1478
|
+
getSpecOrigin: t.getSpecOrigin
|
|
1479
|
+
}), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => ce("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
|
|
1480
|
+
let c = [...e.params ?? [], ...et(e) ?? []];
|
|
1481
|
+
for (let e of c) {
|
|
1428
1482
|
if ("expr" in e) {
|
|
1429
|
-
let { usesScaleHelper: t, globals: n } =
|
|
1483
|
+
let { usesScaleHelper: t, globals: n } = m(e.expr, this.paramRuntime.getSpecLocation(e, ["expr"])), r = n.some((e) => this.paramRuntime.isPendingParam(e));
|
|
1430
1484
|
if (t || r) {
|
|
1431
1485
|
this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
|
|
1432
1486
|
continue;
|
|
@@ -1452,18 +1506,18 @@ var Ze = class {
|
|
|
1452
1506
|
return this.#t;
|
|
1453
1507
|
}
|
|
1454
1508
|
getConfig() {
|
|
1455
|
-
return
|
|
1509
|
+
return qe(this.#e);
|
|
1456
1510
|
}
|
|
1457
1511
|
getCursorSpec() {
|
|
1458
1512
|
return this.spec.cursor;
|
|
1459
1513
|
}
|
|
1460
1514
|
getCursor() {
|
|
1461
1515
|
let e = this.getCursorSpec();
|
|
1462
|
-
return
|
|
1516
|
+
return l(e) ? this.paramRuntime.evaluateAndGet(e) : e;
|
|
1463
1517
|
}
|
|
1464
1518
|
watchCursor(e, t) {
|
|
1465
|
-
let
|
|
1466
|
-
n
|
|
1519
|
+
let n = this.getCursorSpec();
|
|
1520
|
+
l(n) && this.paramRuntime.watchExpression(n, e, {
|
|
1467
1521
|
scopeOwned: !1,
|
|
1468
1522
|
registerDisposer: t
|
|
1469
1523
|
});
|
|
@@ -1475,45 +1529,73 @@ var Ze = class {
|
|
|
1475
1529
|
return this.facetCoords.values().next().value;
|
|
1476
1530
|
}
|
|
1477
1531
|
getPadding() {
|
|
1478
|
-
return this._cache("size/padding", () =>
|
|
1532
|
+
return this._cache("size/padding", () => j.createFromConfig(this.spec.padding));
|
|
1479
1533
|
}
|
|
1480
1534
|
getOverhang() {
|
|
1481
|
-
return
|
|
1535
|
+
return j.zero();
|
|
1536
|
+
}
|
|
1537
|
+
getStructuralOverhang() {
|
|
1538
|
+
return j.zero();
|
|
1539
|
+
}
|
|
1540
|
+
getStructuralSizeDefs(e) {
|
|
1541
|
+
let t = this.getStructuralOverhang();
|
|
1542
|
+
return {
|
|
1543
|
+
before: { px: t[e === "x" ? "left" : "top"] },
|
|
1544
|
+
after: { px: t[e === "x" ? "right" : "bottom"] }
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
getAlignment(e) {
|
|
1548
|
+
let t = e === "x" ? "width" : "height";
|
|
1549
|
+
return {
|
|
1550
|
+
size: this.getViewportSize().subtractPadding(this.getOverhang())[t],
|
|
1551
|
+
before: 0,
|
|
1552
|
+
after: 0
|
|
1553
|
+
};
|
|
1554
|
+
}
|
|
1555
|
+
getAlignmentCoords(e) {
|
|
1556
|
+
return this.coords.shrink(this.getOverhang());
|
|
1557
|
+
}
|
|
1558
|
+
getLayoutFootprints() {
|
|
1559
|
+
return [{
|
|
1560
|
+
view: this,
|
|
1561
|
+
coords: this.coords.shrink(this.getOverhang()),
|
|
1562
|
+
chrome: !1
|
|
1563
|
+
}];
|
|
1482
1564
|
}
|
|
1483
1565
|
isScrollable() {
|
|
1484
1566
|
return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
|
|
1485
1567
|
}
|
|
1486
1568
|
getSize() {
|
|
1487
|
-
return this._cache("size/size", () => this.isConfiguredVisible() ? new
|
|
1569
|
+
return this._cache("size/size", () => this.isConfiguredVisible() ? new x(this.#g("width"), this.#g("height")) : S);
|
|
1488
1570
|
}
|
|
1489
1571
|
getViewportSize() {
|
|
1490
1572
|
if (!this.isScrollable()) return this.getSize();
|
|
1491
|
-
if (!this.isConfiguredVisible()) return
|
|
1573
|
+
if (!this.isConfiguredVisible()) return S;
|
|
1492
1574
|
let e = this.getSize();
|
|
1493
|
-
return new
|
|
1575
|
+
return new x(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
|
|
1494
1576
|
}
|
|
1495
1577
|
#g(e) {
|
|
1496
|
-
let { value: t, implicit: n } = this.#_(e),
|
|
1497
|
-
if (
|
|
1498
|
-
if (
|
|
1499
|
-
let t = this.#x(e,
|
|
1500
|
-
if (
|
|
1578
|
+
let { value: t, implicit: n } = this.#_(e), i = this.resolveSizeValue(e, t), a = q(i), o = e == "viewportWidth" || e == "viewportHeight";
|
|
1579
|
+
if (a) {
|
|
1580
|
+
if (o) throw new _(`Cannot use step-based size with "${e}"!`, this);
|
|
1581
|
+
let t = this.#x(e, i), a = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
|
|
1582
|
+
if (a) {
|
|
1501
1583
|
let n;
|
|
1502
|
-
if (
|
|
1503
|
-
else if (["locus", "index"].includes(
|
|
1504
|
-
let e =
|
|
1505
|
-
n =
|
|
1506
|
-
} else throw new _(`Cannot use step-based size with "${
|
|
1507
|
-
let
|
|
1508
|
-
n =
|
|
1509
|
-
let
|
|
1510
|
-
if (
|
|
1511
|
-
if (!
|
|
1512
|
-
let t =
|
|
1513
|
-
|
|
1584
|
+
if (y(a.type)) n = a.domain().length;
|
|
1585
|
+
else if (["locus", "index"].includes(a.type)) {
|
|
1586
|
+
let e = a.domain();
|
|
1587
|
+
n = r(e) - e[0];
|
|
1588
|
+
} else throw new _(`Cannot use step-based size with "${a.type}" scale!`, this);
|
|
1589
|
+
let o = a;
|
|
1590
|
+
n = v(n, o.paddingInner(), o.paddingOuter());
|
|
1591
|
+
let s = e == "width" ? "xOffset" : "yOffset", c = this.getScaleResolution(s)?.getScale(), l = i.for ?? (c && y(c.type) ? "offset" : "position"), u = t;
|
|
1592
|
+
if (l == "offset") {
|
|
1593
|
+
if (!c || !y(c.type)) throw new _(`Cannot use ${e}.step.for = "offset" without a discrete ${s} scale!`, this);
|
|
1594
|
+
let t = c, n = v(c.domain().length, t.paddingInner(), t.paddingOuter());
|
|
1595
|
+
u *= n / (1 - o.paddingInner());
|
|
1514
1596
|
}
|
|
1515
1597
|
return {
|
|
1516
|
-
px: n *
|
|
1598
|
+
px: n * u,
|
|
1517
1599
|
grow: 0
|
|
1518
1600
|
};
|
|
1519
1601
|
}
|
|
@@ -1523,7 +1605,7 @@ var Ze = class {
|
|
|
1523
1605
|
};
|
|
1524
1606
|
throw new _(`Cannot use step-based size with "${e}"!`, this);
|
|
1525
1607
|
}
|
|
1526
|
-
return (
|
|
1608
|
+
return (i && _e(i)) ?? (o ? void 0 : {
|
|
1527
1609
|
px: 0,
|
|
1528
1610
|
grow: 1
|
|
1529
1611
|
});
|
|
@@ -1539,16 +1621,16 @@ var Ze = class {
|
|
|
1539
1621
|
};
|
|
1540
1622
|
}
|
|
1541
1623
|
#v(e) {
|
|
1542
|
-
if (
|
|
1624
|
+
if (Ze(this)) return;
|
|
1543
1625
|
let t = this.getConfig().view;
|
|
1544
1626
|
if (!t) return;
|
|
1545
1627
|
let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
|
|
1546
|
-
return r && !
|
|
1628
|
+
return r && !y(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
|
|
1547
1629
|
}
|
|
1548
1630
|
resolveSizeValue(e, t) {
|
|
1549
|
-
if (!
|
|
1550
|
-
let
|
|
1551
|
-
if (
|
|
1631
|
+
if (!l(t)) return t;
|
|
1632
|
+
let n = this.#C(e)();
|
|
1633
|
+
if (ct(n) || n === "container") return n;
|
|
1552
1634
|
throw new _(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
|
|
1553
1635
|
}
|
|
1554
1636
|
registerSizeInvalidation() {
|
|
@@ -1556,7 +1638,7 @@ var Ze = class {
|
|
|
1556
1638
|
}
|
|
1557
1639
|
#y(e, t) {
|
|
1558
1640
|
let { value: n, implicit: r } = this.#_(e);
|
|
1559
|
-
if (!
|
|
1641
|
+
if (!q(n)) return;
|
|
1560
1642
|
let i = this.getScaleResolution(t);
|
|
1561
1643
|
if (!i) {
|
|
1562
1644
|
if (r) return;
|
|
@@ -1566,20 +1648,20 @@ var Ze = class {
|
|
|
1566
1648
|
let t = this.getSize()[e];
|
|
1567
1649
|
this.invalidateSizeCache();
|
|
1568
1650
|
let n = this.getSize()[e];
|
|
1569
|
-
|
|
1651
|
+
he(t, n) || this.context.requestLayoutReflow();
|
|
1570
1652
|
};
|
|
1571
1653
|
if (i.addEventListener("domain", a), this.registerDisposer(() => i.removeEventListener("domain", a)), n.for != "position") {
|
|
1572
1654
|
let t = e == "width" ? "xOffset" : "yOffset", n = this.getScaleResolution(t);
|
|
1573
|
-
n &&
|
|
1655
|
+
n && y(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
|
|
1574
1656
|
}
|
|
1575
1657
|
}
|
|
1576
1658
|
#b(e) {
|
|
1577
1659
|
let { value: t } = this.#_(e);
|
|
1578
|
-
|
|
1660
|
+
l(t) ? this.#S(e, t) : q(t) && l(t.step) && this.#S(e + ".step", t.step);
|
|
1579
1661
|
}
|
|
1580
1662
|
#x(e, t) {
|
|
1581
|
-
let
|
|
1582
|
-
if (
|
|
1663
|
+
let n = l(t.step) ? this.#C(e + ".step")() : t.step;
|
|
1664
|
+
if (ct(n)) return n;
|
|
1583
1665
|
throw new _(`"${e}.step" ExprRef must resolve to a finite number!`, this);
|
|
1584
1666
|
}
|
|
1585
1667
|
#S(e, t) {
|
|
@@ -1625,7 +1707,7 @@ var Ze = class {
|
|
|
1625
1707
|
return this.opacityFunction(1);
|
|
1626
1708
|
}
|
|
1627
1709
|
hasLocalOpacity() {
|
|
1628
|
-
return this.opacityFunction !==
|
|
1710
|
+
return this.opacityFunction !== K;
|
|
1629
1711
|
}
|
|
1630
1712
|
getPathString() {
|
|
1631
1713
|
return this.getLayoutAncestors().map((e) => e.name).reverse().join("/");
|
|
@@ -1656,7 +1738,7 @@ var Ze = class {
|
|
|
1656
1738
|
};
|
|
1657
1739
|
}
|
|
1658
1740
|
handleInteraction(e, t) {
|
|
1659
|
-
t && e.type === "mousemove" && e.pointedViews.
|
|
1741
|
+
t && e.type === "mousemove" && e.pointedViews.set(this, e.facetId);
|
|
1660
1742
|
let n = t ? this.#r : this.#i;
|
|
1661
1743
|
for (let t of n[e.type] || []) t(e);
|
|
1662
1744
|
}
|
|
@@ -1689,13 +1771,15 @@ var Ze = class {
|
|
|
1689
1771
|
for (let e of this.#f) e();
|
|
1690
1772
|
this.#f.length = 0;
|
|
1691
1773
|
let e = this.flowHandle;
|
|
1692
|
-
e?.collector && (this.context.dataFlow.pruneCollectorBranch(e.collector), this.context.dataFlow.removeCollector(e.collector)), e?.dataSource && e.dataSource.view === this && !e.dataSource.shareKey && this.context.dataFlow.removeDataSource(e.dataSource), this.paramRuntime.dispose(), this.namedDataScope.dispose(), this.context.dataFlow.loadingStatusRegistry.delete(this)
|
|
1774
|
+
e?.collector && (this.context.dataFlow.pruneCollectorBranch(e.collector), this.context.dataFlow.removeCollector(e.collector)), e?.dataSource && e.dataSource.view === this && !e.dataSource.shareKey && this.context.dataFlow.removeDataSource(e.dataSource), this.paramRuntime.dispose(), this.namedDataScope.dispose(), this.flowHandle = void 0, this.context.dataFlow.loadingStatusRegistry.delete(this);
|
|
1693
1775
|
}
|
|
1694
1776
|
registerDisposer(e) {
|
|
1695
1777
|
this.#f.push(e);
|
|
1696
1778
|
}
|
|
1697
1779
|
disposeSubtree() {
|
|
1698
|
-
let e = () =>
|
|
1780
|
+
let e = (e) => {
|
|
1781
|
+
for (let t of Object.values(e.resolutions.scale)) t.dispose();
|
|
1782
|
+
};
|
|
1699
1783
|
e.postOrder = (e) => {
|
|
1700
1784
|
e.dispose();
|
|
1701
1785
|
}, this.visit(e);
|
|
@@ -1711,7 +1795,7 @@ var Ze = class {
|
|
|
1711
1795
|
}
|
|
1712
1796
|
}
|
|
1713
1797
|
configureViewOpacity() {
|
|
1714
|
-
(!this.opacityFunction || this.opacityFunction ===
|
|
1798
|
+
(!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = at(this));
|
|
1715
1799
|
}
|
|
1716
1800
|
finalizeParamRuntimeInitialization() {
|
|
1717
1801
|
this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
|
|
@@ -1723,8 +1807,10 @@ var Ze = class {
|
|
|
1723
1807
|
return this.#s;
|
|
1724
1808
|
}
|
|
1725
1809
|
arrange(e, t, n = {}) {
|
|
1726
|
-
if (
|
|
1727
|
-
|
|
1810
|
+
if (this.layoutParent || this.visit((e) => {
|
|
1811
|
+
e.layoutCoords = void 0;
|
|
1812
|
+
}), this.layoutCoords = t, n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, re(t, te(n))), this.#a || this.#o) {
|
|
1813
|
+
let e = this.getOverhang(), n = this.layoutParent ? j.zero() : this.getPadding();
|
|
1728
1814
|
this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
|
|
1729
1815
|
}
|
|
1730
1816
|
this.#c = !0, this.#T();
|
|
@@ -1745,7 +1831,7 @@ var Ze = class {
|
|
|
1745
1831
|
}
|
|
1746
1832
|
getFacetFields(e) {
|
|
1747
1833
|
let t = this.getEncoding().sample;
|
|
1748
|
-
return
|
|
1834
|
+
return s(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
|
|
1749
1835
|
}
|
|
1750
1836
|
usesSampleFacetRendering() {
|
|
1751
1837
|
return this.layoutParent?.usesSampleFacetRendering() ?? !1;
|
|
@@ -1757,15 +1843,23 @@ var Ze = class {
|
|
|
1757
1843
|
};
|
|
1758
1844
|
}
|
|
1759
1845
|
getScaleResolution(e) {
|
|
1760
|
-
|
|
1761
|
-
return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
|
|
1846
|
+
return this.#E(e, "scale");
|
|
1762
1847
|
}
|
|
1763
1848
|
getAxisResolution(e) {
|
|
1764
|
-
|
|
1765
|
-
|
|
1849
|
+
return this.#E(e, "axis");
|
|
1850
|
+
}
|
|
1851
|
+
#E(e, t) {
|
|
1852
|
+
let n = h(e);
|
|
1853
|
+
for (let e of this.getDataAncestors()) {
|
|
1854
|
+
let r = e.resolutions[t][n];
|
|
1855
|
+
if (r || e.isResolutionBoundary(n)) return r;
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
isResolutionBoundary(e) {
|
|
1859
|
+
return this.options.resolutionBoundaryChannels?.some((t) => t === h(e)) ?? !1;
|
|
1766
1860
|
}
|
|
1767
1861
|
getLegendResolution(e) {
|
|
1768
|
-
let t =
|
|
1862
|
+
let t = h(e);
|
|
1769
1863
|
return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
|
|
1770
1864
|
}
|
|
1771
1865
|
getConfiguredResolution(e, t) {
|
|
@@ -1778,17 +1872,17 @@ var Ze = class {
|
|
|
1778
1872
|
return "independent";
|
|
1779
1873
|
}
|
|
1780
1874
|
getBaseUrl() {
|
|
1781
|
-
return
|
|
1875
|
+
return N(() => this.dataParent?.getBaseUrl(), We(this.spec.baseUrl));
|
|
1782
1876
|
}
|
|
1783
1877
|
isPickingSupported() {
|
|
1784
1878
|
return !0;
|
|
1785
1879
|
}
|
|
1786
1880
|
getTitleText() {
|
|
1787
1881
|
let e = this.spec.title;
|
|
1788
|
-
if (e) return
|
|
1882
|
+
if (e) return u(e) ? e : l(e.text) ? this.paramRuntime.evaluateAndGet(e.text) : e.text;
|
|
1789
1883
|
}
|
|
1790
1884
|
_cache(e, t) {
|
|
1791
|
-
return
|
|
1885
|
+
return ae(this, e, t);
|
|
1792
1886
|
}
|
|
1793
1887
|
_invalidateCacheByPrefix(e, t = "self") {
|
|
1794
1888
|
switch (t) {
|
|
@@ -1806,15 +1900,15 @@ var Ze = class {
|
|
|
1806
1900
|
}
|
|
1807
1901
|
propagateInteraction(e) {}
|
|
1808
1902
|
};
|
|
1809
|
-
function
|
|
1903
|
+
function it(e) {
|
|
1810
1904
|
return "unitsPerPixel" in e;
|
|
1811
1905
|
}
|
|
1812
|
-
function
|
|
1906
|
+
function at(e) {
|
|
1813
1907
|
let t = "opacity" in e.spec ? e.spec.opacity : void 0;
|
|
1814
1908
|
if (t !== void 0) {
|
|
1815
|
-
if (
|
|
1816
|
-
if (
|
|
1817
|
-
let
|
|
1909
|
+
if (f(t)) return (e) => e * t;
|
|
1910
|
+
if (it(t)) {
|
|
1911
|
+
let n = (t) => {
|
|
1818
1912
|
let n = e.getScaleResolution(t), r = n?.getScale();
|
|
1819
1913
|
if ([
|
|
1820
1914
|
"linear",
|
|
@@ -1824,46 +1918,46 @@ function tt(e) {
|
|
|
1824
1918
|
scale: r,
|
|
1825
1919
|
scaleResolution: n
|
|
1826
1920
|
};
|
|
1827
|
-
},
|
|
1828
|
-
if (!
|
|
1829
|
-
let
|
|
1830
|
-
let t =
|
|
1831
|
-
|
|
1921
|
+
}, r = st(t.values, "opacity.values", e);
|
|
1922
|
+
if (!d(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
|
|
1923
|
+
let i = () => 1, a = [], o = () => {
|
|
1924
|
+
let t = ot(st(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = se().domain(t.unitsPerPixel).range(t.values).clamp(!0);
|
|
1925
|
+
i = (e) => n(e);
|
|
1832
1926
|
};
|
|
1833
|
-
|
|
1834
|
-
if (
|
|
1835
|
-
let n = e.paramRuntime.watchExpression(t
|
|
1836
|
-
|
|
1927
|
+
a = t.unitsPerPixel.map((t) => {
|
|
1928
|
+
if (l(t)) {
|
|
1929
|
+
let n = e.paramRuntime.watchExpression(t, () => {
|
|
1930
|
+
o(), e.context.animator.requestRender();
|
|
1837
1931
|
});
|
|
1838
1932
|
return () => n(null);
|
|
1839
1933
|
}
|
|
1840
1934
|
return () => t;
|
|
1841
|
-
}),
|
|
1842
|
-
let
|
|
1935
|
+
}), o();
|
|
1936
|
+
let s = (e) => {
|
|
1843
1937
|
let t = e.scaleResolution.getAxisLength() || 1e3;
|
|
1844
|
-
return
|
|
1845
|
-
},
|
|
1938
|
+
return c(e.scale.domain()) / t;
|
|
1939
|
+
}, u;
|
|
1846
1940
|
if (t.channel === "auto") {
|
|
1847
|
-
let t =
|
|
1848
|
-
if (t &&
|
|
1849
|
-
else if (t)
|
|
1850
|
-
else if (
|
|
1941
|
+
let t = n("x"), r = n("y");
|
|
1942
|
+
if (t && r) u = () => (s(t) + s(r)) / 2;
|
|
1943
|
+
else if (t) u = () => s(t);
|
|
1944
|
+
else if (r) u = () => s(r);
|
|
1851
1945
|
else throw new _("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
|
|
1852
1946
|
} else {
|
|
1853
|
-
let
|
|
1854
|
-
if (!
|
|
1855
|
-
|
|
1947
|
+
let r = t.channel ? n(t.channel) : n("x") ?? n("y");
|
|
1948
|
+
if (!r) throw new _("Cannot find a resolved quantitative scale for dynamic opacity!", e);
|
|
1949
|
+
u = () => s(r);
|
|
1856
1950
|
}
|
|
1857
|
-
return (e) =>
|
|
1951
|
+
return (e) => i(u()) * e;
|
|
1858
1952
|
}
|
|
1859
|
-
if (
|
|
1860
|
-
let n = e.paramRuntime.watchExpression(t
|
|
1953
|
+
if (l(t)) {
|
|
1954
|
+
let n = e.paramRuntime.watchExpression(t, () => e.context.animator.requestRender());
|
|
1861
1955
|
return (e) => n(null) * e;
|
|
1862
1956
|
}
|
|
1863
1957
|
}
|
|
1864
|
-
return
|
|
1958
|
+
return K;
|
|
1865
1959
|
}
|
|
1866
|
-
function
|
|
1960
|
+
function ot(e, t, n) {
|
|
1867
1961
|
if (!e.length) throw new _("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
|
|
1868
1962
|
if (e.length !== t.length) throw new _("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
|
|
1869
1963
|
e.forEach((e, t) => {
|
|
@@ -1881,155 +1975,155 @@ function nt(e, t, n) {
|
|
|
1881
1975
|
values: a
|
|
1882
1976
|
};
|
|
1883
1977
|
}
|
|
1884
|
-
function
|
|
1885
|
-
if (!
|
|
1978
|
+
function st(e, t, n) {
|
|
1979
|
+
if (!d(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
|
|
1886
1980
|
return e.map((e, r) => {
|
|
1887
|
-
if (!
|
|
1981
|
+
if (!f(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
|
|
1888
1982
|
return e;
|
|
1889
1983
|
});
|
|
1890
1984
|
}
|
|
1891
|
-
var
|
|
1892
|
-
function
|
|
1985
|
+
var q = (e) => !!e && typeof e == "object" && "step" in e;
|
|
1986
|
+
function ct(e) {
|
|
1893
1987
|
return typeof e == "number" && Number.isFinite(e);
|
|
1894
1988
|
}
|
|
1895
|
-
var
|
|
1896
|
-
function
|
|
1897
|
-
|
|
1989
|
+
var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
|
|
1990
|
+
function lt(e, t) {
|
|
1991
|
+
dt(e, t, "Import");
|
|
1898
1992
|
}
|
|
1899
|
-
function
|
|
1900
|
-
|
|
1993
|
+
function ut(e, t) {
|
|
1994
|
+
dt(e, t, "View");
|
|
1901
1995
|
}
|
|
1902
|
-
function
|
|
1996
|
+
function dt(e, t, n) {
|
|
1903
1997
|
if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
|
|
1904
|
-
|
|
1998
|
+
J.set(e, { name: t });
|
|
1905
1999
|
}
|
|
1906
|
-
function
|
|
1907
|
-
return
|
|
2000
|
+
function ft(e) {
|
|
2001
|
+
return J.get(e);
|
|
1908
2002
|
}
|
|
1909
|
-
function
|
|
2003
|
+
function pt(e, t = {}) {
|
|
1910
2004
|
let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
|
|
1911
|
-
|
|
2005
|
+
Y.set(e, n);
|
|
1912
2006
|
}
|
|
1913
|
-
function
|
|
1914
|
-
|
|
2007
|
+
function mt(e, t = {}) {
|
|
2008
|
+
Je(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
|
|
1915
2009
|
}
|
|
1916
|
-
function
|
|
1917
|
-
return e.getLayoutAncestors().some(
|
|
2010
|
+
function ht(e) {
|
|
2011
|
+
return e.getLayoutAncestors().some(Xe);
|
|
1918
2012
|
}
|
|
1919
|
-
function
|
|
2013
|
+
function X(e) {
|
|
1920
2014
|
let t = e.getDataAncestors(), n = [];
|
|
1921
2015
|
for (let e = t.length - 1; e >= 0; --e) {
|
|
1922
|
-
let r =
|
|
2016
|
+
let r = J.get(t[e]);
|
|
1923
2017
|
r && typeof r.name == "string" && n.push(r.name);
|
|
1924
2018
|
}
|
|
1925
2019
|
return n;
|
|
1926
2020
|
}
|
|
1927
|
-
function
|
|
2021
|
+
function gt(e) {
|
|
1928
2022
|
let t = e.explicitName;
|
|
1929
2023
|
if (!t) throw Error("Cannot build a selector for a view without a name.");
|
|
1930
2024
|
return {
|
|
1931
|
-
scope:
|
|
2025
|
+
scope: X(e),
|
|
1932
2026
|
view: t
|
|
1933
2027
|
};
|
|
1934
2028
|
}
|
|
1935
|
-
function
|
|
2029
|
+
function _t(e, t) {
|
|
1936
2030
|
if (!t) throw Error("Cannot build a selector for a parameter without a name.");
|
|
1937
2031
|
return {
|
|
1938
|
-
scope:
|
|
2032
|
+
scope: X(e),
|
|
1939
2033
|
param: t
|
|
1940
2034
|
};
|
|
1941
2035
|
}
|
|
1942
|
-
function
|
|
1943
|
-
return
|
|
2036
|
+
function vt(e) {
|
|
2037
|
+
return Et(e), "p:" + JSON.stringify({
|
|
1944
2038
|
scope: e.scope,
|
|
1945
2039
|
param: e.param
|
|
1946
2040
|
});
|
|
1947
2041
|
}
|
|
1948
|
-
function
|
|
2042
|
+
function yt(e, t) {
|
|
1949
2043
|
e.visit((e) => {
|
|
1950
|
-
let n =
|
|
1951
|
-
if (n === "excludeSubtree") return
|
|
2044
|
+
let n = Ye(e);
|
|
2045
|
+
if (n === "excludeSubtree") return W;
|
|
1952
2046
|
if (n !== "exclude") return t(e);
|
|
1953
2047
|
});
|
|
1954
2048
|
}
|
|
1955
|
-
function
|
|
2049
|
+
function bt(e, t) {
|
|
1956
2050
|
e.visit((e) => {
|
|
1957
|
-
let n =
|
|
1958
|
-
if (n === "excludeSubtree") return
|
|
2051
|
+
let n = Y.get(e);
|
|
2052
|
+
if (n === "excludeSubtree") return W;
|
|
1959
2053
|
if (n !== "exclude") return t(e);
|
|
1960
2054
|
});
|
|
1961
2055
|
}
|
|
1962
|
-
function
|
|
1963
|
-
if (
|
|
2056
|
+
function xt(e, t) {
|
|
2057
|
+
if (Dt(t), !Ft(e, t.scope)) return;
|
|
1964
2058
|
let n = [];
|
|
1965
|
-
if (
|
|
2059
|
+
if (Q(e, t.scope, (e) => {
|
|
1966
2060
|
e.explicitName === t.view && n.push(e);
|
|
1967
2061
|
}, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
|
|
1968
2062
|
if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
|
|
1969
2063
|
}
|
|
1970
|
-
function
|
|
1971
|
-
if (
|
|
2064
|
+
function St(e, t) {
|
|
2065
|
+
if (Et(t), !Ft(e, t.scope)) return;
|
|
1972
2066
|
let n = [];
|
|
1973
|
-
if (
|
|
1974
|
-
for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param &&
|
|
2067
|
+
if (Q(e, t.scope, (e) => {
|
|
2068
|
+
for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Z(i) && n.push({
|
|
1975
2069
|
view: e,
|
|
1976
2070
|
param: i
|
|
1977
2071
|
});
|
|
1978
2072
|
}), n.length === 1) return n[0];
|
|
1979
2073
|
if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
|
|
1980
2074
|
}
|
|
1981
|
-
function
|
|
2075
|
+
function Ct(e, t) {
|
|
1982
2076
|
e.visit((e) => {
|
|
1983
|
-
let n =
|
|
1984
|
-
if (n === "excludeSubtree") return
|
|
1985
|
-
if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs)
|
|
2077
|
+
let n = Y.get(e);
|
|
2078
|
+
if (n === "excludeSubtree") return W;
|
|
2079
|
+
if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Z(r) && t({
|
|
1986
2080
|
view: e,
|
|
1987
2081
|
param: r,
|
|
1988
|
-
selector:
|
|
2082
|
+
selector: _t(e, n)
|
|
1989
2083
|
});
|
|
1990
2084
|
});
|
|
1991
2085
|
}
|
|
1992
|
-
function
|
|
2086
|
+
function wt(e) {
|
|
1993
2087
|
let t = [];
|
|
1994
|
-
return
|
|
2088
|
+
return Ct(e, (e) => t.push(e)), t;
|
|
1995
2089
|
}
|
|
1996
|
-
function
|
|
2090
|
+
function Tt(e) {
|
|
1997
2091
|
let t = [];
|
|
1998
|
-
for (let n of
|
|
1999
|
-
let r =
|
|
2000
|
-
|
|
2092
|
+
for (let n of Ot(e)) {
|
|
2093
|
+
let r = kt(n);
|
|
2094
|
+
jt(e, r, t), Mt(e, r, t);
|
|
2001
2095
|
}
|
|
2002
2096
|
return t;
|
|
2003
2097
|
}
|
|
2004
|
-
function
|
|
2098
|
+
function Et(e) {
|
|
2005
2099
|
if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
|
|
2006
2100
|
if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
|
|
2007
2101
|
}
|
|
2008
|
-
function
|
|
2102
|
+
function Dt(e) {
|
|
2009
2103
|
if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
|
|
2010
2104
|
if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
|
|
2011
2105
|
}
|
|
2012
|
-
function
|
|
2013
|
-
return e.persist === !1 ? !1 :
|
|
2106
|
+
function Z(e) {
|
|
2107
|
+
return e.persist === !1 ? !1 : i(e) ? !0 : a(e) ? !!e.bind : !1;
|
|
2014
2108
|
}
|
|
2015
|
-
function
|
|
2109
|
+
function Ot(e) {
|
|
2016
2110
|
let t = /* @__PURE__ */ new Set([e]);
|
|
2017
2111
|
return e.visit((e) => {
|
|
2018
|
-
let n =
|
|
2112
|
+
let n = J.get(e);
|
|
2019
2113
|
n && typeof n.name == "string" && t.add(e);
|
|
2020
2114
|
}), Array.from(t);
|
|
2021
2115
|
}
|
|
2022
|
-
function
|
|
2023
|
-
return
|
|
2116
|
+
function kt(e) {
|
|
2117
|
+
return X(e);
|
|
2024
2118
|
}
|
|
2025
|
-
function
|
|
2119
|
+
function At(e) {
|
|
2026
2120
|
return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
|
|
2027
2121
|
}
|
|
2028
|
-
function
|
|
2122
|
+
function jt(e, t, n) {
|
|
2029
2123
|
let r = /* @__PURE__ */ new Map();
|
|
2030
|
-
|
|
2124
|
+
Q(e, t, (e) => {
|
|
2031
2125
|
for (let [t, n] of e.paramRuntime.paramConfigs) {
|
|
2032
|
-
if (!
|
|
2126
|
+
if (!Z(n)) continue;
|
|
2033
2127
|
let i = r.get(t);
|
|
2034
2128
|
i ? i.push(e) : r.set(t, [e]);
|
|
2035
2129
|
}
|
|
@@ -2038,53 +2132,53 @@ function Dt(e, t, n) {
|
|
|
2038
2132
|
if (i.length <= 1) continue;
|
|
2039
2133
|
let r = i.map((e) => e.getPathString()).join(", ");
|
|
2040
2134
|
n.push({
|
|
2041
|
-
message: "Bookmarkable parameter \"" + e + "\" is not unique within " +
|
|
2135
|
+
message: "Bookmarkable parameter \"" + e + "\" is not unique within " + At(t) + ". Found in: " + r + ".",
|
|
2042
2136
|
scope: t
|
|
2043
2137
|
});
|
|
2044
2138
|
}
|
|
2045
2139
|
}
|
|
2046
|
-
function
|
|
2047
|
-
let r =
|
|
2140
|
+
function Mt(e, t, n) {
|
|
2141
|
+
let r = Nt(e, t);
|
|
2048
2142
|
if (!r.length) return;
|
|
2049
|
-
let i = r.filter((e) =>
|
|
2143
|
+
let i = r.filter((e) => Pt(e));
|
|
2050
2144
|
if (i.length <= 1) return;
|
|
2051
2145
|
let a = /* @__PURE__ */ new Map();
|
|
2052
2146
|
for (let e of i) {
|
|
2053
|
-
let t =
|
|
2147
|
+
let t = J.get(e), n = t ? t.name : void 0;
|
|
2054
2148
|
typeof n == "string" && n.length && a.set(n, (a.get(n) ?? 0) + 1);
|
|
2055
2149
|
}
|
|
2056
2150
|
for (let [e, r] of a) r > 1 && n.push({
|
|
2057
|
-
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " +
|
|
2151
|
+
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + At(t) + ".",
|
|
2058
2152
|
scope: t
|
|
2059
2153
|
});
|
|
2060
2154
|
}
|
|
2061
|
-
function
|
|
2155
|
+
function Nt(e, t) {
|
|
2062
2156
|
let n = [];
|
|
2063
|
-
return
|
|
2064
|
-
if (
|
|
2065
|
-
let r =
|
|
2157
|
+
return Q(e, t, (e) => {
|
|
2158
|
+
if (X(e).length !== t.length + 1) return;
|
|
2159
|
+
let r = J.get(e);
|
|
2066
2160
|
r && typeof r.name == "string" && n.push(e);
|
|
2067
2161
|
}, { includeNamedImportRoots: !0 }), n;
|
|
2068
2162
|
}
|
|
2069
|
-
function
|
|
2163
|
+
function Pt(e) {
|
|
2070
2164
|
let t = !1;
|
|
2071
2165
|
return e.visit((e) => {
|
|
2072
|
-
let n =
|
|
2073
|
-
if (n === "excludeSubtree") return
|
|
2166
|
+
let n = Y.get(e);
|
|
2167
|
+
if (n === "excludeSubtree") return W;
|
|
2074
2168
|
if (n !== "exclude") {
|
|
2075
|
-
for (let n of e.paramRuntime.paramConfigs.values()) if (
|
|
2169
|
+
for (let n of e.paramRuntime.paramConfigs.values()) if (Z(n)) return t = !0, G;
|
|
2076
2170
|
}
|
|
2077
2171
|
}), t;
|
|
2078
2172
|
}
|
|
2079
|
-
function
|
|
2173
|
+
function Ft(e, t) {
|
|
2080
2174
|
let n = e, r = [];
|
|
2081
2175
|
for (let i of t) {
|
|
2082
2176
|
if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
|
|
2083
2177
|
let t, a = !1;
|
|
2084
|
-
if (
|
|
2085
|
-
let n =
|
|
2086
|
-
if (n && n.name === i &&
|
|
2087
|
-
if (t) return a = !0,
|
|
2178
|
+
if (Q(e, r, (e) => {
|
|
2179
|
+
let n = J.get(e);
|
|
2180
|
+
if (n && n.name === i && X(e).length === r.length + 1) {
|
|
2181
|
+
if (t) return a = !0, G;
|
|
2088
2182
|
t = e;
|
|
2089
2183
|
}
|
|
2090
2184
|
}, { includeNamedImportRoots: !0 }), a) throw Error("Multiple import instances named \"" + i + "\" in scope.");
|
|
@@ -2093,25 +2187,25 @@ function jt(e, t) {
|
|
|
2093
2187
|
}
|
|
2094
2188
|
return n;
|
|
2095
2189
|
}
|
|
2096
|
-
function
|
|
2190
|
+
function Q(e, t, n, r = {}) {
|
|
2097
2191
|
let i = r.includeNamedImportRoots ?? !1;
|
|
2098
2192
|
e.visit((e) => {
|
|
2099
|
-
let r =
|
|
2100
|
-
if (a === "excludeSubtree") return
|
|
2101
|
-
if (a !== "exclude" &&
|
|
2193
|
+
let r = J.get(e), a = Y.get(e);
|
|
2194
|
+
if (a === "excludeSubtree") return W;
|
|
2195
|
+
if (a !== "exclude" && It(e, t, r, i)) return n(e);
|
|
2102
2196
|
});
|
|
2103
2197
|
}
|
|
2104
|
-
function
|
|
2105
|
-
let i =
|
|
2106
|
-
return
|
|
2198
|
+
function It(e, t, n, r) {
|
|
2199
|
+
let i = X(e);
|
|
2200
|
+
return Lt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : $(t, i);
|
|
2107
2201
|
}
|
|
2108
|
-
function
|
|
2109
|
-
return e.length === t.length &&
|
|
2202
|
+
function Lt(e, t) {
|
|
2203
|
+
return e.length === t.length && $(e, t);
|
|
2110
2204
|
}
|
|
2111
|
-
function
|
|
2205
|
+
function $(e, t) {
|
|
2112
2206
|
if (e.length > t.length) return !1;
|
|
2113
2207
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
2114
2208
|
return !0;
|
|
2115
2209
|
}
|
|
2116
2210
|
//#endregion
|
|
2117
|
-
export {
|
|
2211
|
+
export { P as A, D as B, Ue as C, Fe as D, Re as E, S as F, ve as G, le as H, k as I, pe as K, T as L, j as M, xe as N, F as O, x as P, fe as R, qe as S, Le as T, _e as U, E as V, b as W, G as _, ht as a, Xe as b, pt as c, St as d, xt as f, W as g, yt as h, gt as i, Ce as j, N as k, lt as l, bt as m, ft as n, vt as o, Tt as p, de as q, X as r, mt as s, wt as t, ut as u, rt as v, B as w, Ze as x, $e as y, ue as z };
|