@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,35 +1,35 @@
1
- import { Y as e, o as t, q as n, s as r, u as i, yt as a } from "./clipOptions-BQfNhxgP.js";
2
- import { b as o } from "./viewSelectors-CKfxF_LM.js";
3
- import { v as s } from "./vega-scale-CK0_al6O.js";
4
- import { t as c } from "./rasterization-CFogVB3B.js";
5
- import { t as l } from "./rectangle-DKnrAmKs.js";
6
- import { n as u, t as d } from "./layoutResult-D50MSHXR.js";
7
- import { C as f, D as p, E as m, O as h, S as g, T as _, _ as v, a as y, b as ee, c as b, d as x, f as S, h as C, i as w, k as T, l as E, m as D, n as O, o as te, p as ne, r as re, s as ie, t as ae, u as oe, w as se, x as ce, y as k } from "./nativeText-DFV5XIx8.js";
8
- import { n as A, t as j } from "./svgNumber-DNxESJQB.js";
1
+ import { o as e, s as t, u as n } from "./clipOptions-DTMcB_9z.js";
2
+ import { b as r } from "./viewSelectors-CymbZyE6.js";
3
+ import { v as i } from "./vega-scale-DLKCwWRs.js";
4
+ import { t as a } from "./rasterization-CFogVB3B.js";
5
+ import { t as o } from "./rectangle-DKnrAmKs.js";
6
+ import { n as s, t as c } from "./layoutResult-D50MSHXR.js";
7
+ import { A as l, C as u, D as d, E as f, M as p, N as m, O as h, T as g, _, a as v, c as y, d as b, f as x, g as S, h as C, i as w, j as ee, k as T, l as E, m as D, n as te, o as ne, p as re, r as O, s as ie, t as ae, u as oe, v as se, w as ce, x as le, y as ue } from "./order-DvY7KNcu.js";
8
+ import { n as k, t as A } from "./svgNumber-DNxESJQB.js";
9
9
  //#region ../core/src/rendering/svg/svgElement.js
