@genome-spy/app 0.86.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{agentApi-DgopQbMV.js → agentApi-BYFBKiRQ.js} +8170 -7390
  2. package/dist/agentApi.es.js +3945 -3862
  3. package/dist/agentShared.es.js +7 -7
  4. package/dist/{canvas2d-BtQC7Xr8.js → canvas2d-BVQ7-2eJ.js} +141 -140
  5. package/dist/{canvas2d-8uxuN_vx.js → canvas2d-D7SZK3xv.js} +117 -116
  6. package/dist/clipOptions-BWHr3aTa.js +2675 -0
  7. package/dist/{clipOptions-BQfNhxgP.js → clipOptions-DTMcB_9z.js} +1147 -731
  8. package/dist/{debug-D_VtWQ6l.js → debug-CVpoEOWx.js} +2 -2
  9. package/dist/{debug-Bzc3SoRg.js → debug-DYAMZZKl.js} +2 -2
  10. package/dist/index.es.js +3398 -3428
  11. package/dist/index.js +441 -411
  12. package/dist/{indexer-qy_dq5l5.js → indexer-CXjZDo2Q.js} +1 -1
  13. package/dist/{indexer-qiFctgR3.js → indexer-DAH_ruVn.js} +1 -1
  14. package/dist/{nativeText-vT3AWE14.js → order-C5CzA37O.js} +144 -86
  15. package/dist/{nativeText-DFV5XIx8.js → order-DvY7KNcu.js} +133 -75
  16. package/dist/{rasterExport-B8pVoOsj.js → rasterExport-BgZ98e6U.js} +1 -1
  17. package/dist/{rasterExport-C4r4xjQT.js → rasterExport-DEr8fOLm.js} +1 -1
  18. package/dist/{renderCanvas2D-CHVNfIUz.js → renderCanvas2D-DtcJjqpB.js} +109 -96
  19. package/dist/{renderCanvas2D-BQrRWp2Z.js → renderCanvas2D-DxturTEW.js} +108 -95
  20. package/dist/schema.json +10839 -2862
  21. package/dist/{svg-C-Sw6E6G.js → svg-CyrLfa9e.js} +389 -428
  22. package/dist/{svg-CKHwwKRt.js → svg-SDJMzL--.js} +389 -428
  23. package/dist/{svgRasterizer-BgD72AmG.js → svgRasterizer-f7DJ3UO0.js} +1 -1
  24. package/dist/{svgRasterizer-BgSNqI3L.js → svgRasterizer-mWK7HTkx.js} +1 -1
  25. package/dist/{vega-scale-D46-iCaL.js → vega-scale-CypF85iS.js} +894 -1191
  26. package/dist/{vega-scale-CK0_al6O.js → vega-scale-DLKCwWRs.js} +893 -1190
  27. package/dist/{viewIdentityRegistry-B-VGlez1.js → viewIdentityRegistry-DIDo44XQ.js} +1 -1
  28. package/dist/{viewIdentityRegistry-CDtVktJD.js → viewIdentityRegistry-Dl-vMN9I.js} +1 -1
  29. package/dist/{viewSelectors-CKfxF_LM.js → viewSelectors-CymbZyE6.js} +692 -459
  30. package/dist/{viewSelectors-D_imtq5Z.js → viewSelectors-DNiDip5e.js} +667 -434
  31. package/dist/{viewUtils-nCJ7AoaI.js → viewUtils-BrJLIj2o.js} +3032 -2332
  32. package/dist/{webgl-BaA3jSa2.js → webgl-CqTDifWM.js} +1087 -1056
  33. package/dist/{webgl-FP-4EsBL.js → webgl-jaC2m0Zr.js} +1113 -1082
  34. package/package.json +5 -5
  35. package/src/embedTypes.d.ts +1 -1
  36. package/dist/clipOptions-taFzEljc.js +0 -2259
@@ -1,6 +1,7 @@
1
- import { I as e, J as t, Jt as n, L as r, Mt as i, Nt as a, Ot as o, f as s, h as c, jt as l, l as u, o as d, p as f, rt as p, t as m, u as h, zt as ee } from "./clipOptions-taFzEljc.js";
2
- import { E as te, at as ne, m as g, y as _ } from "./vega-scale-D46-iCaL.js";
1
+ import { C as e, E as t, Jt as n, Q as r, S as i, Wt as a, Yt as o, Z as s, b as c, o as l, qt as u, t as d, tn as f, un as p, ut as m, y as h, yt as ee } from "./clipOptions-BWHr3aTa.js";
2
+ import { E as te, it as ne, m as g, y as _ } from "./vega-scale-CypF85iS.js";
3
3
  import { a as v, n as re, r as ie, t as y } from "./viewError-BiR9VCgL.js";
4
+ import { t as ae } from "./warning-CpIIpk8e.js";
4
5
  //#region ../../node_modules/flatqueue/index.js
5
6
  var b = class {
6
7
  constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
@@ -43,13 +44,11 @@ var b = class {
43
44
  shrink() {
44
45
  Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
45
46
  }
46
- }, x = Symbol("runtimeNode"), ae = 1e6;
47
- function oe(e) {
48
- return e ? (t, n) => {
49
- e.addDisposer(t, n);
50
- } : () => void 0;
47
+ }, x = Symbol("runtimeNode"), oe = 1e6;
48
+ function se(e) {
49
+ return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
51
50
  }
52
- function se(e, t) {
51
+ function ce(e, t) {
53
52
  let n = {
54
53
  id: e.id,
55
54
  name: e.name,
@@ -72,31 +71,37 @@ function se(e, t) {
72
71
  t(e);
73
72
  } }) : n;
74
73
  }
75
- function ce(e) {
74
+ function le(e) {
76
75
  let t = e[x];
77
76
  if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
78
77
  return t;
79
78
  }
80
- function le(e) {
81
- return typeof e.rank == "number" ? e.rank : ce(e).rank;
82
- }
83
79
  function ue(e) {
80
+ return typeof e.rank == "number" ? e.rank : le(e).rank;
81
+ }
82
+ function de(e) {
84
83
  for (let t of e) t();
85
84
  }
86
- var de = class {
85
+ var fe = class {
87
86
  #e = 1;
88
87
  #t = 1;
89
88
  #n = 0;
90
- #r = !1;
89
+ #r = 0;
91
90
  #i = !1;
92
- #a = /* @__PURE__ */ new Set();
93
- #o = /* @__PURE__ */ new Set();
94
- #s = new b();
95
- #c = new b();
96
- #l = /* @__PURE__ */ new Set();
97
- #u;
91
+ #a = !1;
92
+ #o = !1;
93
+ #s = 0;
94
+ #c = !1;
95
+ #l = /* @__PURE__ */ new Map();
96
+ #u = /* @__PURE__ */ new Map();
97
+ #d = /* @__PURE__ */ new Set();
98
+ #f = /* @__PURE__ */ new Set();
99
+ #p = new b();
100
+ #m = new b();
101
+ #h = /* @__PURE__ */ new Set();
102
+ #g;
98
103
  constructor(e = {}) {
99
- this.#u = oe(e.lifecycleRegistry);
104
+ this.#g = se(e.lifecycleRegistry);
100
105
  }
101
106
  createWritable(e, t, n, r, i = {}) {
102
107
  let a = "n" + this.#e++, o = i.notify ?? !0, s = {
@@ -112,121 +117,219 @@ var de = class {
112
117
  s.listeners.delete(e);
113
118
  };
114
119
  }
115
- };
116
- return this.#u(e, () => {
117
- s.disposed = !0, s.listeners.clear();
118
- }), se(s, (e) => {
120
+ }, c = (e) => {
119
121
  if (s.disposed) throw Error("Cannot set disposed parameter \"" + t + "\" (" + a + ").");
120
- e !== s.value && (s.value = e, o && ue(s.listeners));
121
- });
122
+ e !== s.value && (s.value = e, o && this.#v(s.listeners));
123
+ }, l = () => {
124
+ s.disposed = !0, s.listeners.clear(), u();
125
+ }, u = this.#g(e, l);
126
+ return Object.assign(ce(s, c), { dispose: l });
122
127
  }
