@genome-spy/app 0.86.0 → 0.87.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-BZ1JCo1N.js} +6994 -6499
  2. package/dist/agentApi.es.js +3057 -3225
  3. package/dist/agentShared.es.js +7 -7
  4. package/dist/{canvas2d-8uxuN_vx.js → canvas2d-B_PnIof-.js} +108 -107
  5. package/dist/{canvas2d-BtQC7Xr8.js → canvas2d-Cafq5v-N.js} +128 -127
  6. package/dist/{clipOptions-taFzEljc.js → clipOptions-D6eh9T-_.js} +1508 -1166
  7. package/dist/{clipOptions-BQfNhxgP.js → clipOptions-H68pJyEZ.js} +1496 -1114
  8. package/dist/{debug-D_VtWQ6l.js → debug-BGzgZmyk.js} +2 -2
  9. package/dist/{debug-Bzc3SoRg.js → debug-UYKZLNh4.js} +2 -2
  10. package/dist/index.es.js +96 -106
  11. package/dist/index.js +399 -392
  12. package/dist/{indexer-qy_dq5l5.js → indexer-Di57GyxX.js} +1 -1
  13. package/dist/{indexer-qiFctgR3.js → indexer-o6Hpg4nN.js} +1 -1
  14. package/dist/nativeText-D9SoxpaD.js +934 -0
  15. package/dist/nativeText-DAjvkrzc.js +934 -0
  16. package/dist/{rasterExport-B8pVoOsj.js → rasterExport-DzldLv6E.js} +1 -1
  17. package/dist/{rasterExport-C4r4xjQT.js → rasterExport-IAbJwi8F.js} +1 -1
  18. package/dist/{renderCanvas2D-BQrRWp2Z.js → renderCanvas2D-BJ93Ptqj.js} +102 -96
  19. package/dist/{renderCanvas2D-CHVNfIUz.js → renderCanvas2D-yJ1IrDcX.js} +103 -97
  20. package/dist/schema.json +10169 -2852
  21. package/dist/{svg-C-Sw6E6G.js → svg-BRpl2Xub.js} +338 -384
  22. package/dist/{svg-CKHwwKRt.js → svg-DJuqHIyc.js} +353 -399
  23. package/dist/{svgRasterizer-BgD72AmG.js → svgRasterizer-CGZQ5njV.js} +1 -1
  24. package/dist/{svgRasterizer-BgSNqI3L.js → svgRasterizer-PAoqLn1j.js} +1 -1
  25. package/dist/{vega-scale-D46-iCaL.js → vega-scale-BGC53c22.js} +887 -1184
  26. package/dist/{vega-scale-CK0_al6O.js → vega-scale-DdW2NzQ3.js} +898 -1195
  27. package/dist/{viewIdentityRegistry-CDtVktJD.js → viewIdentityRegistry-D4p067HU.js} +1 -1
  28. package/dist/{viewIdentityRegistry-B-VGlez1.js → viewIdentityRegistry-Dc2hXYsO.js} +1 -1
  29. package/dist/{viewSelectors-CKfxF_LM.js → viewSelectors-DNXnGwEW.js} +519 -321
  30. package/dist/{viewSelectors-D_imtq5Z.js → viewSelectors-DYYlOt91.js} +584 -386
  31. package/dist/{viewUtils-nCJ7AoaI.js → viewUtils-EdhZTPrJ.js} +2930 -2264
  32. package/dist/{webgl-BaA3jSa2.js → webgl-C53DwzVT.js} +427 -428
  33. package/dist/{webgl-FP-4EsBL.js → webgl-CdgNFlJk.js} +639 -640
  34. package/package.json +5 -5
  35. package/dist/nativeText-DFV5XIx8.js +0 -860
  36. package/dist/nativeText-vT3AWE14.js +0 -860
@@ -1,7 +1,7 @@
1
1
  import { n as e } from "./rolldown-runtime-DF993M8W.js";
2
- import { B as t, F as n, I as r, L as i, M as a, N as o, P as s, Q as c, X as l, Z as u, j as d, o as f, r as p, z as m } from "./viewUtils-nCJ7AoaI.js";
3
- import { C as h, i as g, m as _, o as v, t as y } from "./viewSelectors-CKfxF_LM.js";
4
- import { y as b } from "./vega-scale-CK0_al6O.js";
2
+ import { $ as t, F as n, H as r, I as i, L as a, N as o, P as s, Q as c, R as l, V as u, et as d, o as f, r as p, z as m } from "./viewUtils-EdhZTPrJ.js";
3
+ import { C as h, i as g, m as _, o as v, t as y } from "./viewSelectors-DNXnGwEW.js";
4
+ import { y as b } from "./vega-scale-DdW2NzQ3.js";
5
5
  import { n as x, t as S } from "./componentStyles-FsNmIb22.js";
6
6
  //#region src/viewScopeUtils.js
7
7
  function C(e, t) {
@@ -193,7 +193,7 @@ function ce({ viewSelector: e, field: t, selectionSelector: n, aggregation: r, f
193
193
  }
194
194
  };
195
195
  }
