@genome-spy/app 0.85.0 → 0.87.0

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