10
- var M = "http://www.w3.org/2000/svg";
11
- function N(e, t) {
12
- let n = document.createElementNS(M, e);
10
+ var j = "http://www.w3.org/2000/svg";
11
+ function M(e, t) {
12
+ let n = document.createElementNS(j, e);
13
13
  if (t) for (let [e, r] of Object.entries(t)) n.setAttribute(e, "" + r);
14
14
  return n;
15
15
  }
16
16
  //#endregion
17
17
  //#region ../core/src/rendering/svg/svgAttributes.js
18
- function P(e, t) {
19
- let n = Object.entries(t).filter(([t, n]) => n.encoder.constant ? (e.setAttribute(t, "" + F(n, {})), !1) : !0);
20
- return (e) => Object.fromEntries(n.map(([t, n]) => [t, F(n, e)]));
18
+ function N(e, t) {
19
+ let n = Object.entries(t).filter(([t, n]) => n.encoder.constant ? (e.setAttribute(t, "" + P(n, {})), !1) : !0);
20
+ return (e) => Object.fromEntries(n.map(([t, n]) => [t, P(n, e)]));
21
21
  }
22
- function F(e, t) {
22
+ function P(e, t) {
23
23
  let n = e.encoder(t);
24
24
  return e.transform ? e.transform(n) : "" + n;
25
25
  }
26
26
  //#endregion
27
27
  //#region ../core/src/rendering/svg/renderers/arrow.js
28
- function le(e, t) {
29
- let n = e, { coords: r, data: i, group: a, viewOpacity: o, visibleBounds: s } = t, c = n.encoders, l = P(a, {
28
+ function de(e, t) {
29
+ let n = e, { coords: r, data: i, group: a, viewOpacity: o, visibleBounds: s } = t, c = n.encoders, l = N(a, {
30
30
  fill: {
31
31
  encoder: c.fill,
32
- transform: f
32
+ transform: d
33
33
  },
34
34
  "fill-opacity": {
35
35
  encoder: c.fillOpacity,
@@ -37,7 +37,7 @@ function le(e, t) {
37
37
  },
38
38
  stroke: {
39
39
  encoder: c.stroke,
40
- transform: f
40
+ transform: d
41
41
  },
42
42
  "stroke-opacity": {
43
43
  encoder: c.strokeOpacity,
@@ -45,89 +45,79 @@ function le(e, t) {
45
45
  },
46
46
  "stroke-width": {
47
47
  encoder: c.strokeWidth,
48
- transform: (e) => j(+e)
48
+ transform: (e) => A(+e)
49
49
  }
50
50
  });
51
51
  a.setAttribute("stroke-linejoin", "miter");
52
- let u = C(n);
53
- return v(n, u, {
52
+ let u = ue(n);
53
+ return le(n, u, {
54
54
  coords: r,
55
55
  data: i,
56
56
  visibleBounds: s,
57
57
  viewOpacity: o,
58
58
  countOnly: t.countOnly
59
59
  }, (e) => {
60
- t.countOnly || (e.headShapeFallback && t.warn(`SVG export rendered unsupported arrow headShape "${u.headShape}" as a triangle.`), a.appendChild(N("path", {
61
- d: e.boundaryLoops.map(ue).join(" "),
60
+ t.countOnly || (e.headShapeFallback && t.warn(`SVG export rendered unsupported arrow headShape "${u.headShape}" as a triangle.`), a.appendChild(M("path", {
61
+ d: e.boundaryLoops.map(fe).join(" "),
62
62
  ...l(e.datum)
63
63
  })));
64
64
  });
65
65
  }
66
- function ue(e) {
67
- return `M ${e.map(de).join(" L ")} Z`;
66
+ function fe(e) {
67
+ return `M ${e.map(pe).join(" L ")} Z`;
68
68
  }
69
- function de(e) {
70
- return `${j(e.x)} ${j(e.y)}`;
69
+ function pe(e) {
70
+ return `${A(e.x)} ${A(e.y)}`;
71
71
  }
72
72
  //#endregion
73
73
  //#region ../core/src/rendering/svg/renderers/link.js
74
- function fe(e, t) {
75
- let n = e, r = n.properties, i = g(n, r.arcFadingDistance), a = ne(n), { coords: o, data: s, group: c, viewOpacity: l, visibleBounds: u } = t, d = n.encoders, p = g(n, r.noFadingOnPointSelection) ? pe(n, d) : [], m = P(c, {
74
+ function me(e, t) {
75
+ let n = e, r = D(n), { coords: i, data: a, group: o, viewOpacity: s, visibleBounds: c } = t, l = n.encoders, u = se(n, r.shape, t.secondOrderPass), f = N(o, {
76
76
  stroke: {
77
- encoder: d.color,
78
- transform: f
77
+ encoder: l.color,
78
+ transform: d
79
79
  },
80
80
  "stroke-opacity": {
81
- encoder: d.opacity,
82
- transform: (e) => +e * l
81
+ encoder: l.opacity,
82
+ transform: (e) => +e * s
83
83
  },
84
84
  "stroke-width": {
85
- encoder: d.size,
86
- transform: (e) => j(+e)
85
+ encoder: l.size,
86
+ transform: (e) => A(+e)
87
87
  }
88
88
  });
89
- return c.setAttribute("fill", "none"), c.setAttribute("stroke-linecap", "butt"), D(n, a, {
90
- coords: o,
91
- data: s,
92
- visibleBounds: u
89
+ o.setAttribute("fill", "none"), o.setAttribute("stroke-linecap", "butt");
90
+ let p = o, m;
91
+ return C(n, r, {
92
+ coords: i,
93
+ data: a,
94
+ visibleBounds: c
93
95
  }, ({ datum: e, points: n }) => {
94
- let [r, o, s, l] = n;
96
+ let [r, i, a, s] = n;
95
97
  if (t.countOnly) return;
96
- let u = m(e);
97
- if (a.shape == "arc" && i !== !1 && i[0] > 0 && i[1] > 0 && !me(e, p)) {
98
- let e = t.getLinkArcFadeMaskUrl({
99
- p1: r,
100
- p4: l,
101
- distances: i
102
- });
103
- e && (u.mask = e);
104
- }
105
- c.appendChild(N("path", {
106
- d: `M ${I(r)} C ${I(o)} ${I(s)} ${I(l)}`,
107
- ...u
98
+ let c = f(e), l = u ? t.getLinkArcFadeMaskUrl({
99
+ p1: r,
100
+ p4: s,
101
+ distances: u
102
+ }) : void 0;
103
+ l !== m && (m = l, p = l ? M("g", { mask: l }) : o, l && o.appendChild(p)), p.appendChild(M("path", {
104
+ d: `M ${F(r)} C ${F(i)} ${F(a)} ${F(s)}`,
105
+ ...c
108
106
  }));
109
107
  });
110
108
  }
111
- function pe(t, r) {
112
- let i = new Set(Object.values(r).flatMap((e) => e.branches).map((e) => e.predicate?.param).filter((e) => e));
113
- return Array.from(i).map((e) => t.unitView.paramRuntime.findValue(e)).filter((t) => t && (e(t) || n(t)));
114
- }
115
- function me(t, n) {
116
- let r = t[a];
117
- return n.some((t) => e(t) ? t.uniqueId != null && t.uniqueId == r : t.data.has(r));
118
- }
119
- function I(e) {
120
- return e.map(j).join(" ");
109
+ function F(e) {
110
+ return e.map(A).join(" ");
121
111
  }
122
112
  //#endregion
123
113
  //#region ../core/src/rendering/svg/renderers/point.js
124
- function he(e, t) {
114
+ function I(e, t) {
125
115
  let n = e;
126
- g(n, n.properties.fillGradientStrength) && t.warn("SVG export ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("SVG export ignored unsupported point property geometricZoomBound.");
127
- let r = x(n), { inwardStroke: i } = r, { group: a, viewOpacity: o } = t, s = n.encoders, c = P(a, {
116
+ f(n, n.properties.fillGradientStrength) && t.warn("SVG export ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("SVG export ignored unsupported point property geometricZoomBound.");
117
+ let r = x(n), { inwardStroke: i } = r, { group: a, viewOpacity: o } = t, s = n.encoders, c = N(a, {
128
118
  fill: {
129
119
  encoder: s.fill,
130
- transform: f
120
+ transform: d
131
121
  },
132
122
  "fill-opacity": {
133
123
  encoder: s.fillOpacity,
@@ -135,7 +125,7 @@ function he(e, t) {
135
125
  },
136
126
  stroke: {
137
127
  encoder: s.stroke,
138
- transform: f
128
+ transform: d
139
129
  },
140
130
  "stroke-opacity": {
141
131
  encoder: s.strokeOpacity,
@@ -143,47 +133,47 @@ function he(e, t) {
143
133
  },
144
134
  "stroke-width": {
145
135
  encoder: s.strokeWidth,
146
- transform: (e) => j(+e)
136
+ transform: (e) => A(+e)
147
137
  }
148
138
  }), l = R();
149
- return S(n, r, t, (e) => {
139
+ return re(n, r, t, (e) => {
150
140
  if (t.countOnly) return;
151
141
  let { datum: n, shape: r, x: u, y: d, geometryRadius: f, angle: p, strokeWidth: m, lineShape: h } = e, g = {
152
142
  ...c(n),
153
- ...i && !h ? { "stroke-width": j(m) } : {},
154
- ...h ? ge(s, n, o) : {}
143
+ ...i && !h ? { "stroke-width": A(m) } : {},
144
+ ...h ? z(s, n, o) : {}
155
145
  }, _ = L(r, u, d, f, g, l);
156
- _ ? (p && _.setAttribute("transform", `rotate(${j(p)} ${j(u)} ${j(d)})`), a.appendChild(_)) : (t.warn(`SVG export rendered unsupported point shape "${r}" as a circle.`), a.appendChild(N("circle", {
157
- cx: j(u),
158
- cy: j(d),
159
- r: j(f),
146
+ _ ? (p && _.setAttribute("transform", `rotate(${A(p)} ${A(u)} ${A(d)})`), a.appendChild(_)) : (t.warn(`SVG export rendered unsupported point shape "${r}" as a circle.`), a.appendChild(M("circle", {
147
+ cx: A(u),
148
+ cy: A(d),
149
+ r: A(f),
160
150
  ...g
161
151
  })));
162
152
  });
163
153
  }
164
154
  function L(e, t, n, r, i, a) {
165
- let o = j(t), s = j(n), c = j(r);
166
- if (e == "circle") return N("circle", {
155
+ let o = A(t), s = A(n), c = A(r);
156
+ if (e == "circle") return M("circle", {
167
157
  cx: o,
168
158
  cy: s,
169
159
  r: c,
170
160
  ...i
171
161
  });
172
- if (e == "square") return N("rect", {
173
- x: j(t - r),
174
- y: j(n - r),
175
- width: j(r * 2),
176
- height: j(r * 2),
162
+ if (e == "square") return M("rect", {
163
+ x: A(t - r),
164
+ y: A(n - r),
165
+ width: A(r * 2),
166
+ height: A(r * 2),
177
167
  ...i
178
168
  });
179
169
  let l = a.build(e, t, n, r);
180
- return l ? N("path", {
170
+ return l ? M("path", {
181
171
  d: l,
182
172
  ...i
183
173
  }) : void 0;
184
174
  }
185
175
  function R() {
186
- let e = "", t = (e, t) => `${j(e)} ${j(t)}`, n = {
176
+ let e = "", t = (e, t) => `${A(e)} ${A(t)}`, n = {
187
177
  moveTo(n, r) {
188
178
  e += `${e ? " M" : "M"} ${t(n, r)}`;
189
179
  },
@@ -195,26 +185,26 @@ function R() {
195
185
  }
196
186
  };
197
187
  return { build(t, r, i, a) {
198
- return e = "", oe(t, r, i, a, n) ? e : void 0;
188
+ return e = "", b(t, r, i, a, n) ? e : void 0;
199
189
  } };
200
190
  }
201
- function ge(e, t, n) {
202
- let r = e.stroke(t), i = k(e.strokeOpacity, t), a = r == null || i <= 0;
191
+ function z(e, t, n) {
192
+ let r = e.stroke(t), i = u(e.strokeOpacity, t), a = r == null || i <= 0;
203
193
  return {
204
194
  fill: "none",
205
- stroke: f(a ? e.fill(t) : r),
206
- "stroke-opacity": (a ? k(e.fillOpacity, t) : i) * n,
207
- "stroke-width": j(k(e.strokeWidth, t)),
195
+ stroke: d(a ? e.fill(t) : r),
196
+ "stroke-opacity": (a ? u(e.fillOpacity, t) : i) * n,
197
+ "stroke-width": A(u(e.strokeWidth, t)),
208
198
  "stroke-linecap": "butt"
209
199
  };
210
200
  }
211
201
  //#endregion
212
202
  //#region ../core/src/rendering/svg/renderers/rect.js
213
- function _e(e, t) {
214
- let n = e, r = b(n), { shadow: i, hatch: a } = r, { group: o, viewOpacity: s } = t, c = n.encoders, l = P(o, {
203
+ function he(e, t) {
204
+ let n = e, r = E(n), { shadow: i, hatch: a } = r, { group: o, viewOpacity: s } = t, c = n.encoders, l = N(o, {
215
205
  fill: {
216
206
  encoder: c.fill,
217
- transform: f
207
+ transform: d
218
208
  },
219
209
  "fill-opacity": {
220
210
  encoder: c.fillOpacity,
@@ -222,7 +212,7 @@ function _e(e, t) {
222
212
  },
223
213
  stroke: {
224
214
  encoder: c.stroke,
225
- transform: f
215
+ transform: d
226
216
  },
227
217
  "stroke-opacity": {
228
218
  encoder: c.strokeOpacity,
@@ -230,93 +220,93 @@ function _e(e, t) {
230
220
  },
231
221
  "stroke-width": {
232
222
  encoder: c.strokeWidth,
233
- transform: (e) => j(+e)
223
+ transform: (e) => A(+e)
234
224
  }
235
- }), u = i.opacity > 0 ? {
225
+ }), f = i.opacity > 0 ? {
236
226
  fill: i.color,
237
227
  "fill-opacity": 1,
238
228
  stroke: i.color,
239
229
  "stroke-opacity": 1,
240
- opacity: A(i.opacity * s),
230
+ opacity: k(i.opacity * s),
241
231
  filter: t.getShadowFilterUrl(i)
242
232
  } : null;
243
- return E(n, r, t, (e) => {
233
+ return oe(n, r, t, (e) => {
244
234
  if (t.countOnly) return;
245
- let { datum: n, x: r, y: i, width: d, height: p, radii: m, opacityFactor: h, strokeWidth: g, fill: _, fillOpacity: v } = e, y = {
235
+ let { datum: n, x: r, y: i, width: p, height: m, radii: h, opacityFactor: g, strokeWidth: _, fill: v, fillOpacity: y } = e, b = {
246
236
  ...l(n),
247
- ...h == 1 ? {} : { opacity: A(h) }
237
+ ...g == 1 ? {} : { opacity: k(g) }
248
238
  };
249
- if (a != "none" && g > 0 && (y.fill = t.getRectHatchPatternUrl({
239
+ if (a != "none" && _ > 0 && (b.fill = t.getRectHatchPatternUrl({
250
240
  type: a,
251
- fill: f(c.fill(n)),
252
- fillOpacity: k(c.fillOpacity, n) * s,
253
- stroke: f(c.stroke(n)),
254
- strokeOpacity: k(c.strokeOpacity, n) * s,
255
- strokeWidth: g
256
- }), y["fill-opacity"] = 1), u) {
257
- let e = z(r, i, d, p, m, {
258
- ...u,
259
- "stroke-width": j(g)
241
+ fill: d(c.fill(n)),
242
+ fillOpacity: u(c.fillOpacity, n) * s,
243
+ stroke: d(c.stroke(n)),
244
+ strokeOpacity: u(c.strokeOpacity, n) * s,
245
+ strokeWidth: _
246
+ }), b["fill-opacity"] = 1), f) {
247
+ let e = B(r, i, p, m, h, {
248
+ ...f,
249
+ "stroke-width": A(_)
260
250
  });
261
- if (a == "none" && _ != "none" && v == 1 && h == 1) o.appendChild(e);
251
+ if (a == "none" && v != "none" && y == 1 && g == 1) o.appendChild(e);
262
252
  else {
263
- let n = g / 2, a = Object.fromEntries(Object.entries(m).map(([e, t]) => [e, t + n])), s = B(r - n, i - n, d + n * 2, p + n * 2, a), c = N("g", { "clip-path": t.getShadowClipPathUrl(s) });
253
+ let n = _ / 2, a = Object.fromEntries(Object.entries(h).map(([e, t]) => [e, t + n])), s = V(r - n, i - n, p + n * 2, m + n * 2, a), c = M("g", { "clip-path": t.getShadowClipPathUrl(s) });
264
254
  c.appendChild(e), o.appendChild(c);
265
255
  }
266
256
  }
267
- o.appendChild(z(r, i, d, p, m, y));
257
+ o.appendChild(B(r, i, p, m, h, b));
268
258
  });
269
259
  }
270
- function z(e, t, n, r, i, a) {
271
- if (ve(i)) {
272
- let o = i.topLeft, s = j(e), c = j(t), l = j(e + n), u = j(t + r);
273
- return N("rect", {
260
+ function B(e, t, n, r, i, a) {
261
+ if (ge(i)) {
262
+ let o = i.topLeft, s = A(e), c = A(t), l = A(e + n), u = A(t + r);
263
+ return M("rect", {
274
264
  x: s,
275
265
  y: c,
276
- width: j(l - s),
277
- height: j(u - c),
266
+ width: A(l - s),
267
+ height: A(u - c),
278
268
  ...o ? {
279
- rx: j(o),
280
- ry: j(o)
269
+ rx: A(o),
270
+ ry: A(o)
281
271
  } : {},
282
272
  ...a
283
273
  });
284
- } else return N("path", {
285
- d: B(e, t, n, r, i),
274
+ } else return M("path", {
275
+ d: V(e, t, n, r, i),
286
276
  ...a
287
277
  });
288
278
  }
289
- function ve(e) {
279
+ function ge(e) {
290
280
  return Object.values(e).every((t) => t == e.topLeft);
291
281
  }
292
- function B(e, t, n, r, i) {
282
+ function V(e, t, n, r, i) {
293
283
  let a = e + n, o = t + r, { topLeft: s, topRight: c, bottomRight: l, bottomLeft: u } = i;
294
284
  return [
295
- `M ${H(e + s, t)}`,
296
- `H ${j(a - c)}`,
297
- V(c, a, t + c, a, t),
298
- `V ${j(o - l)}`,
299
- V(l, a - l, o, a, o),
300
- `H ${j(e + u)}`,
301
- V(u, e, o - u, e, o),
302
- `V ${j(t + s)}`,
303
- V(s, e + s, t, e, t),
285
+ `M ${U(e + s, t)}`,
286
+ `H ${A(a - c)}`,
287
+ H(c, a, t + c, a, t),
288
+ `V ${A(o - l)}`,
289
+ H(l, a - l, o, a, o),
290
+ `H ${A(e + u)}`,
291
+ H(u, e, o - u, e, o),
292
+ `V ${A(t + s)}`,
293
+ H(s, e + s, t, e, t),
304
294
  "Z"
305
295
  ].join(" ");
306
296
  }
307
- function V(e, t, n, r, i) {
308
- return e ? `A ${j(e)} ${j(e)} 0 0 1 ${H(t, n)}` : `L ${H(r, i)}`;
297
+ function H(e, t, n, r, i) {
298
+ return e ? `A ${A(e)} ${A(e)} 0 0 1 ${U(t, n)}` : `L ${U(r, i)}`;
309
299
  }
310
- function H(e, t) {
311
- return `${j(e)} ${j(t)}`;
300
+ function U(e, t) {
301
+ return `${A(e)} ${A(t)}`;
312
302
  }
313
303
  //#endregion
314
304
  //#region ../core/src/rendering/svg/renderers/rule.js
315
- function U(e, t) {
316
- let n = e, r = te(n), { coords: i, data: a, group: o, viewOpacity: s, visibleBounds: c } = t, l = n.encoders, u = n.properties.strokeDash, d = P(o, {
305
+ function W(e, t) {
306
+ let n = e, r = ie(n), { coords: i, data: a, group: o, viewOpacity: s, visibleBounds: c } = t, l = n.encoders, u = n.properties.strokeDash, f = N(o, {
317
307
  stroke: {
318
308
  encoder: l.color,
319
- transform: f
309
+ transform: d
320
310
  },
321
311
  "stroke-opacity": {
322
312
  encoder: l.opacity,
@@ -324,59 +314,59 @@ function U(e, t) {
324
314
  },
325
315
  "stroke-width": {
326
316
  encoder: l.size,
327
- transform: (e) => j(+e)
317
+ transform: (e) => A(+e)
328
318
  }
329
319
  });
330
- return o.setAttribute("stroke-linecap", "" + n.properties.strokeCap), u && (o.setAttribute("stroke-dasharray", u.map(j).join(" ")), o.setAttribute("stroke-dashoffset", "" + j(n.properties.strokeDashOffset))), ie(n, r, {
320
+ return o.setAttribute("stroke-linecap", "" + n.properties.strokeCap), u && (o.setAttribute("stroke-dasharray", u.map(A).join(" ")), o.setAttribute("stroke-dashoffset", "" + A(n.properties.strokeDashOffset))), y(n, r, {
331
321
  coords: i,
332
322
  data: a,
333
323
  visibleBounds: c
334
324
  }, (e) => {
335
- t.countOnly || o.appendChild(N("line", {
336
- x1: j(e.x1),
337
- y1: j(e.y1),
338
- x2: j(e.x2),
339
- y2: j(e.y2),
340
- ...d(e.datum)
325
+ t.countOnly || o.appendChild(M("line", {
326
+ x1: A(e.x1),
327
+ y1: A(e.y1),
328
+ x2: A(e.x2),
329
+ y2: A(e.y2),
330
+ ...f(e.datum)
341
331
  }));
342
332
  });
343
333
  }
344
334
  //#endregion
345
335
  //#region ../core/src/rendering/svg/renderers/text.js
346
- function ye(e, t) {
347
- let n = e, r = n.properties, i = w(n), { coords: a, data: o, group: s, viewOpacity: c, visibleBounds: l, anchorCullBounds: u } = t, d = n.encoders, p = P(s, {
336
+ function _e(e, t) {
337
+ let n = e, r = n.properties, i = v(n), { coords: a, data: o, group: s, viewOpacity: c, visibleBounds: l, anchorCullBounds: u } = t, p = n.encoders, m = N(s, {
348
338
  fill: {
349
- encoder: d.color,
350
- transform: f
339
+ encoder: p.color,
340
+ transform: d
351
341
  },
352
342
  "fill-opacity": {
353
- encoder: d.opacity,
343
+ encoder: p.opacity,
354
344
  transform: (e) => +e * c
355
345
  },
356
346
  "font-size": {
357
- encoder: d.size,
358
- transform: (e) => j(+e)
347
+ encoder: p.size,
348
+ transform: (e) => A(+e)
359
349
  }
360
350
  });
361
- s.setAttribute("font-family", ae(r.font)), s.setAttribute("font-style", r.fontStyle ?? "normal"), s.setAttribute("font-weight", "" + re(r.fontWeight ?? "normal")), s.setAttribute("text-anchor", W[i.align]);
362
- let m = {
351
+ s.setAttribute("font-family", te(r.font)), s.setAttribute("font-style", r.fontStyle ?? "normal"), s.setAttribute("font-weight", "" + w(r.fontWeight ?? "normal")), s.setAttribute("text-anchor", ve[i.align]);
352
+ let h = {
363
353
  top: {
364
- width: g(n, r.viewportEdgeFadeWidthTop),
365
- distance: g(n, r.viewportEdgeFadeDistanceTop)
354
+ width: f(n, r.viewportEdgeFadeWidthTop),
355
+ distance: f(n, r.viewportEdgeFadeDistanceTop)
366
356
  },
367
357
  right: {
368
- width: g(n, r.viewportEdgeFadeWidthRight),
369
- distance: g(n, r.viewportEdgeFadeDistanceRight)
358
+ width: f(n, r.viewportEdgeFadeWidthRight),
359
+ distance: f(n, r.viewportEdgeFadeDistanceRight)
370
360
  },
371
361
  bottom: {
372
- width: g(n, r.viewportEdgeFadeWidthBottom),
373
- distance: g(n, r.viewportEdgeFadeDistanceBottom)
362
+ width: f(n, r.viewportEdgeFadeWidthBottom),
363
+ distance: f(n, r.viewportEdgeFadeDistanceBottom)
374
364
  },
375
365
  left: {
376
- width: g(n, r.viewportEdgeFadeWidthLeft),
377
- distance: g(n, r.viewportEdgeFadeDistanceLeft)
366
+ width: f(n, r.viewportEdgeFadeWidthLeft),
367
+ distance: f(n, r.viewportEdgeFadeDistanceLeft)
378
368
  }
379
- }, h = y(n, i, {
369
+ }, g = ne(n, i, {
380
370
  coords: a,
381
371
  data: o,
382
372
  visibleBounds: l,
@@ -385,9 +375,9 @@ function ye(e, t) {
385
375
  if (t.countOnly) return;
386
376
  if (e.logoScale) {
387
377
  e.multiCharacterLogo && t.warn("SVG export stretches multi-character logo text as a single glyph cell.");
388
- let n = [`translate(${j(e.x)} ${j(e.y)})`];
389
- e.angle && n.push(`rotate(${j(e.angle)})`), (e.dx || e.dy) && n.push(`translate(${j(e.dx)} ${j(e.dy)})`), n.push(`scale(${j(e.logoScale.width)} ${j(e.logoScale.heightScale)})`);
390
- let r = N("text", {
378
+ let n = [`translate(${A(e.x)} ${A(e.y)})`];
379
+ e.angle && n.push(`rotate(${A(e.angle)})`), (e.dx || e.dy) && n.push(`translate(${A(e.dx)} ${A(e.dy)})`), n.push(`scale(${A(e.logoScale.width)} ${A(e.logoScale.heightScale)})`);
380
+ let r = M("text", {
391
381
  x: 0,
392
382
  y: 0,
393
383
  dy: O("middle", 1),
@@ -395,53 +385,53 @@ function ye(e, t) {
395
385
  lengthAdjust: "spacingAndGlyphs",
396
386
  textLength: 1,
397
387
  transform: n.join(" "),
398
- ...p(e.datum),
388
+ ...m(e.datum),
399
389
  "font-size": 1
400
390
  });
401
391
  r.textContent = e.text, s.appendChild(r);
402
392
  return;
403
393
  }
404
- let n = j(e.x), r = j(e.y), a = N("text", {
394
+ let n = A(e.x), r = A(e.y), a = M("text", {
405
395
  x: n,
406
396
  y: r,
407
- dx: j(e.dx),
408
- dy: j(e.dy + O(i.baseline, e.size)),
397
+ dx: A(e.dx),
398
+ dy: A(e.dy + O(i.baseline, e.size)),
409
399
  lengthAdjust: "spacingAndGlyphs",
410
- textLength: j(e.width),
411
- ...p(e.datum),
412
- ...e.scale == 1 ? {} : { "font-size": j(e.size) },
413
- ...e.fadeOpacity == 1 ? {} : { opacity: A(e.fadeOpacity) }
400
+ textLength: A(e.width),
401
+ ...m(e.datum),
402
+ ...e.scale == 1 ? {} : { "font-size": A(e.size) },
403
+ ...e.fadeOpacity == 1 ? {} : { opacity: k(e.fadeOpacity) }
414
404
  });
415
- a.textContent = e.text, e.angle && a.setAttribute("transform", `rotate(${j(e.angle)} ${n} ${r})`), s.appendChild(a);
405
+ a.textContent = e.text, e.angle && a.setAttribute("transform", `rotate(${A(e.angle)} ${n} ${r})`), s.appendChild(a);
416
406
  });
417
407
  if (!t.countOnly && s.childElementCount > 0) {
418
- let e = t.getViewportEdgeFadeMaskUrl(m);
408
+ let e = t.getViewportEdgeFadeMaskUrl(h);
419
409
  e && s.setAttribute("mask", e);
420
410
  }
421
- return h;
411
+ return g;
422
412
  }
423
- var W = {
413
+ var ve = {
424
414
  left: "start",
425
415
  center: "middle",
426
416
  right: "end"
427
417
  }, G = 64;
428
- function be(e, t) {
429
- let n = Se(e.unitView);
418
+ function ye(e, t) {
419
+ let n = xe(e.unitView);
430
420
  if (!n) return;
431
421
  let r = e.unitView.getScaleResolution(n.channel)?.getScale();
432
- if (!r || !s(r.type)) return;
433
- let { coords: i, data: a, group: o, viewOpacity: c, visibleBounds: l } = t;
434
- if (!a.length) return 0;
435
- let u = e.encoders, d = n.channel == "stroke" ? u.stroke : u.fill, m = Ce(e.unitView.spec.encoding.x), h = Infinity, g = Infinity, _ = -Infinity, v = -Infinity, y = a.map((e) => {
436
- let [t, n] = ee(i, u, e), [r, a] = ce(i, u, e);
437
- return h = Math.min(h, t, n), g = Math.min(g, r, a), _ = Math.max(_, t, n), v = Math.max(v, r, a), {
422
+ if (!r || !i(r.type)) return;
423
+ let { coords: a, data: o, group: s, viewOpacity: c, visibleBounds: l } = t;
424
+ if (!o.length) return 0;
425
+ let u = e.encoders, f = n.channel == "stroke" ? u.stroke : u.fill, p = Se(e.unitView.spec.encoding.x), m = Infinity, h = Infinity, _ = -Infinity, v = -Infinity, y = o.map((e) => {
426
+ let [t, n] = ce(a, u, e), [r, i] = g(a, u, e);
427
+ return m = Math.min(m, t, n), h = Math.min(h, r, i), _ = Math.max(_, t, n), v = Math.max(v, r, i), {
438
428
  offset: Number(e.position),
439
- color: f(d(e))
429
+ color: d(f(e))
440
430
  };
441
431
  }).sort((e, t) => e.offset - t.offset);
442
- if (!p(l, h, g, _, v)) return 0;
443
- if (t.countOnly) return a.length;
444
- let b = xe(y), x = [
432
+ if (!ee(l, m, h, _, v)) return 0;
433
+ if (t.countOnly) return o.length;
434
+ let b = be(y), x = [
445
435
  {
446
436
  offset: 0,
447
437
  color: b[0].color
@@ -452,26 +442,26 @@ function be(e, t) {
452
442
  color: b.at(-1).color
453
443
  }
454
444
  ], S = t.getLegendGradientUrl({
455
- x1: h,
456
- y1: m ? g : v,
457
- x2: m ? _ : h,
458
- y2: g,
445
+ x1: m,
446
+ y1: p ? h : v,
447
+ x2: p ? _ : m,
448
+ y2: h,
459
449
  stops: x
460
- }), C = j(h), w = j(g), T = j(_), E = j(v), D = Number(u.fillOpacity(a[0])) * c;
461
- return o.appendChild(N("rect", {
450
+ }), C = A(m), w = A(h), T = A(_), E = A(v), D = Number(u.fillOpacity(o[0])) * c;
451
+ return s.appendChild(M("rect", {
462
452
  x: C,
463
453
  y: w,
464
- width: j(T - C),
465
- height: j(E - w),
454
+ width: A(T - C),
455
+ height: A(E - w),
466
456
  fill: S,
467
- "fill-opacity": A(D),
457
+ "fill-opacity": k(D),
468
458
  stroke: "none"
469
- })), a.length;
459
+ })), o.length;
470
460
  }
471
- function xe(e) {
461
+ function be(e) {
472
462
  return e.length <= G ? e : Array.from({ length: G }, (t, n) => e[Math.round(n * (e.length - 1) / (G - 1))]);
473
463
  }
474
- function Se(e) {
464
+ function xe(e) {
475
465
  let t = e;
476
466
  for (; t;) {
477
467
  let e = t.spec.data;
@@ -479,32 +469,32 @@ function Se(e) {
479
469
  t = t.dataParent;
480
470
  }
481
471
  }
482
- function Ce(e) {
472
+ function Se(e) {
483
473
  return e != null && "field" in e && (e.field == "position0" || e.field == "position1");
484
474
  }
485
475
  //#endregion
486
476
  //#region ../core/src/rendering/svg/renderers/index.js
487
- var we = /* @__PURE__ */ new Map([
488
- ["arrow", le],
489
- ["link", fe],
490
- ["point", he],
491
- ["rect", _e],
492
- ["rule", U],
493
- ["text", ye],
494
- ["tick", U]
477
+ var Ce = /* @__PURE__ */ new Map([
478
+ ["arrow", de],
479
+ ["link", me],
480
+ ["point", I],
481
+ ["rect", he],
482
+ ["rule", W],
483
+ ["text", _e],
484
+ ["tick", W]
495
485
  ]);
496
- function Te(e, t) {
486
+ function we(e, t) {
497
487
  if (e.getType() == "rect") {
498
- let n = be(e, t);
488
+ let n = ye(e, t);
499
489
  if (n !== void 0) return n;
500
490
  }
501
- let n = we.get(e.getType());
491
+ let n = Ce.get(e.getType());
502
492
  if (!n) throw Error(`SVG rendering is not implemented for mark type "${e.getType()}". View: ${e.unitView.getPathString()}`);
503
493
  return n(e, t);
504
494
  }
505
495
  //#endregion
506
496
  //#region ../core/src/rendering/svg/rectHatchPattern.js
507
- function Ee(e, t) {
497
+ function Te(e, t) {
508
498
  let n = t.strokeWidth, r = [
509
499
  "dots",
510
500
  "rings",
@@ -517,31 +507,31 @@ function Ee(e, t) {
517
507
  "vertical",
518
508
  "horizontal",
519
509
  "grid"
520
- ].includes(t.type), o = r ? n * 7 : n * (i ? 6 : 4), s = a ? n * 2 : n, c = o, l = r ? o * 2 : o, u = N("pattern", {
510
+ ].includes(t.type), o = r ? n * 7 : n * (i ? 6 : 4), s = a ? n * 2 : n, c = o, l = r ? o * 2 : o, u = M("pattern", {
521
511
  id: e,
522
512
  x: 0,
523
513
  y: 0,
524
- width: j(c),
525
- height: j(l),
514
+ width: A(c),
515
+ height: A(l),
526
516
  patternUnits: "userSpaceOnUse"
527
517
  });
528
- u.appendChild(N("rect", {
529
- width: j(c),
530
- height: j(l),
518
+ u.appendChild(M("rect", {
519
+ width: A(c),
520
+ height: A(l),
531
521
  fill: t.fill,
532
- "fill-opacity": A(t.fillOpacity)
522
+ "fill-opacity": k(t.fillOpacity)
533
523
  }));
534
- let d = N("g", {
524
+ let d = M("g", {
535
525
  fill: "none",
536
526
  stroke: t.stroke,
537
- "stroke-opacity": A(t.strokeOpacity),
538
- "stroke-width": j(s),
527
+ "stroke-opacity": k(t.strokeOpacity),
528
+ "stroke-width": A(s),
539
529
  "stroke-linecap": "square"
540
530
  });
541
- return De(d, t.type, o, s), u.appendChild(d), u;
531
+ return Ee(d, t.type, o, s), u.appendChild(d), u;
542
532
  }
543
- function De(e, t, n, r) {
544
- let i = (t) => e.appendChild(N("path", { d: t })), a = (e) => j(e), o = (e) => {
533
+ function Ee(e, t, n, r) {
534
+ let i = (t) => e.appendChild(M("path", { d: t })), a = (e) => A(e), o = (e) => {
545
535
  for (let t of [
546
536
  -n,
547
537
  0,
@@ -570,10 +560,10 @@ function De(e, t, n, r) {
570
560
  case "dots":
571
561
  case "rings":
572
562
  case "ringsLarge": {
573
- let r = n * (t == "dots" ? .07 : t == "rings" ? .2 : .35), i = (t, n) => e.appendChild(N("circle", {
574
- cx: j(t),
575
- cy: j(n),
576
- r: j(r)
563
+ let r = n * (t == "dots" ? .07 : t == "rings" ? .2 : .35), i = (t, n) => e.appendChild(M("circle", {
564
+ cx: A(t),
565
+ cy: A(n),
566
+ r: A(r)
577
567
  }));
578
568
  i(n / 2, 0), i(n / 2, n * 2), i(0, n), i(n, n);
579
569
  break;
@@ -583,85 +573,47 @@ function De(e, t, n, r) {
583
573
  }
584
574
  //#endregion
585
575
  //#region ../core/src/rendering/svg/linkArcFadeMask.js
586
- var K = 4;
587
- function Oe(e, t, n) {
588
- let r = t[0] - e[0], i = t[1] - e[1], a = Math.hypot(r, i);
589
- if (a == 0) return;
590
- let o = -i / a, s = r / a;
591
- (o < 0 || o == 0 && s < 0) && (o = -o, s = -s);
592
- let c = o * e[0] + s * e[1], [l, u] = n, d = JSON.stringify([
593
- q(o, 6),
594
- q(s, 6),
595
- q(c, 1),
596
- q(l, 1),
597
- q(u, 1)
598
- ]);
599
- return {
600
- normalX: o,
601
- normalY: s,
602
- offset: c,
603
- start: l,
604
- end: u,
605
- key: d
606
- };
607
- }
608
- function ke(e, t, n, r) {
609
- let { normalX: i, normalY: a, offset: o, start: s, end: c } = r, l = i * o, u = a * o, d = e + "-gradient", f = N("linearGradient", {
576
+ function De(e, t, n, r) {
577
+ let { normalX: i, normalY: a, offset: o, start: s, end: c } = r, l = i * o, u = a * o, d = e + "-gradient", f = M("linearGradient", {
610
578
  id: d,
611
579
  gradientUnits: "userSpaceOnUse",
612
- x1: j(l - i * c),
613
- y1: j(u - a * c),
614
- x2: j(l + i * c),
615
- y2: j(u + a * c),
580
+ x1: A(l - i * c),
581
+ y1: A(u - a * c),
582
+ x2: A(l + i * c),
583
+ y2: A(u + a * c),
616
584
  spreadMethod: "pad"
617
585
  });
618
- for (let { offset: e, opacity: t } of Ae(s, c)) f.appendChild(N("stop", {
619
- offset: q(e, 3),
586
+ for (let { offset: e, opacity: t } of S(s, c)) f.appendChild(M("stop", {
587
+ offset: K(e, 3),
620
588
  "stop-color": "white",
621
- "stop-opacity": q(t, 3)
589
+ "stop-opacity": K(t, 3)
622
590
  }));
623
- let p = N("mask", {
591
+ let p = M("mask", {
624
592
  id: e,
625
593
  x: 0,
626
594
  y: 0,
627
- width: j(t),
628
- height: j(n),
595
+ width: A(t),
596
+ height: A(n),
629
597
  maskUnits: "userSpaceOnUse",
630
598
  maskContentUnits: "userSpaceOnUse",
631
599
  "mask-type": "luminance"
632
600
  });
633
- return p.appendChild(N("rect", {
634
- width: j(t),
635
- height: j(n),
601
+ return p.appendChild(M("rect", {
602
+ width: A(t),
603
+ height: A(n),
636
604
  fill: `url(#${d})`
637
605
  })), {
638
606
  gradient: f,
639
607
  mask: p
640
608
  };
641
609
  }
642
- function Ae(e, t) {
643
- let n = [], r = (r) => {
644
- for (let i = 0; i <= K; i++) {
645
- let a = i / K, o = r ? t + (e - t) * a : e + (t - e) * a, s = r ? (t - o) / (2 * t) : (t + o) / (2 * t), c = (o - e) / (t - e);
646
- n.push({
647
- offset: s,
648
- opacity: 1 - je(c)
649
- });
650
- }
651
- };
652
- return r(!0), r(!1), n;
653
- }
654
- function je(e) {
655
- let t = Math.max(0, Math.min(1, e));
656
- return t * t * (3 - 2 * t);
657
- }
658
- function q(e, t) {
610
+ function K(e, t) {
659
611
  let n = 10 ** t;
660
612
  return Math.round(e * n) / n;
661
613
  }
662
614
  //#endregion
663
615
  //#region ../core/src/rendering/svg/svgViewRenderingContext.js
664
- var J = class extends u {
616
+ var q = class extends s {
665
617
  #e;
666
618
  #t;
667
619
  #n = [];
@@ -674,8 +626,8 @@ var J = class extends u {
674
626
  #l = /* @__PURE__ */ new Set();
675
627
  #u = !1;
676
628
  #d = /* @__PURE__ */ new Map();
677
- #f = new h();
678
- #p = N("g");
629
+ #f = new p();
630
+ #p = M("g");
679
631
  #m;
680
632
  #h;
681
633
  #g = [];
@@ -689,13 +641,13 @@ var J = class extends u {
689
641
  #w = 0;
690
642
  constructor(e, t) {
691
643
  super(e), this.width = t.width, this.height = t.height, this.#h = t.maxVectorInstances;
692
- let n = j(t.width), r = j(t.height);
693
- this.#e = N("svg", {
694
- xmlns: M,
644
+ let n = A(t.width), r = A(t.height);
645
+ this.#e = M("svg", {
646
+ xmlns: j,
695
647
  width: n,
696
648
  height: r,
697
649
  viewBox: `0 0 ${n} ${r}`
698
- }), this.#t = N("defs"), this.#e.appendChild(this.#t), t.background != null && this.#e.appendChild(N("rect", {
650
+ }), this.#t = M("defs"), this.#e.appendChild(this.#t), t.background != null && this.#e.appendChild(M("rect", {
699
651
  width: n,
700
652
  height: r,
701
653
  fill: t.background,
@@ -737,8 +689,8 @@ var J = class extends u {
737
689
  this.#m = void 0;
738
690
  }
739
691
  pushView(e, t) {
740
- let n = e.getPathString();
741
- if (i(this.#n)?.exportExcluded || o(e) && e.name.startsWith("scrollbar-")) {
692
+ let i = e.getPathString();
693
+ if (n(this.#n)?.exportExcluded || r(e) && e.name.startsWith("scrollbar-")) {
742
694
  this.#n.push({
743
695
  view: e,
744
696
  node: this.currentNode,
@@ -756,21 +708,21 @@ var J = class extends u {
756
708
  });
757
709
  return;
758
710
  }
759
- let r = this.#m, a = r?.viewGroups.get(e);
760
- if (a) {
761
- if (a.parentNode !== this.currentNode) throw Error(`Sample-faceted view was rendered under multiple parents: ${n}`);
711
+ let a = this.#m, o = a?.viewGroups.get(e);
712
+ if (o) {
713
+ if (o.parentNode !== this.currentNode) throw Error(`Sample-faceted view was rendered under multiple parents: ${i}`);
762
714
  } else {
763
- a = N("g", {
764
- id: Me(e.name, this.#v++),
715
+ o = M("g", {
716
+ id: Oe(e.name, this.#v++),
765
717
  "data-name": e.name,
766
- "data-view-path": n
718
+ "data-view-path": i
767
719
  });
768
- let t = N("title");
769
- t.textContent = n, a.appendChild(t), this.currentNode.appendChild(a), r?.viewGroups.set(e, a);
720
+ let t = M("title");
721
+ t.textContent = i, o.appendChild(t), this.currentNode.appendChild(o), a?.viewGroups.set(e, o);
770
722
  }
771
723
  this.#n.push({
772
724
  view: e,
773
- node: a,
725
+ node: o,
774
726
  coords: t,
775
727
  exportExcluded: !1
776
728
  });
@@ -778,52 +730,61 @@ var J = class extends u {
778
730
  popView(e) {
779
731
  if (this.#n.pop()?.view !== e) throw Error("Unbalanced SVG view rendering context stack.");
780
732
  }
781
- renderMark(e, n) {
782
- if (i(this.#n)?.exportExcluded || e.unitView.getEffectiveOpacity() <= 0) return;
783
- let a = t(n), o = r(a, e.properties.clip, this.currentCoords), s = _(this.width, this.height, o);
784
- if (!m(s)) return;
785
- let c = this.getVisibleInstanceCount(e);
733
+ renderMark(r, i) {
734
+ if (n(this.#n)?.exportExcluded || r.unitView.getEffectiveOpacity() <= 0) return;
735
+ let a = e(i), o = t(a, r.properties.clip, this.currentCoords), s = T(this.width, this.height, o);
736
+ if (!l(s)) return;
737
+ let c = this.getVisibleInstanceCount(r);
786
738
  if (!this.#u && this.#h != null && c == 0) return;
787
739
  if (!this.#u && this.#h != null && c > this.#h) {
788
- this.#T(e, s);
740
+ this.#T(r, s);
789
741
  return;
790
742
  }
791
- let l = !this.#u && this.#m != null, u = l ? this.getClipPathUrl(o) : void 0, d = l ? this.#m.markGroups.get(e)?.get(u ?? "") : void 0;
792
- !this.#u && !d && this.#E();
793
- let f = this.#u ? this.#p : this.#O(e, u), p = se(this.currentCoords, a, e.properties.cullByVisibleRange);
794
- if (T(e, n, this.currentCoords, this.#f, (t, n) => {
795
- let r = Te(e, {
796
- coords: t,
797
- data: n,
798
- group: f,
799
- visibleBounds: s,
800
- anchorCullBounds: p,
801
- viewOpacity: e.unitView.getEffectiveOpacity(),
802
- countOnly: this.#u,
803
- getViewportEdgeFadeMaskUrl: (e) => this.#u ? void 0 : this.getViewportEdgeFadeMaskUrl(e),
804
- getShadowFilterUrl: (e) => this.#u ? "" : this.getShadowFilterUrl(e),
805
- getShadowClipPathUrl: (e) => this.#u ? "" : this.getShadowClipPathUrl(e),
806
- getRectHatchPatternUrl: (e) => this.#u ? "" : this.getRectHatchPatternUrl(e),
807
- getLinkArcFadeMaskUrl: (e) => this.#u ? void 0 : this.getLinkArcFadeMaskUrl(e),
808
- getLegendGradientUrl: (e) => this.#u ? "" : this.getLegendGradientUrl(e),
809
- warn: (t) => {
810
- this.#u || this.#l.add(`${t} View: ${e.unitView.getPathString()}`);
811
- }
812
- });
813
- this.#u && this.#d.set(e, this.getVisibleInstanceCount(e) + r);
814
- }, (t) => this.#l.add(`SVG export could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`)), !this.#u && !l && f.childElementCount > 0) {
743
+ let u = !this.#u && this.#m != null, d = u ? this.getClipPathUrl(o) : void 0, f = u ? this.#m.markGroups.get(r)?.get(d ?? "") : void 0;
744
+ !this.#u && !f && this.#E();
745
+ let p = this.#u ? this.#p : this.#O(r, d), g = h(this.currentCoords, a, r.properties.cullByVisibleRange), _ = r.getOrder?.(), v = !this.#u && _ && _.isActive();
746
+ if (m(r, i, this.currentCoords, this.#f, (e, t) => {
747
+ let n = (t, n = !1) => {
748
+ let i = we(r, {
749
+ coords: e,
750
+ data: t,
751
+ group: p,
752
+ visibleBounds: s,
753
+ anchorCullBounds: g,
754
+ viewOpacity: r.unitView.getEffectiveOpacity(),
755
+ secondOrderPass: n,
756
+ countOnly: this.#u,
757
+ getViewportEdgeFadeMaskUrl: (e) => this.#u ? void 0 : this.getViewportEdgeFadeMaskUrl(e),
758
+ getShadowFilterUrl: (e) => this.#u ? "" : this.getShadowFilterUrl(e),
759
+ getShadowClipPathUrl: (e) => this.#u ? "" : this.getShadowClipPathUrl(e),
760
+ getRectHatchPatternUrl: (e) => this.#u ? "" : this.getRectHatchPatternUrl(e),
761
+ getLinkArcFadeMaskUrl: (e) => this.#u ? void 0 : this.getLinkArcFadeMaskUrl(e),
762
+ getLegendGradientUrl: (e) => this.#u ? "" : this.getLegendGradientUrl(e),
763
+ warn: (e) => {
764
+ this.#u || this.#l.add(`${e} View: ${r.unitView.getPathString()}`);
765
+ }
766
+ });
767
+ this.#u && this.#d.set(r, this.getVisibleInstanceCount(r) + i);
768
+ };
769
+ if (!v) {
770
+ n(t);
771
+ return;
772
+ }
773
+ let i = ae(t, 0, t.length, _.predicate, _.passes);
774
+ for (let [e, t] of i.entries()) t.length !== 0 && n(t, e === 1);
775
+ }, (e) => this.#l.add(`SVG export could not resolve sample facet index ${e}. View: ${r.unitView.getPathString()}`)), !this.#u && !u && p.childElementCount > 0) {
815
776
  let e = this.getClipPathUrl(o);
816
- e && f.setAttribute("clip-path", e), this.currentNode.appendChild(f);
777
+ e && p.setAttribute("clip-path", e), this.currentNode.appendChild(p);
817
778
  }
818
779
  }
819
780
  #T(e, t) {
820
781
  let n = this.#m?.rasterRuns.get(e);
821
782
  if (n) {
822
- Y(n.bounds, t), n.viewNodes.add(this.currentNode);
783
+ J(n.bounds, t), n.viewNodes.add(this.currentNode);
823
784
  return;
824
785
  }
825
786
  let r = this.#_;
826
- if (r) Y(r.bounds, t);
787
+ if (r) J(r.bounds, t);
827
788
  else {
828
789
  let e = document.createComment("raster-run");
829
790
  this.currentNode.appendChild(e), r = {
@@ -845,26 +806,26 @@ var J = class extends u {
845
806
  e && (this.#g.push(e), this.#_ = void 0);
846
807
  }
847
808
  #D(e) {
848
- let t = Ne(e.viewNodes), n = e.targets.map((e) => e.mark.getType()), r = N("g", {
809
+ let t = ke(e.viewNodes), n = e.targets.map((e) => e.mark.getType()), r = M("g", {
849
810
  id: `rasterized-${n.join("-")}-${this.#w++}`,
850
811
  "data-name": `Rasterized ${n.join(", ")}`,
851
812
  "data-rasterized": ""
852
- }), i = N("image", { preserveAspectRatio: "none" });
813
+ }), i = M("image", { preserveAspectRatio: "none" });
853
814
  r.appendChild(i);
854
815
  let a = e.anchor.parentNode;
855
- t == a ? t.insertBefore(r, e.anchor) : t.insertBefore(r, Pe(a, t)), e.anchor.remove();
856
- for (let n of e.viewNodes) Fe(n, t);
816
+ t == a ? t.insertBefore(r, e.anchor) : t.insertBefore(r, Ae(a, t)), e.anchor.remove();
817
+ for (let n of e.viewNodes) je(n, t);
857
818
  e.image = i;
858
819
  }
859
820
  #O(e, t) {
860
821
  let n = this.#m;
861
- if (!n) return N("g", { "data-mark-type": e.getType() });
822
+ if (!n) return M("g", { "data-mark-type": e.getType() });
862
823
  let r = n.markGroups.get(e);
863
824
  r || (r = /* @__PURE__ */ new Map(), n.markGroups.set(e, r));
864
825
  let i = t ?? "", a = r.get(i);
865
826
  if (a) {
866
827
  if (a.parentNode !== this.currentNode) throw Error(`Sample-faceted mark was rendered under multiple parents: ${e.unitView.getPathString()}`);
867
- } else a = N("g", { "data-mark-type": e.getType() }), t && a.setAttribute("clip-path", t), this.currentNode.appendChild(a), r.set(i, a), n.markGroupElements.add(a);
828
+ } else a = M("g", { "data-mark-type": e.getType() }), t && a.setAttribute("clip-path", t), this.currentNode.appendChild(a), r.set(i, a), n.markGroupElements.add(a);
868
829
  return a;
869
830
  }
870
831
  getClipPathUrl(e) {
@@ -874,14 +835,14 @@ var J = class extends u {
874
835
  e.clipY ? t.y : 0,
875
836
  e.clipX ? t.width : this.width,
876
837
  e.clipY ? t.height : this.height
877
- ].map(j), r = n.join(","), i = this.#r.get(r);
838
+ ].map(A), r = n.join(","), i = this.#r.get(r);
878
839
  if (!i) {
879
840
  i = "clip-" + this.#y++;
880
- let e = N("clipPath", {
841
+ let e = M("clipPath", {
881
842
  id: i,
882
843
  clipPathUnits: "userSpaceOnUse"
883
844
  });
884
- e.appendChild(N("rect", {
845
+ e.appendChild(M("rect", {
885
846
  x: n[0],
886
847
  y: n[1],
887
848
  width: n[2],
@@ -891,28 +852,28 @@ var J = class extends u {
891
852
  return `url(#${i})`;
892
853
  }
893
854
  getShadowFilterUrl(e) {
894
- let t = j(Math.max(e.blur / 2.5, .25)), n = j(e.offsetX), r = j(e.offsetY), i = [
855
+ let t = A(Math.max(e.blur / 2.5, .25)), n = A(e.offsetX), r = A(e.offsetY), i = [
895
856
  t,
896
857
  n,
897
858
  r
898
859
  ].join(","), a = this.#a.get(i);
899
860
  if (!a) {
900
861
  a = "shadow-" + this.#x++;
901
- let e = N("filter", {
862
+ let e = M("filter", {
902
863
  id: a,
903
864
  x: 0,
904
865
  y: 0,
905
- width: j(this.width),
906
- height: j(this.height),
866
+ width: A(this.width),
867
+ height: A(this.height),
907
868
  filterUnits: "userSpaceOnUse",
908
869
  primitiveUnits: "userSpaceOnUse",
909
870
  "color-interpolation-filters": "sRGB"
910
871
  });
911
- e.appendChild(N("feGaussianBlur", {
872
+ e.appendChild(M("feGaussianBlur", {
912
873
  in: "SourceGraphic",
913
874
  stdDeviation: t,
914
875
  result: "blur"
915
- })), e.appendChild(N("feOffset", {
876
+ })), e.appendChild(M("feOffset", {
916
877
  in: "blur",
917
878
  dx: n,
918
879
  dy: r,
@@ -925,12 +886,12 @@ var J = class extends u {
925
886
  let t = this.#o.get(e);
926
887
  if (!t) {
927
888
  t = "shadow-clip-" + this.#y++;
928
- let n = N("clipPath", {
889
+ let n = M("clipPath", {
929
890
  id: t,
930
891
  clipPathUnits: "userSpaceOnUse"
931
892
  });
932
- n.appendChild(N("path", {
933
- d: `M 0 0 V ${j(this.height)} H ${j(this.width)} V 0 Z ${e}`,
893
+ n.appendChild(M("path", {
894
+ d: `M 0 0 V ${A(this.height)} H ${A(this.width)} V 0 Z ${e}`,
934
895
  "clip-rule": "evenodd",
935
896
  "fill-rule": "evenodd"
936
897
  })), this.#t.appendChild(n), this.#o.set(e, t);
@@ -941,35 +902,35 @@ var J = class extends u {
941
902
  let t = JSON.stringify([
942
903
  e.type,
943
904
  e.fill,
944
- A(e.fillOpacity),
905
+ k(e.fillOpacity),
945
906
  e.stroke,
946
- A(e.strokeOpacity),
947
- A(e.strokeWidth)
907
+ k(e.strokeOpacity),
908
+ k(e.strokeWidth)
948
909
  ]), n = this.#s.get(t);
949
- return n || (n = "rect-hatch-" + this.#S++, this.#t.appendChild(Ee(n, e)), this.#s.set(t, n)), `url(#${n})`;
910
+ return n || (n = "rect-hatch-" + this.#S++, this.#t.appendChild(Te(n, e)), this.#s.set(t, n)), `url(#${n})`;
950
911
  }
951
912
  getLegendGradientUrl(e) {
952
- let t = "legend-gradient-" + this.#C++, n = N("linearGradient", {
913
+ let t = "legend-gradient-" + this.#C++, n = M("linearGradient", {
953
914
  id: t,
954
915
  gradientUnits: "userSpaceOnUse",
955
- x1: j(e.x1),
956
- y1: j(e.y1),
957
- x2: j(e.x2),
958
- y2: j(e.y2)
916
+ x1: A(e.x1),
917
+ y1: A(e.y1),
918
+ x2: A(e.x2),
919
+ y2: A(e.y2)
959
920
  });
960
- for (let t of e.stops) n.appendChild(N("stop", {
961
- offset: A(t.offset),
921
+ for (let t of e.stops) n.appendChild(M("stop", {
922
+ offset: k(t.offset),
962
923
  "stop-color": t.color
963
924
  }));
964
925
  return this.#t.appendChild(n), `url(#${t})`;
965
926
  }
966
927
  getLinkArcFadeMaskUrl(e) {
967
- let t = Oe(e.p1, e.p4, e.distances);
928
+ let t = _(e.p1, e.p4, e.distances);
968
929
  if (!t) return;
969
930
  let n = this.#c.get(t.key);
970
931
  if (!n) {
971
932
  n = "link-arc-fade-" + this.#b++;
972
- let { gradient: e, mask: r } = ke(n, this.width, this.height, t);
933
+ let { gradient: e, mask: r } = De(n, this.width, this.height, t);
973
934
  this.#t.appendChild(e), this.#t.appendChild(r), this.#c.set(t.key, n);
974
935
  }
975
936
  return `url(#${n})`;
@@ -977,37 +938,37 @@ var J = class extends u {
977
938
  getViewportEdgeFadeMaskUrl(e) {
978
939
  let t = Object.entries(e).filter(([, e]) => e.width > 0 && Number.isFinite(e.distance));
979
940
  if (!t.length) return;
980
- let n = i(this.#n);
981
- if (!n) throw Error("No current view in SVG rendering context.");
982
- let r = this.#i.get(n.view);
983
- if (!r) {
984
- r = "edge-fade-" + this.#b++;
985
- let e = j(this.width), i = j(this.height), a = N("mask", {
986
- id: r,
941
+ let r = n(this.#n);
942
+ if (!r) throw Error("No current view in SVG rendering context.");
943
+ let i = this.#i.get(r.view);
944
+ if (!i) {
945
+ i = "edge-fade-" + this.#b++;
946
+ let e = A(this.width), n = A(this.height), a = M("mask", {
947
+ id: i,
987
948
  x: 0,
988
949
  y: 0,
989
950
  width: e,
990
- height: i,
951
+ height: n,
991
952
  maskUnits: "userSpaceOnUse",
992
953
  maskContentUnits: "userSpaceOnUse",
993
954
  "mask-type": "luminance"
994
955
  });
995
- a.appendChild(N("rect", {
956
+ a.appendChild(M("rect", {
996
957
  width: e,
997
- height: i,
958
+ height: n,
998
959
  fill: "white"
999
960
  }));
1000
961
  for (let [o, s] of t) {
1001
- let t = r + "-" + o, c = Ie(t, o, s, n.coords);
1002
- this.#t.appendChild(c), a.appendChild(N("rect", {
962
+ let t = i + "-" + o, c = Me(t, o, s, r.coords);
963
+ this.#t.appendChild(c), a.appendChild(M("rect", {
1003
964
  width: e,
1004
- height: i,
965
+ height: n,
1005
966
  fill: `url(#${t})`
1006
967
  }));
1007
968
  }
1008
- this.#t.appendChild(a), this.#i.set(n.view, r);
969
+ this.#t.appendChild(a), this.#i.set(r.view, i);
1009
970
  }
1010
- return `url(#${r})`;
971
+ return `url(#${i})`;
1011
972
  }
1012
973
  getSvg() {
1013
974
  return this.#e;
@@ -1016,52 +977,52 @@ var J = class extends u {
1016
977
  return Array.from(this.#l);
1017
978
  }
1018
979
  get currentNode() {
1019
- return i(this.#n)?.node ?? this.#e;
980
+ return n(this.#n)?.node ?? this.#e;
1020
981
  }
1021
982
  get currentCoords() {
1022
- let e = i(this.#n);
983
+ let e = n(this.#n);
1023
984
  if (!e) throw Error("No current view in SVG rendering context.");
1024
985
  return e.coords;
1025
986
  }
1026
987
  };
1027
- function Me(e, t) {
988
+ function Oe(e, t) {
1028
989
  let n = e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
1029
990
  return `${/^[A-Za-z_]/.test(n) ? n : n ? "view-" + n : "view"}-${t}`;
1030
991
  }
1031
- function Y(e, t) {
992
+ function J(e, t) {
1032
993
  e.x1 = Math.min(e.x1, t.x1), e.y1 = Math.min(e.y1, t.y1), e.x2 = Math.max(e.x2, t.x2), e.y2 = Math.max(e.y2, t.y2);
1033
994
  }
1034
- function Ne(e) {
995
+ function ke(e) {
1035
996
  let [t, ...n] = Array.from(e), r = t;
1036
997
  for (; n.some((e) => !r.contains(e));) r = r.parentNode;
1037
998
  return r;
1038
999
  }
1039
- function Pe(e, t) {
1000
+ function Ae(e, t) {
1040
1001
  let n = e;
1041
1002
  for (; n.parentNode != t;) n = n.parentNode;
1042
1003
  return n;
1043
1004
  }
1044
- function Fe(e, t) {
1005
+ function je(e, t) {
1045
1006
  let n = e;
1046
1007
  for (; n != t && n.matches("g[data-view-path]") && Array.from(n.children).every((e) => e.tagName == "title");) {
1047
1008
  let e = n.parentNode;
1048
1009
  n.remove(), n = e;
1049
1010
  }
1050
1011
  }
1051
- function Ie(e, t, n, r) {
1052
- let i = t == "top" ? r.y + n.distance : t == "right" ? r.x2 - n.distance : t == "bottom" ? r.y2 - n.distance : r.x + n.distance, a = t == "left" || t == "right", o = i + (t == "top" || t == "left" ? 1 : -1) * n.width, s = N("linearGradient", {
1012
+ function Me(e, t, n, r) {
1013
+ let i = t == "top" ? r.y + n.distance : t == "right" ? r.x2 - n.distance : t == "bottom" ? r.y2 - n.distance : r.x + n.distance, a = t == "left" || t == "right", o = i + (t == "top" || t == "left" ? 1 : -1) * n.width, s = M("linearGradient", {
1053
1014
  id: e,
1054
1015
  gradientUnits: "userSpaceOnUse",
1055
- x1: j(a ? i : 0),
1056
- y1: j(a ? 0 : i),
1057
- x2: j(a ? o : 0),
1058
- y2: j(a ? 0 : o)
1016
+ x1: A(a ? i : 0),
1017
+ y1: A(a ? 0 : i),
1018
+ x2: A(a ? o : 0),
1019
+ y2: A(a ? 0 : o)
1059
1020
  });
1060
- return s.appendChild(N("stop", {
1021
+ return s.appendChild(M("stop", {
1061
1022
  offset: 0,
1062
1023
  "stop-color": "black",
1063
1024
  "stop-opacity": 1
1064
- })), s.appendChild(N("stop", {
1025
+ })), s.appendChild(M("stop", {
1065
1026
  offset: 1,
1066
1027
  "stop-color": "black",
1067
1028
  "stop-opacity": 0
@@ -1069,24 +1030,24 @@ function Ie(e, t, n, r) {
1069
1030
  }
1070
1031
  //#endregion
1071
1032
  //#region ../core/src/rendering/svg/index.js
1072
- function X({ viewRoot: e, logicalWidth: t, logicalHeight: n, background: r = "white" }) {
1073
- let i = new J({ picking: !1 }, {
1033
+ function Y({ viewRoot: e, logicalWidth: t, logicalHeight: n, background: r = "white" }) {
1034
+ let i = new q({ picking: !1 }, {
1074
1035
  width: t,
1075
1036
  height: n,
1076
1037
  background: r
1077
1038
  });
1078
- return d(e, l.create(0, 0, t, n), { renderingOptions: { firstFacet: !0 } }).collectRenderCommands(i), {
1039
+ return c(e, o.create(0, 0, t, n), { renderingOptions: { firstFacet: !0 } }).collectRenderCommands(i), {
1079
1040
  svg: i.getSvg(),
1080
1041
  warnings: i.getWarnings()
1081
1042
  };
1082
1043
  }
1083
- function Le({ viewRoot: e, logicalWidth: t, logicalHeight: n }) {
1084
- let r = new J({ picking: !1 }, {
1044
+ function Ne({ viewRoot: e, logicalWidth: t, logicalHeight: n }) {
1045
+ let r = new q({ picking: !1 }, {
1085
1046
  width: t,
1086
1047
  height: n,
1087
1048
  background: null
1088
1049
  });
1089
- return r.beginInstanceCounting(), d(e, l.create(0, 0, t, n), { renderingOptions: { firstFacet: !0 } }).collectRenderCommands(r), r.endInstanceCounting(), { layers: Array.from(r.getVisibleInstanceCounts(), ([e, t]) => ({
1050
+ return r.beginInstanceCounting(), c(e, o.create(0, 0, t, n), { renderingOptions: { firstFacet: !0 } }).collectRenderCommands(r), r.endInstanceCounting(), { layers: Array.from(r.getVisibleInstanceCounts(), ([e, t]) => ({
1090
1051
  viewName: e.unitView.name,
1091
1052
  viewTitle: e.unitView.getTitleText(),
1092
1053
  viewPath: e.unitView.getPathString(),
@@ -1094,7 +1055,7 @@ function Le({ viewRoot: e, logicalWidth: t, logicalHeight: n }) {
1094
1055
  instanceCount: t
1095
1056
  })).filter((e) => e.instanceCount > 0) };
1096
1057
  }
1097
- async function Re(e) {
1058
+ async function X(e) {
1098
1059
  let t = e.rasterization;
1099
1060
  return t ? ($(t), e.rasterizeSvgRuns ? Z({
1100
1061
  ...e,
@@ -1102,34 +1063,34 @@ async function Re(e) {
1102
1063
  maxVectorInstances: t.maxVectorInstances,
1103
1064
  pixelRatio: t.pixelRatio
1104
1065
  }) : Q(e)) : {
1105
- ...X(e),
1066
+ ...Y(e),
1106
1067
  rasterized: []
1107
1068
  };
1108
1069
  }
1109
- async function Z({ viewRoot: e, rasterizeSvgRuns: t, logicalWidth: n, logicalHeight: r, background: i = "white", maxVectorInstances: a, pixelRatio: o = 2 }) {
1070
+ async function Z({ viewRoot: e, rasterizeSvgRuns: t, logicalWidth: n, logicalHeight: r, background: i = "white", maxVectorInstances: s, pixelRatio: l = 2 }) {
1110
1071
  $({
1111
- maxVectorInstances: a,
1112
- pixelRatio: o
1072
+ maxVectorInstances: s,
1073
+ pixelRatio: l
1113
1074
  });
1114
- let s = new J({ picking: !1 }, {
1075
+ let u = new q({ picking: !1 }, {
1115
1076
  width: n,
1116
1077
  height: r,
1117
1078
  background: i,
1118
- maxVectorInstances: a
1119
- }), u = d(e, l.create(0, 0, n, r), { renderingOptions: { firstFacet: !0 } });
1120
- s.beginInstanceCounting(), u.collectRenderCommands(s), s.endInstanceCounting(), u.collectRenderCommands(s);
1121
- let f = s.getRasterRuns();
1079
+ maxVectorInstances: s
1080
+ }), d = c(e, o.create(0, 0, n, r), { renderingOptions: { firstFacet: !0 } });
1081
+ u.beginInstanceCounting(), d.collectRenderCommands(u), u.endInstanceCounting(), d.collectRenderCommands(u);
1082
+ let f = u.getRasterRuns();
1122
1083
  if (f.length) try {
1123
1084
  await t({
1124
1085
  runs: f,
1125
1086
  viewRoot: e,
1126
- layoutResult: u,
1087
+ layoutResult: d,
1127
1088
  logicalWidth: n,
1128
1089
  logicalHeight: r,
1129
- pixelRatio: o
1090
+ pixelRatio: l
1130
1091
  });
1131
1092
  } catch (t) {
1132
- if (t instanceof c) return Q({
1093
+ if (t instanceof a) return Q({
1133
1094
  viewRoot: e,
1134
1095
  logicalWidth: n,
1135
1096
  logicalHeight: r,
@@ -1138,21 +1099,21 @@ async function Z({ viewRoot: e, rasterizeSvgRuns: t, logicalWidth: n, logicalHei
1138
1099
  throw t;
1139
1100
  }
1140
1101
  return {
1141
- svg: s.getSvg(),
1142
- warnings: s.getWarnings(),
1102
+ svg: u.getSvg(),
1103
+ warnings: u.getWarnings(),
1143
1104
  rasterized: f.map((e) => ({
1144
1105
  targets: e.targets.map((e) => ({
1145
1106
  markType: e.mark.getType(),
1146
1107
  instanceCount: e.instanceCount
1147
1108
  })),
1148
1109
  reason: "instance-threshold",
1149
- maxVectorInstances: a,
1150
- pixelRatio: o
1110
+ maxVectorInstances: s,
1111
+ pixelRatio: l
1151
1112
  }))
1152
1113
  };
1153
1114
  }
1154
1115
  function Q(e) {
1155
- let t = X(e);
1116
+ let t = Y(e);
1156
1117
  return {
1157
1118
  ...t,
1158
1119
  warnings: [...t.warnings, "SVG rasterization was requested but no raster rendering backend is available; exported all marks as vectors."],
@@ -1164,4 +1125,4 @@ function $(e) {
1164
1125
  if (e.pixelRatio != null && (!Number.isFinite(e.pixelRatio) || e.pixelRatio <= 0)) throw RangeError("SVG raster pixelRatio must be positive.");
1165
1126
  }
1166
1127
  //#endregion
1167
- export { Le as analyzeSvgExport, Z as createRasterizedSvg, X as createSvg, Re as createSvgExport };
1128
+ export { Ne as analyzeSvgExport, Z as createRasterizedSvg, Y as createSvg, X as createSvgExport };