@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,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-BrJLIj2o.js";
3
+ import { C as h, i as g, m as _, o as v, t as y } from "./viewSelectors-CymbZyE6.js";
4
+ import { y as b } from "./vega-scale-DLKCwWRs.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 { Jt as e, K as t, o as n, s as r, z as i } from "./clipOptions-taFzEljc.js";
2
- import { v as a } from "./vega-scale-D46-iCaL.js";
3
- import { t as o } from "./rectangle-DKnrAmKs.js";
4
- import { t as s } from "./warning-CpIIpk8e.js";
5
- import { n as c, r as l, t as u } from "./performanceProfiler-CPLEjApa.js";
6
- import { n as d, t as f } from "./layoutResult-D50MSHXR.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-vT3AWE14.js";
8
- import { n as O, t as k } from "./renderCanvas2D-CHVNfIUz.js";
9
- import { t as A } from "./canvasSizeHelper-7h_8rOcx.js";
10
- import { exportCanvas as j, exportRaster as M } from "./rasterExport-C4r4xjQT.js";
11
- import { createCanvas2DSvgRasterizer as N } from "./svgRasterizer-BgSNqI3L.js";
1
+ import { o as e, s as t, u as n, ut as r, v as i } from "./clipOptions-DTMcB_9z.js";
2
+ import { v as a } from "./vega-scale-DLKCwWRs.js";
3
+ import { t as o } from "./warning-CpIIpk8e.js";
4
+ import { t as s } from "./rectangle-DKnrAmKs.js";
5
+ import { n as c, t as l } from "./layoutResult-D50MSHXR.js";
6
+ import { n as u, r as d, t as f } from "./performanceProfiler-CPLEjApa.js";
7
+ import { A as p, C as m, E as h, M as g, N as _, O as v, S as y, _ as b, a as x, b as S, c as C, f as w, h as T, k as E, l as D, m as O, o as ee, p as te, s as ne, u as re, v as ie, y as k } from "./order-DvY7KNcu.js";
8
+ import { n as A, t as j } from "./renderCanvas2D-DtcJjqpB.js";
9
+ import { t as M } from "./canvasSizeHelper-7h_8rOcx.js";
10
+ import { exportCanvas as N, exportRaster as P } from "./rasterExport-BgZ98e6U.js";
11
+ import { createCanvas2DSvgRasterizer as F } from "./svgRasterizer-f7DJ3UO0.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,85 +155,85 @@ 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 = k(n), i = Array(8).fill(0);
187
+ return y(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), S(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 re(n, D(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
+ function J(e, t) {
199
200
  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)));
201
+ return te(n, w(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 C(n, ne(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 = h(n, n.properties.minPickingSize), i = O(n), a = ie(n, i.shape);
209
+ return T(n, i, t, (e) => {
210
+ let [i, o, s, c] = e.points, l = a && b(i, c, a);
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, l ? (e, t) => Math.abs(l.normalX * e + l.normalY * t - l.offset) < l.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 ee(n, x(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 m(n.uniqueId, t);
224
225
  }
225
226
  //#endregion
226
227
  //#region ../core/src/rendering/canvas2d/picking/softwarePickingViewRenderingContext.js
227
- var se = class extends d {
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 g();
232
233
  #i;
233
234
  #a = [0, 0];
234
235
  constructor(e) {
235
- super({ picking: !0 }), this.width = e.width, this.height = e.height, this.devicePixelRatio = e.devicePixelRatio, this.getRasterizer = e.getRasterizer, this.#n = c(), this.#i = e.xIndexManager;
236
+ super({ picking: !0 }), this.width = e.width, this.height = e.height, this.devicePixelRatio = e.devicePixelRatio, this.getRasterizer = e.getRasterizer, this.#n = u(), this.#i = e.xIndexManager;
236
237
  }
237
238
  getDevicePixelRatio() {
238
239
  return this.devicePixelRatio;
@@ -246,49 +247,49 @@ var se = class extends d {
246
247
  popView(e) {
247
248
  if (this.#e.pop()?.view !== e) throw Error("Unbalanced software picking view rendering context stack.");
248
249
  }
249
- renderMark(e, t) {
250
- if (!e.isPickingParticipant() || !U(e)) return;
251
- let i = t.sampleFacetRenderingOptions;
252
- if (i && !e.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !O(i))) {
250
+ renderMark(n, r) {
251
+ if (!n.isPickingParticipant() || !G(n)) return;
252
+ let i = r.sampleFacetRenderingOptions;
253
+ if (i && !n.encoders.facetIndex && (this.#n?.addCount("canvasSampleFacetOccurrences"), !A(i))) {
253
254
  this.#n?.addCount("canvasCulledSampleFacetOccurrences");
254
255
  return;
255
256
  }
256
- let a = e.unitView.getEffectiveOpacity();
257
+ let a = n.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
+ let s = this.currentCoords, c = e(r), l = t(c, n.properties.clip, s), u = E(this.width, this.height, l);
259
260
  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) => {
262
- if (n.length == 0) return;
263
- let r = 0, i = n.length;
264
- if (f && this.#i.query(n, this.#a) && (r = this.#a[0], i = this.#a[1], r === i)) return;
261
+ let d = v(s, c, n.properties.cullByVisibleRange), f = this.#i?.prepare(n) ?? !1;
262
+ _(n, r, s, this.#r, (e, t) => {
263
+ if (t.length == 0) return;
264
+ let r = 0, i = t.length;
265
+ if (f && this.#i.query(t, 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(n, {
267
268
  rasterizer: o,
268
- coords: t,
269
- data: n,
269
+ coords: e,
270
+ data: t,
270
271
  start: r,
271
272
  end: i,
272
273
  visibleBounds: u,
273
274
  anchorCullBounds: d,
274
275
  viewOpacity: a
275
276
  });
276
- }, (t) => s(`Canvas2D picking could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
277
+ }, (e) => o(`Canvas2D picking could not resolve sample facet index ${e}. View: ${n.unitView.getPathString()}`));
277
278
  }
278
279
  get currentCoords() {
279
- let t = e(this.#e);
280
- if (!t) throw Error("No current view in software picking rendering context.");
281
- return t.coords;
280
+ let e = n(this.#e);
281
+ if (!e) throw Error("No current view in software picking rendering context.");
282
+ return e.coords;
282
283
  }
283
- }, X = 2 ** 31 - 1, ce = -(2 ** 31);
284
- function le(e, t, n, r = n) {
284
+ }, X = 2 ** 31 - 1, ue = -(2 ** 31);
285
+ function de(e, t, n, i = n) {
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 = t[0], d = (t[1] - t[0]) / e, f = (t, n) => {
290
- let r = (t - u) / d, a = Math.floor(r);
291
- return i(n && a == r ? a - 1 : a, 0, e - 1);
291
+ let i = (t - u) / d, a = Math.floor(i);
292
+ return r(n && a == i ? a - 1 : a, 0, e - 1);
292
293
  };
293
294
  function p(e, t, r) {
294
295
  if (c) return;
@@ -306,14 +307,14 @@ function le(e, t, n, r = n) {
306
307
  let u = f(i, !1);
307
308
  a[u] > t && (a[u] = t), l[u] < r && (l[u] = r);
308
309
  }
309
- function m(e, t, i) {
310
+ function m(e, t, r) {
310
311
  if (c) return;
311
312
  if (t > o) o = t;
312
313
  else {
313
314
  c = !0, console.debug("Items (vertices) are not ordered properly. Disabling binned index.");
314
315
  return;
315
316
  }
316
- let u = n(e), d = r(e);
317
+ let u = n(e), d = i(e);
317
318
  if (!Number.isFinite(u) || !Number.isFinite(d)) {
318
319
  c = !0;
319
320
  return;
@@ -326,7 +327,7 @@ function le(e, t, n, r = n) {
326
327
  }
327
328
  s = u;
328
329
  let p = f(u, !1), m = u === d ? p : f(d, !0);
329
- for (let e = p; e <= m; e++) a[e] > t && (a[e] = t), l[e] < i && (l[e] = i);
330
+ for (let e = p; e <= m; e++) a[e] > t && (a[e] = t), l[e] < r && (l[e] = r);
330
331
  }
331
332
  let h = (e, t, n = [0, 0]) => {
332
333
  let r = f(e, !1), i = f(t, !0), o = a[r], s = Math.max(l[i], o);
@@ -338,34 +339,34 @@ function le(e, t, n, r = n) {
338
339
  for (let t = a.length - 1; t > 0; t--) e && a[t] == X ? (a[t] = l[t], e = !1) : a[t - 1] > a[t] && (a[t - 1] = a[t]);
339
340
  return h;
340
341
  };
341
- return p.getIndex = g, m.getIndex = g, n == r ? p : m;
342
+ return p.getIndex = g, m.getIndex = g, n == i ? p : m;
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(e) {
351
- let n = e.encoders?.x, r = e.encoders?.x2;
352
- 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
- let i = e.getType();
354
- if (i !== "point" && i !== "rect") return;
355
- let o = t(n)?.asNumberAccessor();
351
+ function pe(e) {
352
+ let t = e.encoders?.x, n = e.encoders?.x2;
353
+ if (!t?.channelDef || !("buildIndex" in t.channelDef) || !t.channelDef.buildIndex || !t.scale || !a(t.scale.type) && !["index", "locus"].includes(t.scale.type) || t.branches.length !== 1) return;
354
+ let r = e.getType();
355
+ if (r !== "point" && r !== "rect") return;
356
+ let o = i(t)?.asNumberAccessor();
356
357
  if (!o) return;
357
358
  let s;
358
- if (r && (r.scale !== n.scale || r.branches.length !== 1 || (s = t(r)?.asNumberAccessor(), !s))) return;
359
+ if (n && (n.scale !== t.scale || n.branches.length !== 1 || (s = i(n)?.asNumberAccessor(), !s))) return;
359
360
  let c = e.unitView.getScaleResolution("x"), l = c?.zoomExtent;
360
361
  if (!(!c || !l || !Number.isFinite(l[0]) || !Number.isFinite(l[1]) || l[1] <= l[0])) return {
361
362
  xAccessor: o,
362
363
  x2Accessor: s,
363
364
  scaleResolution: c,
364
365
  indexDomain: [l[0], l[1]],
365
- domainStartOffset: ["index", "locus"].includes(n.scale.type) ? -1 : 0
366
+ domainStartOffset: ["index", "locus"].includes(t.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
- u("canvasXIndexNativeItems", e.length);
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), u("canvasXIndexBuilds"), r || u("canvasXIndexRejectedBuilds")), r ? (r(this.#t[0], this.#t[1], t), u("canvasXIndexQueries"), u("canvasXIndexCandidateItems", t[1] - t[0]), t[0] === t[1] && u("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
- return u("canvasXIndexFallbackQueries"), !1;
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();
@@ -429,10 +430,10 @@ var pe = class {
429
430
  if (!e) return;
430
431
  let t = this.surface.getLogicalCanvasSize();
431
432
  if (isNaN(t.width) || isNaN(t.height)) return;
432
- let n = c();
433
+ let n = u();
433
434
  n?.beginFrame("canvas");
434
435
  try {
435
- l("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
- }), a = c();
463
+ }), a = u();
463
464
  a?.beginFrame("canvas", "picking");
464
465
  try {
465
- l("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
  }
@@ -472,21 +473,21 @@ var pe = class {
472
473
  }
473
474
  #e() {
474
475
  let e = this.surface.getLogicalCanvasSize();
475
- if (!(isNaN(e.width) || isNaN(e.height))) return f(this.viewRoot, o.create(0, 0, e.width, e.height), {
476
+ if (!(isNaN(e.width) || isNaN(e.height))) return l(this.viewRoot, s.create(0, 0, e.width, e.height), {
476
477
  devicePixelRatio: this.surface.getDevicePixelRatio(),
477
478
  renderingOptions: { firstFacet: !0 }
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 };