123
- computed(e, t, n, r) {
124
- let i = n.reduce((e, t) => Math.max(e, le(t)), 0), a = {
128
+ computed(e, t, n, r, i = {}) {
129
+ return this.#_(e, t, n, r, i);
130
+ }
131
+ operation(e, t, n, r, i, a = {}) {
132
+ return this.#_(e, t, n, r, a, i);
133
+ }
134
+ #_(e, t, n, r, i, a) {
135
+ let o = this.#b(() => s.dependencies), s = {
125
136
  id: "n" + this.#e++,
126
137
  name: t,
127
138
  kind: "derived",
128
- rank: i + 1,
139
+ get rank() {
140
+ return o();
141
+ },
142
+ dependencies: n,
129
143
  value: r(),
130
144
  disposed: !1,
131
145
  listeners: /* @__PURE__ */ new Set(),
132
146
  fn: r,
147
+ apply: a,
148
+ equals: i.equals ?? ((e, t) => e === t),
133
149
  subscribe(e) {
134
- return a.listeners.add(e), () => {
135
- a.listeners.delete(e);
150
+ return s.listeners.add(e), () => {
151
+ s.listeners.delete(e);
136
152
  };
137
153
  }
138
- }, o = n.map((e) => e.subscribe(() => {
139
- a.disposed || (this.#d(a), e.propagation === "sync" && this.flushNow());
140
- }));
141
- return this.#u(e, () => {
142
- a.disposed || (a.disposed = !0, o.forEach((e) => e()), a.listeners.clear(), this.#a.delete(a));
143
- }), se(a);
154
+ };
155
+ a?.(s.value);
156
+ let c = () => s.dependencies.map((e) => e.subscribe(() => {
157
+ s.disposed || (this.#x(s), e.propagation === "sync" && this.flushNow());
158
+ })), l = c(), u = () => {
159
+ s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
160
+ }, d = this.#g(e, u);
161
+ return Object.assign(ce(s), {
162
+ dispose: u,
163
+ rebind: (e, n) => {
164
+ if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
165
+ let r = /* @__PURE__ */ new Set(), i = (e) => {
166
+ let n = e[x];
167
+ if (n === s) throw Error("Reactive dependency cycle: " + t);
168
+ if (!r.has(n)) {
169
+ r.add(n);
170
+ for (let e of n?.dependencies ?? []) i(e);
171
+ }
172
+ };
173
+ e.forEach(i), l.forEach((e) => e()), s.dependencies = e, s.fn = n, this.#n++, l = c(), this.#x(s), this.#p.clear();
174
+ for (let e of this.#d) this.#p.push(e, this.#C(e.rank));
175
+ this.#m.clear();
176
+ for (let e of this.#f) this.#m.push(e, this.#C(e.rank));
177
+ }
178
+ });
144
179
  }
145
180
  effect(e, t, n) {
146
- let r = t.reduce((e, t) => Math.max(e, le(t)), 0), i = {
181
+ let r = this.#b(() => t), i = {
147
182
  id: "n" + this.#e++,
148
- rank: r + 1,
183
+ get rank() {
184
+ return r();
185
+ },
149
186
  disposed: !1,
150
187
  fn: n
151
- }, a = () => {
152
- i.disposed || this.#f(i);
153
- }, o = t.map((e) => e.subscribe(a)), s = () => {
154
- i.disposed || (i.disposed = !0, o.forEach((e) => e()), this.#o.delete(i));
155
- };
156
- return this.#u(e, s), s;
188
+ }, a = t.map((e) => e.subscribe(() => {
189
+ i.disposed || (this.#S(i), e.propagation === "sync" && this.flushNow());
190
+ })), o = () => {
191
+ i.disposed || (i.disposed = !0, s(), a.forEach((e) => e()), this.#f.delete(i));
192
+ }, s = this.#g(e, o);
193
+ return o;
157
194
  }
158
195
  runInTransaction(e) {
159
- this.#n += 1;
196
+ this.#r += 1;
160
197
  try {
161
198
  return e();
162
199
  } finally {
163
- --this.#n, this.#n === 0 && this.#m();
200
+ --this.#r, this.#r === 0 && (this.#i ? (this.#i = !1, this.flushNow()) : this.#w());
164
201
  }
165
202
  }
166
- flushNow() {
167
- if (!(this.#n > 0 || this.#i)) {
168
- this.#r = !1, this.#i = !0;
169
- try {
170
- let e = !0;
171
- for (; e;) {
172
- for (e = !1; this.#s.length > 0;) {
173
- e = !0;
174
- let t = this.#s.pop();
175
- if (this.#a.delete(t), t.disposed) continue;
176
- let n = t.value, r = t.fn();
177
- r !== n && (t.value = r, ue(t.listeners));
203
+ flushNow({ afterTransaction: e = !1 } = {}) {
204
+ if (e && this.#r > 0 && (this.#i = !0), this.#s > 0) {
205
+ this.#c = !0;
206
+ return;
207
+ }
208
+ if (this.#r > 0 || this.#o) return;
209
+ this.#a = !1, this.#o = !0;
210
+ let t;
211
+ try {
212
+ for (; this.#p.length || this.#l.size || this.#m.length;) {
213
+ for (; this.#p.length;) {
214
+ let e = this.#p.pop();
215
+ if (this.#d.delete(e), e.disposed) continue;
216
+ this.#y(e, e.name);
217
+ let t, n;
218
+ try {
219
+ t = e.fn(), n = !e.equals(t, e.value), n && e.apply?.(t);
220
+ } catch (t) {
221
+ throw this.#x(e), t;
178
222
  }
179
- for (; this.#c.length > 0;) {
180
- e = !0;
181
- let t = this.#c.pop();
182
- this.#o.delete(t), !t.disposed && t.fn();
223
+ n && (e.value = t, this.#v(e.listeners));
224
+ }
225
+ if (this.#l.size) {
226
+ let e = Infinity, n;
227
+ for (let [t, { rank: r }] of this.#l) r < e && (n = t, e = r);
228
+ let r = /* @__PURE__ */ new Set();
229
+ for (;;) {
230
+ if (r.has(n)) throw Error("Cyclic streaming publication dependencies");
231
+ r.add(n);
232
+ let e;
233
+ for (let t of this.#l.get(n).prerequisites?.() ?? []) if (this.#l.has(t)) {
234
+ e = t;
235
+ break;
236
+ }
237
+ if (!e) break;
238
+ n = e;
183
239
  }
240
+ t = this.#l.get(n).onError, this.#l.delete(n), this.#y(n, "streaming update"), n(), t = void 0;
241
+ } else if (this.#m.length) {
242
+ let e = this.#m.pop();
243
+ this.#f.delete(e), e.disposed || (this.#y(e, "effect " + e.id), e.fn());
184
244
  }
185
- } finally {
186
- this.#i = !1, this.#g();
187
245
  }
246
+ } catch (e) {
247
+ let n = Array.from(this.#l.values());
248
+ this.#l.clear(), t?.(e);
249
+ for (let t of n) t.onError?.(e);
250
+ for (let t of this.#h) t.reject(e);
251
+ throw this.#h.clear(), e;
252
+ } finally {
253
+ this.#u.clear(), this.#o = !1, this.#E();
188
254
  }
189
255
  }
256
+ requestUpdate(e, t = 0, n, r) {
257
+ this.#l.set(e, {
258
+ rank: t,
259
+ onError: n,
260
+ prerequisites: r
261
+ }), this.#w();
262
+ }
263
+ cancelUpdate(e) {
264
+ this.#l.delete(e);
265
+ }
266
+ #v(e) {
267
+ this.#s++;
268
+ try {
269
+ de(e);
270
+ } finally {
271
+ this.#s--, !this.#s && this.#c && (this.#c = !1, this.flushNow());
272
+ }
273
+ }
274
+ #y(e, t) {
275
+ let n = (this.#u.get(e) ?? 0) + 1;
276
+ if (n > 100) throw Error("Reactive propagation did not settle: " + t);
277
+ this.#u.set(e, n);
278
+ }
190
279
  whenPropagated(e = {}) {
191
- if (this.#h()) return Promise.resolve();
280
+ if (this.#T()) return Promise.resolve();
192
281
  let { signal: t, timeoutMs: n } = e;
193
282
  return t?.aborted ? Promise.reject(/* @__PURE__ */ Error("whenPropagated aborted")) : new Promise((e, r) => {
194
- let i = {
195
- resolve: e,
196
- reject: r
197
- };
198
- t && (i.abortHandler = () => {
199
- this.#l.delete(i), r(/* @__PURE__ */ Error("whenPropagated aborted"));
200
- }, t.addEventListener("abort", i.abortHandler, { once: !0 })), n != null && (i.timeoutId = setTimeout(() => {
201
- this.#l.delete(i), i.abortHandler && t?.removeEventListener("abort", i.abortHandler), r(/* @__PURE__ */ Error("whenPropagated timeout after " + n + " ms"));
202
- }, n)), this.#l.add(i);
283
+ let i, a = () => {
284
+ this.#h.delete(o), t?.removeEventListener("abort", s), i !== void 0 && clearTimeout(i);
285
+ }, o = {
286
+ resolve: () => {
287
+ a(), e();
288
+ },
289
+ reject: (e) => {
290
+ a(), r(e);
291
+ }
292
+ }, s = () => o.reject(/* @__PURE__ */ Error("whenPropagated aborted"));
293
+ t?.addEventListener("abort", s, { once: !0 }), n != null && (i = setTimeout(() => o.reject(/* @__PURE__ */ Error("whenPropagated timeout after " + n + " ms")), n)), this.#h.add(o);
203
294
  });
204
295
  }
205
- #d(e) {
206
- this.#a.has(e) || (this.#a.add(e), this.#s.push(e, this.#p(e.rank)), this.#m());
296
+ #b(e) {
297
+ let t = -1, n = 0;
298
+ return () => (t !== this.#n && (n = 1 + e().reduce((e, t) => Math.max(e, ue(t)), 0), t = this.#n), n);
207
299
  }
208
- #f(e) {
209
- this.#o.has(e) || (this.#o.add(e), this.#c.push(e, this.#p(e.rank)), this.#m());
300
+ #x(e) {
301
+ if (this.#d.has(e)) {
302
+ this.#w();
303
+ return;
304
+ }
305
+ this.#d.add(e), this.#p.push(e, this.#C(e.rank)), this.#w();
210
306
  }
211
- #p(e) {
212
- let t = this.#t % ae;
213
- return this.#t += 1, e * ae + t;
307
+ #S(e) {
308
+ if (this.#f.has(e)) {
309
+ this.#w();
310
+ return;
311
+ }
312
+ this.#f.add(e), this.#m.push(e, this.#C(e.rank)), this.#w();
313
+ }
314
+ #C(e) {
315
+ let t = this.#t % oe;
316
+ return this.#t += 1, e * oe + t;
214
317
  }
215
- #m() {
216
- this.#n > 0 || this.#r || this.#i || (this.#r = !0, queueMicrotask(() => {
217
- this.flushNow();
318
+ #w() {
319
+ this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
320
+ this.#a && this.flushNow();
218
321
  }));
219
322
  }
220
- #h() {
221
- return this.#n === 0 && !this.#r && !this.#i && this.#s.length === 0 && this.#c.length === 0 && this.#a.size === 0 && this.#o.size === 0;
323
+ #T() {
324
+ 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;
222
325
  }
223
- #g() {
224
- if (this.#h()) {
225
- for (let e of this.#l) e.timeoutId && clearTimeout(e.timeoutId), e.resolve();
226
- this.#l.clear();
326
+ #E() {
327
+ if (this.#T()) {
328
+ for (let e of this.#h) e.resolve();
329
+ this.#h.clear();
227
330
  }
228
331
  }
229
- }, fe = class {
332
+ }, pe = class {
230
333
  #e = 1;
231
334
  #t = /* @__PURE__ */ new Map();
232
335
  createOwner(e, t) {
@@ -236,7 +339,9 @@ var de = class {
236
339
  addDisposer(e, t) {
237
340
  let n = this.#t.get(e);
238
341
  if (!n) throw Error("Unknown owner: " + e);
239
- n.add(t);
342
+ return n.add(t), () => {
343
+ n.delete(t);
344
+ };
240
345
  }
241
346
  disposeOwner(e) {
242
347
  let t = this.#t.get(e);
@@ -245,13 +350,14 @@ var de = class {
245
350
  t.clear(), this.#t.delete(e);
246
351
  }
247
352
  }
248
- }, pe = class {
353
+ }, me = class {
249
354
  #e = 1;
250
355
  #t = /* @__PURE__ */ new Map();
251
356
  createRootScope(e) {
252
357
  let t = "scope:" + this.#e++;
253
358
  return this.#t.set(t, {
254
359
  params: /* @__PURE__ */ new Map(),
360
+ initializers: /* @__PURE__ */ new Map(),
255
361
  ownerId: e
256
362
  }), t;
257
363
  }
@@ -261,6 +367,7 @@ var de = class {
261
367
  return this.#t.set(n, {
262
368
  parentScope: t,
263
369
  params: /* @__PURE__ */ new Map(),
370
+ initializers: /* @__PURE__ */ new Map(),
264
371
  ownerId: e
265
372
  }), n;
266
373
  }
@@ -272,36 +379,57 @@ var de = class {
272
379
  clearScope(e) {
273
380
  let t = this.#t.get(e);
274
381
  if (!t) throw Error("Unknown scope: " + e);
275
- t.params.clear();
276
- }
277
- register(e, t, n) {
278
- c(t);
279
- let r = this.#t.get(e);
280
- if (!r) throw Error("Unknown scope: " + e);
281
- if (r.params.has(t)) throw Error("Parameter \"" + t + "\" already exists in scope " + e);
282
- return r.params.set(t, n), n;
382
+ t.params.clear(), t.initializers.clear();
383
+ }
384
+ registerInitializer(e, n, r) {
385
+ t(n);
386
+ let i = this.#t.get(e);
387
+ if (!i) throw Error("Unknown scope: " + e);
388
+ if (i.params.has(n) || i.initializers.has(n)) throw Error(`Parameter "${n}" already exists in scope ${e}`);
389
+ i.initializers.set(n, {
390
+ initialize: r,
391
+ initializing: !1
392
+ });
283
393
  }
284
- resolve(e, t) {
285
- c(t);
286
- let n = e;
287
- for (; n;) {
288
- let e = this.#t.get(n);
289
- if (!e) throw Error("Unknown scope: " + n);
290
- let r = e.params.get(t);
291
- if (r) return r;
292
- n = e.parentScope;
394
+ register(e, n, r) {
395
+ t(n);
396
+ let i = this.#t.get(e);
397
+ if (!i) throw Error("Unknown scope: " + e);
398
+ if (i.params.has(n) || i.initializers.get(n)?.initializing === !1) throw Error("Parameter \"" + n + "\" already exists in scope " + e);
399
+ return i.params.set(n, r), r;
400
+ }
401
+ resolve(e, n) {
402
+ t(n);
403
+ let r = e;
404
+ for (; r;) {
405
+ let e = this.#t.get(r);
406
+ if (!e) throw Error("Unknown scope: " + r);
407
+ let t = e.initializers.get(n);
408
+ if (t) {
409
+ if (t.initializing) throw Error(`Parameter dependency cycle while initializing "${n}" in ${r}.`);
410
+ t.initializing = !0;
411
+ try {
412
+ if (t.initialize(), !e.params.has(n)) throw Error(`Initializer did not register parameter "${n}".`);
413
+ e.initializers.delete(n);
414
+ } finally {
415
+ t.initializing = !1;
416
+ }
417
+ }
418
+ let i = e.params.get(n);
419
+ if (i) return i;
420
+ r = e.parentScope;
293
421
  }
294
422
  }
295
423
  };
296
424
  //#endregion
297
425
  //#region ../core/src/paramRuntime/expressionCompiler.js
298
- function me(e, t = {}, n = {}) {
426
+ function he(e, t = {}, n = {}) {
299
427
  return r(e, t, n);
300
428
  }
301
429
  //#endregion
302
430
  //#region ../core/src/paramRuntime/expressionRef.js
303
- function he(e, t, n = {}) {
304
- let r = {}, i = me(e, r, n), a = /* @__PURE__ */ new Map();
431
+ function S(e, t, n = {}) {
432
+ let r = {}, i = he(e, r, n), a = /* @__PURE__ */ new Map();
305
433
  for (let n of i.globals) {
306
434
  if (a.has(n)) continue;
307
435
  let i = t(n);
@@ -325,17 +453,17 @@ function he(e, t, n = {}) {
325
453
  }, i.invalidate = () => {
326
454
  for (let e of o) e();
327
455
  o.clear();
328
- }, i.identifier = () => i.code + "|" + Array.from(a.values()).map((e) => e.id).concat((i.scaleDependencies ?? []).map((e) => e.id)).join(","), {
456
+ }, i.identifier = () => i.code + "|" + Array.from(a.values()).map((e) => e.id).concat((i.scaleDependencies ?? []).map((e) => e.id)).join(","), i.dependencies = Array.from(a.values()).concat(i.scaleDependencies ?? []), {
329
457
  expression: i,
330
- dependencies: Array.from(a.values()).concat(i.scaleDependencies ?? [])
458
+ dependencies: i.dependencies
331
459
  };
332
460
  }
333
461
  //#endregion
334
462
  //#region ../core/src/paramRuntime/paramRuntime.js
335
463
  var ge = class {
336
- #e = new fe();
337
- #t = new de({ lifecycleRegistry: this.#e });
338
- #n = new pe();
464
+ #e = new pe();
465
+ #t = new fe({ lifecycleRegistry: this.#e });
466
+ #n = new me();
339
467
  createScope(e) {
340
468
  let t = this.#e.createOwner("scope", e ?? "root");
341
469
  return e ? this.#n.createChildScope(t, e) : this.#n.createRootScope(t);
@@ -348,6 +476,9 @@ var ge = class {
348
476
  let n = this.#n.getOwnerId(e);
349
477
  this.#e.addDisposer(n, t);
350
478
  }
479
+ registerInitializer(e, t, n) {
480
+ this.#n.registerInitializer(e, t, n);
481
+ }
351
482
  registerBase(e, t, n, r) {
352
483
  let i = this.#n.getOwnerId(e), a = this.#t.createWritable(i, t, "base", n, r);
353
484
  return this.#n.register(e, t, a);
@@ -357,21 +488,39 @@ var ge = class {
357
488
  return this.#n.register(e, t, a);
358
489
  }
359
490
  registerDerived(e, t, n, r) {
360
- let { expression: i, dependencies: a } = he(n, (t) => this.resolve(e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
491
+ let { expression: i, dependencies: a } = S(n, (t) => this.resolve(r?.expressionScope ?? e, t), r), o = this.#n.getOwnerId(e), s = this.#t.computed(o, t, a, () => i(null));
361
492
  return this.#n.register(e, t, s);
362
493
  }
363
494
  createExpression(e, t, n) {
364
- let { expression: r } = he(t, (t) => this.resolve(e, t), n);
495
+ let { expression: r } = S(t, (t) => this.resolve(e, t), n);
365
496
  return r;
366
497
  }
367
498
  resolve(e, t) {
368
499
  return this.#n.resolve(e, t);
369
500
  }
501
+ signal(e, t, n) {
502
+ return this.#t.createWritable(this.#n.getOwnerId(e), t, "base", n);
503
+ }
504
+ computed(e, t, n, r, i) {
505
+ return this.#t.computed(this.#n.getOwnerId(e), t, n, r, i);
506
+ }
507
+ operation(e, t, n, r, i, a) {
508
+ return this.#t.operation(this.#n.getOwnerId(e), t, n, r, i, a);
509
+ }
510
+ effect(e, t, n) {
511
+ return this.#t.effect(this.#n.getOwnerId(e), t, n);
512
+ }
513
+ requestUpdate(e, t = 0, n, r) {
514
+ this.#t.requestUpdate(e, t, n, r);
515
+ }
516
+ cancelUpdate(e) {
517
+ this.#t.cancelUpdate(e);
518
+ }
370
519
  runInTransaction(e) {
371
520
  return this.#t.runInTransaction(e);
372
521
  }
373
- flushNow() {
374
- this.#t.flushNow();
522
+ flushNow(e) {
523
+ this.#t.flushNow(e);
375
524
  }
376
525
  whenPropagated(e) {
377
526
  return this.#t.whenPropagated(e);
@@ -429,7 +578,7 @@ var be = class {
429
578
  });
430
579
  }
431
580
  };
432
- function xe(e, t, n, r, i) {
581
+ function C(e, t, n, r, i) {
433
582
  let a = 0, o = !0, s = !1, c = structuredClone(i), l = c;
434
583
  function u(e, t, n, r) {
435
584
  return t + (e - t) * 2 ** (-n / r);
@@ -448,7 +597,7 @@ function xe(e, t, n, r, i) {
448
597
  s || (s = !0, e.requestTransition(d));
449
598
  }
450
599
  function p(n) {
451
- l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = Se(), d(a));
600
+ l = n, e.transitionsEnabled === !1 ? (c = l, o = !0, s = !1, e.cancelTransition(d), t(c)) : o && (o = !1, a = xe(), d(a));
452
601
  }
453
602
  return p.stop = () => {
454
603
  o = !0, s = !1, e.cancelTransition(d);
@@ -456,34 +605,70 @@ function xe(e, t, n, r, i) {
456
605
  l = e, c = e, p.stop(), t(c);
457
606
  }, p;
458
607
  }
459
- function Se() {
608
+ function xe() {
460
609
  let e = globalThis.document?.timeline?.currentTime;
461
610
  return typeof e == "number" ? e : performance.now();
462
611
  }
463
612
  //#endregion
464
613
  //#region ../core/src/paramRuntime/viewParamRuntime.js
465
- var S = class {
614
+ var w = class {
466
615
  #e;
467
616
  #t;
468
617
  #n = /* @__PURE__ */ new Map();
469
618
  #r = /* @__PURE__ */ new Map();
470
619
  #i = /* @__PURE__ */ new Map();
471
- #a = /* @__PURE__ */ new Map();
472
- #o;
473
- #s;
620
+ #a = /* @__PURE__ */ new Set();
621
+ #o = /* @__PURE__ */ new Map();
622
+ #s = /* @__PURE__ */ new Map();
474
623
  #c;
475
624
  #l;
476
- #u = !1;
625
+ #u;
626
+ #d;
627
+ #f = !1;
477
628
  constructor(e, t, n, r = {}) {
478
- this.#o = e ?? (() => void 0), this.#s = t ?? (() => void 0), this.#c = n, this.#l = r.snapTransitionedUpdates ?? !1;
479
- let i = this.#o();
629
+ this.#c = e ?? (() => void 0), this.#l = t ?? (() => void 0), this.#u = n, this.#d = r.snapTransitionedUpdates ?? !1;
630
+ let i = this.#c();
480
631
  i ? (this.#e = i.#e, this.#t = this.#e.createScope(i.#t)) : (this.#e = new ge(), this.#t = this.#e.createScope());
481
632
  }
482
- registerParam(e) {
483
- let t = e.name;
484
- if (c(t), this.#i.has(t)) throw Error("Parameter \"" + t + "\" already registered in this scope.");
485
- we(e);
486
- let n, r;
633
+ get #p() {
634
+ return { resolveScaleResolution: this.#l };
635
+ }
636
+ registerParam(e, n = {}) {
637
+ let r = e.name;
638
+ if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
639
+ if (Ce(e), n.defer) {
640
+ if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
641
+ return this.#e.registerInitializer(this.#t, r, () => {
642
+ this.#m(e);
643
+ }), this.#i.set(r, e), () => {
644
+ throw Error("Cannot set derived parameter \"" + r + "\".");
645
+ };
646
+ }
647
+ return this.#m(e);
648
+ }
649
+ registerLazyExpression(e, t, n) {
650
+ this.#e.registerInitializer(this.#t, e, () => {
651
+ n?.();
652
+ let r = this.#e.registerDerived(this.#t, e, t, this.#p);
653
+ this.#r.set(e, r);
654
+ }), this.#a.add(e);
655
+ }
656
+ registerScopedExpression(e, t, n) {
657
+ if (this.#e !== n.#e) throw Error("Scoped expressions must share a parameter runtime.");
658
+ if (this.#i.has(e)) throw Error("Parameter \"" + e + "\" already registered in this scope.");
659
+ this.#e.registerInitializer(this.#t, e, () => {
660
+ let r = this.#e.registerDerived(this.#t, e, t, {
661
+ expressionScope: n.#t,
662
+ ...n.#p
663
+ });
664
+ this.#r.set(e, r);
665
+ }), this.#i.set(e, {
666
+ name: e,
667
+ expr: t
668
+ });
669
+ }
670
+ #m(e) {
671
+ let t = e.name, n, r;
487
672
  if (e.push == "outer") {
488
673
  let i = this.findRuntimeForParam(t);
489
674
  if (!i) throw Error(`Parameter "${t}" not found in outer scope!`);
@@ -492,20 +677,20 @@ var S = class {
492
677
  if ("expr" in a || "select" in a || "ruler" in a) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
493
678
  n = (e) => {
494
679
  i.setValue(t, e);
495
- }, this.#n.set(t, n), "ruler" in e && (r = u(e, this), n(r));
496
- } else if ("value" in e) r = u(e, this), n = "transition" in e ? this.#f(t, r, e.transition) : this.#d(t, r);
680
+ }, this.#n.set(t, n), "ruler" in e && (r = h(e, this), n(r));
681
+ } else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#g(t, r, e.transition) : this.#h(t, r);
497
682
  else if ("expr" in e) {
498
- if ("transition" in e) this.#p(t, e.expr, e.transition);
683
+ if ("transition" in e) this.#_(t, e.expr, e.transition);
499
684
  else {
500
- let n = this.#e.registerDerived(this.#t, t, e.expr, { resolveScaleResolution: this.#s });
685
+ let n = this.#e.registerDerived(this.#t, t, e.expr, this.#p);
501
686
  this.#r.set(t, n);
502
687
  }
503
688
  n = () => {
504
689
  throw Error("Cannot set derived parameter \"" + t + "\".");
505
690
  };
506
- } else r = u(e, this), n = this.#d(t, r);
691
+ } else r = h(e, this), n = this.#h(t, r);
507
692
  if ("select" in e) {
508
- if (r ??= u(e, this), !this.#n.has(t)) {
693
+ if (r ??= h(e, this), !this.#n.has(t)) {
509
694
  let e = this.#e.registerSelection(this.#t, t, r);
510
695
  this.#r.set(t, e), this.#n.set(t, (t) => {
511
696
  e.set(t), this.#e.flushNow();
@@ -515,34 +700,36 @@ var S = class {
515
700
  }
516
701
  return this.#i.set(t, e), n;
517
702
  }
518
- allocateSetter(e, t, n = !1) {
519
- if (c(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
520
- let r = this.#e.registerBase(this.#t, e, t, { notify: !n });
521
- this.#r.set(e, r);
522
- let i = (e) => {
523
- r.set(e), this.#e.flushNow();
703
+ allocateSetter(e, n, r = !1) {
704
+ if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
705
+ let i = this.#e.registerBase(this.#t, e, n, { notify: !r });
706
+ this.#r.set(e, i);
707
+ let a = (e) => {
708
+ i.set(e), this.#e.flushNow();
524
709
  };
525
- return this.#n.set(e, i), i;
710
+ return this.#n.set(e, a), a;
526
711
  }
527
- setValue(e, t, n) {
528
- c(e);
529
- let r = this.#n.get(e);
530
- if (!r) throw Error("Writable parameter not found in this scope: " + e);
531
- r(t, n);
712
+ setValue(e, n, r) {
713
+ t(e);
714
+ let i = this.#n.get(e);
715
+ if (!i) throw Error("Writable parameter not found in this scope: " + e);
716
+ i(n, r);
532
717
  }
533
718
  getValue(e) {
534
- return this.#r.get(e)?.get();
719
+ return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
720
+ }
721
+ getParamRef(e) {
722
+ t(e);
723
+ let n = this.findRuntimeForParam(e);
724
+ if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
535
725
  }
536
726
  getTargetValue(e) {
537
- return c(e), this.#a.get(e)?.target ?? this.getValue(e);
727
+ return t(e), this.#s.get(e)?.target ?? this.getValue(e);
538
728
  }
539
729
  subscribe(e, t) {
540
- c(e);
541
- let n = this.findRuntimeForParam(e);
730
+ let n = this.getParamRef(e);
542
731
  if (!n) throw Error("Parameter not found: " + e);
543
- let r = n.#r.get(e);
544
- if (!r) throw Error("Parameter found without local reference: " + e);
545
- return r.subscribe(t);
732
+ return n.subscribe(t);
546
733
  }
547
734
  findValue(e) {
548
735
  return this.findRuntimeForParam(e)?.getValue(e);
@@ -554,13 +741,39 @@ var S = class {
554
741
  return this.#i;
555
742
  }
556
743
  hasLocalParam(e) {
557
- return c(e), this.#r.has(e);
744
+ t(e);
745
+ let n = this.#i.get(e);
746
+ return this.#r.has(e) || this.#a.has(e) || n !== void 0 && "expr" in n;
747
+ }
748
+ isPendingParam(e) {
749
+ let t = this.findRuntimeForParam(e);
750
+ return t !== void 0 && !t.#r.has(e);
558
751
  }
559
752
  hasConfiguredParamInScopeChain(e) {
560
- return c(e), this.#i.has(e) ? !0 : this.#o()?.hasConfiguredParamInScopeChain(e) ?? !1;
753
+ return t(e), this.#i.has(e) ? !0 : this.#c()?.hasConfiguredParamInScopeChain(e) ?? !1;
561
754
  }
562
755
  findRuntimeForParam(e) {
563
- return this.#r.has(e) ? this : this.#o()?.findRuntimeForParam(e);
756
+ return this.hasLocalParam(e) ? this : this.#c()?.findRuntimeForParam(e);
757
+ }
758
+ findConfiguredParam(e) {
759
+ let t = this.#i.get(e);
760
+ return t ? {
761
+ runtime: this,
762
+ config: t
763
+ } : this.#c()?.findConfiguredParam(e);
764
+ }
765
+ registerSelectionController(e, t) {
766
+ let n = this.#o.get(e);
767
+ return n || (n = /* @__PURE__ */ new Set(), this.#o.set(e, n)), n.add(t), () => {
768
+ n.delete(t), n.size === 0 && this.#o.delete(e);
769
+ };
770
+ }
771
+ getSelectionController(e) {
772
+ let t = this.#o.get(e);
773
+ if (t) {
774
+ if (t.size > 1) throw Error(`Selection "${e}" has ambiguous interaction ownership.`);
775
+ return t.values().next().value;
776
+ }
564
777
  }
565
778
  getDebugState() {
566
779
  let e = [];
@@ -568,28 +781,49 @@ var S = class {
568
781
  let r = this.#i.get(t);
569
782
  e.push({
570
783
  name: t,
571
- kind: Ce(r),
784
+ kind: Se(r),
572
785
  value: n.get(),
573
786
  writable: this.#n.has(t),
574
787
  configured: !!r,
575
788
  config: r ? structuredClone(r) : void 0,
576
- target: this.#a.get(t)?.target
789
+ target: this.#s.get(t)?.target
577
790
  });
578
791
  }
579
792
  return {
580
793
  scopeId: this.#t,
581
- disposed: this.#u,
794
+ disposed: this.#f,
582
795
  params: e
583
796
  };
584
797
  }
585
798
  createExpression(e) {
586
- return this.#e.createExpression(this.#t, e, { resolveScaleResolution: this.#s });
799
+ return this.#e.createExpression(this.#t, e, this.#p);
587
800
  }
588
801
  watchExpression(e, t, n = {}) {
589
802
  let r = this.createExpression(e), i = r.subscribe(t);
590
803
  return (n.scopeOwned ?? !0) && this.#e.addScopeDisposer(this.#t, i), n.registerDisposer?.(i), r;
591
804
  }
592
- #d(e, t) {
805
+ signal(e, t) {
806
+ return this.#e.signal(this.#t, e, t);
807
+ }
808
+ computed(e, t, n, r) {
809
+ return this.#e.computed(this.#t, e, t, n, r);
810
+ }
811
+ operation(e, t, n, r, i) {
812
+ return this.#e.operation(this.#t, e, t, n, r, i);
813
+ }
814
+ effect(e, t) {
815
+ return this.#e.effect(this.#t, e, t);
816
+ }
817
+ get updateScheduler() {
818
+ return this.#e;
819
+ }
820
+ requestUpdate(e, t = 0, n, r) {
821
+ this.#e.requestUpdate(e, t, n, r);
822
+ }
823
+ cancelUpdate(e) {
824
+ this.#e.cancelUpdate(e);
825
+ }
826
+ #h(e, t) {
593
827
  let n = this.#e.registerBase(this.#t, e, t);
594
828
  this.#r.set(e, n);
595
829
  let r = (e) => {
@@ -597,36 +831,36 @@ var S = class {
597
831
  };
598
832
  return this.#n.set(e, r), r;
599
833
  }
600
- #f(e, t, n) {
601
- let r = this.#m(e, t, n), i = (t, n) => {
602
- this.#h(e, r, t, n);
834
+ #g(e, t, n) {
835
+ let r = this.#v(e, t, n), i = (t, n) => {
836
+ this.#y(e, r, t, n);
603
837
  };
604
838
  return this.#n.set(e, i), i;
605
839
  }
606
- #p(e, t, n) {
607
- let r = this.createExpression(t), i = this.#m(e, r(null), n), a = r.subscribe(() => {
608
- this.#h(e, i, r(null), { animate: !this.#l });
840
+ #_(e, t, n) {
841
+ let r = this.createExpression(t), i = this.#v(e, r(null), n), a = r.subscribe(() => {
842
+ this.#y(e, i, r(null), { animate: !this.#d });
609
843
  });
610
844
  this.#e.addScopeDisposer(this.#t, a);
611
845
  }
612
- #m(e, t, n) {
613
- let r = C(e, t), i = this.#e.registerBase(this.#t, e, r);
846
+ #v(e, t, n) {
847
+ let r = T(e, t), i = this.#e.registerBase(this.#t, e, r);
614
848
  this.#r.set(e, i);
615
- let a = this.#c;
849
+ let a = this.#u;
616
850
  if (!a) throw Error(`The parameter "${e}" uses transition but no animator is available.`);
617
- let o = xe(a, ({ value: e }) => {
851
+ let o = C(a, ({ value: e }) => {
618
852
  i.set(e), this.#e.flushNow();
619
853
  }, n.halfLife ?? 80, n.epsilon ?? .01, { value: i.get() }), s = {
620
854
  target: i.get(),
621
855
  smoother: o,
622
856
  dispose: () => {
623
- o.stop(), this.#a.delete(e);
857
+ o.stop(), this.#s.delete(e);
624
858
  }
625
859
  };
626
- return this.#a.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
860
+ return this.#s.set(e, s), this.#e.addScopeDisposer(this.#t, s.dispose), s;
627
861
  }
628
- #h(e, t, n, r = {}) {
629
- let i = C(e, n);
862
+ #y(e, t, n, r = {}) {
863
+ let i = T(e, n);
630
864
  t.target = i, r.animate === !1 ? t.smoother.snap({ value: i }) : t.smoother({ value: i });
631
865
  }
632
866
  evaluateAndGet(e) {
@@ -635,32 +869,32 @@ var S = class {
635
869
  runInTransaction(e) {
636
870
  return this.#e.runInTransaction(e);
637
871
  }
638
- flushNow() {
639
- this.#e.flushNow();
872
+ flushNow(e) {
873
+ this.#e.flushNow(e);
640
874
  }
641
875
  whenPropagated(e) {
642
876
  return this.#e.whenPropagated(e);
643
877
  }
644
878
  finalizeInitialization() {
645
- this.#l = !1;
879
+ this.#d = !1;
646
880
  }
647
881
  dispose() {
648
- this.#u || (this.#u = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear());
882
+ this.#f || (this.#f = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#s.clear());
649
883
  }
650
884
  hasPointSelections() {
651
- for (let e of this.#i.values()) if (s(e)) {
885
+ for (let e of this.#i.values()) if (i(e)) {
652
886
  let t = e.select;
653
- if (a(t)) {
887
+ if (o(t)) {
654
888
  if (t == "point") return !0;
655
889
  } else if (t.type == "point") return !0;
656
890
  }
657
891
  return !1;
658
892
  }
659
893
  };
660
- function Ce(e) {
894
+ function Se(e) {
661
895
  return e ? e.push === "outer" ? "push" : "select" in e ? "selection" : "ruler" in e ? "ruler" : "expr" in e ? "derived" : "base" : "auto";
662
896
  }
663
- function we(e) {
897
+ function Ce(e) {
664
898
  let t = e.name;
665
899
  if ("value" in e && "expr" in e) throw Error(`The parameter "${t}" must not have both value and expr properties!`);
666
900
  if ("expr" in e && "bind" in e) throw Error(`The parameter "${t}" must not have both expr and bind properties!`);
@@ -673,16 +907,16 @@ function we(e) {
673
907
  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.`);
674
908
  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.`);
675
909
  }
676
- function C(e, t) {
910
+ function T(e, t) {
677
911
  if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Transitioned parameter "${e}" must have a finite numeric value.`);
678
912
  return t;
679
913
  }
680
914
  //#endregion
681
915
  //#region ../core/src/view/layout/flexLayout.js
682
- function Te(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
916
+ function we(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
683
917
  n ||= 0, i ||= 0;
684
918
  let o = Ne(e, t, n), s = 0, c = 0;
685
- for (let t = 0; t < e.length; t++) s += o[t], D(e[t]) || c++;
919
+ for (let t = 0; t < e.length; t++) s += o[t], O(e[t]) || c++;
686
920
  let l = s + Math.max(0, c - 1) * n, u = r === void 0 ? (e) => e : (e) => Math.round(e * r) / r, d = 0, f = [], p = (e) => {
687
921
  let t = d;
688
922
  if (!t) return;
@@ -694,13 +928,13 @@ function Te(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
694
928
  });
695
929
  m += r, d = 0;
696
930
  }, m = a ? Math.max(t, l) : 0 + i;
697
- if (e.length == 1 && D(e[0])) return [{
931
+ if (e.length == 1 && O(e[0])) return [{
698
932
  location: m,
699
933
  size: 0
700
934
  }];
701
935
  for (let t = 0; t < e.length; t++) {
702
936
  let r = e[t];
703
- if (D(r)) d++;
937
+ if (O(r)) d++;
704
938
  else {
705
939
  p(f.length > 0);
706
940
  let e = o[t];
@@ -712,34 +946,34 @@ function Te(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
712
946
  }
713
947
  return m += a ? n : -n, p(!1), f;
714
948
  }
715
- function Ee(e, { spacing: t } = { spacing: 0 }) {
949
+ function Te(e, { spacing: t } = { spacing: 0 }) {
716
950
  let n = 0;
717
- for (let r of e) n += A(r) + (D(r) ? 0 : t);
951
+ for (let r of e) n += M(r) + (O(r) ? 0 : t);
718
952
  return Math.max(0, n - t);
719
953
  }
720
- function De(e, t, { spacing: n = 0 } = {}) {
954
+ function Ee(e, t, { spacing: n = 0 } = {}) {
721
955
  let r = [], i = [], a = 0, o = 0;
722
956
  for (let [s, c] of e.entries()) {
723
- let e = A(c), l = !D(c), u = o && l ? n : 0;
957
+ let e = M(c), l = !O(c), u = o && l ? n : 0;
724
958
  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;
725
959
  }
726
960
  return i.length && r.push(i), r;
727
961
  }
728
- function Oe(e) {
962
+ function De(e) {
729
963
  let t = 0, n = 0, r = 0, i, a = !0;
730
964
  for (let o of e) {
731
- t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, A(o));
732
- let e = j(o);
965
+ t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, M(o));
966
+ let e = N(o);
733
967
  e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
734
968
  }
735
- return M({
969
+ return I({
736
970
  px: t,
737
971
  grow: n,
738
972
  minPx: r,
739
973
  maxPx: a ? i : void 0
740
974
  });
741
975
  }
742
- function ke(e) {
976
+ function Oe(e) {
743
977
  let t = {
744
978
  px: 0,
745
979
  grow: 0,
@@ -747,13 +981,13 @@ function ke(e) {
747
981
  maxPx: 0
748
982
  }, n = !0;
749
983
  for (let r of e) {
750
- t.px += O(r.px), t.grow += O(r.grow), t.minPx += A(r);
751
- let e = j(r);
984
+ t.px += k(r.px), t.grow += k(r.grow), t.minPx += M(r);
985
+ let e = N(r);
752
986
  e === void 0 ? n = !1 : t.maxPx += e;
753
987
  }
754
- return n || delete t.maxPx, M(t);
988
+ return n || delete t.maxPx, I(t);
755
989
  }
756
- var w = class e {
990
+ var E = class e {
757
991
  constructor(e, t) {
758
992
  this.width = e, this.height = t;
759
993
  }
@@ -764,31 +998,31 @@ var w = class e {
764
998
  return this.#e(-e.width, -e.height);
765
999
  }
766
1000
  #e(t, n) {
767
- return new e(Le(this.width, t), Le(this.height, n));
1001
+ return new e(F(this.width, t), F(this.height, n));
768
1002
  }
769
1003
  isGrowing() {
770
1004
  return !!(this.width.grow || this.height.grow);
771
1005
  }
772
- }, T = Object.freeze({
1006
+ }, D = Object.freeze({
773
1007
  px: 0,
774
1008
  grow: 0
775
- }), E = new w(T, T);
776
- function D(e) {
1009
+ }), ke = new E(D, D);
1010
+ function O(e) {
777
1011
  return !e.px && !e.grow && !e.minPx;
778
1012
  }
779
1013
  function Ae(e, t) {
780
1014
  return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
781
1015
  }
782
- function O(e) {
1016
+ function k(e) {
783
1017
  return e || 0;
784
1018
  }
785
1019
  function je(e) {
786
- return e && (l(e.px) || l(e.grow) || l(e.minPx) || l(e.maxPx));
1020
+ return e && (u(e.px) || u(e.grow) || u(e.minPx) || u(e.maxPx));
787
1021
  }
788
1022
  function Me(e) {
789
1023
  if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
790
- if (je(e)) return Fe(e), M(e);
791
- if (l(e)) return {
1024
+ if (je(e)) return A(e), I(e);
1025
+ if (u(e)) return {
792
1026
  px: e,
793
1027
  grow: 0
794
1028
  };
@@ -800,26 +1034,26 @@ function Me(e) {
800
1034
  }
801
1035
  function Ne(e, t, n) {
802
1036
  let r = !1;
803
- for (let t of e) Fe(t), r ||= Ie(t);
1037
+ for (let t of e) A(t), r ||= P(t);
804
1038
  if (!r) return Pe(e, t, n);
805
1039
  let i = Array(e.length).fill(0), a = [];
806
- for (let t = 0; t < e.length; t++) D(e[t]) || a.push(t);
1040
+ for (let t = 0; t < e.length; t++) O(e[t]) || a.push(t);
807
1041
  let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
808
1042
  for (let t of a) {
809
1043
  let n = e[t];
810
- O(n.grow) || (i[t] = k(O(n.px), n), c.add(t));
1044
+ k(n.grow) || (i[t] = j(k(n.px), n), c.add(t));
811
1045
  }
812
1046
  for (;;) {
813
1047
  let t = 0, n = 0, r = 0;
814
- for (let o of a) c.has(o) ? r += i[o] : (t += O(e[o].px), n += O(e[o].grow));
1048
+ for (let o of a) c.has(o) ? r += i[o] : (t += k(e[o].px), n += k(e[o].grow));
815
1049
  if (!n) {
816
- for (let t of a) c.has(t) || (i[t] = k(O(e[t].px), e[t]), c.add(t));
1050
+ for (let t of a) c.has(t) || (i[t] = j(k(e[t].px), e[t]), c.add(t));
817
1051
  break;
818
1052
  }
819
1053
  let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
820
1054
  for (let t of a) {
821
1055
  if (c.has(t)) continue;
822
- let r = e[t], a = O(r.px) + O(r.grow) / n * o, s = k(a, r);
1056
+ let r = e[t], a = k(r.px) + k(r.grow) / n * o, s = j(a, r);
823
1057
  i[t] = s;
824
1058
  let f = s - a;
825
1059
  l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
@@ -833,45 +1067,45 @@ function Ne(e, t, n) {
833
1067
  }
834
1068
  function Pe(e, t, n) {
835
1069
  let r = 0, i = 0;
836
- for (let t of e) r += O(t.px) + (D(t) ? 0 : n), i += O(t.grow);
1070
+ for (let t of e) r += k(t.px) + (O(t) ? 0 : n), i += k(t.grow);
837
1071
  r -= n;
838
1072
  let a = Math.max(0, t - r), o = Array(e.length);
839
1073
  for (let t = 0; t < e.length; t++) {
840
1074
  let n = e[t];
841
- o[t] = D(n) ? 0 : O(n.px) + (i ? O(n.grow) / i * a : 0);
1075
+ o[t] = O(n) ? 0 : k(n.px) + (i ? k(n.grow) / i * a : 0);
842
1076
  }
843
1077
  return o;
844
1078
  }
845
- function Fe(e) {
1079
+ function A(e) {
846
1080
  if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
847
1081
  }
848
- function k(e, t) {
1082
+ function j(e, t) {
849
1083
  return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
850
1084
  }
851
- function A(e) {
852
- return k(O(e.px), e);
1085
+ function M(e) {
1086
+ return j(k(e.px), e);
853
1087
  }
854
- function j(e) {
855
- return e.maxPx ?? (O(e.grow) ? void 0 : A(e));
1088
+ function N(e) {
1089
+ return e.maxPx ?? (k(e.grow) ? void 0 : M(e));
856
1090
  }
857
- function Ie(e) {
1091
+ function P(e) {
858
1092
  return e.minPx !== void 0 || e.maxPx !== void 0;
859
1093
  }
860
- function Le(e, t) {
861
- return M({
1094
+ function F(e, t) {
1095
+ return I({
862
1096
  px: (e.px ?? 0) + t,
863
1097
  grow: e.grow,
864
1098
  minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
865
1099
  maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
866
1100
  });
867
1101
  }
868
- function M(e) {
869
- let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = Ie(e);
870
- 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 > O(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (O(t.grow) || e.maxPx < O(e.px)) && (t.maxPx = e.maxPx), t;
1102
+ function I(e) {
1103
+ let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = P(e);
1104
+ 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 > k(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (k(t.grow) || e.maxPx < k(e.px)) && (t.maxPx = e.maxPx), t;
871
1105
  }
872
1106
  //#endregion
873
1107
  //#region ../core/src/view/layout/padding.js
874
- var N = class e {
1108
+ var L = class e {
875
1109
  constructor(e, t, n, r) {
876
1110
  this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
877
1111
  }
@@ -906,35 +1140,35 @@ var N = class e {
906
1140
  return this.top + this.bottom;
907
1141
  }
908
1142
  static createFromConfig(e) {
909
- return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : P;
1143
+ return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : R;
910
1144
  }
911
1145
  static createFromRecord(t) {
912
1146
  return new e(t.top, t.right, t.bottom, t.left);
913
1147
  }
914
1148
  static zero() {
915
- return P;
1149
+ return R;
916
1150
  }
917
1151
  static createUniformPadding(t) {
918
1152
  return new e(t, t, t, t);
919
1153
  }
920
1154
  };
921
- function Re(e, t) {
922
- return t ? new N(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
1155
+ function Fe(e, t) {
1156
+ return t ? new L(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
923
1157
  }
924
- var P = N.createUniformPadding(0);
925
- Object.freeze(P);
1158
+ var R = L.createUniformPadding(0);
1159
+ Object.freeze(R);
926
1160
  //#endregion
927
1161
  //#region ../core/src/utils/url.js
928
- var ze = /^([A-Za-z]+:)?\/\//;
929
- function F(e, t) {
930
- if (t && ze.test(t)) return t;
1162
+ var Ie = /^([A-Za-z]+:)?\/\//;
1163
+ function z(e, t) {
1164
+ if (t && Ie.test(t)) return t;
931
1165
  let n = typeof e == "function" ? e() : e;
932
1166
  if (!n) return t;
933
1167
  if (!t) return n;
934
1168
  if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
935
- return I(n) + t;
1169
+ return B(n) + t;
936
1170
  }
937
- function Be(e, t, n = Ve()) {
1171
+ function Le(e, t, n = Re()) {
938
1172
  let r = typeof e == "function" ? e() : e;
939
1173
  if (!t) return r;
940
1174
  try {
@@ -943,68 +1177,68 @@ function Be(e, t, n = Ve()) {
943
1177
  return new URL(t, e).href;
944
1178
  } else if (n) return new URL(t, n).href;
945
1179
  } catch {}
946
- return F(r, t);
1180
+ return z(r, t);
947
1181
  }
948
- function I(e) {
1182
+ function B(e) {
949
1183
  let t = e.replace(/[^/]*$/, "");
950
1184
  return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
951
1185
  }
952
- function Ve() {
1186
+ function Re() {
953
1187
  if (typeof document < "u" && document.baseURI) return document.baseURI;
954
1188
  if (typeof window < "u" && window.location?.href) return window.location.href;
955
1189
  }
956
1190
  //#endregion
957
1191
  //#region ../core/src/utils/addBaseUrl.js
958
- function He(e, t) {
1192
+ function ze(e, t) {
959
1193
  return !t || /^(data:|([A-Za-z]+:)?\/\/)/.test(e) || e.startsWith("/") ? e : (t.endsWith("/") || (t += "/"), t + e);
960
1194
  }
961
- function Ue(e) {
1195
+ function Be(e) {
962
1196
  if (!e) return e;
963
1197
  if (/[?#]/.test(e)) throw Error(`Invalid base URL: ${e} - cannot contain query or hash.`);
964
1198
  return e.endsWith("/") ? e : e + "/";
965
1199
  }
966
1200
  //#endregion
967
1201
  //#region ../core/src/config/mergeConfig.js
968
- function L(e) {
969
- return i(e) && !Array.isArray(e);
1202
+ function V(e) {
1203
+ return n(e) && !Array.isArray(e);
970
1204
  }
971
- function We(e) {
1205
+ function Ve(e) {
972
1206
  let t = {};
973
- for (let [n, r] of Object.entries(e)) t[n] = R(r);
1207
+ for (let [n, r] of Object.entries(e)) t[n] = H(r);
974
1208
  return t;
975
1209
  }
976
- function R(e) {
977
- return Array.isArray(e) ? e.map(R) : L(e) ? We(e) : e;
1210
+ function H(e) {
1211
+ return Array.isArray(e) ? e.map(H) : V(e) ? Ve(e) : e;
978
1212
  }
979
- function z(e, t) {
1213
+ function He(e, t) {
980
1214
  for (let [n, r] of Object.entries(t)) {
981
1215
  if (r === void 0) continue;
982
1216
  let t = e[n];
983
- L(r) && L(t) ? z(t, r) : e[n] = R(r);
1217
+ V(r) && V(t) ? He(t, r) : e[n] = H(r);
984
1218
  }
985
1219
  return e;
986
1220
  }
987
- function B(e) {
1221
+ function Ue(e) {
988
1222
  let t = {};
989
- for (let n of e) n && z(t, n);
1223
+ for (let n of e) n && He(t, n);
990
1224
  return t;
991
1225
  }
992
1226
  //#endregion
993
1227
  //#region ../core/src/view/viewChrome.js
994
- var V = /* @__PURE__ */ new WeakMap();
995
- function Ge(e, t) {
996
- V.set(e, t);
1228
+ var U = /* @__PURE__ */ new WeakMap();
1229
+ function We(e, t) {
1230
+ U.set(e, t);
997
1231
  }
998
- function Ke(e) {
999
- return V.get(e);
1232
+ function Ge(e) {
1233
+ return U.get(e);
1000
1234
  }
1001
- function H(e) {
1002
- return V.has(e);
1235
+ function Ke(e) {
1236
+ return U.has(e);
1003
1237
  }
1004
- function U(e) {
1238
+ function qe(e) {
1005
1239
  let t = e;
1006
1240
  for (; t;) {
1007
- let n = V.get(t);
1241
+ let n = U.get(t);
1008
1242
  if (n === "excludeSubtree" || t === e && n === "exclude") return !0;
1009
1243
  t = t.layoutParent;
1010
1244
  }
@@ -1012,16 +1246,16 @@ function U(e) {
1012
1246
  }
1013
1247
  //#endregion
1014
1248
  //#region ../core/src/view/postScaleParams.js
1015
- var qe = /* @__PURE__ */ new WeakMap();
1016
- function Je(e, t) {
1017
- qe.set(e, t);
1249
+ var Je = /* @__PURE__ */ new WeakMap();
1250
+ function Ye(e, t) {
1251
+ Je.set(e, t);
1018
1252
  }
1019
- function Ye(e) {
1020
- return qe.get(e);
1253
+ function Xe(e) {
1254
+ return Je.get(e);
1021
1255
  }
1022
1256
  //#endregion
1023
1257
  //#region ../core/src/data/namedDataScope.js
1024
- var Xe = class {
1258
+ var Ze = class {
1025
1259
  name;
1026
1260
  owner;
1027
1261
  getDefaultData;
@@ -1059,13 +1293,13 @@ var Xe = class {
1059
1293
  dispose() {
1060
1294
  this.#e = void 0, this.#t = !1, this.#n++, this.#r = !0;
1061
1295
  }
1062
- }, Ze = class {
1296
+ }, Qe = class {
1063
1297
  view;
1064
1298
  #e = /* @__PURE__ */ new Map();
1065
1299
  #t = /* @__PURE__ */ new Map();
1066
1300
  constructor(e) {
1067
1301
  this.view = e;
1068
- for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Xe(t, e, () => n));
1302
+ for (let [t, n] of Object.entries(e.spec.datasets ?? {})) this.#e.set(t, new Ze(t, e, () => n));
1069
1303
  }
1070
1304
  getLocalBinding(e) {
1071
1305
  return this.#e.get(e);
@@ -1079,7 +1313,7 @@ var Xe = class {
1079
1313
  let n = this.view.dataParent?.namedDataScope;
1080
1314
  if (n) return n.resolve(e);
1081
1315
  let r = this.#t.get(e);
1082
- return r || (r = new Xe(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1316
+ return r || (r = new Ze(e, void 0, () => this.view.context.getNamedDataFromProvider(e)), this.#t.set(e, r)), r;
1083
1317
  }
1084
1318
  dispose() {
1085
1319
  for (let e of this.#e.values()) e.dispose();
@@ -1087,7 +1321,7 @@ var Xe = class {
1087
1321
  for (let e of this.#t.values()) e.dispose();
1088
1322
  this.#t.clear();
1089
1323
  }
1090
- }, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, Qe = class {
1324
+ }, W = "VISIT_SKIP", G = "VISIT_STOP", K = (e) => e, $e = class {
1091
1325
  spec;
1092
1326
  namedDataScope;
1093
1327
  #e;
@@ -1107,33 +1341,32 @@ var Xe = class {
1107
1341
  #p = "none";
1108
1342
  #m = /* @__PURE__ */ new Map();
1109
1343
  facetCoords = new ne([], JSON.stringify);
1110
- constructor(t, n, r, i, a, o = {}) {
1111
- if (!t) throw Error("View spec must be defined!");
1112
- if (this.context = n, this.layoutParent = r, this.dataParent = i, this.#t = a, this.spec = t, this.namedDataScope = new Ze(this), i && t.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1113
- let s = i ? i.getConfigScopes() : [n.getBaseConfig()], c = t.config;
1114
- if (this.#e = [...s, c].filter((e) => !!e), this.resolutions = {
1344
+ constructor(e, t, n, r, i, a = {}) {
1345
+ if (!e) throw Error("View spec must be defined!");
1346
+ if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Qe(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
1347
+ let o = r ? r.getConfigScopes() : [t.getBaseConfig()], c = e.config;
1348
+ this.#e = [...o, c].filter((e) => !!e), this.resolutions = {
1115
1349
  scale: {},
1116
1350
  axis: {},
1117
1351
  legend: {}
1118
1352
  }, ie(this), this.options = {
1119
1353
  inheritEncoding: !1,
1120
1354
  layoutSizeParams: "own",
1121
- ...o
1355
+ ...a
1122
1356
  }, this.flowHandle = void 0, this.needsAxes = {
1123
1357
  x: !1,
1124
1358
  y: !1
1125
- }, this.paramRuntime = new S(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), n.animator, { snapTransitionedUpdates: !0 }), t.params) {
1126
- let n = /* @__PURE__ */ new Set();
1127
- for (let r of t.params) {
1128
- if ("expr" in r) {
1129
- let { usesScaleHelper: t, globals: i } = e(r.expr), a = i.some((e) => n.has(e));
1130
- if (t || a) {
1131
- n.add(r.name), this.#d.push(r);
1132
- continue;
1133
- }
1359
+ }, this.paramRuntime = new w(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { snapTransitionedUpdates: !0 }), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => ae("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
1360
+ let l = [...e.params ?? [], ...Xe(e) ?? []];
1361
+ for (let e of l) {
1362
+ if ("expr" in e) {
1363
+ let { usesScaleHelper: t, globals: n } = s(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
1364
+ if (t || r) {
1365
+ this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
1366
+ continue;
1134
1367
  }
1135
- this.paramRuntime.registerParam(r);
1136
1368
  }
1369
+ this.paramRuntime.registerParam(e);
1137
1370
  }
1138
1371
  this.options.layoutSizeParams !== "inherit" && (this.#a = this.#h("width"), this.#o = this.#h("height"));
1139
1372
  }
@@ -1153,18 +1386,18 @@ var Xe = class {
1153
1386
  return this.#t;
1154
1387
  }
1155
1388
  getConfig() {
1156
- return B(this.#e);
1389
+ return Ue(this.#e);
1157
1390
  }
1158
1391
  getCursorSpec() {
1159
1392
  return this.spec.cursor;
1160
1393
  }
1161
1394
  getCursor() {
1162
1395
  let e = this.getCursorSpec();
1163
- return h(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1396
+ return c(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
1164
1397
  }
1165
1398
  watchCursor(e, t) {
1166
1399
  let n = this.getCursorSpec();
1167
- h(n) && this.paramRuntime.watchExpression(n.expr, e, {
1400
+ c(n) && this.paramRuntime.watchExpression(n.expr, e, {
1168
1401
  scopeOwned: !1,
1169
1402
  registerDisposer: t
1170
1403
  });
@@ -1176,53 +1409,53 @@ var Xe = class {
1176
1409
  return this.facetCoords.values().next().value;
1177
1410
  }
1178
1411
  getPadding() {
1179
- return this._cache("size/padding", () => N.createFromConfig(this.spec.padding));
1412
+ return this._cache("size/padding", () => L.createFromConfig(this.spec.padding));
1180
1413
  }
1181
1414
  getOverhang() {
1182
- return N.zero();
1415
+ return L.zero();
1183
1416
  }
1184
1417
  isScrollable() {
1185
1418
  return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
1186
1419
  }
1187
1420
  getSize() {
1188
- return this._cache("size/size", () => this.isConfiguredVisible() ? new w(this.#g("width"), this.#g("height")) : E);
1421
+ return this._cache("size/size", () => this.isConfiguredVisible() ? new E(this.#g("width"), this.#g("height")) : ke);
1189
1422
  }
1190
1423
  getViewportSize() {
1191
1424
  if (!this.isScrollable()) return this.getSize();
1192
- if (!this.isConfiguredVisible()) return E;
1425
+ if (!this.isConfiguredVisible()) return ke;
1193
1426
  let e = this.getSize();
1194
- return new w(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1427
+ return new E(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
1195
1428
  }
1196
1429
  #g(e) {
1197
- let { value: t, implicit: r } = this.#_(e), i = this.resolveSizeValue(e, t), a = q(i), o = e == "viewportWidth" || e == "viewportHeight";
1198
- if (a) {
1199
- if (o) throw new y(`Cannot use step-based size with "${e}"!`, this);
1200
- let t = this.#x(e, i), a = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1201
- if (a) {
1202
- let r;
1203
- if (_(a.type)) r = a.domain().length;
1204
- else if (["locus", "index"].includes(a.type)) {
1205
- let e = a.domain();
1206
- r = n(e) - e[0];
1207
- } else throw new y(`Cannot use step-based size with "${a.type}" scale!`, this);
1208
- let o = a;
1209
- r = g(r, o.paddingInner(), o.paddingOuter());
1210
- let s = e == "width" ? "xOffset" : "yOffset", c = this.getScaleResolution(s)?.getScale(), l = i.for ?? (c && _(c.type) ? "offset" : "position"), u = t;
1211
- if (l == "offset") {
1212
- if (!c || !_(c.type)) throw new y(`Cannot use ${e}.step.for = "offset" without a discrete ${s} scale!`, this);
1213
- let t = c, n = g(c.domain().length, t.paddingInner(), t.paddingOuter());
1214
- u *= n / (1 - o.paddingInner());
1430
+ let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = q(r), a = e == "viewportWidth" || e == "viewportHeight";
1431
+ if (i) {
1432
+ if (a) throw new y(`Cannot use step-based size with "${e}"!`, this);
1433
+ let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
1434
+ if (i) {
1435
+ let n;
1436
+ if (_(i.type)) n = i.domain().length;
1437
+ else if (["locus", "index"].includes(i.type)) {
1438
+ let e = i.domain();
1439
+ n = p(e) - e[0];
1440
+ } else throw new y(`Cannot use step-based size with "${i.type}" scale!`, this);
1441
+ let a = i;
1442
+ n = g(n, a.paddingInner(), a.paddingOuter());
1443
+ let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && _(s.type) ? "offset" : "position"), l = t;
1444
+ if (c == "offset") {
1445
+ if (!s || !_(s.type)) throw new y(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
1446
+ let t = s, n = g(s.domain().length, t.paddingInner(), t.paddingOuter());
1447
+ l *= n / (1 - a.paddingInner());
1215
1448
  }
1216
1449
  return {
1217
- px: r * u,
1450
+ px: n * l,
1218
1451
  grow: 0
1219
1452
  };
1220
- } else if (r) return {
1453
+ } else if (n) return {
1221
1454
  px: t,
1222
1455
  grow: 0
1223
1456
  };
1224
1457
  else throw new y(`Cannot use step-based size with "${e}"!`, this);
1225
- } else return (i && Me(i)) ?? (o ? void 0 : {
1458
+ } else return (r && Me(r)) ?? (a ? void 0 : {
1226
1459
  px: 0,
1227
1460
  grow: 1
1228
1461
  });
@@ -1238,16 +1471,16 @@ var Xe = class {
1238
1471
  };
1239
1472
  }
1240
1473
  #v(e) {
1241
- if (U(this)) return;
1474
+ if (qe(this)) return;
1242
1475
  let t = this.getConfig().view;
1243
1476
  if (!t) return;
1244
1477
  let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
1245
1478
  return r && !_(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
1246
1479
  }
1247
1480
  resolveSizeValue(e, t) {
1248
- if (!h(t)) return t;
1481
+ if (!c(t)) return t;
1249
1482
  let n = this.#C(e)();
1250
- if (rt(n) || n === "container") return n;
1483
+ if (it(n) || n === "container") return n;
1251
1484
  throw new y(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
1252
1485
  }
1253
1486
  registerSizeInvalidation() {
@@ -1274,11 +1507,11 @@ var Xe = class {
1274
1507
  }
1275
1508
  #b(e) {
1276
1509
  let { value: t } = this.#_(e);
1277
- h(t) ? this.#S(e, t.expr) : q(t) && h(t.step) && this.#S(e + ".step", t.step.expr);
1510
+ c(t) ? this.#S(e, t.expr) : q(t) && c(t.step) && this.#S(e + ".step", t.step.expr);
1278
1511
  }
1279
1512
  #x(e, t) {
1280
- let n = h(t.step) ? this.#C(e + ".step")() : t.step;
1281
- if (rt(n)) return n;
1513
+ let n = c(t.step) ? this.#C(e + ".step")() : t.step;
1514
+ if (it(n)) return n;
1282
1515
  throw new y(`"${e}.step" ExprRef must resolve to a finite number!`, this);
1283
1516
  }
1284
1517
  #S(e, t) {
@@ -1400,17 +1633,17 @@ var Xe = class {
1400
1633
  }, this.visit(e);
1401
1634
  }
1402
1635
  configurePostScaleParams() {
1403
- let e = [...this.#d, ...Ye(this.spec) ?? []];
1636
+ let e = this.#d;
1404
1637
  if (e.length && !this.#u) {
1405
1638
  this.#u = !0, this.#l = !1;
1406
- for (let t of e) this.paramRuntime.registerParam(t);
1639
+ for (let t of e) this.paramRuntime.getValue(t);
1407
1640
  this.registerDisposer(this._addBroadcastHandler("subtreeDataReady", () => {
1408
1641
  this.#l = !0, this.#T();
1409
1642
  }));
1410
1643
  }
1411
1644
  }
1412
1645
  configureViewOpacity() {
1413
- (!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = et(this));
1646
+ (!this.opacityFunction || this.opacityFunction === K) && (this.opacityFunction = tt(this));
1414
1647
  }
1415
1648
  finalizeParamRuntimeInitialization() {
1416
1649
  this.#l === void 0 ? this.paramRuntime.finalizeInitialization() : this.#T();
@@ -1422,8 +1655,8 @@ var Xe = class {
1422
1655
  return this.#s;
1423
1656
  }
1424
1657
  arrange(e, t, n = {}) {
1425
- if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, d(n))), this.#a || this.#o) {
1426
- let e = this.getOverhang(), n = this.layoutParent ? N.zero() : this.getPadding();
1658
+ if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, d(t, l(n))), this.#a || this.#o) {
1659
+ let e = this.getOverhang(), n = this.layoutParent ? L.zero() : this.getPadding();
1427
1660
  this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
1428
1661
  }
1429
1662
  this.#c = !0, this.#T();
@@ -1444,7 +1677,7 @@ var Xe = class {
1444
1677
  }
1445
1678
  getFacetFields(e) {
1446
1679
  let t = this.getEncoding().sample;
1447
- return p(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1680
+ return ee(t) ? [t.field] : this.options.inheritEncoding ? this.layoutParent?.getFacetFields(this) : [];
1448
1681
  }
1449
1682
  usesSampleFacetRendering() {
1450
1683
  return this.layoutParent?.usesSampleFacetRendering() ?? !1;
@@ -1456,16 +1689,16 @@ var Xe = class {
1456
1689
  };
1457
1690
  }
1458
1691
  getScaleResolution(e) {
1459
- let n = t(e);
1460
- return this.getDataAncestors().map((e) => e.resolutions.scale[n]).find((e) => e);
1692
+ let t = m(e);
1693
+ return this.getDataAncestors().map((e) => e.resolutions.scale[t]).find((e) => e);
1461
1694
  }
1462
1695
  getAxisResolution(e) {
1463
- let n = t(e);
1464
- return this.getDataAncestors().map((e) => e.resolutions.axis[n]).find((e) => e);
1696
+ let t = m(e);
1697
+ return this.getDataAncestors().map((e) => e.resolutions.axis[t]).find((e) => e);
1465
1698
  }
1466
1699
  getLegendResolution(e) {
1467
- let n = t(e);
1468
- return this.getDataAncestors().map((e) => e.resolutions.legend[n]).find((e) => e);
1700
+ let t = m(e);
1701
+ return this.getDataAncestors().map((e) => e.resolutions.legend[t]).find((e) => e);
1469
1702
  }
1470
1703
  getConfiguredResolution(e, t) {
1471
1704
  return this.spec.resolve?.[t]?.[e];
@@ -1477,14 +1710,14 @@ var Xe = class {
1477
1710
  return "independent";
1478
1711
  }
1479
1712
  getBaseUrl() {
1480
- return F(() => this.dataParent?.getBaseUrl(), Ue(this.spec.baseUrl));
1713
+ return z(() => this.dataParent?.getBaseUrl(), Be(this.spec.baseUrl));
1481
1714
  }
1482
1715
  isPickingSupported() {
1483
1716
  return !0;
1484
1717
  }
1485
1718
  getTitleText() {
1486
1719
  let e = this.spec.title;
1487
- if (e) return a(e) ? e : h(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1720
+ if (e) return o(e) ? e : c(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
1488
1721
  }
1489
1722
  _cache(e, t) {
1490
1723
  return re(this, e, t);
@@ -1508,14 +1741,14 @@ var Xe = class {
1508
1741
  }
1509
1742
  propagateInteraction(e) {}
1510
1743
  };
1511
- function $e(e) {
1744
+ function et(e) {
1512
1745
  return "unitsPerPixel" in e;
1513
1746
  }
1514
- function et(e) {
1747
+ function tt(e) {
1515
1748
  let t = "opacity" in e.spec ? e.spec.opacity : void 0;
1516
1749
  if (t !== void 0) {
1517
- if (l(t)) return (e) => e * t;
1518
- if ($e(t)) {
1750
+ if (u(t)) return (e) => e * t;
1751
+ if (et(t)) {
1519
1752
  let n = (t) => {
1520
1753
  let n = e.getScaleResolution(t), r = n?.getScale();
1521
1754
  if ([
@@ -1526,44 +1759,44 @@ function et(e) {
1526
1759
  scale: r,
1527
1760
  scaleResolution: n
1528
1761
  };
1529
- }, r = nt(t.values, "opacity.values", e);
1530
- if (!o(t.unitsPerPixel)) throw new y("\"opacity.unitsPerPixel\" must be an array.", e);
1531
- let i = () => 1, a = [], s = () => {
1532
- let t = tt(nt(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = te().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1762
+ }, r = rt(t.values, "opacity.values", e);
1763
+ if (!a(t.unitsPerPixel)) throw new y("\"opacity.unitsPerPixel\" must be an array.", e);
1764
+ let i = () => 1, o = [], s = () => {
1765
+ let t = nt(rt(o.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = te().domain(t.unitsPerPixel).range(t.values).clamp(!0);
1533
1766
  i = (e) => n(e);
1534
1767
  };
1535
- a = t.unitsPerPixel.map((t) => {
1536
- if (h(t)) {
1768
+ o = t.unitsPerPixel.map((t) => {
1769
+ if (c(t)) {
1537
1770
  let n = e.paramRuntime.watchExpression(t.expr, () => {
1538
1771
  s(), e.context.animator.requestRender();
1539
1772
  });
1540
1773
  return () => n(null);
1541
1774
  } else return () => t;
1542
1775
  }), s();
1543
- let c = (e) => {
1776
+ let l = (e) => {
1544
1777
  let t = e.scaleResolution.getAxisLength() || 1e3;
1545
- return ee(e.scale.domain()) / t;
1546
- }, l;
1778
+ return f(e.scale.domain()) / t;
1779
+ }, u;
1547
1780
  if (t.channel === "auto") {
1548
1781
  let t = n("x"), r = n("y");
1549
- if (t && r) l = () => (c(t) + c(r)) / 2;
1550
- else if (t) l = () => c(t);
1551
- else if (r) l = () => c(r);
1782
+ if (t && r) u = () => (l(t) + l(r)) / 2;
1783
+ else if (t) u = () => l(t);
1784
+ else if (r) u = () => l(r);
1552
1785
  else throw new y("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
1553
1786
  } else {
1554
1787
  let r = t.channel ? n(t.channel) : n("x") ?? n("y");
1555
1788
  if (!r) throw new y("Cannot find a resolved quantitative scale for dynamic opacity!", e);
1556
- l = () => c(r);
1789
+ u = () => l(r);
1557
1790
  }
1558
- return (e) => i(l()) * e;
1559
- } else if (h(t)) {
1791
+ return (e) => i(u()) * e;
1792
+ } else if (c(t)) {
1560
1793
  let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
1561
1794
  return (e) => n(null) * e;
1562
1795
  }
1563
1796
  }
1564
1797
  return K;
1565
1798
  }
1566
- function tt(e, t, n) {
1799
+ function nt(e, t, n) {
1567
1800
  if (!e.length) throw new y("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
1568
1801
  if (e.length !== t.length) throw new y("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
1569
1802
  e.forEach((e, t) => {
@@ -1581,40 +1814,40 @@ function tt(e, t, n) {
1581
1814
  values: a
1582
1815
  };
1583
1816
  }
1584
- function nt(e, t, n) {
1585
- if (!o(e)) throw new y("\"" + t + "\" must evaluate to an array.", n);
1817
+ function rt(e, t, n) {
1818
+ if (!a(e)) throw new y("\"" + t + "\" must evaluate to an array.", n);
1586
1819
  return e.map((e, r) => {
1587
- if (!l(e) || !Number.isFinite(e)) throw new y("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1820
+ if (!u(e) || !Number.isFinite(e)) throw new y("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
1588
1821
  return e;
1589
1822
  });
1590
1823
  }
1591
1824
  var q = (e) => !!e && typeof e == "object" && "step" in e;
1592
- function rt(e) {
1825
+ function it(e) {
1593
1826
  return typeof e == "number" && Number.isFinite(e);
1594
1827
  }
1595
1828
  var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
1596
- function it(e, t) {
1597
- ot(e, t, "Import");
1598
- }
1599
1829
  function at(e, t) {
1600
- ot(e, t, "View");
1830
+ st(e, t, "Import");
1601
1831
  }
1602
- function ot(e, t, n) {
1832
+ function ot(e, t) {
1833
+ st(e, t, "View");
1834
+ }
1835
+ function st(e, t, n) {
1603
1836
  if (t !== null && typeof t != "string") throw Error(n + " scope name must be a string or null.");
1604
1837
  J.set(e, { name: t });
1605
1838
  }
1606
- function st(e) {
1839
+ function ct(e) {
1607
1840
  return J.get(e);
1608
1841
  }
1609
- function ct(e, t = {}) {
1842
+ function lt(e, t = {}) {
1610
1843
  let n = t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude";
1611
1844
  Y.set(e, n);
1612
1845
  }
1613
- function lt(e, t = {}) {
1614
- Ge(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1846
+ function ut(e, t = {}) {
1847
+ We(e, t.skipSubtree ?? !1 ? "excludeSubtree" : "exclude");
1615
1848
  }
1616
- function ut(e) {
1617
- return e.getLayoutAncestors().some(H);
1849
+ function dt(e) {
1850
+ return e.getLayoutAncestors().some(Ke);
1618
1851
  }
1619
1852
  function X(e) {
1620
1853
  let t = e.getDataAncestors(), n = [];
@@ -1624,7 +1857,7 @@ function X(e) {
1624
1857
  }
1625
1858
  return n;
1626
1859
  }
1627
- function dt(e) {
1860
+ function ft(e) {
1628
1861
  let t = e.explicitName;
1629
1862
  if (!t) throw Error("Cannot build a selector for a view without a name.");
1630
1863
  return {
@@ -1632,45 +1865,45 @@ function dt(e) {
1632
1865
  view: t
1633
1866
  };
1634
1867
  }
1635
- function ft(e, t) {
1868
+ function pt(e, t) {
1636
1869
  if (!t) throw Error("Cannot build a selector for a parameter without a name.");
1637
1870
  return {
1638
1871
  scope: X(e),
1639
1872
  param: t
1640
1873
  };
1641
1874
  }
1642
- function pt(e) {
1643
- return xt(e), "p:" + JSON.stringify({
1875
+ function mt(e) {
1876
+ return St(e), "p:" + JSON.stringify({
1644
1877
  scope: e.scope,
1645
1878
  param: e.param
1646
1879
  });
1647
1880
  }
1648
- function mt(e, t) {
1881
+ function ht(e, t) {
1649
1882
  e.visit((e) => {
1650
- let n = Ke(e);
1883
+ let n = Ge(e);
1651
1884
  if (n === "excludeSubtree") return W;
1652
1885
  if (n !== "exclude") return t(e);
1653
1886
  });
1654
1887
  }
1655
- function ht(e, t) {
1888
+ function gt(e, t) {
1656
1889
  e.visit((e) => {
1657
1890
  let n = Y.get(e);
1658
1891
  if (n === "excludeSubtree") return W;
1659
1892
  if (n !== "exclude") return t(e);
1660
1893
  });
1661
1894
  }
1662
- function gt(e, t) {
1663
- if (St(t), !kt(e, t.scope)) return;
1895
+ function _t(e, t) {
1896
+ if (Ct(t), !jt(e, t.scope)) return;
1664
1897
  let n = [];
1665
- if ($(e, t.scope, (e) => {
1898
+ if (Q(e, t.scope, (e) => {
1666
1899
  e.explicitName === t.view && n.push(e);
1667
1900
  }, { includeNamedImportRoots: !0 }), n.length === 1) return n[0];
1668
1901
  if (n.length !== 0) throw Error("View selector is ambiguous for view \"" + t.view + "\" in scope " + JSON.stringify(t.scope));
1669
1902
  }
1670
- function _t(e, t) {
1671
- if (xt(t), !kt(e, t.scope)) return;
1903
+ function vt(e, t) {
1904
+ if (St(t), !jt(e, t.scope)) return;
1672
1905
  let n = [];
1673
- if ($(e, t.scope, (e) => {
1906
+ if (Q(e, t.scope, (e) => {
1674
1907
  for (let [r, i] of e.paramRuntime.paramConfigs) r === t.param && Z(i) && n.push({
1675
1908
  view: e,
1676
1909
  param: i
@@ -1678,56 +1911,56 @@ function _t(e, t) {
1678
1911
  }), n.length === 1) return n[0];
1679
1912
  if (n.length !== 0) throw Error("Param selector is ambiguous for param \"" + t.param + "\" in scope " + JSON.stringify(t.scope));
1680
1913
  }
1681
- function vt(e, t) {
1914
+ function yt(e, t) {
1682
1915
  e.visit((e) => {
1683
1916
  let n = Y.get(e);
1684
1917
  if (n === "excludeSubtree") return W;
1685
1918
  if (n !== "exclude") for (let [n, r] of e.paramRuntime.paramConfigs) Z(r) && t({
1686
1919
  view: e,
1687
1920
  param: r,
1688
- selector: ft(e, n)
1921
+ selector: pt(e, n)
1689
1922
  });
1690
1923
  });
1691
1924
  }
1692
- function yt(e) {
1925
+ function bt(e) {
1693
1926
  let t = [];
1694
- return vt(e, (e) => t.push(e)), t;
1927
+ return yt(e, (e) => t.push(e)), t;
1695
1928
  }
1696
- function bt(e) {
1929
+ function xt(e) {
1697
1930
  let t = [];
1698
- for (let n of Ct(e)) {
1699
- let r = wt(n);
1700
- Tt(e, r, t), Et(e, r, t);
1931
+ for (let n of wt(e)) {
1932
+ let r = Tt(n);
1933
+ Dt(e, r, t), Ot(e, r, t);
1701
1934
  }
1702
1935
  return t;
1703
1936
  }
1704
- function xt(e) {
1937
+ function St(e) {
1705
1938
  if (!e || !Array.isArray(e.scope)) throw Error("Param selector scope must be an array.");
1706
1939
  if (typeof e.param != "string" || !e.param.length) throw Error("Param selector param must be a non-empty string.");
1707
1940
  }
1708
- function St(e) {
1941
+ function Ct(e) {
1709
1942
  if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
1710
1943
  if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
1711
1944
  }
1712
- function Z(e) {
1713
- return e.persist === !1 ? !1 : s(e) ? !0 : f(e) ? !!e.bind : !1;
1945
+ function Z(t) {
1946
+ return t.persist === !1 ? !1 : i(t) ? !0 : e(t) ? !!t.bind : !1;
1714
1947
  }
1715
- function Ct(e) {
1948
+ function wt(e) {
1716
1949
  let t = /* @__PURE__ */ new Set([e]);
1717
1950
  return e.visit((e) => {
1718
1951
  let n = J.get(e);
1719
1952
  n && typeof n.name == "string" && t.add(e);
1720
1953
  }), Array.from(t);
1721
1954
  }
1722
- function wt(e) {
1955
+ function Tt(e) {
1723
1956
  return X(e);
1724
1957
  }
1725
- function Q(e) {
1958
+ function Et(e) {
1726
1959
  return e.length ? "import scope [" + e.join(" / ") + "]" : "import scope (root)";
1727
1960
  }
1728
- function Tt(e, t, n) {
1961
+ function Dt(e, t, n) {
1729
1962
  let r = /* @__PURE__ */ new Map();
1730
- $(e, t, (e) => {
1963
+ Q(e, t, (e) => {
1731
1964
  for (let [t, n] of e.paramRuntime.paramConfigs) {
1732
1965
  if (!Z(n)) continue;
1733
1966
  let i = r.get(t);
@@ -1738,15 +1971,15 @@ function Tt(e, t, n) {
1738
1971
  if (i.length <= 1) continue;
1739
1972
  let r = i.map((e) => e.getPathString()).join(", ");
1740
1973
  n.push({
1741
- message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Q(t) + ". Found in: " + r + ".",
1974
+ message: "Bookmarkable parameter \"" + e + "\" is not unique within " + Et(t) + ". Found in: " + r + ".",
1742
1975
  scope: t
1743
1976
  });
1744
1977
  }
1745
1978
  }
1746
- function Et(e, t, n) {
1747
- let r = Dt(e, t);
1979
+ function Ot(e, t, n) {
1980
+ let r = kt(e, t);
1748
1981
  if (!r.length) return;
1749
- let i = r.filter((e) => Ot(e));
1982
+ let i = r.filter((e) => At(e));
1750
1983
  if (i.length <= 1) return;
1751
1984
  let a = /* @__PURE__ */ new Map();
1752
1985
  for (let e of i) {
@@ -1754,19 +1987,19 @@ function Et(e, t, n) {
1754
1987
  typeof n != "string" || !n.length || a.set(n, (a.get(n) ?? 0) + 1);
1755
1988
  }
1756
1989
  for (let [e, r] of a) r > 1 && n.push({
1757
- message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Q(t) + ".",
1990
+ message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Et(t) + ".",
1758
1991
  scope: t
1759
1992
  });
1760
1993
  }
1761
- function Dt(e, t) {
1994
+ function kt(e, t) {
1762
1995
  let n = [];
1763
- return $(e, t, (e) => {
1996
+ return Q(e, t, (e) => {
1764
1997
  if (X(e).length !== t.length + 1) return;
1765
1998
  let r = J.get(e);
1766
1999
  !r || typeof r.name != "string" || n.push(e);
1767
2000
  }, { includeNamedImportRoots: !0 }), n;
1768
2001
  }
1769
- function Ot(e) {
2002
+ function At(e) {
1770
2003
  let t = !1;
1771
2004
  return e.visit((e) => {
1772
2005
  let n = Y.get(e);
@@ -1776,12 +2009,12 @@ function Ot(e) {
1776
2009
  }
1777
2010
  }), t;
1778
2011
  }
1779
- function kt(e, t) {
2012
+ function jt(e, t) {
1780
2013
  let n = e, r = [];
1781
2014
  for (let i of t) {
1782
2015
  if (typeof i != "string" || !i.length) throw Error("Scope names must be non-empty strings.");
1783
2016
  let t, a = !1;
1784
- if ($(e, r, (e) => {
2017
+ if (Q(e, r, (e) => {
1785
2018
  let n = J.get(e);
1786
2019
  if (!(!n || n.name !== i) && X(e).length === r.length + 1) {
1787
2020
  if (t) return a = !0, G;
@@ -1793,25 +2026,25 @@ function kt(e, t) {
1793
2026
  }
1794
2027
  return n;
1795
2028
  }
1796
- function $(e, t, n, r = {}) {
2029
+ function Q(e, t, n, r = {}) {
1797
2030
  let i = r.includeNamedImportRoots ?? !1;
1798
2031
  e.visit((e) => {
1799
2032
  let r = J.get(e), a = Y.get(e);
1800
2033
  if (a === "excludeSubtree") return W;
1801
- if (a !== "exclude" && At(e, t, r, i)) return n(e);
2034
+ if (a !== "exclude" && Mt(e, t, r, i)) return n(e);
1802
2035
  });
1803
2036
  }
1804
- function At(e, t, n, r) {
2037
+ function Mt(e, t, n, r) {
1805
2038
  let i = X(e);
1806
- return jt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : Mt(t, i);
2039
+ return Nt(i, t) ? !0 : !r || !n || typeof n.name != "string" || i.length !== t.length + 1 ? !1 : $(t, i);
1807
2040
  }
1808
- function jt(e, t) {
1809
- return e.length === t.length && Mt(e, t);
2041
+ function Nt(e, t) {
2042
+ return e.length === t.length && $(e, t);
1810
2043
  }
1811
- function Mt(e, t) {
2044
+ function $(e, t) {
1812
2045
  if (e.length > t.length) return !1;
1813
2046
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
1814
2047
  return !0;
1815
2048
  }
1816
2049
  //#endregion
1817
- export { w as A, S as B, B as C, Be as D, I as E, A as F, b as G, xe as H, Te as I, Me as L, Oe as M, Ee as N, N as O, j as P, ke as R, U as S, F as T, ve as U, be as V, ye as W, W as _, dt as a, Je as b, lt as c, at as d, _t as f, mt as g, ht as h, X as i, T as j, Re as k, ct as l, bt as m, st as n, ut as o, gt as p, ft as r, pt as s, yt as t, it as u, G as v, He as w, H as x, Qe as y, De as z };
2050
+ export { E as A, w as B, Ue as C, Le as D, B as E, M as F, b as G, C as H, we as I, Me as L, De as M, Te as N, L as O, N as P, Oe as R, qe as S, z as T, ve as U, be as V, ye as W, W as _, ft as a, Ye as b, ut as c, ot as d, vt as f, ht as g, gt as h, X as i, D as j, Fe as k, lt as l, xt as m, ct as n, dt as o, _t as p, pt as r, mt as s, bt as t, at as u, G as v, ze as w, Ke as x, $e as y, Ee as z };