196
- var le = c({
196
+ var le = d({
197
197
  name: "paramProvenance",
198
198
  initialState: { entries: {} },
199
199
  reducers: {
@@ -4734,10 +4734,10 @@ function qn(e) {
4734
4734
  //#endregion
4735
4735
  //#region src/agentShared/index.js
4736
4736
  function Jn(e) {
4737
- if (e.startsWith("sampleView/")) return m.actions[e.slice(11)];
4737
+ if (e.startsWith("sampleView/")) return u.actions[e.slice(11)];
4738
4738
  if (e.startsWith("paramProvenance/")) return le.actions[e.slice(16)];
4739
- if (e.startsWith("viewSettings/")) return u.actions[e.slice(13)];
4739
+ if (e.startsWith("viewSettings/")) return t.actions[e.slice(13)];
4740
4740
  throw Error("Unsupported app actionType " + e + ".");
4741
4741
  }
4742
4742
  //#endregion
4743
- export { d as addValueColors, o as buildCategoricalCountsSummary, s as buildCategoricalFieldSummary, n as buildQuantitativeFieldSummary, ce as buildSelectionAggregationAttributeIdentifier, r as buildTopCategorySummary, se as createSelectionAggregationCandidateId, S as faStyles, x as formStyles, t as formatAggregationExpression, C as formatScopedParamName, Jn as getActionCreator, a as getConcreteColorScale, P as getContextMenuFieldInfos, D as isBaselineAction, l as makeViewSelectorKey, Kn as safeMarkdown, T as serializeBookmarkableParamValue, i as templateResultToString };
4743
+ export { o as addValueColors, n as buildCategoricalCountsSummary, i as buildCategoricalFieldSummary, a as buildQuantitativeFieldSummary, ce as buildSelectionAggregationAttributeIdentifier, l as buildTopCategorySummary, se as createSelectionAggregationCandidateId, S as faStyles, x as formStyles, r as formatAggregationExpression, C as formatScopedParamName, Jn as getActionCreator, s as getConcreteColorScale, P as getContextMenuFieldInfos, D as isBaselineAction, c as makeViewSelectorKey, Kn as safeMarkdown, T as serializeBookmarkableParamValue, m as templateResultToString };
@@ -1,16 +1,16 @@
1
- import { _ as e, at as t, o as n, s as r, u as i } from "./clipOptions-BQfNhxgP.js";
2
- import { v as a } from "./vega-scale-CK0_al6O.js";
1
+ import { _ as e, at as t, o as n, s as r, u as i } from "./clipOptions-D6eh9T-_.js";
2
+ import { v as a } from "./vega-scale-DdW2NzQ3.js";
3
3
  import { t as o } from "./rectangle-DKnrAmKs.js";
4
4
  import { t as s } from "./warning-CpIIpk8e.js";
5
5
  import { n as c, t as l } from "./layoutResult-D50MSHXR.js";
6
6
  import { n as u, r as d, t as f } from "./performanceProfiler-CPLEjApa.js";
7
- import { E as p, O as m, S as h, T as g, a as _, c as v, d as y, f as b, g as x, h as S, i as C, k as w, l as T, m as E, o as D, p as ee, s as te, v as ne, w as re, y as ie } from "./nativeText-DFV5XIx8.js";
8
- import { n as O, t as k } from "./renderCanvas2D-BQrRWp2Z.js";
9
- import { t as A } from "./canvasSizeHelper-7h_8rOcx.js";
10
- import { exportCanvas as j, exportRaster as M } from "./rasterExport-B8pVoOsj.js";
11
- import { createCanvas2DSvgRasterizer as N } from "./svgRasterizer-BgD72AmG.js";
7
+ import { D as p, M as m, O as h, S as g, T as _, _ as v, a as y, c as b, d as x, f as S, g as C, i as w, j as T, k as E, l as D, m as O, o as ee, p as te, s as ne, v as re, x as ie, y as k } from "./nativeText-D9SoxpaD.js";
8
+ import { n as A, t as j } from "./renderCanvas2D-yJ1IrDcX.js";
9
+ import { t as M } from "./canvasSizeHelper-7h_8rOcx.js";
10
+ import { exportCanvas as N, exportRaster as P } from "./rasterExport-DzldLv6E.js";
11
+ import { createCanvas2DSvgRasterizer as F } from "./svgRasterizer-CGZQ5njV.js";
12
12
  //#region ../core/src/rendering/canvas2d/picking/softwarePickingRasterizer.js
13
- var P = 12, F = .5, I = class {
13
+ var I = 12, L = .5, R = class {
14
14
  #e = [];
15
15
  #t = [];
16
16
  #n = [
@@ -50,7 +50,7 @@ var P = 12, F = .5, I = class {
50
50
  }
51
51
  setClip(e, t, n, r) {
52
52
  if (!Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r)) throw RangeError("Software picking clip must be finite.");
53
- this.#r = B(Math.floor(Math.min(e, n)), 0, this.buffer.width), this.#i = B(Math.floor(Math.min(t, r)), 0, this.buffer.height), this.#a = B(Math.ceil(Math.max(e, n)), this.#r, this.buffer.width), this.#o = B(Math.ceil(Math.max(t, r)), this.#i, this.buffer.height);
53
+ this.#r = H(Math.floor(Math.min(e, n)), 0, this.buffer.width), this.#i = H(Math.floor(Math.min(t, r)), 0, this.buffer.height), this.#a = H(Math.ceil(Math.max(e, n)), this.#r, this.buffer.width), this.#o = H(Math.ceil(Math.max(t, r)), this.#i, this.buffer.height);
54
54
  }
55
55
  fillRect(e, t, n, r, i) {
56
56
  this.#s++, this.#p(e, t, n, r, i);
@@ -91,33 +91,33 @@ var P = 12, F = .5, I = class {
91
91
  let s = t.length - 2;
92
92
  for (let n = 0; n < t.length; n += 2) this.strokeSegment(e, t[s], t[s + 1], t[n], t[n + 1], 1), s = n;
93
93
  }
94
- strokeSegment(e, t, n, r, i, a) {
94
+ strokeSegment(e, t, n, r, i, a, o) {
95
95
  if (!(a > 0) || !Number.isFinite(a)) return;
96
96
  this.#u++;
97
- let o = a / 2, s = this.#n;
98
- if (!L(t, n, r, i, this.#r - o, this.#i - o, this.#a + o, this.#o + o, s)) return;
99
- let c = s[2] - s[0], l = s[3] - s[1], u = Math.ceil(Math.max(Math.abs(c), Math.abs(l)));
100
- if (u == 0) {
101
- this.#h(e, s[0], s[1], o);
97
+ let s = a / 2, c = this.#n;
98
+ if (!z(t, n, r, i, this.#r - s, this.#i - s, this.#a + s, this.#o + s, c)) return;
99
+ let l = c[2] - c[0], u = c[3] - c[1], d = Math.ceil(Math.max(Math.abs(l), Math.abs(u)));
100
+ if (d == 0) {
101
+ this.#h(e, c[0], c[1], s, o);
102
102
  return;
103
103
  }
104
- for (let t = 0; t <= u; t++) {
105
- let n = t / u;
106
- this.#h(e, s[0] + c * n, s[1] + l * n, o);
104
+ for (let t = 0; t <= d; t++) {
105
+ let n = t / d;
106
+ this.#h(e, c[0] + l * n, c[1] + u * n, s, o);
107
107
  }
108
108
  }
109
- strokeCubic(e, t, n, r, i, a, o, s, c, l, u = F) {
109
+ strokeCubic(e, t, n, r, i, a, o, s, c, l, u = L, d) {
110
110
  if (!(l > 0) || !Number.isFinite(l) || !(u > 0) || !Number.isFinite(u) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(s) || !Number.isFinite(c)) return;
111
111
  this.#d++;
112
- let d = this.#e;
113
- for (d.length = 0, d.push(t, n, r, i, a, o, s, c, 0); d.length;) {
114
- let t = d.pop(), n = d.pop(), r = d.pop(), i = d.pop(), a = d.pop(), o = d.pop(), s = d.pop(), c = d.pop(), f = d.pop();
115
- if (t >= P || R(f, c, s, o, a, i, r, n, u)) {
116
- this.strokeSegment(e, f, c, r, n, l);
112
+ let f = this.#e;
113
+ for (f.length = 0, f.push(t, n, r, i, a, o, s, c, 0); f.length;) {
114
+ let t = f.pop(), n = f.pop(), r = f.pop(), i = f.pop(), a = f.pop(), o = f.pop(), s = f.pop(), c = f.pop(), p = f.pop();
115
+ if (t >= I || B(p, c, s, o, a, i, r, n, u)) {
116
+ this.strokeSegment(e, p, c, r, n, l, d);
117
117
  continue;
118
118
  }
119
- let p = (f + s) / 2, m = (c + o) / 2, h = (s + a) / 2, g = (o + i) / 2, _ = (a + r) / 2, v = (i + n) / 2, y = (p + h) / 2, b = (m + g) / 2, x = (h + _) / 2, S = (g + v) / 2, C = (y + x) / 2, w = (b + S) / 2, T = t + 1;
120
- d.push(C, w, x, S, _, v, r, n, T, f, c, p, m, y, b, C, w, T);
119
+ let m = (p + s) / 2, h = (c + o) / 2, g = (s + a) / 2, _ = (o + i) / 2, v = (a + r) / 2, y = (i + n) / 2, b = (m + g) / 2, x = (h + _) / 2, S = (g + v) / 2, C = (_ + y) / 2, w = (b + S) / 2, T = (x + C) / 2, E = t + 1;
120
+ f.push(w, T, S, C, v, y, r, n, E, p, c, m, h, b, x, w, T, E);
121
121
  }
122
122
  }
123
123
  #m(e, t, n, r) {
@@ -125,19 +125,20 @@ var P = 12, F = .5, I = class {
125
125
  let i = t * this.buffer.width;
126
126
  this.buffer.ids.fill(e >>> 0, i + n, i + r);
127
127
  }
128
- #h(e, t, n, r) {
129
- let i = Math.max(this.#r, Math.floor(t - r)), a = Math.max(this.#i, Math.floor(n - r)), o = Math.min(this.#a, Math.ceil(t + r)), s = Math.min(this.#o, Math.ceil(n + r));
130
- if (i >= o || a >= s) return;
131
- let c = e >>> 0, l = this.buffer.ids, u = this.buffer.width, d = o - i;
132
- for (let e = a; e < s; e++) {
128
+ #h(e, t, n, r, i) {
129
+ let a = Math.max(this.#r, Math.floor(t - r)), o = Math.max(this.#i, Math.floor(n - r)), s = Math.min(this.#a, Math.ceil(t + r)), c = Math.min(this.#o, Math.ceil(n + r));
130
+ if (a >= s || o >= c) return;
131
+ let l = e >>> 0, u = this.buffer.ids, d = this.buffer.width, f = s - a;
132
+ for (let e = o; e < c; e++) {
133
133
  this.#f++;
134
- let t = e * u + i, n = t + d;
135
- if (d > 16) l.fill(c, t, n);
136
- else for (let e = t; e < n; e++) l[e] = c;
134
+ let t = e * d + a, n = t + f;
135
+ if (i) for (let t = a; t < s; t++) i(t + .5, e + .5) && (u[e * d + t] = l);
136
+ else if (f > 16) u.fill(l, t, n);
137
+ else for (let e = t; e < n; e++) u[e] = l;
137
138
  }
138
139
  }
139
140
  };
140
- function L(e, t, n, r, i, a, o, s, c) {
141
+ function z(e, t, n, r, i, a, o, s, c) {
141
142
  if (!Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r)) return !1;
142
143
  let l = n - e, u = r - t, d = 0, f = 1;
143
144
  if (l == 0) {
@@ -154,81 +155,81 @@ function L(e, t, n, r, i, a, o, s, c) {
154
155
  }
155
156
  return d > f ? !1 : (c[0] = e + d * l, c[1] = t + d * u, c[2] = e + f * l, c[3] = t + f * u, !0);
156
157
  }
157
- function R(e, t, n, r, i, a, o, s, c) {
158
+ function B(e, t, n, r, i, a, o, s, c) {
158
159
  let l = o - e, u = s - t, d = l * l + u * u, f = c * c;
159
160
  if (d == 0) {
160
- let o = z(e, t, n, r), s = z(e, t, i, a);
161
+ let o = V(e, t, n, r), s = V(e, t, i, a);
161
162
  return Math.max(o, s) <= f;
162
163
  }
163
164
  let p = u * (n - e) - l * (r - t), m = u * (i - e) - l * (a - t);
164
165
  return Math.max(p * p, m * m) <= f * d;
165
166
  }
166
- function z(e, t, n, r) {
167
+ function V(e, t, n, r) {
167
168
  let i = n - e, a = r - t;
168
169
  return i * i + a * a;
169
170
  }
170
- function B(e, t, n) {
171
+ function H(e, t, n) {
171
172
  return Math.max(t, Math.min(n, e));
172
173
  }
173
174
  //#endregion
174
175
  //#region ../core/src/rendering/canvas2d/picking/renderers/index.js
175
- var V = 1;
176
- function H(e, t) {
176
+ var U = 1;
177
+ function W(e, t) {
177
178
  let n = e.getType();
178
- return n == "arrow" ? ae(e, t) : n == "rect" ? W(e, t) : n == "point" ? G(e, t) : n == "rule" || n == "tick" ? K(e, t) : n == "link" ? q(e, t) : n == "text" ? J(e, t) : 0;
179
+ return n == "arrow" ? K(e, t) : n == "rect" ? q(e, t) : n == "point" ? J(e, t) : n == "rule" || n == "tick" ? ae(e, t) : n == "link" ? oe(e, t) : n == "text" ? se(e, t) : 0;
179
180
  }
180
- function U(e) {
181
+ function G(e) {
181
182
  let t = e.getType();
182
183
  return t == "rect" || t == "arrow" || t == "point" || t == "rule" || t == "tick" || t == "link" || t == "text";
183
184
  }
184
- function ae(e, t) {
185
- let n = e, r = S(n), i = Array(8).fill(0);
186
- return ne(n, r, t, (e) => {
185
+ function K(e, t) {
186
+ let n = e, r = re(n), i = Array(8).fill(0);
187
+ return ie(n, r, t, (e) => {
187
188
  let a = Y(n, e.datum), o = e.strokeWidth / 2;
188
- r.stem && t.rasterizer.strokeSegment(a, e.tail.x, e.tail.y, e.tip.x, e.tip.y, e.stemHalfWidth * 2 + e.strokeWidth), x(e, (n, r) => {
189
+ r.stem && t.rasterizer.strokeSegment(a, e.tail.x, e.tail.y, e.tip.x, e.tip.y, e.stemHalfWidth * 2 + e.strokeWidth), k(e, (n, r) => {
189
190
  let s = e.headHalfWidth + o, c = n + e.tangent.x * o, l = r + e.tangent.y * o, u = e.headRepeatFootprint + o, d = n - e.tangent.x * u, f = r - e.tangent.y * u;
190
- oe(i, c, l, d, f, e.normal.x, e.normal.y, s), t.rasterizer.fillConvexPolygon(a, i);
191
+ ce(i, c, l, d, f, e.normal.x, e.normal.y, s), t.rasterizer.fillConvexPolygon(a, i);
191
192
  });
192
193
  });
193
194
  }
194
- function W(e, t) {
195
+ function q(e, t) {
195
196
  let n = e;
196
- return T(n, v(n), t, (e) => t.rasterizer.fillRect(Y(n, e.datum), e.x, e.y, e.width, e.height));
197
+ return D(n, b(n), t, (e) => t.rasterizer.fillRect(Y(n, e.datum), e.x, e.y, e.width, e.height));
197
198
  }
198
- function G(e, t) {
199
- let n = e, r = h(n, n.properties.minPickingSize);
200
- return b(n, y(n), t, (e) => t.rasterizer.fillSquare(Y(n, e.datum), e.x, e.y, Math.max(e.boundsRadius, r / 2)));
199
+ function J(e, t) {
200
+ let n = e, r = _(n, n.properties.minPickingSize);
201
+ return S(n, x(n), t, (e) => t.rasterizer.fillSquare(Y(n, e.datum), e.x, e.y, Math.max(e.boundsRadius, r / 2)));
201
202
  }
202
- function K(e, t) {
203
+ function ae(e, t) {
203
204
  let n = e;
204
- return te(n, D(n), t, (e) => t.rasterizer.strokeSegment(Y(n, e.datum), e.x1, e.y1, e.x2, e.y2, Math.max(e.strokeWidth, V)));
205
+ return ne(n, ee(n), t, (e) => t.rasterizer.strokeSegment(Y(n, e.datum), e.x1, e.y1, e.x2, e.y2, Math.max(e.strokeWidth, U)));
205
206
  }
206
- function q(e, t) {
207
- let n = e, r = h(n, n.properties.minPickingSize);
208
- return E(n, ee(n), t, (e) => {
209
- let [i, a, o, s] = e.points;
210
- t.rasterizer.strokeCubic(Y(n, e.datum), i[0], i[1], a[0], a[1], o[0], o[1], s[0], s[1], Math.max(e.strokeWidth, r));
207
+ function oe(e, t) {
208
+ let n = e, r = _(n, n.properties.minPickingSize), i = te(n), a = C(n, i.shape);
209
+ return O(n, i, t, (e) => {
210
+ let [i, o, s, c] = e.points, l = a(e.datum), u = l && v(i, c, l);
211
+ t.rasterizer.strokeCubic(Y(n, e.datum), i[0], i[1], o[0], o[1], s[0], s[1], c[0], c[1], Math.max(e.strokeWidth, r), void 0, u ? (e, t) => Math.abs(u.normalX * e + u.normalY * t - u.offset) < u.end : void 0);
211
212
  });
212
213
  }
213
- function J(e, t) {
214
+ function se(e, t) {
214
215
  let n = e;
215
- return _(n, C(n), t, (e) => t.rasterizer.fillConvexPolygon(Y(n, e.datum), e.boundsQuad));
216
+ return y(n, w(n), t, (e) => t.rasterizer.fillConvexPolygon(Y(n, e.datum), e.boundsQuad));
216
217
  }
217
- function oe(e, t, n, r, i, a, o, s) {
218
+ function ce(e, t, n, r, i, a, o, s) {
218
219
  let c = a * s, l = o * s;
219
220
  e[0] = t + c, e[1] = n + l, e[2] = r + c, e[3] = i + l, e[4] = r - c, e[5] = i - l, e[6] = t - c, e[7] = n - l;
220
221
  }
221
222
  function Y(e, t) {
222
223
  let n = e.encoders;
223
- return ie(n.uniqueId, t);
224
+ return g(n.uniqueId, t);
224
225
  }
225
226
  //#endregion
226
227
  //#region ../core/src/rendering/canvas2d/picking/softwarePickingViewRenderingContext.js
227
- var se = class extends c {
228
+ var le = class extends c {
228
229
  #e = [];
229
230
  #t = /* @__PURE__ */ new Set();
230
231
  #n;
231
- #r = new m();
232
+ #r = new T();
232
233
  #i;
233
234
  #a = [0, 0];
234
235
  constructor(e) {
@@ -247,23 +248,23 @@ var se = class extends c {
247
248
  if (this.#e.pop()?.view !== e) throw Error("Unbalanced software picking view rendering context stack.");
248
249
  }
249
250
  renderMark(e, t) {
250
- if (!e.isPickingParticipant() || !U(e)) return;
251
+ if (!e.isPickingParticipant() || !G(e)) return;
251
252
  let i = t.sampleFacetRenderingOptions;
252
- if (i && !e.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !O(i))) {
253
+ if (i && !e.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !A(i))) {
253
254
  this.#n?.addCount("canvasCulledSampleFacetOccurrences");
254
255
  return;
255
256
  }
256
257
  let a = e.unitView.getEffectiveOpacity();
257
258
  if (a <= 0) return;
258
- let o = this.currentCoords, c = n(t), l = r(c, e.properties.clip, o), u = g(this.width, this.height, l);
259
- if (!p(u)) return;
260
- let d = re(o, c, e.properties.cullByVisibleRange), f = this.#i?.prepare(e) ?? !1;
261
- w(e, t, o, this.#r, (t, n) => {
259
+ let o = this.currentCoords, c = n(t), l = r(c, e.properties.clip, o), u = h(this.width, this.height, l);
260
+ if (!E(u)) return;
261
+ let d = p(o, c, e.properties.cullByVisibleRange), f = this.#i?.prepare(e) ?? !1;
262
+ m(e, t, o, this.#r, (t, n) => {
262
263
  if (n.length == 0) return;
263
264
  let r = 0, i = n.length;
264
265
  if (f && this.#i.query(n, this.#a) && (r = this.#a[0], i = this.#a[1], r === i)) return;
265
266
  let o = this.getRasterizer();
266
- o.setClip(u.x1, u.y1, u.x2, u.y2), H(e, {
267
+ o.setClip(u.x1, u.y1, u.x2, u.y2), W(e, {
267
268
  rasterizer: o,
268
269
  coords: t,
269
270
  data: n,
@@ -280,11 +281,11 @@ var se = class extends c {
280
281
  if (!e) throw Error("No current view in software picking rendering context.");
281
282
  return e.coords;
282
283
  }
283
- }, X = 2 ** 31 - 1, ce = -(2 ** 31);
284
- function le(e, n, r, i = r) {
284
+ }, X = 2 ** 31 - 1, ue = -(2 ** 31);
285
+ function de(e, n, r, i = r) {
285
286
  let a = Array(e);
286
287
  a.fill(X);
287
- let o = ce, s = -Infinity, c = !1, l = Array(e);
288
+ let o = ue, s = -Infinity, c = !1, l = Array(e);
288
289
  l.fill(0);
289
290
  let u = n[0], d = (n[1] - n[0]) / e, f = (n, r) => {
290
291
  let i = (n - u) / d, a = Math.floor(i);
@@ -342,12 +343,12 @@ function le(e, n, r, i = r) {
342
343
  }
343
344
  //#endregion
344
345
  //#region ../core/src/rendering/xIndex/markXIndex.js
345
- function ue(e, t, n = 0) {
346
+ function fe(e, t, n = 0) {
346
347
  if (!t.length) return;
347
- let r = le(Math.min(256, Math.ceil(Math.sqrt(t.length))), e.indexDomain, e.xAccessor, e.x2Accessor);
348
+ let r = de(Math.min(256, Math.ceil(Math.sqrt(t.length))), e.indexDomain, e.xAccessor, e.x2Accessor);
348
349
  return t.forEach((e, t) => r(e, n + t, n + t + 1)), r.getIndex();
349
350
  }
350
- function de(t) {
351
+ function pe(t) {
351
352
  let n = t.encoders?.x, r = t.encoders?.x2;
352
353
  if (!n?.channelDef || !("buildIndex" in n.channelDef) || !n.channelDef.buildIndex || !n.scale || !a(n.scale.type) && !["index", "locus"].includes(n.scale.type) || n.branches.length !== 1) return;
353
354
  let i = t.getType();
@@ -365,7 +366,7 @@ function de(t) {
365
366
  domainStartOffset: ["index", "locus"].includes(n.scale.type) ? -1 : 0
366
367
  };
367
368
  }
368
- function fe(e, t) {
369
+ function me(e, t) {
369
370
  let n = e.scaleResolution.getScale().domain();
370
371
  if (n.length !== 2 || !Number.isFinite(n[0]) || !Number.isFinite(n[1]) || n[1] <= n[0]) return !1;
371
372
  let r = n[1] - n[0];
@@ -373,7 +374,7 @@ function fe(e, t) {
373
374
  }
374
375
  //#endregion
375
376
  //#region ../core/src/rendering/canvas2d/canvasXIndexManager.js
376
- var pe = class {
377
+ var he = class {
377
378
  #e = /* @__PURE__ */ new WeakMap();
378
379
  #t = [0, 0];
379
380
  #n;
@@ -381,7 +382,7 @@ var pe = class {
381
382
  if (this.#n = void 0, e.encoders.facetIndex) return this.#r();
382
383
  let t = e.unitView.getCollector(), n = e.unitView.getScaleResolution("x"), r = n?.zoomExtent, i = this.#e.get(e);
383
384
  if (!i || i.collector !== t || i.dataRevision !== t.dataRevision || i.xEncoder !== e.encoders.x || i.x2Encoder !== e.encoders.x2 || i.xScaleResolution !== n || i.xIndexDomainStart !== r?.[0] || i.xIndexDomainEnd !== r?.[1]) {
384
- let a = de(e);
385
+ let a = pe(e);
385
386
  i = {
386
387
  collector: t,
387
388
  dataRevision: t.dataRevision,
@@ -395,21 +396,21 @@ var pe = class {
395
396
  }, this.#e.set(e, i);
396
397
  }
397
398
  let a = i.spec;
398
- return !a || !fe(a, this.#t) ? this.#r() : (this.#n = i, !0);
399
+ return !a || !me(a, this.#t) ? this.#r() : (this.#n = i, !0);
399
400
  }
400
401
  query(e, t) {
401
402
  let n = this.#n;
402
403
  if (!n?.spec) throw Error("Canvas x-index query was not prepared.");
403
404
  f("canvasXIndexNativeItems", e.length);
404
405
  let r = n.batches.get(e);
405
- return r === void 0 && (r = ue(n.spec, e) ?? null, n.batches.set(e, r), f("canvasXIndexBuilds"), r || f("canvasXIndexRejectedBuilds")), r ? (r(this.#t[0], this.#t[1], t), f("canvasXIndexQueries"), f("canvasXIndexCandidateItems", t[1] - t[0]), t[0] === t[1] && f("canvasXIndexEmptyRanges"), !0) : this.#r();
406
+ return r === void 0 && (r = fe(n.spec, e) ?? null, n.batches.set(e, r), f("canvasXIndexBuilds"), r || f("canvasXIndexRejectedBuilds")), r ? (r(this.#t[0], this.#t[1], t), f("canvasXIndexQueries"), f("canvasXIndexCandidateItems", t[1] - t[0]), t[0] === t[1] && f("canvasXIndexEmptyRanges"), !0) : this.#r();
406
407
  }
407
408
  #r() {
408
409
  return f("canvasXIndexFallbackQueries"), !1;
409
410
  }
410
- }, me = class {
411
+ }, Z = class {
411
412
  constructor(e) {
412
- this.viewRoot = e.viewRoot, this.context = e.context, this.surface = e.surface, this.getBackground = e.getBackground, this.broadcast = e.broadcast, this.onLayoutComputed = e.onLayoutComputed, this.layoutResult = void 0, this.pickingRasterizer = void 0, this.dirtyPickingBuffer = !0, this.xIndexManager = new pe(), this.opacityLayers = [];
413
+ this.viewRoot = e.viewRoot, this.context = e.context, this.surface = e.surface, this.getBackground = e.getBackground, this.broadcast = e.broadcast, this.onLayoutComputed = e.onLayoutComputed, this.layoutResult = void 0, this.pickingRasterizer = void 0, this.dirtyPickingBuffer = !0, this.xIndexManager = new he(), this.opacityLayers = [];
413
414
  }
414
415
  computeLayout() {
415
416
  this.broadcast("layout"), this.surface.invalidateSize();
@@ -432,7 +433,7 @@ var pe = class {
432
433
  let n = u();
433
434
  n?.beginFrame("canvas");
434
435
  try {
435
- d("render", () => k({
436
+ d("render", () => j({
436
437
  layoutResult: e,
437
438
  context: this.context,
438
439
  width: t.width,
@@ -453,16 +454,16 @@ var pe = class {
453
454
  let t = this.surface.getLogicalCanvasSize();
454
455
  if (isNaN(t.width) || isNaN(t.height)) return;
455
456
  this.surface.clearPickingBuffer();
456
- let n = this.pickingRasterizer, r = !1, i = new se({
457
+ let n = this.pickingRasterizer, r = !1, i = new le({
457
458
  width: t.width,
458
459
  height: t.height,
459
460
  devicePixelRatio: this.surface.getDevicePixelRatio(),
460
- getRasterizer: () => (n || (n = new I(this.surface.getPickingBuffer()), this.pickingRasterizer = n), r ||= (n.resetClip(), n.resetStatistics(), !0), n),
461
+ getRasterizer: () => (n || (n = new R(this.surface.getPickingBuffer()), this.pickingRasterizer = n), r ||= (n.resetClip(), n.resetStatistics(), !0), n),
461
462
  xIndexManager: this.xIndexManager
462
463
  }), a = u();
463
464
  a?.beginFrame("canvas", "picking");
464
465
  try {
465
- d("picking", () => e.collectRenderCommands(i)), this.dirtyPickingBuffer = !1, r && he(n, a);
466
+ d("picking", () => e.collectRenderCommands(i)), this.dirtyPickingBuffer = !1, r && ge(n, a);
466
467
  } finally {
467
468
  a?.endFrame();
468
469
  }
@@ -478,15 +479,15 @@ var pe = class {
478
479
  });
479
480
  }
480
481
  };
481
- function he(e, t) {
482
+ function ge(e, t) {
482
483
  if (!t) return;
483
484
  let n = e.getStatistics();
484
485
  t.addCount("pickingRectangles", n.rectangles), t.addCount("pickingSquares", n.squares), t.addCount("pickingPolygons", n.polygons), t.addCount("pickingSegments", n.segments), t.addCount("pickingCubics", n.cubics), t.addCount("pickingSpans", n.spans);
485
486
  }
486
487
  //#endregion
487
488
  //#region ../core/src/rendering/canvas2d/picking/softwarePickingBuffer.js
488
- var Z = /* @__PURE__ */ new Uint32Array(), ge = class {
489
- #e = Z;
489
+ var Q = /* @__PURE__ */ new Uint32Array(), _e = class {
490
+ #e = Q;
490
491
  width = 0;
491
492
  height = 0;
492
493
  constructor(e = 0, t = 0) {
@@ -496,11 +497,11 @@ var Z = /* @__PURE__ */ new Uint32Array(), ge = class {
496
497
  return this.#e;
497
498
  }
498
499
  resize(e, t) {
499
- let n = Q(e, "width"), r = Q(t, "height");
500
+ let n = $(e, "width"), r = $(t, "height");
500
501
  if (n == this.width && r == this.height) return !1;
501
502
  let i = n * r;
502
503
  if (!Number.isSafeInteger(i)) throw RangeError("Software picking buffer is too large.");
503
- return this.width = n, this.height = r, this.#e = i ? new Uint32Array(i) : Z, !0;
504
+ return this.width = n, this.height = r, this.#e = i ? new Uint32Array(i) : Q, !0;
504
505
  }
505
506
  clear() {
506
507
  this.#e.fill(0);
@@ -511,16 +512,16 @@ var Z = /* @__PURE__ */ new Uint32Array(), ge = class {
511
512
  return n < 0 || r < 0 || n >= this.width || r >= this.height ? 0 : this.#e[r * this.width + n];
512
513
  }
513
514
  dispose() {
514
- this.width = 0, this.height = 0, this.#e = Z;
515
+ this.width = 0, this.height = 0, this.#e = Q;
515
516
  }
516
517
  };
517
- function Q(e, t) {
518
+ function $(e, t) {
518
519
  if (!Number.isFinite(e) || e < 0) throw RangeError(`Software picking buffer ${t} must be a finite nonnegative number.`);
519
520
  return Math.floor(e);
520
521
  }
521
522
  //#endregion
522
523
  //#region ../core/src/rendering/canvas2d/canvas2DSurface.js
523
- var $ = class {
524
+ var ve = class {
524
525
  #e;
525
526
  #t;
526
527
  #n;
@@ -530,7 +531,7 @@ var $ = class {
530
531
  if (!n) throw Error("Unable to initialize a Canvas2D rendering context.");
531
532
  this.canvas = t, this.context = n, e.container.appendChild(t);
532
533
  try {
533
- this.#e = new A(e.container, t, e.sizeSource, () => {
534
+ this.#e = new M(e.container, t, e.sizeSource, () => {
534
535
  this.#i() && e.onCanvasResize();
535
536
  }), this.#i();
536
537
  } catch (e) {
@@ -558,7 +559,7 @@ var $ = class {
558
559
  getPickingBuffer() {
559
560
  if (this.#r) throw Error("Canvas2D surface has been finalized.");
560
561
  let e = this.getLogicalCanvasSize();
561
- return this.#n ??= new ge(e.width, e.height), this.#n;
562
+ return this.#n ??= new _e(e.width, e.height), this.#n;
562
563
  }
563
564
  clearPickingBuffer() {
564
565
  this.#n?.clear();
@@ -592,28 +593,28 @@ var $ = class {
592
593
  };
593
594
  //#endregion
594
595
  //#region ../core/src/rendering/canvas2d/index.js
595
- function _e(e) {
596
- let t = new $(e);
596
+ function ye(e) {
597
+ let t = new ve(e);
597
598
  return {
598
599
  surface: t,
599
- createRenderCoordinator: (e) => new me({
600
+ createRenderCoordinator: (e) => new Z({
600
601
  ...e,
601
602
  surface: t,
602
603
  context: t.context
603
604
  }),
604
- exportCanvas: (e) => j({
605
+ exportCanvas: (e) => N({
605
606
  ...e,
606
607
  liveSize: t.getLogicalCanvasSize(),
607
608
  liveDevicePixelRatio: t.getDevicePixelRatio()
608
609
  }),
609
- exportRaster: (e) => M({
610
+ exportRaster: (e) => P({
610
611
  ...e,
611
612
  liveSize: t.getLogicalCanvasSize(),
612
613
  liveDevicePixelRatio: t.getDevicePixelRatio()
613
614
  }),
614
- rasterizeSvgRuns: (e) => N()(e),
615
+ rasterizeSvgRuns: (e) => F()(e),
615
616
  readPickingId: (e, n) => t.readPickingId(e, n)
616
617
  };
617
618
  }
618
619
  //#endregion
619
- export { _e as createCanvas2DRenderingBackend };
620
+ export { ye as createCanvas2DRenderingBackend };