@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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as
|
|
3
|
-
import { a as y, n as
|
|
4
|
-
import { t as
|
|
1
|
+
import { Cn as e, G as t, K as n, S as r, Tn as i, Xt as a, bn as o, f as s, g as c, h as l, in as u, jn as d, l as f, mn as p, o as m, p as h, t as ee, ut as g, wn as te, y as _, yt as ne } from "./clipOptions-DElJ8dTZ.js";
|
|
2
|
+
import { E as re, m as ie, y as v } from "./vega-scale-o9TRyzYH.js";
|
|
3
|
+
import { a as y, n as ae, r as oe, t as b } from "./viewError-BkJeVYXA.js";
|
|
4
|
+
import { t as se } from "./warning-CpIIpk8e.js";
|
|
5
5
|
//#region ../../node_modules/flatqueue/index.js
|
|
6
6
|
var x = class {
|
|
7
7
|
constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
|
|
@@ -44,11 +44,11 @@ var x = class {
|
|
|
44
44
|
shrink() {
|
|
45
45
|
Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
|
|
46
46
|
}
|
|
47
|
-
}, S = Symbol("runtimeNode"),
|
|
48
|
-
function
|
|
47
|
+
}, S = Symbol("runtimeNode"), ce = 1e6;
|
|
48
|
+
function le(e) {
|
|
49
49
|
return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function ue(e, t, n = !0) {
|
|
52
52
|
let r = {
|
|
53
53
|
id: e.id,
|
|
54
54
|
name: e.name,
|
|
@@ -72,18 +72,18 @@ function ce(e, t, n = !0) {
|
|
|
72
72
|
t(e);
|
|
73
73
|
} }) : r;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function de(e) {
|
|
76
76
|
let t = e[S];
|
|
77
77
|
if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
|
|
78
78
|
return t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return typeof e.rank == "number" ? e.rank :
|
|
80
|
+
function fe(e) {
|
|
81
|
+
return typeof e.rank == "number" ? e.rank : de(e).rank;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function pe(e) {
|
|
84
84
|
for (let t of e) t();
|
|
85
85
|
}
|
|
86
|
-
var
|
|
86
|
+
var me = class {
|
|
87
87
|
#e = 1;
|
|
88
88
|
#t = 1;
|
|
89
89
|
#n = 0;
|
|
@@ -101,8 +101,9 @@ var fe = class {
|
|
|
101
101
|
#m = new x();
|
|
102
102
|
#h = /* @__PURE__ */ new Set();
|
|
103
103
|
#g;
|
|
104
|
+
#_;
|
|
104
105
|
constructor(e = {}) {
|
|
105
|
-
this.#g =
|
|
106
|
+
this.#g = le(e.lifecycleRegistry), this.#_ = e.onError;
|
|
106
107
|
}
|
|
107
108
|
createWritable(e, t, n, r, i = {}) {
|
|
108
109
|
let a = "n" + this.#e++, o = i.notify ?? !0, s = {
|
|
@@ -120,20 +121,20 @@ var fe = class {
|
|
|
120
121
|
}
|
|
121
122
|
}, c = (e) => {
|
|
122
123
|
if (s.disposed) throw Error("Cannot set disposed parameter \"" + t + "\" (" + a + ").");
|
|
123
|
-
e !== s.value && (s.value = e, o && this.#
|
|
124
|
+
e !== s.value && (s.value = e, o && this.#y(s.listeners));
|
|
124
125
|
}, l = () => {
|
|
125
126
|
s.disposed = !0, s.listeners.clear(), u();
|
|
126
127
|
}, u = this.#g(e, l);
|
|
127
|
-
return Object.assign(
|
|
128
|
+
return Object.assign(ue(s, c, o), { dispose: l });
|
|
128
129
|
}
|
|
129
130
|
computed(e, t, n, r, i = {}) {
|
|
130
|
-
return this.#
|
|
131
|
+
return this.#v(e, t, n, r, i);
|
|
131
132
|
}
|
|
132
133
|
operation(e, t, n, r, i, a = {}) {
|
|
133
|
-
return this.#
|
|
134
|
+
return this.#v(e, t, n, r, a, i);
|
|
134
135
|
}
|
|
135
|
-
#
|
|
136
|
-
let o = this.#
|
|
136
|
+
#v(e, t, n, r, i, a) {
|
|
137
|
+
let o = this.#S(() => s.dependencies), s = {
|
|
137
138
|
id: "n" + this.#e++,
|
|
138
139
|
name: t,
|
|
139
140
|
kind: "derived",
|
|
@@ -155,11 +156,11 @@ var fe = class {
|
|
|
155
156
|
};
|
|
156
157
|
a?.(s.value);
|
|
157
158
|
let c = () => s.dependencies.map((e) => e.subscribe(() => {
|
|
158
|
-
s.disposed || (this.#
|
|
159
|
+
s.disposed || (this.#C(s), e.propagation === "sync" && this.flushNow());
|
|
159
160
|
})), l = c(), u = () => {
|
|
160
161
|
s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
|
|
161
162
|
}, d = this.#g(e, u);
|
|
162
|
-
return Object.assign(
|
|
163
|
+
return Object.assign(ue(s), {
|
|
163
164
|
dispose: u,
|
|
164
165
|
rebind: (e, n) => {
|
|
165
166
|
if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
|
|
@@ -171,15 +172,15 @@ var fe = class {
|
|
|
171
172
|
for (let e of n?.dependencies ?? []) i(e);
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
|
-
e.forEach(i), l.forEach((e) => e()), s.dependencies = e, s.fn = n, this.#n++, l = c(), this.#
|
|
175
|
-
for (let e of this.#d) this.#p.push(e, this.#
|
|
175
|
+
e.forEach(i), l.forEach((e) => e()), s.dependencies = e, s.fn = n, this.#n++, l = c(), this.#C(s), this.#p.clear();
|
|
176
|
+
for (let e of this.#d) this.#p.push(e, this.#T(e.rank));
|
|
176
177
|
this.#m.clear();
|
|
177
|
-
for (let e of this.#f) this.#m.push(e, this.#
|
|
178
|
+
for (let e of this.#f) this.#m.push(e, this.#T(e.rank));
|
|
178
179
|
}
|
|
179
180
|
});
|
|
180
181
|
}
|
|
181
182
|
effect(e, t, n) {
|
|
182
|
-
let r = this.#
|
|
183
|
+
let r = this.#S(() => t), i = {
|
|
183
184
|
id: "n" + this.#e++,
|
|
184
185
|
get rank() {
|
|
185
186
|
return r();
|
|
@@ -187,7 +188,7 @@ var fe = class {
|
|
|
187
188
|
disposed: !1,
|
|
188
189
|
fn: n
|
|
189
190
|
}, a = t.map((e) => e.subscribe(() => {
|
|
190
|
-
i.disposed || (this.#
|
|
191
|
+
i.disposed || (this.#w(i), e.propagation === "sync" && this.flushNow());
|
|
191
192
|
})), o = () => {
|
|
192
193
|
i.disposed || (i.disposed = !0, s(), a.forEach((e) => e()), this.#f.delete(i));
|
|
193
194
|
}, s = this.#g(e, o);
|
|
@@ -195,10 +196,12 @@ var fe = class {
|
|
|
195
196
|
}
|
|
196
197
|
runInTransaction(e) {
|
|
197
198
|
this.#r += 1;
|
|
199
|
+
let t = !1;
|
|
198
200
|
try {
|
|
199
|
-
|
|
201
|
+
let n = e();
|
|
202
|
+
return t = !0, n;
|
|
200
203
|
} finally {
|
|
201
|
-
--this.#r, this.#r === 0 && (this.#i ? (this.#i = !1, this.flushNow()) : this.#
|
|
204
|
+
--this.#r, this.#r === 0 && (t ? this.#i ? (this.#i = !1, this.flushNow()) : this.#E() : this.#i = !1);
|
|
202
205
|
}
|
|
203
206
|
}
|
|
204
207
|
flushNow({ afterTransaction: e = !1 } = {}) {
|
|
@@ -214,14 +217,14 @@ var fe = class {
|
|
|
214
217
|
for (; this.#p.length;) {
|
|
215
218
|
let e = this.#p.pop();
|
|
216
219
|
if (this.#d.delete(e), e.disposed) continue;
|
|
217
|
-
this.#
|
|
220
|
+
this.#x(e, e.name);
|
|
218
221
|
let t, n;
|
|
219
222
|
try {
|
|
220
223
|
t = e.fn(), n = !e.equals(t, e.value), n && e.apply?.(t);
|
|
221
224
|
} catch (t) {
|
|
222
|
-
throw this.#
|
|
225
|
+
throw this.#C(e), t;
|
|
223
226
|
}
|
|
224
|
-
n && (e.value = t, this.#
|
|
227
|
+
n && (e.value = t, this.#y(e.listeners));
|
|
225
228
|
}
|
|
226
229
|
if (this.#l.size) {
|
|
227
230
|
let e = Infinity, n;
|
|
@@ -238,20 +241,16 @@ var fe = class {
|
|
|
238
241
|
if (!e) break;
|
|
239
242
|
n = e;
|
|
240
243
|
}
|
|
241
|
-
t = this.#l.get(n).onError, this.#l.delete(n), this.#
|
|
244
|
+
t = this.#l.get(n).onError, this.#l.delete(n), this.#x(n, "streaming update"), n(), t = void 0;
|
|
242
245
|
} else if (this.#m.length) {
|
|
243
246
|
let e = this.#m.pop();
|
|
244
|
-
this.#f.delete(e), e.disposed || (this.#
|
|
247
|
+
this.#f.delete(e), e.disposed || (this.#x(e, "effect " + e.id), e.fn());
|
|
245
248
|
}
|
|
246
249
|
}
|
|
247
250
|
} catch (e) {
|
|
248
|
-
|
|
249
|
-
this.#l.clear(), t?.(e);
|
|
250
|
-
for (let t of n) t.onError?.(e);
|
|
251
|
-
for (let t of this.#h) t.reject(e);
|
|
252
|
-
throw this.#h.clear(), e;
|
|
251
|
+
throw this.#b(e, t), e;
|
|
253
252
|
} finally {
|
|
254
|
-
this.#u.clear(), this.#o = !1, this.#
|
|
253
|
+
this.#u.clear(), this.#o = !1, this.#O();
|
|
255
254
|
}
|
|
256
255
|
}
|
|
257
256
|
requestUpdate(e, t = 0, n, r) {
|
|
@@ -259,26 +258,41 @@ var fe = class {
|
|
|
259
258
|
rank: t,
|
|
260
259
|
onError: n,
|
|
261
260
|
prerequisites: r
|
|
262
|
-
}), this.#
|
|
261
|
+
}), this.#E();
|
|
263
262
|
}
|
|
264
263
|
cancelUpdate(e) {
|
|
265
264
|
this.#l.delete(e);
|
|
266
265
|
}
|
|
267
|
-
#
|
|
266
|
+
#y(e) {
|
|
268
267
|
this.#s++;
|
|
269
268
|
try {
|
|
270
|
-
|
|
269
|
+
pe(e);
|
|
270
|
+
} catch (e) {
|
|
271
|
+
throw this.#c = !1, !this.#o && this.#s === 1 && this.#b(e), e;
|
|
271
272
|
} finally {
|
|
272
273
|
this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
|
|
273
274
|
}
|
|
274
275
|
}
|
|
275
|
-
#
|
|
276
|
+
#b(e, t) {
|
|
277
|
+
this.#a = !1;
|
|
278
|
+
let n = Array.from(this.#l.values());
|
|
279
|
+
this.#l.clear(), t?.(e);
|
|
280
|
+
for (let t of n) t.onError?.(e);
|
|
281
|
+
for (let t of this.#h) t.reject(e);
|
|
282
|
+
this.#h.clear();
|
|
283
|
+
try {
|
|
284
|
+
this.#_?.(e);
|
|
285
|
+
} catch (e) {
|
|
286
|
+
console.error(e);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
#x(e, t) {
|
|
276
290
|
let n = (this.#u.get(e) ?? 0) + 1;
|
|
277
291
|
if (n > 100) throw Error("Reactive propagation did not settle: " + t);
|
|
278
292
|
this.#u.set(e, n);
|
|
279
293
|
}
|
|
280
294
|
whenPropagated(e = {}) {
|
|
281
|
-
if (this.#
|
|
295
|
+
if (this.#D()) return Promise.resolve();
|
|
282
296
|
let { signal: t, timeoutMs: n } = e;
|
|
283
297
|
return t?.aborted ? Promise.reject(/* @__PURE__ */ Error("whenPropagated aborted")) : new Promise((e, r) => {
|
|
284
298
|
let i, a = () => {
|
|
@@ -294,43 +308,43 @@ var fe = class {
|
|
|
294
308
|
t?.addEventListener("abort", s, { once: !0 }), n != null && (i = setTimeout(() => o.reject(/* @__PURE__ */ Error("whenPropagated timeout after " + n + " ms")), n)), this.#h.add(o);
|
|
295
309
|
});
|
|
296
310
|
}
|
|
297
|
-
#
|
|
311
|
+
#S(e) {
|
|
298
312
|
let t = -1, n = 0;
|
|
299
|
-
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e,
|
|
313
|
+
return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, fe(t)), 0), t = this.#n), n);
|
|
300
314
|
}
|
|
301
|
-
#
|
|
315
|
+
#C(e) {
|
|
302
316
|
if (this.#d.has(e)) {
|
|
303
|
-
this.#
|
|
317
|
+
this.#E();
|
|
304
318
|
return;
|
|
305
319
|
}
|
|
306
|
-
this.#d.add(e), this.#p.push(e, this.#
|
|
320
|
+
this.#d.add(e), this.#p.push(e, this.#T(e.rank)), this.#E();
|
|
307
321
|
}
|
|
308
|
-
#
|
|
322
|
+
#w(e) {
|
|
309
323
|
if (this.#f.has(e)) {
|
|
310
|
-
this.#
|
|
324
|
+
this.#E();
|
|
311
325
|
return;
|
|
312
326
|
}
|
|
313
|
-
this.#f.add(e), this.#m.push(e, this.#
|
|
327
|
+
this.#f.add(e), this.#m.push(e, this.#T(e.rank)), this.#E();
|
|
314
328
|
}
|
|
315
|
-
#
|
|
316
|
-
let t = this.#t %
|
|
317
|
-
return this.#t += 1, e *
|
|
329
|
+
#T(e) {
|
|
330
|
+
let t = this.#t % ce;
|
|
331
|
+
return this.#t += 1, e * ce + t;
|
|
318
332
|
}
|
|
319
|
-
#
|
|
333
|
+
#E() {
|
|
320
334
|
this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
|
|
321
335
|
this.#a && this.flushNow();
|
|
322
336
|
}));
|
|
323
337
|
}
|
|
324
|
-
#
|
|
338
|
+
#D() {
|
|
325
339
|
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;
|
|
326
340
|
}
|
|
327
|
-
#
|
|
328
|
-
if (this.#
|
|
341
|
+
#O() {
|
|
342
|
+
if (this.#D()) {
|
|
329
343
|
for (let e of this.#h) e.resolve();
|
|
330
344
|
this.#h.clear();
|
|
331
345
|
}
|
|
332
346
|
}
|
|
333
|
-
},
|
|
347
|
+
}, he = class {
|
|
334
348
|
#e = 1;
|
|
335
349
|
#t = /* @__PURE__ */ new Map();
|
|
336
350
|
createOwner(e, t) {
|
|
@@ -351,7 +365,7 @@ var fe = class {
|
|
|
351
365
|
t.clear(), this.#t.delete(e);
|
|
352
366
|
}
|
|
353
367
|
}
|
|
354
|
-
},
|
|
368
|
+
}, ge = class {
|
|
355
369
|
#e = 1;
|
|
356
370
|
#t = /* @__PURE__ */ new Map();
|
|
357
371
|
createRootScope(e) {
|
|
@@ -382,100 +396,110 @@ var fe = class {
|
|
|
382
396
|
if (!t) throw Error("Unknown scope: " + e);
|
|
383
397
|
t.params.clear(), t.initializers.clear();
|
|
384
398
|
}
|
|
385
|
-
registerInitializer(e,
|
|
386
|
-
t
|
|
387
|
-
let
|
|
388
|
-
if (!
|
|
389
|
-
if (
|
|
390
|
-
|
|
391
|
-
initialize:
|
|
399
|
+
registerInitializer(e, t, n) {
|
|
400
|
+
_(t);
|
|
401
|
+
let r = this.#t.get(e);
|
|
402
|
+
if (!r) throw Error("Unknown scope: " + e);
|
|
403
|
+
if (r.params.has(t) || r.initializers.has(t)) throw Error(`Parameter "${t}" already exists in scope ${e}`);
|
|
404
|
+
r.initializers.set(t, {
|
|
405
|
+
initialize: n,
|
|
392
406
|
initializing: !1
|
|
393
407
|
});
|
|
394
408
|
}
|
|
395
|
-
register(e,
|
|
396
|
-
t
|
|
397
|
-
let
|
|
398
|
-
if (!
|
|
399
|
-
if (
|
|
400
|
-
return
|
|
401
|
-
}
|
|
402
|
-
resolve(e,
|
|
403
|
-
t
|
|
404
|
-
let
|
|
405
|
-
for (;
|
|
406
|
-
let e = this.#t.get(
|
|
407
|
-
if (!e) throw Error("Unknown scope: " +
|
|
408
|
-
let
|
|
409
|
-
if (
|
|
410
|
-
if (
|
|
411
|
-
|
|
409
|
+
register(e, t, n) {
|
|
410
|
+
_(t);
|
|
411
|
+
let r = this.#t.get(e);
|
|
412
|
+
if (!r) throw Error("Unknown scope: " + e);
|
|
413
|
+
if (r.params.has(t) || r.initializers.get(t)?.initializing === !1) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
|
|
414
|
+
return r.params.set(t, n), n;
|
|
415
|
+
}
|
|
416
|
+
resolve(e, t) {
|
|
417
|
+
_(t);
|
|
418
|
+
let n = e;
|
|
419
|
+
for (; n;) {
|
|
420
|
+
let e = this.#t.get(n);
|
|
421
|
+
if (!e) throw Error("Unknown scope: " + n);
|
|
422
|
+
let r = e.initializers.get(t);
|
|
423
|
+
if (r) {
|
|
424
|
+
if (r.initializing) throw Error(`Parameter dependency cycle while initializing "${t}" in ${n}.`);
|
|
425
|
+
r.initializing = !0;
|
|
412
426
|
try {
|
|
413
|
-
if (
|
|
414
|
-
e.initializers.delete(
|
|
427
|
+
if (r.initialize(), !e.params.has(t)) throw Error(`Initializer did not register parameter "${t}".`);
|
|
428
|
+
e.initializers.delete(t);
|
|
415
429
|
} finally {
|
|
416
|
-
|
|
430
|
+
r.initializing = !1;
|
|
417
431
|
}
|
|
418
432
|
}
|
|
419
|
-
let i = e.params.get(
|
|
433
|
+
let i = e.params.get(t);
|
|
420
434
|
if (i) return i;
|
|
421
|
-
|
|
435
|
+
n = e.parentScope;
|
|
422
436
|
}
|
|
423
437
|
}
|
|
424
438
|
};
|
|
425
439
|
//#endregion
|
|
426
440
|
//#region ../core/src/paramRuntime/expressionCompiler.js
|
|
427
|
-
function
|
|
428
|
-
return
|
|
441
|
+
function _e(e, t = {}, r = {}) {
|
|
442
|
+
return n(e, t, r);
|
|
429
443
|
}
|
|
430
444
|
//#endregion
|
|
431
445
|
//#region ../core/src/paramRuntime/expressionRef.js
|
|
432
|
-
function
|
|
433
|
-
let r = {}, i =
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
446
|
+
function C(e, t, n = {}) {
|
|
447
|
+
let r = {}, i = _e(e, r, n), o = /* @__PURE__ */ new Map();
|
|
448
|
+
try {
|
|
449
|
+
for (let n of i.globals) {
|
|
450
|
+
if (o.has(n)) continue;
|
|
451
|
+
let i = t(n);
|
|
452
|
+
if (!i) throw Error("Unknown variable \"" + n + "\" in expression: " + e);
|
|
453
|
+
o.set(n, i), Object.defineProperty(r, n, {
|
|
454
|
+
enumerable: !0,
|
|
455
|
+
get() {
|
|
456
|
+
return i.get();
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
} catch (e) {
|
|
461
|
+
throw a(e, n.specLocation);
|
|
444
462
|
}
|
|
445
|
-
let
|
|
463
|
+
let s = /* @__PURE__ */ new Set();
|
|
446
464
|
return i.subscribe = (e) => {
|
|
447
465
|
let t = [];
|
|
448
|
-
for (let n of
|
|
466
|
+
for (let n of o.values()) t.push(n.subscribe(e));
|
|
449
467
|
for (let n of i.scaleDependencies ?? []) t.push(n.subscribe(e));
|
|
450
468
|
let n = !0, r = () => {
|
|
451
|
-
n && (n = !1,
|
|
469
|
+
n && (n = !1, s.delete(r), t.forEach((e) => e()));
|
|
452
470
|
};
|
|
453
|
-
return
|
|
471
|
+
return s.add(r), r;
|
|
454
472
|
}, i.invalidate = () => {
|
|
455
|
-
for (let e of
|
|
456
|
-
|
|
473
|
+
for (let e of s) e();
|
|
474
|
+
s.clear();
|
|
457
475
|
}, i.createSnapshotEvaluator = () => {
|
|
458
476
|
let e = {};
|
|
459
|
-
for (let t of Object.keys(r))
|
|
460
|
-
for (let [t, n] of
|
|
477
|
+
for (let t of Object.keys(r)) o.has(t) || (e[t] = r[t]);
|
|
478
|
+
for (let [t, n] of o) n.batchStable || Object.defineProperty(e, t, {
|
|
461
479
|
enumerable: !0,
|
|
462
480
|
get: () => n.get()
|
|
463
481
|
});
|
|
464
482
|
let t = Object.assign(i.createEvaluator(e), { refresh() {
|
|
465
|
-
for (let [t, n] of
|
|
483
|
+
for (let [t, n] of o) n.batchStable && (e[t] = n.get());
|
|
466
484
|
} });
|
|
467
485
|
return t.refresh(), t;
|
|
468
|
-
}, i.identifier = () => i.code + "|" + Array.from(
|
|
486
|
+
}, i.identifier = () => i.code + "|" + Array.from(o.values()).map((e) => e.id).concat((i.scaleDependencies ?? []).map((e) => e.id)).join(","), i.dependencies = Array.from(o.values()).concat(i.scaleDependencies ?? []), {
|
|
469
487
|
expression: i,
|
|
470
488
|
dependencies: i.dependencies
|
|
471
489
|
};
|
|
472
490
|
}
|
|
473
491
|
//#endregion
|
|
474
492
|
//#region ../core/src/paramRuntime/paramRuntime.js
|
|
475
|
-
var
|
|
476
|
-
#e = new
|
|
477
|
-
#t
|
|
478
|
-
#n = new
|
|
493
|
+
var ve = class {
|
|
494
|
+
#e = new he();
|
|
495
|
+
#t;
|
|
496
|
+
#n = new ge();
|
|
497
|
+
constructor(e = {}) {
|
|
498
|
+
this.#t = new me({
|
|
499
|
+
lifecycleRegistry: this.#e,
|
|
500
|
+
onError: e.onError
|
|
501
|
+
});
|
|
502
|
+
}
|
|
479
503
|
createScope(e) {
|
|
480
504
|
let t = this.#e.createOwner("scope", e ?? "root");
|
|
481
505
|
return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
|
|
@@ -500,11 +524,11 @@ var _e = class {
|
|
|
500
524
|
return this.#n.register(e, t, a);
|
|
501
525
|
}
|
|
502
526
|
registerDerived(e, t, n, r) {
|
|
503
|
-
let { expression: i, dependencies: a } =
|
|
527
|
+
let { expression: i, dependencies: a } = C(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
|
|
504
528
|
return this.#n.register(e, t, s);
|
|
505
529
|
}
|
|
506
530
|
createExpression(e, t, n) {
|
|
507
|
-
let { expression: r } =
|
|
531
|
+
let { expression: r } = C(t, (t) => this.resolve(e, t), n);
|
|
508
532
|
return r;
|
|
509
533
|
}
|
|
510
534
|
resolve(e, t) {
|
|
@@ -537,11 +561,11 @@ var _e = class {
|
|
|
537
561
|
whenPropagated(e) {
|
|
538
562
|
return this.#t.whenPropagated(e);
|
|
539
563
|
}
|
|
540
|
-
},
|
|
541
|
-
function
|
|
564
|
+
}, ye = (e) => new Promise((t) => setTimeout(t, e));
|
|
565
|
+
function be() {
|
|
542
566
|
return { canceled: !1 };
|
|
543
567
|
}
|
|
544
|
-
function
|
|
568
|
+
function xe(e) {
|
|
545
569
|
let t = e.requestAnimationFrame || window.requestAnimationFrame, n = e.signal, r = e.cancelToken, i = () => new Promise((i, a) => {
|
|
546
570
|
if (r?.canceled) return i();
|
|
547
571
|
if (n?.aborted) return a("aborted");
|
|
@@ -554,13 +578,13 @@ function be(e) {
|
|
|
554
578
|
};
|
|
555
579
|
t(m);
|
|
556
580
|
});
|
|
557
|
-
return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") :
|
|
581
|
+
return e.delay ? r?.canceled ? Promise.resolve() : n?.aborted ? Promise.reject("aborted") : ye(e.delay).then(i) : i();
|
|
558
582
|
}
|
|
559
583
|
//#endregion
|
|
560
584
|
//#region ../core/src/utils/animator.js
|
|
561
|
-
var
|
|
562
|
-
constructor(e) {
|
|
563
|
-
this._renderCallback = e, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
|
|
585
|
+
var Se = class {
|
|
586
|
+
constructor(e, t) {
|
|
587
|
+
this._renderCallback = e, this._onError = t, this._renderRequested = !1, this._finalized = !1, this._warn = !1, this._animationFrameRequest = void 0, this.transitions = [], this.transitionsEnabled = !0;
|
|
564
588
|
}
|
|
565
589
|
requestTransition(e) {
|
|
566
590
|
this._finalized || (this.cancelTransition(e), this.transitions.push(e), this.requestRender());
|
|
@@ -575,22 +599,27 @@ var xe = class {
|
|
|
575
599
|
this._renderRequested = !1;
|
|
576
600
|
let t = this.transitions;
|
|
577
601
|
this.transitions = [];
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
602
|
+
try {
|
|
603
|
+
let n;
|
|
604
|
+
for (; n = t.shift();) n(e);
|
|
605
|
+
this._finalized || this._renderCallback(e);
|
|
606
|
+
} catch (e) {
|
|
607
|
+
if (!this._onError) throw e;
|
|
608
|
+
this._onError(e);
|
|
609
|
+
}
|
|
581
610
|
})));
|
|
582
611
|
}
|
|
583
612
|
finalize() {
|
|
584
613
|
this._finalized = !0, this._renderRequested = !1, this.transitions = [], this._animationFrameRequest !== void 0 && (window.cancelAnimationFrame(this._animationFrameRequest), this._animationFrameRequest = void 0);
|
|
585
614
|
}
|
|
586
615
|
transition(e) {
|
|
587
|
-
return
|
|
616
|
+
return xe({
|
|
588
617
|
requestAnimationFrame: (e) => this.requestTransition(e),
|
|
589
618
|
...e
|
|
590
619
|
});
|
|
591
620
|
}
|
|
592
621
|
};
|
|
593
|
-
function
|
|
622
|
+
function w(e, t, n, r, i) {
|
|
594
623
|
let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
|
|
595
624
|
function u(e, t, n, r) {
|
|
596
625
|
return t + (e - t) * 2 ** (-n / r);
|
|
@@ -623,7 +652,7 @@ function Ce() {
|
|
|
623
652
|
}
|
|
624
653
|
//#endregion
|
|
625
654
|
//#region ../core/src/paramRuntime/viewParamRuntime.js
|
|
626
|
-
var
|
|
655
|
+
var T = class {
|
|
627
656
|
#e;
|
|
628
657
|
#t;
|
|
629
658
|
#n = /* @__PURE__ */ new Map();
|
|
@@ -639,11 +668,12 @@ var C = class {
|
|
|
639
668
|
#f;
|
|
640
669
|
#p;
|
|
641
670
|
#m;
|
|
642
|
-
#h
|
|
671
|
+
#h;
|
|
672
|
+
#g = !1;
|
|
643
673
|
constructor(e, t, n, r = {}) {
|
|
644
|
-
this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
|
|
674
|
+
this.#d = e ?? (() => void 0), this.#f = t ?? (() => void 0), this.#p = n, this.#h = r.getSpecOrigin, this.#m = r.settleTemporalUpdatesImmediately ?? !1;
|
|
645
675
|
let i = this.#d();
|
|
646
|
-
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new
|
|
676
|
+
i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new ve({ onError: r.onError }), this.#t = this.#e.createScope());
|
|
647
677
|
}
|
|
648
678
|
setSelectionSource(e) {
|
|
649
679
|
this.#s = e;
|
|
@@ -662,38 +692,46 @@ var C = class {
|
|
|
662
692
|
if (o) throw Error(`Conflicting selection declarations for "${e}" in "${i.location}" and "${o.location}".`);
|
|
663
693
|
return i;
|
|
664
694
|
}
|
|
665
|
-
#
|
|
695
|
+
#_(e) {
|
|
666
696
|
if (!("select" in e)) return;
|
|
667
|
-
let t =
|
|
697
|
+
let t = r(e.select), n = t.type === "interval" ? "interval" : t.toggle ? "multi" : "single", i = t.type === "interval" ? Array.from(new Set(t.encodings)).sort() : [], a = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, o = {
|
|
668
698
|
kind: n,
|
|
669
|
-
components:
|
|
699
|
+
components: i,
|
|
670
700
|
source: this.#s
|
|
671
|
-
},
|
|
672
|
-
if (
|
|
673
|
-
|
|
674
|
-
|
|
701
|
+
}, s = a.#c.get(e.name) ?? /* @__PURE__ */ new Set(), c = s.values().next().value;
|
|
702
|
+
if (c && (c.kind !== n || 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}".`);
|
|
703
|
+
s.add(o), a.#c.set(e.name, s), this.#e.addScopeDisposer(this.#t, () => {
|
|
704
|
+
s.delete(o);
|
|
675
705
|
});
|
|
676
706
|
}
|
|
677
|
-
|
|
678
|
-
return {
|
|
707
|
+
#v(e) {
|
|
708
|
+
return {
|
|
709
|
+
resolveScaleResolution: this.#f,
|
|
710
|
+
specLocation: this.getSpecLocation(e, ["expr"])
|
|
711
|
+
};
|
|
679
712
|
}
|
|
680
|
-
registerParam(e,
|
|
681
|
-
let
|
|
682
|
-
|
|
683
|
-
|
|
713
|
+
registerParam(e, t = {}) {
|
|
714
|
+
let n = e.name;
|
|
715
|
+
try {
|
|
716
|
+
_(n);
|
|
717
|
+
} catch (t) {
|
|
718
|
+
throw a(t, this.getSpecLocation(e, ["name"]));
|
|
719
|
+
}
|
|
720
|
+
if (this.#i.has(n) || this.#a.has(n)) throw a(/* @__PURE__ */ Error("Parameter \"" + n + "\" already registered in this scope."), this.getSpecLocation(e, ["name"]));
|
|
721
|
+
if (Te(e), t.defer) {
|
|
684
722
|
if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
|
|
685
|
-
return this.#e.registerInitializer(this.#t,
|
|
686
|
-
this.#
|
|
687
|
-
}), this.#i.set(
|
|
688
|
-
throw Error("Cannot set derived parameter \"" +
|
|
723
|
+
return this.#e.registerInitializer(this.#t, n, () => {
|
|
724
|
+
this.#y(e);
|
|
725
|
+
}), this.#i.set(n, e), () => {
|
|
726
|
+
throw Error("Cannot set derived parameter \"" + n + "\".");
|
|
689
727
|
};
|
|
690
728
|
}
|
|
691
|
-
return this.#
|
|
729
|
+
return this.#y(e);
|
|
692
730
|
}
|
|
693
731
|
registerLazyExpression(e, t, n) {
|
|
694
732
|
this.#e.registerInitializer(this.#t, e, () => {
|
|
695
733
|
n?.();
|
|
696
|
-
let r = this.#e.registerDerived(this.#t, e, t, this.#
|
|
734
|
+
let r = this.#e.registerDerived(this.#t, e, t, this.#v());
|
|
697
735
|
this.#r.set(e, r);
|
|
698
736
|
}), this.#a.add(e);
|
|
699
737
|
}
|
|
@@ -703,7 +741,7 @@ var C = class {
|
|
|
703
741
|
this.#e.registerInitializer(this.#t, e, () => {
|
|
704
742
|
let r = this.#e.registerDerived(this.#t, e, t, {
|
|
705
743
|
expressionScope: n.#t,
|
|
706
|
-
...n.#
|
|
744
|
+
...n.#v()
|
|
707
745
|
});
|
|
708
746
|
this.#r.set(e, r);
|
|
709
747
|
}), this.#i.set(e, {
|
|
@@ -711,31 +749,31 @@ var C = class {
|
|
|
711
749
|
expr: t
|
|
712
750
|
});
|
|
713
751
|
}
|
|
714
|
-
#
|
|
752
|
+
#y(e) {
|
|
715
753
|
let t = e.name, n, r;
|
|
716
754
|
if (e.push == "outer") {
|
|
717
755
|
let i = this.findRuntimeForParam(t);
|
|
718
|
-
if (!i) throw Error(`Parameter "${t}" not found in outer scope!`);
|
|
719
|
-
let
|
|
720
|
-
if (!
|
|
721
|
-
if ("expr" in
|
|
756
|
+
if (!i) throw a(/* @__PURE__ */ Error(`Parameter "${t}" not found in outer scope!`), this.getSpecLocation(e, ["name"]));
|
|
757
|
+
let o = i.paramConfigs.get(t);
|
|
758
|
+
if (!o) throw Error(`Outer parameter "${t}" exists as a value but has no registered config.`);
|
|
759
|
+
if ("expr" in o || "select" in o || "ruler" in o) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
|
|
722
760
|
n = (e) => {
|
|
723
761
|
i.setValue(t, e);
|
|
724
|
-
}, this.#n.set(t, n), "ruler" in e && (r =
|
|
725
|
-
} else if ("value" in e) r =
|
|
726
|
-
else if (
|
|
727
|
-
if ("transition" in e) this.#
|
|
728
|
-
else if ("debounce" in e) this.#
|
|
762
|
+
}, this.#n.set(t, n), "ruler" in e && (r = s(e, this), n(r));
|
|
763
|
+
} else if ("value" in e) r = s(e, this), n = "transition" in e ? this.#x(t, r, e.transition) : this.#b(t, r);
|
|
764
|
+
else if (h(e)) {
|
|
765
|
+
if ("transition" in e) this.#S(t, e, e.transition);
|
|
766
|
+
else if ("debounce" in e) this.#C(t, e, e.debounce);
|
|
729
767
|
else {
|
|
730
|
-
let n = this.#e.registerDerived(this.#t, t, e.expr, this.#
|
|
768
|
+
let n = this.#e.registerDerived(this.#t, t, e.expr, this.#v(e));
|
|
731
769
|
this.#r.set(t, n);
|
|
732
770
|
}
|
|
733
771
|
n = () => {
|
|
734
772
|
throw Error("Cannot set derived parameter \"" + t + "\".");
|
|
735
773
|
};
|
|
736
|
-
} else r =
|
|
774
|
+
} else r = s(e, this), n = this.#b(t, r);
|
|
737
775
|
if ("select" in e) {
|
|
738
|
-
if (r ??=
|
|
776
|
+
if (r ??= s(e, this), !this.#n.has(t)) {
|
|
739
777
|
let e = this.#e.registerSelection(this.#t, t, r);
|
|
740
778
|
this.#r.set(t, e), this.#n.set(t, (t) => {
|
|
741
779
|
e.set(t), this.#e.flushNow();
|
|
@@ -743,33 +781,33 @@ var C = class {
|
|
|
743
781
|
}
|
|
744
782
|
n(r);
|
|
745
783
|
}
|
|
746
|
-
return this.#i.set(t, e), this.#
|
|
747
|
-
}
|
|
748
|
-
allocateSetter(e,
|
|
749
|
-
if (
|
|
750
|
-
let
|
|
751
|
-
this.#r.set(e,
|
|
752
|
-
let
|
|
753
|
-
|
|
784
|
+
return this.#i.set(t, e), this.#_(e), n;
|
|
785
|
+
}
|
|
786
|
+
allocateSetter(e, t, n = !1) {
|
|
787
|
+
if (_(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
|
|
788
|
+
let r = this.#e.registerBase(this.#t, e, t, { notify: !n });
|
|
789
|
+
this.#r.set(e, r);
|
|
790
|
+
let i = (e) => {
|
|
791
|
+
r.set(e), this.#e.flushNow();
|
|
754
792
|
};
|
|
755
|
-
return this.#n.set(e,
|
|
793
|
+
return this.#n.set(e, i), i;
|
|
756
794
|
}
|
|
757
|
-
setValue(e,
|
|
758
|
-
|
|
759
|
-
let
|
|
760
|
-
if (!
|
|
761
|
-
|
|
795
|
+
setValue(e, t, n) {
|
|
796
|
+
_(e);
|
|
797
|
+
let r = this.#n.get(e);
|
|
798
|
+
if (!r) throw Error("Writable parameter not found in this scope: " + e);
|
|
799
|
+
r(t, n);
|
|
762
800
|
}
|
|
763
801
|
getValue(e) {
|
|
764
802
|
return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
|
|
765
803
|
}
|
|
766
804
|
getParamRef(e) {
|
|
767
|
-
|
|
768
|
-
let
|
|
769
|
-
if (
|
|
805
|
+
_(e);
|
|
806
|
+
let t = this.findRuntimeForParam(e);
|
|
807
|
+
if (t) return t.#r.has(e) || t.#e.resolve(t.#t, e), t.#r.get(e);
|
|
770
808
|
}
|
|
771
809
|
getTargetValue(e) {
|
|
772
|
-
return
|
|
810
|
+
return _(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
|
|
773
811
|
}
|
|
774
812
|
subscribe(e, t) {
|
|
775
813
|
let n = this.getParamRef(e);
|
|
@@ -786,16 +824,16 @@ var C = class {
|
|
|
786
824
|
return this.#i;
|
|
787
825
|
}
|
|
788
826
|
hasLocalParam(e) {
|
|
789
|
-
|
|
790
|
-
let
|
|
791
|
-
return this.#r.has(e) || this.#a.has(e) ||
|
|
827
|
+
_(e);
|
|
828
|
+
let t = this.#i.get(e);
|
|
829
|
+
return this.#r.has(e) || this.#a.has(e) || t !== void 0 && "expr" in t;
|
|
792
830
|
}
|
|
793
831
|
isPendingParam(e) {
|
|
794
832
|
let t = this.findRuntimeForParam(e);
|
|
795
833
|
return t !== void 0 && !t.#r.has(e);
|
|
796
834
|
}
|
|
797
835
|
hasConfiguredParamInScopeChain(e) {
|
|
798
|
-
return
|
|
836
|
+
return _(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
|
|
799
837
|
}
|
|
800
838
|
findRuntimeForParam(e) {
|
|
801
839
|
return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
|
|
@@ -836,12 +874,15 @@ var C = class {
|
|
|
836
874
|
}
|
|
837
875
|
return {
|
|
838
876
|
scopeId: this.#t,
|
|
839
|
-
disposed: this.#
|
|
877
|
+
disposed: this.#g,
|
|
840
878
|
params: e
|
|
841
879
|
};
|
|
842
880
|
}
|
|
881
|
+
getSpecLocation(e, t) {
|
|
882
|
+
return f(e, this.#h, t);
|
|
883
|
+
}
|
|
843
884
|
createExpression(e) {
|
|
844
|
-
return this.#e.createExpression(this.#t, e, this.#
|
|
885
|
+
return this.#e.createExpression(this.#t, typeof e == "string" ? e : e.expr, this.#v(typeof e == "string" ? void 0 : e));
|
|
845
886
|
}
|
|
846
887
|
watchExpression(e, t, n = {}) {
|
|
847
888
|
let r = this.createExpression(e), i = r.subscribe(t);
|
|
@@ -868,7 +909,7 @@ var C = class {
|
|
|
868
909
|
cancelUpdate(e) {
|
|
869
910
|
this.#e.cancelUpdate(e);
|
|
870
911
|
}
|
|
871
|
-
#
|
|
912
|
+
#b(e, t) {
|
|
872
913
|
let n = this.#e.registerBase(this.#t, e, t);
|
|
873
914
|
this.#r.set(e, n);
|
|
874
915
|
let r = (e) => {
|
|
@@ -876,19 +917,19 @@ var C = class {
|
|
|
876
917
|
};
|
|
877
918
|
return this.#n.set(e, r), r;
|
|
878
919
|
}
|
|
879
|
-
#
|
|
880
|
-
let r = this.#
|
|
881
|
-
this.#
|
|
920
|
+
#x(e, t, n) {
|
|
921
|
+
let r = this.#w(e, t, n), i = (t, n) => {
|
|
922
|
+
this.#T(e, r, t, n);
|
|
882
923
|
};
|
|
883
924
|
return this.#n.set(e, i), i;
|
|
884
925
|
}
|
|
885
|
-
#
|
|
886
|
-
let r = this.createExpression(t), i = this.#
|
|
887
|
-
this.#
|
|
926
|
+
#S(e, t, n) {
|
|
927
|
+
let r = this.createExpression(t), i = this.#w(e, r(null), n), a = r.subscribe(() => {
|
|
928
|
+
this.#T(e, i, r(null), { animate: !this.#m });
|
|
888
929
|
});
|
|
889
930
|
this.#e.addScopeDisposer(this.#t, a);
|
|
890
931
|
}
|
|
891
|
-
#
|
|
932
|
+
#C(e, t, n) {
|
|
892
933
|
let r = this.createExpression(t), i = r(null), a = this.#e.registerBase(this.#t, e, i);
|
|
893
934
|
this.#r.set(e, a);
|
|
894
935
|
let o = {
|
|
@@ -903,12 +944,12 @@ var C = class {
|
|
|
903
944
|
clearTimeout(o.timeout), c(), this.#u.delete(e);
|
|
904
945
|
});
|
|
905
946
|
}
|
|
906
|
-
#
|
|
907
|
-
let r =
|
|
947
|
+
#w(e, t, n) {
|
|
948
|
+
let r = E(e, t), i = this.#e.registerBase(this.#t, e, r);
|
|
908
949
|
this.#r.set(e, i);
|
|
909
950
|
let a = this.#p;
|
|
910
951
|
if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
|
|
911
|
-
let o =
|
|
952
|
+
let o = w(a, ({ value: e }) => {
|
|
912
953
|
i.set(e), this.#e.flushNow();
|
|
913
954
|
}, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
|
|
914
955
|
target: i.get(),
|
|
@@ -919,8 +960,8 @@ var C = class {
|
|
|
919
960
|
};
|
|
920
961
|
return this.#l.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
|
|
921
962
|
}
|
|
922
|
-
#
|
|
923
|
-
let i =
|
|
963
|
+
#T(e, t, n, r = {}) {
|
|
964
|
+
let i = E(e, n);
|
|
924
965
|
t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
|
|
925
966
|
}
|
|
926
967
|
evaluateAndGet(e) {
|
|
@@ -939,15 +980,10 @@ var C = class {
|
|
|
939
980
|
this.#m = !1;
|
|
940
981
|
}
|
|
941
982
|
dispose() {
|
|
942
|
-
this.#
|
|
943
|
-
}
|
|
944
|
-
hasPointSelections() {
|
|
945
|
-
for (let e of
|
|
946
|
-
let t = e.select;
|
|
947
|
-
if (p(t)) {
|
|
948
|
-
if (t == "point") return !0;
|
|
949
|
-
} else if (t.type == "point") return !0;
|
|
950
|
-
}
|
|
983
|
+
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());
|
|
984
|
+
}
|
|
985
|
+
hasPointSelections({ inherited: e = !1 } = {}) {
|
|
986
|
+
for (let t = this; t; t = e ? t.#d() : void 0) for (let n of t.#i.values()) if (l(n) && (n.select === "point" || typeof n.select == "object" && n.select.type === "point") && (!e || this.findConfiguredParam(n.name).config === n)) return !0;
|
|
951
987
|
return !1;
|
|
952
988
|
}
|
|
953
989
|
};
|
|
@@ -972,59 +1008,63 @@ function Te(e) {
|
|
|
972
1008
|
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.`);
|
|
973
1009
|
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.`);
|
|
974
1010
|
}
|
|
975
|
-
function
|
|
1011
|
+
function E(e, t) {
|
|
976
1012
|
if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
|
|
977
1013
|
return t;
|
|
978
1014
|
}
|
|
979
1015
|
//#endregion
|
|
980
1016
|
//#region ../core/src/view/layout/flexLayout.js
|
|
981
|
-
function Ee(e, t,
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1017
|
+
function Ee(e, t, n = {}) {
|
|
1018
|
+
let { sizes: r } = Ie(e, t, n.spacing || 0);
|
|
1019
|
+
return De(e, r, t, n);
|
|
1020
|
+
}
|
|
1021
|
+
function De(e, t, n, { spacing: r, devicePixelRatio: i, offset: a, reverse: o } = {}) {
|
|
1022
|
+
r ||= 0, a ||= 0;
|
|
1023
|
+
let s = 0, c = 0;
|
|
1024
|
+
for (let n = 0; n < e.length; n++) s += t[n], k(e[n]) || c++;
|
|
1025
|
+
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) => {
|
|
986
1026
|
let t = d;
|
|
987
1027
|
if (!t) return;
|
|
988
|
-
let
|
|
989
|
-
m -=
|
|
1028
|
+
let n = (e ? r : 0) * (o ? -1 : 1);
|
|
1029
|
+
m -= n;
|
|
990
1030
|
for (let e = 0; e < t; e++) f.push({
|
|
991
|
-
location: m + (e + 1) / (t + 1) *
|
|
1031
|
+
location: m + (e + 1) / (t + 1) * n,
|
|
992
1032
|
size: 0
|
|
993
1033
|
});
|
|
994
|
-
m +=
|
|
995
|
-
}, m =
|
|
996
|
-
if (e.length == 1 &&
|
|
1034
|
+
m += n, d = 0;
|
|
1035
|
+
}, m = o ? Math.max(n, l) : 0 + a;
|
|
1036
|
+
if (e.length == 1 && k(e[0])) return [{
|
|
997
1037
|
location: m,
|
|
998
1038
|
size: 0
|
|
999
1039
|
}];
|
|
1000
|
-
for (let
|
|
1001
|
-
let
|
|
1002
|
-
if (
|
|
1040
|
+
for (let n = 0; n < e.length; n++) {
|
|
1041
|
+
let i = e[n];
|
|
1042
|
+
if (k(i)) d++;
|
|
1003
1043
|
else {
|
|
1004
1044
|
p(f.length > 0);
|
|
1005
|
-
let e =
|
|
1006
|
-
|
|
1045
|
+
let e = t[n];
|
|
1046
|
+
o && (m -= e), f.push({
|
|
1007
1047
|
location: u(m),
|
|
1008
1048
|
size: u(e)
|
|
1009
|
-
}),
|
|
1049
|
+
}), o ? m -= r : m += e + r;
|
|
1010
1050
|
}
|
|
1011
1051
|
}
|
|
1012
|
-
return m +=
|
|
1052
|
+
return m += o ? r : -r, p(!1), f;
|
|
1013
1053
|
}
|
|
1014
|
-
function
|
|
1054
|
+
function Oe(e, { spacing: t } = { spacing: 0 }) {
|
|
1015
1055
|
let n = 0;
|
|
1016
|
-
for (let r of e) n += N(r) + (
|
|
1056
|
+
for (let r of e) n += N(r) + (k(r) ? 0 : t);
|
|
1017
1057
|
return Math.max(0, n - t);
|
|
1018
1058
|
}
|
|
1019
|
-
function
|
|
1059
|
+
function ke(e, t, { spacing: n = 0 } = {}) {
|
|
1020
1060
|
let r = [], i = [], a = 0, o = 0;
|
|
1021
1061
|
for (let [s, c] of e.entries()) {
|
|
1022
|
-
let e = N(c), l = !
|
|
1062
|
+
let e = N(c), l = !k(c), u = o && l ? n : 0;
|
|
1023
1063
|
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;
|
|
1024
1064
|
}
|
|
1025
1065
|
return i.length && r.push(i), r;
|
|
1026
1066
|
}
|
|
1027
|
-
function
|
|
1067
|
+
function Ae(e) {
|
|
1028
1068
|
let t = 0, n = 0, r = 0, i, a = !0;
|
|
1029
1069
|
for (let o of e) {
|
|
1030
1070
|
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, N(o));
|
|
@@ -1038,21 +1078,21 @@ function ke(e) {
|
|
|
1038
1078
|
maxPx: a ? i : void 0
|
|
1039
1079
|
});
|
|
1040
1080
|
}
|
|
1041
|
-
function
|
|
1042
|
-
let t = {
|
|
1043
|
-
px:
|
|
1044
|
-
grow: 0,
|
|
1045
|
-
minPx:
|
|
1046
|
-
maxPx:
|
|
1047
|
-
},
|
|
1048
|
-
for (let
|
|
1049
|
-
|
|
1050
|
-
let e = P(
|
|
1051
|
-
e === void 0 ?
|
|
1052
|
-
}
|
|
1053
|
-
return
|
|
1054
|
-
}
|
|
1055
|
-
var
|
|
1081
|
+
function je(e, t = 0, n = 0) {
|
|
1082
|
+
let r = Math.max(0, e.length - 1) * t, i = {
|
|
1083
|
+
px: r,
|
|
1084
|
+
grow: e.length ? 0 : n,
|
|
1085
|
+
minPx: r,
|
|
1086
|
+
maxPx: r
|
|
1087
|
+
}, a = e.length > 0;
|
|
1088
|
+
for (let t of e) {
|
|
1089
|
+
i.px += A(t.px), i.grow += A(t.grow), i.minPx += N(t);
|
|
1090
|
+
let e = P(t);
|
|
1091
|
+
e === void 0 ? a = !1 : i.maxPx += e;
|
|
1092
|
+
}
|
|
1093
|
+
return a || delete i.maxPx, L(i);
|
|
1094
|
+
}
|
|
1095
|
+
var D = class e {
|
|
1056
1096
|
constructor(e, t) {
|
|
1057
1097
|
this.width = e, this.height = t;
|
|
1058
1098
|
}
|
|
@@ -1068,78 +1108,87 @@ var T = class e {
|
|
|
1068
1108
|
isGrowing() {
|
|
1069
1109
|
return !!(this.width.grow || this.height.grow);
|
|
1070
1110
|
}
|
|
1071
|
-
},
|
|
1111
|
+
}, Me = Object.freeze({
|
|
1072
1112
|
px: 0,
|
|
1073
1113
|
grow: 0
|
|
1074
|
-
}),
|
|
1075
|
-
function
|
|
1114
|
+
}), O = new D(Me, Me);
|
|
1115
|
+
function k(e) {
|
|
1076
1116
|
return !e.px && !e.grow && !e.minPx;
|
|
1077
1117
|
}
|
|
1078
|
-
function
|
|
1118
|
+
function Ne(e, t) {
|
|
1079
1119
|
return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
|
|
1080
1120
|
}
|
|
1081
|
-
function
|
|
1121
|
+
function A(e) {
|
|
1082
1122
|
return e || 0;
|
|
1083
1123
|
}
|
|
1084
|
-
function
|
|
1085
|
-
return
|
|
1124
|
+
function Pe(t) {
|
|
1125
|
+
return t && (e(t.px) || e(t.grow) || e(t.minPx) || e(t.maxPx));
|
|
1086
1126
|
}
|
|
1087
|
-
function
|
|
1088
|
-
if (q(
|
|
1089
|
-
if (
|
|
1090
|
-
if (
|
|
1091
|
-
px:
|
|
1127
|
+
function Fe(t) {
|
|
1128
|
+
if (q(t)) throw Error("parseSizeDef does not accept step-based sizes.");
|
|
1129
|
+
if (Pe(t)) return j(t), L(t);
|
|
1130
|
+
if (e(t)) return {
|
|
1131
|
+
px: t,
|
|
1092
1132
|
grow: 0
|
|
1093
1133
|
};
|
|
1094
|
-
if (
|
|
1134
|
+
if (t === "container" || !t) return {
|
|
1095
1135
|
px: 0,
|
|
1096
1136
|
grow: 1
|
|
1097
1137
|
};
|
|
1098
|
-
throw Error(`Invalid sizeDef: ${
|
|
1138
|
+
throw Error(`Invalid sizeDef: ${t}`);
|
|
1099
1139
|
}
|
|
1100
|
-
function
|
|
1140
|
+
function Ie(e, t, n = 0) {
|
|
1101
1141
|
let r = !1;
|
|
1102
1142
|
for (let t of e) j(t), r ||= F(t);
|
|
1103
|
-
if (!r) return
|
|
1143
|
+
if (!r) return Le(e, t, n);
|
|
1104
1144
|
let i = Array(e.length).fill(0), a = [];
|
|
1105
|
-
for (let t = 0; t < e.length; t++)
|
|
1145
|
+
for (let t = 0; t < e.length; t++) k(e[t]) || a.push(t);
|
|
1106
1146
|
let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
|
|
1107
1147
|
for (let t of a) {
|
|
1108
1148
|
let n = e[t];
|
|
1109
|
-
|
|
1149
|
+
A(n.grow) || (i[t] = M(A(n.px), n), c.add(t));
|
|
1110
1150
|
}
|
|
1151
|
+
let l = 0;
|
|
1111
1152
|
for (;;) {
|
|
1112
1153
|
let t = 0, n = 0, r = 0;
|
|
1113
|
-
for (let o of a) c.has(o) ? r += i[o] : (t +=
|
|
1154
|
+
for (let o of a) c.has(o) ? r += i[o] : (t += A(e[o].px), n += A(e[o].grow));
|
|
1114
1155
|
if (!n) {
|
|
1115
|
-
for (let t of a) c.has(t) || (i[t] = M(
|
|
1156
|
+
for (let t of a) c.has(t) || (i[t] = M(A(e[t].px), e[t]), c.add(t));
|
|
1116
1157
|
break;
|
|
1117
1158
|
}
|
|
1118
|
-
let o = Math.max(0, s - r - t)
|
|
1159
|
+
let o = Math.max(0, s - r - t);
|
|
1160
|
+
l = o / n;
|
|
1161
|
+
let u = 0, d = [], f = [];
|
|
1119
1162
|
for (let t of a) {
|
|
1120
1163
|
if (c.has(t)) continue;
|
|
1121
|
-
let r = e[t], a =
|
|
1164
|
+
let r = e[t], a = A(r.px) + A(r.grow) / n * o, s = M(a, r);
|
|
1122
1165
|
i[t] = s;
|
|
1123
|
-
let
|
|
1124
|
-
|
|
1166
|
+
let l = s - a;
|
|
1167
|
+
u += l, l > 0 ? d.push(t) : l < 0 && f.push(t);
|
|
1125
1168
|
}
|
|
1126
|
-
if (!
|
|
1127
|
-
if (
|
|
1128
|
-
else if (
|
|
1169
|
+
if (!d.length && !f.length) break;
|
|
1170
|
+
if (u > 0) for (let e of d) c.add(e);
|
|
1171
|
+
else if (u < 0) for (let e of f) c.add(e);
|
|
1129
1172
|
else for (let e of a) c.add(e);
|
|
1130
1173
|
}
|
|
1131
|
-
return
|
|
1174
|
+
return {
|
|
1175
|
+
sizes: i,
|
|
1176
|
+
growth: l
|
|
1177
|
+
};
|
|
1132
1178
|
}
|
|
1133
|
-
function
|
|
1179
|
+
function Le(e, t, n) {
|
|
1134
1180
|
let r = 0, i = 0;
|
|
1135
|
-
for (let t of e) r +=
|
|
1181
|
+
for (let t of e) r += A(t.px) + (k(t) ? 0 : n), i += A(t.grow);
|
|
1136
1182
|
r -= n;
|
|
1137
1183
|
let a = Math.max(0, t - r), o = Array(e.length);
|
|
1138
1184
|
for (let t = 0; t < e.length; t++) {
|
|
1139
1185
|
let n = e[t];
|
|
1140
|
-
o[t] =
|
|
1186
|
+
o[t] = k(n) ? 0 : A(n.px) + (i ? A(n.grow) / i * a : 0);
|
|
1141
1187
|
}
|
|
1142
|
-
return
|
|
1188
|
+
return {
|
|
1189
|
+
sizes: o,
|
|
1190
|
+
growth: i ? a / i : 0
|
|
1191
|
+
};
|
|
1143
1192
|
}
|
|
1144
1193
|
function j(e) {
|
|
1145
1194
|
if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
|
|
@@ -1148,10 +1197,10 @@ function M(e, t) {
|
|
|
1148
1197
|
return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
|
|
1149
1198
|
}
|
|
1150
1199
|
function N(e) {
|
|
1151
|
-
return M(
|
|
1200
|
+
return M(A(e.px), e);
|
|
1152
1201
|
}
|
|
1153
1202
|
function P(e) {
|
|
1154
|
-
return e.maxPx ?? (
|
|
1203
|
+
return e.maxPx ?? (A(e.grow) ? void 0 : N(e));
|
|
1155
1204
|
}
|
|
1156
1205
|
function F(e) {
|
|
1157
1206
|
return e.minPx !== void 0 || e.maxPx !== void 0;
|
|
@@ -1166,7 +1215,7 @@ function I(e, t) {
|
|
|
1166
1215
|
}
|
|
1167
1216
|
function L(e) {
|
|
1168
1217
|
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = F(e);
|
|
1169
|
-
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 >
|
|
1218
|
+
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 > A(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (A(t.grow) || e.maxPx < A(e.px)) && (t.maxPx = e.maxPx), t;
|
|
1170
1219
|
}
|
|
1171
1220
|
//#endregion
|
|
1172
1221
|
//#region ../core/src/view/layout/padding.js
|
|
@@ -1217,23 +1266,23 @@ var R = class e {
|
|
|
1217
1266
|
return new e(t, t, t, t);
|
|
1218
1267
|
}
|
|
1219
1268
|
};
|
|
1220
|
-
function
|
|
1221
|
-
return t ? new R(t.top === !1 ?
|
|
1269
|
+
function Re(e, t, n = R.zero()) {
|
|
1270
|
+
return t ? new R(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;
|
|
1222
1271
|
}
|
|
1223
1272
|
var z = R.createUniformPadding(0);
|
|
1224
1273
|
Object.freeze(z);
|
|
1225
1274
|
//#endregion
|
|
1226
1275
|
//#region ../core/src/utils/url.js
|
|
1227
|
-
var
|
|
1276
|
+
var ze = /^([A-Za-z]+:)?\/\//;
|
|
1228
1277
|
function B(e, t) {
|
|
1229
|
-
if (t &&
|
|
1278
|
+
if (t && ze.test(t)) return t;
|
|
1230
1279
|
let n = typeof e == "function" ? e() : e;
|
|
1231
1280
|
if (!n) return t;
|
|
1232
1281
|
if (!t) return n;
|
|
1233
1282
|
if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
|
|
1234
|
-
return
|
|
1283
|
+
return Ve(n) + t;
|
|
1235
1284
|
}
|
|
1236
|
-
function
|
|
1285
|
+
function Be(e, t, n = He()) {
|
|
1237
1286
|
let r = typeof e == "function" ? e() : e;
|
|
1238
1287
|
if (!t) return r;
|
|
1239
1288
|
try {
|
|
@@ -1245,20 +1294,20 @@ function Le(e, t, n = ze()) {
|
|
|
1245
1294
|
} catch {}
|
|
1246
1295
|
return B(r, t);
|
|
1247
1296
|
}
|
|
1248
|
-
function
|
|
1297
|
+
function Ve(e) {
|
|
1249
1298
|
let t = e.replace(/[^/]*$/, "");
|
|
1250
1299
|
return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
|
|
1251
1300
|
}
|
|
1252
|
-
function
|
|
1301
|
+
function He() {
|
|
1253
1302
|
if (typeof document < "u" && document.baseURI) return document.baseURI;
|
|
1254
1303
|
if (typeof window < "u" && window.location?.href) return window.location.href;
|
|
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 + "/";
|
|
@@ -1266,42 +1315,42 @@ function Ve(e) {
|
|
|
1266
1315
|
//#endregion
|
|
1267
1316
|
//#region ../core/src/config/mergeConfig.js
|
|
1268
1317
|
function V(e) {
|
|
1269
|
-
return
|
|
1318
|
+
return te(e) && !Array.isArray(e) && !("expr" in e && typeof e.expr == "string");
|
|
1270
1319
|
}
|
|
1271
|
-
function
|
|
1320
|
+
function Ge(e) {
|
|
1272
1321
|
let t = {};
|
|
1273
1322
|
for (let [n, r] of Object.entries(e)) t[n] = H(r);
|
|
1274
1323
|
return t;
|
|
1275
1324
|
}
|
|
1276
1325
|
function H(e) {
|
|
1277
|
-
return Array.isArray(e) ? e.map(H) : V(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
|
-
V(r) && V(t) ?
|
|
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
1343
|
var U = /* @__PURE__ */ new WeakMap();
|
|
1295
|
-
function
|
|
1344
|
+
function Je(e, t) {
|
|
1296
1345
|
U.set(e, t);
|
|
1297
1346
|
}
|
|
1298
|
-
function
|
|
1347
|
+
function Ye(e) {
|
|
1299
1348
|
return U.get(e);
|
|
1300
1349
|
}
|
|
1301
|
-
function
|
|
1350
|
+
function Xe(e) {
|
|
1302
1351
|
return U.has(e);
|
|
1303
1352
|
}
|
|
1304
|
-
function
|
|
1353
|
+
function Ze(e) {
|
|
1305
1354
|
let t = e;
|
|
1306
1355
|
for (; t;) {
|
|
1307
1356
|
let n = U.get(t);
|
|
@@ -1312,16 +1361,16 @@ function Je(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 Qe = 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 Qe = 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 Qe = class {
|
|
|
1387
1436
|
for (let e of this.#t.values()) e.dispose();
|
|
1388
1437
|
this.#t.clear();
|
|
1389
1438
|
}
|
|
1390
|
-
}, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e,
|
|
1439
|
+
}, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, rt = class {
|
|
1391
1440
|
spec;
|
|
1392
1441
|
namedDataScope;
|
|
1393
1442
|
#e;
|
|
@@ -1406,28 +1455,33 @@ var Qe = class {
|
|
|
1406
1455
|
#f = [];
|
|
1407
1456
|
#p = "none";
|
|
1408
1457
|
#m = /* @__PURE__ */ new Map();
|
|
1409
|
-
facetCoords = new
|
|
1410
|
-
|
|
1458
|
+
facetCoords = new p([], JSON.stringify);
|
|
1459
|
+
layoutCoords;
|
|
1460
|
+
constructor(e, n, r, i, a, o = {}) {
|
|
1411
1461
|
if (!e) throw Error("View spec must be defined!");
|
|
1412
|
-
if (this.context =
|
|
1413
|
-
let s =
|
|
1462
|
+
if (this.context = n, this.layoutParent = r, this.dataParent = i, o.chrome && Je(this, "excludeSubtree"), this.#t = a, this.spec = e, this.namedDataScope = new nt(this), i && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
|
|
1463
|
+
let s = i ? i.getConfigScopes() : [n.getBaseConfig()], c = e.config;
|
|
1414
1464
|
this.#e = [...s, c].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
|
...o
|
|
1422
1472
|
}, this.flowHandle = void 0, this.needsAxes = {
|
|
1423
1473
|
x: !1,
|
|
1424
1474
|
y: !1
|
|
1425
|
-
}, this.paramRuntime = new
|
|
1426
|
-
|
|
1475
|
+
}, this.paramRuntime = new T(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), n.animator, {
|
|
1476
|
+
settleTemporalUpdatesImmediately: !0,
|
|
1477
|
+
onError: n.reportError,
|
|
1478
|
+
getSpecOrigin: n.getSpecOrigin
|
|
1479
|
+
}), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => se("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
|
|
1480
|
+
let l = [...e.params ?? [], ...et(e) ?? []];
|
|
1427
1481
|
for (let e of l) {
|
|
1428
1482
|
if ("expr" in e) {
|
|
1429
|
-
let { usesScaleHelper:
|
|
1430
|
-
if (
|
|
1483
|
+
let { usesScaleHelper: n, globals: r } = t(e.expr, this.paramRuntime.getSpecLocation(e, ["expr"])), i = r.some((e) => this.paramRuntime.isPendingParam(e));
|
|
1484
|
+
if (n || i) {
|
|
1431
1485
|
this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
|
|
1432
1486
|
continue;
|
|
1433
1487
|
}
|
|
@@ -1452,18 +1506,18 @@ var Qe = 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 h(e) ? this.paramRuntime.evaluateAndGet(e) : e;
|
|
1463
1517
|
}
|
|
1464
1518
|
watchCursor(e, t) {
|
|
1465
1519
|
let n = this.getCursorSpec();
|
|
1466
|
-
|
|
1520
|
+
h(n) && this.paramRuntime.watchExpression(n, e, {
|
|
1467
1521
|
scopeOwned: !1,
|
|
1468
1522
|
registerDisposer: t
|
|
1469
1523
|
});
|
|
@@ -1480,50 +1534,78 @@ var Qe = class {
|
|
|
1480
1534
|
getOverhang() {
|
|
1481
1535
|
return R.zero();
|
|
1482
1536
|
}
|
|
1537
|
+
getStructuralOverhang() {
|
|
1538
|
+
return R.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
|
+
}];
|
|
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 D(this.#g("width"), this.#g("height")) : O);
|
|
1488
1570
|
}
|
|
1489
1571
|
getViewportSize() {
|
|
1490
1572
|
if (!this.isScrollable()) return this.getSize();
|
|
1491
|
-
if (!this.isConfiguredVisible()) return
|
|
1573
|
+
if (!this.isConfiguredVisible()) return O;
|
|
1492
1574
|
let e = this.getSize();
|
|
1493
|
-
return new
|
|
1575
|
+
return new D(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
|
|
1494
1576
|
}
|
|
1495
1577
|
#g(e) {
|
|
1496
|
-
let { value: t, implicit:
|
|
1497
|
-
if (
|
|
1498
|
-
if (
|
|
1499
|
-
let t = this.#x(e,
|
|
1500
|
-
if (
|
|
1501
|
-
let
|
|
1502
|
-
if (v(
|
|
1503
|
-
else if (["locus", "index"].includes(
|
|
1504
|
-
let e =
|
|
1505
|
-
|
|
1506
|
-
} else throw new b(`Cannot use step-based size with "${
|
|
1507
|
-
let
|
|
1508
|
-
|
|
1509
|
-
let
|
|
1510
|
-
if (
|
|
1511
|
-
if (!
|
|
1512
|
-
let t =
|
|
1513
|
-
|
|
1578
|
+
let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = q(r), a = e == "viewportWidth" || e == "viewportHeight";
|
|
1579
|
+
if (i) {
|
|
1580
|
+
if (a) throw new b(`Cannot use step-based size with "${e}"!`, this);
|
|
1581
|
+
let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
|
|
1582
|
+
if (i) {
|
|
1583
|
+
let n;
|
|
1584
|
+
if (v(i.type)) n = i.domain().length;
|
|
1585
|
+
else if (["locus", "index"].includes(i.type)) {
|
|
1586
|
+
let e = i.domain();
|
|
1587
|
+
n = u(e) - e[0];
|
|
1588
|
+
} else throw new b(`Cannot use step-based size with "${i.type}" scale!`, this);
|
|
1589
|
+
let a = i;
|
|
1590
|
+
n = ie(n, a.paddingInner(), a.paddingOuter());
|
|
1591
|
+
let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && v(s.type) ? "offset" : "position"), l = t;
|
|
1592
|
+
if (c == "offset") {
|
|
1593
|
+
if (!s || !v(s.type)) throw new b(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
|
|
1594
|
+
let t = s, n = ie(s.domain().length, t.paddingInner(), t.paddingOuter());
|
|
1595
|
+
l *= n / (1 - a.paddingInner());
|
|
1514
1596
|
}
|
|
1515
1597
|
return {
|
|
1516
|
-
px:
|
|
1598
|
+
px: n * l,
|
|
1517
1599
|
grow: 0
|
|
1518
1600
|
};
|
|
1519
1601
|
}
|
|
1520
|
-
if (
|
|
1602
|
+
if (n) return {
|
|
1521
1603
|
px: t,
|
|
1522
1604
|
grow: 0
|
|
1523
1605
|
};
|
|
1524
1606
|
throw new b(`Cannot use step-based size with "${e}"!`, this);
|
|
1525
1607
|
}
|
|
1526
|
-
return (
|
|
1608
|
+
return (r && Fe(r)) ?? (a ? void 0 : {
|
|
1527
1609
|
px: 0,
|
|
1528
1610
|
grow: 1
|
|
1529
1611
|
});
|
|
@@ -1539,16 +1621,16 @@ var Qe = 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
1628
|
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 });
|
|
1547
1629
|
}
|
|
1548
1630
|
resolveSizeValue(e, t) {
|
|
1549
|
-
if (!
|
|
1631
|
+
if (!h(t)) return t;
|
|
1550
1632
|
let n = this.#C(e)();
|
|
1551
|
-
if (
|
|
1633
|
+
if (ct(n) || n === "container") return n;
|
|
1552
1634
|
throw new b(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
|
|
1553
1635
|
}
|
|
1554
1636
|
registerSizeInvalidation() {
|
|
@@ -1566,7 +1648,7 @@ var Qe = class {
|
|
|
1566
1648
|
let t = this.getSize()[e];
|
|
1567
1649
|
this.invalidateSizeCache();
|
|
1568
1650
|
let n = this.getSize()[e];
|
|
1569
|
-
|
|
1651
|
+
Ne(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);
|
|
@@ -1575,11 +1657,11 @@ var Qe = class {
|
|
|
1575
1657
|
}
|
|
1576
1658
|
#b(e) {
|
|
1577
1659
|
let { value: t } = this.#_(e);
|
|
1578
|
-
|
|
1660
|
+
h(t) ? this.#S(e, t) : q(t) && h(t.step) && this.#S(e + ".step", t.step);
|
|
1579
1661
|
}
|
|
1580
1662
|
#x(e, t) {
|
|
1581
|
-
let n =
|
|
1582
|
-
if (
|
|
1663
|
+
let n = h(t.step) ? this.#C(e + ".step")() : t.step;
|
|
1664
|
+
if (ct(n)) return n;
|
|
1583
1665
|
throw new b(`"${e}.step" ExprRef must resolve to a finite number!`, this);
|
|
1584
1666
|
}
|
|
1585
1667
|
#S(e, t) {
|
|
@@ -1656,7 +1738,7 @@ var Qe = 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 Qe = 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 Qe = class {
|
|
|
1711
1795
|
}
|
|
1712
1796
|
}
|
|
1713
1797
|
configureViewOpacity() {
|
|
1714
|
-
(!this.opacityFunction || this.opacityFunction === K) && (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,7 +1807,9 @@ var Qe = class {
|
|
|
1723
1807
|
return this.#s;
|
|
1724
1808
|
}
|
|
1725
1809
|
arrange(e, t, n = {}) {
|
|
1726
|
-
if (
|
|
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, ee(t, m(n))), this.#a || this.#o) {
|
|
1727
1813
|
let e = this.getOverhang(), n = this.layoutParent ? R.zero() : this.getPadding();
|
|
1728
1814
|
this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
|
|
1729
1815
|
}
|
|
@@ -1745,7 +1831,7 @@ var Qe = class {
|
|
|
1745
1831
|
}
|
|
1746
1832
|
getFacetFields(e) {
|
|
1747
1833
|
let t = this.getEncoding().sample;
|
|
1748
|
-
return
|
|
1834
|
+
return ne(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 Qe = 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 = g(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 === g(e)) ?? !1;
|
|
1766
1860
|
}
|
|
1767
1861
|
getLegendResolution(e) {
|
|
1768
|
-
let t =
|
|
1862
|
+
let t = g(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 Qe = class {
|
|
|
1778
1872
|
return "independent";
|
|
1779
1873
|
}
|
|
1780
1874
|
getBaseUrl() {
|
|
1781
|
-
return B(() => this.dataParent?.getBaseUrl(),
|
|
1875
|
+
return B(() => 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 i(e) ? e : h(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,16 +1900,16 @@ var Qe = 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
|
|
1813
|
-
let
|
|
1814
|
-
if (
|
|
1815
|
-
if (
|
|
1816
|
-
if (
|
|
1817
|
-
let
|
|
1818
|
-
let n =
|
|
1906
|
+
function at(t) {
|
|
1907
|
+
let n = "opacity" in t.spec ? t.spec.opacity : void 0;
|
|
1908
|
+
if (n !== void 0) {
|
|
1909
|
+
if (e(n)) return (e) => e * n;
|
|
1910
|
+
if (it(n)) {
|
|
1911
|
+
let e = (e) => {
|
|
1912
|
+
let n = t.getScaleResolution(e), r = n?.getScale();
|
|
1819
1913
|
if ([
|
|
1820
1914
|
"linear",
|
|
1821
1915
|
"index",
|
|
@@ -1824,46 +1918,46 @@ function nt(e) {
|
|
|
1824
1918
|
scale: r,
|
|
1825
1919
|
scaleResolution: n
|
|
1826
1920
|
};
|
|
1827
|
-
}, r =
|
|
1828
|
-
if (!
|
|
1829
|
-
let i = () => 1, a = [],
|
|
1830
|
-
let
|
|
1921
|
+
}, r = st(n.values, "opacity.values", t);
|
|
1922
|
+
if (!o(n.unitsPerPixel)) throw new b("\"opacity.unitsPerPixel\" must be an array.", t);
|
|
1923
|
+
let i = () => 1, a = [], s = () => {
|
|
1924
|
+
let e = ot(st(a.map((e) => e()), "opacity.unitsPerPixel", t), r, t), n = re().domain(e.unitsPerPixel).range(e.values).clamp(!0);
|
|
1831
1925
|
i = (e) => n(e);
|
|
1832
1926
|
};
|
|
1833
|
-
a =
|
|
1834
|
-
if (
|
|
1835
|
-
let n =
|
|
1836
|
-
|
|
1927
|
+
a = n.unitsPerPixel.map((e) => {
|
|
1928
|
+
if (h(e)) {
|
|
1929
|
+
let n = t.paramRuntime.watchExpression(e, () => {
|
|
1930
|
+
s(), t.context.animator.requestRender();
|
|
1837
1931
|
});
|
|
1838
1932
|
return () => n(null);
|
|
1839
1933
|
}
|
|
1840
|
-
return () =>
|
|
1841
|
-
}),
|
|
1842
|
-
let
|
|
1934
|
+
return () => e;
|
|
1935
|
+
}), s();
|
|
1936
|
+
let c = (e) => {
|
|
1843
1937
|
let t = e.scaleResolution.getAxisLength() || 1e3;
|
|
1844
|
-
return
|
|
1845
|
-
},
|
|
1846
|
-
if (
|
|
1847
|
-
let
|
|
1848
|
-
if (
|
|
1849
|
-
else if (
|
|
1850
|
-
else if (r)
|
|
1851
|
-
else throw new b("Cannot find a resolved quantitative x or y scale for dynamic opacity!",
|
|
1938
|
+
return d(e.scale.domain()) / t;
|
|
1939
|
+
}, l;
|
|
1940
|
+
if (n.channel === "auto") {
|
|
1941
|
+
let n = e("x"), r = e("y");
|
|
1942
|
+
if (n && r) l = () => (c(n) + c(r)) / 2;
|
|
1943
|
+
else if (n) l = () => c(n);
|
|
1944
|
+
else if (r) l = () => c(r);
|
|
1945
|
+
else throw new b("Cannot find a resolved quantitative x or y scale for dynamic opacity!", t);
|
|
1852
1946
|
} else {
|
|
1853
|
-
let r =
|
|
1854
|
-
if (!r) throw new b("Cannot find a resolved quantitative scale for dynamic opacity!",
|
|
1855
|
-
|
|
1947
|
+
let r = n.channel ? e(n.channel) : e("x") ?? e("y");
|
|
1948
|
+
if (!r) throw new b("Cannot find a resolved quantitative scale for dynamic opacity!", t);
|
|
1949
|
+
l = () => c(r);
|
|
1856
1950
|
}
|
|
1857
|
-
return (e) => i(
|
|
1951
|
+
return (e) => i(l()) * e;
|
|
1858
1952
|
}
|
|
1859
|
-
if (
|
|
1860
|
-
let
|
|
1861
|
-
return (
|
|
1953
|
+
if (h(n)) {
|
|
1954
|
+
let e = t.paramRuntime.watchExpression(n, () => t.context.animator.requestRender());
|
|
1955
|
+
return (t) => e(null) * t;
|
|
1862
1956
|
}
|
|
1863
1957
|
}
|
|
1864
1958
|
return K;
|
|
1865
1959
|
}
|
|
1866
|
-
function
|
|
1960
|
+
function ot(e, t, n) {
|
|
1867
1961
|
if (!e.length) throw new b("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
|
|
1868
1962
|
if (e.length !== t.length) throw new b("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
|
|
1869
1963
|
e.forEach((e, t) => {
|
|
@@ -1881,42 +1975,42 @@ function rt(e, t, n) {
|
|
|
1881
1975
|
values: a
|
|
1882
1976
|
};
|
|
1883
1977
|
}
|
|
1884
|
-
function
|
|
1885
|
-
if (!
|
|
1886
|
-
return
|
|
1887
|
-
if (!
|
|
1888
|
-
return
|
|
1978
|
+
function st(t, n, r) {
|
|
1979
|
+
if (!o(t)) throw new b("\"" + n + "\" must evaluate to an array.", r);
|
|
1980
|
+
return t.map((t, i) => {
|
|
1981
|
+
if (!e(t) || !Number.isFinite(t)) throw new b("Invalid " + n + " value at index " + i + ". Expected a finite number.", r);
|
|
1982
|
+
return t;
|
|
1889
1983
|
});
|
|
1890
1984
|
}
|
|
1891
1985
|
var q = (e) => !!e && typeof e == "object" && "step" in e;
|
|
1892
|
-
function
|
|
1986
|
+
function ct(e) {
|
|
1893
1987
|
return typeof e == "number" && Number.isFinite(e);
|
|
1894
1988
|
}
|
|
1895
1989
|
var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
|
|
1896
|
-
function
|
|
1897
|
-
|
|
1990
|
+
function lt(e, t) {
|
|
1991
|
+
X(e, t, "Import");
|
|
1898
1992
|
}
|
|
1899
|
-
function
|
|
1900
|
-
|
|
1993
|
+
function ut(e, t) {
|
|
1994
|
+
X(e, t, "View");
|
|
1901
1995
|
}
|
|
1902
|
-
function
|
|
1996
|
+
function X(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
|
|
2000
|
+
function dt(e) {
|
|
1907
2001
|
return J.get(e);
|
|
1908
2002
|
}
|
|
1909
|
-
function
|
|
2003
|
+
function ft(e, t = {}) {
|
|
1910
2004
|
let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
|
|
1911
2005
|
Y.set(e, n);
|
|
1912
2006
|
}
|
|
1913
|
-
function
|
|
1914
|
-
|
|
2007
|
+
function pt(e, t = {}) {
|
|
2008
|
+
Je(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
|
|
1915
2009
|
}
|
|
1916
|
-
function
|
|
1917
|
-
return e.getLayoutAncestors().some(
|
|
2010
|
+
function mt(e) {
|
|
2011
|
+
return e.getLayoutAncestors().some(Xe);
|
|
1918
2012
|
}
|
|
1919
|
-
function
|
|
2013
|
+
function Z(e) {
|
|
1920
2014
|
let t = e.getDataAncestors(), n = [];
|
|
1921
2015
|
for (let e = t.length - 1; e >= 0; --e) {
|
|
1922
2016
|
let r = J.get(t[e]);
|
|
@@ -1924,51 +2018,51 @@ function X(e) {
|
|
|
1924
2018
|
}
|
|
1925
2019
|
return n;
|
|
1926
2020
|
}
|
|
1927
|
-
function
|
|
2021
|
+
function ht(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: Z(e),
|
|
1932
2026
|
view: t
|
|
1933
2027
|
};
|
|
1934
2028
|
}
|
|
1935
|
-
function
|
|
2029
|
+
function gt(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: Z(e),
|
|
1939
2033
|
param: t
|
|
1940
2034
|
};
|
|
1941
2035
|
}
|
|
1942
|
-
function
|
|
1943
|
-
return
|
|
2036
|
+
function _t(e) {
|
|
2037
|
+
return Tt(e), "p:" + JSON.stringify({
|
|
1944
2038
|
scope: e.scope,
|
|
1945
2039
|
param: e.param
|
|
1946
2040
|
});
|
|
1947
2041
|
}
|
|
1948
|
-
function
|
|
2042
|
+
function vt(e, t) {
|
|
1949
2043
|
e.visit((e) => {
|
|
1950
|
-
let n =
|
|
2044
|
+
let n = Ye(e);
|
|
1951
2045
|
if (n === "excludeSubtree") return W;
|
|
1952
2046
|
if (n !== "exclude") return t(e);
|
|
1953
2047
|
});
|
|
1954
2048
|
}
|
|
1955
|
-
function
|
|
2049
|
+
function yt(e, t) {
|
|
1956
2050
|
e.visit((e) => {
|
|
1957
2051
|
let n = Y.get(e);
|
|
1958
2052
|
if (n === "excludeSubtree") return W;
|
|
1959
2053
|
if (n !== "exclude") return t(e);
|
|
1960
2054
|
});
|
|
1961
2055
|
}
|
|
1962
|
-
function
|
|
1963
|
-
if (
|
|
2056
|
+
function bt(e, t) {
|
|
2057
|
+
if (Et(t), !Pt(e, t.scope)) return;
|
|
1964
2058
|
let n = [];
|
|
1965
2059
|
if ($(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 xt(e, t) {
|
|
2065
|
+
if (Tt(t), !Pt(e, t.scope)) return;
|
|
1972
2066
|
let n = [];
|
|
1973
2067
|
if ($(e, t.scope, (e) => {
|
|
1974
2068
|
for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Q(i) && n.push({
|
|
@@ -1978,54 +2072,54 @@ function vt(e, t) {
|
|
|
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 St(e, t) {
|
|
1982
2076
|
e.visit((e) => {
|
|
1983
2077
|
let n = Y.get(e);
|
|
1984
2078
|
if (n === "excludeSubtree") return W;
|
|
1985
2079
|
if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Q(r) && t({
|
|
1986
2080
|
view: e,
|
|
1987
2081
|
param: r,
|
|
1988
|
-
selector:
|
|
2082
|
+
selector: gt(e, n)
|
|
1989
2083
|
});
|
|
1990
2084
|
});
|
|
1991
2085
|
}
|
|
1992
|
-
function
|
|
2086
|
+
function Ct(e) {
|
|
1993
2087
|
let t = [];
|
|
1994
|
-
return
|
|
2088
|
+
return St(e, (e) => t.push(e)), t;
|
|
1995
2089
|
}
|
|
1996
|
-
function
|
|
2090
|
+
function wt(e) {
|
|
1997
2091
|
let t = [];
|
|
1998
|
-
for (let n of
|
|
1999
|
-
let r =
|
|
2000
|
-
|
|
2092
|
+
for (let n of Dt(e)) {
|
|
2093
|
+
let r = Ot(n);
|
|
2094
|
+
At(e, r, t), jt(e, r, t);
|
|
2001
2095
|
}
|
|
2002
2096
|
return t;
|
|
2003
2097
|
}
|
|
2004
|
-
function
|
|
2098
|
+
function Tt(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 Et(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 Q(
|
|
2013
|
-
return
|
|
2106
|
+
function Q(e) {
|
|
2107
|
+
return e.persist === !1 ? !1 : l(e) ? !0 : c(e) ? !!e.bind : !1;
|
|
2014
2108
|
}
|
|
2015
|
-
function
|
|
2109
|
+
function Dt(e) {
|
|
2016
2110
|
let t = /* @__PURE__ */ new Set([e]);
|
|
2017
2111
|
return e.visit((e) => {
|
|
2018
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 Ot(e) {
|
|
2117
|
+
return Z(e);
|
|
2024
2118
|
}
|
|
2025
|
-
function
|
|
2119
|
+
function kt(e) {
|
|
2026
2120
|
return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
|
|
2027
2121
|
}
|
|
2028
|
-
function
|
|
2122
|
+
function At(e, t, n) {
|
|
2029
2123
|
let r = /* @__PURE__ */ new Map();
|
|
2030
2124
|
$(e, t, (e) => {
|
|
2031
2125
|
for (let [t, n] of e.paramRuntime.paramConfigs) {
|
|
@@ -2038,15 +2132,15 @@ 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 " + kt(t) + ". Found in: " + r + ".",
|
|
2042
2136
|
scope: t
|
|
2043
2137
|
});
|
|
2044
2138
|
}
|
|
2045
2139
|
}
|
|
2046
|
-
function
|
|
2047
|
-
let r =
|
|
2140
|
+
function jt(e, t, n) {
|
|
2141
|
+
let r = Mt(e, t);
|
|
2048
2142
|
if (!r.length) return;
|
|
2049
|
-
let i = r.filter((e) =>
|
|
2143
|
+
let i = r.filter((e) => Nt(e));
|
|
2050
2144
|
if (i.length <= 1) return;
|
|
2051
2145
|
let a = /* @__PURE__ */ new Map();
|
|
2052
2146
|
for (let e of i) {
|
|
@@ -2054,19 +2148,19 @@ function Ot(e, t, n) {
|
|
|
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 " + kt(t) + ".",
|
|
2058
2152
|
scope: t
|
|
2059
2153
|
});
|
|
2060
2154
|
}
|
|
2061
|
-
function
|
|
2155
|
+
function Mt(e, t) {
|
|
2062
2156
|
let n = [];
|
|
2063
2157
|
return $(e, t, (e) => {
|
|
2064
|
-
if (
|
|
2158
|
+
if (Z(e).length !== t.length + 1) return;
|
|
2065
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 Nt(e) {
|
|
2070
2164
|
let t = !1;
|
|
2071
2165
|
return e.visit((e) => {
|
|
2072
2166
|
let n = Y.get(e);
|
|
@@ -2076,14 +2170,14 @@ function At(e) {
|
|
|
2076
2170
|
}
|
|
2077
2171
|
}), t;
|
|
2078
2172
|
}
|
|
2079
|
-
function
|
|
2173
|
+
function Pt(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
2178
|
if ($(e, r, (e) => {
|
|
2085
2179
|
let n = J.get(e);
|
|
2086
|
-
if (n && n.name === i &&
|
|
2180
|
+
if (n && n.name === i && Z(e).length === r.length + 1) {
|
|
2087
2181
|
if (t) return a = !0, G;
|
|
2088
2182
|
t = e;
|
|
2089
2183
|
}
|
|
@@ -2098,20 +2192,20 @@ function $(e, t, n, r = {}) {
|
|
|
2098
2192
|
e.visit((e) => {
|
|
2099
2193
|
let r = J.get(e), a = Y.get(e);
|
|
2100
2194
|
if (a === "excludeSubtree") return W;
|
|
2101
|
-
if (a !== "exclude" &&
|
|
2195
|
+
if (a !== "exclude" && Ft(e, t, r, i)) return n(e);
|
|
2102
2196
|
});
|
|
2103
2197
|
}
|
|
2104
|
-
function
|
|
2105
|
-
let i =
|
|
2106
|
-
return
|
|
2198
|
+
function Ft(e, t, n, r) {
|
|
2199
|
+
let i = Z(e);
|
|
2200
|
+
return It(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Lt(t, i);
|
|
2107
2201
|
}
|
|
2108
|
-
function
|
|
2109
|
-
return e.length === t.length &&
|
|
2202
|
+
function It(e, t) {
|
|
2203
|
+
return e.length === t.length && Lt(e, t);
|
|
2110
2204
|
}
|
|
2111
|
-
function
|
|
2205
|
+
function Lt(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 { D as A, De as B, qe as C, Be as D, Ve as E, Oe as F, Se as G, je as H, P as I, xe as J, w as K, N as L, I as M, M as N, R as O, Ae as P, Ee as R, Ze as S, B as T, ke as U, Ie as V, T as W, x as Y, W as _, ht as a, $e as b, pt as c, ut as d, xt as f, vt as g, yt as h, Z as i, O as j, Re as k, ft as l, wt as m, dt as n, mt as o, bt as p, be as q, gt as r, _t as s, Ct as t, lt as u, G as v, Ue as w, Xe as x, rt as y, Fe as z };
|